Professional Documents
Culture Documents
YEAR – 2016
A=0;Q[-1]=0
Q=Multiplier
M=Multiplicand
N=Size
NO
Q[0]=0 NO Q[0]=1
Q[-1]=1 Q[-1]=0
YES YES
A=A+M A=A-M
Size=Size-1
NO Size=0?
YES
Product (AQ)
END
b) Show the steps of multiplication performed by using Booth's algorithm of 7×-5.
Ans.= Let M = 7 (7)10 = (0111)2
Q= -5 (+5)10=(0101)2 (-5)2=(1011)2
n=4
0 1 2 3 4 5 6 7 8 9 10 11 12 Clock period
I1
I2
I3
0 1 2 3 4 5 6 7 8 9 10 11 12 Clock period
I1
I2
I3
I4
I5
I6
Penalty:- 4Cycle
Instruction I3 is as a branch instruction fig effect of branching on the performance of an instruction pipeline.
Solution of control hazard :- an important technique prefetching states that instruction word ahead of
the one currently being decoded in the instruction decoding states (ID) state request them. In the figure
bellow fig1 illustrate the prefetching technique. The memory here is assumed to be in multiple modules,
all modules can be accessed concurrently. There are 2 prefetching of instruction use. a) Sequential
prefetching, b) Target prefetch buffers.
Decoder
Execution Pipeline
2
Structural Hazard :- This hazard occur when a certain resource is requested by more than 1
instruction at the same time.
Solution of Structural Hazard:- Certain resources are duplicated in order to avoid structural hazard.
Functional Unit (ALU)etc. can be pipeline them selves in order to
support several instruction at a time. A classical way to avoid hazard and memory access is by
providing separate data and instruction.
Data Hazard:- Inter instruction dependences may arrives to prevent the sequential data flow in the
pipeline, when success instruction overlap there fetch, decode and execution
through a pipeline processor. This situation due to inter-instruction decencies is called data hazard.
Solution of Data Hazard :- The system must resolve the interlock situations when a hazard is detected
consider the sequence of instruction (I,I+1 ……….J,J+1)in which a hazard has
been detected between the current instruction J and the previous instruction I. This hazards situation
can be resolve in one of the two following ways-
i) One simple solution is to stall the pipeline and ignore to execution of
instruction J,J+1 ……. , drawn the pipeline until the instruction I has passed
the point of resource conflict.
ii) A more advance approach is to ignore only instruction J and continue the
flow the instruction J+1,J+2 …… drawn the pipeline. However, the potential
hazard due to the suspension of J must be continues tested as instruction of
H+1,J+2 …….. execute prior to J. the multi level hazards definition may be
encountered, which requires much more complex control polices to resolve
such multi level of hazards.