04~Chapter 4

04~Chapter 4 - 4 Solutions Solution 4.1 4.1.1 The values of...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 4 Solutions Solution 4.1 4.1.1 The values of the signals are as follows: RegWrite MemRead ALUMux MemWrite ALUOp RegMux Branch a. 1 0 (Reg) Add 1 (ALU) b. 1 1 1 (Imm) Add 1 (Mem) ALUMux is the control signal that controls the Mux at the ALU input, 0 (Reg) selects the output of the register fi le and 1 (Imm) selects the immediate from the instruction word as the second input to the ALU. RegMux is the control signal that controls the Mux at the Data input to the regis- ter fi le, 0 (ALU) selects the output of the ALU and 1 (Mem) selects the output of memory. A value of X is a dont care (does not matter if signal is 0 or 1) 4.1.2 Resources performing a useful function for this instruction are: a. All except Data Memory and branch Add unit b. All except branch Add unit and second read port of the Registers 4.1.3 Outputs that are not used No outputs a. Branch Add Data Memory b. Branch Add, second read port of Registers None (all units produce outputs) 4.1.4 One long path for and instruction is to read the instruction, read the reg- isters, go through the ALUMux, perform the ALU operation, and go through the Mux that controls the write data for Registers (I-Mem, Regs, Mux, ALU, and Mux). The other long path is similar, but goes through Control while registers are read (I- Mem, Control, Mux, ALU, Mux). There are other paths but they are shorter, such as the PC increment path (only Add and then Mux), the path to prevent branching (I-Mem, Control, Mux uses Branch signal to select the PC + 4 input as the new value for PC), the path that prevents a memory write (only I-Mem and then Control, etc). S110 Chapter 4 Solutions a. Control is faster than registers, so the critical path is I-Mem, Regs, Mux, ALU, Mux. b. Control is faster than registers, so the critical path is I-Mem, Regs, Mux, ALU, Mux. 4.1.5 One long path is to read instruction, read registers, use the Mux to select the immediate as the second ALU input, use ALU (compute address), access D-Mem, and use the Mux to select that as register data input, so we have I-Mem, Regs, Mux, ALU, D-Mem, Mux. The other long path is similar, but goes through Control instead of Regs (to generate the control signal for the ALU MUX). Other paths are shorter, and are similar to shorter paths described for 4.1.4. a. Control is faster than registers, so the critical path is I-Mem, Regs, Mux, ALU, D-Mem, Mux. b. Control is faster than registers, so the critical path is I-Mem, Regs, Mux, ALU, Mux. 4.1.6 This instruction has two kinds of long paths, those that determine the branch condition and those that compute the new PC. To determine the branch condition, we read the instruction, read registers or use the Control unit, then use the ALU Mux and then the ALU to compare the two values, then use the Zero out- put of the ALU to control the Mux that selects the new PC. As in 4.1.4 and 4.1.5: a. The fi rst path (through Regs) is longer....
View Full Document

This note was uploaded on 02/02/2011 for the course CS 2214 taught by Professor Hadimioglu during the Spring '10 term at NYU Poly.

Page1 / 68

04~Chapter 4 - 4 Solutions Solution 4.1 4.1.1 The values of...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online