Mic1 Microprogramming Simulator
As explained in the documentation file, this software simulates the execution of microprograms based on the
example machine given in Ch. 4 of Andrew S. Tanenbaum's Structured Computer Organization,
3rd ed. (Prentice-Hall, 1990). Note that his
memory-mapped I/O is not supported by the simulator and that the
range of memory addresses handled is much more limited that what
is used in his text. The simulator gives a visual display of what
happens in each subcycle (or cycle, etc.) of the microprogram.
This can be useful in introducing students to microprogramming,
since it is something that they cannot usually try in practice.
With Mic1, students (or the instructor) can run small test
microprograms, or even Tanenbaum's Mic-1 microprogram which
interprets Mac-1 programs. (Mac-1 refers to his example
conventional machine level. Note that Tanenbaum's microprogram
interpreter has been modified to handle a Mac-1 HALT instruction.)
The simulator can be used in several ways with students in
computer architecture & organization classes. First, students
can run some of the example microprograms provided with the
simulator. Then they can write and run their own microprograms.
By using the microprogram interpreter that implements the Mac-1
machine language, students can run Mac-1 machine language programs,
whether those supplied with the simulator (such as mic003.txt) or
ones they write themselves. The most challenging type of project,
however, is to have students invent a new Mac-1 machine language
instruction and then to implement it by rewriting the microprogram
interpreter. The author has used this as a contest in which
part of the goal is to have students demonstrate their creativity
in designing a useful Mac-1 instruction.
The Mic1 simulator and associated sample programs are made available as freeware.
The latest version of the Mic1 microprogramming simulator runs under most versions of Windows.
It was directly tested on Windows 95, 2000, and XP.
- mic1.zip
A zip file
containing the mic1.exe simulator, mic1doc.txt documentation, and sample microprograms.
- mic1.exe
The simulator alone.
- mic1doc.txt
The documentation file.
- Drawing of the Mic1 Machine

- Microinstruction Coding Sheet

- Notes on simple microprogramming examples

- More simple microprogramming examples

Used as a class exercise.
- Microprogramming coding examples

- Mac1 Notes
Notes on doing Mac1 machine
language programming with this simulator.
- Mac1 Instruction Set
- Functions, Parameters, and Stack Frames in Mac1

- Notes on mic004.txt
 Example of function call and return.
- interprt.txt
Contains the microcode
interpreter in microassembly language form. This is the interpreter
which fetches, decodes, and executes Mac1 machine language instructions.
- Microprogram interpreter notes
Traces how the interpreter fetches, decodes, and executes a few machine language
instructions. Also dicusses how to add your own machine language instruction to the instruction set.
- The following individual sample Mic1 and Mac1 programs are available:
- mic001.txt
Simple microprogram to read and push one item.
- mic002.txt
Microprogram that does a read, boolean not, and right shift.
- mic003.txt
Shows a loop in machine language.
- mic004.txt
Shows function call and return in machine language.
- mic005.txt
Shows an error due to an illegal field value.
- mic006.txt
Shows the error given if a register number is missing.
- mic007.txt
Microprogram that illustrates overflow upon addition.
- mic008.txt
Illustrates subtraction in microcode.
- mic009.txt
Illustrates subtraction in microcode.
- mic013.txt
Shows an error due to incorrect attempt to read.
- mic014.txt
Shows an error due to incorrect attempt at a write.
- mic015.txt
Machine language program to push the sum of 2 constants.
- mic022.txt
Adds and tests a new machine language instruction
named NEGA.
- mic024.txt
Shows an error due to trying to write to code area.
- mic025.txt
Shows how to do a FOR loop in microcode.
|

|
Maintained by: Br. David Carlson
Last updated: July 31, 2008
Disclaimer
|
|