A node, which is declared with a Node Declaration in the Variable Section, can be used to hold the value of an intermediate expression.
Node Declarations are especially useful when a Boolean expression is used repeatedly. The Boolean expression can be replaced with a descriptive node name, which is easier to read.
The boole2.tdf file shown below contains the same logic as boole1.tdf (shown in Implementing Boolean Expressions & Equations), but has only one output.
SUBDESIGN boole2 ( a0, a1, b : INPUT; out : OUTPUT; ) VARIABLE a_equals_2 : NODE; BEGIN a_equals_2 = a1 & !a0; out = a_equals_2 # b; END;
This file declares the node
a_equals_2 and assigns the value of the expression
a1 & !a0 to it. Using nodes can save device resources when the node is used in several expressions.
Both ordinary nodes (
NODE keyword) and tri-state nodes (
TRI_STATE_NODE keyword) can be used.
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
Back to Top
- Altera -
|Created by chm2web html help conversion utility.|