Simulator

With a simulator, you can 1) easily verify your ISA without actually implementing hardware, 2) debug your application without having actual hardware, and 3) improve your ISA by spotting performance bottlenecks in benchmark programs. Your simulator operates instruction by instruction; you must be able to execute instructions one by one and watch all the programmer visible states (eg. register, memory, ...) at a certain time when the execution of an instruction is completed. Assume that your simulator starts executing at address 0x0 upon power-on.

The source for the simulator for our toy ISA is here

Simulator Commands

You may add whichever commands you find useful. However, your simulator must support the following commands:

How to Test

Tips to create your own simulator

To create your own simulator, you may modify the switch statement in the "execute" method in the provided ISASimulator class. The input of the switch statement is the opcode of an instruction. For example, if you define opcode 0 for "add" operation, you may perform all the required operations for the add under "case 0:". The reg_file and data_mem array store the register and memory values, respectively. The two arrays are Int34 type, and you may use the methods in the Int34 class or transform them into "long" to update their values.