Try   HackMD

Assignment3: SoftCPU

Due: Nov 30, 2022

Requirements

  1. Following the instructions of srv32 - RISCV RV32IM Soft CPU, you shall modify the assembly programs used/done with Assignment2 and another LeetCode problem with medium difficulty for srv32 Simulation with Verilator.
    • In other words, you need to prepare at least two RISC-V programs, one of which should be derived from Assignment2 and the other from scratch. We need a medium-difficulty LeetCode problem because we are ready to make aggressive optimizations.
    • The programs for Assignment2 were tweaked for single-cycle RV32I core. However, srv32 has 3-stage pipeline, and you should rework the existing code to benefit from CPU pipelining.
    • 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 Simulation.
    • Show the signals/events inside 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.
    • fewer instructions
    • shorter cycle counts
    • eliminate unnecessary stalls
    • more deterministic branches
  4. Write down your thoughts and progress in HackMD notes.

Fill in the table for your homework

Formal given name HackMD note
Sample1 Homework3
Sample2 Homework3
Sample3 Homework3
Sample4 Homework4
王昱承 Homework3
黃昱澄 Homework3
俞杉麒 Homework3
賴致文 Homework3
陳彥甫 Homework3
黃冠予 Homework3
江坤諦 Homework3
洪嘉志 Homework3
曾晧峖 Homework3
王漢祺 Homework3
陳品崴 Homework3
黃榆哲 Homework3
吳紀寬 Homework3
張瑞甫 Homework3
陳韋勳 Homework3
張中龍 Homework3
周士翔 Homework3
陳奕萍 Homework3
蘇勇達 Homework3
莊集 Homework3
何坤霖 Homework3
潘鴻福 Homework3
方宣翔 Homework3
黃柏瑜 Homework3
馮柏為 Homework3
吳宇晨 Homework3
鄭至崴 Homework3
楊淳皓 Homework3
陳靖雯 Homework3