Analysis of Three Factors in Rapid Embedded MCU Design Simulation

There are many ways to debug an embedded application. Designers can quickly build system prototypes using debug tools including in-circuit emulator (ICE) and in-circuit debugger (ICD) to help designers build prototype and final test phases. Find problems in hardware and software. In the debugging process, cost and ease of use are the main concerns. Compared to ICE tools, designers may prefer to use the simulator to debug code segments, because the simulator can run directly on the PC without mapping to the target. On the hardware.

Emulators are easy to use, allowing developers to learn about a new MCU or to familiarize themselves with a new integrated development environment (IDE) toolkit without having to touch the target hardware. Sometimes, designers can browse all the MCU products of a supplier for free. For example, users can download Microchip's MPLAB IDE and MPLAB SIM emulators for free from the official website (see Figure 1).

Figure 1. Many emulators (such as Microchip's MPLAB SIM) provide users with the graphical user interface needed to quickly debug applications.

The emulator provides special debugging features

In general, the emulator runs in an IDE environment and has similar functionality to other debug engines. Users usually use it to develop code when they start using the emulator. When the hardware design is completed, the hardware debugger can be used for testing. The basic debugging functions that the emulator can implement include: executing code to verify that its functionality conforms to the design specification; resetting the target system to re-run the application; suspending program execution at the breakpoint; checking and modifying the stored content and variables.

The latest emulators have unique features not found in some hardware debuggers, and more features can be implemented with this type of emulator. For example, it is easy to implement interrupt execution in complex situations – something that is not available with any ICE and ICD tools. Through event counting and breakpoint execution, users can construct complex events. With this complex breakpoint, you can describe the abnormal behavior of the code, tracking the code under abnormal conditions. This way, you can find bugs more quickly than setting simple breakpoints and skipping execution in your code.

Analyze code by simulation

Designers can use the emulator to respond to pin input and output signals, mimicking the behavior of MCU peripheral components. To achieve this, some advanced simulators provide complex excitation generators that can simulate signals. With this feature, the user can test the firmware module by loading the input signal to the firmware module. For example, two interrupt signals can be generated that are separated by 50 ns. This way of simulating signals is difficult to do with real hardware. The stimulus generator can send a signal to a device pin or to a register within the emulator. By using the USART as an I/O device or by using a register log, the simulator's behavior can be recorded in a log file for subsequent analysis.

Most simulators support three sources of excitation. Manual triggering can be generated by a mouse click, a cyclic excitation that produces a repetitive waveform, and a continuous excitation that loads data into bits, registers, or registers. These continuous data can be entered into a dialog box or from a file. The emulator can also emulate peripheral components so that devices such as A/D converters, I/O pins, serial communication devices, and timers can be activated. These peripherals can be used with analog waveforms and analog digital inputs, and can accept manual inputs to simulate interrupts and sensor readings (as shown in Figure 2).

Figure 2 The simulator typically supports three stimulus sources and has convenient definition and configuration features.

Improve code performance

Most advanced emulators are able to associate the execution of an application on the target system with the source code, allowing the designer to step through high-level language code, such as C code, even though each C statement may generate multiple lines of machine code. . Similarly, the memory contents in the file registers can also be associated with variables used in the program. Therefore, if a floating point number spans multiple machine file registers, the designer can monitor the contents of the register at the observation point and display it in floating point representation.

The simulator can also be used to optimize program routines to accurately measure and adjust the execution time of certain key codes. The user can use the emulator's stopwatch function to time the execution of a piece of code. Depending on the frequency of the processor, the stopwatch can be timed for the executed instructions.

The stopwatch function is not the only way to measure time in the simulator. Some applications, such as motor control, do not allow interrupts to be run at a breakpoint. In these cases, it is a good alternative to keep the program stream and register read and write results in the trace buffer. The trace buffer records the instruction as it executes and gives each instruction a timestamp. This way, when an event in the trace buffer is captured, it can be timed. For example, by capturing a series of interrupts, it is easy to calculate the time interval between interrupts and the total time spent executing each interrupt.

The emulator can log changes in register values ​​to a file for performance analysis. With emulators, engineers can observe or respond to an algorithm's response to multiple inputs. For example, Fast Fourier Transform (FFT) can be performed for multiple sets of stored data (eg, data read from the A/D converter result register using target hardware), but total control is required for the type of data that is desired to be seen.

This Vacuum Cleaner is not only a Cordless Sticker Vacuum Cleaner,but also a Rechargeable Vacuum Cleaner. It is lightweight and useful. It is a really cyclone style and bagless one. Its filter is washable and easy cleaning. You can also choose the HEPA filter,I think it will be better. Although it is a mini and lightweight vacuum cleaner,its suction power is very high. Now let's see the picture blow.

8209Dx

Cordless Sticker Vacuum Cleaner

Cordless Sticker Vacuum Cleaner, Cordless Vacuum Cleaners, Cordless Upright Vacuum, Cordless Upright Vacuum Cleaner

Ningbo ChinaClean Household Appliances Manufacture Co., Ltd. , http://www.chinaclean-elec.com