Design Article
Testing and Debugging DSP Systems, Part 3
Rob Oshana, Texas Instruments
3/8/2007 3:00 AM EST
Emulation Basics
Emulation is a technology used in the development of embedded systems. Emulation gives the developer the control and visibility needed to integrate hardware and software. This technology effectively imitates the DSP processor in its electrical characteristics and performance, while at the same time giving the engineer more visibility and control into the processor behavior than would otherwise be available from the processor itself.
An emulator contains both hardware and software technology. Emulation hardware consists of functionality on the DSP chip, which enables the collection of data. This data provides state behavior and other system visibility. Hardware is also required to extract this information from the DSP device at high rates and format the data. Emulator software provides additional higher level control and an interface with the host computer, usually in terms of an interface called a debugger. The debugger provides the development engineer an easy migration from the compilation process (compiling, assembling, and linking an application) to the execution environment. The debugger takes the output from the compilation process (for example, a .out file) and loads the image into the target system. The engineer then uses the debugger to interact with the emulator to control and execute the application and find and fix problems. These problems can be hardware as well as software problems. The emulator is designed to be a complete integration and test environment.
Emulator System Components
All emulator capability is created by the interaction of three main emulator components:
- On-chip debug facilities
- Emulation controller
- Debugger application program running on a host computer.
These components are connected as shown in Figure 7.The host computer is connected to an emulation controller (external to the host) with the emulation controller also connected to the target system. The user controls the target application through the debugger in the IDE.

Figure 7 A basic emulation system (courtesy of Texas Instruments)
Emulation technology for DSP can be found throughout the development environment; from the processor, to the emulator, to the host platform.
On the DSP device itself, higher clock rates require the emulation logic to be on chip, so that it can run at top speed, and keep up with the processor rates. Higher levels of integration hide the buses within the chip, rather than allowing them to be visible through pins. This also pushes the emulation logic onto the chip, so that it can gain access to the system buses. DSP vendors have been aggressive in integrating advanced emulation capabilities on the DSP device.
The next element is the emulator, which is designed to connect the target board to the host platform, and provides the data transfer mechanism between the host and the target processor.
The third and final element is the debugger and emulation software. This software is self-configuring to the DSP device, and implements user interfaces to make debugging system-on-a-chip (SoC) devices as simple as possible. These IDEs also support the development of "plug-in" applications that can both control the processor, and visualize emulation data coming up from the processor via a high-speed data interface.
The host computer, where the debugger runs, can be a PC or workstation. The host computer can connect to the emulator using a variety of interfaces including Ethernet, universal serial bus (USB), Firewire (IEEE 1394), or parallel port.
The host computer can play an important role in determining the data bandwidth from the device to the host. The host to emulator communication plays a major role in defining the maximum sustained data bandwidth for certain data transfer protocols. In some emulation implementations, for example, the emulator must empty its receive data buffers as fast as they are filled. Secondly, the host client originating or receiving the data must have sufficient MIPs and/or disc bandwidth to sustain the preparation and transmission or processing and/or storing of the received data from the DSP. The point here is that a powerful PC or workstation will have a performance impact on the emulation system as a whole.



