Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Aim: To design and simulate the functionality of logic gates ( IC 7408,7432,7400,7402,7486,7404 )using
Procedure:
Note: For file name don’t use inbuilt primitives like and, or etc.
4. Write the program use appropriate modeling
5. Verify the syntax error using check syntax (compilation) and correct those errors
11. Verify all the entries in the truth table either by writing test bench or by giving the inputs.
Program:
Dataflow modelling:
assign Y= A&B;
endmodule
Gatelevel modeliing:
and X1(Y,A,B);
endmodule
Note: Similarly , write the program in both gate level and dataflow modeling for the remaining gates and
observe the output.
Result:Verified the functionality of logic gates practically and by simulation using Verilog HDL.
Experiment 2
Aim: To desin and simulate the functionality of 3 to 8 decoder (74x138) using Verilog HDL and verify its
operation practically
Procedure:
Program: // Program is given for 2 to 4 decoder, based on this write a program for 3 to 8 decoder as per the
given truth table
(Dataflow modeling)
assign dout[0]=(din==2’b00 ? 1’b1 : 1’b0); // this is conditional statement, if din=00 then dout=1 else dout=0
endmodule
(Gatelevel modeling)
input din0,din1;
output dout0,dout1,dout2,dout3;
wire d0bar,d1bar;
not x1(d0bar,din0);
not x2(d1bar,din1);
and x3(dout0,d0bar,d1bar);
and x4(dout1,din0,d1bar);
and x5(dout2,d0bar,din1);
and x6(dout3,din0,din1);
endmodule
Input(din) Output(dout)
0 0 1 0 0 0
0 1 0 1 0 0
1 0 0 0 1 0
1 1 0 0 0 1
Result: Hence verified the functionality of 3 to 8 decoder practically and by simulation using Verilog HDL
Experiment-3
Aim: To simulate the functionality of 8x1 multiplexer (74x151) and 2x4 De-Multiplexer (74x155) using
Verilog HDL and verify its operation practically
Procedure:
Program: write a program for 8x1 multiplexer and 2x4 demultiplexer with inputs and outputs as given in the
truth table (Both dataflow and gate level modelling)
Result: Hence verified the functionality of 8x1 multiplexer and 2x4 demultiplexer practically by simulation
using Verilog HDL.
Experiment-4
Aim: To simulate the functionality of BCD to Seven segment Decoder (74x49) using Verilog HDL and verify
its operation practically
Procedure:
Program: write a program for BCD to Seven segment decoder with inputs and outputs as given in the truth table
(Both dataflow and gate level modelling)
BCD to Seven segment decoder-74x49 IC pin diagram, Logic diagram, Truth table:
Result: Hence verified the functionality of BCD to Seven segment Decoder practically by simulation using
VerilogHDL.
Experiment 5
Aim: To simulate the functionality of digital IC 74x85 ( 4 bit comparator ) using Verilog HDL and verify its
operation practically
Tools Required: PC loaded with the Xilinx ISE Design Suite version 14
Procedure:
1. Open the xlinx project navigator.
2. Create new project using the file menu
3. Create a new source file
4. Write the program use appropriate modeling
5. Verify the syntax error using check syntax (compilation) and correct those errors
6. Synthesize the program
7. View the RTL schematic
8. Simulate the program using simulation mode
9. Apply inputs as per truth table
10. Run the Program
11. Verify all the entries in the truth table either by writing test bench or by giving the inputs.
Program: write a program for 4-bit comparator with inputs and outputs as given in the truth table
Hints:Key statements using behavioral model
always @ (*)
begin
if (A>B)
begin AgB=1; AlB=0;AeB=0; end
Result: Hence verified the functionality of 4-bit comparator practically and by simulation using VerilogHDL.
Experiment 6
Aim: To simulate the functionality of digital IC 74x83( 4-Bit Binary Adder) using Verilog HDL and verify its
operation practically
Tools Required: PC loaded with the Xilinx ISE Design Suite version 14.7
Procedure:
1. Open the xlinx project navigator.
2. Create new project using the file menu
3. Create a new source file
4. Write the program use appropriate modeling
5. Verify the syntax error using check syntax (compilation) and correct those errors
6. Synthesize the program
7. View the RTL schematic
8. Simulate the program using simulation mode
9. Apply inputs as per truth table
10. Run the Program
11. Verify all the entries in the truth table either by writing test bench or by giving the inputs.
Program: Write a program for 4-bit comparator with inputs and outputs as given in the truth table in behavioral
model
4-Bit binary adder -IC74x83 Pin diagram, Logic diagram, Truth table:
Logic diagram:
Result: Hence verified the functionality of 4-bit binary adder practically and by simulation using VerilogHDL.
Experiment 7
Aim: To simulate the functionality of digital IC 74x74( D-flip flop) using Verilog HDL and verify its operation
practically
Tools Required: PC loaded with the Xilinx ISE Design Suite version 14.7
Procedure:
1. Open the xlinx project navigator.
2. Create new project using the file menu
3. Create a new source file
4. Write the program use appropriate modeling
5. Verify the syntax error using check syntax (compilation) and correct those errors
6. Synthesize the program
7. View the RTL schematic
8. Simulate the program using simulation mode
9. Apply inputs as per truth table
10. Run the Program
11. Verify all the entries in the truth table either by writing test bench or by giving the inputs.
Program: Write a program for D-Flipflop with inputs and outputs as given in the truth table in behavioral model
Hint: use behavioral programming to cover all the cases in truth table.
always @ (*)
begin
if (~pr)
begin Q=1’b1; Q_bar=~Q;end
Aim: To simulate the functionality of Decade counter (74x90) using Verilog HDL and verify its operation
Tools Required: PC loaded with the Xlinx ISE Design Suite 14
Apparatus: IC Trainer, IC 74x90, Patch cards
Procedure:
1. Open the xlinx project navigator.
2. Create new project using the file menu
3. Create a new source file
4. Write the program use appropriate modeling
5. Verify the syntax error using check syntax (compilation) and correct those errors
6. Synthesize the program
7. View the RTL schematic
8. Simulate the program using simulation mode
9. Apply inputs as per truth table
10. Run the Program
11. Verify all the entries in the truth table either by writing test bench or by giving the inputs.
Program: write a program for Decade counter with inputs and outputs as given in the truth table in behavioral
modeling.
Hint: First, create a module for JK filpflop (use switch case) and then decade counter using this module.
Decade counter-74x90 IC pin diagram, Logic diagram, Truth table:
Result: Hence verified the functionality of Decade counter practically and by simulation using VerilogHDL .
Experiment-9
Aim: To simulate the functionality of 4-bit counter (74x93) using Verilog HDL and verify its operation
practically
Procedure:
Program: write a program for 4-bit counter with inputs and outputs as given in the truth table in behavioral
modeling
Hint: First create a module for JK filpflop (use switch case) and then 4-bit counter using this module.
Aim: To simulate the functionality of Universal shift register (74x195) using Verilog HDL and verify its
operation
Procedure:
Program: write a program for Universal shift register with inputs and outputs as given in the truth table in
behavioral modeling
Hint: First create a module for SR filpflop (use switch case, if else) and then universal shift register using this
module.
Procedure:
Program: write a program for barrel shift register with inputs and outputs as given in the truth table in behavioral
modeling
‘S’ is a control signal which represents the amount of shift or rotate, ‘W’ are the input vectors and ‘Y’ are the
outputs of an 4 or 8 -bit vector.
Procedure:
Program: write a program for priority encoder with inputs and outputs as given in the truth table in behavioral
modeling.
Pin diagram
TRUTH TABLE
Result: Hence verified the functionality of priority encoder by simulation using VerilogHDL.