User manual

UM0036 Simulator features
Doc ID 7705 Rev 11 207/385
In the same stimuli file you can script inputs for multiple pins and different types of inputs (for
example, you can define both analog and digital inputs on different pins).
Using your stimuli file
To use a stimuli file, simply load it prior to running your simulation by selecting File>Load
Stimuli File.
During debugging, if you want to see the input stimuli commands that are being used by the
simulator, at the command prompt in the Console tab of the Output window, enter the
command:
gdi pin -stimuli
The text commands for the current stimuli are displayed using the syntax described above.
If you no longer want to use the stimuli file that you have loaded for the simulation, stop
using the file by ending the debug session (Debug>Stop Debugging), or loading a different
stimuli file. Alternatively, on the command line in the Console window, enter the following
command:
gdi pin -clear
6.3 Using the simulation plotter
You can view a graphical display of your simulation in the Plotter window. This display
shows the values for selected items (such as registers, variables, signals) as they evolve
during the simulation. The plotted information for any item that interests you can be printed
as it is represented in graphic form by the plotter, or exported in Value Change Dump (VCD)
Table 62. Stimuli file syntax
Signal Description
Digital input signal
Syntax pin pin_name -i digital_value time
Example PIN PA1 -i 1 100
Description
Input the value 1 on PA1, 100 CPU cycles after the start of the simulation. Because the
signal is digital, the input value must be 1 or 0.
Analog input signal
Syntax pin pin_name -a analog_value time
Example PIN PB1 -a 3.3 1020
Description
Input the analog value 3.3 on PB1, 1020 CPU cycles after the start of the simulation.
Analog values must be between 0 and 6.55.
Periodic digital input signal
Syntax
pin pin_name -c start_digital_value start_time half_period
[-cycle cycle_number | -end end_time]
Example PIN PA1 -c 1 143 20
Description
Beginning 143 CPU cycles after the start of simulation with an input value of 1,
alternate between input of 0 and 1, every 20 CPU cycles.