COMPUTER ARCHITECTURE
Spring Semester 2001

COMPUTER ARCHITECTURE - Spring 2001 Programming Assignments

  1. PROG #6: MIC-1 SIMULATOR - MICROPROGRAM LEVEL INTERPRETER

    Write an object-oriented program in C++ or Java that will properly simulate the
    microprogram and assembly language operation of the hypothetical Mic-1 computer as
    defined in chapter #4 of the Tanenbaum text (3rd Edition).
    (See Xerox copies and online help)

    The program will be graded in several phases:
    PROG #6a, PROG #6b, and PROG #6c (final version).

    Check out www.tjhsst.edu/~dhyatt/arch for more information about:
    1. Description of the Mic-1 hardware and control store ("The MIC-1 Computer").
    2. The hexadecimal code for the complete control store ("Microcode for the Mic-1 Control Store")

  2. PART A: Decode a 32-bit control store microinstruction. Read a line from the
    file of control store microinstructions (32-bit instructions) and parse the
    instruction into the 13 fields of Fig. 4-9.
    • Example 1: Line 17 would output:
      AMUX = 1
      COND = 0
      ALU = 3
      SH = 0
      MBR = 0
      MAR = 0
      RD = 0
      WR = 0
      ENC = 1
      C = 10
      A, B, Address don't matter

    • Example 2: Line 19 (tir = lshift(tir); if n goto 25) would output:
      AMUX = 0
      COND = 1
      ALU = 2
      SH = 2
      MBR = 0
      MAR = 0
      RD = 0
      WR = 0
      ENC = 1
      C = 4
      B = xx
      A = 4
      ADDRESS = 25

  3. PART B: Set up the 16 scratch pad registers, Fig. 4-8 in your packet, so that
    a microcode instruction (32-bit) "runs through" the registers. Print out the
    contents of the registers "before" and "after".

  4. PART C: Interpret an entire Mac-1 Assembly language program (a program of
    16-bit macroinstructions) by the Mic-1 control store (32-bits).