|
Homework 2 // Due at Lecture Tue October 5
Problem 1 (6 points)
H&P Problem 3.1.
Problem 2 (6 points)
A global GAg predictor stores the outcomes of n last executed branches in a history register (HR).
A local PAg predictor stores n last outcomes of a particular branch in an entry of history register
table (HRT), indexed by the branch address. In the second stage, both of these predictors use the
history bits to index into the table of 2-bit automata to obtain the actual prediction.
a)Give an example program fragment in C where the global predictor would achieve greater prediction
accuracy than the local predictor.
b)Vice versa: Give an example where the local predictor would do significantly better.
c)Both GAg and PAg predictors only use history bits to select the predictor automaton. What are the
pros and cons of introducing some branch address bits in the indexing process?
Problem 3 (8 points)
L.D F2, 16(R6)
MUL.D F4, F2, F10
ADD.D F4, F4, F12
S.D F4, 32(R5)
ADD.D F4, F2, F8
S.D F4, 128(R5)
Using Tomasulo's Algorithm, show what the status tables (Instruction
status, Reservation Stations, and Register Status tables as in figure 3.3) look
like right after the second ADD.D has entered the "Execute" phase.
Use the hardware configuration from Figure 3.2 and the FP latencies from Figure 3.63
Problem 4 (10 points)
(This problem is important well beyond the points we assign to it,
because it begins our gentle ramp for teaching you about simulators,
in general, and SimpleScalar, in particular.)
Using a CS Unix/Linux machine, download and
install the Simplescalar v 3.0 Source code from
http://www.simplescalar.com/.
Descriptions for the Integer Benchmarks and Floating Point Benchmarks
can be found at the Standard Performance
Evaluation Corporation's website. To run the benchmarks, the command line
arguments for each benchmark must be specified after the executables name. The
command line options necessary for each benchmark are at
/unsup/spec2000/benchspec/benchmark.cmdlines. From there, the
associated Alpha executables and data files for the integer benchmarks and floating point benchmarks
are in the CINT2000 and CFP2000 directories
respectively.
a) The benchmarks have initialization phases at the beginning of their
execution that run only once. Researchers tend to avoid collecting data from
this region because it is not representative of the entire program. Choose a
benchmark and find the likely end of its initialization period by observing its
IPC in sim-outorder while it executes. Describe which benchmark you
chose, your methodology, and your results. You might consider fast-forwarding to
a certain instruction and limiting the number of instructions run at any one
time. Assume the initialization period to be a factor of at least 10 million.
b) Using the performance of gcc in sim-outorder with default settings
as a base, calculate the speedup(slowdown) if:
the simulator is run in in-order mode
the D1 cache replacemnent policy is changed to FIFO
the branch predictor is changed to "always taken"
For all of the above tests, fast-forward 100M instructions, and simulate for next 50M instructions. Use cc1_base executable and
integrate.i input file for gcc.
|