cvw/setup.csh

43 lines
1.2 KiB
Tcsh
Raw Permalink Normal View History

2024-06-28 22:21:30 +00:00
#!/bin/csh
2023-02-20 05:53:50 +00:00
# setup.csh
# james.stine@okstate.edu 18 February 2023
2023-02-20 11:30:08 +00:00
echo "Executing Wally setup.csh"
2023-02-20 05:53:50 +00:00
# Extend alias which makes extending PATH much easier.
alias extend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) setenv \!:1 ${\!:1}:\!:2;echo Added \!:2 to \!:1'
alias prepend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) setenv \!:1 "\!:2":${\!:1};echo Added \!:2 to \!:1'
# Path to RISC-V Tools
if ( -d /opt/riscv ) then
2024-06-28 22:21:30 +00:00
setenv RISCV /opt/riscv
else if ( -d ~/riscv ) then
2024-06-28 22:21:30 +00:00
setenv RISCV ~/riscv
else
# set the $RISCV directory here and remove the subsequent two lines
# setenv RISCV
2024-07-04 20:45:24 +00:00
echo "\$RISCV directory not found. Checked /opt/riscv and ~/riscv. Edit setup.csh to point to your custom \$RISCV directory."
2024-06-28 22:21:30 +00:00
exit 1;
endif
echo \$RISCV set to "${RISCV}"
2023-02-20 05:53:50 +00:00
# Path to Wally repository
setenv WALLY $PWD
echo '$WALLY set to ' ${WALLY}
2023-02-20 05:53:50 +00:00
# utility functions in Wally repository
extend PATH $WALLY/bin
# Verilator needs a larger stack to simulate CORE-V Wally
limit stacksize unlimited
2024-06-28 22:21:30 +00:00
# load site licenses and tool locations
if ( -e "${RISCV}"/site-setup.csh ) then
source $RISCV/site-setup.csh
else
echo "site-setup.csh not found in \$RISCV directory. Rerun wally-toolchain-install.sh to automatically download it."
fi
2024-01-15 15:24:18 +00:00
2023-02-20 05:53:50 +00:00
echo "setup done"