CPSC 418 --- Advanced Computer Architecture --- Spring 1996
Homework 11 --- Due: 2 Apr 1996
Problem 1 (4 Points) Data Hazards
For each of the two pipelines below, specify whether it can have
Read-After-Write, Write-After-Read, and Write-After-Write hazards.
For each of the hazards that the pipeline can have, give an example
code fragment illustrating the hazard. For each hazard that the
pipeline can not have, explain why it can not have that hazard.
Postscript source for figures
Problem 2 (9 Points) Register-Renaming and Interrupts
The ``producer-consumer'' latency is the amount of time that must
elapse between an instruction that produces a value and the next
instruction that uses the value. For example, in the simple pipeline
from class, the producer-consumer for ADD is 1 when there is a bypass
path and 2 when there is not a bypass path. In terms of pipeline
flow, the producer-consumer latency is the time between when
an instruction enters an execution stage or functional unit and when
its result is ready (produced) to be used (consumed).
Given
-
MULx R1 R2 R3
DIVx R3 R4 R5
ADDx R2 R3 R4
SUBx R2 R1 R2
-
| Producer-consumer latency
|
---|
ADD, SUB | 1
|
---|
MUL | 7
|
---|
DIV | 12
|
---|
- Microprocessor supports precise interrupts
- Three arithmetic functional units: ADD/SUB, MUL, DIV
- ADD/SUB is fully pipelined, MUL and DIV are not pipelined
- Three reservation stations per functional unit
-
R4=0
- Divide-by-zero exceptions are detected in the first clock-cycle
that the instruction is in the divide unit.
Problem 2(a) (5 Points)
Describe the state of the:
- Architected registers
- Physical registers
- Reservation stations
when the divide-by-zero exception is raised
Problem 2(b) (4 Points)
Remembering that this machine supports precise exceptions,
describe what happens when the divide-by-zero exception is raised.
Problem 3 (1 Point)
How much time did you spend total on the assignment and on each of
these problems? Which problems were useful or useless? How well
did the lectures and text book prepare you for this homework?
Which concepts needed better explanation?
Last modified: 26 Mar 96