CS 154 Microcode Modification Lab

Due: 23:59 4/16/07.

Work in groups of no more than three people. Make sure each person understands the lab, as your individual knowledge will be tested during interactive grading and during exams. In the event of interactive grading your labs MUST be graded within posted time slots or you will get a zero. All group members must be present so that they can be individually graded.

NOTE: Labs 1-3 depend upon each other. It is very important that you keep up with the due dates and get all three labs working. You will not be able to do the labs until you have successfully completed the previous ones! You will be given 4 late days total for all 4 labs -- save them for labs 2 and 3!

You will need to use a Unix or Linux machine for this assignment (such as those in CSIL -- you can use them remotely if you like).


We will be using the DePaul University MicMac simulator. You will need to go to the Mic/Mac web page and get a copy of the simulator and related documentation. Install the simulator on a Linux or Unix machine (such as in CSIL). Also have a look at some hints on running the simulator.


Some people have had trouble installing the software for Lab 1. Susmit has put a world-readable version of the mic-mac software on CSIL at:

/cs/class/cs154/ist

There is a binary you can install at home also at:

/cs/class/cs154/ist.tar.gz


The MIC-1 microprogram you will modify is in ist/frend/one/one.mal
With some minor differences, this is essentially the same code as described in the Matloff handout and described in class. You will also need to modify one.def if you change any of the opcodes. Your grader will post a test MAC program to the class newsgroup

The MIC-1 microprogram you will modify is in ist/frend/one/one.mal With some minor differences, this is essentially the same code as described in the Matloff handout and described in class. You are to modify this code such that:

  • It does not use a shifter.
  • It implements the new instruction: multiply from memory MULD (ac := ac * m[x]) Rewrite the code for the MAC-1 program fact.asm (contained in the micmac distribution) so that it uses MULD.
  • Then modify one.mal so that it only contains instructions necessary to run fact.asm.

    You will also need to modify one.def if you change any of the opcodes. Make sure your new MIC-1 microprogram will run the fact.asm program.


    MISC...
    1. Homework submission:
      1.  Susmit will clarify the use the handin program in discussion or on the mailing list.
      2. Only one member of each group should submit the lab 
      3. Submit the following files:
        • one.mal
        • one.def
        • GROUP
        The file GROUP will list the full name, login, and student ID for each member of the group.
      EXTRA CREDIT will be given for the two teams which submit the fastest microprogram, as measured by the dynamic instruction count.

      The fastest group will receive 10% extra credit, the 2nd fastest, 5%. Extra credit can only be earned if the rest of the submitted lab is flawless.

      By the way, this "contest" is in keeping with microcoding in general. In high-level programming, we usually don't care about small increases in speed; usually the clarity of the code is more important. But microcode directly affects the overall speed of the machine itself, so optimal code is of great value.


    Last updated April  2007
    chong@cs.ucsb.edu