Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

Latest commit

 

History

History
39 lines (27 loc) · 1.03 KB

readme.md

File metadata and controls

39 lines (27 loc) · 1.03 KB

RISC-V 模拟器

本模拟器使用5级流水线,并包含分支预测功能

本模拟器目前仅支持RV64I基本指令集及部分M扩展集指令。

编译

mkdir build
cd build
cmake ..
make

使用方法

./Sim riscv-elf-file-name [-v] [-s] [-d] [-b strategy]

Parameters:

  1. -v for verbose output, can redirect output to file for further analysis
  2. -s for single step execution, often used in combination with -v.
  3. -d for creating memory and register history dump in dump.txt
  4. -b for branch perdiction strategy (default BTFNT), accepted parameters are AT, NT, BTFNT and BPB.
    • 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文件夹下

同时, 你可以从我的博客上获得更好的阅读体验。