---
tags: computer-arch
---
# Assignment3: SoftCPU
> Due: ==Dec 20, 2021==
## Requirements
1. Following the instructions of [srv32 - RISCV RV32IM Soft CPU](https://hackmd.io/@sysprog/S1Udn1Xtt), you shall modify the assembly programs used/done with [Assignment1](https://hackmd.io/@sysprog/2021-arch-homework1) for [srv32](https://github.com/sysprog21/srv32) Simulation with Verilator.
* [dhrystone](https://github.com/sysprog21/srv32/tree/devel/sw/dhrystone) is a good starting point for writing test cases.
* You should validate the results in your program(s).
* You should program in RISC-V assembly for the sake of further optimizations. Hint: You may modify a customized `Makefile` for building C and assembly source files from scratch.
2. Check the generated file `wave.fst` and use GTKwave to view the waveform. Then, explain how your program is executed along with [srv32](https://github.com/sysprog21/srv32) Simulation.
* Show the signals/events inside [srv32](https://github.com/sysprog21/srv32) associated to PC, branch, instruction memory (I-MEM), data memory (D-MEM), and instruction internals.
* You shall discuss pipeline architecture along with your program.
3. Propose the software optimizations (against your program) based on the pipeline design of [srv32](https://github.com/sysprog21/srv32).
+ fewer instructions
+ shorter cycle counts
+ eliminate unnecessary stalls
4. Write down your thoughts and progress in [HackMD notes](https://hackmd.io/s/features).
* Summarize how [RISC-V Compliance Tests](https://github.com/riscv/riscv-compliance/blob/master/doc/README.adoc) works and why the signature should be matched.
* Explain how [srv32](https://github.com/sysprog21/srv32) works with [Verilator](https://www.veripool.org/wiki/verilator).
* BONUS: Can you figure out the room to improve [srv32](https://github.com/sysprog21/srv32)?
## Fill in the table for your homework
| Formal given name | HackMD note |
| ----------------- |:---------------------------------------------------------------- |
| Sample1 | [Homework3](https://hackmd.io/@WeiCheng14159/H1DB2nuFw) |
| Sample2 | [Homework3](https://hackmd.io/@horseradish1208/SkeYGK0uw) |
| 徐卓朗 | [Homework3](https://hackmd.io/@wIVnCcUaTouAktrkMVLEMA/Hy6vD5DtF) |
| 方竫泓 | [Homework3](https://hackmd.io/@7y4UQB2gRoSQRw5iAm-5lw/HJuNqq-cF) |
| 陳韋綸 | [Homework3](https://hackmd.io/@_UHs74UQS7uNne9_7SwQFQ/S113vvkct) |
| 劉恩澔 | [Homework3](https://hackmd.io/TmHPmowXTpiaUyiRdh7mvg?view) |
| 黃牧恩 | [Homework3](https://hackmd.io/@huang-me/computerArchHW3) |
| 向景亘 | [Homework3](https://hackmd.io/@oscarshiang/arch_hw3) |
| 李安豐 | [Homework3](https://hackmd.io/PSzQv6WkRRyP2oKpRhKCew?view) |
| 朱俊霖 | [Homework3](https://hackmd.io/@chu0809/ca_hw3) |
|賴虓翰 | [Homework3](https://hackmd.io/uNI_A0VXT5yDCJmU3ECulA) |
|黃上睿 | [Homework3](https://hackmd.io/@2Fd91KW6RO-0boxmOPqGSQ/r1z5SEkcF) |
|鄭學陽 | [Homework3](https://hackmd.io/c65kROCQR2Wk3KDjMNXWwQ) |
|李仲恩 | [Homework3](https://hackmd.io/@IVUP6rGJQAmUMyQytt73_g/HkRHIc_qt)|
|李政憲 | [Homework3](https://hackmd.io/@30vhEV7FQECcWeCF1eAN5A/rJXeLs_5t)|
|林信宇 | [Homework3](https://hackmd.io/dXEIVxtTRmGA7Wn8KYZQsw)|
|許永貞 | [Homework3](https://hackmd.io/@SRepqiofRCqX0QTL2aUCvA/Hko7XbL9t)|
|孫祥鈞 | [Homework3](https://hackmd.io/XI5_WxoTT3yTJjZFruy96w)
|張又仁 | [Homework3](https://hackmd.io/n3rgbP6VToSp1By8OArcQQ)|
|陳日昇 | [Homework3](https://hackmd.io/sn-QhKOtT76GWGG__RAoGw?both)|
|李其祐 | [Homework3](https://hackmd.io/@jackli/arch_hw3)|
|杰凱力艾 | [Homework3](https://hackmd.io/@jakaria27/BkwxDNh9F)|
|歐禮寬 | [Homework3](https://hackmd.io/@tUe5KoeuTLGibjG22HLtdg/HyW4rN15F)|
|黃品程 | [Homework3](https://hackmd.io/4tbEwbNoS8Ct1yQ-GnrJuA)|
|陳銘畯 | [Homework3](https://hackmd.io/VJZcANC1Siu7USoZRAswHA)|
|陳力維|[Homework3](https://hackmd.io/olSmqnZ4SGy5HnKRSRle1Q)|
|劉品宏|[Homework3](https://hackmd.io/hCI6l9AESOmIWk_aNYdxLQ?view)|
|黃瑋盛|[Homework3](https://hackmd.io/@N9qHU_eLRvKyfDfJk8cDXA/HkUfxLwKK)|
|林甄羚|[Homework3](https://hackmd.io/@9s5oiDBGQVmyEWDpvMhHtw/BySvIPsuY)|
|蕭珮珊|[Homework3](https://hackmd.io/fsCZh21JQkaXmRwG1HWkAg)|
|林嘉歆|[Homework3](https://hackmd.io/TkFfovqmRi6NwPBJo_JRCw?view)|
|陳昕佑|[Homework3](https://hackmd.io/DGaHVPfUQia24L_HaEhxwQ)|
|戴仕誠|[Homework3](https://hackmd.io/@WHKhZ7rvSTCx6LNmPBploQ/rJeAkz6ct)|
|歐子杰|[Homework3](https://hackmd.io/@oucs638/computer-arch-2021-fall-assignment3)|
|朱祐均|[Homework3](https://hackmd.io/@vuJ_c2nYTM2v6lZwDtjajg/rJl86ITcK)|
|鄒柏宇|[Homework3](https://hackmd.io/5qUBBnD2QCm0mOKkhcsmcQ?both)
|張亦妤|[Homework3](https://hackmd.io/@Evelyn-Jhang/Skprw3T5F)
|羅紹豪|[Homework3](https://hackmd.io/ZIS8B9ElQkKvYtkCt-kprw)
|伍志忠|[Homwwork3](https://hackmd.io/hL-LMsoOQB-6UCKhl64Gxg)
|莊崴|[Homwwork3](https://hackmd.io/BIAt7SbhRBWh-t69jahhow?view)
|鄭力維|[Homwwork3](https://hackmd.io/GJjNAKIoQNKj32UlROmEXw)
|張峻瑋|[Homwwork3](https://hackmd.io/@F7GGdY_NSxe2XlypzW57AA/rk4ijiRHF/edit)
|柯凱瑋|[Homwwork3](https://hackmd.io/@k-w-k/B10EsIh2F)
|譚亦翔|[Homwwork3](https://hackmd.io/@pt2JoPc6SNCdX7cvPan6_Q/HJOgxO0cK)
|郭又宗|[Homwwork3](https://hackmd.io/@kuouu/rywoFVncK)