SRC Exception Processing Mechanism

Slides:



Advertisements
Similar presentations
Machine cycle.
Advertisements

Adding the Jump Instruction
Processor Design Computer Architecture CS 215. CPU Design  Control Unit Generates the control signals in the correct order to effect the correct data.
Mary Jane Irwin ( ) [Adapted from Computer Organization and Design,
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
CSCE 212 Chapter 5 The Processor: Datapath and Control Instructor: Jason D. Bakos.
Computer ArchitectureFall 2007 © October 24nd, 2007 Majd F. Sakr CS-447– Computer Architecture.
ECE 232 L19.Pipeline2.1 Adapted from Patterson 97 ©UCBCopyright 1998 Morgan Kaufmann Publishers ECE 232 Hardware Organization and Design Lecture 19 Pipelining,
Computer ArchitectureFall 2007 © October 22nd, 2007 Majd F. Sakr CS-447– Computer Architecture.
Pipelining - II Adapted from CS 152C (UC Berkeley) lectures notes of Spring 2002.
Processor Design Computer Architecture CS 215 Updated 10/21/14.
Computer ArchitectureFall 2008 © October 6th, 2008 Majd F. Sakr CS-447– Computer Architecture.
Pipelining - II Rabi Mahapatra Adapted from CS 152C (UC Berkeley) lectures notes of Spring 2002.
CSE378 Pipelining1 Pipelining Basic concept of assembly line –Split a job A into n sequential subjobs (A 1,A 2,…,A n ) with each A i taking approximately.
Lecture 12: Pipeline Datapath Design Professor Mike Schulte Computer Architecture ECE 201.
S 2/e C D A Computer Systems Design and Architecture Second Edition© 2004 Prentice Hall Chapter 4 Topics The Design Process A 1-bus Microarchitecture for.
Lecture 14 Today’s topics MARIE Architecture Registers Buses
CSE 340 Computer Architecture Summer 2014 Basic MIPS Pipelining Review.
CS.305 Computer Architecture Enhancing Performance with Pipelining Adapted from Computer Organization and Design, Patterson & Hennessy, © 2005, and from.
1 Designing a Pipelined Processor In this Chapter, we will study 1. Pipelined datapath 2. Pipelined control 3. Data Hazards 4. Forwarding 5. Branch Hazards.
Electrical and Computer Engineering University of Cyprus LAB 2: MIPS.
Cs 152 L1 3.1 DAP Fa97,  U.CB Pipelining Lessons °Pipelining doesn’t help latency of single task, it helps throughput of entire workload °Multiple tasks.
CSIE30300 Computer Architecture Unit 04: Basic MIPS Pipelining Hsin-Chou Chi [Adapted from material by and
S 2/e C D A Computer Systems Design and Architecture Second Edition© 2004 Prentice Hall Chapter 4 Topics The Design Process A 1-bus Microarchitecture for.
CSE431 L06 Basic MIPS Pipelining.1Irwin, PSU, 2005 MIPS Pipeline Datapath Modifications  What do we need to add/modify in our MIPS datapath? l State registers.
SRC: instruction formats Op-coderarb rc c Type D Op-code Type Aunused Op-codera Type Bc1 21 Op-coderarb.
Electrical and Computer Engineering University of Cyprus
Block diagram of a Microcoded Control unit
Computer Organization
A Uni-bus Data Path Implementation for the SRC
CSCI206 - Computer Organization & Programming
A 3-bus implementation for the SRC
Structural RTL for the br and brl instructions
ELEN 468 Advanced Logic Design
Prof. Sirer CS 316 Cornell University
Instruction Execution (Load and Store instructions)
External CPU Bus Activity
Decode and Operand Read
Pipelining Lessons 6 PM T a s k O r d e B C D A 30
School of Computing and Informatics Arizona State University
The fetch-execute cycle
Chapter 4 The Processor Part 2
CSCE 212 Chapter 5 The Processor: Datapath and Control
Chapter 4: Processor Design
Computer Architecture
CS 704 Advanced Computer Architecture
Computer Organization and ASSEMBLY LANGUAGE
CS-447– Computer Architecture Lecture 14 Pipelining (2)
Systems Architecture II
Pipelining Lessons 6 PM T a s k O r d e B C D A 30
CSCI206 - Computer Organization & Programming
\course\cpeg323-05F\Topic6b-323
Pipelining Basic concept of assembly line
The Processor Lecture 3.4: Pipelining Datapath and Control
Fields in the FALCON-A Instruction
Enhancing Data Path M 4-bit Reg X A L U
IR <2..0> CON 3-to-8 Decoder Never Branch Always Branch
Data Dependence Distances
Designing a Pipelined CPU
ARM Introduction.
Pipelining Basic concept of assembly line
Pipelining Basic concept of assembly line
RTL for the SRC pipeline registers
Lecture 6 CdM-8 CPU overview
CS501 Advanced Computer Architecture
Reverse Assembly Typical problem:
CMCS Computer Architecture Lecture 20 Pipelined Datapath and Control April 11, CMSC411.htm Mohamed.
Computer Architecture
CS161 – Design and Architecture of Computer Systems
Presentation transcript:

SRC Exception Processing Mechanism Interrupt Request ireq: Interrupt Acknowldge iack: Disable Interrupt Flag IE: Get interrupt Info. Isrc-info <15…0> Load PC with Exception Vector Ivect<31…0> Save PC in IPC<31...0>

Behavioral RTL for Exception Processing Instruction_interpretation:= (!Run&Strt: Run  1: Run & !(ireq&IE):(IR M[PC], PC  PC + 4; Instruction_execution), Run&(ireq&IE): (IPC  PC<31..0>, II<15..0>  Isrc_info<15..0>, IE  0: PC  Ivect<31..0>, Iack  1; Iack  0) , Instruction_interpretation); Meaning Start Normal Fetch Interrupt, PC copied II is loaded with the info. PC loaded with new address

Additional Instructions to support interrupts mnemonic Behavioral RTL Meaning svi (op=16) R[ra]<15..0>  II<15..0>, R[rb]  IPC<31..0>; Save II and IPC ri (op=17) II<15..0>  R[ra]<15..0>, IPC<31..0>  R[rb]; Restore II and IPC een (op=10) IE  1; Exception enable edi (op=11) IE  0; Exception disable rfi (op=30) PC  IPC, IE  1; Return from interrupt

Structural RTL for Exception Processing Step Concrete RTN TO (!(ireq&IE): (MA  PC, C  PC + 4); (ireq&IE): (IPC  PC,II Isrc_info, IE  0,PC  22α 0©Isrc_vect<7..0> © 00,iack  1;iack  0,End); T1 MD  M[MA],PC  C; T2 IR  MD; T3 Instruction_execution;

Combining the RTL for reset and exception Instruction interpretation:= Events Run&!Rst&!(ireq&IE):(IR  M[PC], PC  PC+4; Normal Fetch Run&Rst:( Rst 0 , IE  0, PC  0 Soft Reset !Run&Strt:(Run 1, PC  0, R[0..31]  0; Hard Reset Run&!Rst&(ireq&IE):(IPC  PC<31..0>, II<15..0>  Isrc_info<15..0>,IE  0, PC  Ivect<31..0>,iack  1; iack  0; Interrupt

Executing machine instructions with and without pipelining Fetch Inst. Operand ALU Operation Memory Access Register Write add r4, r2, r3 Without Pipelining Only one functional unit busy Fetch Inst. Fetch Operand ALU Operation Memory Access Register Write ld r1, a st r2, b add r4, r2, r3 sub r6, r7, r5 shl r1, r2, 4 All functional units busy With Pipelining

Pipeline Stages 5 pipeline stages are shown 1. Fetch instruction ld r1, a 5 pipeline stages are shown 1. Fetch instruction 2. Fetch operands 3. ALU operation 4. Memory access 5. Register write 5 instructions are executing 1. ld r1, a ; memory access 2. st r2, b ; idle 3. add r4, r2, r3 ; ALU op 4. sub r6, r7, r5 ; idle 5. shr r1, r2, 4 ; write back Fetch Operand st r2, b ALU Operation add r4, r2, r3 Memory Access sub r6, r7, r5 Register Write shr r1, r2, 4

Pipeline Stages: alternate notation Cycle 1 Cycle 2 Cycle 3 Cycle 4 Cycle 5 Ifetch Reg/Dec Exec Mem Wr lw Ifetch: Instruction Fetch Reg/Dec: Operand Fetch and Instruction Decode Exec: ALU operation Mem: Memory access stage Wr: Write the data back to the register file

Dependence Example Consider the following two instructions going through the pipeline as shown add r3, r2, r1 sub r4, r5, r3 r3 is the destination written in 5th stage r3 is the operand required in 2nd stage Cycle 1 Cycle 2 Cycle 3 Cycle 4 Cycle 5 Ifetch Reg/Dec Exec Mem Wr add r3, r2, r1 Ifetch Reg/Dec Exec Mem Wr sub r4, r5, r3

Branch and Load Delay example Branch Delay brzr r2, r3 add r6, r7, r8 ;This instruction is always executed st r6, addr1 ;Only done if r2 ≠0 Load Delay ld r2,addr add r5, r1, r2 ;This instruction gets “old”value of r2 shr r1,r1,4 sub r6, r8, r2 ;This instruction gets r2 value loaded from addr

Review

CS501 Advanced Computer Architecture Lecture18 Dr.Noor Muhammad Sheikh

CS501 Advanced Computer Architecture

Exceptions

Bandwidth and Latency

Pipelining

Pipeline Design Requirements

Pipelining Stalls