{% note info %} 在 riscv-tests 仓库中有 RISC-V 处理器的单元测试。 {% endnote %} 完成安装后,编写一个简单的 hello.c,使用 riscv64-unknown-elf-gcc -o hello hello.c 编译,运行 spike pk hello,成功运行即为安装成功。 spike run hello spike 仿真概述 spike 模拟器是一种 Trace-driven 模拟器...
riscv-tests是一种指令集自测试集,能够自我检测指令集运行成功还是失败的测试程序。这些程序基本由汇编语言编写。 内包含banchmark、isa、programs测试。 github链接:https://github.com/riscv/riscv-tests 1. benchmark测试 benchmark内包含一些业内公认C代码测试集 2. ISA测试 在riscv-tests/isa... ...
shell export spike='your_spike_path' 如果没有报错,则安装成功,否则就要排错并重新安装。 编译Dhrystone Dhrystone含有部分内建函数,需要与编译器匹配。为保证主线任务,此处直接采用开源蜂鸟版本的Dhrystone版本。将下载到的工程文件放到xf100/verify/riscv-tools/riscv-tests/benchmarks/路径下备用。并修改benchmarks...
这段代码将使用riscv64-unknown-elf-gcc编译hello.c程序,并生成一个名为hello的可执行文件。 ### 步骤四:在Spike仿真器中运行程序 最后,我们可以在Spike仿真器中运行我们编译好的程序。以下是在Spike中运行hello程序的代码: ```bash /opt/riscv/bin/spike /opt/riscv/share/riscv-tests/isa/dummy ``` 这...
riscv-isa-sim是一个基于C/C++开发的指令集模拟器,更通俗和为人所知的名字是“Spike” 三个软件协同可以实现在Spike模拟器上运行完整的RISC-V程序 GNU开发工具链 GNU工程无处不在.jpg riscv-gnu-toolchain是支持RISC-V的GNU工具链,包括 riscv-gcc:移植到RISC-V的GCC编译器 riscv-binutils-gdb:移植到RISC-V...
python .\compliance_test.py ..\..\tests\riscv-compliance\build_generated\rv32i\I-ADD-01.elf.bin inst.data 该脚本将可执行bin转换为二进制的inst.data,然后执行iverilog的编译和执行工作。 在lowRISC/riscv-compliance: TEMPORARY FORK of the riscv-compliance repository (github.com)测试框架下其通过比...
编写汇编源程序 首先第一步,我们需要编写我们的汇编程序。这个程序的后缀名为.asm。 我们对这段代...
而e200_opensource目录(https://github.com/SI-RISCV/e200_opensource)下的riscv-tools目录仅仅包含编译Spike所需的源代码和riscv-tests,我们放置该目录于此是因为正式维护的riscv/riscv-tools在不断的更新,而e200_opensource下的riscv-tools仅需用于支持运行自测试用例(Self-Check TestCase),因此无需使用最新版本,...
arch_test_target/spike update set_msw/clear_msw/set_mtimer/clear_mtimer Aug 4, 2023 ci-tests Introduce abstract_mem_t to allow custom implementations Jul 20, 2023 customext Remove decode_macros.h from disasm.h Feb 5, 2023 debug_rom DSCRATCH is now called DSCRATCH0 Jul 31, 2022 disasm...
spike only support rv64* bare-metal/elf toolchain. gdb simulator only support bare-metal/elf toolchain. Selecting the tests to run in GCC's regression test suite By default GCC will execute all tests of its regression test suite. While running them in parallel (e.g.make -j$(nproc) report...