0% found this document useful (0 votes)
9 views

Module #01 - Introduction To Verilog HDL

The document discusses Verilog HDL, which is used to describe hardware designs at different levels of abstraction from switch level to algorithmic level. Verilog allows both structural and procedural code and can be used to model digital circuits from basic gates to complex systems.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Module #01 - Introduction To Verilog HDL

The document discusses Verilog HDL, which is used to describe hardware designs at different levels of abstraction from switch level to algorithmic level. Verilog allows both structural and procedural code and can be used to model digital circuits from basic gates to complex systems.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Module #01 : Introduction to Verilog HDL

• Verilog HDL is one of the two most common Hardware Description Languages (HDL) used by
integrated circuit (IC) designers. The other one is VHDL.

n c e
e
• Designs described in HDL are technology-independent, easy to design and debug, and are usually

c e l
more readable than schematics, particularly for large circuits.
l
• Verilog is used as an input for synthesis programs which will generate a gate-level description (a

x
netlist) for the circuit.

S I E
• The way the code is written will greatly effect the size and speed of the synthesized circuit
• Some Verilog constructs are not synthesizable. (eg. delay)

L
• Non-synthesizable constructs should be used only for test benches.

V
Note: “Verilog is NOT a Programming Language. It is a Hardware Description Language !!!”

Programming Language : Let the hardware perform a particular function


HDL : Design that Hardware !!

26-11-2022 VLSI Excellence - Gyan Chand Dhaka 1


Module #01 : Introduction to Verilog HDL
• There are two types of code in most HDLs:

n c e
e
1) Structural, which is a verbal wiring diagram without storage.
Example 1.1:
assign a=b & c | d;

c e l l
x
assign d = e & (~c);

logic.

S I E
2) Procedural, which is used for circuits with storage, or as a convenient way to write conditional

L
Example 1.2:

V
always @(posedge clk) // Execute the next statement on every rising clock edge.
count <= count+1;

• if and case statements are only allowed in procedural code. As a result, the synthesizers have been
constructed which can recognize certain styles of procedural code as actually combinational.

26-11-2022 VLSI Excellence - Gyan Chand Dhaka 2


Module #01 : Introduction to Verilog HDL
Verilog can be used to describe designs at four levels of abstraction:

n c e
e
(i) Switch level (the switches are MOS transistors inside gates).
(ii) Gate level (interconnected AND, NOR etc.).

c e l l
(iii) Register transfer level/Data Flow Level (RTL uses registers connected by Boolean equations).

x
(iv) Algorithmic level/Behavioral Level (much like c code with if, case and loop statements).

S I E
V L
26-11-2022 VLSI Excellence - Gyan Chand Dhaka 3
Module #01 : Introduction to Verilog HDL
(i) Switch level (the switches are MOS transistors inside gates).

n c e
Example 1.3:

e l l e
c
module inverter (IN, OUT);

x
input IN;
output OUT;
supply0 VSS;

S I E
L
supply1 VDD;

V
pmos p(OUT, VDD, IN);
nmos n (OUT, VSS, IN);
endmodule

26-11-2022 VLSI Excellence - Gyan Chand Dhaka 4


Module #01 : Introduction to Verilog HDL
(ii) Gate level (interconnected AND, NOR etc.).

n c e
Example 1.4:

e l l eA
Y1

c
module myDesign(A, B, Y); B
input A;
input B;

I E x A

S
output Y; Y2

L
and A1(Y1, A,B); B

endmodule
V
nand NA1(Y2, A, B);
or O1(Y3, A,B); A

B
Y3

26-11-2022 VLSI Excellence - Gyan Chand Dhaka 5


Module #01 : Introduction to Verilog HDL
(iii) Register transfer level/Data Flow Level

n c e
e l lA
e 0

c
Example 1.5:

x
module myDesign(A, B, SEL, mux_out); mux_out
input A, B, SEL;
output mux_out;

S I E
L
assign mux_out = (SEL` & A) + (SEL & B); B 1

V
endmodule

SEL

26-11-2022 VLSI Excellence - Gyan Chand Dhaka 6


Module #01 : Introduction to Verilog HDL
(iv) Algorithmic Level/Behavioral Level

n c e
e
Design Behavior

l l
Example 1.6:

e
module myDesign(A, B, SEL, mux_out); Verilog Modeling
input A, B, SEL;
output mux_out;

E x c
reg mux_out;

L
always @(A, B, SEL)
S I if (SEL = 1) mux_out = B;

V
begin
else mux_out = A;
if(SEL)
mux_out = B;
else
mux_out = A;
end

26-11-2022 VLSI Excellence - Gyan Chand Dhaka 7

You might also like