1 / 18

ECE 369

ECE 369. Chapter 4. addi $29, $29, 16 Assume register $29 initially contains the number 129. addi $29, $29, 16 Assume register $29 initially contains the number 129. What happens at stuck at 0 for….?. RegWrite.

arva
Download Presentation

ECE 369

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECE 369 Chapter 4

  2. addi $29, $29, 16Assume register $29 initially contains the number 129.

  3. addi $29, $29, 16Assume register $29 initially contains the number 129.

  4. What happens at stuck at 0 for….? RegWrite R-format instructions, in addition to lw: will not be able to write their results to the register file.

  5. What happens at stuck at 0 for….? ALUop1 How about add or sub? All R-format instructions

  6. What happens at stuck at 0 for….? ALUop0 Beq instruction will not work because the ALU will perform addition instead of subtraction

  7. What happens at stuck at 1 for….? RegWrite Sw (beq) will overwrite a random register with either the store address (branch target) or random data from the memory data read

  8. New inruction (l_inc)= lw $rs, ($rt) addi $rt, $rt,1 You can modify the datapath: a) Introduce new module(s) b) Introduce input(s)/output(s) to existing modules c) Add new control signal(s)

  9. New instruction (l_inc)= lw $rs, ($rt) addi $rt, $rt,1 Auto incrementer unit Second write port (WriteData2) Write2 control signal Feed Inst[25-21] to second write port Write2 controls this write

  10. Modify single cycle to implement Jump Register (Jr $rs) = PC<-$rs

  11. Modify single cycle to implement Jump Register (Jr $rs) = PC<-$rs

  12. bmez $rt, $rs, imm16 RegWrite reads the value of memory in address (R[$rs] + R[$rt]), compares it to zero and if zero then branches to the zero extended immediate, otherwise it goes on to the next instruction.

  13. sw+ is a “store word, with post increment” M[R[rs]] = R[rt] R[rs] = R[rs] + imm

  14. Modify the datapath to handle: lw rt, rs # R[rt] = M[R[rs]] sw rt, rs # M[R[rs]] = R[rt]

More Related