Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- For all the variables, the initial value are 0.
- -------
- 1- Press the right button to reset everything.
- 2- Set the ALUOp to 1 (for 'inv' operation)
- 3- Set regfile_write_address to 3.
- 4- Set RegWrite to 1
- 5- Reset RegWrite back to 0
- ALU output is inv of reg_file addr0 0000 0000 which is 1111 1111
- Data Memory
- Address 3 of the regfile is set to 0 1111 1111
- -------
- 6- Change the regfile_read_address1 to 3
- 7- Change the ALUOp to 0x5 (for 'sll' operation)
- 8- Change the regfile_write_address to 1
- 9- Set RegWrite to 1
- 10- reset RegWrite back to 0
- Input 1 to the ALU becomes regfile address 3 (1111 1111)
- Output of ALU becomes sll of input 1 which becomes (1111 1110)
- Writes 1111 1110 to address 1 of regfile
- -------
- 11- Set the ALUSrc2 to 1
- 12- Set the value of alu_input2_vio(instr_i) to 0
- 13- Set the ALUOp to 0 (for 'add' operation)
- 14- Change the regfile_read_address1 to 3
- 15- Change the regfile_read_address2 to 1
- 16- Set MemWrite to 1
- 17- Reset MemWrite back to 0
- -------
- 18- Change the regfile_read_address1 to 1
- 19- Set the value of alu_input2_vio(instr_i) to 1
- 20- Set the ALUSrc2 to 1
- 21- Set the ALUOp to 0 for 'add'
- 22- Set MemToReg to 1
- 23- Set regfile_write_address to 2
- 24- Set RegWrite to 1
- 25- Set RegWrite to 0
- -------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement