CSE 141L Homepage | Lab Overview | Lab Description
| Deadlines: | Beta Deadline (Q1-Q6): Wednesday, April 20 at 1:45pm PT (via moodle)
Final Deadline (All questions): Wednesday, April 27 at 1:45pm PT (via moodle). |
| Apr 21 11:59p |
|
Jump to: Lab Files | Steps: Step 1, Step 2, Step 3, Step 4 | Hints and Tips
svn checkout svn://parallel.ucsd.edu/fetch-unit-tests/trunk
This will checkout the trunk directory. You can find the testbenchs (*.tfw) files in the trunk/basic directory.You will probably need to refer to the datapath frequently for this lab.
| Signal | Value | Semantics |
|---|---|---|
| restart_i | 0 | Normal execution |
| 1 | Restart execution from 'restart_addr' | |
| load_store_valid_i | 0 | No load or store operation |
| 1 | Load or store operation. | |
| store_en_i | 0 | load |
| 1 | store |
| Signal | Value | Semantics |
|---|---|---|
| sel_mux[0] | 0 | Branch target address (i.e. PC+SignExt(offset)) |
| 1 | Next instruction (i.e. PC+1) | |
| sel_mux[1] | 0 | Previously used PC |
| 1 | Output of mux0 | |
| sel_mux[2] | 0 | Restart address (i.e. restart_addr) |
| 1 | Output of mux1 | |
| sel_mux[3] | 0 | Output of mux2 |
| 1 | Target address of load or store operation | |
| ram_we | 0 | Read data from SRAM |
| 1 | Write data to SRAM | |
| fifo_enqueue | 0 | No effect |
| 1 | Insert item into FIFO | |
| fifo_clear | 0 | No effect |
| 1 | Remove all entries from the FIFO |
| Signal | Value | Semantics |
|---|---|---|
| instruction_valid_o | 0 | Data on instruction_addr and instruction_data are invalid |
| 1 | instruction_addr and instruction_data are valid | |
| load_data_valid_o | 0 | load_data is invalid |
| 1 | load_data is valid |
svn checkout svn://parallel.ucsd.edu/fetch-unit-tests/trunk
This will checkout the trunk directory. You can find the testbenchs (*.tfw) files in the trunk/basic directory. You should note that the provided testbenches rely on the following assuptions:For the first set of questions (Q1 - Q6), you will need to examine the given files and understand what they are doing. Make sure you pay attention to the time period that each question specifies. You will need to get screen captures of the results of your simulations. You can limit the screen captures to the parts of the simulations that are of interest, but make sure all of the relevent signals are included and that both their names AND values are clearly visible. Failure to produce readable screenshots will result in you not getting any credit for that question.
| Q1 | After the restart is asserted at 200ns, how long does it take for the output signal 'instruction_valid' to change. Show your answer by getting a screen capture of this event. |
| Q2 | How many instructions will the processor back-end have received by 450ns? |
| Q3 | How many load/store operations are executed during the simulation? Do the load/store operations interrupt the transfer of instructions to the back-end? Explain why or why not. |
| Q4 | How many cycles does it take the output port 'load_data_valid' to change after a load operation is asserted? Grab a screen capture to show your answer. |
addr instruction #0 nonbranch_op0 #1 nonbranch_op1 #2 conditional branch to #7 (predicted taken) #3 nonbranch_op3 #4 nonbranch_op4 #5 nonbranch_op5 #6 nonbranch_op6 #7 jump to #0
After examining the tfw file and running the simulation, answer the following questions:
| Q5 | How many conditional branches were executed in the testbench? How many of these were predicted correctly? |
| Q6 | Explain how the fetch unit recovers from a misprediction. Take a screenshot of your simulation showing the fetch unit during one of the mispredictions. |
As part of your report, answer the following questions about the test bench you created:
| Q7 | Fully describe the scenario which you used for your testbench. Make sure you describe when signals are asserted/deasserted and explain why they are changed at those times. |
| Q8 | Show the results of your test bench simulation by taking several screenshots. The screenshots should show all relevant events that occur during your simulation. Of particular concern are the transitions on the output signals (namely, fifo_full, instruction_valid and load_data_valid). |
| Q11 | Use the provided testbenches to attain correctness of your design. Details about finding and using the files can be found here. This question has 2 parts:
a. For each of the testbench (*.tfw) provided, look at the input signals and the data/address values being given (you should take a look at the *.in files) and briefly describe what is the operation being performed. b. Compare your results with the given *.chk files. In your report, show the mismatches between your *.out file and given *.chk file, and explain the bug that caused it, and how you fixed it. Or if it is not a bug, explain why. You can provide a 'vimdiff' image or a similar mechanism to highlight differences, but make sure that it is clear and easily readable. |
Implement your design now and look over the timing report that has been generated.
| Q9 | What is the maximum achievable frequency?. If the branch prediction is perfect, what is the maximum number of instructions your fetch unit transfers to the backend in 1 second? |
Note that the "critical path" is the path through your processor with the longest delay. Decreasing the length of the critical path would allow you to increase the frequency of your processor.
| Q10 | Based on your timing report, describe the critical path in your fetch unit. For example, the critical path might be: load_store_addr_r -> mux3 -> sram.addr |