Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 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. Data Memory
  12. Address 3 of the regfile is set to 0 1111 1111
  13. -------
  14. 6- Change the regfile_read_address1 to 3
  15. 7- Change the ALUOp to 0x5 (for 'sll' operation)
  16. 8- Change the regfile_write_address to 1
  17. 9- Set RegWrite to 1
  18. 10- reset RegWrite back to 0
  19.  
  20. Input 1 to the ALU becomes regfile address 3 (1111 1111)
  21. Output of ALU becomes sll of input 1 which becomes (1111 1110)
  22. Writes 1111 1110 to address 1 of regfile
  23. -------
  24. 11- Set the ALUSrc2 to 1
  25. 12- Set the value of alu_input2_vio(instr_i) to 0
  26. 13- Set the ALUOp to 0 (for 'add' operation)
  27. 14- Change the regfile_read_address1 to 3
  28. 15- Change the regfile_read_address2 to 1
  29. 16- Set MemWrite to 1
  30. 17- Reset MemWrite back to 0
  31. -------
  32. 18- Change the regfile_read_address1 to 1
  33. 19- Set the value of alu_input2_vio(instr_i) to 1
  34. 20- Set the ALUSrc2 to 1
  35. 21- Set the ALUOp to 0 for 'add'
  36. 22- Set MemToReg to 1
  37. 23- Set regfile_write_address to 2
  38. 24- Set RegWrite to 1
  39. 25- Set RegWrite to 0
  40. -------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement