|
A Register Declaration is used to declare registers, including D
, T
, JK
, and SR
flipflops (DFF, DFFE, TFF, TFFE, JKFF, JKFFE, SRFF and SRFFE) and latches (LATCH). The following example shows a Register Declaration:
VARIABLE ff : TFF;
The name of this instance of a T flipflop is ff
. After making this declaration, you can use the input and output ports of the instance of ff
in the format <instance name>.
<port name>:
ff.t ff.clk ff.clrn ff.prn ff.q
Since all primitives have only one output, you can use the name of an instance of a primitive without appending a port name (that is, without .q
or .out
) on the right of an equation if you want to use its output. Similarly, for all primitives that have a single primary input, that is, all primitives except JKFF, JKFFE, SRFF, and SRFFE, you can use the name of an instance of a primitive without a port name (that is, without .d
, .t
, or .in
) on the left of an equation to connect the primitive to its primary input.
For example, the DFF Function Prototype is FUNCTION DFF(d, clk, clrn, prn) RETURNS (q);
. In the following Text Design File (.tdf) excerpt, a = b;
is equivalent to a.d = b.q;
:
VARIABLE a, b : DFF; BEGIN a = b; END;
- PLDWorld - |
|
Created by chm2web html help conversion utility. |