#-------MIPS-Processor-Simulator-------#
#----------How to Run----------#
- Run command "make" to generate the executable file.
- Run using "./processor_simulator <input_HEX_file> <output_SVG_file>" (No result file printed) or
- Run using "./processor_simulator <input_HEX_file> <output_SVG_file> <output_results_file>" (result file printed).
#---------Assumptions----------#
-
Hexadecimal numbers can have 'b' and but not 'B'.
-
If branch is the last instruction then 2 instruction penalty is counted if branch is taken, because it will continue to read from instruction stream.
-
Input instructions are hexadecimal numbers of length 8.
-
Program ends when all stages have invalid instuctions.
-
For a nop instruction(white in svg) signals highlighted should be ignored.
-
Any invalid input on terminal or input file will be reported.
#----------Commands----------#
- Use "step" to go to next cycle.
- Use "quit"/"exit" to end the program there, without any futher execution of hex program.
stops at break point after executing instruction at that pc value.
maximum number of instructions is ""----10^7----""
Assumptions:
"sim.y" input_hexin(in calloc of ins and ins_string) print_memdump(in else if) initialse(in ;i<74000005;)
"sim.h" in char mem[..];
remember to use fghz for frequency in GHz.
remember to add latency to cycle count.