There are situations, called hazards, that prevent the next instruction in the instruction stream from executing during its designated cycle
There are three classes of hazards
Structural hazard
Data hazard
Branch hazard
pipelining is the concept of decomposing the sequential process into number of small stages in which each stage execute individual parts of instruction life cycle inside the processor.
Pipelining is an speed up technique where multiple instructions are overlapped in execution on a processor. It is an important topic in Computer Architecture.
This slide try to relate the problem with real life scenario for easily understanding the concept and show the major inner mechanism.
pipelining is the concept of decomposing the sequential process into number of small stages in which each stage execute individual parts of instruction life cycle inside the processor.
Pipelining is an speed up technique where multiple instructions are overlapped in execution on a processor. It is an important topic in Computer Architecture.
This slide try to relate the problem with real life scenario for easily understanding the concept and show the major inner mechanism.
CISC & RISC Architecture with contents
History Of CISC & RISC
Need Of CISC
CISC
CISC Characteristics
CISC Architecture
The Search for RISC
RISC Characteristics
Bus Architecture
Pipeline Architecture
Compiler Structure
Commercial Application
Reference
Memory reference instructions used in computer architecture is well demonstrated with examples. It will probably help you understand each referencing instructions.
This method of checking the signal in the system for processing is called Polling Method. In this method, the problem is that the processor has to waste number of clock cycles just for checking the signal in the system, by this processor will become busy unnecessarily. If any signal came for the process, processor will take some time to process the signal due to the polling process in action. So system performance also will be degraded and response time of the system will also decrease.
CISC & RISC Architecture with contents
History Of CISC & RISC
Need Of CISC
CISC
CISC Characteristics
CISC Architecture
The Search for RISC
RISC Characteristics
Bus Architecture
Pipeline Architecture
Compiler Structure
Commercial Application
Reference
Memory reference instructions used in computer architecture is well demonstrated with examples. It will probably help you understand each referencing instructions.
This method of checking the signal in the system for processing is called Polling Method. In this method, the problem is that the processor has to waste number of clock cycles just for checking the signal in the system, by this processor will become busy unnecessarily. If any signal came for the process, processor will take some time to process the signal due to the polling process in action. So system performance also will be degraded and response time of the system will also decrease.
Pipelining understandingPipelining is running multiple stages of .pdfarasanlethers
Pipelining understanding:
Pipelining is running multiple stages of the same process in parallel in a way that efficiently uses
all the available hardware while respecting the dependencies of each stage upon the previous
stages. In the laundry example, the stages are washing, drying, and folding. By starting a wash
stage as soon as the previous wash stage is moved to the dryer, the idle time of the washer is
minimized. Notice that the wash stage takes less time than the dry stage, so the wash stage must
remain idle until the dry stage finishes: the steady state throughput of the pipeline is limited by
the slowest stage in the pipeline. This can be mitigated by breaking up the bottleneck stage into
smaller sub-stages. For those less concerned with laundry-based examples, consider a video
game. The CPU computes the keyboard/mouse input each frame and moves the camera
accordingly, then the GPU takes that information and actually renders the scene; meanwhile, the
CPU has already begun calculating what\'s going to happen in the next frame.
How Pipelining will done:
In class, we mentioned that interpreting each computer instruction is a four step process: fetching
the instruction, decoding it and reading the register, executing it, and recording the results. Each
instruction may take 4 cycles to complete, but if our throughput is one instruction each cycle,
then we would like to perform, on average, $n$ instructions every $n$ cycles. To accomplish
this, we can split up an instruction\'s work into the 4 different steps so that other pieces of
hardware work to decode, execute, and record results while the CPU performs the fetch. The
latency to process each instruction is fixed at 4 cycles, so by processing a new instruction every
cycle, after four cycles, one instruction has been completed and three are \"in progress\" (they\'re
in the pipeline). After many cycles the steady state throughput approaches one completed
instruction every cycle.
An assembly line in a auto manufacturing plant is another good example of a pipelined process.
There are many steps in the assembly of the car, each of which is assigned a stage in the pipeline.
Typically the depth of these pipelines is very large: cars are pretty complex, so there need to be a
lot of stages in the assembly line. The more stages, the longer it takes to crank the system up to a
steady state. The larger the depth, the more costly it is to turn the system around: A branch
misprediction in an instruction pipeline would be like getting one of the steps wrong in the
assembly line: all the cars affected would have to go back to the beginning of the assembly line
and be processed again.
OnLive Example[Realtime]:
OnLive is a company that allows gamers to play video games in the cloud. The games are run on
one of the company\'s server farms, and video of the game is sent back to your computer. The
idea is that even the lamest of computers can run the most highly intensive games because all the
computer does .
Kerala Engineering Architecture Medical is an entrance examination series for admissions to various professional degree courses in the state of Kerala, India. It is conducted by the Office of the Commissioner of Entrance Exams run by the Government of Kerala
Paleontology is the study of the history of life on Earth as based on fossils. Fossils are the remains of plants, animals, fungi, bacteria, and single-celled living things that have been replaced by rock material or impressions of organisms preserved in roc
The ways in which an element—or compound such as water—moves between its various living and nonliving forms and locations in the biosphere is called a biogeochemical cycle. Biogeochemical cycles important to living organisms include the water, carbon, nitrogen, phosphorus, and sulfur cycles.
The AC and DC bridge both are used for measuring the unknown parameter of the circuit. The AC bridge measures the unknown impedance of the circuit. The DC bridge measures the unknown resistance of the circuit.
The Wien bridge is a type of bridge circuit that was developed by Max Wien in 1891. The bridge consists of four resistors and two capacitors. At the time of the Wien bridge's invention, bridge circuits were a common way of measuring component values by comparing them to known values.
For most of us, our name existed even before we did.
In anticipation of our arrival, our parents went through an ultra stressful process of narrowing down dozens of potential names until they chose the perfect one.
Luckily they did, because whatever your name is, it has followed you throughout your entire life; and in some cases, people may have heard of your name before they’ve ever met you.
When it comes to how to name an app, it’s of similar importance as naming a child. The name of your app will follow your brand forever, and in many cases, potential users will hear the name before they ever actually use your app.
flora and fauna of himachal pradesh and keralaAJAL A J
flora and fauna of himachal pradesh and kerala
A green pearl in the Himalayan crown, Himachal Pradesh is blessed with a rich flora and fauna that graces the land with grandeur and majesty. Other animals that can be sighted in the wild include the ibex, wild yak, ghoral deer, musk deer, Himalayan black bear, brown bear, leopards and the Himalayan Thar. Also kerala is gods on country
Bachelor of Science in Cardio-vascular technology is an undergraduate course in cardiology. These technologists assist the physicians in the diagnosis and the treatment of cardiac (heart) and peripheral vascular conditions (blood vessels). The cardiovascular technologists are also responsible for preparing the patients for open-heart surgeries and pacemaker implantation surgeries. The technologists also monitor the patient’s cardiac parameters while they undergo the surgery. B. Sc. in Cardiovascular technology is a three years’ full-time undergraduate course and is an interesting and important course in medicine.
`Remove Unprofitable Products and Services. The products or services with the highest gross profit margin are the most important to your business. ...
Find New Customers. New customers can help grow your business. ...
Increase your Conversion Rate. ...
Review Current Pricing Structure. ...
Reduce your inventory. ...
Reduce your overheads.
Polycystic ovary syndrome (PCOS) is a hormonal disorder common among women of reproductive age. Women with PCOS may have infrequent or prolonged menstrual periods or excess male hormone (androgen) levels. The ovaries may develop numerous small collections of fluid (follicles) and fail to regularly release eggs
Are you an NRI and aiming to come back to India to pursue graduation from the top-tier colleges of India?
Then, you’re halfway there. Being an NRI, your top preference would be IITs and NITs of India. If that's the case, you must know the fee structure of both the IITs, NITs (under DASA scheme), Centrally Funded Institutions and State-Level Govt. Engineering Colleges.
Note: According to the latest update from DASA, from session 2021-22 onwards, JEE Rank is made mandatory for NRI/PIO/OCI Students to be eligible for DASA & CIWG Schemes. Hence, 2020-21 will be the last year when SAT 2 scores will be considered for DASA/CIWG Scheme.
Subjects to study if you want to work for a charityAJAL A J
The charity sector can be competitive and experience, volunteer or otherwise, can count for a lot. But there are ways to make that third sector CV stand out from the competition. Why not take some courses? A course can be a great way to make your application shine and an opportunity to learn new skills and ideas.
Joint Entrance Examination - Main or commonly known as JEE Main is a national level entrance exam conducted by the NTA to offer admission to BE/BTech, BPlan and BArch courses at the IIITs (Indian Institute of Information Technology), NITs (National Institute of Technology) and other Centrally Funded Technical Institutions (CFTIs) across the country.
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...Amil Baba Dawood bangali
Contact with Dawood Bhai Just call on +92322-6382012 and we'll help you. We'll solve all your problems within 12 to 24 hours and with 101% guarantee and with astrology systematic. If you want to take any personal or professional advice then also you can call us on +92322-6382012 , ONLINE LOVE PROBLEM & Other all types of Daily Life Problem's.Then CALL or WHATSAPP us on +92322-6382012 and Get all these problems solutions here by Amil Baba DAWOOD BANGALI
#vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore#blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #blackmagicforlove #blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #Amilbabainuk #amilbabainspain #amilbabaindubai #Amilbabainnorway #amilbabainkrachi #amilbabainlahore #amilbabaingujranwalan #amilbabainislamabad
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
Student information management system project report ii.pdfKamal Acharya
Our project explains about the student management. This project mainly explains the various actions related to student details. This project shows some ease in adding, editing and deleting the student details. It also provides a less time consuming process for viewing, adding, editing and deleting the marks of the students.
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Dr.Costas Sachpazis
Terzaghi's soil bearing capacity theory, developed by Karl Terzaghi, is a fundamental principle in geotechnical engineering used to determine the bearing capacity of shallow foundations. This theory provides a method to calculate the ultimate bearing capacity of soil, which is the maximum load per unit area that the soil can support without undergoing shear failure. The Calculation HTML Code included.
Hierarchical Digital Twin of a Naval Power SystemKerry Sado
A hierarchical digital twin of a Naval DC power system has been developed and experimentally verified. Similar to other state-of-the-art digital twins, this technology creates a digital replica of the physical system executed in real-time or faster, which can modify hardware controls. However, its advantage stems from distributing computational efforts by utilizing a hierarchical structure composed of lower-level digital twin blocks and a higher-level system digital twin. Each digital twin block is associated with a physical subsystem of the hardware and communicates with a singular system digital twin, which creates a system-level response. By extracting information from each level of the hierarchy, power system controls of the hardware were reconfigured autonomously. This hierarchical digital twin development offers several advantages over other digital twins, particularly in the field of naval power systems. The hierarchical structure allows for greater computational efficiency and scalability while the ability to autonomously reconfigure hardware controls offers increased flexibility and responsiveness. The hierarchical decomposition and models utilized were well aligned with the physical twin, as indicated by the maximum deviations between the developed digital twin hierarchy and the hardware.
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
Water scarcity is the lack of fresh water resources to meet the standard water demand. There are two type of water scarcity. One is physical. The other is economic water scarcity.
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxR&R Consult
CFD analysis is incredibly effective at solving mysteries and improving the performance of complex systems!
Here's a great example: At a large natural gas-fired power plant, where they use waste heat to generate steam and energy, they were puzzled that their boiler wasn't producing as much steam as expected.
R&R and Tetra Engineering Group Inc. were asked to solve the issue with reduced steam production.
An inspection had shown that a significant amount of hot flue gas was bypassing the boiler tubes, where the heat was supposed to be transferred.
R&R Consult conducted a CFD analysis, which revealed that 6.3% of the flue gas was bypassing the boiler tubes without transferring heat. The analysis also showed that the flue gas was instead being directed along the sides of the boiler and between the modules that were supposed to capture the heat. This was the cause of the reduced performance.
Based on our results, Tetra Engineering installed covering plates to reduce the bypass flow. This improved the boiler's performance and increased electricity production.
It is always satisfying when we can help solve complex challenges like this. Do your systems also need a check-up or optimization? Give us a call!
Work done in cooperation with James Malloy and David Moelling from Tetra Engineering.
More examples of our work https://www.r-r-consult.dk/en/cases-en/
4. Pipelining
Break instructions into steps
Work on instructions like in an assembly line
Allows for more instructions to be executed
in less time
A n-stage pipeline is n times faster than a non
pipeline processor (in theory)
5. 5
What is Pipelining?
Like an Automobile Assembly Line for
Instructions
Each step does a little job of processing the
instruction
Ideally each step operates in parallel
Simple Model
Instruction Fetch
Instruction Decode
Instruction Execute
F1 D1 E1
F2 D2 E2
F3 D3 E3
6. pipeline
It is technique of decomposing a sequential
process into suboperation, with each
suboperation completed in dedicated segment.
Pipeline is commonly known as an assembly
line operation.
It is similar like assembly line of car
manufacturing.
First station in an assembly line set up a
chasis, next station is installing the engine,
another group of workers fitting the body.
7. Pipeline Stages
We can divide the execution of an instruction
into the following 5 “classic” stages:
IF: Instruction Fetch
ID: Instruction Decode, register fetch
EX: Execution
MEM: Memory Access
WB: Register write Back
9. Without Pipelining
Instr 1
Instr 2
Clock Cycle 1 2 3 4 5 6 7 8 9 10
• Normally, you would perform the fetch, decode,
execute, operate, and write steps of an
instruction and then move on to the next
instruction
10. With Pipelining
Clock Cycle 1 2 3 4 5 6 7 8 9
Instr 1
Instr 2
Instr 3
Instr 4
Instr 5
• The processor is able to perform each stage simultaneously.
• If the processor is decoding an instruction, it
may also fetch another instruction at the same
time.
11. Pipeline (cont.)
Length of pipeline depends on the longest
step
Thus in RISC, all instructions were made to
be the same length
Each stage takes 1 clock cycle
In theory, an instruction should be finished
each clock cycle
12. Stages of Execution in Pipelined
MIPS
5 stage instruction pipeline
1) I-fetch: Fetch Instruction, Increment PC
2) Decode: Instruction, Read Registers
3) Execute:
Mem-reference: Calculate Address
R-format: Perform ALU Operation
4) Memory:
Load: Read Data from Data Memory
Store: Write Data to Data Memory
5) Write Back: Write Data to Register
13. Pipelined Execution
Representation
To simplify pipeline, every instruction takes
same number of steps, called stages
One clock cycle per stage
IFtch Dcd Exec Mem WB
IFtch Dcd Exec Mem WB
IFtch Dcd Exec Mem WB
IFtch Dcd Exec Mem WB
IFtch Dcd Exec Mem WB
Program Flow
15. Pipeline Solution :
Solution: Compiler may recognize which
instructions are dependent or independent of
the current instruction, and rearrange them to
run the independent one first
16. How to make pipelines faster
Superpipelining
Divide the stages of pipelining into more stages
Ex: Split “fetch instruction” stage into two
stages
Super duper pipelining
Super scalar pipelining
Run multiple pipelines in parallel
Automated consolidation of data from many
sources,
18. Pipelining
Lessons
Pipelining doesn’t help latency (execution time)
of single task, it helps throughput of entire
workload
Multiple tasks operating simultaneously using
different resources
Po te ntialspeedup = Number of pipe stages
Time to “fill” pipeline and time to “drain” it
reduces speedup
Pipeline rate limited by slowest pipeline stage
Unbalanced lengths of pipe stages also reduces
speedup
21. Pipeline Hazards
There are situations, called hazards, that prevent
the next instruction in the instruction stream
from executing during its designated cycle
There are three classes of hazards
Structural hazard
Data hazard
Branch hazard
Structural Hazards. They arise from resource conflicts when the hardware cannot support all
possible combinations of instructions in simultaneous overlapped execution.
Data Hazards. They arise when an instruction depends on the result of a previous instruction
in a way that is exposed by the overlapping of instructions in the pipeline.
Control Hazards.They arise from the pipelining of branches and other instructions
that change the PC.
22. 22
What Makes Pipelining Hard?
Power failing,
Arithmetic overflow,
I/O device request,
OS call,
Page fault
23. Pipeline Hazards
Structural hazard
Resource conflicts when the hardware cannot support
all possible combination of instructions simultaneously
Data hazard
An instruction depends on the results of a previous
instruction
Branch hazard
Instructions that change the PC
25. M
Single Memory is a Structural
Hazard
Load
Instr 1
Instr 2
Instr 3
Instr 4
ALU
M Reg M Reg
ALU
M Reg M Reg
ALU
M Reg M Reg
ALU
Reg M Reg
ALU
M Reg M Reg
• Can’t read same memory twice in same clock cycle
I
n
s
t
r.
O
r
d
e
r
Time (clock cycles)
27. Structural hazard
To solve this hazard, we “stall” the pipeline until the
resource is freed
A stall is commonly called pipeline bubble, since it
floats through the pipeline taking space but carry no
useful work
28. Structural Hazards limit
performance
Example: if 1.3 memory accesses per
instruction (30% of instructions execute
loads and stores)
and only one memory access per cycle then
Average CPI ≥ 1.3
Otherwise datapath resource is more than
100% utilized
Structural Hazard Solution: Add
more Hardware
31. Data hazard
FO: fetch data value WO: store the executed value
Fetch
Instruction
(FI)
Fetch
Operand
(FO)
Decode
Instruction
(DI)
Write
Operand
(WO)
Execution
Instruction
(EI)
S3 S4S1 S2 S5
Time
32. Data hazard
Delay load approach inserts a no-operation instruction to
avoid the data conflict
ADD R1R2+R3
No-op
No-op
SUB R4R1-R5
AND R6R1 AND R7
OR R8R1 OR R9
XOR R10R1 XOR R11
34. Data hazard
It can be further solved by a simple hardware technique called
forwarding (also called bypassing or short-circuiting)
The insight in forwarding is that the result is not really needed by SUB
until the ADD execute completely
If the forwarding hardware detects that the previous ALU operation
has written the register corresponding to a source for the current ALU
operation, control logic selects the results in ALU instead of from
memory
36. 36
Data Hazard Classification
Three types of data hazards
RAW : Read After Write
WAW : Write After Write
WAR : Write After Read
• RAR : Read After Read
– Is this a hazard?
37. Read After Write (RAW)
A read after write (RAW) data hazard refers to a
situation where an instruction refers to a result that
has not yet been calculated or retrieved.
This can occur because even though an instruction
is executed after a previous instruction, the
previous instruction has not been completely
processed through the pipeline.
example:
i1. R2 <- R1 + R3
i2. R4 <- R2 + R3
38. Write After Read (WAR)
A write after read (WAR) data hazard represents a
problem with concurrent execution.
For example:
i1. R4 <- R1 + R5
i2. R5 <- R1 + R2
39. Write After Write (WAW
A write after write (WAW) data hazard may occur in
a concurrent execution environment.
example:
i1. R2 <- R4 + R7
i2. R2 <- R1 + R3
We must delay the WB (Write Back) of i2 until the execution of i1
40. Branch hazards
Branch hazards can cause a greater performance
loss for pipelines
When a branch instruction is executed, it may or
may not change the PC
If a branch changes the PC to its target
address, it is a taken branch Otherwise, it is
untaken
41. Branch hazards
There are FOUR schemes to handle branch hazards
Freeze scheme
Predict-untaken scheme
Predict-taken scheme
Delayed branch
43. Branch Untaken
(Freeze approach)
The simplest method of dealing with branches is to
redo the fetch following a branch
Fetch
Instruction
(FI)
Fetch
Operand
(FO)
Decode
Instruction
(DI)
Write
Operand
(WO)
Execution
Instruction
(EI)
44. Branch Taken
(Freeze approach)
The simplest method of dealing with branches is to redo
the fetch following a branch
Fetch
Instruction
(FI)
Fetch
Operand
(FO)
Decode
Instruction
(DI)
Write
Operand
(WO)
Execution
Instruction
(EI)
45. Branch Taken
(Freeze approach)
The simplest scheme to handle branches is to
freeze the pipeline holding or deleting any
instructions after the branch until the branch
destination is known
The attractiveness of this solution lies primarily
in its simplicity both for hardware and software
46. Branch Hazards
(Predicted-untaken)
A higher performance, and only slightly more
complex, scheme is to treat every branch as not taken
It is implemented by continuing to fetch instructions as if
the branch were normal instruction
The pipeline looks the same if the branch is not
taken
If the branch is taken, we need to redo the fetch
instruction
49. Branch Taken
(Predicted-taken)
An alternative scheme is to treat every branch as
taken
As soon as the branch is decoded and the target
address is computed, we assume the branch to be
taken and begin fetching and executing the
target
52. Delayed Branch
A fourth scheme in use in some processors is
called delayed branch
It is done in compiler time. It modifies the
code
The general format is:
branch instruction
Delay slot
branch target if taken
54. Delayed
Branch
If the optimal is not
available:
(b) Act like
predict-taken
(in complier way)
(c) Act like
predict-untaken
(in complier way)
55. Delayed Branch
Delayed Branch is limited by
(1) the restrictions on the instructions that are
scheduled into the delay slots (for example:
another branch cannot be scheduled)
(2) our ability to predict at compile time whether a
branch is likely to be taken or not
56. Branch Prediction
A pipeline with branch prediction uses some
additional logic to guess the outcome of a conditional
branch instruction before it is executed
57. Branch Prediction
Various techniques can be used to predict whether a
branch will be taken or not:
Prediction never taken
Prediction always taken
Prediction by opcode
Branch history table
The first three approaches are static: they do not
depend on the execution history up to the time of the
conditional branch instruction. The last approach is
dynamic: they depend on the execution history.
58. 58
Important Pipeline
Characteristics
Latency
Time required for an instruction to propagate through
the pipeline
Based on the Number of Stages * Cycle Time
Dominant if there are lots of exceptions / hazards, i.e.
we have to constantly be re-filling the pipeline
Throughput
The rate at which instructions can start and finish
Dominant if there are few exceptions and hazards, i.e.
the pipeline stays mostly full
Note we need an increased memory bandwidth
over the non-pipelined processor
59. 59
Exceptions
An exception is when the normal execution
order of instructions is changed. This has many
names:
Interrupt
Fault
Exception
Examples:
I/O device request
Invoking OS service
Page Fault
Malfunction
Undefined instruction
Overflow/Arithmetic Anomaly
Etc!
60. Eliminating hazards- Pipeline
bubbling
Bubbling the pipe line , also known as
a pipe line bre ak or a pipe line stall, is a method
for preventing data, structural, and branch
hazards from occurring.
instructions are fetched, control logic
determines whether a hazard could/will occur.
If this is true, then the control logic inserts
NOPs into the pipeline. Thus, before the next
instruction (which would cause the hazard) is
executed, the previous one will have had
sufficient time to complete and prevent the
61. No: of NOPs = stages in pipeline
If the number of NOPs is equal to the number
of stages in the pipeline, the processor has
been cleared of all instructions and can
proceed free from hazards. All forms of stalling
introduce a delay before the processor can
resume execution.