Fix typos and license problem, which should be configured accordingly.

This commit is contained in:
Kunlin Han 2024-04-03 10:52:53 -07:00
parent afa797e7f2
commit 125e08d306
4 changed files with 20 additions and 10 deletions

View File

@ -13,6 +13,7 @@
- `--network=host` for docker run - `--network=host` for docker run
- `xhost +localhost:${USER}` for host - `xhost +localhost:${USER}` for host
- [ ] Regression Script - [ ] Regression Script
- [ ] Configure the license for Questa
## TL;DR ## TL;DR

View File

@ -10,7 +10,7 @@ fi
# if UBUNTU_BUILD is 0, then call function fetch_ubuntu_image # if UBUNTU_BUILD is 0, then call function fetch_ubuntu_image
# otherwise, call function build_ubuntu_image # otherwise, call function build_ubuntu_image
if [ $UBUNTU_BUILD -eq 0 ]; then if [ $UBUNTU_BUILD -eq 0 ]; then
${DOCKER_EXEC} pull wallysoc/wally ${DOCKER_EXEC} pull wallysoc/ubuntu_wally
else else
${DOCKER_EXEC} build -t ubuntu_wally -f Dockerfile.ubuntu . ${DOCKER_EXEC} build -t ubuntu_wally -f Dockerfile.ubuntu .
${DOCKER_EXEC} tag ubuntu_wally:latest wallysoc/ubuntu_wally:latest ${DOCKER_EXEC} tag ubuntu_wally:latest wallysoc/ubuntu_wally:latest

View File

@ -1,11 +1,17 @@
#!/bin/bash
# this script is used to run regression inside the Dockerfile.regression # this script is used to run regression inside the Dockerfile.regression
# of course, you can run it in the current environment as soon as # of course, you can run it in the current environment as soon as
# - RISCV is defined # - RISCV is defined
# - QUESTA is defined # - QUESTA is defined
QUESTA="/cad/mentor/questa_sim-xxxx.x_x" export QUESTA="/cad/mentor/questa_sim-xxxx.x_x"
export MGLS_LICENSE_FILE=27002@zircon.eng.hmc.edu # Change this to your Siemons license server
export SNPSLMD_LICENSE_FILE=27002@zircon.eng.hmc.edu # Change this to your Synopsys license server
export QUESTAPATH=/cad/mentor/questa_sim-xxxx.x_x/questasim/bin # Change this for your path to Questa
export SNPSPATH=/cad/synopsys/SYN/bin # Change this for your path to Design Compiler
# now only main branch is supported # now only main branch is supported
if [ -z "${CVW_GIT+x}" ]; then if [ -z "${CVW_GIT}" ]; then
echo "No CVW_GIT is provided" echo "No CVW_GIT is provided"
CVW_GIT="https://github.com/openhwgroup/cvw" CVW_GIT="https://github.com/openhwgroup/cvw"
fi fi
@ -13,17 +19,20 @@ fi
export PATH="${RISCV}/bin:${PATH}" export PATH="${RISCV}/bin:${PATH}"
git config --global http.version HTTP/1.1 git config --global http.version HTTP/1.1
# if cvw is not available or new cvw is required # if cvw is not available or CLEAN_CVW(empty string) is defined
if [ ! -f "/home/${USERNAME}/cvw/setup.sh" ] || [ -z "${CLEAN_CVW+x}" ]; then if [[ ! -f "/home/${USERNAME}/cvw/setup.sh" ]] || [[ -z "${CLEAN_CVW-x}" ]]; then
cd /home/${USERNAME} && rm -rf /home/${USERNAME}/cvw cd /home/${USERNAME} && rm -rf /home/${USERNAME}/cvw
git clone --recurse-submodules ${CVW_GIT} /home/${USERNAME}/cvw git clone --recurse-submodules ${CVW_GIT} /home/${USERNAME}/cvw
# if failed to clone submodules for some reason, please run `git submodule update` # if failed to clone submodules for some reason, please run `git submodule update`
fi fi
cd /home/${USERNAME}/cvw && chmod +x ./setup.sh && ./setup.sh cd /home/${USERNAME}/cvw && chmod +x ./setup.sh && ./setup.sh
make install && make riscof && make testfloat # build it only if BUILD_RISCOF is defined with empty string
if [[ -z "${BUILD_RISCOF-x}" ]]; then
make install && make riscof && make testfloat
fi
if [ -z "${RUN_QUESTA+x}" ] ; then if [[ -z "${RUN_QUESTA-x}" ]] ; then
if [ ! -f "${QUESTA}/questasim/bin/vsim" ]; then if [ ! -f "${QUESTA}/questasim/bin/vsim" ]; then
echo "Cannot find vsim with ${QUESTA}/questasim/bin/vsim" echo "Cannot find vsim with ${QUESTA}/questasim/bin/vsim"
else else
@ -32,6 +41,5 @@ if [ -z "${RUN_QUESTA+x}" ] ; then
fi fi
fi fi
cd sim && verilator -GTEST="\"arch64i\"" -DVERILATOR=1 \ cd sim && verilator -GTEST="\"arch64i\"" -DVERILATOR=1 --timescale "1ns/1ns" --timing --binary --top-module testbench -I../config/shared -I../config/rv64gc ../src/cvw.sv ../testbench/testbench.sv ../testbench/common/*.sv ../src/*/*.sv ../src/*/*/*.sv --relative-includes
--timescale "1ns/1ns" --timing --binary --top-module testbench -I../config/shared -I../config/rv64gc ../src/cvw.sv ../testbench/testbench.sv ../testbench/common/*.sv ../src/*/*.sv ../src/*/*/*.sv --relative-includes /home/${USERNAME}/cvw/sim/obj_dir/Vtestbench > ./regression_verilator.out
./obj_dir/Vtestbench 2>&1 > ./regression_verilator.out

View File

@ -4,6 +4,7 @@ else
DOCKER_EXEC=$(which docker) DOCKER_EXEC=$(which docker)
fi fi
CVW_MOUNT=${CVW_MOUNT:$(pwd)/../../} CVW_MOUNT=${CVW_MOUNT:$(pwd)/../../}
USERNAME="cad"
UBUNTU_WALLY_HASH=$(${DOCKER_EXEC} images --quiet wallysoc/ubuntu_wally) UBUNTU_WALLY_HASH=$(${DOCKER_EXEC} images --quiet wallysoc/ubuntu_wally)
TOOLCHAINS_HASH=$(${DOCKER_EXEC} images --quiet wallysoc/toolchains_wally) TOOLCHAINS_HASH=$(${DOCKER_EXEC} images --quiet wallysoc/toolchains_wally)