Professional Documents
Culture Documents
WIN SEM (2023-24) FRESHERS_ECE1003_ELA_AP2023247000568_2024-02-21_Reference-Material-I
WIN SEM (2023-24) FRESHERS_ECE1003_ELA_AP2023247000568_2024-02-21_Reference-Material-I
EXPERIMENT No.1
Verification of Logic Gates in behavioural,
structural and Dataflow modelling
B NAGA RAJU
APC- SENSE
nagaraju.b@vitap.ac.in
•List of Laboratory Experiments
Logic Gates
DLD Lab-ECE1003 4
Logic gates
Basic Logic Gates
AND Gate
OR Gate
Not Gate
DLD Lab-ECE1003 5
Logic gates
Universal Gates
NAND Gate
NOR Gate
DLD Lab-ECE1003 6
Logic gates
Special Gates
Ex-OR Gate
Ex-NOR Gate
DLD Lab-ECE1003 7
HDLs (hardware description languages)
A hardware description language (HDL) is a programming language used to describe the
behavior or structure of digital circuits (ICs). HDLs are also used to stimulate the circuit
and check its response. Many HDLs are available, but VHDL and Verilog are by far the
most popular
HLDS
VHDL
(VHSIC) HDL Verilog HDL
DLD Lab-ECE1003 8
VHDL Program Structure
DLD Lab-ECE1003 9
Verilog Program Structure
Heart :Module
DLD Lab-ECE1003 10
AND gate
DLD Lab-ECE1003 11
NAND gate
DLD Lab-ECE1003 13
OR gate
DLD Lab-ECE1003 14
NOR gate
DLD Lab-ECE1003 15
EX-OR gate
DLD Lab-ECE1003 16
Ex-NOR gate
DLD Lab-ECE1003 17
Not gate
//NOT gate using //NOT gate using data //NOT gate using module not_gate_tb;
behavioural modeling flow modeling Structural modeling reg a;
wire y;
module not_gate_b(a,y); module not_gate_d(a,y); module not_gate_s(a,y);
input a; input a; input a; not_gate_s uut(a,y);
endmodule
DLD Lab-ECE1003 18
module and_s_tb; EDA Playground Testbench
reg a,b;
wire c;
and_s dut(.a(a),.b(b),.c(c));
initial begin
a = 0; b = 0;
#10
a = 0; b = 1;
#10
a = 1; b = 0;
#10
a = 1; b = 1;
#10
$finish();
end
initial begin
$dumpfile("and_s_tb.vcd");
$dumpvars();
end
endmodule
DLD Lab-ECE1003 19
module and_s_tb;
reg a,b;
EDA Playground Testbench Syntax
wire c;
and_s dut(.a(a),.b(b),.c(c));
initial begin
a = 0; b = 0;
#10
a = 0; b = 1;
#10
initial begin
a = 1; b = 0; $dumpfile("and_s_tb.vcd");
#10 $dumpvars();
a = 1; b = 1; end
#10
$finish();
end
initial begin
$dumpfile("and_s_tb.vcd");
$dumpvars();
end
endmodule
DLD Lab-ECE1003 20
AND gate
/ Gates: #10
b = 1; b = 1;
#10
Nand $finish();
DLD Lab-ECE1003 21
NAND gate
Textbooks
1. M.Morris Mano, Michael D Ciletti, Digital Design, 5th edition, Pearson Publishers, 2013.
2. R.P. Jain, “Modern Digital Electronics”, 4th edition, TMH.
References
1. M.Morris Mano, Charles R. Kime, Tom Martin, Logic and Computer Design Fundamentals, 4th edition,
Pearson Publishers.
2. C. H. Roth and L. L. Kinney, Fundamentals of Logic Design, 5th edition, Cengage Publishers.
DLD Lab-ECE1003 23
DLD Lab-ECE1003 24