Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. 4.1.1)
  2.  
  3. a) Since AND is an ALU op:
  4.  
  5. BSrc looks for the register.
  6. OpSel tells ALU to AND.
  7. MemW is false.
  8. RegW is true, so process is writing to reg Rd
  9. WBSrc uses ALU output as its data.
  10. RegDst is reg Rd.
  11. PCSrc is 0.
  12.  
  13. 4.1.2)
  14.  
  15. a) registers, mux, mem, alu, pc
  16.  
  17. 4.1.3)
  18.  
  19. a) data memory and branch
  20.  
  21. ***
  22.  
  23. 4.7.1)
  24.  
  25. Sign-Extend:
  26. 0000 0000 0000 0000 0000 0000 0001 0100
  27. Jump shift-left 2
  28. 0001 1000 1000 0000 0000 0101 0000
  29.  
  30. 4.7.2)
  31.  
  32. Because it is Sw, ALUOP = 00, and input of ALU control is 0010 (AND).
  33.  
  34. 4.7.3)
  35.  
  36. Since it's not a branch or a jump, the new PC address is itself plus 4.
  37.  
  38. 4.7.4)
  39.  
  40. Reg: mux X
  41. ALU: mux 0x00000014
  42. Mem/ALU: mux X
  43. Branch: mux PC + 4
  44. Jump: mux PC + 4
  45.  
  46. 4.7.5)
  47.  
  48. ALU: -3 and 0x00000014
  49. PC: add PC and 4
  50. Branch: add PC+4 and 0x00000014
  51.  
  52. 4.7.6)
  53.  
  54. RegWrite = 0
  55. Write Register = x
  56. Write Data = x
  57. Reg A = 3
  58. Reg B = 2
  59.  
  60. ***
  61.  
  62. 3) LI I-TYPE
  63.  
  64. RegDst: 0
  65. ALUSrc: 1
  66. ALU Op1: 10
  67. Branch: 1
  68. MemtoReg: 0
  69. RegWrite: X
  70. MemRead: X
  71. MemWrite: X
  72.  
  73. 4) LUI I-TYPE
  74.  
  75. RegDst: 0
  76. ALUSrc: X
  77. ALU Op: X
  78. Branch: 0
  79. LuiCtr: 1
  80. MemtoReg: X
  81. RegWrite: 1
  82. MemRead: X
  83. MemWrite: 0
  84.  
  85. 5) JAL J-TYPE
  86.  
  87. RegDst: 10
  88. ALUSrc: X
  89. ALU Op: X
  90. Branch: 0
  91. Jump: 1
  92. MemtoReg: 10
  93. RegWrite: 1
  94. MemRead: 0
  95. MemWrite: 0
  96.  
  97. 6) JR R-TYPE
  98.  
  99. RegDst: X
  100. ALUSrc: X
  101. ALU Op: X
  102. Branch: 0
  103. Jump: 1
  104. MemtoReg: X
  105. RegWrite: 0
  106. MemRead: X
  107. MemWrite: 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement