Running Tests - StanfordVLSI/dragonphy2 GitHub Wiki
Here's how to run regression tests on the Stanford infrastructure:
- Install the "Miniconda Linux 64-bit" if you don't have it already (link here)
- Create and activate a conda environment for dragonphy:
conda create -n dragonphy python=3.7
conda activate dragonphy
- Upgrade pip to get rid of an annoying warning:
pip install -U pip
- Set up the CAD environment (assumes that you're using bash; steps copied from
.buildkite/pipeline.yml):
source /cad/modules/tcl/init/bash
module load base xcelium dc_shell
export DW_TAP=/cad/synopsys/syn/L-2016.03-SP5-5/dw/sim_ver/DW_tap.v
export BUILD_VIEW=cpu
- Clone the dragonphy source if you haven't already
git clone https://github.com/StanfordVLSI/dragonphy2.git
cd dragonphy2
- Install dependencies (steps copied from
regress.sh). If you already have Genesis2 or DaVE installed elsewhere, that's fine -- please just make sure they're up-to-date and that you have updated the environment variables as shown below. These environment variables can be defined in.bashrcso that you don't have to repeat these steps when you open a new terminal session.
# install Genesis2
git clone https://github.com/StanfordVLSI/Genesis2.git
export GENESIS_HOME=`realpath Genesis2/Genesis2Tools`
export PERL5LIB="$GENESIS_HOME/PerlLibs/ExtrasForOldPerlDistributions"
export PATH="$GENESIS_HOME/bin:$PATH"
export PATH="$GENESIS_HOME/gui/bin:$PATH"
/bin/rm -rf $GENESIS_HOME/PerlLibs/ExtrasForOldPerlDistributions/Compress
# install DaVE
git clone --single-branch --branch pwl_cos https://github.com/StanfordVLSI/DaVE.git
export mLINGUA_DIR=`realpath DaVE/mLingua`
- Install the DragonPHY package itself:
pip install -e .
- Build the chip design (things like the JTAG register map...).
python make.py --view cpu
- Install dependencies for testing:
pip install pytest
- Run all tests.
pytest tests/other_tests tests/cpu_block_tests tests/cpu_system_tests -s
- If you want to run a specific test, you can do something like this:
pytest tests/new_tests/GLITCH -s