pre-work
On the afternoon of the day when I chose the subject to do, I returned my two classes, because I knew that I would't have too much fun in the next month, and I needed a lot of time to complete this term_project.
sample
從零開始的RISC-V SoC架構設計與Linux核心運行 - 硬體篇
VIVADO
guide
Install VIVADO (please use the ML version, do not need to use the license).
Please use the version after 2020.
以下是一個雙核的 rocketCpu SOC
Each Rocket core is grouped with a page-table walker, L1 instruction cache, and L1 data cache into a RocketTile
The Rocket core can also be swapped for a BOOM core. Each tile can also be configured with a RoCC accelerator that connects to the core as a coprocessor
To customize a RISC-V SoC using the Rocket Chip project, you can modify the relevant configuration files. In this case, if you want to customize the project by removing a specific configuration, such as a 4-core RocketCore, you can make changes accordingly.
The idea is to modify the project's configuration, so that when you execute the "make" command with the desired CONFIG option, the resulting Vivado project in the workspace will reflect your customization. However, it is important to verify if the additional external I/O IPs added to the Vivado project will remain compatible. This concern can be addressed at a later stage.
Coprocessor
PTW(page table walker)這個原始碼不太好懂,閱讀這篇來自 UCB 的文章 Virtual Memory
install everything
install verilator
Verilator is an open source verilog simulation tool.
you will use it to perform RTL function simulation,
so as to verify the RTL code you write.
step1.prepare some packages
sudo apt-get install git perl python3 make autoconf g++ flex bison ccache
sudo apt-get install libgoogle-perftools-dev numactl perl-doc
Contributed by
install VM with Oracle VM VirtualBox
first click here
because my cpu is AMD R7 5800X3D
so we need to do a prework
go to BIOS and open the CPU's VM Function
then slect ypur VM like the picture below
Problem description:
tag:jserv,hw1
contributed by Re-Fu-Zhang
Problem
Trapping Rain Water (leetcode42)
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.
Solution
:::warning