Skip to content

Repo to create custom RISCV test to run on boom

Notifications You must be signed in to change notification settings

zyongye/boom-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compile RISCV binary and run on BOOM

The tool and instruction is borrow from the official riscv-tests repo.

Precondition: Step up riscv toolchain

Follow the chipyard setup guide in another repo.

Generate testcase

cd case_generation
python3 test_case_generation.py
cd ../isa/rv64ui
make

Steps:

  1. Use simple.S as a skeleton. Thw testcode can be write at the section between RVTEST_CODE_BEGIN and RVTEST_PASS.
RVTEST_CODE_BEGIN
# Place to insert custom test code. 
RVTEST_PASS
  1. Use the following riscv gcc commad to compile program
riscv64-unknown-elf-gcc -march=rv64g -mabi=lp64 -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -T link.ld -o simple simple.S

We get binary simple.

  1. We can use riscv binary dump to inspect the binary
riscv64-unknown-elf-objdump --disassemble-all --disassemble-zeroes --section=.text --section=.text.startup --section=.text.init --section=.data simple

About

Repo to create custom RISCV test to run on boom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published