Download SMASH - Reference manual

Transcript
Chapter 7 - Digital Stimuli
___________________________________________________________________________________
WAVEFORM pulse_abs
* Absolute times style:
0 CK=0,A=1;
10 CK=1;
20 CK=0,A=0;
50 CK=1;
80 CK=0;
FINISH.
WAVEFORM pulse_rel
* Relative times style:
0 CK=0,A=1;
+10 CK=1;
+10 CK=0,A=0;
+30 CK=1;
+30 CK=0;
FINISH.
Important note: when using a relative notation, you cannot leave any spaces between the + sign and
the delta time value.
This relative notation is mostly useful to describe long waveforms of pseudo-random patterns, and
within loops.
Loops
Inside a WAVEFORM statement, you may want to be able to say: “repeat this sub-section N times”,
instead of explicitly duplicating a sub-section N times. The loop mechanism allows this.
When a given pattern has to be repeated a number of times, you can use a loop to describe it,
instead of duplicating it. The loop mechanism makes the pattern file much more readable. The
general form for a loop is:
LOOP N
+deltat1 ... ;
+deltat2 ... ;
...
ENDLOOP
Such a loop section cannot appear outside a WAVEFORM section. It has to be located between
“WAVEFORM” and “FINISH” keywords. You can place several separate loops inside the same
WAVEFORM.
Note: it is not allowed to declare a loop within another loop.
The patterns described within the loop, which must use a relative notation, will be repeated N
times.
Example:
WAVEFORM foolish
// some "normal" patterns:
0 CK,A,B=0;
500 A=0;
// and now a loop:
LOOP 10
+10 CK=0,A=1,B=0;
191