By Ray Healy and Ian Campbell
Our project strove to create only the worst knockoff immitation of a subset of what VAX could do. More seriously, we chose to develop a microcoded CPU with complex instruction encodings, numerous addressing modes, the ability to accept variable numbers of operands for a given instruction, and some complex commands.
To this end we support 13 different instruction modes (including regular suspects like registers, immediates, and displacement, as well as stranger ones like memory indirect and scaled operands), and many instructions, most of which accept varying numbers of operands of most types, performing extra interpretation as needed to fill out their operand lists.
- After installing the repo, run
makein directorysrcto generate the simulator - Usage:
CPU <obj file> [microTrace on y/n] [alternate microcode file]- The object file is the only requirement, and is the program to run
- The 2nd arg will turn on micro trace output if its first character is 'y'
- The 3rd arg specifes an alternative file to load microcode from
- The default value of this arg is
uCode.objrelative to the execution location
- The default value of this arg is
-
src: Main source code directoryCPU.h: the main entrypoint for the simulationcpu.h/cpu.cpp: define the actual simulation (hardware, linking, and controls)includes.h: General includes file, ensures that all files get everything they need to functiontestFiles/*: get their own section
-
Asm: Assembler codeAssembler/*: All code for the macro-code assembleruAsm/*: All code for the micro-code assembler and linker
-
HW_Docs- The files already submitted earlier describing our hardware
-
ISA_Docs: The documents comprising our ISAISA_doc.txt: Our compiled ISA document
-
uCode: all information pertaining to our micro codeasm/*: The assembly and object files implementing the microcodertl/*: The RTL files originally used to describe the codeuCodeFmt.txt: Defines the microcode format
9thfib.obj: An object file which recursively calculates the 9th fibbonacci number10thfib.obj: An object file which recursively calculates the 10th fibbonacci numberalu_tests.obj: Basic tests on most of the ALU functionsargTypeTest.obj: Basic tests for most of the addressing modestestBGE.obj: Tests the performance of BGE (created to debug)branchTest.obj: Tests the ALU flag conditionalscopyTest.obj: Demo of bothCPYand of operand interpretation
- Although
OUTwas implemented, the simulated device attached never was, so its entire function is to write to a register that is never utilized.