喜欢0次
sudo apt-get install autoconf automake autotools-dev curl device-tree-compiler libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev git
#下载RISC-V GNU Toolchain
git clone https://github.com/riscv-mcu/e203_hbirdv2.git
#配置riscv测试
cp nuclei*.bz2 ~/
cd ~/
tar -xjvf nuclei*.bz2
cd /
mkdir -p ./riscv-tools/prebuilt_tools/prefix/bin
cd ./riscv-tools/prebuilt_tools/prefix/bin/
ln -s ~/gcc/bin/* .
#编译测试
cd /riscv-tools/riscv-tests/isa
source regen.sh
#编译RTL
cd /vsim
make clean
make install
#For iVerilog:
sudo apt-get install iverilog gtkwave
make compile SIM=iverilog
make run_test SIM=iverilog
#zsh环境下会报错,找到报错位置的语法错误删除&符号即可
#vsim/run目录中的Makefile文件第131行tee前的&删除
#显示波形
#Using GTKWave:
make wave SIM=iverilog
#运行回归测试
#For iVerilog:
make regress_run SIM=iverilog
这样方便做出来整体的实现,但是每次使用都需要 source setup.sh
修改.zshrc(或者bash环境修改.bashrc)
#根据自己的shell环境修改环境变量
gedit ~/.zshrc
#在最下方插入下列配置
#Nuclei SDK PATH
export NUCLEI_TOOL_ROOT="/home/burch/nuclei-tools"
# Create your setup_config.sh
# and define NUCLEI_TOOL_ROOT like below
# NUCLEI_TOOL_ROOT=/home/develop/Software/Nuclei
export SETUP_CONFIG="/home/burch/hbird-sdk/setup_config.sh"
[ -f $SETUP_CONFIG ] && source $SETUP_CONFIG
[ -f .ci/build_sdk.sh ] && source .ci/build_sdk.sh
[ -f .ci/build_applications.sh ] && source .ci/build_applications.sh
#echo "Setup Nuclei SDK Tool Environment"
#echo "NUCLEI_TOOL_ROOT=$NUCLEI_TOOL_ROOT"
export PATH=$NUCLEI_TOOL_ROOT/gcc/bin:$NUCLEI_TOOL_ROOT/openocd/bin:$PATH
#配置完成之后保存退出
source ~/.zshrc