This document appears to be slides from a lecture on pipelining. It discusses various types of pipeline hazards including structural hazards where the same hardware is needed for multiple instructions, data hazards where an instruction depends on the result of a prior instruction, and control hazards caused by delays in determining branch outcomes. It provides examples of each hazard type and describes techniques for resolving the hazards such as stalling the pipeline, forwarding results between stages, and predicting branch outcomes earlier. The document emphasizes that pipelining can improve processor throughput but hazards may reduce its effectiveness if not addressed properly.
Condition Monitoring of a Large-scale PV Power Plant in AustraliaAmit Dhoke
Ā
This presentation considers the problems of condition
monitoring and fault detection in an existing solar photovoltaic
(PV) plant in Australia. A PV prediction model is proposed to
accurately model the PV plant output. This model is then used
with three condition monitoring and fault detection methods.
The considered methods involve comparison of measured and
modeled voltage and current ratios with appropriate thresholds
and adjacent string values. The procedure to calculate
thresholds is described. The proposed PV model and the
condition monitoring approaches are collectively used with real
PV data. As a result, the string disconnection and bypassed
module faults are detected. It is also found that the string level
monitoring is ideally suited for reliable condition monitoring
and fault detection, especially for large PV plants.
Complex test pattern generation for high speed fault diagnosis in Embedded SRAMIJMER
Ā
International Journal of Modern Engineering Research (IJMER) is Peer reviewed, online Journal. It serves as an international archival forum of scholarly research related to engineering and science education.
International Journal of Modern Engineering Research (IJMER) covers all the fields of engineering and science: Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Computer Engineering, Agricultural Engineering, Aerospace Engineering, Thermodynamics, Structural Engineering, Control Engineering, Robotics, Mechatronics, Fluid Mechanics, Nanotechnology, Simulators, Web-based Learning, Remote Laboratories, Engineering Design Methods, Education Research, Students' Satisfaction and Motivation, Global Projects, and Assessmentā¦. And many more.
Goal-directed evaluation of Answer Set Programs is gaining traction thanks to its amenability to create AI systems that can, due to the evaluation mechanism used, generate explanations and justifications. s(CASP) is one of these systems and has been already used to write reasoning systems in several fields. It provides enhanced expressiveness w.r.t. other ASP systems due to its ability to use constraints, data structures, and unbound variables natively. However, the performance of existing s(CASP) implementations is not on par with other ASP systems: model consistency is checked once models have been generated, in keeping with the generate-and-test paradigm. In this work, we present a variation of the top-down evaluation strategy, termed Dynamic Consistency Checking, which interleaves model generation and consistency checking. This makes it possible to determine when a literal is not compatible with the denials associated to the global constraints in the program, prune the current execution branch, and choose a different alternative. This strategy is specially (but not exclusively) relevant in problems with a high combinatorial component. We have experimentally observed speedups of up to 90x w.r.t. the standard versions of s(CASP).
A 2015 presentation to introduce users to Java profiling. The Yourkit Profiler is used for concrete examples. The following topics are covered:
1) When to profile
2) Profiler sampling
3) Profiler instrumentation
4) Where to Start
5) Macro vs micro benchmarking
Fall 2016 Insurance Case Study ā Finance 360Loss ControlLoss.docxlmelaine
Ā
Fall 2016 Insurance Case Study ā Finance 360
Loss Control
Loss control activities of a business focus on finding and implementing solutions to reduce the probability of loss (loss prevention) and/or reduce the actual amount of loss (loss reduction), and therefore reduce the total cost of risk to maximize firm profitability.
Loss control techniques have been widely used in environmental loss prevention, catastrophic loss prevention, and employee-related risk management. Many firms face loss exposures caused by using, storing, and transporting hazardous materials, caustic substances, gasses, acids, etc., and may have unique issues posed by deployment of āgreenerā vehicle fleets using CNG, LNG, and bio-fuel solutions. Catastrophic risks, such as earthquakes, tornado, hurricanes or big fire, also pose significant threat to the property safety and business continuation for firms. Employee behavior-related risks and product safety are also important concern of corporate risk management.
Lack of effective loss control (such as inadequate systems, inadequate standards, and inadequate compliance with safety standards) may cause significant damage to a firm, such as injury costs, property damage, liability damage, bad press, lower sales, loss of employee morale, so on and so forth, as British Petroleum (BP) or Toyota had suffered in the past.
In this project, select an S&P 500 company and analyze its loss control policies focusing on either environmental loss prevention, or catastrophic loss prevention, or employee-related risk management.
Your analysis should address the following questions in the least:
Ā· How likely the firm is subject to catastrophic losses?
Ā· Has the business suffered losses of the kind in the past?
Ā· What losses could be caused to the firm if a catastrophic event occurs?
A. Direct Property Loss
B. Indirect (or consequential) Property Loss
C. Liability Loss
D. Personnel Loss
E. Crime
F. Other Loss Exposures
Ā· What loss control activities has the firm implemented to reduce the loss?
Ā· E.g. For Property loss control, comment on Facility design and construction, Automatic Sprinkler Protection, Preventative maintenance, Equipment and Process controls and safeguards, Human Element programs, Pre-incident planning and Business continuity planning
Ā· Proactive Safety procedures vs. Reactive Safety & Recovery policies
Requirements
1. Paper length: 8 page minimum, 12 page maximum; 12 point fontādouble-spaced
2. Paper sections
A. Title Page, including: (1) paper title, (2) course number and name, (3) instructor, (4) your name, and (5) date submitted
B. Executive Summary: This is a 1-2 paragraph overall summary of your paper.
C. Discussion and analysis: Cover all the individual topic areas set out above, each of which should be labeled with an appropriate subject heading.
D. Works Cited: List all secondary sources consulted in preparing this paper.
E. Attachments (if any). You may append any relevant attachment to ...
Gene's law, Common gate, kernel Principal Component Analysis, ASIC Physical Design Post-Layout Verification, TSMC180nm, 0.13um IBM CMOS technology, Cadence Virtuoso, FPAA, in Spanish, Bruun E,
Crossing the Boundaries: Development Strategies for (P)SoCsAndreas Koschak
Ā
Not many years ago, FPGAs designed to be used in quantities contained a number of logic cells that were easy to fill using pure RTL or even schematic design tools. Now the boundaries between hardware and software have started to blur. With the advent of large scale FPGAs, structured ASICs and programmable SoCs, the massively increased complexity requires higher level design tools and better controlled development strategies, such as the ones used in ASIC design. Other approaches can be taken from the software development world. This talk highlights some strategies that allow designers to increase the quality of their designs without high costs and still be technology neutral and flexible during the course of the project.
Condition Monitoring of a Large-scale PV Power Plant in AustraliaAmit Dhoke
Ā
This presentation considers the problems of condition
monitoring and fault detection in an existing solar photovoltaic
(PV) plant in Australia. A PV prediction model is proposed to
accurately model the PV plant output. This model is then used
with three condition monitoring and fault detection methods.
The considered methods involve comparison of measured and
modeled voltage and current ratios with appropriate thresholds
and adjacent string values. The procedure to calculate
thresholds is described. The proposed PV model and the
condition monitoring approaches are collectively used with real
PV data. As a result, the string disconnection and bypassed
module faults are detected. It is also found that the string level
monitoring is ideally suited for reliable condition monitoring
and fault detection, especially for large PV plants.
Complex test pattern generation for high speed fault diagnosis in Embedded SRAMIJMER
Ā
International Journal of Modern Engineering Research (IJMER) is Peer reviewed, online Journal. It serves as an international archival forum of scholarly research related to engineering and science education.
International Journal of Modern Engineering Research (IJMER) covers all the fields of engineering and science: Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Computer Engineering, Agricultural Engineering, Aerospace Engineering, Thermodynamics, Structural Engineering, Control Engineering, Robotics, Mechatronics, Fluid Mechanics, Nanotechnology, Simulators, Web-based Learning, Remote Laboratories, Engineering Design Methods, Education Research, Students' Satisfaction and Motivation, Global Projects, and Assessmentā¦. And many more.
Goal-directed evaluation of Answer Set Programs is gaining traction thanks to its amenability to create AI systems that can, due to the evaluation mechanism used, generate explanations and justifications. s(CASP) is one of these systems and has been already used to write reasoning systems in several fields. It provides enhanced expressiveness w.r.t. other ASP systems due to its ability to use constraints, data structures, and unbound variables natively. However, the performance of existing s(CASP) implementations is not on par with other ASP systems: model consistency is checked once models have been generated, in keeping with the generate-and-test paradigm. In this work, we present a variation of the top-down evaluation strategy, termed Dynamic Consistency Checking, which interleaves model generation and consistency checking. This makes it possible to determine when a literal is not compatible with the denials associated to the global constraints in the program, prune the current execution branch, and choose a different alternative. This strategy is specially (but not exclusively) relevant in problems with a high combinatorial component. We have experimentally observed speedups of up to 90x w.r.t. the standard versions of s(CASP).
A 2015 presentation to introduce users to Java profiling. The Yourkit Profiler is used for concrete examples. The following topics are covered:
1) When to profile
2) Profiler sampling
3) Profiler instrumentation
4) Where to Start
5) Macro vs micro benchmarking
Fall 2016 Insurance Case Study ā Finance 360Loss ControlLoss.docxlmelaine
Ā
Fall 2016 Insurance Case Study ā Finance 360
Loss Control
Loss control activities of a business focus on finding and implementing solutions to reduce the probability of loss (loss prevention) and/or reduce the actual amount of loss (loss reduction), and therefore reduce the total cost of risk to maximize firm profitability.
Loss control techniques have been widely used in environmental loss prevention, catastrophic loss prevention, and employee-related risk management. Many firms face loss exposures caused by using, storing, and transporting hazardous materials, caustic substances, gasses, acids, etc., and may have unique issues posed by deployment of āgreenerā vehicle fleets using CNG, LNG, and bio-fuel solutions. Catastrophic risks, such as earthquakes, tornado, hurricanes or big fire, also pose significant threat to the property safety and business continuation for firms. Employee behavior-related risks and product safety are also important concern of corporate risk management.
Lack of effective loss control (such as inadequate systems, inadequate standards, and inadequate compliance with safety standards) may cause significant damage to a firm, such as injury costs, property damage, liability damage, bad press, lower sales, loss of employee morale, so on and so forth, as British Petroleum (BP) or Toyota had suffered in the past.
In this project, select an S&P 500 company and analyze its loss control policies focusing on either environmental loss prevention, or catastrophic loss prevention, or employee-related risk management.
Your analysis should address the following questions in the least:
Ā· How likely the firm is subject to catastrophic losses?
Ā· Has the business suffered losses of the kind in the past?
Ā· What losses could be caused to the firm if a catastrophic event occurs?
A. Direct Property Loss
B. Indirect (or consequential) Property Loss
C. Liability Loss
D. Personnel Loss
E. Crime
F. Other Loss Exposures
Ā· What loss control activities has the firm implemented to reduce the loss?
Ā· E.g. For Property loss control, comment on Facility design and construction, Automatic Sprinkler Protection, Preventative maintenance, Equipment and Process controls and safeguards, Human Element programs, Pre-incident planning and Business continuity planning
Ā· Proactive Safety procedures vs. Reactive Safety & Recovery policies
Requirements
1. Paper length: 8 page minimum, 12 page maximum; 12 point fontādouble-spaced
2. Paper sections
A. Title Page, including: (1) paper title, (2) course number and name, (3) instructor, (4) your name, and (5) date submitted
B. Executive Summary: This is a 1-2 paragraph overall summary of your paper.
C. Discussion and analysis: Cover all the individual topic areas set out above, each of which should be labeled with an appropriate subject heading.
D. Works Cited: List all secondary sources consulted in preparing this paper.
E. Attachments (if any). You may append any relevant attachment to ...
Gene's law, Common gate, kernel Principal Component Analysis, ASIC Physical Design Post-Layout Verification, TSMC180nm, 0.13um IBM CMOS technology, Cadence Virtuoso, FPAA, in Spanish, Bruun E,
Crossing the Boundaries: Development Strategies for (P)SoCsAndreas Koschak
Ā
Not many years ago, FPGAs designed to be used in quantities contained a number of logic cells that were easy to fill using pure RTL or even schematic design tools. Now the boundaries between hardware and software have started to blur. With the advent of large scale FPGAs, structured ASICs and programmable SoCs, the massively increased complexity requires higher level design tools and better controlled development strategies, such as the ones used in ASIC design. Other approaches can be taken from the software development world. This talk highlights some strategies that allow designers to increase the quality of their designs without high costs and still be technology neutral and flexible during the course of the project.
Similar to 2-Advanced Computer Architecture Pipelining (20)
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Ā
Francesca Gottschalk from the OECDās Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Ā
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
ā¢ The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
ā¢ The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate āany matterā at āany timeā under House Rule X.
ā¢ The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Embracing GenAI - A Strategic ImperativePeter Windle
Ā
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Ā
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Ā
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Hanās Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insiderās LMA Course, this piece examines the courseās effects via a variety of Tim Han LMA course reviews and Success Insider comments.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
Ā
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
Ā
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasnāt one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Operation āBlue Starā is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Ā
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
Safalta Digital marketing institute in Noida, provide complete applications that encompass a huge range of virtual advertising and marketing additives, which includes search engine optimization, virtual communication advertising, pay-per-click on marketing, content material advertising, internet analytics, and greater. These university courses are designed for students who possess a comprehensive understanding of virtual marketing strategies and attributes.Safalta Digital Marketing Institute in Noida is a first choice for young individuals or students who are looking to start their careers in the field of digital advertising. The institute gives specialized courses designed and certification.
for beginners, providing thorough training in areas such as SEO, digital communication marketing, and PPC training in Noida. After finishing the program, students receive the certifications recognised by top different universitie, setting a strong foundation for a successful career in digital marketing.
3. Dr. Shadrokh Samavi 3
Some slides are from the instructorsā resources which
accompany the 5th and previous editions.
Some slides are from David Patterson, David Culler
and Krste Asanovic of UC Berkeley; Israel Koren
of UM Amherst, and Milos Prvulovic of Georgia
Tech.
Sources of some slides are mentioned at the bottom
of the page.
Please inform me if I am missing a name in the above
list.
3
13. Dr. Shadrokh Samavi 13
Simple RISC Pipeline
Clock number
Instruction number 1 2 3 4 5 6 7 8 9
Instruction i IF ID EX MEM WB
Instruction i + 1 IF ID EX MEM WB
Instruction i + 2 IF ID EX MEM WB
Instruction i + 3 IF ID EX MEM WB
Instruction i + 4 IF ID EX MEM WB
17. Dr. Shadrokh Samavi 17
ā¢ Hazards: circumstances that would cause incorrect
execution if next instruction were launched
ā Structural hazards: Attempting to use the same
hardware to do two different things at the
same time
ā Data hazards: Instruction depends on result of
prior instruction still in the pipeline
ā Control hazards: Caused by delay between the
fetching of instructions and decisions about
changes in control flow (branches and jumps).
19. Dr. Shadrokh Samavi 19
Example: Structural Hazard
I
n
s
t
r.
O
r
d
e
r
Time (clock cycles)
Load
Instr 1
Instr 2
Instr 3
Instr 4
Reg
ALU
DMem
Ifetch Reg
Reg
ALU
DMem
Ifetch Reg
Reg
ALU
DMem
Ifetch Reg
Reg
ALU
DMem
Ifetch Reg
Cycle 1 Cycle 2 Cycle 3 Cycle 4 Cycle 6 Cycle 7
Cycle 5
DMem
Structural Hazard
20. Dr. Shadrokh Samavi 20
Resolving structural hazards
ā¢ Definition of structural hazard: attempt to
use same hardware for two different things
at the same time
ā¢ Solution 1: Wait (stall)
ļmust detect the hazard
ļmust have mechanism to stall
ā¢ Solution 2: Use more hardware
22. Dr. Shadrokh Samavi 22
Eliminating Structural Hazards at Design
Time
ALU
Instr
Cache
Reg
File
MUX
MUX
Data
Cache
MUX
Sign
Extend
Zero?
IF/ID
ID/EX
MEM/WB
EX/MEM
4
Adder Next SEQ PC Next SEQ PC
RD RD RD
WB
Data
Next PC
Address
RS1
RS2
Imm
MUX
Datapath
Control Path
23. Dr. Shadrokh Samavi 23
WB
M
EX
WB
M WB
Control
IF/ID ID/EX EX/MEM MEM/WB
Instruction
RegDst
ALUOp
ALUSrc
Branch
MemRead
MemWrite
MemtoReg
RegWrite
strip off signals for
execution phase
strip off signals for
write-back phase
strip off signals for
memory phase
Genera-
tion
CSE 60321 University of Notre Dame
24. Dr. Shadrokh Samavi 24
Role of ISA in Structural Hazard Resolution
ā¢ Simple to determine the sequence of
resources used by an instruction
ā opcode tells it all
ā¢ Uniformity in the resource usage
ā¢ Compare MIPS to IA32?
ā¢ MIPS approach => all instructions flow
through same 5-stage pipelining
26. Dr. Shadrokh Samavi 26
Program
execution
order
(in
instructions)
Time (in clock cycles)
CC1 CC2 CC3 CC4 CC5 CC6
ADD R1, R2, R3 DM
DM
DM
Reg
Reg
Reg
IM
IM
IM
Reg
Reg
ALU
ALU
ALU
LW R4, 0(R1)
SW 12(R1), R4
Stores require an operand during MEM, and forwarding of
that operand is shown here
27. Dr. Shadrokh Samavi 27
Data Hazards Classification
Resource Objects (R.O.): all addressable locations
Data Objects (D.O.): content of resource objects
D(I): Domain of instruction I = all R.O. that their
D.O. effect the operation of I.
R(I): Range of instruction I = all R.O. that their
D.O. are effected by the execution of I.
28. Dr. Shadrokh Samavi 28
A RAW hazard exists on register ļ²
if ļ² ļ R ( i ) ļ D( j ) ļ¹ ļ¦
A WAW hazard exists on register ļ²
if ļ² ļ R( i ) ļ R(j ) ļ¹ ļ¦
A WAR hazard exists on register ļ²
if ļ² ļ D( i ) ļ R (j ) ļ¹ ļ¦
29. Dr. Shadrokh Samavi 29
D(I) R(I)
D(J) D(J)
I
write
Read
J
D(J) R(J)
D(I) D(I)
J
write
Read
I
D(I)
R(I)
D(J) R(J)
I
write
write
J
RAW
WAW
WAR
30. Dr. Shadrokh Samavi 30
ā¢ Read After Write (RAW)
InstrJ tries to read operand before InstrI writes it
ā¢ Caused by a āData Dependenceā (in compiler
nomenclature). This hazard results from an actual
need for communication.
Three Generic Data Hazards
I: add r1,r2,r3
J: sub r4,r1,r3
31. Dr. Shadrokh Samavi 31
ā¢ Write After Read (WAR)
InstrJ writes operand before InstrI reads it
ā¢ Called an āanti-dependenceā by compiler writers.
This results from reuse of the name ār1ā.
ā¢ Canāt happen in MIPS 5 stage pipeline because:
ā All instructions take 5 stages, and
ā Reads are always in stage 2, and
ā Writes are always in stage 5
I: sub r4,r1,r3
J: add r1,r2,r3
K: mul r6,r1,r7
Three Generic Data Hazards
32. Dr. Shadrokh Samavi 32
ā¢ Write After Write (WAW)
InstrJ writes operand before InstrI writes it.
ā¢ Called an āoutput dependenceā by compiler writers
This also results from the reuse of name ār1ā.
ā¢ Canāt happen in MIPS 5 stage pipeline because:
ā All instructions take 5 stages, and
ā Writes are always in stage 5
ā¢ Will see WAR and WAW in later more complicated
pipes
I: sub r1,r4,r3
J: add r1,r2,r3
K: mul r6,r1,r7
Three Generic Data Hazards
33. Dr. Shadrokh Samavi 33
Time (clock cycles)
Forwarding to Avoid Data Hazard
I
n
s
t
r.
O
r
d
e
r
add r1,r2,r3
sub r4,r1,r3
and r6,r1,r7
or r8,r1,r9
xor r10,r1,r11
Reg
ALU
DMem
Ifetch Reg
Reg
ALU
DMem
Ifetch Reg
Reg
ALU
DMem
Ifetch Reg
Reg
ALU
DMem
Ifetch Reg
Reg
ALU
DMem
Ifetch Reg
35. Dr. Shadrokh Samavi 35
Resolving this load hazard
ā¢ Adding hardware? ... not
ā¢ Detection?
ā¢ Compilation techniques?
ā¢ What is the cost of load delays?
36. Dr. Shadrokh Samavi 36
Resolving the Load Data Hazard
Time (clock cycles)
or r8,r1,r9
I
n
s
t
r.
O
r
d
e
r
lw r1, 0(r2)
sub r4,r1,r6
and r6,r1,r7
Reg
ALU
DMem
Ifetch Reg
Reg
Ifetch
ALU
DMem Reg
Bubble
Ifetch
ALU
DMem Reg
Bubble Reg
Ifetch
ALU
DMem
Bubble Reg
How is this different from the instruction issue stall?
37. Dr. Shadrokh Samavi 37
Try producing fast code for
a = b + c;
d = e ā f;
assuming a, b, c, d ,e, and f in memory.
Slow code:
LW Rb,b
LW Rc,c
ADD Ra,Rb,Rc
SW a,Ra
LW Re,e
LW Rf,f
SUB Rd,Re,Rf
SW d,Rd
Software Scheduling to Avoid Load Hazards
Fast code:
LW Rb, b
LW Rc, c
LW Re,e
ADD Ra, Rb, Rc
LW Rf, f
SW a,Ra
SUB Rd, Re, Rf
SW d,Rd
38. Dr. Shadrokh Samavi 38
Instruction Set Connection
ā¢ What is exposed about this organizational
hazard in the instruction set?
ā¢ k cycle delay?
ā bad, CPI is not part of ISA
ā¢ k instruction slot delay
ā load should not be followed by use of the value in the
next k instructions
ā¢ Nothing, but code can reduce run-time
delays
ā¢ MIPS did the transformation in the
assembler
39. Dr. Shadrokh Samavi 39
Fraction of loads that cause a stall
Benchmark
compress
eqntott
espresso
gcc
li
doduc
ear
hydro2d
mdljdp
su2cor
24%
41%
12%
23%
24%
20% 20%
10% 10%
4%
0%
5%
10%
15%
20%
25%
30%
35%
40%
45%
40. Dr. Shadrokh Samavi 40
Control Hazard on Branches
=> Three Stage Stall
10: beq r1,r3,36
14: and r2,r3,r5
18: or r6,r1,r7
22: add r8,r1,r9
36: xor r10,r1,r11
Reg
ALU
DMem
Ifetch Reg
Reg
ALU
DMem
Ifetch Reg
Reg
ALU
DMem
Ifetch Reg
Reg
ALU
DMem
Ifetch Reg
Reg
ALU
DMem
Ifetch Reg
41. Dr. Shadrokh Samavi 41
Example: Branch Stall Impact
ā¢ If 30% branch, Stall 3 cycles significant
ā¢ Two part solution:
ā Determine branch taken or not sooner, AND
ā Compute taken branch address earlier
ā¢ MIPS branch tests if register = 0 or ļ¹ 0
ā¢ MIPS Solution:
ā Move Zero test to ID/RF stage
ā Adder to calculate new PC in ID/RF stage
ā 1 clock cycle penalty for branch versus 3
42. Dr. Shadrokh Samavi 42
The frequency of
instructions
that may change
the PC
Percentage of instructions executed
0% 25%
5% 10% 15% 20%
10%
0%
0%
2%
1%
2%
6%
4%
4%
6%
2%
2%
11%
8%
4%
12%
4%
3%
11%
1%
4%
22%
2%
2%
11%
3%
3%
9%
0%
1%
Forward conditional
branches
Unconditional branches
Backward conditional
branches
Benchmark
compress
eqntott
espresso
gcc
li
doduc
ear
hydro2d
mdljdp
su2cor
43. Dr. Shadrokh Samavi 43
Four Branch Hazard Alternatives
#1: Stall until branch direction is clear
#2: Predict Branch Not Taken
ā Execute successor instructions in sequence
ā āSquashā instructions in pipeline if branch actually taken
ā Advantage of late pipeline state update
ā 47% MIPS branches not taken on average
ā PC+4 already calculated, so use it to get next instruction
#3: Predict Branch Taken
ā 53% MIPS branches taken on average
ā But havenāt calculated branch target address in MIPS
Ā» MIPS still incurs 1 cycle branch penalty
Ā» Other machines: branch target known before outcome
44. Dr. Shadrokh Samavi 44
#4: Delayed Branch
ā Define branch to take place AFTER a following instruction
branch instruction
sequential successor1
sequential successor2
........
sequential successorn
........
branch target if taken
ā 1 slot delay allows proper decision and branch target
address in 5 stage pipeline
ā MIPS uses this
Branch delay of length n
Four Branch Hazard Alternatives
45. Dr. Shadrokh Samavi 45
ā¢ Where to get instructions to fill branch delay slot?
ā Before branch instruction
ā From the target address: only valuable when branch taken
ā From fall through: only valuable when branch not taken
ā Canceling branches allow more slots to be filled
ā¢ Compiler effectiveness for single branch delay slot:
ā Fills about 60% of branch delay slots
ā About 80% of instructions executed in branch delay slots useful in
computation
ā About 50% (60% x 80%) of slots usefully filled
ā¢ Delayed Branch downside: 7-8 stage pipelines,
multiple instructions issued per clock (superscalar)
Delayed Branch
46. Dr. Shadrokh Samavi 46
(a) From before (b) From target (c) From fall through
SUB R4, R5, R6
ADD R1, R2, R3
if R1 = 0 then
ADD R1, R2, R3
if R1 = 0 then
SUB R4, R5, R6
SUB R4, R5, R6
ADD R1, R2, R3
if R1 = 0 then
OR R7, R8, R9
ADD R1, R2, R3
if R1 = 0 then
SUB R4, R5, R6
ADD R1, R2, R3
if R2 = 0 then
if R2 = 0 then
ADD R1, R2, R3
Becomes
Becomes
Becomes
Delay slot
Delay slot
Delay slot
OR R7, R8, R9
SUB R4, R5, R6
47. Dr. Shadrokh Samavi 47
Canceling or Nullifying Branch.
In a canceling branch, the instruction includes the
direction that the branch was predicted. When the
branch behaves as predicted, the instruction in the
branch-delay slot is simply executed as it would
normally be with a delayed branch. When the branch
is incorrectly predicted, the instruction in the
branch-delay slot is simply turned into a no-op.
48. Dr. Shadrokh Samavi 48
Delayed-branch scheduling schemes
Scheduling strategy
(a) From before.
(b) From target
(c) From fall
through
Improves performance when?
Always.
When branch is taken. May
enlarge program if
instructions are duplicated.
When branch is not taken.
Requirements
ā¢Branch must not depend
on the rescheduled
instructions
ā¢Must be OK to execute
rescheduled instructions
if branch is not taken.
May need to duplicate
instructions.
ā¢Must be OK to execute
instructions if branch is
taken.
49. Dr. Shadrokh Samavi 49
The behavior of a predicted-taken canceling branch
depends on whether the branch is taken or not.
Branch is NOT TAKEN (wrong prediction)
Branch is TAKEN ( predicted correctly)
52. Dr. Shadrokh Samavi 52
For an R4000-style pipeline, it takes 3 pipeline stages before the
branch target address is known & 1 more cycle to evaluate branch
condition. This leads to the following branch penalties:
Find the effective addition to the CPI arising from branches given
that the relative frequency of unconditional, conditional untaken, and
conditional taken branches are 4%, 6%, and 10%, respectively.
53. Dr. Shadrokh Samavi 53
Control Hazards
1. Find out whether the branch is taken or not taken
earlier in the pipeline.
2. Compute the taken PC (i.e., the address of the branch
target) earlier.
Branch instruction IF ID EX MEM WB
Branch successor IF stall stall IF ID EX MEM WB
Branch successor + 1 IF ID EX MEM WB
Branch successor + 2 IF ID EX MEM
Branch successor + 3 IF ID EX
Branch successor + 4 IF ID
Branch successor + 5 IF
62. Dr. Shadrokh Samavi 62
Situation
Example code
sequence Action
No dependence LWR1,45(R2)
ADD R5,R6,R7
SUB R8,R6,R7
OR R9,R6,R7
No hazard possible because no dependence
exists on R1 in the immediately following
three instructions
.
Dependence
requiring stall
LWR1,45(R2)
ADD R5,
R1,R7
SUB R8,R6,R7
OR R9,R6,R7
Comparators detect the use of R1 in the
ADD and stall the ADD (and SUB and OR)
before the ADD begins EX.
Dependence
overcome by
forwarding
LWR1,45(R2)
ADD R5,R6,R7
SUB R8,R1,R7
OR R9,R6,R7
Comparators detect use of R1 in SUB
and forward result of load to ALU in
time for SUB to begin EX.
Dependence
with accesses
in order
LWR1,45(R2)
ADD R5,R6,R7
SUB R8,R6,R7
OR R9,R1,R7
No action required because the read of R1
by OR occurs in the second half of the ID
phase, while the write of the loaded data
occurred in the first half.
No action required because the read of R1
by OR occurs in the second half of the ID
phase, while the write of the loaded data
occurred in the first half.
Situations that the pipeline hazard detection hardware can see by
comparing the destination and sources of adjacent instructions.
63. Dr. Shadrokh Samavi 63
Forwarding of data
Pipeline
register
containing
source
instruction
Opcode
of source
instruction
Pipeline
register
containing
destination
instruction
Opcode of
destination
instruction
Destination
of the
forwarded
result
Comparison
(if equal then
forward)
EX/MEM ID/EX
ALU immediate, load,
store, branch
Top ALU
input
EX/MEM.IR 16..20 ==
ID/EX.IR 6..10
EX/MEM ID/EX Bottom ALU
input
EX/MEM.IR 16..20 ==
ID/EX.IR 11..15
MEM/WB ID/EX Register-register ALU,
ALU immediate, load,
store, branch
MEM/WB.IR 16..20 ==
ID/EX.IR 6..10
MEM/WB ID/EX Register-register ALU MEM/WB.IR 16..20 ==
ID/EX.IR 11..15
EX/MEM ALU
immediate
ID/EX
ALU immediate, load,
store, branch
EX/MEM.IR 11..15 ==
ID/EX.IR 6..10
EX/MEM ALU
immediate
ID/EX EX/MEM.IR 11..15 ==
ID/EX.IR 11..15
MEM/WB ALU
immediate
ID/EX
ALU immediate, load,
store, branch
MEM/WB.IR 11..15 ==
ID/EX.IR 6..10
MEM/WB ALU
immediate
ID/EX MEM/WB.IR 11..15 ==
ID/EX.IR 11..15
MEM/WB Load ID/EX
ALU immediate, load,
store, branch
MEM/WB.IR 11..15 ==
ID/EX.IR 6..10
MEM/WB Load ID/EX MEM/WB.IR 11..15 ==
ID/EX.IR 11..15
Register-register ALU
Register-register ALU
Register-register ALU
Register-register ALU
Register-register ALU
Register-register ALU
Register-register ALU,
Register-register ALU,
Register-
register ALU,
Register-
register ALU,
Register-
register ALU,
Register-
register ALU,
Top ALU
input
Bottom ALU
input
Top ALU
input
Bottom ALU
input
Top ALU
input
Bottom ALU
input
Top ALU
input
Bottom ALU
input
64. Dr. Shadrokh Samavi 64
HW Change for Forwarding
MEM/WR
ID/EX
EX/MEM
Data
Memory
ALU
mux
mux
Registers
NextPC
Immediate
mux
65. Dr. Shadrokh Samavi 65
Memory
Access
Write
Back
Instruction
Fetch
Instr. Decode
Reg. Fetch
Execute
Addr. Calc
ALU
Memory
Reg
File
MUX
MUX
Memory
MUX
Sign
Extend
Zero?
IF/ID
ID/EX
MEM/WB
EX/MEM
4
Adder
Next SEQ PC Next SEQ PC
RD RD RD
WB
Data
Next PC
Address
RS1
RS2
Imm
MUX
Datapath
66. Dr. Shadrokh Samavi 66
Adder
IF/ID
Pipelined MIPS Datapath
Memory
Access
Write
Back
Instruction
Fetch
Instr. Decode
Reg. Fetch
Execute
Addr. Calc
ALU
Memory
Reg
File
MUX
Data
Memory
MUX
Sign
Extend
Zero?
MEM/WB
EX/MEM
4
Adder
Next
SEQ PC
RD RD RD
WB
Data
ā¢ Data stationary control
ā local decode for each instruction phase / pipeline stage
Next PC
Address
RS1
RS2
Imm
MUX
ID/EX
68. Dr. Shadrokh Samavi 68
The MIPS pipeline with three
additional unpipelined, floating-point,
functional units.
69. Dr. Shadrokh Samavi 69
Latency : the number of intervening cycles between an
instruction that produces a result and an instruction
that uses the result.
The initiation or repeat interval: the number of cycles
that must elapse between issuing two operations of a
given type.
71. Dr. Shadrokh Samavi 71
The pipeline timing of a set of independent FP operations.
A typical FP code sequence showing the stalls arising from RAW hazards.
72. Dr. Shadrokh Samavi 72
Three instructions want to perform a write back to the
FP register file simultaneously, as shown in clock cycle
11.