Instruction Decode/Multicycle Processor

Computer Organization and Design: The Hardware/Software Interface

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

View Full Document Right Arrow Icon
CS 152 Computer Architecture and Engineering Lecture 8 Single-Cycle (Con’t) Designing a Multicycle Processor February 23, 2004 John Kubiatowicz (www.cs.berkeley.edu/~kubitron) lecture slides: http://inst.eecs.berkeley.edu/~cs152/ 2/23/04 ©UCB Spring 2004 CS152 / Kubiatowicz Lec8.2 Recap: A Single Cycle Datapath ° Rs, Rt, Rd and Imed16 hardwired into datapath from Fetch Unit ° We have everything except control signals ( underline ) 32 ALUctr Clk busW RegWr 32 32 busA 32 busB 5 5 5 Rw Ra Rb 32 32-bit Registers Rs Rt Rt Rd RegDst Extender Mux Mux 32 16 imm16 ALUSrc ExtOp Mux MemtoReg Clk Data In WrEn 32 Adr Data Memory 32 MemWr ALU Instruction Fetch Unit Clk Equal Instruction<31:0> 0 1 0 1 0 1 <21:25> <16:20> <11:15> <0:15> Imm16 Rd Rs Rt nPC_sel 2/23/04 ©UCB Spring 2004 CS152 / Kubiatowicz Lec8.3 Recap: Flexible Instruction Fetch ° Branch (nPC_sel = “Br”): if (Equal == 1) then PC = PC + 4 + SignExt[imm16]*4 ; else PC = PC + 4 ° Other (nPC_sel = “+4”): PC=PC+4 ° What is encoding of nPC_sel? Direct MUX select? Branch / not branch ° Let’s choose second option nPC_sel Equal MUX 0 x 0 1 0 0 1 1 1 Adr Inst Memory Adder Adder PC Clk 00 Mux 4 nPC_sel imm16 Instruction<31:0> 0 1 Equal nPC_MUX_sel 2/23/04 ©UCB Spring 2004 CS152 / Kubiatowicz Lec8.4 Recap: The Single Cycle Datapath during Add 32 ALUctr = Add Clk busW RegWr = 1 32 32 busA 32 busB 5 5 5 Rw Ra Rb 32 32-bit Registers Rs Rt Rt Rd RegDst = 1 Extender Mux Mux 32 16 imm16 ALUSrc = 0 ExtOp = x Mux MemtoReg = 0 Clk Data In WrEn 32 Adr Data Memory 32 MemWr = 0 ALU Instruction Fetch Unit Clk Equal Instruction<31:0> ° R[rd] <- R[rs] + R[rt] 0 1 0 1 0 1 <21:25> <16:20> <11:15> <0:15> Imm16 Rd Rs Rt op rs rt rd shamt funct 0 6 11 16 21 26 31 nPC_sel= +4
Image of page 1

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

View Full Document Right Arrow Icon
2/23/04 ©UCB Spring 2004 CS152 / Kubiatowicz Lec8.5 Recap: The Single Cycle Datapath during Or Immediate 32 ALUctr = Or Clk busW RegWr = 1 32 32 busA 32 busB 5 5 5 Rw Ra Rb 32 32-bit Registers Rs Rt Rt Rd RegDst = 0 Extender Mux Mux 32 16 imm16 ALUSrc = 1 ExtOp = 0 Mux MemtoReg = 0 Clk Data In WrEn 32 Adr Data Memory 32 MemWr = 0 ALU Instruction Fetch Unit Clk Equal Instruction<31:0> ° R[rt] <- R[rs] or ZeroExt[Imm16] 0 1 0 1 0 1 <21:25> <16:20> <11:15> <0:15> Imm16 Rd Rs Rt op rs rt immediate 0 16 21 26 31 nPC_sel= +4 2/23/04 ©UCB Spring 2004 CS152 / Kubiatowicz Lec8.6 Recap: The Single Cycle Datapath during Load 32 ALUctr = Add Clk busW RegWr = 1 32 32 busA 32 busB 5 5 5 Rw Ra Rb 32 32-bit Registers Rs Rt Rt Rd RegDst = 0 Extender Mux Mux 32 16 imm16 ALUSrc = 1 ExtOp = 1 Mux MemtoReg = 1 Clk Data In WrEn 32 Adr Data Memory 32 MemWr = 0 ALU Instruction Fetch Unit Clk Equal Instruction<31:0> 0 1 0 1 0 1 <21:25> <16:20> <11:15> <0:15> Imm16 Rd Rs Rt ° R[rt] <- Data Memory {R[rs] + SignExt[imm16]} op rs rt immediate 0 16 21 26 31 nPC_sel= +4 2/23/04 ©UCB Spring 2004 CS152 / Kubiatowicz Lec8.7 Recap: The Single Cycle Datapath during Store 32 ALUctr = Add Clk busW RegWr = 0 32 32 busA 32 busB 5 5 5 Rw Ra Rb 32 32-bit Registers Rs Rt Rt Rd RegDst = x Extender Mux Mux 32 16 imm16 ALUSrc = 1 ExtOp = 1 Mux MemtoReg = x Clk Data In WrEn 32 Adr Data Memory 32 MemWr = 1 ALU Instruction Fetch Unit Clk Equal Instruction<31:0> 0 1 0 1 0 1 <21:25> <16:20> <11:15> <0:15> Imm16 Rd Rs Rt ° Data Memory {R[rs] + SignExt[imm16]} <- R[rt] op rs rt immediate 0 16 21 26 31 nPC_sel= +4 2/23/04 ©UCB Spring 2004 CS152 / Kubiatowicz Lec8.8 Recap: The Single Cycle Datapath during Branch 32
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern