You are on page 1of 5

DSD LAB 2

TAHA AFTAB FA19/EEE/008


Pre-lab
Reference diagram:

Code:
In-lab Task 1:

In-lab Task 2:
Post lab Reference diagram:

Code:
Simulation:

Analysis:
The gate level fourbit adder I designed had values as separate variables which made it
harder to simulate since each input was expecting an individual binary digit. To solve this
problem, I defined the values as arrays in the next task. This way, the simulation got a lot
easier since the inputs could then understand complete decimal values instead of having to
feed them the decoded binary number individually.
For MATLAB to successfully establish a socket communication with the module in modelsim,
the file path must be set which leads it to the directory where the module lies. Otherwise
the modelsim application would start up but fail to show the desired module.
The socket communication required a unique port number which was set at so that it does
not interfere with the existing protocols.

You might also like