Repository of group 10101102 for Computer Organization, Monsoon 2021 semester, assignment at IIITD.
- This repository contains an Assembler
Simple-Assembler
and a simulatorSimpleSimulator
. - The assembler converts a given code (pertaining to the ISA, refer to
Assignment.pdf
) to it's binary equivalent. It is also capable of reporting descriptive errors with the line number. (Also the error is colored 😄) - The simulator processes such binaries and dumps the program counter and the registers while the program is running, and after an
hlt
instruction, it dumps the state of the memory. It is important to note that we follow a Von-Neumann Architecture (unified memory | Instruction memory, hlt, followed by variables). It also plots the graph of memory access per cycle and is not capable of handling exceptions. automated-testing
is a testing suite designed to testify the correctness of outputs from theassembler
andsimulator
. It contains the traces, binaries and a few assembly codes.SimpleSimulator/plots/
contain all the plots generated by the simulator according to the timestamp (since epoch).
- Go to the
automatedTesting
directory and execute therun
file with appropiate options passed as arguments. - Options available for automated testing:
--verbose
: Prints verbose output--no-asm
: Does not evaluate the assembler--no-sim
: Does not evaluate the simulator
- Change directory to
Simple-Assembler
orSimpleSimulator
. - Use
./run
(on bash) and enter your assembly code or binary, after entering add a newline and pressctrl+D
to terminate stdin. - Alternatively, you can directly run
asm.py
orsamuelator.py
.