Download ABEL-HDL Reference Manual

Transcript
Basic Syntax
Constants
You can use constant values in assignment statements, truth tables, and test vectors.
You can assign a constant to an identifier, and then use the identifier to specify that
value throughout a module (see Declarations and Module later in this chapter).
Constant values can be either numeric or one of the non-numeric special constant
values. The special constant values are listed in Table 1-1.
Table 1-1. Special Constants
Constant
Description
.C.
Clocked input (low-high-low transition)
.D.
Clock down edge (high-low transition)
.F.
Floating input or output signal
.K.
Clocked input (high-low-high transition)
.P.
Register preload
.SVn.
n = 2 through 9. Drive the input to super voltage 2
through 9
.U.
Clock up edge (low-high transition)
.X.
Don't care condition
.Z.
Tri-state value
When you use a special constant, it must be entered as shown in Table 1-1. Without
the periods, .C. is an identifier named C. You can enter special constants in upperor lowercase.
Blocks
Blocks are sections of text enclosed in braces, { and }. Blocks are used in equations,
state diagrams, macros, and directives. The text in a block can be on one line or it can
span many lines. Some examples of blocks are shown below:
{ this is a block }
{ this is also a block, and it
spans more than one line. }
{ A = B # C;
D = [0, 1] + [1, 0];
}
ABEL-HDL Reference Manual
19