2023-1-80-016 Lab-3 Palash Das
2023-1-80-016 Lab-3 Palash Das
Submitted by
Palash Das
2023-1-80-016
Abstract
We will be able to create the combinational logic circuit in four distinct ways using this
experiment. Any combinational logic circuit can be simulated using Verilog or VHDL logic
simulation software. Four methods are available for simulating combinational logic circuits.
Modeling with themes, Behavioral simulation using a procedural model in Verilog, continuous
assign statement model-based behavioral Verilog simulation, and structural Verilog simulation at
the primitive gate level.
Lab work
Comment: We are able to use the Verilog simulation for these kinds of commands in this lab.
A’B+AB’ was the Boolean expression. One OR gate and two AND gates are present. Three
different kinds of code are used to provide our Boolean expression with information. We utilize
code for Testbench as well. We indicated resistance and wire in the test bench. Next, we announced
the input and output. Next, we provide the order to start. Finally, we execute the commands “end”
and “endmodule” to finish our code. We wrote the code by declaring the gate name and number at
the basic gate level. Additionally, we defined input and output. “endmodule” was used to terminate
the code. To write the Verilog code, we went through this procedure.
Truth table:
A B C A’ B’ A’B AC AB’ S
0 0 0 1 1 0 0 0 0
0 0 1 1 1 0 0 0 0
0 1 0 1 0 1 0 0 1
0 1 1 1 0 1 0 0 1
1 0 0 0 1 0 0 1 1
1 0 1 0 1 0 1 1 1
1 1 0 0 0 0 0 0 0
1 1 1 0 0 0 0 0 1
Circuit Diagram:
10: The output of Behavioral Verilog simulation using continuous assign statement model
Having gleaned the truth table and shown the execution of all previously mentioned methods, it is
time to present the findings. In comparing the results attained by each method to that in the truth
table, it is striking that all are consistent. In the Verilog simulation that we conducted, the code
was derived from the Boolean function A’B + AC + AB’. This expression comprises three AND
gates and one OR gate. As regards the coding of these Boolean expressions in the EDA Playground
software, various gate level modeling can be employed including primitive gate level, procedural
model and continuous assign statement model. In the testbench, all the input codes are entered last.
We introduce resistances first, and wires, then the inputs and the outputs. Then we issue commands
in this particular order starting with the initial begin block, the commands are enclosed with end
and finally the module with the endmodule commands. At the primitive gate level, textual data is
entered in the styling by means of specifying the gate numbers and the names, the inputs and the
outputs are declared. This are also terminated with the ‘endmodule’ command. In the procedural
model, underlying concepts are implemented in the commands using ‘if’ function. The code is
executed and as a result a waveform indicating the Boolean function that was encoded in the code
is given out.
In this particular lab, we are familiarizing ourselves with the application of the Verilog code in
designing and simulating multiple kinds of combinational logic circuits. Using these types of codes
we are able to simulate any combinational logic circuits. All thefour ways we can simulate these
logic circuits like schematic simulation, Structural Verilog simulation at primitive gate level,
Behavioral Verilog simulation using procedural model and Behavioral Verilog simulation using
Continuous Assign Statement model.
Conclusions
It has been determined that the EDA playground software enables efficient training of students
through simulating logic circuits. We have emulated logic circuits in three different techniques.
When S = A’B + AC + AB’ is used as the condition, we found that the output generated and the
output from the truth table were exactly the same. This was because utilizing the codes presented
made us face some hurdles. When corrective measures were employed, we attempted to complete
the experiment. In the end the result that we executed was fair. The Verilog simulation lab
enhanced our understanding of Concepts related to designing and testing digital circuits using The
HDL,Verilog language. This encouraged us to design and Simulate various other digital systems
including booveral combinational and sequential circuits, hence expanding our understanding of
digital system overall.