We will be using a fork of Cristobal Ramirez Lazo's gem5 fork namely https://github.com/plctlab/plct-gem5, this fork is quite active and has been updated to RVV 1.0 . The initial fork extends GEM5 with RVV support and a vector processing unit extension (and its GEM5 configuration).
Building gem5 for RISC-V
gem5 has some external dependencies which must be installed before the build
# on ubuntu 20.04 sudo apt install build-essential git m4 scons zlib1g zlib1g-dev \ libprotobuf-dev protobuf-compiler libprotoc-dev libgoogle-perftools-dev \ python3-dev python3-six python-is-python3 libboost-all-dev pkg-config
More Information on building GEM5 can be found here: https://www.gem5.org/documentation/general_docs/building .
Then the actual build can be executed:
git clone https://github.com/plctlab/plct-gem5.git cd plct-gem5 # the -j option set the number of parallel jobs for the build # the actually this option can be tuned to your setting. scons build/RISCV/gem5.opt -j3 --gold-linker
Execution
As described in the project README.md, execution a program is straightforward:
${GEM5_DIR}build/RISCV/gem5.opt ${GEM5_DIR}configs/example/riscv_vector_engine.py \ --cmd="$program $program_args"
Note
This fork is still under development and some instructions are not supported yet.
References:
- gem5 fork by PCLTLAB (still active) with RVV support https://github.com/plctlab/plct-gem5
- Cristobal Ramirez Lazo's gem5 fork with initial risc-v vector support https://github.com/RALC88/gem5/tree/develop
- gem5 source code repository mirror on github: https://github.com/gem5/gem5
- gem5 project task to track RISCV-V vector upstream support: https://gem5.atlassian.net/browse/GEM5-618
- Tutorial on GEM5 https://www.cs.sfu.ca/~ashriram/Courses/CS7ARCH/tutorials/gem5/index.html
No comments:
Post a Comment