Lab4_Tutorial_F2020
Lab4_Tutorial_F2020
LAB 4 TUTORIAL
ADDER AND SUBTRACTOR UNIT
OVERVIEW
1
MOUSA AL-QAWASMI
PROCEDURE
2
MOUSA AL-QAWASMI
5. Set “ASU.vhd” as the top-level entity. You can do this by right-clicking on “ASU.vhd”
in the “Files” section of the project navigator (located at the right of your Quartus II
window) and selecting “Set at Top-Level Entity”.
6. Start the compiler. Fix any errors and re-compile. Once the compiler compiles
without any errors, move to the next step.
7. Create a symbol for your “ASU.vhd” file. You can do this by right clicking on
“ASU.vhd” in the “Files” section of the project navigator (located at the right of your
Quartus II window) and selecting “Create Symbol Files for Current File”.
8. Create a new University Program VWF (File > New > University Program VWF).
9. Simulate “ASU.vhd” and make sure that your simulation results match the results
shown below.
10. Save the VWF file as “ASU.vwf” in your “Lab4” folder and take a screenshot of your
results.
3
MOUSA AL-QAWASMI
2. Combinatorial Unit C
In this part of the lab we are required to create a Combinatorial Unit that takes as input the
output S from the ASU and consequently outputs individual digits of your student number.
I will use my student number as an example: 500414487
S = 0 corresponds to the first digit, in my case it is 5.
S= 1 corresponds to the second digit in my case it is 0.
And so on until we get to
S = 8 which corresponds to the 9th digit, in my case it is 7.
For all other values of S, we want to display 0.
Based on this please follow the following instructions to complete the lab:
1. fill out the truth table given the lab manual with your student ID. Below is an example
using my using.
4
MOUSA AL-QAWASMI
2. Minimize the outputs L3, L2, L1, L0 in your truth table using K-maps. Below is an
example using my student ID.
5
MOUSA AL-QAWASMI
3. Use the VHDL code below to implement your Combinatorial Unit C. Remember to
replace the L(3), L(2), L(1), and L(0) output assignment functions in the code with
your minimized functions.
4. Save the VHDL file as “C.vhd”.
6
MOUSA AL-QAWASMI
6. Set “C.vhd” as the top-level entity. You can do this by right-clicking on “C.vhd” in the
“Files” section of the project navigator (located at the right of your Quartus II window)
and selecting “Set at Top-Level Entity”.
7. Start the compiler. Fix any errors and re-compile. Once the compiler compiles
without any errors, move to the next step.
8. Create a symbol for your “C.vhd” file. You can do this by right clicking on “C.vhd” in
the “Files” section of the project navigator (located at the right of your Quartus II
window) and selecting “Create Symbol Files for Current File”.
9. Create a new University Program VWF (File > New > University Program VWF).
10. Simulate “C.vhd” and make sure that your simulation results match your student
number.
11. Save the VWF file as “C.vwf” in your “Lab4” folder and take a screenshot of your
results.
7
MOUSA AL-QAWASMI