Gate |Type |Inputs|Output From | To A |OR2 |A1 | A3 x0 | A1 | |A2 | x1 | A2 B |AND2 |B1 | B3 A3 | B1 | |B2 | x2 | B2 C |OR2 |C1 | C3 x2 | C1 | |C2 | x3 | C2 D |NOT |D1 | D2 B3 | D2 E |OR3 |E1 | E4 D2 | E1 | |E2 | C3 | E2 | |E3 | x4 | E3 F |NOT |F1 | F2 E4 | F1
| ENTITY Fig4_5 IS
PORT( x4, x3, x2, x1, x0 : IN BIT; z : OUT BIT); END Fig4_5; ARCHITECTURE behavioral of Fig4_5 IS
|
x y |x XNOR y | x OR y | x NOT=0 XNOR x| x AND y = NOT(NOT x OR NOT y) 0 0 | 1 | 0 | 1 | 0 0 1 | 0 | 1 | 1 | 0 1 0 | 0 | 1 | 0 | 0 1 1 | 1 | 1 | 0 | 1
x y|x NAND y|NOT x = x NAND x|x AND y=NOT (x NAND y)|x OR y = NOT(NOT x AND NOT y) 0 0| 1 | 1 | 0 | 0 0 1| 1 | 1 | 0 | 1 1 0| 1 | 0 | 0 | 1 1 1| 0 | 0 | 1 | 1
and
NOR - A NOR network has many of the same advantages as
a NAND and can also be easily converted between a AND, OR, NOT product
of sums network using the
dual.
| ENTITY Fig4_5 IS
PORT( x4, x3, x2, x1, x0 : IN BIT; z : OUT BIT); END Fig4_5; ARCHITECTURE behavioral of Fig4_5 IS
|
| -- File MyAND.vhd
ENTITY MyAND IS PORT( x, y : IN BIT; z : OUT BIT); END MyAND; ARCHITECTURE behavioral of MyAND IS
|
-- File MyOR2.vhd
ENTITY MyOR2 IS PORT( x, y : IN BIT; z : OUT BIT); END MyOR2; ARCHITECTURE behavioral of MyOR2 IS
|
| -- File MyNOT.vhd
ENTITY MyNOT IS PORT( x : IN BIT; z : OUT BIT); END MyNOT; ARCHITECTURE behavioral of MyNOT IS
|
-- File MyOR3.vhd
ENTITY MyOR3 IS PORT( w, x, y : IN BIT; z : OUT BIT); END MyOR3; ARCHITECTURE behavioral of MyOR3 IS
|
Our definitions cannot appear in a logic expression, but
are used more in the way of a function call where signal connections
are parameters passed to and returned from the function execution.
Figure 4.5 can now be represented at the structural level in
the following:
| -- Fig4_5.vhd
ENTITY Fig4_5 IS PORT( x4, x3, x2, x1, x0 : IN BIT; z : OUT BIT); END Fig4_5; ARCHITECTURE structural OF Fig4_5 IS COMPONENT MyAND
-- Prototype definitions.
COMPONENT MyOR2
COMPONENT MyOR3
COMPONENT MyNOT
SIGNAL a3, b3, c3, d2, e4 : BIT;
-- Internal connecting signals.
|
Behavioral descriptions are generally comprised of sequential
statements within a PROCESS block. The specific purpose of PROCESS
block is to denote sequential statements such as logic expressions
(e.g. z <= a OR b; ). These can be thought of as operating much as a
C++ program execution, sequentially.
Structural descriptions are not part of a PROCESS block for sequential statements. Instead all PORT MAP statements are concurrent. This is reasonable since only the structure or device connections are being described, which corresponds to the physical gate network structure. The PORT MAP statements above could be listed in any order with precisely the same results.
One artifact of the concurrent behavior is that outputs change as signals propagate through the network, hence propagation time is an implicit element of device behavior. Changing the x4-x0 inputs and measuring the z output of our network after 1ns, 5ns., 10ns, and again after 30ns. would likely see a difference at the output as the gates propagated the input change even though the x4-x0 inputs remained stable after the initial change.