MicroTiger is a graphical microcode simulator with a reconfigurable datapath. The datapath editor window, the main application window, allows for datapath creation and simulation. In addition, several other dialog windows are provided to aid in creating the datapath. The microprogram editor window allows for microprogram and aids in simulation. The ISA code is externally edited and can be viewed in the ISA code viewer window. The simulation controls are available in the main application window. The expression language is available for ALUs and custom components to customize the evaluation of these components.

Creating MicroPrograms

The microprogram editor provides a integrated text editor for writing and compiling the microprogram for the simulator. When simulating, the microprogram editor highlights the current operation in the microprogram making debug easier. Also, breakpoints can be defined to further aid in debugging. The format of the microprogram language is describe in the MicroProgram Language section.

The File menu allows the microprogram to loaded and saved. The File menu also allows the microprogram editor to be closed. Also, the microprogram can be loaded from the main application's File menu.

The Edit menu allows control field mnemonics to be inserted from the control properties window and allows for standard text editing features.

The View menu allows the control properties window and the datapath macros window to be brought up. The View menu can also toggle the statusbar and the syntax highlighting during simualtion.

The Build menu allows the microprogram to be compiled and present an error dialog when the microprogram has parsing problems.

The Breakpoints menu allows breakpoints to be set, breakpoints to be cleared, and all breakpoints to be cleared.

The Help menu provides this user documentation and information about the application.

Control Fields Specification

The control fields are created and modified using the control properties window. The control properties window is accessible through both the datpath editor's (main window) and microprogram editor's View menu. The control properties dialog allows control fields to added, edited, and removed. Once a control field is selected, its properties can be edited. The editable properties included the signal length, the overflow control field to store the overflow of this control field (for more advanced microprogram formats), and the assigning of control field mnemonics. Also there is a button to insert a selected control field mnemonic into the microprogram editor window.

Datapath Macros

The datapath macros window allows the macros to be defined in the datapath file and therefore are accessible by any microprogram using the datapath to reduce reduncancy in microprogram macros. It provides a simple text editor to write the datapath macros. When either OK or Apply buttons are pressed, the datapath macros are compiled and any parsing errors are presented to the user and saved if compiled correctly. When either the OK or Cancel buttons are pressed, the window closes.

Simulating It All

The simulator is accessed through the Simulation menu of the datapath editor window and the optional toolbar in the datpath editor window. It provides different running options like stepping on different code levels, running to halt and reseting.

The Simulation menu items are only available to use when a valid datapath exists and a microprogram is compiled. The menu provides functions to reset, to step backwards, to step forward, to step to the last or next ISA instruction (using the isa label in the microprogram), to step to the next or last iteration that has the same MPC, to step to the next or last iteration with a user specified MPC, a facility to provide an animation of the simulation.

Also, the Simulation menu provides the ability to calculate the CPI of the current simulation run. The CPI calcuation uses the microinstruction labeled isa to determine the first isa iteration, last isa iteration and the number of isa iterations executed. The CPI is calculated using the following equation:

   (last_isa_iter - first_isa_iter) / (isa_iter - 1)

ISA Language

The ISA language is very simple. The ISA language is used to input ISA files for the RAM and Register File and is used to save the state of memory. When saving the memory state, the simple, Intel hex and S-Record formats can be used for the output file.


Comments can start with either (C++ style) or # (Perl style). Comments end at the end of line. These are the same commenting style as the microprogram language described in the Microprogram Language section and the expression language described in Expression Language. Additionally a semi-colon can specify a comment (this was to provide compatibility with the AMISS simulator memory file format). For example:

   #  this is a comment just like those in Perl
   // this is a comment just like those in C++
   ;  this is comment just like those in AMISS

Simple Numbers

The simple format accepts only hex numbers and each number corresponds to a single memory location regardless of the size of the hex number. When using this format, memory values start at memory address zero and increment the memory address for each memory value. For example:

   # this store in the first and second memory addresses
   4D A0
   # next value stores in third memory address
   # this long number will be truncated to the element size

Intel Hex Format

The Intel hex format is also an acceptable input for ISA language. See other documentation on the actual Intel hex format specification. An example Intel hex format input is:

   # sbn primes.isa => intel hex format

SRecord Hex Format

The SRecord format is also an acceptable input for ISA language. See other documentation on the actual SRecord format specification. An example SRecord format input is:

   # sbn primes.isa => srecord hex format

Microprogram Language


Comments can start with either (C++ style) or # (Perl style). Comments end at the end of line. These are the same commenting style as the expression language described in the Expression Language section. For example:

   #  this is a comment just like those in Perl
   // this is a comment just like those in C++

Microinstruction Format

To specify the control field values to assign, either the control field mnemonic can be used, or the control field can be named and be assigned a numeric value or microinstruction address. The values are seperated by commas and each microinstruction ends with a semi-colon.

Microinstructions can optionally be labeled by prepending the microinstruction with the label name and a colon. Additionally a microinstruction can be labeled with a number to indicate the microinstruction address of the instruction. If the address is larger than the current microinstruction address, empty microinstructions are inserted between the previous microinstruction and the current microinstruction to place the current microinstruction at the specified microinstruction address.

An example of this microinstruction format is:

# negbranch label
# uses mnemonics: memtox, zerotoy, ztopc, jmpalways
# assigns microinstruction address isa to jmpaddr
negbranch: memtox, zerotoy, ztopc,
           jmpalways, jmpaddr=isa;

Simple Microinstruction Format

A simpler microinstruction format is one that is a sequence of numeric values that are ordered by the control field names sorted in alphabetic order. The values are only seperated by whitespace and the microinstruction ends with a semi-colon. These microinstructions use the same microinstruction labels as the regular microinstruction format (described above). This allows both the simple microinstruction format and the regular microinstruction format to be used within the same microprogram.

# the same microinstruction as the last example
# just uses the simple microinstruction format instead
negbranch: 1 2 0 0 0 0 2 3;

Macro Format

The macro format is the same format as the microinstruction (without the microinstruction label) and are appended with @macro and the macro name. Macros can then be used in exactly the same manner as a control field mnemonic but provide several control fields assignation in a single phrase.

# defines a macro as the same microinstruction as before
@macro mymicro memtox, zerotoy, ztopc,
               jmpalways, jmpaddr=isa;

# use the macro to implement a microinstruction
negbranch: mymicro;


This tool was developed by Brian G VanBuren under a thesis at the Rochester Institute of Technology entitled Graphical Microcode Simulator with a Reconfigurable Datapath. Dr. Muhammad Shaaban was the primary thesis advisor with Dr. Roy Czernikowski and Dr. Greg P. Semeraro as secondary advisors. The goal was to create a versatile microcode simulator with a side goal of replacing the existing microcode simulator used for RIT's Computer Organization class.

Hosted by: Logo