Professional Documents
Culture Documents
Verilog: A Hardware Description Language (HDL)
Verilog: A Hardware Description Language (HDL)
A
Hardware Description Language
(HDL)
An HDL
Originated in industry
Later standardized by IEEE
C-like (not C, but C-like)
Structural
1-to-1 correspondence with finished circuit
Manually instance circuit modules:
and(q, a, b);
fullAdd FA0(a, b, cin, cout, s);
Dataflow
C-like expression syntax for combinational
logic functions:
Behavioral
What the circuit is to do rather than how it is
to do it
always @(posedge clk)
q <= d;
not(selbar, sel);
and(a1, selbar, a); Verilog is case-sensitive
and(a2, sel, b);
or(q, a1, a2); mux21 is a different module
endmodule name than MUX21
sel[0]
mux21 mux21
tmp1 tmp2
sel[1] mux21
4b00 An error
Opcode = IR[15:12]
DR = IR[11:9]
A Good Convention:
Signal names always start with lower case
letter
Instance names are always all uppercase
Remember, Verilog is case-sensitive
synthesize
mux21.v netlist.edn
physically
compile Implement
simulator completed
circuit