User`s guide

Using Stimulus
© 2006 Microchip Technology Inc. DS51519B-page 237
18.2.5.2 MESSAGE-BASED DATA FILE DESCRIPTION
Data in the file will be interpreted in packets as follows:
HEX-style – spaced, separated hexadecimal numbers will be treated as one
packet, e.g., 05 07 6A 6B 105 107. Since the UART is 9-bits wide, receive values
larger than 0x1FF will be masked off.
RAW-style – text between a pair of quotation characters (") will be treated as one
packet, e.g., "this is a packet"
Two commands will be supported to specify the wait time between two packets:
•wait n unit – where n is a non-negative integer (0 to 2
64
-1) and unit is any time unit
(ps, ns, us, ms, sec, min, hr). This command specifies the time period to wait
before the next packet will be injected. If unit is invalid, then wait defaults to 0
seconds.
rand lower upper unit – where lower and upper are non-negative integers (0 to
2
64
-1, lower < upper) and unit is any time unit (ps, ns, us, ms, sec, min, hr). This
command specifies a random time period, bounded by lower and upper, to wait
before the next packet can be injected. If unit is invalid, then rand defaults to 0
seconds.
If there is a parsing error for either command (e.g., out-of-bound n, lower, or upper,
insufficient number of parameters), the command will be treated as wait 0 sec.
A comment line in the data file will begin with two forward slash characters in the first
and second character position, e.g. //. An empty line will be ignored.
Adjacent packet lines between wait, rand, and <EOF> will be concatenated as one
single packet (without the new line character present at the end-of-line).
18.2.5.3 MESSAGE-BASED DATA FILE EXAMPLES
Below are examples of message-based injection files.
EXAMPLE 18-4: REGISTER STIMULUS FILE 1
//wait for 0 second, then a packet of "abc cba",
//followed by a 9-bit number 0x163
wait 0 sec
61 62 63 20
63 62 61 163
//pause for 20 seconds after the previous packet,
//then a packet "efgh"
wait 20 sec
"efgh"
//immediately have another packet "2D4"
wait 0 ms
32 45 34
//pause for 10 ns
wait 10 ns
//pause for 10 more ns, then packet "43$24!"
wait 10 ns
34 33 24 32 34 21
//pause for a random time from 15 to 20 sec, then a packet
rand 15 20 sec
89 90 91 92 93 94
//pause for a random time from 0 to 100 min, then a packet
rand 0 100 min
11 22 33