Professional Documents
Culture Documents
1
Lab summary/ Purpose
- How does this lab compare to the previous labs and how does it build on those?
In lab 1, we have compiled the Verilog codes with 4 inputs to produce 1 output, as proved by
the simulation waveform. K-map and the derived logic expression derived are shown to
match the outputs on the truth tables. In lab2, we assigned pins on the FPGA board. We also
implicated the switches and observed the output responses via the LED lights, and the results
met the original design specifications. In lab 3, we designed the structural model of a Half
Adder, Full Adder and combination of four Full Adder. Lab 5 is more challenging than Lab
4. In lab 4, we combine the given ALU, Mux, and register codes to form complete lab 4
Verilog codes for compilation. Then, we carried out two operations by varying the control
lines. After compilation of the codes and simulation of the waveform, double-check the
process tables. We can complete Lab 5 because we have these fundamental
knowledges.However, in Lab 5, we must identify the three equations provided by the
procedure and perform simple operations by manipulating the control lines.
2
Explanation
- What is the relation of a Data Path to a Controller and how are they integrated to make a
Processor (briefly)?
Processors are made up by two main components which are the controller and data path. The
relationship between them is like ‘employer and staff relationship’. The controller acts as an
employer by instructing the data path how to proceed in accordance with the commands in
the running programme. Whereas data path plays a role of a staff to undergo arithmetic
computations. Data paths have a register file for storing data, whose outputs are attached to
an ALU's inputs (arithmetic logic unit). Because of this, a controller can complete a particular
computation by reading values from the register file and instructing the ALU to carry out a
certain action.
3
Implementation Details and Results
Verilog code
4
5
1.Power equation, P= (I^2)*R
Reg[3]=Reg[1]^2*Reg[2], Reg[1]=Reg[1]* Reg[1]; Where R1=1 and R2=4
Simulation waveform
Timing diagram
Comments- Based on the ALU out, the final binary value is 00000100. By converting into
decimal, it known as 4. Based on the display drive, the final binary value is 10000000011001.
The value should be separate into two and complement it to become 0111111 and 1100110 as
6
it is active low. By referring to the Verilog code in the bcd.v, it will transform into 04. This
value is proven by both verification methods as 4 is the same with the process table.
Simulation waveform
Timing diagram
7
Comments- Based on the ALU out, the final binary value is 00001000. By converting into
decimal, it known as 8. Based on the display drive, the final binary value is 10000000000000.
The value should be separate into two and complement it to become 0111111 and 1111111 as
it is active low. By referring to the Verilog code in the bcd.v, it will transform into 08. This
value is proven by both verification methods as 8 is the same with the process table.
Comments- Based on the ALU out, the final binary value is 00101000. By converting into
decimal, it known as 40. Based on the display drive, the final binary value is
00110011000000. The value should be separate into two and complement it to become
1100110 and 0111111 as it is active low. By referring to the Verilog code in the bcd.v, it will
transform into 40. This value is proven by both verification methods as 40 is the same with
the process table.
8
Simulation waveform
Timing diagrams
9
Significance
How will you use the information you learned in this lab in the future?
With this basic knowledge that we have grasped, we hope that it could aid us in designing
and applying the circuits that require arithmetic operations, which are the core of the entire
computing system. If I am not mistaken, there is a module called Computer Architecture and
Embedded Systems in next semester that is almost related to what we have learned in this
module. Hence, it might be helpful for us, as this lab has strengthened our fundamental
knowledge about the simple data path in centre processing unit (CPU) of a computer system.
I will also use the information that I learned to teach my juniors and siblings that are
interested in this course to broaden their knowledge.
Indicate several learning outcomes similar to what you have done in Lab-3 Report.
The similar learning outcomes of this lab5 report and the lab 3 report are that we are able
to enhance our writing skills for a formal lab report that is helpful for our following core
modules. Moreover, the other similar outcome is that we have enhanced the operation of
Quartus software because it is our main platform for performing the compilation of Verilog
codes, simulation of waveforms, as well as assigning pins on the FPGA board. Furthermore,
we have completed the task given, which was to utilise the 7-segment display and simple
CPU to implement the 3 different equations shown above. Besides, we also build up the
fundamentals to understand how the complicated operations are being processed by varying
the control lines. Other than that, we are also able to edit and transform the waveform
corresponding to the process tables. In a nutshell, every single detail and piece of knowledge
are important for us to conduct a successful experiment and apply them to writing the lab
report.
10