Skip to content

Latest commit

 

History

History
11 lines (6 loc) · 964 Bytes

README.md

File metadata and controls

11 lines (6 loc) · 964 Bytes

Simulator

The simulator, written in Python, not only serves as a great teaching tool, but can also be used for debugging. The users can test the correctness of their code on the sim before loading it onto the chip. There are two execution modes in the simulator:

  1. Cycle-accurate mode: This allows the user to see the execution of a program, cycle-by-cycle. Since all the instructions are multi-cycle, intermediate results can be seen by the user. This is mainly for teaching purposes.

  2. Instruction-accurate mode: In this mode, an instruction is treated as a single transaction, i.e. intermediate results are not visible. Rather, the complete effect of an instruction becomes visible at once. This is mainly used for debugging.

The simulator can run both user programs and bootloaders in their standard binary format (as generated by the assembler provided). Program usage, along with other commandline options can be printed using

sim.py -h