mirror of
https://github.com/openhwgroup/cvw.git
synced 2025-04-19 11:34:50 -04:00
Update setup scripts and automatically copy site-setup to $RISCV
This commit is contained in:
parent
6b6ff23c72
commit
d6644a743c
3 changed files with 42 additions and 23 deletions
|
@ -70,7 +70,7 @@ is $PRETTY_NAME. The regular Ubuntu install will be attempted, but there may be
|
|||
fi
|
||||
else
|
||||
echo "The Wally install script is currently only compatible with Ubuntu and Red Hat family \
|
||||
(RHEL or Rocky Linux) distros. Your detected distro is $ID. You may try manually running the \
|
||||
(RHEL or Rocky Linux) distros. Your detected distro is $PRETTY_NAME. You may try manually running the \
|
||||
commands in this script, but it is likely that some will need to be altered."
|
||||
exit 1
|
||||
fi
|
||||
|
@ -371,7 +371,7 @@ fi
|
|||
# riscof
|
||||
echo -e "\n*************************************************************************"
|
||||
echo -e "*************************************************************************"
|
||||
echo -e "Installing riscof"
|
||||
echo -e "Installing Riscof"
|
||||
echo -e "*************************************************************************"
|
||||
echo -e "*************************************************************************\n"
|
||||
pip3 install git+https://github.com/riscv/riscof.git
|
||||
|
@ -388,3 +388,18 @@ if [[ ((! -e sky130_osu_sc_t12) && ($(git clone https://foss-eda-tools.googlesou
|
|||
cd sky130_osu_sc_t12
|
||||
git reset --hard && git clean -f && git checkout main && git pull
|
||||
fi
|
||||
|
||||
# site-setup script
|
||||
echo -e "\n*************************************************************************"
|
||||
echo -e "*************************************************************************"
|
||||
echo -e "Downloading Site Setup Script"
|
||||
echo -e "*************************************************************************"
|
||||
echo -e "*************************************************************************\n"
|
||||
cd "$RISCV"
|
||||
if [ ! -e "${RISCV}"/site-setup.sh ]; then
|
||||
wget https://raw.githubusercontent.com/openhwgroup/cvw/main/site-setup.sh
|
||||
wget https://raw.githubusercontent.com/openhwgroup/cvw/main/site-setup.csh
|
||||
if [ "$FAMILY" = rhel ]; then
|
||||
echo "source /opt/rh/gcc-toolset-13/enable" >> site-setup.sh
|
||||
fi
|
||||
fi
|
25
setup.sh
25
setup.sh
|
@ -14,23 +14,26 @@
|
|||
echo "Executing Wally setup.sh"
|
||||
|
||||
# Path to RISC-V Tools
|
||||
export RISCV=/opt/riscv # change this if you installed the tools in a different location
|
||||
if [ -e /opt/riscv ]; then
|
||||
export RISCV=/opt/riscv
|
||||
elif [ -e ~/riscv ]; then
|
||||
export RISCV=~/riscv
|
||||
else
|
||||
# set the $RISCV directory here and remove the subsequent two lines
|
||||
# export RISCV=
|
||||
echo "\$RISCV directory not found. Checked /opt/riscv and ~/riscv. Edit setup.sh to point to your custom \$RISCV directory."
|
||||
exit 1;
|
||||
fi
|
||||
echo \$RISCV set to "${RISCV}"
|
||||
|
||||
# Path to Wally repository
|
||||
WALLY=$(dirname ${BASH_SOURCE[0]:-$0})
|
||||
WALLY=$(dirname "${BASH_SOURCE[0]:-$0}")
|
||||
export WALLY=$(cd "$WALLY" && pwd)
|
||||
echo \$WALLY set to ${WALLY}
|
||||
echo \$WALLY set to "${WALLY}"
|
||||
# utility functions in Wally repository
|
||||
export PATH=$WALLY/bin:$PATH
|
||||
|
||||
# Verilator needs a larger stack to simulate CORE-V Wally
|
||||
ulimit -c 234613
|
||||
|
||||
# load site licenses and tool locations
|
||||
if [ -f ${RISCV}/site-setup.sh ]; then
|
||||
source ${RISCV}/site-setup.sh
|
||||
else
|
||||
source ${WALLY}/site-setup.sh
|
||||
fi
|
||||
source "${RISCV}"/site-setup.sh
|
||||
|
||||
echo "setup done"
|
||||
|
|
|
@ -20,19 +20,22 @@ export VCS_HOME=/cad/synopsys/vcs/U-2023.03-SP2-4 # Change thi
|
|||
export PATH=$QUESTA_HOME/bin:$DC_HOME/bin:$VCS_HOME/bin:$PATH
|
||||
|
||||
# GCC
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RISCV/riscv-gnu-toolchain/lib:$RISCV/riscv-gnu-toolchain/riscv64-unknown-elf/lib
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RISCV/riscv64-unknown-elf/lib
|
||||
|
||||
# Spike
|
||||
export LD_LIBRARY_PATH=$RISCV/lib:$LD_LIBRARY_PATH
|
||||
# RISC-V Tools
|
||||
export LD_LIBRARY_PATH=$RISCV/lib:$RISCV/lib64:$LD_LIBRARY_PATH
|
||||
export PATH=$PATH:$RISCV/bin
|
||||
|
||||
# Verilator
|
||||
export PATH=/usr/local/bin/verilator:$PATH # Change this for your path to Verilator
|
||||
# Activate riscv-python Virtual Environment
|
||||
source "$RISCV"/riscv-python/bin/activate
|
||||
|
||||
# environment variables needed for RISCV-DV
|
||||
export RISCV_GCC=`which riscv64-unknown-elf-gcc` # Copy this as it is
|
||||
export RISCV_OBJCOPY=`which riscv64-unknown-elf-objcopy` # Copy this as it is
|
||||
export SPIKE_PATH=/usr/bin # Change this for your path to riscv-isa-sim (spike)
|
||||
export RISCV_GCC=$(which riscv64-unknown-elf-gcc) # Copy this as it is
|
||||
export RISCV_OBJCOPY=$(which riscv64-unknown-elf-objcopy) # Copy this as it is
|
||||
export SPIKE_PATH=$RISCV/bin # Change this for your path to riscv-isa-sim (spike)
|
||||
|
||||
# Verilator needs a larger stack to simulate CORE-V Wally
|
||||
ulimit -c 234613
|
||||
|
||||
# Imperas OVPsim; put this in if you are using it
|
||||
#export PATH=$RISCV/imperas-riscv-tests/riscv-ovpsim-plus/bin/Linux64:$PATH
|
||||
|
@ -48,5 +51,3 @@ if [ -e "$IDV" ]; then
|
|||
setupImperas ${IMPERAS_HOME}
|
||||
export PATH=$IDV/scripts/cvw:$PATH
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue