SlideShare una empresa de Scribd logo
1 de 29
CSE 490/590 Computer ArchitectureMIPS Review & Pipelining I Steve Ko Computer Sciences and Engineering University at Buffalo
2 Last Time… An ISA can have multiple implementations (Briefly) CISC vs. RISC CISC: microcoded (macro instructions & microinstructions) RISC: combinational logic MIPS microarchitecture Good RISC example Fixed format instructions Load/store architecture with single address mode Simple branch Will continue on this today…
3 MIPS Instruction Formats Register-Register 5 6 10 11 31 26 0 15 16 20 21 25 Op Rs1 Rs2 Rd Func Register-Immediate 31 26 0 15 16 20 21 25 immediate Op Rs1 Rd Branch (Same format  as Reg-Imm) 31 26 0 15 16 20 21 25 immediate Op Rs1 Rs2/Opx Jump / Call 31 26 0 25 target Op
Reg-Reg Instructions Op (e.g., 0) encodes that this is a reg-reg instruction Func encodes the datapath operations (add, sub, etc.) Rd  (Rs1) Func (Rs2) ADD R1,R2,R3 Add Reg[R1]  Regs[R2] + Regs[R3] 4 Register-Register 5 6 10 11 31 26 0 15 16 20 21 25 Op Rs1 Rs2 Rd Func
Reg-Imm Instructions Rd  (Rs1) Op (Imm) ADDI R1,R2,#3 Add immediate Regs[R1]  Regs[R2] + 3 LD R1,30(R2) Load word Regs[R1]  Mem[30 + Regs[R2]] BEQZ R4, name Branch equal zero If (Regs[R4] == 0) PC  name 5 Register-Immediate 31 26 0 15 16 20 21 25 immediate Op Rs1 Rd
Jump / Call Rd  (Rs1) Op (Imm) J name Jump PC6…31 name JAL name Jump and link Regs[R31]  PC + 4; PC6…31 name 6 Jump / Call 31 26 0 25 target Op
7 Implementing MIPS:Single-cycle per instructiondatapath & control logic
8 RegWrite 0x4 clk Add inst<25:21> we inst<20:16> rs1 rs2 addr PC inst<15:11> rd1 inst ALU ws z wd rd2 Inst. Memory clk GPRs inst<5:0> ALU Control OpCode 6	   5	 5       5       5          6      0	   rs	rt       rd       0       func       rd  (rs) func (rt) 31        26  25      21 20     16 15       11             5             0 Datapath: Reg-Reg ALU Instructions RegWrite Timing?
9 RegWrite 0x4 clk Add we inst<25:21> rs1 rs2 addr rd1 PC inst<20:16> inst ws ALU wd rd2 z Inst. Memory GPRs clk inst<15:0> Imm Ext inst<31:26> ALU Control ExtSel OpCode 6	   5	 5	       16 opcode	   rs	rt	  immediate	     rt  (rs) op immediate 31         26 25       2120      16 15                                     0 Datapath: Reg-Imm ALU Instructions
10 clk we rs1 rs2 addr rd1 PC inst ws ALU wd rd2 z Inst. Memory GPRs Imm Ext ExtSel 6	   5	 5       5       5          6      0	   rs	rt       rd       0       func    rd  (rs) func (rt) opcode	   rs	rt	  immediate	     rt  (rs) op immediate Conflicts in Merging Datapath RegWrite Introduce muxes 0x4 Add inst<25:21> inst<20:16> inst<15:11> clk inst<15:0> inst<31:26> ALU Control inst<5:0> OpCode
11 clk we rs1 rs2 addr rd1 PC inst ws ALU wd rd2 z Inst. Memory GPRs 6	   5	 5       5       5          6      0	   rs	rt       rd       0       func    rd  (rs) func (rt) opcode	   rs	rt	  immediate	     rt  (rs) op immediate Datapath for ALU Instructions RegWrite 0x4 Add <25:21> <20:16> <15:11> clk <15:0> Imm Ext <31:26>, <5:0> ALU Control BSrc Reg / Imm ExtSel OpSel RegDst rt / rd OpCode
12 Datapath for Memory Instructions Should program and data memory be separate? Harvard style: separate (Aiken and Mark 1 influence) - read-only program memory ,[object Object]
 Note:Somehow there must be a way to load theprogram memory  Princeton style: the same (von Neumann’s influence) ,[object Object]
 Note: A Load or Store instruction requires     accessing the memory more than once     during its execution
13 RegWrite MemWrite WBSrc ALU / Mem 0x4 clk Add we “base” clk rs1 rs2 we rd1 ws addr ALU addr PC wd rd2 z inst GPRs rdata Data  Memory clk Inst. Memory disp Imm Ext wdata ALU Control RegDst ExtSel OpCode OpSel BSrc       6	    5	5               16                   addressing mode opcode	  rs	rt         displacement         (rs) + displacement 31        26  25      21 20     16 15                                      0 Load/Store Instructions:Harvard Datapath rs is the base register rt is the destination of a Load or the source for a Store
14 CSE 490/590 Administrivia Please purchase a BASYS2 board (100K) as soon as possible. Projects should be done individually. Quiz 1 Fri, 2/4 Closed book, in-class 10% Class cancelled on Fri, 4/15 Will update the schedule
15     6	   5	5 	      16 opcode    rs                    offset 		BEQZ, BNEZ     6	  5	5              16 opcode    rs					JR, JALR     6                        26 opcode                 target			J, JAL MIPS Control Instructions Conditional (on GPR) PC-relative branch Unconditional register-indirect jumps Unconditional absolute jumps ,[object Object]
Absolute jumps append target4 to PC<31:28> to calculate the target address: 256 MB range
jump-&-link stores PC+4 into the link register (R31),[object Object]
17 WBSrc MemWrite rind 0x4 clk we clk rs1 rs2 ALU Control we rd1 addr PC ws addr inst wd rd2 ALU GPRs z rdata Inst. Memory clk Data  Memory Imm Ext wdata zero? RegDst ExtSel OpCode OpSel BSrc Register-Indirect Jumps (JR) PCSrc RegWrite br pc+4 Add Add
18 0x4 clk we rs1 rs2 ALU Control rd1 addr PC ws inst wd rd2 ALU GPRs z Inst. Memory clk Imm Ext zero? RegDst ExtSel OpCode OpSel BSrc Register-Indirect Jump-&-Link (JALR) PCSrc RegWrite WBSrc MemWrite br rind pc+4 Add Add clk 31 we addr rdata Data  Memory wdata
19 WBSrc MemWrite 0x4 clk ALU Control we addr PC addr inst ALU rdata Inst. Memory clk Data  Memory Imm Ext wdata Absolute Jumps (J, JAL) PCSrc RegWrite br rind jabs pc+4 Add Add clk we rs1 rs2 31 rd1 ws wd rd2 GPRs z zero? RegDst ExtSel OpCode OpSel BSrc
20 WBSrc MemWrite 0x4 clk we clk rs1 rs2 ALU Control we rd1 addr PC ws addr inst wd rd2 ALU GPRs z rdata Inst. Memory clk Data  Memory Imm Ext wdata zero? RegDst ExtSel OpCode OpSel BSrc Harvard-Style Datapath for MIPS PCSrc RegWrite br rind jabs pc+4 Add Add 31
21 Single-Cycle Hardwired Control:Harvard architecture  We will assume  ,[object Object],  the following steps to be “completed”: 1. instruction fetch 2. decode and register fetch 3. ALU operation 4. data fetch if required 5. register write-back setup time    tC >  tIFetch + tRFetch + tALU+ tDMem+ tRWB ,[object Object],   the register file and the memory are updated
22 Pipelined MIPS
23 stage 3 stage 4 stage 2 stage 1 An Ideal Pipeline  ,[object Object]
 No sharing of resources between any two stages
 Propagation delay through all pipeline stages is equal
 The scheduling of an object entering the pipeline   is not affected by the objects in other stages These conditions generally hold for industrial assembly lines.  But can an instruction pipeline satisfy the last condition?

Más contenido relacionado

La actualidad más candente

Pipelinig hazardous
Pipelinig hazardousPipelinig hazardous
Pipelinig hazardousjasscheema
 
Pipelining , structural hazards
Pipelining , structural hazardsPipelining , structural hazards
Pipelining , structural hazardsMunaam Munawar
 
CArcMOOC 05.03 - Pipeline hazards
CArcMOOC 05.03 - Pipeline hazardsCArcMOOC 05.03 - Pipeline hazards
CArcMOOC 05.03 - Pipeline hazardsAlessandro Bogliolo
 
Instruction pipelining
Instruction pipeliningInstruction pipelining
Instruction pipeliningTech_MX
 
Pipeline hazards | Structural Hazard, Data Hazard & Control Hazard
Pipeline hazards | Structural Hazard, Data Hazard & Control HazardPipeline hazards | Structural Hazard, Data Hazard & Control Hazard
Pipeline hazards | Structural Hazard, Data Hazard & Control Hazardbabuece
 
pipeline and vector processing
pipeline and vector processingpipeline and vector processing
pipeline and vector processingAcad
 
Pipeline processing - Computer Architecture
Pipeline processing - Computer Architecture Pipeline processing - Computer Architecture
Pipeline processing - Computer Architecture S. Hasnain Raza
 
Pipelining powerpoint presentation
Pipelining powerpoint presentationPipelining powerpoint presentation
Pipelining powerpoint presentationbhavanadonthi
 
Pipelining
PipeliningPipelining
PipeliningAJAL A J
 
Pipeline Mechanism
Pipeline MechanismPipeline Mechanism
Pipeline MechanismAshik Iqbal
 
Concept of Pipelining
Concept of PipeliningConcept of Pipelining
Concept of PipeliningSHAKOOR AB
 
Performance Enhancement with Pipelining
Performance Enhancement with PipeliningPerformance Enhancement with Pipelining
Performance Enhancement with PipeliningAneesh Raveendran
 
INSTRUCTION PIPELINING
INSTRUCTION PIPELININGINSTRUCTION PIPELINING
INSTRUCTION PIPELININGrubysistec
 
Pipelining_Computer Organization_TU(BIM)
Pipelining_Computer Organization_TU(BIM)Pipelining_Computer Organization_TU(BIM)
Pipelining_Computer Organization_TU(BIM)Kapil Khatiwada
 

La actualidad más candente (20)

Pipelinig hazardous
Pipelinig hazardousPipelinig hazardous
Pipelinig hazardous
 
Pipelining , structural hazards
Pipelining , structural hazardsPipelining , structural hazards
Pipelining , structural hazards
 
pipelining
pipeliningpipelining
pipelining
 
CArcMOOC 05.03 - Pipeline hazards
CArcMOOC 05.03 - Pipeline hazardsCArcMOOC 05.03 - Pipeline hazards
CArcMOOC 05.03 - Pipeline hazards
 
Instruction pipelining
Instruction pipeliningInstruction pipelining
Instruction pipelining
 
Pipeline hazards | Structural Hazard, Data Hazard & Control Hazard
Pipeline hazards | Structural Hazard, Data Hazard & Control HazardPipeline hazards | Structural Hazard, Data Hazard & Control Hazard
Pipeline hazards | Structural Hazard, Data Hazard & Control Hazard
 
pipeline and vector processing
pipeline and vector processingpipeline and vector processing
pipeline and vector processing
 
Data Hazard and Solution for Data Hazard
Data Hazard and Solution for Data HazardData Hazard and Solution for Data Hazard
Data Hazard and Solution for Data Hazard
 
Pipeline hazard
Pipeline hazardPipeline hazard
Pipeline hazard
 
Pipeline
PipelinePipeline
Pipeline
 
Pipeline processing - Computer Architecture
Pipeline processing - Computer Architecture Pipeline processing - Computer Architecture
Pipeline processing - Computer Architecture
 
Pipelining powerpoint presentation
Pipelining powerpoint presentationPipelining powerpoint presentation
Pipelining powerpoint presentation
 
Pipelining
PipeliningPipelining
Pipelining
 
Pipelining In computer
Pipelining In computer Pipelining In computer
Pipelining In computer
 
Pipeline Mechanism
Pipeline MechanismPipeline Mechanism
Pipeline Mechanism
 
Concept of Pipelining
Concept of PipeliningConcept of Pipelining
Concept of Pipelining
 
Performance Enhancement with Pipelining
Performance Enhancement with PipeliningPerformance Enhancement with Pipelining
Performance Enhancement with Pipelining
 
INSTRUCTION PIPELINING
INSTRUCTION PIPELININGINSTRUCTION PIPELINING
INSTRUCTION PIPELINING
 
Pipelining_Computer Organization_TU(BIM)
Pipelining_Computer Organization_TU(BIM)Pipelining_Computer Organization_TU(BIM)
Pipelining_Computer Organization_TU(BIM)
 
Pipelining
PipeliningPipelining
Pipelining
 

Similar a Pipelining1

Unit II Arm 7 Introduction
Unit II Arm 7 IntroductionUnit II Arm 7 Introduction
Unit II Arm 7 IntroductionDr. Pankaj Zope
 
Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...
Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...
Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...Hsien-Hsin Sean Lee, Ph.D.
 
LPC 2148 Instructions Set.ppt
LPC 2148 Instructions Set.pptLPC 2148 Instructions Set.ppt
LPC 2148 Instructions Set.pptProfBadariNathK
 
Lec 12-15 mips instruction set processor
Lec 12-15 mips instruction set processorLec 12-15 mips instruction set processor
Lec 12-15 mips instruction set processorMayank Roy
 
Lec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIW
Lec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIWLec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIW
Lec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIWHsien-Hsin Sean Lee, Ph.D.
 
other-architectures.ppt
other-architectures.pptother-architectures.ppt
other-architectures.pptJaya Chavan
 
Arm teaching material
Arm teaching materialArm teaching material
Arm teaching materialJohn Williams
 
Lec7 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...
Lec7 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...Lec7 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...
Lec7 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...Hsien-Hsin Sean Lee, Ph.D.
 
tau 2015 spyrou fpga timing
tau 2015 spyrou fpga timingtau 2015 spyrou fpga timing
tau 2015 spyrou fpga timingTom Spyrou
 
Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Andriy Berestovskyy
 
Control unit-implementation
Control unit-implementationControl unit-implementation
Control unit-implementationWBUTTUTORIALS
 

Similar a Pipelining1 (20)

Lec02
Lec02Lec02
Lec02
 
Unit II Arm 7 Introduction
Unit II Arm 7 IntroductionUnit II Arm 7 Introduction
Unit II Arm 7 Introduction
 
Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...
Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...
Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...
 
LPC 2148 Instructions Set.ppt
LPC 2148 Instructions Set.pptLPC 2148 Instructions Set.ppt
LPC 2148 Instructions Set.ppt
 
PROCESSOR AND CONTROL UNIT
PROCESSOR AND CONTROL UNITPROCESSOR AND CONTROL UNIT
PROCESSOR AND CONTROL UNIT
 
Dpdk applications
Dpdk applicationsDpdk applications
Dpdk applications
 
Arm architecture overview
Arm architecture overviewArm architecture overview
Arm architecture overview
 
Lec 12-15 mips instruction set processor
Lec 12-15 mips instruction set processorLec 12-15 mips instruction set processor
Lec 12-15 mips instruction set processor
 
Lec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIW
Lec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIWLec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIW
Lec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIW
 
Code GPU with CUDA - SIMT
Code GPU with CUDA - SIMTCode GPU with CUDA - SIMT
Code GPU with CUDA - SIMT
 
Arm architecture
Arm architectureArm architecture
Arm architecture
 
other-architectures.ppt
other-architectures.pptother-architectures.ppt
other-architectures.ppt
 
Arm teaching material
Arm teaching materialArm teaching material
Arm teaching material
 
Arm teaching material
Arm teaching materialArm teaching material
Arm teaching material
 
Lec7 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...
Lec7 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...Lec7 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...
Lec7 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...
 
tau 2015 spyrou fpga timing
tau 2015 spyrou fpga timingtau 2015 spyrou fpga timing
tau 2015 spyrou fpga timing
 
2014 ii c08t-sbc pic para ecg
2014 ii c08t-sbc pic para ecg 2014 ii c08t-sbc pic para ecg
2014 ii c08t-sbc pic para ecg
 
OptimizingARM
OptimizingARMOptimizingARM
OptimizingARM
 
Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)
 
Control unit-implementation
Control unit-implementationControl unit-implementation
Control unit-implementation
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 

Último (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 

Pipelining1

  • 1. CSE 490/590 Computer ArchitectureMIPS Review & Pipelining I Steve Ko Computer Sciences and Engineering University at Buffalo
  • 2. 2 Last Time… An ISA can have multiple implementations (Briefly) CISC vs. RISC CISC: microcoded (macro instructions & microinstructions) RISC: combinational logic MIPS microarchitecture Good RISC example Fixed format instructions Load/store architecture with single address mode Simple branch Will continue on this today…
  • 3. 3 MIPS Instruction Formats Register-Register 5 6 10 11 31 26 0 15 16 20 21 25 Op Rs1 Rs2 Rd Func Register-Immediate 31 26 0 15 16 20 21 25 immediate Op Rs1 Rd Branch (Same format as Reg-Imm) 31 26 0 15 16 20 21 25 immediate Op Rs1 Rs2/Opx Jump / Call 31 26 0 25 target Op
  • 4. Reg-Reg Instructions Op (e.g., 0) encodes that this is a reg-reg instruction Func encodes the datapath operations (add, sub, etc.) Rd  (Rs1) Func (Rs2) ADD R1,R2,R3 Add Reg[R1]  Regs[R2] + Regs[R3] 4 Register-Register 5 6 10 11 31 26 0 15 16 20 21 25 Op Rs1 Rs2 Rd Func
  • 5. Reg-Imm Instructions Rd  (Rs1) Op (Imm) ADDI R1,R2,#3 Add immediate Regs[R1]  Regs[R2] + 3 LD R1,30(R2) Load word Regs[R1]  Mem[30 + Regs[R2]] BEQZ R4, name Branch equal zero If (Regs[R4] == 0) PC  name 5 Register-Immediate 31 26 0 15 16 20 21 25 immediate Op Rs1 Rd
  • 6. Jump / Call Rd  (Rs1) Op (Imm) J name Jump PC6…31 name JAL name Jump and link Regs[R31]  PC + 4; PC6…31 name 6 Jump / Call 31 26 0 25 target Op
  • 7. 7 Implementing MIPS:Single-cycle per instructiondatapath & control logic
  • 8. 8 RegWrite 0x4 clk Add inst<25:21> we inst<20:16> rs1 rs2 addr PC inst<15:11> rd1 inst ALU ws z wd rd2 Inst. Memory clk GPRs inst<5:0> ALU Control OpCode 6 5 5 5 5 6 0 rs rt rd 0 func rd  (rs) func (rt) 31 26 25 21 20 16 15 11 5 0 Datapath: Reg-Reg ALU Instructions RegWrite Timing?
  • 9. 9 RegWrite 0x4 clk Add we inst<25:21> rs1 rs2 addr rd1 PC inst<20:16> inst ws ALU wd rd2 z Inst. Memory GPRs clk inst<15:0> Imm Ext inst<31:26> ALU Control ExtSel OpCode 6 5 5 16 opcode rs rt immediate rt  (rs) op immediate 31 26 25 2120 16 15 0 Datapath: Reg-Imm ALU Instructions
  • 10. 10 clk we rs1 rs2 addr rd1 PC inst ws ALU wd rd2 z Inst. Memory GPRs Imm Ext ExtSel 6 5 5 5 5 6 0 rs rt rd 0 func rd  (rs) func (rt) opcode rs rt immediate rt  (rs) op immediate Conflicts in Merging Datapath RegWrite Introduce muxes 0x4 Add inst<25:21> inst<20:16> inst<15:11> clk inst<15:0> inst<31:26> ALU Control inst<5:0> OpCode
  • 11. 11 clk we rs1 rs2 addr rd1 PC inst ws ALU wd rd2 z Inst. Memory GPRs 6 5 5 5 5 6 0 rs rt rd 0 func rd  (rs) func (rt) opcode rs rt immediate rt  (rs) op immediate Datapath for ALU Instructions RegWrite 0x4 Add <25:21> <20:16> <15:11> clk <15:0> Imm Ext <31:26>, <5:0> ALU Control BSrc Reg / Imm ExtSel OpSel RegDst rt / rd OpCode
  • 12.
  • 13.
  • 14. Note: A Load or Store instruction requires accessing the memory more than once during its execution
  • 15. 13 RegWrite MemWrite WBSrc ALU / Mem 0x4 clk Add we “base” clk rs1 rs2 we rd1 ws addr ALU addr PC wd rd2 z inst GPRs rdata Data Memory clk Inst. Memory disp Imm Ext wdata ALU Control RegDst ExtSel OpCode OpSel BSrc 6 5 5 16 addressing mode opcode rs rt displacement (rs) + displacement 31 26 25 21 20 16 15 0 Load/Store Instructions:Harvard Datapath rs is the base register rt is the destination of a Load or the source for a Store
  • 16. 14 CSE 490/590 Administrivia Please purchase a BASYS2 board (100K) as soon as possible. Projects should be done individually. Quiz 1 Fri, 2/4 Closed book, in-class 10% Class cancelled on Fri, 4/15 Will update the schedule
  • 17.
  • 18. Absolute jumps append target4 to PC<31:28> to calculate the target address: 256 MB range
  • 19.
  • 20. 17 WBSrc MemWrite rind 0x4 clk we clk rs1 rs2 ALU Control we rd1 addr PC ws addr inst wd rd2 ALU GPRs z rdata Inst. Memory clk Data Memory Imm Ext wdata zero? RegDst ExtSel OpCode OpSel BSrc Register-Indirect Jumps (JR) PCSrc RegWrite br pc+4 Add Add
  • 21. 18 0x4 clk we rs1 rs2 ALU Control rd1 addr PC ws inst wd rd2 ALU GPRs z Inst. Memory clk Imm Ext zero? RegDst ExtSel OpCode OpSel BSrc Register-Indirect Jump-&-Link (JALR) PCSrc RegWrite WBSrc MemWrite br rind pc+4 Add Add clk 31 we addr rdata Data Memory wdata
  • 22. 19 WBSrc MemWrite 0x4 clk ALU Control we addr PC addr inst ALU rdata Inst. Memory clk Data Memory Imm Ext wdata Absolute Jumps (J, JAL) PCSrc RegWrite br rind jabs pc+4 Add Add clk we rs1 rs2 31 rd1 ws wd rd2 GPRs z zero? RegDst ExtSel OpCode OpSel BSrc
  • 23. 20 WBSrc MemWrite 0x4 clk we clk rs1 rs2 ALU Control we rd1 addr PC ws addr inst wd rd2 ALU GPRs z rdata Inst. Memory clk Data Memory Imm Ext wdata zero? RegDst ExtSel OpCode OpSel BSrc Harvard-Style Datapath for MIPS PCSrc RegWrite br rind jabs pc+4 Add Add 31
  • 24.
  • 26.
  • 27. No sharing of resources between any two stages
  • 28. Propagation delay through all pipeline stages is equal
  • 29. The scheduling of an object entering the pipeline is not affected by the objects in other stages These conditions generally hold for industrial assembly lines. But can an instruction pipeline satisfy the last condition?
  • 30. 24 Pipelined MIPS To pipeline MIPS: First build MIPS without pipelining with CPI=1 Next, add pipeline registers to reduce cycle time while maintaining CPI=1
  • 31. 25 PC IR write -back phase fetch phase execute phase decode & Reg-fetch phase memory phase Pipelined Datapath 0x4 Add we rs1 rs2 rd1 we addr ws addr rdata ALU wd rd2 rdata GPRs Data Memory Inst. Memory Imm Ext wdata Clock period can be reduced by dividing the execution of an instruction into multiple cycles tC > max {tIM, tRF, tALU, tDM, tRW} ( = tDM probably) However, CPI will increase unless instructions are pipelined
  • 32.
  • 33. Cycles per instructions (CPI) depends upon the ISA and the microarchitecture
  • 34.
  • 35.
  • 36. Multiported Register files (slower!)Thus, the following timing assumption is reasonable tIMtRF tALUtDM tRW A 5-stage pipeline will be the focus of our detailed design - some commercial designs have over 30 pipeline stages to do an integer add!
  • 37. 29 Acknowledgements These slides heavily contain material developed and copyright by KrsteAsanovic (MIT/UCB) David Patterson (UCB) And also by: Arvind (MIT) Joel Emer (Intel/MIT) James Hoe (CMU) John Kubiatowicz (UCB) MIT material derived from course 6.823 UCB material derived from course CS252