CS 3330: Homework 4: Write Ports

This page does not represent the most current semester of this course; it is present merely as an archive.

Use the simulator distribution described in Lab 3 for this lab.

You may work with a single partner on this assignment.

Work in the sim/pipe directory for this homework.

Single-write-port register file

Do the textbook's problem 4.57: modify PIPE so it only uses one write port in the register file. Modify pipe-1w.hcl to implement this logic.

An outline for success:

  1. Split IPOPL into two icodes by changing f_icode to be IPOP2 if imem_icode and D_icode are both IPOPL.

  2. Make sure that both IPOPL and IPOP2 decode the same (same number of bytes, etc).

  3. Have the first half of pop (IPOPL) predict the new PC (f_predPC) to be the same as the current PC (f_pc) so that we will see it again for the second one.

  4. Many places the HCL has IPOPL now it will need to have IPOP2 instead or and/or in addition. Use the following to consider if it should be changed to IPOP2:

Test your code

Regression tests will verify that you didn't break anything:

linux> (cd ../pipe; make psim VERSION=1w)
linux> (cd ../ptest; make SIM=../pipe/psim)

Write port dstM should remain disabled (it already is in pipe-1w, but don't re-enable it). One way to check that is:

linux> grep w_dstM pipe-1w.hcl
int w_dstM = RNONE;

if running the above grep outputs anything other than that one line, you won't get any credit for this assignment.

Finally, any code with popl should now take one more instruction per popl; for example,

    irmovl $0x100, %esp
    pushl %esp
    popl %eax
    halt
     

should execute 9 instructions (not 8 like std).

Submission

Submit your pipe-1w.hcl in the usual place.

Copyright © 2015 by Luther Tychonievich. All rights reserved.
Last updated 2014-10-27 09:35 -0400