Notesâ€‹:
1. For the written questions show all of your work and submit either a PDF or text file.
2. When drawing circuits in a text file you do not have to draw the shapes of the
gates. Instead, simply use the word NAND, NOR, AND, OR, or NOT.
e.g.
A----NAND---C
B /
stands for C = A NAND B
3. For programming questions hand in your source program (.asm file).
4. Name you programs LastnameFirstnameAxQy.asm, replace x with the assignment
number and y with the question number.
5. Please comment appropriately for programming question. Please read the
â€śprogramming standardsâ€ť for COMP 2280. Marks are allocated for good
documentation.
6. Hand in your assignment through the UMLearn
Written Part
Question 1 [12 marks]
1. [12 points] The MAR, MDR, and ALU are structures written (and read) in various
phases of the instruction processing cycle, depending on the instruction being executed.
In each table cell, below, enter the instructions that result in â€‹writes/loads â€‹to the
co
esponding structure (row) during the co
esponding phase (column) of the
instruction processing cycle.
In the case of the ALU, also indicate the phases where it performs a â€‹calculationâ€‹, on
top of â€‹writes/loads â€‹to it.
Ignore the reads â€‹or loads onto the bus from the MAR/MDR/ALU.
For example, place STR in the MAR row of the FETCH column if STR causes the
MAR to be written during the FETCH phase.
To make this simpler, letâ€™s only consider the following instructions:
AND LD STR
FETCH DECODE EVAL ADDR FETCH OPR EXECUTE STORE
MAR
MDR
ALU
a) Using 3 D flip-flops, design a finite state machine that will count out the sequence
0,6,3.7,2,1,4,5,0 â€¦ on each rising clock edge.
) Your FSM will have a clock input and 3 output bits Qâ€‹2â€‹Qâ€‹1â€‹Qâ€‹0 â€‹which is the
inary representation of the cu
ent number counted.
c) Your solution must include the truth tables for the next state given the cu
ent state
(state transition table)
d) Your solution must include the state equations (in sum-of-products form) for the state
variables Qâ€‹2â€‹, Qâ€‹1â€‹, and Qâ€‹0 â€‹based on the state transition table (see the two examples from
the Module 9).
e) Simplify the expressions in the equations where possible. You may use K-maps for this.
f) Do NOT draw a circuit diagram or a state transition diagram.
Design a circuit for the following state machine.
It has a one-bit input â€‹X â€‹and a one-bit output â€‹Y.
Your solution must include the truth tables for the next state and the output given the
cu
ent state and the cu
ent value of the input (state transition table)
Your solution must include the equations for the state variables and the output based
on the state transition table.
Simplify the expressions in the equations where possible.
Use the obvious assignment of the state variables, that is, the initial state A = 00, B =
01, etc., this will give the simplest equations.
In the state diagram the value under the line is the value of the output Y.