Sunteți pe pagina 1din 2

Assignment #5

due: before class begins on November 18 (Tuesday)

Student name: _________________

Except for problems 5 and 6, all other problems refer to the example machine EX-1 discussed in the class.
1. For each row in the following table, convert the symbolic code into numeric form. Use a decimal number
in the field DEST. Use binary numbers in all other fields. Use the symbol * to indicate that the value of a
field does not matter. If the symbolic code given in a row cannot be a valid microinstruction, write the
words NOT A MICROINSTRUCTION in the same row.
Number of bits

10

symbolic code

MUXC

JMPC

ALUF

MBRC

MARC

MR

MW

CEN

DEST

mar=ir; mbr=inv(ac); if z go 5;
mar=ir; pc=pc+1;mr;
mar=pc; pc=pc+1; go 7;

2.

Suppose location 80 of the control store contains the following microinstruction


mar=pc; mbr=ac; t1=ac; if z go 60;
Assume that, right before the microinstruction begins execution, the contents of miPC, AC and PC are 80, 0,
and 300 respectively. Determine the values in the registers listed below and the output of microcode jump
control (MJC o/p) at the end of each subcycle as the microinstruction executes. If a value cannot be
determined from the information given, write "?". Use decimal numbers in all blanks.
MAR

MBR

AC

T1

A-Bus Reg

B-Bus Reg

miPC

MJC o/p

Subcycle 1
Subcycle 2
Subcycle 3

3. Suppose that, when the microprogram begins execution at microinstruction 0, the content of the memory
location 150 is the instruction ADD 200, and the register PC contains the value 150. Trace execution of the
microprogram to determine the sequence of microinstructions executed, until the execution of the
instruction is completed. (6 points) ANSWER: 0, 1, _________________________________,0
4.

Suppose that, when the microprogram begins execution at microinstruction 0, the contents of memory
locations 150 and 200 are, respectively, the instruction ADD 200 and the value 80, and the registers PC and
AC contain 150 and 500 respectively. Trace execution of the microprogram and determine the values in the
registers listed below and the output of microcode jump control (MJC o/p) at the end of subcycles 2 and 3
as the microinstruction at control store address 10 executes. In the table, the symbol nn.x (e.g., 10.2)
denotes subcycle x of microinstruction at control store address nn. If a value cannot be determined from the
information given, write "?". Use decimal numbers in all blanks.
MAR
Subcycle 10.2
Subcycle 10.3

MBR

AC

PC

A-Bus Reg

B-Bus Reg

miPC

MJC o/p

Assignment #5

due: before class begins on November 18 (Tuesday)

Student name: _________________

5. A processor uses a 6-stage instruction pipeline. Assume that each stage takes a constant amount of time T to
complete. If 200 instructions are executed without encountering any hazard and every instruction completes
every stage of the pipeline, what is the amount of time from the moment the first stage for the first
instruction begins to the moment the last stage for the last instruction completes?
Answer: ___________T
6. Two statements x=x+7; and x=x-3; are executed concurrently (in parallel) and their executions may
overlap in time. No mutual exclusion is enforced. Note the two statements share the variable x, whose
initial value is 20 before the two statements begin execution. Right after both statements complete
execution, the three possible values of x are _____, _____, and _____ .
7. We wish to add the following instruction to the instruction set of EX-1. Note x is a 12-bit field used as a
constant in this instruction.
binary code
1111 x

mnemonic
ADC x

meaning
AC = AC + x

English
add constant

Assume the execute phase of the instruction begins at control store address 100. Write microinstructions for
the execute phase of this instruction. Be sure to indicate the control store address for each microinstruction
that you write. Try to minimize the number of microinstructions (machine cycles) used in the execute phase.
For each microinstruction, write a comment (beginning with //) to explain the effect of the
microinstruction.
Hint: remember that when the execute phase begins, the instruction is in ir.
100:

S-ar putea să vă placă și