ICS (Architecture)

Fudan University / 2020 Spring

Assignment 2

This assignment will make up 20% of the final score. It will due on Apr 27, and you must pass all the tests before submitting your work. Recently we've made some changes to grade your work automatically, please refer to checker guidelines for details.

Background

Pipelining is a technique where multiple instructions are overlapped during execution. It reduces CPI so that total CPU time consumption is dramatically reduced compared to non-pipelining. All modern high-performance microprocessors are pipelined.

From now on, we'll measure CPI of your CPU, and you may alter 76th-79th lines of cpu_tb.sv to fit into yours.

However, because multiple instructions are handled concurrently in a pipelined system, there exists possibility of hazards, which need special solution.

Description

In this assignment, you are going to implement Pipeline MIPS CPU according to slides and textbook.

Your CPU needs to support instructions: add,sub,and,or,slt,addi,andi,ori,slti,sw,lw,j,nop,beq,bne, jal, jr, sra, sll, srl. For unfamiliar instructions, please refer to our textbook Digital Design and Computer Architecture's Appendix B.

You have to follow our I/O port naming as shown in cpu_tb.sv, on which our graders are based. (Same as in textbook)

Before submission, you must run simulation to check if your CPU works well. This assignment's tests are all listed in assignment-2/benchtest

Report Requirements