What are ICE (In Circuit Emulators) and how do they work?

What are ICE (In Circuit Emulators) and how do they work?

Reading time: 5 minute

The emulators are very complex electronic equipment which give us the opportunity to see what happens in the internal structure of the microcontroller or processor.

The analogy can be made with an oscilloscope or a logical analyzer, but which analyzes what happens inside the microcontrollers at the level of signals, registers, memory and program instructions.

How does ICE (In Circuit Emulators) help us?

With their help we can go through the programs step by step both at the level of machine code and at the level of program line C.

We can go through the programs to the desired points (so-called breakpoints), you can view registers and portions of the microcontroller's memory (so including program variables), you can see how certain events occurred (the sequence of instructions that led to the events similar to the time magnifier of an oscilloscope, but applied software of).

All this happens while the hardware prototype of the application works with the help of the emulator.

What is an emulator made of?

The most sensitive part is the so-called sample or emulation head. It is a electromechanical device that has exactly the same design as the microcontroller and which sits on the hardware prototype of the application instead of the microcontroller.

Through this emulation head, all the signals corresponding to the microcontroller are brought into the emulator itself. The emulator or emulation head contains either a special microcontroller (called a bondout chip) or the microcontroller in the application so that the application software runs in a real, unsimulated way.

What is and how does the Bondout chip work?

The Bondout chip is a microcontroller produced especially for emulator manufacturers and has about 3 times more pins than the base microcontroller, the additional pins are connected to the BUS and to the internal structures of the microcontroller to allow us to see what is happening in the internal structure of the microcontroller.

The emulator is permanently connected with an emulation software that runs on the PC through which we load the application in the microcontroller and run it as we wish.

An emulator is usually built for each family of microcontrollers, what differs is the emulation head: an emulator can work with several emulation heads, in addition it offers a wide range of adapters for different types of capsules.

Another important feature is the maximum working frequency of the microcontroller in the application, an emulator like an oscilloscope has a maximum frequency up to which it can follow the process.

What are the advantages of using emulators?

Time gained

The emulation software allows the visualization (even while the application on the microcontroller is running) of the variables, registers and working memory. The effect of any change in the source body of the program can be seen immediately, directly.

Application control

Another advantage is the control of the application. The program can be run line by line in both machine code and C.

The program can be completed to any point, a very large number of stops can be set in the program (breakpoints). Events can be set to cause the application to stop with the possibility of analyzing the instructions that led to the event.

For example, the emulator can be set so that when a certain variable reaches the value "0" it stops the application and shows the last instructions made by the microcontroller until this event occurs.

Another aspect of application development using emulators is program analysis. Emulators can analyze and report the use of a function in an application.

This means that we can have information on how many times a certain function was called, what percentage of the computing time the microcontroller was used by these calls and even more. We can find out in microseconds the minimum, average and maximum execution times of the functions.

Code traversal analysis

Another feature offered by emulators is code traversal analysis. Depending on the input parameters and the previous states, the path of the application software changes, a piece of code runs only when certain conditions are met.

For example, an alarm sounds only when it is activated and one of the sensors gives a certain signal. When a product is considered ready, it is good to know if all the instructions have been executed at least once, sending into production applications with code that has not been executed at least once can create surprises, usually unpleasant. Emulators have this facility to shows whether or not an instruction has been passed.

All this happens in real time on the microcontroller and the board on which it must be mounted, on the computer monitor having permanently the information inside the microcontroller whether it is related to the status of the program, internal registers or the rest of the memory.

Thus, the emulator is a high-performance solution for developing microcontroller applications. If in electronics without microcontrollers the oscilloscope is used, in applications with microcontrollers the circuit emulators are also used.

It is the most efficient way to see what is happening inside the microcontroller. Most companies that want to make high-performance applications in a short time use emulators.

What other problems can occur?

These are related to software testing. For some products, the test part can reach 80% of the software development effort. Testing issues also occur in PC applications.

We could define testing as follows: for certain inputs let's check if we get the desired outputs from the software block under test. This is quite difficult to do for PC applications and even more so for microcontrollers.

However, this is possible using an emulator. This emulator testing software generates input values ​​and compares the result of the microcontroller application with the expected results, thus being able to have the certainty that the software works correctly for the tested values.

All of these input value-expected value pairs can be saved to a file, and testing can be repeated each time the software changes.

Although emulators are not cheap testing solutions at all, they are extremely effective. Switching from one product to another, from one platform to another is very easy. The certainty of obtaining a viable product is very high.

MetaICE XF emulator

For the development of applications with microcontrollers from INTEL 8051 family or derivatives of (Atmel, Dallas, Philips, etc.) company MetaLink produces the series of MetaICE emulators. The emulator consists of three modules.

The component parts of the emulator presented in the figure above are: the PDIP 40 test head that ensures the connection between the emulator and the tested system, the emulation circuit that also fulfills the functions of communication with PC and verification of program execution conditions as well as a customization module of the emulated microcontroller.

Bibliography:

https://semiengineering.com/
https://www.evilmadscientist.com/

 1,080 total hits, 3 hits today

Add a comment

Your email address will not be published.

The maximum upload file size: 2 MB. you can upload: image, audio, video, document, spreadsheet, Interactive, text, archive, queues, other. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here