Resources: 18-447 CMU Introduction to Computer Architecture Labs
The purpose of the shell is to provide the user with commands to control the execution of the simulator. The shell accepts one or more program files as command line arguments and loads them into the memory image. In order to extract information from the simulator, a file named dumpsim will be created to hold information requested from the simulator. The shell supports the following commands:
r
orrun
: simulate the program until it indicates that the simulator should halt. (As we define below, this is when a SWI instruction is executed with a value of 0x0A.)file <hexfile>
: load this file in program memory.step [i]
: execute one instruction (or optionallyi
)mdump 0x<low> 0x<high> [dumpfile]
: dump the contents of memory, from location low to location high to the screen or to the dump file [dumpfile].rdump [dumpfile]
: dump the current instruction count, the contents of R0 – R14, R15 (PC), and the CPSR to the screen or to the file [dumpfile].set r<n> 0x<reg_val>
: set general purpose register reg r_n to value reg_val.?
orhelp
: print out a list of all shell commands.q
orquit
: quit the shell.
The project is organized into two major components: Shell and Simulator
Shell:
armsh.c
- Executable entry point, parses stdin and calls shell command handlersshellcmds.c
- Executes shell commands, calling appropriate routines in Simulator (sim.c)
Simulator:
sim.c
- CPU/Memory datapath and organization; routines to execute shell commandsisa.c
- Executes each instruction; routines to decode and handle instructionsisa_helper.c
- Helper routines for instruction-handlers
- Small feature gets assigned to a person after group meeting
- The person implements it in a separate branch and then sends PR to master
- The PR needs review by maintainer of module within 12hrs, and if okayed by them, can be merged into master
- If no reply on PR till 12hrs hours by maintainer, anyone can review it, and if no reply till 24hrs more, it can be merged into master
- PR should have no merge conflicts, it's responsibility of the PR-sender to keep their branch updated to master
shell/sim: darkapex verilog: kharghoshal