It's Called Simulation

April 10, 2008
The term virtual prototyping has a nice ring. But it confuses the issue when it’s mixed with virtual machines and virtual memory. All three present a warped sense of reality. Of course, the term simulation also cuts a wide swath. Still, simul

The term virtual prototyping has a nice ring. But it confuses the issue when it’s mixed with virtual machines and virtual memory. All three present a warped sense of reality. Of course, the term simulation also cuts a wide swath. Still, simulation is probably a better definition of today’s discussion on processor simulation.

The degree of detail associated with processor simulation can vary significantly. Most designers are familiar with Electronic System Level (ESL) design methodologies from various companies. Their tools provide very detailed simulations down to the transistor level.

These tools are used to design and prove the chips that eventually will be built, but more often they’re used to provide software developers with access to the chips before they’re built. In fact, many companies plan to deliver working software prior to chip availability, significantly shortening time-to-market.

THE HURDLES Several problems can limit simulation’s effectiveness. Speed used to be the primary factor. The more detailed the simulation, the more code that must be executed. Multicore host support and even hardware-accelerated simulation can help considerably but at a cost.

This cost is one reason for a range of simulation models. A step up from transistor- level accuracy is cycle-accurate simulation, where programmers can test a system. Cycle-accurate simulation is important with DSPs. Minor changes in architecture can have a major impact on performance. That’s why Texas Instruments has a flexible internal system where its simulator can be easily modified with new instructions or semantics. Changes to the compilers allow the change to be tested empirically.

This level of accuracy isn’t always needed. In fact, programmers probably use ISA-level (Instruction Set Architecture) simulation the most since fine-grain timing-related issues are often limited in many applications. Also, most development prior to chip availability is done on a different platform using a high-level language like C or C++ that runs natively on the development platform.

Peripherals present a more important problem. They can be simulated readily on a development platform that simply has a compiler, and this is where an ISA simulator, or better, with peripheral simulation support makes a difference. Internal peripherals like timers tend to be the easiest to simulate. But communication devices such as Ethernet and serial ports or display devices like LCD controllers can link a simulation to the outside world.

Analog interfaces, though, tend to be more difficult and common among microcontroller simulators. The care and feeding of these interfaces is more difficult since the data streams can be more complex unless comparable hardware interfaces can link external devices to the simulation environment.

THE BENEFITS Simulators can significantly benefit developers, especially at the lower end of the microcontroller spectrum. For example, Microchip’s Simulator Logic Analyzer (SLA) can trace digital I/O pins, including serial ports. It also can track the data side of an analog interface.

Another advantage is speed, which is just the opposite of simulating more complex platforms because 3-GHz PCs run significantly faster than the 20-MHz microcontrollers they might be simulating. This can be a significant benefit in regression testing. Likewise, features such as tracing and profiling are often available with simulation that isn’t available with the real hardware.

Simulation is one of the most overlooked tools available to developers. Demanding better support in areas such as peripheral simulation as well as analog support will make it more effective. Demand it now because multicore design is yet another area where simulation will prove to be invaluable.
MICROCHIP • www.microchip.com
TEXAS INSTRUMENTS • www.ti.com

About the Author

William G. Wong | Senior Content Director - Electronic Design and Microwaves & RF

I am Editor of Electronic Design focusing on embedded, software, and systems. As Senior Content Director, I also manage Microwaves & RF and I work with a great team of editors to provide engineers, programmers, developers and technical managers with interesting and useful articles and videos on a regular basis. Check out our free newsletters to see the latest content.

You can send press releases for new products for possible coverage on the website. I am also interested in receiving contributed articles for publishing on our website. Use our template and send to me along with a signed release form. 

Check out my blog, AltEmbedded on Electronic Design, as well as his latest articles on this site that are listed below. 

You can visit my social media via these links:

I earned a Bachelor of Electrical Engineering at the Georgia Institute of Technology and a Masters in Computer Science from Rutgers University. I still do a bit of programming using everything from C and C++ to Rust and Ada/SPARK. I do a bit of PHP programming for Drupal websites. I have posted a few Drupal modules.  

I still get a hand on software and electronic hardware. Some of this can be found on our Kit Close-Up video series. You can also see me on many of our TechXchange Talk videos. I am interested in a range of projects from robotics to artificial intelligence. 

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!