From ad568e9d25081efc028ca39b25c74d3a043d1991 Mon Sep 17 00:00:00 2001 From: Rose Thompson Date: Mon, 20 May 2024 15:46:26 -0500 Subject: [PATCH 1/5] Updated readme. --- README.md | 57 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 50 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2444ff99a..89dc350f3 100644 --- a/README.md +++ b/README.md @@ -41,19 +41,14 @@ Clone your fork of the repo and run the setup script. Change to y $ git remote add upstream https://github.com/openhwgroup/cvw $ source ./setup.sh +If you are installing on a new system without any tools installed please jump to the next section, Toolchain Installation then come back here. + Add the following lines to your .bashrc or .bash_profile to run the setup script each time you log in. if [ -f ~/cvw/setup.sh ]; then source ~/cvw/setup.sh fi -Edit setup.sh and change the following lines to point to the path and license server for your Siemens Questa and Synopsys Design Compiler installation and license server. If you only have Questa, you can still simulate but cannot run logic synthesis. - - export MGLS_LICENSE_FILE=.. # Change this to your Siemens license server - export SNPSLMD_LICENSE_FILE=.. # Change this to your Synopsys license server - export QUESTAPATH=.. # Change this for your path to Questa - export SNPSPATH=.. # Change this for your path to Design Compiler - If the tools are not yet installed on your server, follow the Toolchain Installation instructions in the section below. Build the tests and run a regression simulation with Questa to prove everything is installed. Building tests will take a while. @@ -73,6 +68,17 @@ Ubuntu users can install the tools by running $ sudo $WALLY/bin/wally-tool-chain-install.sh +The default installation directory is /opt/riscv defined by the environment variable RISCV. You must copy and edit ~/cvw/site-setup.sh to $RISCV/ ~/cvw/setup.sh sources $RISCV/site-setup.sh. +This allows for customization of the site specific information such as commerical licenses and PATH variables. + +Change the following lines to point to the path and license server for your Siemens Questa and Synopsys Design Compiler installation and license server. If you only have Questa, you can still simulate but cannot run logic synthesis. If Questa or Design Compiler are already setup on this system then don't set these variables. + + export MGLS_LICENSE_FILE=.. # Change this to your Siemens license server + export SNPSLMD_LICENSE_FILE=.. # Change this to your Synopsys license server + export QUESTAPATH=.. # Change this for your path to Questa + export SNPSPATH=.. # Change this for your path to Design Compiler + + See wally-tool-chain-install.sh for a detailed description of each component, or to issue the commands one at a time to install on the command line. ## Installing EDA Tools @@ -138,3 +144,40 @@ If you want to add a cronjob you can do the following: 30 21 * * * bash -l -c "source ~/PATH/TO/CVW/setup.sh; PATH_TO_CVW/cvw/bin/wrapper_nightly_runs.sh --path {PATH_TO_TEST_LOCATION} --target all --tests nightly --send_email harris@hmc.edu,kaitlin.verilog@gmail.com" ``` +# Example wsim commands + +wsim runs one of multiple simulators, Questa, VCS, or Verilator using a specific configuration and either a suite of tests or a specific elf file. +The general syntax is +wsim [--options] + +Options: + -h, --help show this help message and exit + --elf, -e Elf file + --sim {questa,verilator,vcs}, -s {questa,verilator,vcs} + Simulator + --tb {testbench,testbench_fp}, -t {testbench,testbench_fp} + Testbench + --gui, -g Simulate with GUI + --coverage, -c Code & Functional Coverage + --args ARGS, -a ARGS Optional arguments passed to simulator via $value$plusargs + --vcd, -v Generate testbench.vcd + --lockstep, -l Run ImperasDV lock, step, and compare. + --locksteplog LOCKSTEPLOG, -b LOCKSTEPLOG + Retired instruction number to be begin logging. + +Run basic test with questa + +wsim rv64gc arch64i + +Run Questa with gui + +wsim rv64gc wally64priv --gui + +Run lockstep against ImperasDV with a single elf file in the --gui. Lockstep requires single elf. + +wsim rv64gc ../../tests/riscof/work/riscv-arch-test/rv64i_m/I/src/add-01.S/ref/ref.elf --elf --lockstep --gui + +Run lockstep against ImperasDV with a single elf file. Compute coverage. + +wsim rv64gc ../../tests/riscof/work/riscv-arch-test/rv64i_m/I/src/add-01.S/ref/ref.elf --elf --lockstep --coverage + From 55008e98c95f20c29fc2170fee1f6639533a2a51 Mon Sep 17 00:00:00 2001 From: Rose Thompson Date: Mon, 20 May 2024 15:50:17 -0500 Subject: [PATCH 2/5] Formated readme. --- README.md | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 89dc350f3..ea6c04424 100644 --- a/README.md +++ b/README.md @@ -151,33 +151,32 @@ The general syntax is wsim [--options] Options: - -h, --help show this help message and exit - --elf, -e Elf file - --sim {questa,verilator,vcs}, -s {questa,verilator,vcs} - Simulator - --tb {testbench,testbench_fp}, -t {testbench,testbench_fp} - Testbench - --gui, -g Simulate with GUI - --coverage, -c Code & Functional Coverage - --args ARGS, -a ARGS Optional arguments passed to simulator via $value$plusargs - --vcd, -v Generate testbench.vcd - --lockstep, -l Run ImperasDV lock, step, and compare. - --locksteplog LOCKSTEPLOG, -b LOCKSTEPLOG + -h, --help show this help message and exit + --elf, -e Elf file + --sim {questa,verilator,vcs}, -s {questa,verilator,vcs} + Simulator + --tb {testbench,testbench_fp}, -t {testbench,testbench_fp} + Testbench + --gui, -g Simulate with GUI + --coverage, -c Code & Functional Coverage + --args ARGS, -a ARGS Optional arguments passed to simulator via $value$plusargs + --vcd, -v Generate testbench.vcd + --lockstep, -l Run ImperasDV lock, step, and compare. + --locksteplog LOCKSTEPLOG, -b LOCKSTEPLOG Retired instruction number to be begin logging. Run basic test with questa -wsim rv64gc arch64i + wsim rv64gc arch64i Run Questa with gui -wsim rv64gc wally64priv --gui + wsim rv64gc wally64priv --gui Run lockstep against ImperasDV with a single elf file in the --gui. Lockstep requires single elf. -wsim rv64gc ../../tests/riscof/work/riscv-arch-test/rv64i_m/I/src/add-01.S/ref/ref.elf --elf --lockstep --gui + wsim rv64gc ../../tests/riscof/work/riscv-arch-test/rv64i_m/I/src/add-01.S/ref/ref.elf --elf --lockstep --gui Run lockstep against ImperasDV with a single elf file. Compute coverage. -wsim rv64gc ../../tests/riscof/work/riscv-arch-test/rv64i_m/I/src/add-01.S/ref/ref.elf --elf --lockstep --coverage - + wsim rv64gc ../../tests/riscof/work/riscv-arch-test/rv64i_m/I/src/add-01.S/ref/ref.elf --elf --lockstep --coverage From 7cc1fcbd49579e1cf99f6d390676ef569c73910f Mon Sep 17 00:00:00 2001 From: Rose Thompson Date: Mon, 20 May 2024 15:52:36 -0500 Subject: [PATCH 3/5] More formating. --- README.md | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index ea6c04424..88bd2e5fa 100644 --- a/README.md +++ b/README.md @@ -151,19 +151,16 @@ The general syntax is wsim [--options] Options: - -h, --help show this help message and exit - --elf, -e Elf file - --sim {questa,verilator,vcs}, -s {questa,verilator,vcs} - Simulator - --tb {testbench,testbench_fp}, -t {testbench,testbench_fp} - Testbench - --gui, -g Simulate with GUI - --coverage, -c Code & Functional Coverage - --args ARGS, -a ARGS Optional arguments passed to simulator via $value$plusargs - --vcd, -v Generate testbench.vcd - --lockstep, -l Run ImperasDV lock, step, and compare. - --locksteplog LOCKSTEPLOG, -b LOCKSTEPLOG - Retired instruction number to be begin logging. + -h, --help show this help message and exit + --elf, -e Elf file + --sim {questa,verilator,vcs}, -s {questa,verilator,vcs} Simulator + --tb {testbench,testbench_fp}, -t {testbench,testbench_fp} Testbench + --gui, -g Simulate with GUI + --coverage, -c Code & Functional Coverage + --args ARGS, -a ARGS Optional arguments passed to simulator via $value$plusargs + --vcd, -v Generate testbench.vcd + --lockstep, -l Run ImperasDV lock, step, and compare. + --locksteplog LOCKSTEPLOG, -b LOCKSTEPLOG Retired instruction number to be begin logging. Run basic test with questa From 33eb5980e7c8660298dd366ce02b3e7baacf06f0 Mon Sep 17 00:00:00 2001 From: Rose Thompson Date: Mon, 20 May 2024 15:57:45 -0500 Subject: [PATCH 4/5] More readme formating. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 88bd2e5fa..89ec18424 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,8 @@ wsim runs one of multiple simulators, Questa, VCS, or Verilator using a specific The general syntax is wsim [--options] -Options: +Parameters and options: + -h, --help show this help message and exit --elf, -e Elf file --sim {questa,verilator,vcs}, -s {questa,verilator,vcs} Simulator From d025bd0aff5265f9838aaa02b64599b33d4aba81 Mon Sep 17 00:00:00 2001 From: Rose Thompson Date: Mon, 20 May 2024 16:23:25 -0500 Subject: [PATCH 5/5] More improvements to the readme. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 89ec18424..c2e0f1d39 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,9 @@ Ubuntu users can install the tools by running $ sudo $WALLY/bin/wally-tool-chain-install.sh -The default installation directory is /opt/riscv defined by the environment variable RISCV. You must copy and edit ~/cvw/site-setup.sh to $RISCV/ ~/cvw/setup.sh sources $RISCV/site-setup.sh. +The default installation directory is /opt/riscv defined by the environment variable RISCV. You must copy and edit ~/cvw/site-setup.sh to $RISCV/site-setup.sh. + +~/cvw/setup.sh sources $RISCV/site-setup.sh. This allows for customization of the site specific information such as commerical licenses and PATH variables. Change the following lines to point to the path and license server for your Siemens Questa and Synopsys Design Compiler installation and license server. If you only have Questa, you can still simulate but cannot run logic synthesis. If Questa or Design Compiler are already setup on this system then don't set these variables.