WM CSCI 424 - Control Hazards (27 pages)

Previewing pages 1, 2, 3, 25, 26, 27 of 27 page document View the full content.
View Full Document

Control Hazards



Previewing pages 1, 2, 3, 25, 26, 27 of actual document.

View the full content.
View Full Document
View Full Document

Control Hazards

81 views

Other


Pages:
27
School:
College of William & Mary
Course:
Csci 424 - Computer Architecture
Computer Architecture Documents

Unformatted text preview:

Review Datapath with Data Hazard Control PCSrc te Wri D I IF rite PC W Hazard Unit EX MEM 0 Control 0 4 Shift left 2 Instruction Memory PC ID EX MemRead 1 IF ID Add ID EX Read Address Read Addr 1 Read Addr 2Data 1 File Write Addr 16 Sign Extend Read Data 2 32 ID EX RegisterRt MEM WB Branch Data Memory Register Read Write Data Control Hazards 1 Add ALU Address Read Data Write Data ALU cntrl Forward Unit Control Hazards When the flow of instruction addresses is not sequential i e PC PC 4 incurred by change of flow instructions Conditional branches beq bne Unconditional branches j jal jr Exceptions Possible approaches Stall impacts CPI Move decision point as early in the pipeline as possible thereby reducing the number of stall cycles Delay decision requires compiler support Predict and hope for the best Control hazards occur less frequently than data hazards but there is nothing as effective against control hazards as forwarding is for data hazards Control Hazards 2 Datapath Branch and Jump Hardware Jump PCSrc ID EX Shift left 2 IF ID EX MEM Control Add PC 4 31 28 4 PC Instruction Memory Read Address Shift left 2 Add Read Addr 1 Data Memory Register Read Read Addr 2Data 1 File Write Addr Write Data 16 Sign Extend Read Data 2 32 ALU Address Read Data Write Data ALU cntrl Forward Unit Control Hazards 4 MEM WB Branch Jumps Incur One Stall Jumps not decoded until ID so one flush is needed j target IM Reg DM IM Reg ALU O r d e r flush DM ALU j Reg ALU I n s t r IM Fix jump hazard by waiting stall but affects CPI Reg Reg DM Reg Fortunately jumps are very infrequent only 3 of the SPECint instruction mix Control Hazards 5 Supporting ID Stage Jumps Jump PCSrc ID EX Shift left 2 IF ID EX MEM Control Add PC 4 31 28 4 PC Instruction Memory Read Address Shift left 2 Add Read Addr 1 Data Memory Register Read 0 Read Addr 2Data 1 File Write Addr Write Data 16 Sign Extend Read Data 2 32 ALU Address Read Data Write Data ALU cntrl Forward Unit Control Hazards 6 MEM WB Branch Two Types



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view Control Hazards and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Control Hazards and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?