Anda di halaman 1dari 2

CME341 Assignment 10

1. Debug and thoroughly test the entire EE431 Microprocessor.

Debugging and testing the entire microprocessor will be more difficult


than debugging and testing a module. You will need to display all the
4-bit registers as well as the 8-bit pc and ir to properly test your mi-
croprocessor.

Debugging will also require displaying signals that are neither pins
nor registers, for example register enables. NB: For purposes of de-
bugging it is easiest to make the signal of interest an output of the
microprocessor. Doing this also ensures that neither the Quartus com-
piler nor fitter will optimize the signal out of the design. For exam-
ple, to view register enables in the wave window it would have to be
made an output of the microprocessor and then compiled in Quartus.
The instantiation of the microprocessor in the testbench would have
to be changed to include register enables in the connection list. Also
register enables would have to be declared as a wire[8:0] in the test-
bench.
To display data bus is a bit more involved.

(a) It would have to made an output of the computational unit.


(b) The instatiation of the computation unit in the microprocessor
has to include a connection to data bus.
(c) Whatever signal in the microprocessor is connected data bus (prob-
ably call it data bus as well) has to be declared a wire[3:0] and
made an output of the microprocessor.
(d) The instatiation of the microprocessor in the testbench has to
include a connection to the data bus output of the microprocessor.
(e) Whatever signal in the testbench (probably call it data bus as
well) is connected to the data bus output must be declared a
wire[3:0].

NB: Two assembler programs are provided on the web (under micro extras)
to help you with debugging. One exercises the move instructions and

1
the other exercises the ALU instructions. These programs do not
perform exhaustive tests, but will help with debugging. To use these
programs effectively you must display the pc and ir waveforms in your
simulation. Just as importantly, you must print (or copy to notepad
and display) the listing (the middle window of the assembler). The
first column of the listing is the address at which the instruction is
stored and the second column is the machine code for the instruction.
The time at which an instruction is executed can be easily found in the
simulator waveform report using the pc. The pc holds the address (the
last 8 bits of the 16H address given in the listing). The ir contains the
machine code for the instruction.

It is suggested that you generate your own test programs and share
them among other students and compare results. You may even form a
testing team where each member writes a program to test a different
part of the microprocessor.

ASIDE: Remember that the clock must be inverted somewhere before


it is connected to the synchronous RAM used for data memory and
the synchronous ROM used for program memory.

Anda mungkin juga menyukai