Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. For all the variables, the initial value are 0.
  2.  
  3. -------
  4. 1- Press the right button to reset everything.
  5. 2- Set the ALUOp to 1 (for 'inv' operation)
  6. 3- Set regfile_write_address to 3.
  7. 4- Set RegWrite to 1
  8. 5- Reset RegWrite back to 0
  9.  
  10. ALU output is inv of reg_file addr0 0000 0000 which is 1111 1111
  11. Address 3 of the regfile is set to 0 1111 1111 (the 0 is ovf from alu)
  12. -------
  13. 6- Change the regfile_read_address1 to 3
  14. 7- Change the ALUOp to 0x5 (for 'sll' operation)
  15. 8- Change the regfile_write_address to 1
  16. 9- Set RegWrite to 1
  17. 10- reset RegWrite back to 0
  18.  
  19. Input 1 to the ALU becomes regfile address 3 (1111 1111)
  20. Output of ALU becomes sll of input 1 which becomes (1111 1110)
  21. Writes 1111 1110 to address 1 of regfile
  22. -------
  23. 11- Set the ALUSrc2 to 1
  24. 12- Set the value of alu_input2_vio(instr_i) to 0
  25. 13- Set the ALUOp to 0 (for 'add' operation)
  26. 14- Change the regfile_read_address1 to 3
  27. 15- Change the regfile_read_address2 to 1
  28. 16- Set MemWrite to 1
  29. 17- Reset MemWrite back to 0
  30. -------
  31. 18- Change the regfile_read_address1 to 1
  32. 19- Set the value of alu_input2_vio(instr_i) to 1
  33. 20- Set the ALUSrc2 to 1
  34. 21- Set the ALUOp to 0 for 'add'
  35. 22- Set MemToReg to 1
  36. 23- Set regfile_write_address to 2
  37. 24- Set RegWrite to 1
  38. 25- Set RegWrite to 0
  39. -------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement