MIPS Datapath And Control Unit Simulator (Assembly)
Project APANO MIPS aims to implement a low-level MIPS datapath and control unit simulator. Datapath simulation includes simulating all its components (registers, memories, ALUs, multiplexers, shifters, sign extenders , and the connections among these). User is able to input a program (using the supported instructions) to be simulated, as well as specifying it's starting address. APANO MIPS keeps track of the register file contents and memory contents.
APANO MIPS supports the following instructions:
- Arithmetic: add, addi, sub
- Load/Store: lw, sw
- Logic: sll, and, or, nor
- Control flow: beq, bne, j, jal, jr
- Comparison: slt, slti,sltu,sltui
git clone https://github.com/alyanwarr/APANO_MIPS.git
Program starts with a message box informing user with instructions supported, and step-by- step guide on how to use the program including the correct format to enter his/her instructions.
User is then redirected into a window where he/she should write his/her MIPS instructions , then press "RUN" to submit the instructions entered.
Simulation process starts when user presses "RUN" button.
User shall press "Continue" to keep track of the data path cycle of the current instruction, or press "NEXT" to go to the second instruction. User can also press the button at any of the data items to view/keep track of values (reg file, data memory ,) data items.
Control Unit Truth Table
- Sum all numbers between a user-input defined number and another user-input defined number.
LOOP: slt $t2,$t0,$a1
EXIT: add $s0,$s0,$t0
Data associated : $a0 = 1 , $a1= 10 -> $s0 (at the end) = 55
- Greatest Common Divisor (GCD)
gcd: beq $a0,$a1,exit
L1: sub $a0,$a0,$a1
exit: add $v0,$a0,$zero
Data associated: $a0=5 ,$a1 = 15 -> $v0 (at the end) = 5
- Fork it
- Create your feature branch:
git checkout -b new-feature
- Commit your changes:
git commit -am 'Add feature'
- Push to the branch:
git push origin new-feature
- Submit Pull request
- Aly Anwar
- AbdelRahman Gaafar
- Nour ELDin
- Omar Adel
- Peter Magdi
APANO MIPS is licensed under the MIT license. take a look at the LICENSE for more information.