04 Intro Verilog
04 Intro Verilog
ENGINEERING AND
PETROLEUM
CpE-477
Fall 2020
Figure 4.3 A list of declarations of wire-connected Figure 4.2 A three-input nand gate and an
primitives having the functionality of a five-input AOI gate. example of its instantiation as a Verilog primitive.
Figure 4.5 An AOI circuit and its Verilog model: (a) IEEE
1364-1995 syntax and (b) IEEE 1364-2002, 2005 syntax.
Figure 4.7 Hierarchical decomposition of a 16-bit, ripple-carry adder into a chain of four 4-bit-
slice adders, each formed by a chain of full adders:
(a) top-level schematic symbol, (b) decomposition into four 4-bit adders,
(c) interior detail of a 4-bit adder, (d) a full adder, and (e) gate level schematic of a half adder.
module t_Add_half();
wire sum, c_out; reg a, b;
Add_half M1 (c_out, sum, a, b); // UUT
initial begin // Time Out
#100 $finish;
end
initial begin // Stimulus patterns
#10 a=0; b=0;
#10 b=1;
#10 a=1;
#10 b=0; Figure 4.17 Waveforms produced by a simulation of Add_half,
a 0-delay binary half adder.
end
endmodule