Pipeline Processor
Introduction
In this lab you will about the optimization technique called loop unrolling and learn about the design and implementation of a pipelined Y86-64 processor by extending the PIPE (pipeline) Y86-64 processor simulator with a new instruction, iaddq, similar to what you did in the previous lab.
Loop Unrolling
Download and extract the loopunroll.tar.
cd cs224
wget https://cs224.cs.vassar.edu/labs/loopunroll.tar
tar xvf loopunroll.tar
cd loopunroll
We will go over this code together in lab.
Adding the iaddq
instruction
For this part of lab, we will be working in the archlab/pipe
directory.
The file pipe-full.hcl
contains a copy of the HCL code for PIPE, our pipeline implementation of the Y86-64 processor, along with a declaration of the constant value IIADDQ
. Similar to what you did in your last lab, you will add the proper HCL code to add the iaddq
instruction for the pipelined processor. Unlike last time, you do not need to write down the steps for each stage, though you may want to refer back to them has you implement your instruction.
Testing your iaddq
implementation
To test the implementation of your iaddq
instruction you need to rebuild psim
, the pipelined Y86 simulator. After your modify your pipe-full.hcl
file type the following in the archlab/pipe
directory
# in the archlab/pipe directory
make clean
make psim VERSION=full
to rebuild the pipelined simulator, psim
.
To test to make sure your implementation didn’t break anything, you can test it against the Y86-64 benchmark programs in archlab/y86-code
code directory:
# in the archlab/y86-code directory
make testpsim
This will run psim
on the benchmark programs and compare results with yis
. This does not test your iaddq
implementation, only that the other instructions still work correctly. Once you can execute the benchmark programs correctly, then you should check it with the regression tests in archlab/ptest
.
To test your implementation of the iaddq
instruction:
# in the archlab/ptest directory
make SIM=../pipe/psim TFLAGS=-i
Submitting your work
Upload your pipe-full.hcl
to Gradescope.