PDF Lab 2 DLD
PDF Lab 2 DLD
PDF Lab 2 DLD
Dated: 13/02/24
Faculty Member: Mughees Ahmed
Name Reg. No Viva / Lab Analysis Modern Ethics and Individual Total
Performance of data in Tool Usage Safety and Team marks
Lab Report Work Obtained
Objectives:
Lab Instructions
This lab activity comprises three parts, namely Pre-lab, Lab tasks, and Post-Lab Viva session.
The lab report will be uploaded on LMS three days before scheduled lab date. The students will
get hard copy of lab report, complete the Pre-lab task before coming to the lab and deposit it with
teacher/lab engineer for necessary evaluation. Alternately each group to upload completed lab
report on LMS for grading.
The students failing to submit Pre-Lab will not be allowed to perform Lab work.
The students will start lab task and demonstrate design steps separately for step-wise evaluation
(course instructor/lab engineer will sign each step after ascertaining functional verification)
Remember that a neat logic diagram with pins numbered coupled with nicely patched circuit will
simplify trouble-shooting process.
After the lab, students are expected to unwire the circuit and deposit back components before
leaving.
The students will complete lab task and submit complete report to Lab Engineer before leaving
lab. Verilog tutorial part is non-printable and for reference only.
There are related questions at the end of this activity. Give complete answers.
1. VHDL
2. Verilog HDL
1. Behavioral Level: Focuses on what the design should do rather than how it should be
implemented.
2. Register Transfer Level: Describes the design in terms of registers, data paths, and control
signals.
3. Gate Level: Specifies the logical connections between gates and the timing behavior of the
design.
4. Switch Level: This level of abstraction models the behavior of individual transistors and
switches.
1. NOT GATE
Code:
Waveform:
Input Output
1 0
0 1
2. AND GATE:
Code:
Waveform:
IN 1 IN 2 OUT
1 1 1
1 0 0
0 1 0
0 0 0
3. OR GATE: Code:
Truth Table:
IN 1 IN 2 OUT
1 1 1
1 0 1
0 1 1
0 0 0
Write the Verilog Code using Gate Level modeling for the following circuit. List the code for design as well as
stimulus below:
1. x = y = sum = carry = 0
2. x = 0, y = 1, sum = 1, carry = 0
4. x = 1, y = 1, sum = 0, carry = 1
Truth Table
x y Sum Carry Out
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
Expressions:
𝑠𝑢𝑚=𝐴′𝐵+𝐴𝐵′
𝑐𝑎𝑟𝑟𝑦=𝐴𝐵
After determining the function performed by the circuit given in Lab Task 2, write the Verilog description of
the circuit in dataflow. Comment on the two different modeling levels you used to model the same circuit.
(Paste snapshots of the codes and stimuluses below)
Waveform:
Observations/Comments:
During the laboratory session, we were introduced to Verilog and became acquainted with its
functionalities and utilization within the ModelSim software environment. Our instruction encompassed a
comprehensive understanding of ModelSim operations, including the generation of output formats
convertible into truth tables. Through practical exercises, we simulated diverse logic gate operations using
both ModelSim and Proteus software platforms, complementing our learning by executing corresponding
tasks on hardware interfaces.