|
AHDL supports two types of nodes: NODE
and TRI_STATE_NODE
.
Both types are all-purpose variable types used to store signals that have not been declared in the Subdesign Section or elsewhere in the Variable Section. Therefore, a variable of either type can be used on the left or right of an equation.
Both NODE
and TRI_STATE_NODE
are similar to the INPUT
, OUTPUT
, and BIDIR
port types of the Subdesign Section, in that they represent a single wire that propagates signals.
Compiler-generated names that contain the tilde (~ ) character may appear in the compilation database for a project. If you back-annotate the assignments in the database, these names will then appear in the project's Compiler Settings File (.csf). The tilde character is reserved for Compiler-generated names only; you cannot use it in your own pin, node, and group names. |
The following example shows a Node Declaration:
SUBDESIGN node_ex ( in1, in2 : INPUT; oe1, oe2 : INPUT; out : OUTPUT; io : BIDIR; ) VARIABLE n : NODE; t : TRI_STATE_NODE; BEGIN t = TRI(in1, oe1); t = TRI(in2, oe2); % t is bus of tri_stated in1 and tri_stated in2 % n = LCELL(t); out = n; % out = LCELL(t) % io = t; END;
NODE
and TRI_STATE_NODE
differ in that multiple assignments
to them yield different results:
Multiple assignments to nodes of type NODE
tie the signals together by
wired-AND
or wired-OR
functions. The default values for variables declared in Defaults Statements
determine the behavior: a VCC
default produces a wired-AND
function; a GND
default produces a wired-OR
function. If a variable does not have a default value, a wired-OR
function is used to tie the signals together.
Multiple assignments to a TRI_STATE_NODE
tie the signals to
the same node.
If only one variable is assigned to a TRI_STATE_NODE
, it is
treated as NODE
.
The following primitives and signals can feed TRI_STATE_NODE nodes:
TRI primitives
INPUT
ports from a design file at a higher hierarchical level
OUTPUT
and BIDIR
ports from a design file at a
lower hierarchical level
Other nodes declared as TRI_STATE_NODE
types in the current file
- PLDWorld - |
|
Created by chm2web html help conversion utility. |