Electronic Design

It's Called Simulation

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

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish