<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Observations from Uppsala &#187; simulation</title>
	<atom:link href="http://jakob.engbloms.se/archives/tag/simulation/feed" rel="self" type="application/rss+xml" />
	<link>http://jakob.engbloms.se</link>
	<description>Computer Technology: Simulation, Virtualization, Virtual Platforms, Embedded, Multicore and Multiprocessing (by Jakob Engblom)</description>
	<lastBuildDate>Sun, 29 Jan 2012 19:45:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<image>
    <title>Observations from Uppsala</title>
    <url>http://jakob.engbloms.se/favicon.png</url>
    <link>http://jakob.engbloms.se</link>
    <width>32</width>
    <height>32</height>
    <description>Observations from Uppsala - http://jakob.engbloms.se</description>
    </image>		<item>
		<title>GPGPU for Instruction-Set Simulation &#8211; Maybe, Maybe not</title>
		<link>http://jakob.engbloms.se/archives/1506?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/1506#comments</comments>
		<pubDate>Sat, 08 Oct 2011 19:17:58 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[computer architecture]]></category>
		<category><![CDATA[computer simulation technology]]></category>
		<category><![CDATA[multicore software]]></category>
		<category><![CDATA[parallel computing]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[CCGrid]]></category>
		<category><![CDATA[cycle accuracy]]></category>
		<category><![CDATA[GPGPU]]></category>
		<category><![CDATA[GPU]]></category>
		<category><![CDATA[simulation]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=1506</guid>
		<description><![CDATA[I just read a quite interesting article by Christian Pinto et al, &#8220;GPGPU-Accelerated Parallel and Fast Simulation of Thousand-core Platforms&#8220;, published at the CCGRID 2011 conference. It discusses some work in using a GPGPU to run simulations of massively parallel computers, using the parallelism of the GPU to speed the simulation. Intriguing concept, but the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jakob.engbloms.se/wp-content/uploads/2008/05/coreshrink1.png"><img class="alignleft size-full wp-image-125" style="margin: 5px 10px;" title="coreshrink1" src="http://jakob.engbloms.se/wp-content/uploads/2008/05/coreshrink1.png" alt="" width="100" height="100" /></a>I just read a quite interesting article by Christian Pinto et al, &#8220;<a href="http://infoscience.epfl.ch/record/164471">GPGPU-Accelerated Parallel and Fast Simulation of Thousand-core Platforms</a>&#8220;, published at the <a href="http://www.ics.uci.edu/~ccgrid11/">CCGRID 2011 </a>conference. It discusses some work in using a GPGPU to run simulations of massively parallel computers, using the parallelism of the GPU to speed the simulation. Intriguing concept, but the execution is not without its flaws and it is unclear at least from the paper just how well this generalizes, scales, or compares to parallel simulation on a general-purpose multicore machine.</p>
<p><span id="more-1506"></span>The paper describes a simulation for a network-on-chip based homogeneous system containing a &#8220;ARM-subset&#8221; ISS instances with local instruction and data caches, some local RAM, and also some shared RAM. Each core runs its own local software load, there is no SMP operating system. All communication between cores is over shared memory, using explicit operations across the NoC. All cores run a single cycle before they check communications from their neighbors.</p>
<p>This last point is crucial to understanding why this is feasible at all &#8211; in general, simulating a general shared-memory multiprocessor machine on a shared-memory multiprocessor falls down on the synchronization overhead. If your simulation semantics dictate that you synchronize every cycle anyway, and you do not try to optimize each core simulator, there is clearly decent room for parallel execution. By including the cache, they increase scalability, since there is more work per target cycle that can be run in isolation.</p>
<p>After reading the article, I am impressed by their work &#8211; just getting this to work is pretty good work. But there are quite a few questions which are not really answered in the article and which are crucial to understanding just how well GPGPUs could be used for this kind of ISS work.</p>
<ul>
<li>The targeted level of abstraction is a bit confusing. The authors claim it is &#8220;instruction accurate and not cycle accurate&#8221;, but still simulate caches and cycle-based communications across the NoC. If I read the paper right, communications will take a varying number of cycles depending on the distance for messages to travel. This is more detailed than a typical &#8220;instruction accurate&#8221; simulator.</li>
<li>The target system does not run an OS &#8211; that might (but I do not know) be an advantage for their approach, since it probably implies less variation in the instruction flow in cores, potentially enhancing the amount of time that all ISSes in a thread group in the GPU can execute the same instruction. This would seem crucial, as if each ISS was running a totally different program, the instruction execution part of the code would be running serialized.</li>
<li>They should really try to run the same kind of simulation on a high-end x86 CPU like an Intel Sandy Bridge with 8 or more hardware threads. I wonder if their scaling might not work just as well there &#8211; and with a much faster serial execution engine. This should give  a much more relevant point of comparison for GPU vs CPU execution of the simulator than&#8230;</li>
<li>the comparison object they use right now, a JIT-accelerated multicore simulation using OVP seems pretty irrelevant since it is not doing the same thing at all. That simulator does not simulate the caches or NoC, just a large number of isolated processors. They also do not run a parallel program on OVP, but rather a large number of single-core fibonacci and dhrystone programs. Thus, the fact that OVP uses a large temporal decoupling time slice does not matter for semantics. It just does not seem like a very relevant comparison point. OVP and their simulator try to solve different problems &#8211; fast execution of general code vs. performance profiling of massively parallel machines.</li>
<li>As I understand it, the given &#8220;S-MIPS&#8221; numbers in the evaluation tell us the total number of MIPS that we get out across all target cores. That seems to peak around 2000 &#8211; which isn&#8217;t necessarily that fantastic if we compare to high-performance ISS work in general where a few GIPS is definitely achievable. It is pretty good considering the level of detail here, though, where i would expect a normal ISS + cache simulator to produce at most a few MIPS. Once again, the authors need to be a bit more precise as to what they compare to what.</li>
<li>Not having an MMU and not implementing any interrupts or exceptions in the target machines avoids a large part of the complexity of a real ISS. That complexity might well be too much for the quite rigid execution environment of a GPGPU.</li>
<li>They missed that Simics, unique among instruction-accurate mainstream simulators, is <a href="http://jakob.engbloms.se/archives/128">parallel </a>since version 4.0.</li>
</ul>
<p>So, overall, this paper does not really tell us much whether a GPGPU can be used for instruction-set simulation in general. It does tell us that it might be doable, but there are many crucial complications which are not addressed.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/1506"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/1506" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/1506" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/1506/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gary Stringham on Hardware Interface Design vs Virtual Platforms</title>
		<link>http://jakob.engbloms.se/archives/358?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/358#comments</comments>
		<pubDate>Sat, 29 Nov 2008 20:51:55 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[EDA]]></category>
		<category><![CDATA[embedded software]]></category>
		<category><![CDATA[ESL]]></category>
		<category><![CDATA[virtual platforms]]></category>
		<category><![CDATA[DML]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[Semifore]]></category>
		<category><![CDATA[simulation]]></category>
		<category><![CDATA[Spectareg]]></category>
		<category><![CDATA[SystemRDL]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=358</guid>
		<description><![CDATA[I just read an interesting paper from the 2004 Embedded System&#8217;s Conference (ESC) written by Gary Stringham. It is called &#8220;ASIC Design Practices from a Firmware Perspective&#8221; and straddles the boundary between hardware design and driver software development. It was good to see someone take the viewpoint of &#8220;how you actually program a hardware device [...]]]></description>
			<content:encoded><![CDATA[<p>I just read an interesting paper from the 2004 Embedded System&#8217;s Conference (ESC) written by <a href="http://www.garystringham.com">Gary Stringham</a>. It is called &#8220;ASIC Design Practices from a Firmware Perspective&#8221; and straddles the boundary between hardware design and driver software development. It was good to see someone take the viewpoint of &#8220;how you actually program a hardware device is as important as what it does&#8221;. Gary seems to understand both the hardware design and implementation view of things, as well as that of the embedded software engineer. To me, that seems to be a fairly rare combination of skills, to the detriment of our entire economy of computer system development.</p>
<p><span id="more-358"></span></p>
<p>Gary Stringham&#8217;s lists a number of tips on how to create hardware-software interfaces. Some of them are echoed on his <a href="http://www.garystringham.com/newsletter.shtml">monthly newsletter</a>, which is worth a read (even if it is a bit short on detail). Unfortunately, there seems to be no publicly available version of the text. Gary has definitely kept lecturing on the topic since, at venues like the ESC and DVCon it seems, but more recent lecture notes that I have found in the ESC proceedings are pretty sparse. I guess being a consultant teaching people to do these things for a fee makes you a bit hesitant to share all your knowledge freely with the world&#8230; I can understand that position.</p>
<p>Anyway. Some of the comments in the text indicate to me the great value that virtual platforms can bring to the actual design of hardware up front, not just as an execution vehicle for the final design, used by a software engineer who has to take whatever is given.</p>
<p>In particular, the issue of getting ASIC and Firmware designers to collaborate on the same thing at the same time. Quote:</p>
<blockquote><p>The key to designing an ASIC is to get the firmware engineers involved early. They are the customers that will be using the ASIC. Unfortunately, getting them involved early is often difficult to do because the ASIC design has to start several months before the firmware engineers will get parts</p></blockquote>
<p>And</p>
<blockquote><p>When the parts do arrive, the roles are reversed. The firmware engineers are trying to work with<br />
it while the ASIC engineers have mainly forgotten it and have moved on to new projects.</p></blockquote>
<p>The proposed solution to this problem is to involve the firmware people in the hardware design review process, which is a good idea.</p>
<p>It would be even better, however, if the firmware people could have the hardware interface to try as a live thing rather than just reading the documents. This is exactly what virtual platforms offer: quickly build a fast simple prototype of the interface, and hand it over to the software engineers to try.</p>
<p>This is something that I am currently <a href="http://jakob.engbloms.se/archives/330">exploring in some detail with Simics</a>, and that I wrote a piece about in <a href="http://chipdesignmag.com/display.php?articleId=2720&amp;issueId=31">Chip Design </a>earlier this year. Fundamentally, I think this is feasible, provided that hardware designers do not fret too much about timing details and the precise performance of the final implementation, and focus more on the programming interface design first &#8212; and then later go on and make sure the timing and performance is right.</p>
<p>It is just like software development is supposed to be done: start by designing a useful interface to a piece of functionality, and then add in the details and optimize performance within the boundary of that interface. Of course, the interface might need some adjustments to support certain optimizations, but it is quick and easy to provide a new virtual platform with a new behavior to the software engineer. Much faster than providing a new piece of silicon or even new documentation.</p>
<p>Register design tools like <a href="http://www.denali.com/en/products/systemrdl_about.jsp">SystemRDL </a>(<a href="http://www.arm.com/iqonline/news/marketnews/17617.html">now being standardized by SPIRIT</a>), <a href="http://spectareg.com/">Spectareg</a>, <a href="http://www.semifore.com/">Semifore</a>, etc. all touch on this, but all seem to be lacking the ability to actually describe what a device does beyond some simple basics like software and hardware read/write properties. You really need a full expressive language to write a truly executable model of the hardware (and I like <a href="http://www.virtutech.com/whitepapers/virtutech_dml.html">DML </a>for this).</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/358"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/358" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/358" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/358/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Cadence-Ran vs Synopsys-Frank over Low-Power and Virtual Things</title>
		<link>http://jakob.engbloms.se/archives/344?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/344#comments</comments>
		<pubDate>Sat, 15 Nov 2008 22:32:11 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[EDA]]></category>
		<category><![CDATA[ESL]]></category>
		<category><![CDATA[virtual platforms]]></category>
		<category><![CDATA[blog commentary]]></category>
		<category><![CDATA[Cadence]]></category>
		<category><![CDATA[Frank Schirrmeister]]></category>
		<category><![CDATA[power analysis]]></category>
		<category><![CDATA[Ran Avinun]]></category>
		<category><![CDATA[simulation]]></category>
		<category><![CDATA[Synopsys]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=344</guid>
		<description><![CDATA[Over the past few weeks there was a interesting exchange of blog posts, opinions, and ideas between Frank Schirrmeister of Synopsys and Ran Avinun of Cadence. It is about virtual platforms vs hardware emulation, and how to do low-power design &#8220;properly&#8221;. Quite an interesting exchange, and I think that Frank is a bit more right [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past few weeks there was a interesting exchange of blog posts, opinions, and ideas between Frank Schirrmeister of Synopsys and Ran Avinun of Cadence. It is about virtual platforms vs hardware emulation, and how to do low-power design &#8220;properly&#8221;. Quite an interesting exchange, and I think that Frank is a bit more right in his thinking about virtual platforms and how to use them. Read on for some comments on the exchange.</p>
<p><span id="more-344"></span><br />
The following appears to be to sequence of events:</p>
<ul>
<li>Cadence press release, in September, about their &#8220;<a href="http://www.design-reuse.com/news/19019/power-analysis-pre-rtl-exploration.html">Palladium Incisive Palladium Dynamic Power Analysis and Cadence InCyte Chip Estimator</a>&#8220;, quoting Ran:</li>
<blockquote><p><em>Cadence Incisive Palladium Dynamic Power Analysis enables SoC designers, architects and validation engineers to quickly estimate the power consumption of their system during the design phase, analyzing the effects of running various real software stacks and other real-world stimuli. The new offerings also include the Cadence InCyte Chip Estimator, which can now provide what-if power analysis through exploration of different low-power techniques. The InCyte Chip Estimator also generates automatically the Si2 Common Power Format (CPF), which helps drive architectural power specification and intent into implementation and verification.</em></p></blockquote>
<li>Frank Schirrmeister blogged &#8220;<a href="http://www.synopsysoc.org/viewfromtop/?p=50">On Chameleons, Low Power and the Marketing Power of Copy Editing</a>&#8220;, basically saying that what Cadence was selling was something that was bound to the RTL level and thus arriving with estimates pretty late in the design process, after most important architecture decisions had been made. Instead, he proposed a flow using <strong>virtual prototypes </strong>that contained a sequence of successively better estimates, from the usual initial spreadsheet to estimates actually derived from RTL later in the process (or for IP blocks that already exist). Synopsys is not alone in this, <a href="http://www.neosera.com">Neosera </a>and <a href="http://www.scdsource.com/article.php?id=82">ChipVision</a> are after similar ideas. I think this approach makes excellent sense, following the idea that getting some kind of approximate feedback from a complete system early in the process is better than getting lots of details from a small part of a system late in the process.</li>
<li>Ran Avinun then blogged a reply to Frank, at &#8220;<a href="http://http://www.cadence.com/Community/blogs/sd/archive/2008/10/30/the-power-of-cadence-system-power-flow-vs-viewing-from-the-top.aspx">The Power of Cadence System Power Flow vs. Viewing from the Top</a>&#8220;. His contention there is that virtual prototypes have their uses, but that real designers will be using hardware accelerators, as that provides the key accuracy needed to do real power work. Also, he sees the creation of a virtual platform as a big problem, and cites a number of cases where running the actual semi-final RTL with power simulation was key to project success. Also, Ran sees the time needed to create a virtual platform as a big obstacle.</li>
<li>Frank then replied to the reply, at &#8220;<a href="http://www.synopsysoc.org/viewfromtop/?p=53">Hammers, Nails and the Spirits That I Called …</a>&#8220;&#8230; where he points out that Ran has some misconceptions about virtual platforms, admits that the Cadence flow works well, but that it does miss the point of early power estimation before the design is too frozen to be much changed. There is a pretty but hard-to-read diagram in the post, from <a href="http://www.design-reuse.com/articles/12728/towards-activity-based-system-level-power-estimation.html">a 2005 article he wrote while at ChipVision in Germany</a>, pointing out the need to evaluate designs with actual test data from the real world.</li>
</ul>
<p>What do I make of all of this?</p>
<h2>Ran&#8217;s Points</h2>
<p>I must admit that I think the Palladium hardware simulation accelerator boxes are very cool pieces of hardware, which at least used to be based on custom logic systems that use several cycles of a fixed sized hardware to simulate multiples of the hardware&#8217;s based emulation capacity (so 10M capacity system can use 10 cycles per target cycle to simulate 100M, for example). However, I do agree with Frank that these are dependent on having actual RTL in place to be of much use.</p>
<p>Another issue with hardware emulators is their overall availability: compared to the number of PCs available in an organization, they are going to be very limited. As discussed in many different forums, a key advantage of a pure virtual platform is that it can turn any programmer&#8217;s PC into a target system running the real target software. Without having to book time on a limited set of physical target machines, and hardware accelerators are such limited-in-supply hardware machines. So a virtual platform is much more available to people within, and especially outside, a design organization. Also, unless you are happy to release RTL for your design to people outside your organization, hardware acceleration is going to do little to help your end users get the most out of your design, pre-silicon.</p>
<p>My final gripe with hardware emulators is their limited scope. They tend to max out at a the borders of a single chip, or less. A virtual platform, on the other hand, has much more room to scale, to include multiple chips, <a href="http://www.virtutech.com/products/simics_accelerator.html">multiple boards</a>, or even <a href="http://www.compactpci-systems.com/articles/id/?3537">complete racks</a> and networks of networks. You cannot really do that in any hardware simulation, as it involves too many billions of gates running too many billions on instructions. The general rule of simulation still applies with hardware acceleration: <a href="http://www.engbloms.se/publications/engblom-ESC2008-class410-simulation-paper.pdf">you need to increase the level of abstraction to handle larger systems</a>.</p>
<p>As to the problem faced by Ran&#8217;s customers, having RTL but no virtual platform: what were they thinking of? Seriously, if you want to do design today a virtual platform should be your starting point, not an afterthought. Time and again, we see examples today where using virtual platforms <a href="http://www.chipdesignmag.com/display.php?articleId=2720&amp;issueId=31">gets chips to customers ahead of time and provides the ability to test ideas before committing to final RTL</a>. It seems that Ran agrees with this need, but his means are different:</p>
<blockquote><p><em>&#8220;As was stated above, big reason our customers use RTL emulation platforms is for accuracy, and while virtual platforms can offer certain performance, eventually the need to accuracy becomes critical and can not be overlooked, even for initial performance and power estimation analysis. Frank seems to forget in his statement above that the average bring-up time of new virtual platforms takes 6-12 months while the average bring-up time of many emulated designs takes days.&#8221;</em></p></blockquote>
<p>The time to create a virtual platform is actually pretty short, if you do it at a sufficently abstract level of detail and don&#8217;t worry too much about cycle accuracy. Also, that bringing up of an emulation depends on having a detailed RTL-level description to start with&#8230; which is not necessarily the case. I must say that the cited six to 12 months for a VP (for a single SoC as discussed here) sounds reasonable to me &#8212; if you are building a cycle-level model that tries to emulate the final timing (<a href="http://jakob.engbloms.se/archives/153">which might not be really feasible at at all</a>). If you work at a higher level of abstraction like loosely-timed TLM, that time shrinks by a factor of ten or so. I agree that in the end, accuracy is critical &#8211; but before you get there, the approximations used by the VP will have gotten you pretty far in terms of software development and architecture testing.</p>
<p>Ran is also afraid of the lack of accuracy:</p>
<blockquote><p><em><span id="anormal_12" class="Cadence_CS_BlogDetail_BlogText"> Now, even if you build this platform successfully 9-12 months in advance, how do you know that your virtual platform representing your real design? How do you connect it to your verification and implementation environment and realistic power information? Frank seems to overlook these things. Looking at the analogy of the story described at the blog above, using a system-level platform that is not targeting the actual hardware for performance analysis and power trade-offs guarantees that the Chamelon will become a snake and you will get bitten. </span></em></p></blockquote>
<p>As with all simulations, virtual platforms needs to be used with care and understanding. It might also once again be a matter of system scale: for RTL simulation, you are looking inside a single chip, and the detailed design to save power there. With a VP, you might be looking at whether a particular OS kernel does even care to try to turn off unused hardware at all&#8230; and that might be just as important in the end as being accurate in how functional units turn on and off inside an accelerator.</p>
<p>In today&#8217;s software-driven systems that mostly consist of existing off-the-shelf hardware, not any particular SoC that is being designed right now, the large-scale behavior and smarts of the software in a setting containing lots of chips and functions is far more important than optimizations inside a chip.</p>
<h2>Frank&#8217;s Points</h2>
<p>Since Frank is a virtual platform supporter just like me, I instinctively agree with his points about VPs being pretty fast to develop and available long in advance of actual silicon. I like the way he deals with power in the ARM DevCon presentation cited (do have a look at it), but still there are some lingering doubts and issues&#8230;</p>
<p>What I have a hard time understanding is just how detailed the virtual platforms need to be. The use of SystemC TLM-2.0 LT is sensible for speed, but it seems from the DevCon presentation that the main emphasis is on AT-level (and therefore pretty slow) timing-accurate simulations that look at power cycle by cycle in the target. If that is the case, I think we could almost just as well go get ourselves a hardware accelerator, as cycle-level models (even if transaction-driven)</p>
<p>However, Frank also says this which I cannot but agree with: you should not always run around with a hammer and look at everything like a nail &#8212; any reasonable chip design process needs both virtual platforms and hardware accelerators, one cannot really replace the other:</p>
<blockquote><p><em>When discussing this matter with a friend, he pointed out rightfully so that both Ran’s and my post suffer from “Hammer and Nail-itis”. In fact, he pointed out, the combination of Cadence’s estimators (InCyte), C based synthesis, Palladium, and Synopsys virtual would be pretty powerful! It’s a good thing then that we acquired Synplicity which brought us Synplify high-level synthesis and Confirma FPGA Prototyping to Synopsys, and of course, that we have existing interfaces between our Virtual Platforms and Eve’s solutions. </em></p></blockquote>
<h2>Conclusion</h2>
<p>To me, the lesson from this discussion is clear: A virtual platform should be the starting point of a new design, but once you get down to RTL, hardware acceleration is really pretty useful. You need both, and VP should come first, not second. It is not an either-or issue, rather I expect system and chip designers to use both tools, and the only question is what should come first, which I think is naturally the simulation in the form of a virtual platform. That also allows the chip to be set into a system context, which is otherwise pretty hard before silicon arrives, and something that large system integrators are screaming for.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/344"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/344" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/344" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/344/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Article on CPCI and ATCA Systems on Virtual System Development</title>
		<link>http://jakob.engbloms.se/archives/278?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/278#comments</comments>
		<pubDate>Fri, 19 Sep 2008 09:20:23 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[embedded software]]></category>
		<category><![CDATA[virtual platforms]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[simulation]]></category>
		<category><![CDATA[software tools]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=278</guid>
		<description><![CDATA[The article/editoral &#8220;Using virtual platforms to improve AdvancedTCA software development practice&#8221; is now up at CompactPCI and AdvancedTCA Systems, an online and paper journal for the rack-based market. It is about our experience at Virtutech in using virtual platforms to drive system and software development for &#8220;pretty large&#8221; target systems, even those based on standard [...]]]></description>
			<content:encoded><![CDATA[<p class="title"><img class="alignleft size-full wp-image-279" style="margin-left: 10px; margin-right: 10px;" title="atca-rack" src="http://jakob.engbloms.se/wp-content/uploads/2008/09/atca-rack.jpg" alt="" width="100" height="101" />The article/editoral &#8220;<a href="http://www.compactpci-systems.com/articles/id/?3537">Using virtual platforms to improve AdvancedTCA software development practice</a>&#8221; is now up at CompactPCI and AdvancedTCA Systems, an online and paper journal for the rack-based market. It is about our experience at <a href="http://www.virtutech.com">Virtutech </a>in using virtual platforms to drive system and software development for &#8220;pretty large&#8221; target systems, even those based on standard hardware.</p>
<p class="title">And really, there is no such thing as a standard embedded system. Even if you use a standard backplane and buy off-the-shelf boards and cards to put in it, the combination of cards and added mezzanine cards makes each system quite unique. If you could use completely standard PC hardware for your system with no custom additions or special IO units, the thing would in likelihood not actually be an embedded system.</p>
<p class="title"><span id="more-278"></span></p>
<p class="title">This article was brought in by <a href="http://power.org">Power.org, </a>since Power Architecture is one of the most common processor architectures in rack-based infrastructure equipment. If you wondered why Power Architecture featured so prominently in the article.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/278"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/278" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/278" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/278/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In Praise of Scripting: Something for Modeling as Well?</title>
		<link>http://jakob.engbloms.se/archives/186?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/186#comments</comments>
		<pubDate>Sun, 03 Aug 2008 20:40:51 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[computer simulation technology]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[virtual platforms]]></category>
		<category><![CDATA[C/C++]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[DML]]></category>
		<category><![CDATA[Domain-specific languages]]></category>
		<category><![CDATA[programming languages]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[scripting languages]]></category>
		<category><![CDATA[simulation]]></category>
		<category><![CDATA[software tools]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=186</guid>
		<description><![CDATA[In the July 2008 issue of IEEE Computer, there is short article called &#8220;In Praise of Scripting: Real Programming Pragmatism&#8220;, by Ronald P. Loui, a professor at Washington University (WUSTL). The article deals with the issue of what is the appropriate first language to teach new CS (Computer Science) students, and considers that a &#8220;scripting&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-medium wp-image-187 alignleft" style="margin: 5px 10px;" title="ieee-computer" src="http://jakob.engbloms.se/wp-content/uploads/2008/08/ieee-computer.gif" alt="" width="89" height="71" />In the <a href="http://www.computer.org">July 2008 issue of IEEE Computer</a>, there is short article called &#8220;<a href="http://doi.ieeecomputersociety.org/10.1109/MC.2008.228">In Praise of Scripting: Real Programming Pragmatism</a>&#8220;, by <a href="http://www.cs.wustl.edu/~loui/">Ronald P. Loui, a professor at Washington University</a> (WUSTL). The article deals with the issue of what is the appropriate first language to teach new CS (Computer Science) students, and considers that a &#8220;scripting&#8221; langauge like Python or Ruby might be way better than Java (no doubt about that I think).</p>
<p>The interesting material in the article is the background on WHY he thinks that this is the case. He points to the immense popularity and rise of scripting in much of computing land. In the past ten years, it is clear to him (and I would agree with this too mostly) that languages like Perl, PHP, Awk, Ruby, JavaScript, and Python have eclipse Java and C++ as the most interesting and important programming languages for many practical tasks. Especially for web applications, where Java seems to have a presence but noone would dream of using something as clunky and impractical as C.</p>
<p>What can this teach us for the purpose of simulation and the creation of models of computer system hardware for the purpose of simulation? Maybe a fair bit&#8230;</p>
<p><span id="more-186"></span></p>
<p>The reason that scripting languages have gotten so popular is primarily that they let you get the job done faster. In web land, this is due to a few important factors listed or hinted at in the article:</p>
<ul>
<li>The overall code tends to be shorter and more to the point</li>
<li>A tendency to make any value into a string when needed (excellent debugging aid)</li>
<li>Dynamic typing, variables that just appear when needed</li>
<li>Automatic memory management</li>
<li>Ease of handling strings</li>
<li>Most tasks are pretty short</li>
<li>Performance of computation does not matter very much when processors are as fast as they are today and a single disk or network access operations is likely to dominate programming time</li>
</ul>
<p>What the article continues with a discussion that we need to focus on programming language <em>pragmatics</em> rather than syntax or semantics. How <em>practical </em>is the language for the everyday tasks of a programmer? And it seems that simple darwinian evolution has propelled scripting-style languages to the top of heap here. Purity and elegance and deep semantical properties are obviously less important than getting the job done in the shortest time possible.</p>
<p>What can this teach us modeling folks?</p>
<ul>
<li>A key takeaway is the focus on short code. Code has to be short and focused to be quick and easy to write. You should not need to consult several header files and lots of documentation to understand and formulate your code, which is an ill that keeps hitting C and C++ programs.</li>
<li>Memory management has nothing to do in a productive programming environment.</li>
<li>Basic types have to be appropriate to the task at hand.</li>
<li>Syntax has to be concise and powerful.</li>
<li>Dynamic typing is much faster to code with than static typing and variable declarations.</li>
<li>An interactive &#8220;try it out&#8221; environment is preferable to long compile/link/test cycles.</li>
</ul>
<p>Obviously, some of these do not translate well into hardware modeling. Hardware entities tend to have very-well-defined types by nature. If I have a 16-bit register containing a 13-bit counter and three status bits, I cannot very well let that counter be a dynamic variable that can take on any numeric value. Or the atom &#8220;foo&#8221;. It kind of has to be restricted in semantics to how the hardware would behave&#8230; it is not just a &#8220;value&#8221; to be manipulated quite abstractly. Which means that what you probably rather need are types well-suited for the task at hand.</p>
<p>It is also nice if variables can just pop into existence when needed, with the least amount of declaration possible. Another C-family performance killer is the annoying need to declare a function before calling it. That made sense in linearly scanning compilers back in the 1970s, but today, just let the compiler take the entire program into account and find the function. It is not that hard, especially not for the quite small and isolated context that a virtual platform device model is (few device models are more than a few thousand lines of code in my experience).</p>
<p>The interactive nature of scripting is also interesting. The ability to just write new code directly into a running system without an explicit compile usually rests on a virtual-machine approach and does have some cost in terms of performance. And unlike webservers, virtual platforms need all the raw CPU performance they can get! However, it make excellent sense to use an interactive environment to prototype and test things, and then move the resulting code to a harder compile stage.</p>
<p>Right now, we really do not have such a tool at hand. <a href="http://www.virtutech.com/whitepapers/virtutech_dml.html">Virtutech DML </a>is <a href="http://www.scdsource.com/article.php?id=166">in my opinion </a>the most promising step along this road, but it is not really &#8220;perl for modeling&#8221; at this time. SystemC has too many C++ roots to really behave well in this respect&#8230; you get all the drawbacks of explicit memory management, rampant headerfiles, and statically declared types. It might be good to compile, but it sure is an absolute pain to write.</p>
<p>And if we want virtual platforms to really fly, it is not so much &#8220;all about the models&#8221;, but really &#8220;all about model programming&#8221; &#8212; since there is a huge volume of models that need to written out there, and getting the time needed to write these models down is a primary concern. The total work invested in modeling any particular device is what we need to focus on, really.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/186"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/186" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/186" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/186/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Book review: Taxonomies for the &#8230; Digital Systems</title>
		<link>http://jakob.engbloms.se/archives/175?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/175#comments</comments>
		<pubDate>Sat, 26 Jul 2008 18:49:58 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[books]]></category>
		<category><![CDATA[computer simulation technology]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[ESL]]></category>
		<category><![CDATA[virtual platforms]]></category>
		<category><![CDATA[Brian Bailey]]></category>
		<category><![CDATA[Grant Martin]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[simulation]]></category>
		<category><![CDATA[Thomas Andersson]]></category>
		<category><![CDATA[VSIA]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=175</guid>
		<description><![CDATA[The book &#8220;Taxonomies for the Development and Verification of Digital Systems&#8220;, edited by Brian Bailey, Grant Martin, and Thomas Andersson, was published in 2005 by Springer Verlag. It is a legacy of the defunct VSIA, and presents an attempt to bring order to nomenclature and taxonomies in the chip design field (its scope is defined [...]]]></description>
			<content:encoded><![CDATA[<p class="firstHeading"><a href="http://jakob.engbloms.se/wp-content/uploads/2008/07/taxonomies-cover.png"><img class="alignleft size-medium wp-image-176" style="margin: 5px 10px;" title="taxonomies-cover" src="http://jakob.engbloms.se/wp-content/uploads/2008/07/taxonomies-cover-192x300.png" alt="" width="96" height="150" /></a>The book &#8220;<a href="http://www.springer.com/engineering/circuits+%26+systems/book/978-0-387-24019-0">Taxonomies for the Development and Verification of Digital Systems</a>&#8220;, edited by Brian Bailey, Grant Martin, and Thomas Andersson, was published in 2005 by Springer Verlag. It is a legacy of the <a href="http://vsi.org/">defunct VSIA</a>, and presents an attempt to bring order to nomenclature and taxonomies in the chip design field (its scope is defined to be broader than that, but in essence, the book is about SoC design for the most part).</p>
<p class="firstHeading"><span id="more-175"></span></p>
<p class="firstHeading">The book is obviously a collection of previous work, and the style is quite inconsistent from section to section. Not so much that it detracts from the value of the information, but it does feel a bit rushed.</p>
<p class="firstHeading">The book presents four sets of taxonomies:</p>
<ul>
<li>Models, which is by far the richest part. In addition to a definition of terms in the field of building models of digital systems, it also offers a detailed classification scheme for the models. The classification scheme uses five &#8220;resolution&#8221; axes along with an external/internal perspective to define what a model contains and at what level of resolution.</li>
<li>Functional Verification, which is really just a collection of terms.</li>
<li>Platform-Based Design, which is more of a marketing discussion in how to define and design platforms. Also mostly a definition of terms.</li>
<li>Hardware-Dependent Software (HdS), which defines terms. It has some attempts to classify software along some axes, but it does not really work out too well.</li>
</ul>
<p class="firstHeading">The main value is really in the second chapter, where it does provide a decent basis for discussing the level of abstraction at which models are created (note that accuracy is different from abstraction: a very detailed model at a very low level of abstraction can be totally off when considered from an accuracy perspective).</p>
<p class="firstHeading">However, I fear that the impact of this work has been fairly limited. No discussion on modeling that I have been participating in has really gone back to this basis and worked from there. I think a key problem here is that the material is only available as a quite expensive book from Springer, rather than as a freely downloadable document on the web. It is clear to me that spreading ideas today depends on free and easy digital access to the information&#8230; that&#8217;s why I have my own publications page up to make stuff that I have created available for reading.</p>
<p class="firstHeading">The hardware-dependent software (HdS) section gave rise to several &#8220;but they forgot X&#8221; comments from my part. For example, it is missing important aspects like processor virtualization, hypervisors, and IO virtualization (which totally change the game on HdS). Also, SMP operating systems are only giving a passing reference, with the focus on uniprocessors. And why do people keep using the term &#8220;<a href="http://en.wikipedia.org/wiki/Rate-monotonic_scheduling">Rate-Monotonic Analysis</a>? There are so many much more modern fixed-priority scheduling analysis theories, methods, and tools available that RMA is like talking about programming in assembler&#8230;</p>
<p class="firstHeading">What a choice for summer vacation reading&#8230;  and thanks to Bart Vanhournout at CoWare for the tip about the book in a discussion trying to pin down abstraction levels.</p>
<p class="firstHeading">
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/175"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/175" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/175" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/175/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Building a Wooden Deck and Computer Simulation</title>
		<link>http://jakob.engbloms.se/archives/144?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/144#comments</comments>
		<pubDate>Sat, 05 Jul 2008 19:16:43 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[simulation]]></category>
		<category><![CDATA[software tools]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=144</guid>
		<description><![CDATA[I just spent the first week of Summer vacation practising the Swedish national sport of home renovation. It seems that everyone is doing that all the time nowadays &#8211; it might be that I have reached the age of family raising where that becomes important, or it might be that it is a general trend [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-145" style="float: left; margin-left: 10px; margin-right: 10px;" title="Furuträ" src="http://jakob.engbloms.se/wp-content/uploads/2008/07/fuyu.jpg" alt="" width="170" height="103" />I just spent the first week of Summer vacation practising the Swedish national sport of home renovation. It seems that everyone is doing that all the time nowadays &#8211; it might be that I have reached the age of family raising where that becomes important, or it might be that it is a general trend that more people spend more time and money renovating their homes. I think it is the second case.</p>
<p>Anyhow, what we set out to do this year was to replace (most of) the twenty-year-old wooden decking on the backside of our small row house with a new one. This was quite an adventure, as we discovered all kinds of interesting designs and problems with the old decking structure. Problems, which do reflect on the realities of computer programming and simulation.</p>
<p><span id="more-144"></span></p>
<h2><strong>Preserving legacy structure</strong>s</h2>
<p>For the simple reason that we do not want to spend the entire four weeks of vacation building things, we decided to keep the original shed that is located at one end of the decking. Technically, this meant taking a saw, cutting the decking close to the shed, and rebuilding the rest of it. It also meant that we had to constrain the rest of the construction to preserve the original height of the decking, and the thickness of the boards used to construct it. Had we rebuilt everything, we would have done things differently and reconstructed the entire supporting structure of beams.</p>
<p>Now, we were forced to preserve the existing design, which is not quite optimal or fully modern. Very much like how it is when updating a large piece of software. Most of the time, you have to preserve old APIs, pieces of code, and design decisions that are not really optimal or modern anymore. Fixing it means starting from scratch, and quite often it is not considered worth the investment in time and effort.</p>
<p>You also tend to find amazingly poorly done items in old software, and so it was with our decking. A large part of the old deck had sunk some 10cm below its original level. When digging out to find out why, it became apparent that the beams had just been put on a bed of sand with no concrete or metal supports on the part closest to the house. That bed of sand had then been hollowed out by a misconstructed fix to a drain pipe that let the water spill out around the proper drain. Sigh. Not the first instance of poor workmanship around this house&#8230; and we had to do a workaround involving bricks, more beams, and a very large load of sand (I have shoveled some 800kg of dirt and sand during this project).</p>
<h2>Reflection on simulator construction</h2>
<p>The next observation is based on how the decking turned out in terms of the number and size of boards needed to cover the area. I had done some measurements beforehand indicating the width and length of the area to be covered. It looked like a number of 95mm standard boards with 3mm spacing would do perfectly to cover the area and provide a nice even end.</p>
<p>In the end, we wound up buying a small number of 120mm boards for the final row. For some reason, one side was 10mm wider than the other side. Also, the 95mm boards turned out not to actually cover the area quite as well as expected. Due to minor variations between the boards (in practice, they are 94 to 96mm) as well as imperfect spacing and the general plasticity of wood (it is a living material, not lego bricks laid out peg by peg) made our plans fall just short forcing a last-minute change to 120mm boards for the end.</p>
<p>As a simulation expert, you could say that this shows the shortcoming of the analytical approach. By making a single measurement of the width of the field, and assuming a single number for the width of a board, I set myself up for surprises when confronting a variable reality. If I had built a better model of the deck, measuring it at multiple places and measuring my boards and working out on paper &#8211; simulating &#8211; how they were to be put together, I could have predicted this and bought the 120mm boards in the original load instead of as an afterthought. In principle, this might be true.</p>
<p>But on the other hand, doing that simulation would have been tantamount to actually building the thing. Understanding the spacing between the boards and how their variations interact would have necessitated constructing in my mind, computer, or paper a perfect model of the deck. I doubt that it would have been saving me any time compared to just going out and putting the thing together, especially as the act of putting it together taught my just how variations occurred and how they worked out in aggregate.</p>
<p>I think the same often applies to computer simulation. Yes, you need to have more details and more variation than a simple analytical model. However, you also need to keep the model simpler than reality in order to make it feasible to construct, maintain, and execute at decent speed. Any model will have imperfections where it diverges from reality, and as a simulator constructor the game is not to be perfect but to provide a useful tool to your end users. If it is a bit imperfect, so what, as long as it is imperfect in unimportant ways and mostly provide good guidance. For more on the philosophy of simulation, I would suggest reading<a href="http://jakob.engbloms.se/archives/33"> a blog post from 2007 about golf games and computer simulation</a>.</p>
<p>So what would a useful model have been for my decking? I guess measuring a few more points would have helped, as well as measuring some set of boards and the device we used for spacing. That might have helped us spot the issue with the too-narrow final board ahead of time. But it was more fun this way, and this is vacation time and hobbyist work and not professional carpentry.</p>
<h2>Conclusions</h2>
<p>What conclusions can be drawn from this?</p>
<ol>
<li>I guess I am a hopeless nerd who can never stop thinking about technology.</li>
<li>I have a very nice deck now, looking forward to some decent days in the next few weeks to make use of it.</li>
<li>Building physical things is quite a satisfying experience, even if they do not turn out perfect in all details.</li>
</ol>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/144"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/144" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/144" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/144/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ESC Silicon Valley 2008: Again</title>
		<link>http://jakob.engbloms.se/archives/98?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/98#comments</comments>
		<pubDate>Tue, 08 Apr 2008 09:14:35 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[appearances]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[simulation]]></category>
		<category><![CDATA[software tools]]></category>
		<category><![CDATA[trade shows]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/archives/98</guid>
		<description><![CDATA[This is just a repeat post of http://jakob.engbloms.se/archives/75 . I will present at the ESC Silicon Valley, next Thursday, at 08.30 in the morning. On how to use simulation and virtualization to better develop embedded software. As a side note, a few years ago, I presented on efficient C programming for IAR Systems, guess that [...]]]></description>
			<content:encoded><![CDATA[<p><img src="https://www.cmpevents.com/ESCw08/images/logo_site_embedded_systems_sv.gif" align="left" height="45" hspace="10" vspace="10" width="182" />This is just a repeat post of http://jakob.engbloms.se/archives/75 . I will present at the ESC Silicon Valley, next Thursday, at 08.30 in the morning. On how to use simulation and virtualization to better develop embedded software.</p>
<p>As a side note, a few years ago, I presented on efficient C programming for IAR Systems, guess that would have made Jack Ganssle happy: <a href="http://www.embedded.com/columns/breakpoint/207002084">he complained about the lack of resource-constrained C programming skills in today&#8217;s university graduates in a column at Embedded.com recently.</a>  Apparently, the major market-driven education companies in the US have also dropped plain C programming from the course rosters&#8230; sounds like an  opportunity or void to be filled by the embedded companies. Buy a C compiler, get a free efficient programming course.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/98"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/98" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/98" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/98/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DATE 2008 Panel on Multicore Programming</title>
		<link>http://jakob.engbloms.se/archives/87?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/87#comments</comments>
		<pubDate>Sun, 16 Mar 2008 20:56:48 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[appearances]]></category>
		<category><![CDATA[computer architecture]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[multicore]]></category>
		<category><![CDATA[simulation]]></category>
		<category><![CDATA[software tools]]></category>
		<category><![CDATA[trade shows]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/archives/87</guid>
		<description><![CDATA[I attended a DATE 2008 open exhibition panel discussion on multicore programming, organized by Gary Smith EDA. The panel was a few people short, and ended up with just Simon Davidmann of Imperas, Grant Martin of Tensilica, and Rudy Lauwereins of IMEC. A user representative from Ericsson was supposed to have been there but he [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://jakob.engbloms.se/wp-content/uploads/2008/03/date08log.thumbnail.GIF" alt="date2008" hspace="10" vspace="10" align="left" />I attended a <a href="http://www.date-conference.com/conference/2008/prog/progdetail_exhibition.php?dateID=11">DATE 2008</a> open exhibition panel discussion on multicore programming, organized by <a href="http://www.garysmitheda.com/">Gary Smith EDA</a>. The panel was a few people short, and ended up with just Simon Davidmann of Imperas, Grant Martin of Tensilica, and Rudy Lauwereins of IMEC. A user representative from Ericsson was supposed to have been there but he never arrived. Overall, the panel was geared towards data-plane processing-type thinking, and a bit short on internal dissonance.</p>
<p><span id="more-87"></span> Any case, the panel said the following, including feedback from the audience (including the author of this post):</p>
<ul>
<li>Gary Smith laid out some data indicating that software is overtaking hardware as the main effort even for the core SoC designers for multicore. Today, some 50% is software, by 2012, 75% of the design cost will be software.</li>
<li> Rudy lamented the difficulty of doing anything with regular unrestrained C code, and<br />
described some IMEC research where they restrict down C to make it palatable. Probably related to their work on &#8220;2D&#8221; VLIW architectures. Their &#8220;clean C&#8221; can easily be analyzed and create statically scheduled code (my interpretation) that runs well without caches and cache coherency. The audience asked how you could actually write a program without using pointers&#8230; good point. I think it can work nicely for data crunching, but fails horribly for control-oriented and dynamic codes.</li>
<li>Grant made the point that <em>there is no need to panic</em>. Today, we can see people actually building successful multicore systems with today&#8217;s tools. It is a bit of muddling through, but it does get through. There is a lot of truth to that, but it misses the issue of converting or containing all legacy code that has a hard time moving from a single to multiple processors.</li>
<li>Grant also said that the applications he had seen the most success with where those typically called &#8220;embarrassingly parallel&#8221;. But why should anyone be embarrassed that they have such nice problems? <em>There is nothing to be embarrassed about, rather you should be proud of having such a nice system/algorithm.</em></li>
<li>Simon Davidmann echoed my favorite theme that simulation is a key tool to develop software for multicore, as it gives you insight and control.</li>
<li>When asked about hardware debug support, Simon was downright negative and wanted it all in simulation. Grant said that the proper solution was a mix of hardware debug and software simulators, which I agree with (see http://jakob.engbloms.se/archives/17 for some more thinking on this topic).</li>
<li>Someone pointed out that hardware debug is sometimes taken out of volume chips and is only used in development versions &#8212; apparently, that is common in automotive, as the cost of each shipping chip is of utmost importance. Less practical for larger machines, though, where you cannot easily build a development version of your rack/router/switch/server&#8230;</li>
<li>When asked about how to handle billions of lines of legacy code in a mix of C, C++, Java, and other languages, Rudy sounded downright exasperated. He seemed to be most comfortable with expressing algorithms and mapping them down to hardware using tools, rather than trying to deal with managing a zoo of legacy code&#8230; that is what I mean with the data-plane/data-crunching mindset of this panel.</li>
</ul>
<p>Overall, an interesting panel, but a bit disappointing in the lack of large-scale software thinking. Would have been nice to mix in someone with an HPC, server, or large-scale control-plane embedded-systems background in the panel.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/87"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/87" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/87" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/87/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SCDsource: Reality Check on Virtual Prototypes</title>
		<link>http://jakob.engbloms.se/archives/62?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/62#comments</comments>
		<pubDate>Thu, 20 Dec 2007 08:52:38 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[simulation]]></category>
		<category><![CDATA[software tools]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/archives/62</guid>
		<description><![CDATA[Bill Murray of the &#8220;New Media Outlet&#8221; SCDsource has published one of the best articles that I have seen on the use of software simulators and virtual prototypes in industry. The examples in the article run from low-level code run on very accurate simulators all the way to very fast virtual systems that are used [...]]]></description>
			<content:encoded><![CDATA[<p>Bill Murray of the &#8220;New Media Outlet&#8221; <a href="http://www.scdsource.com/article.php?id=59"></a><a href="http://www.scdsource.com">SCDsource </a>has published one of the best articles that I have seen on the use of software simulators and virtual prototypes in industry. The examples in the article run from low-level code run on very accurate simulators all the way to very fast virtual systems that are used instead of actual hardware to train NASA operators. The article covers the end-user perspective and is not particularly oriented towards a particular vendor. It offers some nice insights into the expected and unexpected benefits that various companies have obtained from using simulators of various kinds. As well as some glimpses into the underlying technologies they have chosen, developed, and adapted.</p>
<p>Highly recommended.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/62"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/62" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/62" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/62/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Golf Games and Computer Simulations</title>
		<link>http://jakob.engbloms.se/archives/33?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/33#comments</comments>
		<pubDate>Sat, 29 Sep 2007 15:49:25 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[games]]></category>
		<category><![CDATA[simulation]]></category>
		<category><![CDATA[software tools]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/archives/33</guid>
		<description><![CDATA[In my work at Virtutech trying to explain Simics and its simulation philosophy, it is often a struggle to get people to accept that what seems like pretty brutal simplifications of the world actually work quite nicely. Recently, I found a nice analogy in a golf game/simulator. The type where you swing a real club [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jakob.engbloms.se/wp-content/uploads/2007/09/golf.png" title="golf.png"><img src="http://jakob.engbloms.se/wp-content/uploads/2007/09/golf.thumbnail.png" title="golf.png" alt="golf.png" align="left" hspace="10" vspace="10" /></a>In my work at Virtutech trying to explain Simics and its simulation philosophy, it is often a struggle to get people to accept that what seems like pretty brutal simplifications of the world actually work quite nicely. Recently, I found a nice analogy in a golf game/simulator. The type where you swing a real club and send a real golf ball through the air.<br />
<span id="more-33"></span>First, I think I need to explain what Simics is. <a href="www.virtutech.com">Virtutech </a><a href="http://en.wikipedia.org/wiki/Simics">Simics </a>is a computer system simulation tool that models the hardware of an electronic computer-based system in sufficient detail that you can run the same software on it as you would on the real-world system. The simplest explanation is that it is &#8220;virtual hardware&#8221;. You can also get philosophical and point to the fact that software and hardware are both turing-complete, and therefore any hardware can be replicated by software and vice versa.</p>
<p>For this discussion, the most important property of Simics is that it strives to be as fast as possible in executing the software. This requires Simics to <strong>make some simplifications</strong> in its model of the physical hardware, since that is the only way to speed up the simulation. Fundamentally, the more detail you have in a simulator, the slower it is going to evolve the state of the world (run the software in our case). gt</p>
<p>Usually, computer system simulators aim at reproducing the actual behavior of the computer hardware at a great level of detail. The design goal is to be able to reproduce the timing in order to check that performance goals are being met, and to find design bottlenecks to increase the performance. Such simulators are quite detailed, and anyone familiar with the details of the hardware design will easily accept that the simulator is a valid depiction of the real system.</p>
<p>Unfortunately, such detailed simulators are also dog slow. If you are really lucky, you might see an execution speed of a few million hertz, i.e., simulated clock cycles per real-world second. Often it is less. And that is not really fast enough to run modern large software loads in a reasonable amount of real-world time. At that rate, running a program that takes 10 seconds on a real machine that we assumes clocks at 1 gigahertz will take several hours. Each time you run it. Not fun at all, and singularly unsuitable if your goal is something different from understanding the timing of the hardware.</p>
<p>With Simics, we made the decision that what the world <strong>also </strong>needs is a simulation that can run fast enough to make that 10 second-long program actually run in a reasonable amount of real-world time. Say around a minute or less. This facilitates using the simulator for software development and debugging, testing software and doing classic interactive debugging. Even for large workloads that contain many billions of interesting instructions. In order to achieve such simulation speed, on the order of hundreds of megahertz, you have to simplify.</p>
<p>(The golf simulator is coming up soon)</p>
<p>The easiest place to start simplifying is the details in the timing of the hardware. It is kind of hard to cheat on the functionality, since for real software to run you do need values to be computed in the right way. But if the values are not resulting at exactly the same time as they would in reality, software usually work totally fine anyway. This is to a large extent thanks to the asynchronicity of modern software, which will be the subject of another blog post/essay some day.</p>
<p>It is in getting the intuition why and how pretty drastic simplifications in a model still provide a useful tool that the golfing simulator analogy comes in.</p>
<p><strong>Let&#8217;s Play (Virtual) Golf</strong><br />
The golf simulator in question is the large room kind, where you shoot the ball at a screen showing a course. You are using real clubs and real balls, and the simulator measures the ball flight just before it hits the screen to determine where the shot ends up on the course. The aim is to provide a game where even a good golfer can get a satisfying experience akin to playing a real course, and offer a way to help players improve their game.</p>
<p>The defining property of a serious simulator, of any kind, is that it helps you understand the real world or improve your performance in the real world. This goes for flight simulators, combat simulators, driving simulators, not to mention role-playing games in management training and other analog forms of simulation going back to the &#8220;<a href="http://en.wikipedia.org/wiki/Kriegspiel_%28wargame%29">Kriegsspiel</a>&#8221; of the Prussian army.</p>
<p>This golf simulator definitely had that property.</p>
<p>But it was not in any way a complete simulation of the world. We noted some case where a ball seemed to be bouncing off of some invisible wall on the side of the field when we managed to hit it really bad (the group I was with were all golf novices and did not always send the ball off in the most appropriate direction). If you hit the ball into the virtual crowd, nobody got virtually hurt or tried to duck. The spectators just disappeared so that you could see the ball. That is certainly a limitation, but not one that detracts from the core game.</p>
<p>Another perhaps obvious limitation is that you can only use the golf simulator to play golf. I cannot use it to learn how mow a golf course in the best way, for example. This is something that always has to be kept in mind when using a simulator: if you use it for the wrong purpose, you have no idea on whether the results will be valid or not. The use case and design goal of any simulator has to be kept in mind when using it and deciding on which simulator to use. Note that some simulators can have pretty broad areas of applicability, but you must always be aware of where the boundaries are.</p>
<p>Finally, the simulator offered the typical simulator ability of providing extra insight. When you hit the ball, you could see the angle it took off, its speed, and the distance it traveled.  Not all that easy to do out in the field. From what I can tell from the <a href="http://www.fullswinggolf.com/">manufacturer&#8217;s webpage</a>, they have some pretty cool training tools in addition to the basic golf game.</p>
<p>It is the same with computer system simulations. They are good for certain things and not so good for other things, and you need to use the right simulator for your needs.</p>
<p><strong>More Reading</strong>: If you want to read more about computer system simulation in this style, a good starting point is the three-part article  I wrote for Embedded.com earlier this year. It can be found <a href="http://www.embedded.com/showArticle.jhtml?articleID=199501500">here</a>, <a href="http://www.embedded.com/showArticle.jhtml?articleID=199700228">here</a>, and <a href="http://www.embedded.com/columns/technicalinsights/199702616">here</a>.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/33"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/33" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/33" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/33/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

