Segment Import and Export Language
Concepts
328
Agilent 81250 Parallel Bit Error Ratio Tester, Programming Reference, March 2006
Using Base h (hexadecimal)
:statePar: { { B "0 x1"}
#define state set B to have coding "0 x1"
:stateSet: B
#select state set B
:base: h
#use hex characters
:vectorWidth: 5
#vector is 5 states wide
:vectors:
{
03a
#this is the vector
}
Each hexadecimal character needs 4 bits and so in the above example
the vector is 12 bits wide. As only 10 bits are necessary to represent 5
vectors, the leftmost 2 bits are ignored:
0000 0011 1010
Finally, the same example using base d (decimal):
Using Base d
:statePar: { { B "0 x1"}
#define state set B to have coding "0 x1"
:stateSet: B
#select state set B
:base: d
#use decimal characters
:vectorWidth: 5
#vector is 5 states wide
:vectors:
{
58
#this is the vector
}
The decimal value 58 is decoded as a 32 bit unsigned integer:
00000000 00000000 000000
00 00111010
the 10 rightmost bits being the vector.
When using hexadecimal and decimal bases, decoding still requires a
valid state set to know the bit width of each state.
Scopes
Scopes are important to the lifetime of optional variables. There are
2 scopes, vector variable scope and parameter scope. In the following
diagram, the
:base:
parameter is used to illustrate scope. At the start
of the program fragment, base w is defined (although base w is default
we define it for demonstration purposes). The first grey shaded area
shows the scope of the base w command. Waveform characters are
thus used in SegA. In SegB a new base h is specified. The white box
shows the scope of the base h command.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com