The Stimulus component is a signal generator that uses a Comma separated stimulus file to shape its waveform. The concept of a stimulus file is familiar to users of MPLAB as it is one of the few ways that external data can be included in a test. A stimulus file can be created in a text file, or in a program like EXCEL and saved in CSV format. The Stimulus Function generator has 5 pins, 4 Signal output pins <S1><S2><S2><S4> and a Stimulus Trigger pin <TR>. If the UseTrigger property is TRUE the STIMULUS component waits until <TR> goes high before driving the Signal Pins <SN> as determined by its input stimulus file. If UseTrigger property is NO the STIMULUS component begins signal generation without delay. To generate a signal a STIMULUS file is read, and the pins driven according to the timing information in the stimulus file. When the last record of the stimulus file is read the STIMULUS component makes no further changes to the pins if the Loop property is set to NO. If the Loop property is set to YES the signal generation restarts from the first stimulus record. If there is no entry for time = 0, the default setting of all pins = LOW is used. In preparing the STIMULUS file, the timing value of each record is multiplied by a timebase unit as set by the TimeBase property. The default value if microseconds, hence a stimulus record 1000,0,0,0,0, with a TimeBase of microseconds indicates that at 1000 microseconds after the stimulus was triggered the outputs pins all have value LOW.
|
Stimulus |
Pinning | Properties | ||
| TR | TRIGGER | Filename | Location of of stimulus *.csv file | |
| S1 | Signal 1 | Loop | Sets Stimulus signals to continuously loop or single shot mode | |
| S2 | Signal 2 | TimeBase | Timebase of time component of stimulus file | |
| S3 | Signal 3 | UseTrigger | Actives the trigger pin | |
| S4 | Signal 4 | |||
The stimulus file format is a comma separated formatted file which can be created using EXCEL or any text editor or can be generated by the StimulusRecorder component. Each row in the file contains a TIMESTAMP and the values of the pins at that timestamp. At least one signal value must be included in each record. Where signal information is not available the signal uses the default LOW value.
TIMESTAMP, SIGNAL1, [SIGNAL2],[SIGNAL3],[SIGNAL4],
SimpleStimulus.csv
100,1,0,0,0,
110,0,0,0,0,
120,1,0,0,0,
In this example, once the stimulus has been triggered, as there is no setting for time = 0, pins 1,2,3,4 will assume the default LOW value for the first 100 us. At 100us Pin 1 will become high for 10us until 110us where it returns low until 120us after the stimulus was triggered. Then as all the data has been consumed if the loop property is true the STIMULUS component is re-triggered and the loop begins again resetting pin 1 to low, low is the default state of the pins.
|
Pin |
Name |
Description |
|
1 |
S1 |
Signal Output Pin |
|
2 |
S2 |
Signal Output Pin |
|
3 |
S3 |
Signal Output Pin |
|
4 |
S4 |
Signal Output Pin |
|
5 |
TR |
Stimulus Trigger Pin |
|
Name |
Default |
Options |
Description |
|
Filename |
*.vbb |
||
|
UseTrigger |
YES |
YES | NO |
Enables the trigger pin if YES else Trigger is not used |
|
Loop |
YES |
YES | NO |
Loops back to the beginning of the stimulus file at the end if YES |
|
Timebase |
us |
ns|us|ms |
The timebase multiplier of the timing |