本模拟器使用5级流水线,并包含分支预测功能
本模拟器目前仅支持RV64I
基本指令集及部分M
扩展集指令。
mkdir build
cd build
cmake ..
make
./Sim riscv-elf-file-name [-v] [-s] [-d] [-b strategy]
Parameters:
-v
for verbose output, can redirect output to file for further analysis-s
for single step execution, often used in combination with-v
.-d
for creating memory and register history dump indump.txt
-b
for branch perdiction strategy (defaultBTFNT
), accepted parameters areAT
,NT
,BTFNT
andBPB
.- AT: Always Taken
- NT: Always Not Taken
- BTFNT: Back Taken Forward Not Taken
- BPB: Branch Prediction Buffer (2 bit history information)
There are a number of reference RISC-V ELFs and its corresponding assembly code in the riscv-elf/
folder.
相关报告在docs
文件夹下
同时, 你可以从我的博客上获得更好的阅读体验。