Lab 2
Lab 2
A1 A0 B1 B0 A_greater_than_B
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 1 A > B (A = 1, B = 0)
0 1 0 1 0
0 1 1 0 0
0 1 1 1 0
1 0 0 0 1 A > B (A = 2, B = 0)
1 0 0 1 1 A > B (A = 2, B = 1)
1 0 1 0 0
1 0 1 1 0
1 1 0 0 1 A > B (A = 3, B = 0)
1 1 0 1 1 A > B (A = 3, B = 1)
1 1 1 0 1 A > B (A = 3, B = 2)
1 1 1 1 0
b. Write the sum of product form of the function from the truth table.
B1B0
00 01 11 10
00
01 1
A1A0
11 1 1 1
10 1 1
e. Run the simulation of the logic diagram using Simulation Waveform Editor tool
f. Write a Verilog structural description (gate-entry modeling) for the simplified function
- Set the Verilog file as Top-Level Entity
g. Run the simulation of the Verilog code using Simulation Waveform Editor tool
- When you installed the Quartus Prime Lite software, ModelSim - Intel FPGA Starter edition was
installed. We need to configure the Quartus Prime Lite to use ModelSim.
- Go to Tools\Options:
- Write the Verilog testbench to test the module comparator_greater_than_structural:
- Configure EDA Tool Settings for simulation
- Compile and run simulation using ModelSim
Assignment 2 (20 Points)
Design a logic diagram for the following Boolean expressions and write a Verilog program using gate-
level modeling and verify the waveform with its simplified Boolean expression (as much as possible)
truth table.
(a)
(b)
Assignment 4 (20 Points)
Reduce the following expression in both SOP and POS forms using 3 variable K-map and design the logic
diagram. Now write a Verilog program using gate-level modeling for these simplified Boolean
expressions and verify them with their truth tables and waveforms.
a) Σ m(0, 2, 3, 4, 5, 6)
b) Π M(0, 1, 2, 3 , 4, 7)