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 #13
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 Language(given 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 7-Segment
displays.
The User communicates with DiCal through switches and 7-segment displays.
The User enters the Dividend and the Divisor by the switches. After processing,
DiCal will display the Quotient and the Remainder on 7-segment displays.
The User must turn-off all the switches and press a specific PB push-button 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 push-button PB. After processing,
the 7-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:
[Quotient,Remainder]=DIV(Dividend,Divisor).
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 1 and 99.
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 10, then display the remainder as a Units
digit and the quotient as a Tens digit. However, there is another step before sending
them to 7-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
7-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: [Quotient,Remainder]=DIV(Dividend,Divisor).
After storing Quotient in Number#1 and Remainder in Number#2. You can
display Number#1 and Number#2 together side by side, by calling the DISP(.)
function twice as follows: DISP(Number#1) and DISP(Number#2).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!