Be a Computer Science teaching assistant for the spring
semester! See Lorraine Robinson in the CS office or fill out
the online
form to apply.
The deadline is November 28.
Formal lab meetings are done. I highly recommend using those
time slots to work on your design projects.
Tear down memory circuits and clean up if you have not
already done so
Demonstrate working or partial implementation of the bonus
lab by today also
Back to Tanenbaum's Microcode - see previous lecture
in either case - appropriate permissions and version
control is essential (interest in an optional lab session to
learn the subversion source code control system?)
Microcode design project is to implement the WC34000 computer
on the Mice microarchitecture
The 34000 is a simplified 68000-like computer - more on that
later
The Mice microarchitecture
Based closely on Tanenbaum's Mic1
Larger scratchpad - 31 registers
important because we need 16 general purpose registers
plus things like a PC and an IR when we implement
the 34000
can define names for registers or refer by numbers -
you should define names for all of the registers you use
register pointer - use when 31 is the register number
MPC is always in R[30] - this is useful in
some contexts we will see soon
A/B buses as in Mic1
Extra ALU functions - we can multiply, divide, subtract, bor
Shifter does rotate left 8 bits in addition to one-bit
shifts from Mic1
There is an extra bus, the X bus, parallels the A
and B bus.
Contents of the bus are controlled by an X address (5
bits), as well as an additional bit of ALU function.
If the function bit is one (1), the register indicted by the
X address is loaded onto the X bus. All the usual
interpretations apply: if the address is 31, it loads R[RP],
etc.
If the function bit is zero (0), the Xaddress (a
value between 0 and 31) is loaded onto the X bus.
The A and B bus are combined as indicated by the
architecture document: A, inv(A), A+B, A-B,
band(A,B), bor(A,B), A*B, or A/B.
The result of combining A and B is always
combined with X. Thus we can compute inv(A)+#1, or
A*B+X, etc.
The result of combining all three buses is fed to the shifter
where it is possible to perform lshift, rshift,
rotate8, or leave unaltered.
The micro-assembler attempts to do the right thing. Thus,
A+B sets the X address and function bits both to zero
(0). Performing
male -b phase2.bits phase2.mal
Will show you the details; the function bit described is bit 3 of the
ALU bits.
Microcode notes
Your microcode may be up to 1024 microinstructions long
At the start of your microprogram (when you run mice), only
one register has a known value - the MPC is 0
can use semicolons to reserve slots for future use
A few example microprograms (in /usr/cs-local/share/cs237/examples/ucode)
justhalt
makeazero - how can we get a 0?
makeaten - how can we get a 10?
registers
make42bad
make42
The WC34000 Computer
34000 assembly examples in /usr/cs-local/share/cs237/ucode