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) (Note error in
original handout), 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 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
justhalt
makeazero
makeaten
registers
make42bad
make42
The 34000 Computer
34000 assembly examples in /usr/cs-local/share/cs237/ucode
Some development hints
Got a microcode group? Get a Unix group!
Version control! If there's interest, I can run a mini CVS
session during normal lab times next week.