Question: ASSIGNMENT # 1 3 In general, when the student would like to carry out his Lab work in the Computer Organization course, he would notice
ASSIGNMENT #
In general, when the student would like to carry out his Lab work in the Computer
Organization course, he would notice that there were three independent roles to play:
Designer, Programmer and User. They can be considered as three different
characters in his Assignments STORY.
The Designer is only responsible for the design of the CPU digital circuit by using the
Logisim software. Thus, he can also simulate the CPU on Logisim in order to prepare
it to be implemented directly into the FPGA card.
The Programmer must use the CPU as is given by the Designer, no modifications
will be made to it However, it can only write specific program code using the
corresponding processor Assembly Languagegiven by the Designer convert it to
machine code, and finally store it in the CPU program memory. Finally, when the
entire circuit with the specified program code is ready and working well, the
Programmer can implement it directly into the FPGA board.
The User must only run the FPGA card as is without any intervention on the design
or the program. His role is to handle the FPGA's inputs and outputs.
In this thirteenth assignment, the Designer will not be definitively responsible for a
task because we will, from now, only use the latest design obtained in our previous
LABs.
The Programmer must elaborate a program code based only on the CPU instruction
set given by the Designer.
The main objective of your Assignment is to develop your FPGA into a Division
Calculator device, DiCal.
In our division operation there are four parameters: Dividend; Divisor; Quotient;
and Remainder. The relationship between them is as follows: Dividend : Divisor x
Quotient Remainder. The inputs of our DiCal are the Dividend and the Divisor,
while its outputs are the Quotient and the Remainder.
Your DiCal's inputs should be the Switches and its outputs should be the Segment
displays.
The User communicates with DiCal through switches and segment displays.
The User enters the Dividend and the Divisor by the switches. After processing,
DiCal will display the Quotient and the Remainder on segment displays.
The User must turnoff all the switches and press a specific PB pushbutton to
initialize the calculation. To start the calculation, the user enters the Dividend value in
binary using Switches, then presses PB Then he enters the value of the Divisor by
the same Switches and then press also the same pushbutton PB After processing,
the segemnt displays will alternately show the Quotient and Remainder values.
Pass now to the tasks of the Programmer.
The Programmer must create a division function named DIV having two inputs,
Dividend and Divisor, and two outputs, Quotient and Remainder.
You can use the DIV function in your program code by calling it as follows:
QuotientRemainderDIVDividendDivisor
It is better to write the division instruction sequence in the DIV function once and
then call it multiple times, rather than rewriting it repeatedly.
To make your lab simpler, you will only work with numbers between and
To display any number, the Programmer must extract each digit separately, Units and
Tens, using the DIV function.
To display your number, you must divide it by then display the remainder as a Units
digit and the quotient as a Tens digit. However, there is another step before sending
them to segment displays. For each, remainder and quotient, you must browse the
data memory and load the corresponding specific binary code which will be sent to the
segment display.
The Programmer must of course call the DIV function several times in the sequence
of instructions of the DISP function, during its development.
Finally, if you want to perform a division operation and display its result, you must call
the DIV function as follows: QuotientRemainderDIVDividendDivisor
After storing Quotient in Number# and Remainder in Number# You can
display Number# and Number# together side by side, by calling the DISP
function twice as follows: DISPNumber# and DISPNumber#
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
