4.13 Advanced Topic: An Introduction to Digital Design Using a Hardware Design Language 345.e1

Size: px
Start display at page:

Download "4.13 Advanced Topic: An Introduction to Digital Design Using a Hardware Design Language 345.e1"

Transcription

1 .3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage 35.e.3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage to Describe and odel a Pipeline and ore Pipelining Illstrations Th is online section covers hardware description langages and then gives a dozen eamples of pipeline diagrams, starting on page 366.e8. As mentioned in Appi A, Verilog can describe processors for simlation or with the intention that the Verilog specification be synthesized. To achieve acceptable synthesis reslts in size and speed, and a behavioral specification inted for synthesis mst careflly delineate the highly combinational portions of the design, sch as a path, from the control. The path can then be synthesized sing available libraries. A Verilog specification inted for synthesis is sally longer and more comple. We start with a behavioral model of the five-stage pipeline. To illstrate the dichotomy between behavioral and synthesizable designs, we then give two Verilog descriptions of a mltiple-cycle-per-instrction RISC-V processor: one inted solely for simlations and one sitable for synthesis. Using Verilog for Behavioral Specification with Simlation for the Five-Stage Pipeline Figre e.3. shows a Verilog behavioral description of the pipeline that handles instrctions as well as loads and stores. It does not accommodate branches (even incorrectly!), which we postpone inclding ntil later in the chapter. Becase Verilog lacks the ability to define s with named fields sch as strctres in C, we se several indepent s for each pipeline. We name these s with a prefi sing the same convention; hence, IFIDIR is the IR portion of the IFID pipeline. Th is version is a behavioral description not inted for synthesis. s take the same nmber of clock cycles as or hardware design, bt the control is done in a simpler fashion by repeatedly decoding fields of the instrction in each pipe stage. Becase of this difference, the instrction (IR) is needed throghot the pipeline, and the entire IR is passed from pipe stage to pipe stage. As yo read the Verilog descriptions in this chapter, remember that the actions in the always block all occr in parallel on every clock cycle. Since there are no blocking assignments, the order of the events within the always block is arbitrary.

2 35.e.3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage modle RISCVCPU (clock); // opcodes parameter LD = 7'b_, SD = 7'b_, BEQ = 7'b_, NOP = 3'h_3, op = 7'b_; inpt clock; reg [63:], Regs[:3], IDA, IDB, EB, EOt, EVale; reg [3:] Iemory[:3], Demory[:3], // separate memories IFIDIR, IDIR, EIR, EIR; // pipeline s wire [:] IFIDrs, IFIDrs, Erd; // Access fields wire [6:] IDop, Eop, Eop; // Access opcodes wire [63:] Ain, Bin; // the inpts // These assignments define fields from the pipeline s assign IFIDrs = IFIDIR[9:5]; // rs field assign IFIDrs = IFIDIR[:]; // rs field assign IDop = IDIR[6:]; // the opcode assign Eop = EIR[6:]; // the opcode assign Eop = EIR[6:]; // the opcode assign Erd = EIR[:7]; // rd field // Inpts to the come directly from the pipeline s assign Ain = IDA; assign Bin = IDB; integer i; // sed to initialize s initial begin = ; IFIDIR = NOP; IDIR = NOP; EIR = NOP; EIR = NOP; // pt NOPs in pipeline s for (i=;i<=3;i=i+) Regs[i] = i; // initialize s--jst so they aren't cares // Remember that ALL these actions happen every pipe stage and with the se of <= they happen in parallel! clock) begin // first instrction in the pipeline is being fetched // Fetch & increment IFIDIR <= Iemory[ >> ]; <= + ; // second instrction in pipeline is fetching s IDA <= Regs[IFIDrs]; IDB <= Regs[IFIDrs]; // get two s IDIR <= IFIDIR; // pass along IR--can happen anywhere, since this affects net stage only! // third instrction is doing address calclation or operation if (IDop == LD) EOt <= IDA + {{53{IDIR[3]}}, IDIR[3:]}; else if (IDop == SD) EOt <= IDA + {{53{IDIR[3]}}, IDIR [3:5], IDIR[:7]}; else if (IDop == op) case (IDIR[3:5]) // case for the varios R-type instrctions : EOt <= Ain + Bin; // add operation FIGURE e.3. A Verilog behavioral model for the RISC-V five-stage pipeline, ignoring branch and hazards. As in the design earlier in Chapter, we se separate instrction and memories, which wold be implemented sing separate caches as we describe in Chapter 5.

3 .3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage 35.e3 defalt: ; // other R-type operations: sbtract, SLT, etc. case EIR <= IDIR; EB <= IDB; // pass along the IR & B // em stage of pipeline if (Eop == op) EVale <= EOt; // pass along reslt else if (Eop == LD) EVale <= Demory[EOt >> ]; else if (Eop == SD) Demory[EOt >> ] <= EB; //store EIR <= EIR; // pass along IR // stage if (((Eop == LD) (Eop == op)) && (Erd!= )) // pdate s if load/ operation and destination not Regs[Erd] <= EVale; modle FIGURE e.3. A Verilog behavioral model for the RISC-V five-stage pipeline, ignoring branch and hazards. (Contined) Implementing Forwarding in Verilog To et the Verilog model frther, Figre e.3. shows the addition of forwarding logic for the case when the sorce and destination are instrctions. Neither load stalls nor branches are handled; we will add these shortly. The changes from the earlier Verilog description are highlighted. Someone has proposed moving the write for a reslt from an instrction from the to the E stage, pointing ot that this wold redce the maimm length of forwards from an instrction by one cycle. Which of the following is accrate reasons not to consider sch a change?. It wold not actally change the forwarding logic, so it has no advantage.. It is impossible to implement this change nder any circmstance since the write for the reslt mst stay in the same pipe stage as the write for a load reslt. 3. oving the write for instrctions wold create the possibility of writes occrring from two different instrctions dring the same clock cycle. Either an etra write port wold be reqired on the file or a strctral hazard wold be created.. The reslt of an instrction is not available in time to do the write dring E. The Behavioral Verilog with Stall Detection If we ignore branches, stalls for hazards in the RISC-V pipeline are confined to one simple case: loads whose reslts are crrently in the clock stage. Ths, eting the Verilog to handle a load with a destination that is either an instrction or an effective address calclation is reasonably straightforward, and Figre e.3.3 shows the few additions needed. Check Yorself

4 35.e.3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage modle RISCVCPU (clock); // opcodes parameter LD = 7'b_, SD = 7'b_, BEQ = 7'b_, NOP = 3'h_3, op = 7'b_; inpt clock; reg [63:], Regs[:3], IDA, IDB, EB, EOt, EVale; reg [3:] Iemory[:3], Demory[:3], // separate memories IFIDIR, IDIR, EIR, EIR; // pipeline s wire [:] IFIDrs, IFIDrs, IDrs, IDrs, Erd, Erd; // Access fields wire [6:] IDop, Eop, Eop; // Access opcodes wire [63:] Ain, Bin; // the inpts // declare the bypass signals wire bypassafrome, bypassafromin, bypassbfrome, bypassbfromin, bypassafromldin, bypassbfromldin; assign IFIDrs = IFIDIR[9:5]; assign IFIDrs = IFIDIR[:]; assign IDop = IDIR[6:]; assign IDrs = IDIR[9:5]; assign IDrs = IDIR[:]; assign Eop = EIR[6:]; assign Erd = EIR[:7]; assign Eop = EIR[6:]; assign Erd = EIR[:7]; // The bypass to inpt A from the E stage for an operation assign bypassafrome = (IDrs == Erd) && (IDrs!= ) && (Eop == op); // The bypass to inpt B from the E stage for an operation assign bypassbfrome = (IDrs == Erd) && (IDrs!= ) && (Eop == op); // The bypass to inpt A from the stage for an operation assign bypassafromin = (IDrs == Erd) && (IDrs!= ) && (Eop == op); // The bypass to inpt B from the stage for an operation assign bypassbfromin = (IDrs == Erd) && (IDrs!= ) && (Eop == op); // The bypass to inpt A from the stage for an LD operation assign bypassafromldin = (IDrs == Erd) && (IDrs!= ) && (Eop == LD); // The bypass to inpt B from the stage for an LD operation assign bypassbfromldin = (IDrs == Erd) && (IDrs!= ) && (Eop == LD); // The A inpt to the is bypassed from E if there is a bypass there, // Otherwise from if there is a bypass there, and otherwise comes from the ID assign Ain = bypassafrome? EOt : (bypassafromin bypassafromldin)? EVale : IDA; // The B inpt to the is bypassed from E if there is a bypass there, // Otherwise from if there is a bypass there, and otherwise comes from the ID FIGURE e.3. A behavioral definition of the five-stage RISC-V pipeline with bypassing to operations and address calclations. The code added to Figre e.3. to handle bypassing is highlighted. Becase these bypasses only reqire changing where the inpts come from, the only changes reqired are in the combinational logic responsible for selecting the inpts. (contines on net page)

5 .3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage 35.e5 assign Bin = bypassbfrome? EOt : (bypassbfromin bypassbfromldin)? EVale: IDB; integer i; // sed to initialize s initial begin = ; IFIDIR = NOP; IDIR = NOP; EIR = NOP; EIR = NOP; // pt NOPs in pipeline s for (i=;i<=3;i=i+) Regs[i] = i; // initialize s--jst so they aren't cares // Remember that ALL these actions happen every pipe stage and with the se of <= they happen in parallel! clock) begin // first instrction in the pipeline is being fetched // Fetch & increment IFIDIR <= Iemory[ >> ]; <= + ; // second instrction in pipeline is fetching s IDA <= Regs[IFIDrs]; IDB <= Regs[IFIDrs]; // get two s IDIR <= IFIDIR; // pass along IR--can happen anywhere, since this affects net stage only! // third instrction is doing address calclation or operation if (IDop == LD) EOt <= IDA + {{53{IDIR[3]}}, IDIR[3:]}; else if (IDop == SD) EOt <= IDA + {{53{IDIR[3]}}, IDIR[3:5], IDIR[:7]}; else if (IDop == op) case (IDIR[3:5]) // case for the varios R-type instrctions : EOt <= Ain + Bin; // add operation defalt: ; // other R-type operations: sbtract, SLT, etc. case EIR <= IDIR; EB <= IDB; // pass along the IR & B // em stage of pipeline if (Eop == op) EVale <= EOt; // pass along reslt else if (Eop == LD) EVale <= Demory[EOt >> ]; else if (Eop == SD) Demory[EOt >> ] <= EB; //store EIR <= EIR; // pass along IR // stage if (((Eop == LD) (Eop == op)) && (Erd!= )) // pdate s if load/ operation and destination not Regs[Erd] <= EVale; modle FIGURE e.3. A behavioral definition of the five-stage RISC-V pipeline with bypassing to operations and address calclations. (Contined)

6 modle RISCVCPU (clock); // opcodes parameter LD = 7'b_, SD = 7'b_, BEQ = 7'b_, NOP = 3'h_3, op = 7'b_; inpt clock; reg [63:], Regs[:3], IDA, IDB, EB, EOt, EVale; reg [3:] Iemory[:3], Demory[:3], // separate memories IFIDIR, IDIR, EIR, EIR; // pipeline s wire [:] IFIDrs, IFIDrs, IDrs, IDrs, Erd, Erd; // Access fields wire [6:] IDop, Eop, Eop; // Access opcodes wire [63:] Ain, Bin; // the inpts // declare the bypass signals wire bypassafrome, bypassafromin, bypassbfrome, bypassbfromin, bypassafromldin, bypassbfromldin; wire stall; // stall signal assign IFIDrs = IFIDIR[9:5]; assign IFIDrs = IFIDIR[:]; assign IDop = IDIR[6:]; assign IDrs = IDIR[9:5]; assign IDrs = IDIR[:]; assign Eop = EIR[6:]; assign Erd = EIR[:7]; assign Eop = EIR[6:]; assign Erd = EIR[:7]; // The bypass to inpt A from the E stage for an operation assign bypassafrome = (IDrs == Erd) && (IDrs!= ) && (Eop == op); // The bypass to inpt B from the E stage for an operation assign bypassbfrome = (IDrs == Erd) && (IDrs!= ) && (Eop == op); // The bypass to inpt A from the stage for an operation assign bypassafromin = (IDrs == Erd) && (IDrs!= ) && (Eop == op); // The bypass to inpt B from the stage for an operation assign bypassbfromin = (IDrs == Erd) && (IDrs!= ) && (Eop == op); // The bypass to inpt A from the stage for an LD operation assign bypass AfromLDin = (IDrs == Erd) && (IDrs!= ) && (Eop == LD); // The bypass to inpt B from the stage for an LD operation assign bypassbfromldin = (IDrs == Erd) && (IDrs!= ) && (Eop == LD); // The A inpt to the is bypassed from E if there is a bypass there, // Otherwise from if there is a bypass there, and otherwise comes from the ID assign Ain = bypassafrome? EOt : (bypassafromin bypassafromldin)? EVale : IDA; // The B inpt to the is bypassed from E if there is a bypass there, // Otherwise from if there is a bypass there, and otherwise comes from the ID assign Bin = bypassbfrome? EOt : (bypassbfromal Uin bypassbfromldin)? EVale: IDB; FIGURE e.3.3 A behavioral definition of the five-stage RISC-V pipeline with stalls for loads when the destination is an instrction or effective address calclation. The changes from Figre e.3. are highlighted. (contines on net page)

7 // The signal for detecting a stall based on the se of a reslt from LW assign stall = (Eop == LD) && ( // sorce instrction is a load (((IDop == LD) (IDop == SD)) && (IDrs == Erd)) // stall for address calc ((IDop == op) && ((IDrs == Erd) (IDrs == Erd)))); // se integer i; // sed to initialize s initial begin = ; IFIDIR = NOP; IDIR = NOP; EIR = NOP; EIR = NOP; // pt NOPs in pipeline s for (i=;i<=3;i=i+) Regs[i] = i; // initialize s--jst so they aren't cares // Remember that ALL these actions happen every pipe stage and with the se of <= they happen in parallel! clock) begin if (~stall) begin // the first three pipeline stages stall if there is a load hazard // first instrction in the pipeline is being fetched // Fetch & increment IFIDIR <= Iemory[ >> ]; <= + ; // second instrction in pipeline is fetching s IDA <= Regs[IFIDrs]; IDB <= Regs[IFIDrs]; // get two s IDIR <= IFIDIR; // pass along IR--can happen anywhere, since this affects net stage only! // third instrction is doing address calclation or operation if (IDop == LD) EOt <= IDA + {{53{IDIR[3]}}, IDIR[3:]}; else if (IDop == SD) EOt <= IDA + {{53{IDIR[3]}}, IDIR[3:5], IDIR[:7]}; else if (IDop == op) case (IDIR[3:5]) // case for the varios R-type instrctions : EOt <= Ain + Bin; // add operation defalt: ; // other R-type operations: sbtract, SLT, etc. case EIR <= IDIR; EB <= IDB; // pass along the IR & B else EIR <= NOP; // Freeze first three stages of pipeline; inject a nop into the otpt // em stage of pipeline if (Eop == op) EVale <= EOt; // pass along reslt else if (Eop == LD) EVale <= Demory[EOt >> ]; else if (Eop == SD) Demory[EOt >> ] <= EB; //store EIR <= EIR; // pass along IR // stage if (((Eop == LD) (Eop == op)) && (Erd!= )) // pdate s if load/ operation and destination not Regs[Erd] <= EVale; modle FIGURE e.3.3 A behavioral definition of the five-stage RISC-V pipeline with stalls for loads when the destination is an instrction or effective address calclation. (Contined)

8 35.e8.3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage Check Yorself Someone has asked abot the possibility of hazards occrring throgh, contrary to throgh a. Which of the following statements abot sch hazards is tre?. Since accesses only occr in the E stage, all operations are done in the same order as instrction eection, making sch hazards impossible in this pipeline.. Sch hazards are possible in this pipeline; we jst have not discssed them yet. 3. No pipeline can ever have a hazard involving, since it is the programmer s job to keep the order of references accrate.. emory hazards may be possible in some pipelines, bt they cannot occr in this particlar pipeline. 5. Althogh the pipeline control wold be obligated to maintain ordering among references to avoid hazards, it is impossible to design a pipeline where the references cold be ot of order. Implementing the Branch Hazard Logic in Verilog We can et or Verilog behavioral model to implement the control for branches. We add the code to model branch eqal sing a predict not taken strategy. The Verilog code is shown in Figre e.3.. It implements the branch hazard by detecting a taken branch in ID and sing that signal to sqash the instrction in IF (by setting the IR to 3, which is an effective NOP in RISC-V); in addition, the is assigned to the branch target. Note that to prevent an nepected latch, it is important that the is clearly assigned on every path throgh the always block; hence, we assign the in a single if statement. Lastly, note that althogh Figre e.3. incorporates the basic logic for branches and control hazards, spporting branches reqires additional bypassing and hazard detection, which we have not inclded. Using Verilog for Behavioral Specification with Synthesis To demonstrate the contrasting types of Verilog, we show two descriptions of a different, nonpipelined implementation style of RISC-V that ses mltiple clock cycles per instrction. (Since some instrctors make a synthesizable description of the RISC-V pipeline project for a class, we chose not to inclde it here. It wold also be long.) Figre e.3.5 gives a behavioral specification of a mlticycle implementation of the RISC-V processor. Becase of the se of behavioral operations, it wold be difficlt to synthesize a separate path and control nit with any reasonable efficiency. This version demonstrates another approach to the control by sing a ealy finite-state machine (see discssion in Section A. of Appi A ). The se of a ealy machine, which allows the otpt to dep both on inpts and the crrent state, allows s to decrease the total nmber of states.

9 modle RISCVCPU (clock); // opcodes parameter LD = 7'b_, SD = 7'b_, BEQ = 7'b_, NOP = 3'h_3, op = 7'b_; inpt clock; reg [63:], Regs[:3], IDA, IDB, EB, EOt, EVale; reg [3:] Iemory[:3], Demory[:3], // separate memories IFIDIR, IDIR, EIR, EIR; // pipeline s wire [:] IFIDrs, IFIDrs, IDrs, IDrs, Erd, Erd; // Access fields wire [6:] IFIDop, IDop, Eop, Eop; // Access opcodes wire [63:] Ain, Bin; // the inpts // declare the bypass signals wire bypassafrome, bypassafromin, bypassbfrome, bypassbfromin, bypassafromldin, bypassbfromldin; wire stall; // stall signal wire takebranch; assign IFIDop = IFIDIR[6:]; assign IFIDrs = IFIDIR[9:5]; assign IFIDrs = IFIDIR[:]; assign IDop = IDIR[6:]; assign IDrs = IDIR[9:5]; assign IDrs = IDIR[:]; assign Eop = EIR[6:]; assign Erd = EIR[:7]; assign Eop = EIR[6:]; assign Erd = EIR[:7]; // The bypass to inpt A from the E stage for an operation assign bypassafrome = (IDrs == Erd) && (IDrs!= ) && (Eop == op); // The bypass to inpt B from the E stage for an operation assign bypassbfrome = (IDrs == Erd) && (IDrs!= ) && (Eop == op); // The bypass to inpt A from the stage for an operation assign bypas safromin = (IDrs == Erd) && (IDrs!= ) && (Eop == op); // The bypass to inpt B from the stage for an operation assign bypassbfromin = (IDrs == Erd) && (IDrs!= ) && (Eop == op); // The bypass to inpt A from the stage for an LD operation assign bypassafromldin = (IDrs == Erd) && (IDrs!= ) && (Eop == LD); // The bypass to inpt B from the stage for an LD operation assign bypassbfromldin = (IDrs == Erd) && (ID rs!= ) && (Eop == LD); // The A inpt to the is bypassed from E if there is a bypass there, // Otherwise from if there is a bypass there, and otherwise comes from the ID assign Ain = bypassafrome? EOt : (bypassafromin bypassafromldin)? EVale : IDA; // The B inpt to the is bypassed from E if there is a bypass there, // Otherwise from if there is a bypass there, and otherwise comes from the ID assign Bin = bypassbfrome? EOt : (bypassbfromin bypassbfromldin)? EVale: FIGURE e.3. A behavioral definition of the five-stage RISC-V pipeline with stalls for loads when the destination is an instrction or effective address calclation. The changes from Figre e.3. are highlighted. (contines on net page)

10 IDB; // The signal for detecting a stall based on the se of a reslt from LW assign stall = (Eop == LD) && ( // sorce instrction is a load (((IDop == LD) (IDop == SD)) && (IDrs == Erd)) // stall for address calc ((IDop == op) && ((IDrs == Erd) (IDrs == Erd)))); // se // Signal for a taken branch: instrction is BEQ and s are eqal assign takebranch = (IFIDop == BEQ) && (Regs[IFIDrs] == Regs[IFIDrs]); integer i; // sed to initialize s initial begin = ; IFIDIR = NOP; IDIR = NOP; EIR = NOP; EIR = NOP; // pt NOPs in pipeline s for (i=;i<=3;i=i+) Regs[i] = i; // initialize s--jst so they aren't cares // Remember that ALL these actions happen every pipe stage and with the se of <= they happen in parallel! clock) begin if (~stall) begin // the first three pipeline stages stall if there is a load hazard if (~takebranch) begin // first instrction in the pipeline is being fetched normally IFIDIR <= Iemory[ >> ]; <= + ; else begin // a taken branch is in ID; instrction in IF is wrong; insert a NOP and reset the IFIDIR <= NOP; <= + {{5{IFIDIR[3]}}, IFIDIR[7], IFIDIR[3:5], IFIDIR[:8], 'b}; // second instrction in pipeline is fetching s IDA <= Regs[IFIDrs]; IDB <= Regs[IFIDrs]; // get two s IDIR <= IFIDIR; // pass along IR--can happen anywhere, since this affects net stage only! // third instrction is doing addre ss calclation or operation if (IDop == LD) EOt <= IDA + {{53{IDIR[3]}}, IDIR[3:]}; else if (IDop == SD) EOt <= IDA + {{53{IDIR[3]}}, IDIR[3:5], IDIR[:7]}; else if (IDop == op) case (IDIR[3:5]) // case for the varios R-type instrctions : EOt <= Ain + Bin; // add operation FIGURE e.3. A behavioral definition of the five-stage RISC-V pipeline with stalls for loads when the destination is an instrction or effective address calclation. (Contined)

11 .3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage 35.e defalt: ; // other R-type operations: sbtract, SLT, etc. case EIR <= IDIR; EB <= IDB; // pass along the IR & B else EIR <= NOP; // Freeze first three stages of pipeline; inject a nop into the otpt // em stage of pipeline if (Eop == op) EVale <= EOt; // pass along reslt else if (Eop == LD) EVale <= Demory[EOt >> ]; else if (Eop == SD) Demory[EOt >> ] <= EB; //store EIR <= EIR; // pass along IR // stage if (((Eop == LD) (Eop == op)) && (E rd!= )) // pdate s if load/ operation and destination not Regs[Erd] <= EVale; modle FIGURE e.3. A behavioral definition of the five-stage RISC-V pipeline with stalls for loads when the destination is an instrction or effective address calclation. (Contined) Since a version of the RISC-V design inted for synthesis is considerably more comple, we have relied on a nmber of Verilog modles that were specified in Appi A, inclding the following: The -to- mltipleor shown in Figre A.., and the -to- mltipleor that can be trivially derived based on the -to- mltipleor. The RISC-V shown in Figre A.5.5. The RISC-V control defined in Figre A.5.6. The RISC-V file defined in Figre A.8.. Now, let s look at a Verilog version of the RISC-V processor inted for synthesis. Figre e.3.6 shows the strctral version of the RISC-V path. Figre e.3.7 ses the path modle to specify the RISC-V CPU. This version also demonstrates another approach to implementing the control nit, as well as some optimizations that rely on relationships between varios control signals. Observe that the state machine specification only provides the seqencing actions. The setting of the control lines is done with a series of assign statements that dep on the state as well as the opcode field of the instrction. If one were to fold the setting of the control into the state specification, this wold look like a ealy-style finite-state control nit. Becase the setting of the control lines is specified sing assign statements otside of the always block, most logic synthesis systems will generate a small implementation of a finite-state machine

12 35.e.3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage modle RISCVCPU (clock); parameter LD = 7'b_, SD = 7'b_, BEQ = 7'b_, op = 7'b_; inpt clock; //the clock is an eternal inpt // The architectrally visible s and scratch s for implementation reg [63:], Regs[:3], Ot, DR, A, B; reg [3:] emory [:3], IR; reg [:] state; // processor state wire [6:] opcode; // se to get opcode easily wire [63:] ImmGen; // sed to generate immediate assign opcode = IR[6:]; // opcode is lower 7 bits assign ImmGen = (opcode == LD)? {{53{IR[3]}}, IR[3:]} : /* (opcode == SD) */{{53{IR[3]}}, IR[3:5], IR[:7]}; assign Offset = {{5{IR[3]}}, IR[7], IR[3:5], IR[:8], 'b}; // set the to and start the control in state initial begin = ; state = ; // The state machine--triggered on a rising clock clock) begin Regs[] <= ; // shortct way to make sre R is always case (state) //action deps on the state : begin // first step: fetch the instrction, increment, go to net state IR <= emory[ >> ]; <= + ; state <= ; // net state : begin // second step: decode, fetch, also compte branch address A <= Regs[IR[9:5]]; B <= Regs[IR[:]]; Ot <= + Offset; // compte -relative branch target state <= 3; 3: begin // third step: Load-store eection, eection, Branch completion if ((opcode == LD) (opcode == SD)) begin Ot <= A + ImmGen; // compte effective address state <= ; else if (opcode == op) begin case (IR[3:5]) // case for the varios R-type instrctions : Ot <= A + B; // add operation defalt: ; // other R-type operations: sbtract, SLT, etc. case state <= ; else if (opcode == BEQ) begin if (A == B) begin <= Ot; // branch taken--pdate FIGURE e.3.5 A behavioral specification of the mlticycle RISC-V design. This has the same cycle behavior as the mlticycle design, bt is prely for simlation and specification. It cannot be sed for synthesis. (contines on net page)

13 .3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage 35.e3 state <= ; else ; // other opcodes or eception for ndefined instrction wold go here : begin if (opcode == op) begin // Operation Regs[IR[:7]] <= Ot; // write the reslt state <= ; // R-type finishes else if (opcode == LD) begin // load instrction DR <= emory[ot >> ]; // read the state <= 5; // net state else if (opcode == SD) begin // store instrction emory[ot >> ] <= B; // write the state <= ; // retrn to state else ; // other instrctions go here 5: begin // LD is the only instrction still in eection Regs[IR[:7]] <= DR; // write the DR to the state <= ; // complete an LD instrction case modle FIGURE e.3.5 A behavioral specification of the mlticycle RISC-V design. (Contined) that determines the setting of the state and then ses eternal logic to derive the control inpts to the path. In writing this version of the control, we have also taken advantage of a nmber of insights abot the relationship between varios control signals as well as sitations where we don t care abot the control signal vale; some eamples of these are given in the following elaboration. ore Illstrations of Eection on the Hardware To redce the cost of this book, starting with the third edition, we moved sections and figres that were sed by a minority of instrctors online. This sbsection recaptres those figres for readers who wold like more spplemental material to nderstand pipelining better. These are all single-clock-cycle pipeline diagrams, which take many figres to illstrate the eection of a seqence of instrctions. The three eamples are respectively for code with no hazards, an eample of forwarding on the pipelined implementation, and an eample of bypassing on the pipelined implementation.

14 modle path (Op, emtoreg, em, em, IorD, Reg, IR,, Cond, SrcA, SrcB, Sorce, opcode, clock); // the control inpts + clock parameter LD = 7'b_, SD = 7'b_; inpt [:] Op, SrcB; // -bit control signals inpt emtoreg, em, em, IorD, Reg, IR,, Cond, SrcA, Sorce, clock; // -bit control signals otpt [6:] opcode; // opcode is needed as an otpt by control reg [63:], DR, Ot; // CPU state + some temporaries reg [3:] emory[:3], IR; // CPU state + some temporaries wire [63:] A, B, SignEtOffset, Offset, ResltOt, Vale, JmpAddr,, Ain, Bin, emot; // these are signals derived from s wire [3:] Ctl; // the control lines wire Zero; // the Zero ot signal from the initial = ; //start the at //Combinational signals sed in the path // sing word address with either Ot or as the address sorce assign emot = em? emory[(iord? Ot : ) >> ] : ; assign opcode = IR[6:]; // opcode shortct // Get the write either from the Ot or from the DR assign = emtoreg? DR : Ot; // Generate immediate assign ImmGen = (opcode == LD)? {{53{IR[3]}}, IR[3:]} : /* (opcode == SD) */{{53{IR[3]}}, IR[3:5], IR[:7]}; // Generate pc offset for branches assign Offset = {{5{IR[3]}}, IR[7], IR[3:5], IR[:8], 'b}; // The A inpt to the is either the rs or the assign Ain = SrcA? A : ; // inpt is or A // Creates an instance of the control nit (see the modle defined in Figre B.5.6 // Inpt Op is control-nit set and sed to describe the instrction class as in Chapter // Inpt IR[3:5] is the fnction code field for an instrction // Otpt Ctl are the actal control bits as in Chapter alcontroller (Op, IR[3:5], Ctl); // control nit // Creates a -to- mltipleor sed to select the sorce of the net // Inpts are ResltOt (the incremented ), Ot (the branch address) // Sorce is the selector inpt and Vale is the mltipleor otpt ltto src (ResltOt, Ot, Sorce, Vale); // Creates a -to- mltipleor sed to select the B inpt of the // Inpts are B, constant, generated immediate, offset // SrcB is the select or inpt // Bin is the mltipleor otpt ltto Binpt (B, 6'd, ImmGen, Offset, SrcB, Bin); // Creates a RISC-V // Inpts are Ctl (the control), vale inpts (Ain, Bin) // Otpts are ResltOt (the 6-bit otpt) and Zero (zero detection otpt) RISCV (Ctl, Ain, Bin, ResltOt, Zero); // the FIGURE e.3.6 A Verilog version of the mlticycle RISC-V path that is appropriate for synthesis. This path relies on several nits from Appi A. Initial statements do not synthesize, and a version sed for synthesis wold have to incorporate a reset signal that had this effect. Also note that resetting R to on every clock is not the best way to ensre that R stays at ; instead, modifying the file modle to prodce whenever R is read and to ignore writes to R wold be a more efficient soltion. (contines on net page)

15 .3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage 35.e5 // Creates a RISC-V file // Inpts are the rs and rs fields of the IR sed to specify which s to read, // reg (the write nmber), (the to be written), // Reg (indicates a write), the clock // Otpts are A and B, the s read file regs (IR[9:5], IR[:], IR[:7],, Reg, A, B, clock); // Register file // The clock-triggered actions of the path clock) begin if (em) emory[ot >> ] <= B; // --mst be a store Ot <= ResltOt; // Save the reslt for se on a later clock cycle if (IR) IR <= emot; // the IR if an instrction fetch DR <= emot; // Always save the read vale // The is written both conditionally (controlled by ) and nconditionally modle FIGURE e.3.6 A Verilog version of the mlticycle RISC-V path that is appropriate for synthesis. (Contined) No Hazard Illstrations On page 85, we gave the eample code seqence ld sb add ld add, (),, 3, 3, 3, 8(), 5, 6 Figres e. and e.3 showed the mltiple-clock-cycle pipeline diagrams for this two-instrction seqence eecting across si clock cycles. Figres e.3.8 throgh e.3. show the corresponding single-clock-cycle pipeline diagrams for these two instrctions. Note that the order of the instrctions differs between these two types of diagrams: the newest instrction is at the bottom and to the right of the mltiple-clockcycle pipeline diagram, and it is on the left in the single-clock-cycle pipeline diagram. ore Eamples To nderstand how pipeline control works, let s consider these five instrctions going throgh the pipeline: ld sb and or add, (),, 3,, 5 3, 6, 7, 8, 9

16 35.e6.3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage modle RISCVCPU (clock); parameter LD = 7'b_, SD = 7'b_, BEQ = 7'b_, op = 7'b_; inpt clock; reg [:] state; wire [:] Op, SrcB; wire [6:] opcode; wire emtoreg, em, em, IorD, Reg, IR,, Cond, SrcA, Sorce, emoryop; // Create an instance of the RISC-V path, the inpts are the control signals; opcode is only otpt path RISCVDP (Op, emtoreg, em, em, IorD, Reg, IR,, Cond, SrcA, SrcB, Sorce, opcode, clock); initial begin state = ; // start the state machine in state // These are the definitions of the control signals assign emoryop = (opcode == LD) (opcode == SD); // a operation assign Op = ((state == ) (state == ) ((state == 3) && emoryop))? 'b : // add ((state == 3) && (opcode == BEQ))? 'b : 'b; // sbtract or se fnction code assign emtoreg = ((state == ) && (opcode == op))? : ; assign em = (state == ) ((state == ) && (opcode == LD)); assign em = (state == ) && (opcode == SD); assign IorD = (state == )? : ; assign Reg = (state == 5) ((state == ) && (opcode == op)); assign IR = (state == ); assign = (state == ); assign Cond = (state == 3) && (opcode == BEQ); assign SrcA = ((state == ) (state == ))? : ; assign SrcB = ((state == ) ((state == 3) && (opcode == BEQ)))? 'b : (state == )? 'b : ((state == 3) && emoryop)? 'b : 'b; // operation or other assign Sorce = (state == )? : ; // Here is the state machine, which only has to seqence states clock) begin // all state pdates on a positive clock edge case (state) : state <= ; // nconditional net state : state <= 3; // nconditional net state 3: state <= (opcode == BEQ)? : ; // branch go back else net state : state <= (opcode == LD)? 5 : ; // R-type and SD finish 5: state <= ; // go back case modle FIGURE e.3.7 The RISC-V CPU sing the path from Figre e.3.6.

17 .3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage 35.e7 ld, () fetch /E E/ Add Add Sm 3 Imm Gen 6 Shift left Zero reslt Clock sb,, 3 ld, () fetch decode /E E/ Add 3 Imm Gen 6 Shift left Add Sm Zero reslt Clock FIGURE e.3.8 Single-cycle pipeline diagrams for clock cycles (top diagram) and (bottom diagram). This style of pipeline representation is a snapshot of every instrction eecting dring one clock cycle. Or eample has bt two instrctions, so at most two stages are identified in each clock cycle; normally, all five stages are occpied. The highlighted portions of the path are active in that clock cycle. The load is fetched in clock cycle and decoded in clock cycle, with the sbtract fetched in the second clock cycle. To make the figres easier to nderstand, the other pipeline stages are empty, bt normally there is an instrction in every pipeline stage.

18 35.e8.3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage sb,, 3 decode ld, () Eection /E E/ Add Add Sm 3 Imm Gen 6 Shift left Zero reslt Clock 3 sb,, 3 Eection ld, () emory /E E/ Add Shift left Add Sm Zero reslt 3 Imm Gen 6 Clock FIGURE e.3.9 Single-cycle pipeline diagrams for clock cycles 3 (top diagram) and (bottom diagram). In the third clock cycle in the top diagram, ld enters the stage. At the same time, sb enters ID. In the forth clock cycle (bottom path), ld moves into E stage, reading sing the address fond in /E at the beginning of clock cycle. At the same time, the sbtracts and then places the difference into /E at the of the clock cycle.

19 .3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage 35.e9 sb,, 3 emory ld, () back /E E/ Add Add Sm 3 Imm Gen 6 Shift left Zero reslt Clock 5 sb,, 3 back /E E/ Add 3 Imm Gen 6 Shift left Add Sm Zero reslt Clock 6 FIGURE e.3. Single-cycle pipeline diagrams for clock cycles 5 (top diagram) and 6 (bottom diagram). In clock cycle 5, ld completes by writing the in E/ into, and sb ss the difference in /E to E/. In the net clock cycle, sb writes the vale in E/ to.

20 35.e.3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage Figres e.3. throgh e.3.5 show these instrctions proceeding throgh the nine clock cycles it takes them to complete eection, highlighting what is active in a stage and identifying the instrction associated with each stage dring a clock cycle. If yo eamine them careflly, yo may notice: In Figre e.3.3 yo can see the seqence of the destination nmbers from left to right at the bottom of the pipeline s. The nmbers advance to the right dring each clock cycle, with the E/ pipeline spplying the nmber of the written dring the stage. When a stage is inactive, the vales of control lines that are deasserted are shown as or X (for don t care). Seqencing of control is embedded in the pipeline strctre itself. First, all instrctions take the same nmber of clock cycles, so there is no special control for instrction dration. Second, all control information is compted dring instrction decode and then passed along by the pipeline s. Forwarding Illstrations We can se the single-clock-cycle pipeline diagrams to show how forwarding operates, as well as how the control activates the forwarding paths. Consider the following code seqence in which the depences have been highlighted: sb,, 3 and,, 5 or,, add 9,, Figres e.3.6 and e.3.7 show the events in clock cycles 3 6 in the eection of these instrctions. Ths, in clock cycle 5, the forwarding nit selects the /E pipeline for the pper inpt to the and the E/ pipeline for the lower inpt to the. The following add instrction reads both, the target of the and instrction, and, which the sb instrction has already written. Notice that the prior two instrctions both write, so the forwarding nit mst pick the immediately preceding one (E stage). In clock cycle 6, the forwarding nit ths selects the /E pipeline, containing the reslt of the or instrction, for the pper inpt bt ses the non-forwarding vale for the lower inpt to the. Illstrating Pipelines with Stalls and Forwarding We can se the single-clock-cycle pipeline diagrams to show how the control for stalls works. Figres e.3.8 throgh e.3. show the single-cycle diagram for clocks throgh 7 for the following code seqence (depences highlighted): ld and or add, (),, 5,, 9,,

21 .3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage 35.e IF: ld, () ID: before<> : before<> E: before<3> : before<> /E E/ Add Clock Reg [3, ] [ 7] Shift left [3 ] Imm Gen control Add Sm Src Zero reslt Op Branch em em emtoreg IF: sb,, 3 ID: ld, () : before<> E: before<> : before<3> /E E/ ld Add Clock X Reg [3 ] Sign- et [3, ] [ 7] X 3 Shift left Add Sm control Src Zero reslt Op Branch em em emtoreg FIGURE e.3. Clock cycles and. The phrase before <i> means the i th instrction before ld. The ld instrction in the top path is in the IF stage. At the of the clock cycle, the ld instrction is in the pipeline s. In the second clock cycle, seen in the bottom path, the ld moves to the ID stage, and sb enters in the IF stage. Note that the vales of the instrction fields and the selected sorce s are shown in the ID stage. Hence, and the constant, the operands of ld, are written into the pipeline. The nmber, representing the destination nmber of ld, is also placed in. The top of the pipeline shows the control vales for ld to be sed in the remaining stages. These control vales can be read from the ld row of the table in Figre e.8.

22 35.e.3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage IF: and,, 5 ID: sb,, 3 : ld,... E: before<> : before<> sb /E E/ Add Clock 3 3 Reg [3 ] [3, ] [ 7] 3 Imm Gen X 8 Shift left 3 Add Sm Src Zero reslt control Op Branch em em emtoreg IF: or 3, 6, 7 ID: and,, 5 : sb,... E: ld,... : before<> /E E/ and Add Clock 5 Reg [3 ] [3, ] [ 7] Imm Gen X 7 5 Shift left 3 8 Add Sm Src control Zero reslt Op Branch em em emtoreg FIGURE e.3. Clock cycles 3 and. In the top diagram, ld enters the stage in the third clock cycle, adding and to form the address in the /E pipeline. (The ld instrction is written ld, pon reaching, becase the identity of instrction operands is not needed by or the sbseqent stages. In this version of the pipeline, the actions of, E, and dep only on the instrction and its destination or its target address.) At the same time, sb enters ID, reading s and 3, and the and instrction starts IF. In the forth clock cycle (bottom path), ld moves into E stage, reading sing the vale in / E as the address. In the same clock cycle, the sbtracts 3 from and places the difference into /E, reads s and 5 dring ID, and the or instrction enters IF. The two diagrams show the control signals being created in the ID stage and peeled off as they are sed in sbseqent pipe stages.

23 .3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage 35.e3 IF: add, 8, 9 ID: or 3, 6, 7 : and,... E: sb,... : ld,... /E E/ or Add Clock Reg [3 ] [3, ] [ 7] 6 7 Imm Gen X 6 Shift left Add Sm Src Zero reslt control Op Branch em em emtoreg IF: after<> ID: add, 8, 9 : or 3,... E: and,... : sb,... /E E/ add Add Clock Reg [3 ] [3, ] [ 7] Imm Gen X 8 9 Shift left Add Sm Src control Zero reslt Op Branch em 3 em emtoreg FIGURE e.3.3 Clock cycles 5 and 6. Wit h add, the final instrction in this eample, entering IF in the top path, all instrctions are engaged. By writing the in E/ into, ld completes; both the and the nmber are in E/. In the same clock cycle, sb ss the difference in /E to E/, and the rest of the instrctions move forward. In the net clock cycle, sb selects the vale in E/ to write to nmber, again fond in E/. The remaining instrctions play follow-theleader: the calclates the OR of 6 and 7 for the or instrction in the stage, and s 8 and 9 are read in the ID stage for the add instrction. The instrctions after add are shown as inactive jst to emphasize what occrs for the five instrctions in the eample. The phrase after <i> means the i th instrction after add.

24 35.e.3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage IF: after<> ID: after<> : add,... E: or 3,... : and,... /E E/ Add Clock 7 Reg [3 ] control Imm Gen [3, ] [ 7] Shift left 8 9 Add Sm Src Zero reslt Op Branch em em 3 emtoreg IF: after<3> ID: after<> : after<> E: add,... : or 3,... /E E/ Add Clock 8 3 Reg [3 ] [3, ] Imm Gen Shift left Add Sm Src control Zero reslt Branch em Op [ 7] 3 em emtoreg FIGURE e.3. Clock cycles 7 and 8. In the top path, the add instrction brings p the rear, adding the vales corresponding to s 8 and 9 dring the stage. The reslt of the or instrction is passed from /E to E/ in the E stage, and the stage writes the reslt of the and instrction in E/ to. Note that the control signals are deasserted (set to ) in the ID stage, since no instrction is being eected. In the following clock cycle (lower drawing), the stage writes the reslt to 3, thereby completing or, and the E stage passes the sm from the add in /E to E/. The instrctions after add are shown as inactive for pedagogical reasons.

25 .3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage 35.e5 IF: after<> ID: after<3> : after<> E: after<> : add,... /E E/ Add Clock 9 Reg [3 ] [3, ] Imm Gen Shift left Add Sm control Src Zero reslt Branch em Op [ 7] em emtoreg FIGURE e.3.5 Clock cycle 9. The stage writes the reslt in E/ into, completing add and the fiveinstrction seqence. The instrctions after add are shown as inactive for pedagogical reasons.

26 35.e6.3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage or,, and,, 5 sb,, 3 before<> before<> /E E/ Forwarding nit Clock 3 add 9,, or,, and,, 5 sb X,... before<> /E E/ 5 5 Forwarding nit Clock FIGURE e.3.6 Clock cycles 3 and of the instrction seqence on page 366.e6. The bold lines are those active in a clock cycle, and the italicized nmbers in color indicate a hazard. The forwarding nit is highlighted by shading it when it is forwarding to the. The instrctions before sb are shown as inactive jst to emphasize what occrs for the for instrctions in the eample. Operand names are sed in for control of forwarding; ths they are inclded in the instrction label for. Operand names are not needed in E or, so is sed. Compare this with Figres e.3. throgh e.3.5, which show the path withot forwarding where ID is the last stage to need operand information.

27 .3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage 35.e7 after<> add 9,, or,, and,... sb,.. /E E/ 9 Forwarding nit Clock 5 after<> after<> add 9,, or,... and,.. /E E/ 9 Forwarding nit Clock 6 FIGURE e.3.7 Clock cycles 5 and 6 of the instrction seqence on page 366.e6. The forwarding nit is highlighted when it is forwarding to the. The two instrctions after add are shown as inactive jst to emphasize what occrs for the for instrctions in the eample. The bold lines are those active in a clock cycle, and the italicized nmbers in color indicate a hazard.

28 35.e8.3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage and,, 5 ld, () before<> before<> before<3> X Hazard detection nit.em /E E/ X XX X.RegisterRd Forwarding nit Clock or,, and,, 5 5 Hazard detection nit.em ld, () before<> before<> /E E/ 5 5 XX 5 X.RegisterRd Forwarding nit Clock 3 FIGURE e.3.8 Clock cycles and 3 of the instrction seqence on page 366.e6 with a load replacing sb. The bold lines are those active in a clock cycle, the italicized nmbers in color indicate a hazard, and the in the place of operands means that their identity is information not needed by that stage. The vales of the significant control lines, s, and nmbers are labeled in the figres. The and instrction wants to read the vale created by the ld instrction in clock cycle 3, so the hazard detection nit stalls the and and or instrctions. Hence, the hazard detection nit is highlighted.

29 .3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage 35.e9 or,, and,, 5 Bbble ld,... before<> 5 Hazard detection nit.em /E E/ RegisterRd Forwarding nit Clock add 9,, or,, Hazard detection nit.em and,, 5 Bbble ld,... /E E/ 5 5.RegisterRd Forwarding nit Clock 5 FIGURE e.3.9 Clock cycles and 5 of the instrction seqence on page 366.e6 with a load replacing sb. The bbble is inserted in the pipeline in clock cycle, and then the and instrction is allowed to proceed in clock cycle 5. The forwarding nit is highlighted in clock cycle 5 becase it is forwarding from ld to the. Note that in clock cycle, the forwarding nit forwards the address of the ld as if it were the contents of ; this is rered harmless by the insertion of the bbble. The bold lines are those active in a clock cycle, and the italicized nmbers in color indicate a hazard.

30 35.e3.3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage after<> add 9,, or,, and,... Bbble Hazard detection nit.em /E E/ 9.RegisterRd Forwarding nit Clock 6 after<> after<> add 9,, or,... and,... Hazard detection nit.em /E E/ 9.RegisterRd Forwarding nit Clock 7 FIGURE e.3. Clock cycles 6 and 7 of the instrction seqence on page 366.e6 with a load replacing sb. Note that nlike in Figre e.3.7, the stall allows the ld to complete, and so there is no forwarding from E/ in clock cycle 6. Register for the add in the stage still deps on the reslt from or in /E, so the forwarding nit passes the reslt to the. The bold lines show inpt lines active in a clock cycle, and the italicized nmbers indicate a hazard. The instrctions after add are shown as inactive for pedagogical reasons.

4.13. An Introduction to Digital Design Using a Hardware Design Language to Describe and Model a Pipeline and More Pipelining Illustrations

4.13. An Introduction to Digital Design Using a Hardware Design Language to Describe and Model a Pipeline and More Pipelining Illustrations .3 An Introdction to Digital Design Using a Hardware Design Langage to Describe and odel a Pipeline and ore Pipelining Illstrations This online section covers hardware description langages and then gives

More information

The extra single-cycle adders

The extra single-cycle adders lticycle Datapath As an added bons, we can eliminate some of the etra hardware from the single-cycle path. We will restrict orselves to sing each fnctional nit once per cycle, jst like before. Bt since

More information

Review Multicycle: What is Happening. Controlling The Multicycle Design

Review Multicycle: What is Happening. Controlling The Multicycle Design Review lticycle: What is Happening Reslt Zero Op SrcA SrcB Registers Reg Address emory em Data Sign etend Shift left Sorce A B Ot [-6] [5-] [-6] [5-] [5-] Instrction emory IR RegDst emtoreg IorD em em

More information

The final datapath. M u x. Add. 4 Add. Shift left 2. PCSrc. RegWrite. MemToR. MemWrite. Read data 1 I [25-21] Instruction. Read. register 1 Read.

The final datapath. M u x. Add. 4 Add. Shift left 2. PCSrc. RegWrite. MemToR. MemWrite. Read data 1 I [25-21] Instruction. Read. register 1 Read. The final path PC 4 Add Reg Shift left 2 Add PCSrc Instrction [3-] Instrction I [25-2] I [2-6] I [5 - ] register register 2 register 2 Registers ALU Zero Reslt ALUOp em Data emtor RegDst ALUSrc em I [5

More information

The single-cycle design from last time

The single-cycle design from last time lticycle path Last time we saw a single-cycle path and control nit for or simple IPS-based instrction set. A mlticycle processor fies some shortcomings in the single-cycle CPU. Faster instrctions are not

More information

Review: Computer Organization

Review: Computer Organization Review: Compter Organization Pipelining Chans Y Landry Eample Landry Eample Ann, Brian, Cathy, Dave each have one load of clothes to wash, dry, and fold Washer takes 3 mintes A B C D Dryer takes 3 mintes

More information

PART I: Adding Instructions to the Datapath. (2 nd Edition):

PART I: Adding Instructions to the Datapath. (2 nd Edition): EE57 Instrctor: G. Pvvada ===================================================================== Homework #5b De: check on the blackboard =====================================================================

More information

Solutions for Chapter 6 Exercises

Solutions for Chapter 6 Exercises Soltions for Chapter 6 Eercises Soltions for Chapter 6 Eercises 6. 6.2 a. Shortening the ALU operation will not affect the speedp obtained from pipelining. It wold not affect the clock cycle. b. If the

More information

TDT4255 Friday the 21st of October. Real world examples of pipelining? How does pipelining influence instruction

TDT4255 Friday the 21st of October. Real world examples of pipelining? How does pipelining influence instruction Review Friday the 2st of October Real world eamples of pipelining? How does pipelining pp inflence instrction latency? How does pipelining inflence instrction throghpt? What are the three types of hazard

More information

Review. A single-cycle MIPS processor

Review. A single-cycle MIPS processor Review If three instrctions have opcodes, 7 and 5 are they all of the same type? If we were to add an instrction to IPS of the form OD $t, $t2, $t3, which performs $t = $t2 OD $t3, what wold be its opcode?

More information

EEC 483 Computer Organization

EEC 483 Computer Organization EEC 483 Compter Organization Chapter 4.4 A Simple Implementation Scheme Chans Y The Big Pictre The Five Classic Components of a Compter Processor Control emory Inpt path Otpt path & Control 2 path and

More information

Chapter 6 Enhancing Performance with. Pipelining. Pipelining. Pipelined vs. Single-Cycle Instruction Execution: the Plan. Pipelining: Keep in Mind

Chapter 6 Enhancing Performance with. Pipelining. Pipelining. Pipelined vs. Single-Cycle Instruction Execution: the Plan. Pipelining: Keep in Mind Pipelining hink of sing machines in landry services Chapter 6 nhancing Performance with Pipelining 6 P 7 8 9 A ime ask A B C ot pipelined Assme 3 min. each task wash, dry, fold, store and that separate

More information

The multicycle datapath. Lecture 10 (Wed 10/15/2008) Finite-state machine for the control unit. Implementing the FSM

The multicycle datapath. Lecture 10 (Wed 10/15/2008) Finite-state machine for the control unit. Implementing the FSM Lectre (Wed /5/28) Lab # Hardware De Fri Oct 7 HW #2 IPS programming, de Wed Oct 22 idterm Fri Oct 2 IorD The mlticycle path SrcA Today s objectives: icroprogramming Etending the mlti-cycle path lti-cycle

More information

CS 251, Winter 2019, Assignment % of course mark

CS 251, Winter 2019, Assignment % of course mark CS 25, Winter 29, Assignment.. 3% of corse mark De Wednesday, arch 3th, 5:3P Lates accepted ntil Thrsday arch th, pm with a 5% penalty. (7 points) In the diagram below, the mlticycle compter from the corse

More information

Exceptions and interrupts

Exceptions and interrupts Eceptions and interrpts An eception or interrpt is an nepected event that reqires the CPU to pase or stop the crrent program. Eception handling is the hardware analog of error handling in software. Classes

More information

Computer Architecture Chapter 5. Fall 2005 Department of Computer Science Kent State University

Computer Architecture Chapter 5. Fall 2005 Department of Computer Science Kent State University Compter Architectre Chapter 5 Fall 25 Department of Compter Science Kent State University The Processor: Datapath & Control Or implementation of the MIPS is simplified memory-reference instrctions: lw,

More information

What do we have so far? Multi-Cycle Datapath

What do we have so far? Multi-Cycle Datapath What do we have so far? lti-cycle Datapath CPI: R-Type = 4, Load = 5, Store 4, Branch = 3 Only one instrction being processed in datapath How to lower CPI frther? #1 Lec # 8 Spring2 4-11-2 Pipelining pipelining

More information

Comp 303 Computer Architecture A Pipelined Datapath Control. Lecture 13

Comp 303 Computer Architecture A Pipelined Datapath Control. Lecture 13 Comp 33 Compter Architectre A Pipelined path Lectre 3 Pipelined path with Signals PCSrc IF/ ID ID/ EX EX / E E / Add PC 4 Address Instrction emory RegWr ra rb rw Registers bsw [5-] [2-6] [5-] bsa bsb Sign

More information

CS 251, Winter 2018, Assignment % of course mark

CS 251, Winter 2018, Assignment % of course mark CS 25, Winter 28, Assignment 4.. 3% of corse mark De Wednesday, arch 7th, 4:3P Lates accepted ntil Thrsday arch 8th, am with a 5% penalty. (6 points) In the diagram below, the mlticycle compter from the

More information

Chapter 3 & Appendix C Pipelining Part A: Basic and Intermediate Concepts

Chapter 3 & Appendix C Pipelining Part A: Basic and Intermediate Concepts CS359: Compter Architectre Chapter 3 & Appendi C Pipelining Part A: Basic and Intermediate Concepts Yanyan Shen Department of Compter Science and Engineering Shanghai Jiao Tong University 1 Otline Introdction

More information

Chapter 6: Pipelining

Chapter 6: Pipelining CSE 322 COPUTER ARCHITECTURE II Chapter 6: Pipelining Chapter 6: Pipelining Febrary 10, 2000 1 Clothes Washing CSE 322 COPUTER ARCHITECTURE II The Assembly Line Accmlate dirty clothes in hamper Place in

More information

1048: Computer Organization

1048: Computer Organization 48: Compter Organization Lectre 5 Datapath and Control Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A- Introdction In this lectre, we will try to implement simplified IPS which contain emory

More information

Pipelining. Chapter 4

Pipelining. Chapter 4 Pipelining Chapter 4 ake processor rns faster Pipelining is an implementation techniqe in which mltiple instrctions are overlapped in eection Key of making processor fast Pipelining Single cycle path we

More information

Hardware Design Tips. Outline

Hardware Design Tips. Outline Hardware Design Tips EE 36 University of Hawaii EE 36 Fall 23 University of Hawaii Otline Verilog: some sbleties Simlators Test Benching Implementing the IPS Actally a simplified 6 bit version EE 36 Fall

More information

EXAMINATIONS 2010 END OF YEAR NWEN 242 COMPUTER ORGANIZATION

EXAMINATIONS 2010 END OF YEAR NWEN 242 COMPUTER ORGANIZATION EXAINATIONS 2010 END OF YEAR COPUTER ORGANIZATION Time Allowed: 3 Hors (180 mintes) Instrctions: Answer all qestions. ake sre yor answers are clear and to the point. Calclators and paper foreign langage

More information

Enhanced Performance with Pipelining

Enhanced Performance with Pipelining Chapter 6 Enhanced Performance with Pipelining Note: The slides being presented represent a mi. Some are created by ark Franklin, Washington University in St. Lois, Dept. of CSE. any are taken from the

More information

PS Midterm 2. Pipelining

PS Midterm 2. Pipelining PS idterm 2 Pipelining Seqential Landry 6 P 7 8 9 idnight Time T a s k O r d e r A B C D 3 4 2 3 4 2 3 4 2 3 4 2 Seqential landry takes 6 hors for 4 loads If they learned pipelining, how long wold landry

More information

1048: Computer Organization

1048: Computer Organization 8: Compter Organization Lectre 6 Pipelining Lectre6 - pipelining (cwli@twins.ee.nct.ed.tw) 6- Otline An overview of pipelining A pipelined path Pipelined control Data hazards and forwarding Data hazards

More information

EEC 483 Computer Organization. Branch (Control) Hazards

EEC 483 Computer Organization. Branch (Control) Hazards EEC 483 Compter Organization Section 4.8 Branch Hazards Section 4.9 Exceptions Chans Y Branch (Control) Hazards While execting a previos branch, next instrction address might not yet be known. s n i o

More information

Lecture 7. Building A Simple Processor

Lecture 7. Building A Simple Processor Lectre 7 Bilding A Simple Processor Christos Kozyrakis Stanford University http://eeclass.stanford.ed/ee8b C. Kozyrakis EE8b Lectre 7 Annoncements Upcoming deadlines Lab is de today Demo by 5pm, report

More information

Overview of Pipelining

Overview of Pipelining EEC 58 Compter Architectre Pipelining Department of Electrical Engineering and Compter Science Cleveland State University Fndamental Principles Overview of Pipelining Pipelined Design otivation: Increase

More information

Quiz #1 EEC 483, Spring 2019

Quiz #1 EEC 483, Spring 2019 Qiz # EEC 483, Spring 29 Date: Jan 22 Name: Eercise #: Translate the following instrction in C into IPS code. Eercise #2: Translate the following instrction in C into IPS code. Hint: operand C is stored

More information

Prof. Kozyrakis. 1. (10 points) Consider the following fragment of Java code:

Prof. Kozyrakis. 1. (10 points) Consider the following fragment of Java code: EE8 Winter 25 Homework #2 Soltions De Thrsday, Feb 2, 5 P. ( points) Consider the following fragment of Java code: for (i=; i

More information

EXAMINATIONS 2003 END-YEAR COMP 203. Computer Organisation

EXAMINATIONS 2003 END-YEAR COMP 203. Computer Organisation EXAINATIONS 2003 COP203 END-YEAR Compter Organisation Time Allowed: 3 Hors (180 mintes) Instrctions: Answer all qestions. There are 180 possible marks on the eam. Calclators and foreign langage dictionaries

More information

EEC 483 Computer Organization

EEC 483 Computer Organization EEC 83 Compter Organization Chapter.6 A Pipelined path Chans Y Pipelined Approach 2 - Cycle time, No. stages - Resorce conflict E E A B C D 3 E E 5 E 2 3 5 2 6 7 8 9 c.y9@csohio.ed Resorces sed in 5 Stages

More information

1048: Computer Organization

1048: Computer Organization 48: Compter Organization Lectre 5 Datapath and Control Lectre5B - mlticycle implementation (cwli@twins.ee.nct.ed.tw) 5B- Recap: A Single-Cycle Processor PCSrc 4 Add Shift left 2 Add ALU reslt PC address

More information

Instruction fetch. MemRead. IRWrite ALUSrcB = 01. ALUOp = 00. PCWrite. PCSource = 00. ALUSrcB = 00. R-type completion

Instruction fetch. MemRead. IRWrite ALUSrcB = 01. ALUOp = 00. PCWrite. PCSource = 00. ALUSrcB = 00. R-type completion . (Chapter 5) Fill in the vales for SrcA, SrcB, IorD, Dst and emto to complete the Finite State achine for the mlti-cycle datapath shown below. emory address comptation 2 SrcA = SrcB = Op = fetch em SrcA

More information

CS 251, Spring 2018, Assignment 3.0 3% of course mark

CS 251, Spring 2018, Assignment 3.0 3% of course mark CS 25, Spring 28, Assignment 3. 3% of corse mark De onday, Jne 25th, 5:3 P. (5 points) Consider the single-cycle compter shown on page 6 of this assignment. Sppose the circit elements take the following

More information

Chapter 6: Pipelining

Chapter 6: Pipelining Chapter 6: Pipelining Otline An overview of pipelining A pipelined path Pipelined control Data hazards and forwarding Data hazards and stalls Branch hazards Eceptions Sperscalar and dynamic pipelining

More information

Winter 2013 MIDTERM TEST #2 Wednesday, March 20 7:00pm to 8:15pm. Please do not write your U of C ID number on this cover page.

Winter 2013 MIDTERM TEST #2 Wednesday, March 20 7:00pm to 8:15pm. Please do not write your U of C ID number on this cover page. page of 7 University of Calgary Departent of Electrical and Copter Engineering ENCM 369: Copter Organization Lectre Instrctors: Steve Noran and Nor Bartley Winter 23 MIDTERM TEST #2 Wednesday, March 2

More information

PIPELINING. Pipelining: Natural Phenomenon. Pipelining. Pipelining Lessons

PIPELINING. Pipelining: Natural Phenomenon. Pipelining. Pipelining Lessons Pipelining: Natral Phenomenon Landry Eample: nn, rian, Cathy, Dave each have one load of clothes to wash, dry, and fold Washer takes 30 mintes C D Dryer takes 0 mintes PIPELINING Folder takes 20 mintes

More information

CS 251, Winter 2018, Assignment % of course mark

CS 251, Winter 2018, Assignment % of course mark CS 25, Winter 28, Assignment 3.. 3% of corse mark De onday, Febrary 26th, 4:3 P Lates accepted ntil : A, Febrary 27th with a 5% penalty. IEEE 754 Floating Point ( points): (a) (4 points) Complete the following

More information

MIPS Architecture. Fibonacci (C) Fibonacci (Assembly) Another Example: MIPS. Example: subset of MIPS processor architecture

MIPS Architecture. Fibonacci (C) Fibonacci (Assembly) Another Example: MIPS. Example: subset of MIPS processor architecture Another Eample: IPS From the Harris/Weste book Based on the IPS-like processor from the Hennessy/Patterson book IPS Architectre Eample: sbset of IPS processor architectre Drawn from Patterson & Hennessy

More information

POWER-OF-2 BOUNDARIES

POWER-OF-2 BOUNDARIES Warren.3.fm Page 5 Monday, Jne 17, 5:6 PM CHAPTER 3 POWER-OF- BOUNDARIES 3 1 Ronding Up/Down to a Mltiple of a Known Power of Ronding an nsigned integer down to, for eample, the net smaller mltiple of

More information

Lab 8 (All Sections) Prelab: ALU and ALU Control

Lab 8 (All Sections) Prelab: ALU and ALU Control Lab 8 (All Sections) Prelab: and Control Name: Sign the following statement: On my honor, as an Aggie, I have neither given nor received nathorized aid on this academic work Objective In this lab yo will

More information

Animating the Datapath. Animating the Datapath: R-type Instruction. Animating the Datapath: Load Instruction. MIPS Datapath I: Single-Cycle

Animating the Datapath. Animating the Datapath: R-type Instruction. Animating the Datapath: Load Instruction. MIPS Datapath I: Single-Cycle nimating the atapath PS atapath : Single-Cycle npt is either (-type) or sign-etended lower half of instrction (load/store) op offset/immediate W egister File 6 6 + from instrction path beq,, offset if

More information

CSE Introduction to Computer Architecture Chapter 5 The Processor: Datapath & Control

CSE Introduction to Computer Architecture Chapter 5 The Processor: Datapath & Control CSE-45432 Introdction to Compter Architectre Chapter 5 The Processor: Datapath & Control Dr. Izadi Data Processor Register # PC Address Registers ALU memory Register # Register # Address Data memory Data

More information

Computer Architecture

Computer Architecture Compter Architectre Lectre 4: Intro to icroarchitectre: Single- Cycle Dr. Ahmed Sallam Sez Canal University Based on original slides by Prof. Onr tl Review Compter Architectre Today and Basics (Lectres

More information

Tdb: A Source-level Debugger for Dynamically Translated Programs

Tdb: A Source-level Debugger for Dynamically Translated Programs Tdb: A Sorce-level Debgger for Dynamically Translated Programs Naveen Kmar, Brce R. Childers, and Mary Lo Soffa Department of Compter Science University of Pittsbrgh Pittsbrgh, Pennsylvania 15260 {naveen,

More information

Computer Architecture

Computer Architecture Compter Architectre Lectre 4: Intro to icroarchitectre: Single- Cycle Dr. Ahmed Sallam Sez Canal University Spring 25 Based on original slides by Prof. Onr tl Review Compter Architectre Today and Basics

More information

Lecture 13: Exceptions and Interrupts

Lecture 13: Exceptions and Interrupts 18 447 Lectre 13: Eceptions and Interrpts S 10 L13 1 James C. Hoe Dept of ECE, CU arch 1, 2010 Annoncements: Handots: Spring break is almost here Check grades on Blackboard idterm 1 graded Handot #9: Lab

More information

Multiple-Choice Test Chapter Golden Section Search Method Optimization COMPLETE SOLUTION SET

Multiple-Choice Test Chapter Golden Section Search Method Optimization COMPLETE SOLUTION SET Mltiple-Choice Test Chapter 09.0 Golden Section Search Method Optimization COMPLETE SOLUTION SET. Which o the ollowing statements is incorrect regarding the Eqal Interval Search and Golden Section Search

More information

Computer Architecture. Lecture 6: Pipelining

Computer Architecture. Lecture 6: Pipelining Compter Architectre Lectre 6: Pipelining Dr. Ahmed Sallam Based on original slides by Prof. Onr tl Agenda for Today & Net Few Lectres Single-cycle icroarchitectres lti-cycle and icroprogrammed icroarchitectres

More information

The Disciplined Flood Protocol in Sensor Networks

The Disciplined Flood Protocol in Sensor Networks The Disciplined Flood Protocol in Sensor Networks Yong-ri Choi and Mohamed G. Goda Department of Compter Sciences The University of Texas at Astin, U.S.A. fyrchoi, godag@cs.texas.ed Hssein M. Abdel-Wahab

More information

Pavlin and Daniel D. Corkill. Department of Computer and Information Science University of Massachusetts Amherst, Massachusetts 01003

Pavlin and Daniel D. Corkill. Department of Computer and Information Science University of Massachusetts Amherst, Massachusetts 01003 From: AAAI-84 Proceedings. Copyright 1984, AAAI (www.aaai.org). All rights reserved. SELECTIVE ABSTRACTION OF AI SYSTEM ACTIVITY Jasmina Pavlin and Daniel D. Corkill Department of Compter and Information

More information

CSE 141 Computer Architecture Summer Session I, Lectures 10 Advanced Topics, Memory Hierarchy and Cache. Pramod V. Argade

CSE 141 Computer Architecture Summer Session I, Lectures 10 Advanced Topics, Memory Hierarchy and Cache. Pramod V. Argade CSE 141 Compter Architectre Smmer Session I, 2004 Lectres 10 Advanced Topics, emory Hierarchy and Cache Pramod V. Argade CSE141: Introdction to Compter Architectre Instrctor: TA: Pramod V. Argade (p2argade@cs.csd.ed)

More information

ECE232: Hardware Organization and Design

ECE232: Hardware Organization and Design ECE232: Harware Organization an Design ectre 11: Introction to IPs path apte from Compter Organization an Design, Patterson & Hennessy, CB IPS-lite processor Compter Want to bil a processor for a sbset

More information

Lecture 10: Pipelined Implementations

Lecture 10: Pipelined Implementations U 8-7 S 9 L- 8-7 Lectre : Pipelined Implementations James. Hoe ept of EE, U Febrary 23, 29 nnoncements: Project is de this week idterm graded, d reslts posted Handots: H9 Homework 3 (on lackboard) Graded

More information

Using a Hardware Description Language to Design and Simulate a Processor 5.8

Using a Hardware Description Language to Design and Simulate a Processor 5.8 5.8 Using a Hardware Description Language to Design and Simulate a Processor 5.8 As mentioned in Appix B, Verilog can describe processors for simulation or with the intention that the Verilog specification

More information

Lecture 6: Microprogrammed Multi Cycle Implementation. James C. Hoe Department of ECE Carnegie Mellon University

Lecture 6: Microprogrammed Multi Cycle Implementation. James C. Hoe Department of ECE Carnegie Mellon University 8 447 Lectre 6: icroprogrammed lti Cycle Implementation James C. Hoe Department of ECE Carnegie ellon University 8 447 S8 L06 S, James C. Hoe, CU/ECE/CALC, 208 Yor goal today Hosekeeping nderstand why

More information

Resolving Linkage Anomalies in Extracted Software System Models

Resolving Linkage Anomalies in Extracted Software System Models Resolving Linkage Anomalies in Extracted Software System Models Jingwei W and Richard C. Holt School of Compter Science University of Waterloo Waterloo, Canada j25w, holt @plg.waterloo.ca Abstract Program

More information

MIPS Architecture. An Example: MIPS. From the Harris/Weste book Based on the MIPS-like processor from the Hennessy/Patterson book

MIPS Architecture. An Example: MIPS. From the Harris/Weste book Based on the MIPS-like processor from the Hennessy/Patterson book An Eample: IPS From the Harris/Weste book Based on the IPS-like processor from the Hennessy/Patterson book IPS Architectre w Eample: sbset of IPS processor architectre n Drawn from Patterson & Hennessy

More information

Lecture 9: Microcontrolled Multi-Cycle Implementations

Lecture 9: Microcontrolled Multi-Cycle Implementations 8-447 Lectre 9: icroled lti-cycle Implementations James C. Hoe Dept of ECE, CU Febrary 8, 29 S 9 L9- Annoncements: P&H Appendi D Get started t on Lab Handots: Handot #8: Project (on Blackboard) Single-Cycle

More information

CS 153 Design of Operating Systems Spring 18

CS 153 Design of Operating Systems Spring 18 CS 153 Design of Operating Systems Spring 18 Lectre 15: Virtal Address Space Instrctor: Chengy Song Slide contribtions from Nael Ab-Ghazaleh, Harsha Madhyvasta and Zhiyn Qian OS Abstractions Applications

More information

Review. How to represent real numbers

Review. How to represent real numbers PCWrite PC IorD Review ALUSrcA emread Address Write data emory emwrite em Data IRWrite [3-26] [25-2] [2-6] [5-] [5-] RegDst Read register Read register 2 Write register Write data RegWrite Read data Read

More information

Computer User s Guide 4.0

Computer User s Guide 4.0 Compter User s Gide 4.0 2001 Glenn A. Miller, All rights reserved 2 The SASSI Compter User s Gide 4.0 Table of Contents Chapter 1 Introdction...3 Chapter 2 Installation and Start Up...5 System Reqirements

More information

Networks An introduction to microcomputer networking concepts

Networks An introduction to microcomputer networking concepts Behavior Research Methods& Instrmentation 1978, Vol 10 (4),522-526 Networks An introdction to microcompter networking concepts RALPH WALLACE and RICHARD N. JOHNSON GA TX, Chicago, Illinois60648 and JAMES

More information

CS 153 Design of Operating Systems

CS 153 Design of Operating Systems CS 153 Design of Operating Systems Spring 18 Lectre 3: OS model and Architectral Spport Instrctor: Chengy Song Slide contribtions from Nael Ab-Ghazaleh, Harsha Madhyvasta and Zhiyn Qian Last time/today

More information

Evaluating Influence Diagrams

Evaluating Influence Diagrams Evalating Inflence Diagrams Where we ve been and where we re going Mark Crowley Department of Compter Science University of British Colmbia crowley@cs.bc.ca Agst 31, 2004 Abstract In this paper we will

More information

CS 153 Design of Operating Systems Spring 18

CS 153 Design of Operating Systems Spring 18 CS 153 Design of Operating Systems Spring 18 Lectre 11: Semaphores Instrctor: Chengy Song Slide contribtions from Nael Ab-Ghazaleh, Harsha Madhyvasta and Zhiyn Qian Last time Worked throgh software implementation

More information

Instruction Pipelining is the use of pipelining to allow more than one instruction to be in some stage of execution at the same time.

Instruction Pipelining is the use of pipelining to allow more than one instruction to be in some stage of execution at the same time. Pipelining Pipelining is the se of pipelining to allow more than one instrction to be in some stage of eection at the same time. Ferranti ATLAS (963): Pipelining redced the average time per instrction

More information

On the Computational Complexity and Effectiveness of N-hub Shortest-Path Routing

On the Computational Complexity and Effectiveness of N-hub Shortest-Path Routing 1 On the Comptational Complexity and Effectiveness of N-hb Shortest-Path Roting Reven Cohen Gabi Nakibli Dept. of Compter Sciences Technion Israel Abstract In this paper we stdy the comptational complexity

More information

Processor Design CSCE Instructor: Saraju P. Mohanty, Ph. D. NOTE: The figures, text etc included in slides are borrowed

Processor Design CSCE Instructor: Saraju P. Mohanty, Ph. D. NOTE: The figures, text etc included in slides are borrowed Lecture 3: General Purpose Processor Design CSCE 665 Advanced VLSI Systems Instructor: Saraju P. ohanty, Ph. D. NOTE: The figures, tet etc included in slides are borrowed from various books, websites,

More information

This chapter is based on the following sources, which are all recommended reading:

This chapter is based on the following sources, which are all recommended reading: Bioinformatics I, WS 09-10, D. Hson, December 7, 2009 105 6 Fast String Matching This chapter is based on the following sorces, which are all recommended reading: 1. An earlier version of this chapter

More information

Real-time mean-shift based tracker for thermal vision systems

Real-time mean-shift based tracker for thermal vision systems 9 th International Conference on Qantitative InfraRed Thermography Jly -5, 008, Krakow - Poland Real-time mean-shift based tracker for thermal vision systems G. Bieszczad* T. Sosnowski** * Military University

More information

5 Performance Evaluation

5 Performance Evaluation 5 Performance Evalation his chapter evalates the performance of the compared to the MIP, and FMIP individal performances. We stdy the packet loss and the latency to restore the downstream and pstream of

More information

CAD for VLSI 2 Pro ject - Superscalar Processor Implementation

CAD for VLSI 2 Pro ject - Superscalar Processor Implementation CAD for VLSI 2 Pro ject - Superscalar Processor Implementation 1 Superscalar Processor Ob jective: The main objective is to implement a superscalar pipelined processor using Verilog HDL. This project may

More information

CS 153 Design of Operating Systems Spring 18

CS 153 Design of Operating Systems Spring 18 CS 53 Design of Operating Systems Spring 8 Lectre 2: Virtal Memory Instrctor: Chengy Song Slide contribtions from Nael Ab-Ghazaleh, Harsha Madhyvasta and Zhiyn Qian Recap: cache Well-written programs exhibit

More information

Master for Co-Simulation Using FMI

Master for Co-Simulation Using FMI Master for Co-Simlation Using FMI Jens Bastian Christoph Claß Ssann Wolf Peter Schneider Franhofer Institte for Integrated Circits IIS / Design Atomation Division EAS Zenerstraße 38, 69 Dresden, Germany

More information

Isilon InsightIQ. Version 2.5. User Guide

Isilon InsightIQ. Version 2.5. User Guide Isilon InsightIQ Version 2.5 User Gide Pblished March, 2014 Copyright 2010-2014 EMC Corporation. All rights reserved. EMC believes the information in this pblication is accrate as of its pblication date.

More information

Local Run Manager Generate FASTQ Analysis Module

Local Run Manager Generate FASTQ Analysis Module Local Rn Manager Generate FASTQ Analysis Modle Workflow Gide For Research Use Only. Not for se in diagnostic procedres. Overview 3 Set Parameters 3 Analysis Methods 5 View Analysis Reslts 5 Analysis Report

More information

Single-Cycle Examples, Multi-Cycle Introduction

Single-Cycle Examples, Multi-Cycle Introduction Single-Cycle Examples, ulti-cycle Introduction 1 Today s enu Single cycle examples Single cycle machines vs. multi-cycle machines Why multi-cycle? Comparative performance Physical and Logical Design of

More information

CAPL Scripting Quickstart

CAPL Scripting Quickstart CAPL Scripting Qickstart CAPL (Commnication Access Programming Langage) For CANalyzer and CANoe V1.01 2015-12-03 Agenda Important information before getting started 3 Visal Seqencer (GUI based programming

More information

Topic Continuity for Web Document Categorization and Ranking

Topic Continuity for Web Document Categorization and Ranking Topic Continity for Web ocment Categorization and Ranking B. L. Narayan, C. A. Mrthy and Sankar. Pal Machine Intelligence Unit, Indian Statistical Institte, 03, B. T. Road, olkata - 70008, India. E-mail:

More information

CSSE232 Computer Architecture I. Mul5cycle Datapath

CSSE232 Computer Architecture I. Mul5cycle Datapath CSSE232 Compter Architectre I Ml5cycle Datapath Class Stats Next 3 days : Ml5cycle datapath ing Ml5cycle datapath is not in the book! How long do instrc5ons take? ALU 2ns Mem 2ns Reg File 1ns Everything

More information

10.2 Solving Quadratic Equations by Completing the Square

10.2 Solving Quadratic Equations by Completing the Square . Solving Qadratic Eqations b Completing the Sqare Consider the eqation We can see clearl that the soltions are However, What if the eqation was given to s in standard form, that is 6 How wold we go abot

More information

Multi-lingual Multi-media Information Retrieval System

Multi-lingual Multi-media Information Retrieval System Mlti-lingal Mlti-media Information Retrieval System Shoji Mizobchi, Sankon Lee, Fmihiko Kawano, Tsyoshi Kobayashi, Takahiro Komats Gradate School of Engineering, University of Tokshima 2-1 Minamijosanjima,

More information

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle

More information

Content Safety Precaution... 4 Getting started... 7 Input method... 9 Using the Menus Use of USB Maintenance & Safety...

Content Safety Precaution... 4 Getting started... 7 Input method... 9 Using the Menus Use of USB Maintenance & Safety... STAR -1- Content 1. Safety Precation... 4 2. Getting started... 7 Installing the cards and the Battery... 7 Charging the Battery... 8 3. Inpt method... 9 To Shift Entry Methods... 9 Nmeric and English

More information

CSE 2021 Computer Organization. Hugh Chesser, CSEB 1012U W9-W

CSE 2021 Computer Organization. Hugh Chesser, CSEB 1012U W9-W CSE 22 Computer Organization Hugh Chesser, CSEB 2U Agenda Topics:. Single Cycle Review (Sample Exam/Quiz Q) 2. ultiple cycle implementation Patterson: Section 4.5 Reminder: Quiz #2 Next Wednesday (November

More information

CS 153 Design of Operating Systems Spring 18

CS 153 Design of Operating Systems Spring 18 CS 153 Design of Operating Systems Spring 18 Lectre 9: Synchronization (1) Instrctor: Chengy Song Slide contribtions from Nael Ab-Ghazaleh, Harsha Madhyvasta and Zhiyn Qian Cooperation between Threads

More information

Functions of Combinational Logic

Functions of Combinational Logic CHPTER 6 Fnctions of Combinational Logic CHPTER OUTLINE 6 6 6 6 6 5 6 6 6 7 6 8 6 9 6 6 Half and Fll dders Parallel inary dders Ripple Carry and Look-head Carry dders Comparators Decoders Encoders Code

More information

Local Run Manager. Software Reference Guide for MiSeqDx

Local Run Manager. Software Reference Guide for MiSeqDx Local Rn Manager Software Reference Gide for MiSeqDx Local Rn Manager Overview 3 Dashboard Overview 4 Administrative Settings and Tasks 7 Workflow Overview 12 Technical Assistance 17 Docment # 1000000011880

More information

Chapter 5 Network Layer

Chapter 5 Network Layer Chapter Network Layer Network layer Physical layer: moe bit seqence between two adjacent nodes Data link: reliable transmission between two adjacent nodes Network: gides packets from the sorce to destination,

More information

Picking and Curves Week 6

Picking and Curves Week 6 CS 48/68 INTERACTIVE COMPUTER GRAPHICS Picking and Crves Week 6 David Breen Department of Compter Science Drexel University Based on material from Ed Angel, University of New Mexico Objectives Picking

More information

Decoders. 3-Input Full Decoder

Decoders. 3-Input Full Decoder ecoders A fll decoder with n inpts has 2 n otpts. Let inpts be labeled In, In, In 2,..., In n, and let otpts be labeled Ot, Ot,..., Ot 2 n. A fll decoder fnctions as follows: Only one of otpts has vale

More information

CS 153 Design of Operating Systems

CS 153 Design of Operating Systems CS 53 Design of Operating Systems Spring 8 Lectre 9: Locality and Cache Instrctor: Chengy Song Slide contribtions from Nael Ab-Ghazaleh, Harsha Madhyvasta and Zhiyn Qian Some slides modified from originals

More information

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition The Processor - Introduction

More information

Dr Paolo Guagliardo. Fall 2018

Dr Paolo Guagliardo. Fall 2018 The NULL vale Dr Paolo Gagliardo dbs-lectrer@ed.ac.k Fall 2018 NULL: all-prpose marker to represent incomplete information Main sorce of problems and inconsistencies... this topic cannot be described in

More information

Computer Architecture Lecture 6: Multi-cycle Microarchitectures. Prof. Onur Mutlu Carnegie Mellon University Spring 2012, 2/6/2012

Computer Architecture Lecture 6: Multi-cycle Microarchitectures. Prof. Onur Mutlu Carnegie Mellon University Spring 2012, 2/6/2012 8-447 Compter Architectre Lectre 6: lti-cycle icroarchitectres Prof. Onr tl Carnegie ellon University Spring 22, 2/6/22 Reminder: Homeworks Homework soltions Check and stdy the soltions! Learning now is

More information