-
Notifications
You must be signed in to change notification settings - Fork 198
/
setup.csh
executable file
·42 lines (33 loc) · 1.23 KB
/
setup.csh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/csh
# setup.csh
# james.stine@okstate.edu 18 February 2023
echo "Executing Wally setup.csh"
# 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
setenv RISCV /opt/riscv
else if ( -d ~/riscv ) then
setenv RISCV ~/riscv
else
# set the $RISCV directory here and remove the subsequent two lines
# setenv RISCV
echo "\$RISCV directory not found. Checked /opt/riscv and ~/riscv. Edit setup.csh to point to your custom \$RISCV directory."
exit 1;
endif
echo \$RISCV set to "${RISCV}"
# Path to Wally repository
setenv WALLY $PWD
echo '$WALLY set to ' ${WALLY}
# utility functions in Wally repository
extend PATH $WALLY/bin
# Verilator needs a larger stack to simulate CORE-V Wally
limit stacksize unlimited
# 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
echo "setup done"