Question: Part 2: Use the single cycle model to answer the following questions: 2.1 Consider a variant inc_l of the lw (load word) instruction. inc_l increments
Part 2: Use the single cycle model to answer the following questions:
2.1 Consider a variant inc_l of the lw (load word) instruction. inc_l increments the base/index register after loading a word from memory. The inc_l can be represented by the following pair of instructions: lw $rs, L($rt) addi $rt, $rt, 1 Show why it is impossible to change the single-cycle datapath (see slide 8 of the Single Cycle Control lecture slides) in order to implement the inc_l instruction without altering the register file.
DATAPATH WITH CONTROL 0 Add ALU Add result 4 Shift left 2 RegDst Branch MemRead MemtoRe nstruction [31-26 Control MemWrite ALUSro RegWrite Instruction [25-21] register 1 Read Instruction [20-16] Read data 1 Read PRead address Zero ALU ALU result register 2 Instruction [31-0) Instruction Instruction [15-111 register Read Address data M M Write a 2 memory 1Write Write Data data memo data Registers 16 Sign- extend 32 Instruction [15-0] ALU control Instruction [5-0) DATAPATH WITH CONTROL 0 Add ALU Add result 4 Shift left 2 RegDst Branch MemRead MemtoRe nstruction [31-26 Control MemWrite ALUSro RegWrite Instruction [25-21] register 1 Read Instruction [20-16] Read data 1 Read PRead address Zero ALU ALU result register 2 Instruction [31-0) Instruction Instruction [15-111 register Read Address data M M Write a 2 memory 1Write Write Data data memo data Registers 16 Sign- extend 32 Instruction [15-0] ALU control Instruction [5-0)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
