Refactor DiffTest with Chisel-generated interfaces (#136) #407
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
test-difftest-main: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Mill Installation | |
run: | | |
sudo curl -L https://github.com/com-lihaoyi/mill/releases/download/0.11.1/0.11.1 > /usr/local/bin/mill | |
chmod +x /usr/local/bin/mill | |
- name: Generate Verilog | |
run: | | |
make difftest_verilog NOOP_HOME=$GITHUB_WORKSPACE | |
test-difftest-nutshell: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Prepare environment | |
run: | | |
cd $GITHUB_WORKSPACE/.. | |
git config --global url."https://github.com/".insteadOf git@github.com: | |
git config --global url."https://".insteadOf git:// | |
git clone https://github.com/OpenXiangShan/xs-env | |
cd xs-env | |
sudo -s ./setup-tools.sh | |
source ./setup.sh | |
- name: Prepare NutShell | |
run: | | |
cd $GITHUB_WORKSPACE/../xs-env | |
rm -r NutShell | |
git clone -b dev-difftest --single-branch https://github.com/OSCPU/NutShell.git | |
cd NutShell && git submodule update --init | |
rm -r difftest | |
cp -r $GITHUB_WORKSPACE . | |
- name: Simulation with No Diff | |
run: | | |
cd $GITHUB_WORKSPACE/../xs-env | |
source ./env.sh | |
cd $GITHUB_WORKSPACE/../xs-env/NutShell | |
source ./env.sh | |
make clean | |
make emu | |
./build/emu -b 0 -e 0 -i ./ready-to-run/microbench.bin --no-diff | |
- name: Basic Difftest | |
run: | | |
cd $GITHUB_WORKSPACE/../xs-env | |
source ./env.sh | |
cd $GITHUB_WORKSPACE/../xs-env/NutShell | |
source ./env.sh | |
./build/emu -b 0 -e 0 -i ./ready-to-run/microbench.bin --diff ./ready-to-run/riscv64-nemu-interpreter-so | |
- name: Difftest with Snapshot | |
run: | | |
cd $GITHUB_WORKSPACE/../xs-env | |
source ./env.sh | |
cd $GITHUB_WORKSPACE/../xs-env/NutShell | |
source ./env.sh | |
make clean | |
make emu EMU_SNAPSHOT=1 | |
./build/emu -b 0 -e 0 -i ./ready-to-run/microbench.bin --diff ./ready-to-run/riscv64-nemu-interpreter-so | |
- name: Difftest with Trace | |
run: | | |
cd $GITHUB_WORKSPACE/../xs-env | |
source ./env.sh | |
cd $GITHUB_WORKSPACE/../xs-env/NutShell | |
source ./env.sh | |
make clean | |
make emu EMU_TRACE=1 | |
./build/emu -b 10 -e 12 -i ./ready-to-run/microbench.bin --dump-wave --diff ./ready-to-run/riscv64-nemu-interpreter-so | |
- name: Difftest with two threads | |
run: | | |
cd $GITHUB_WORKSPACE/../xs-env | |
source ./env.sh | |
cd $GITHUB_WORKSPACE/../xs-env/NutShell | |
source ./env.sh | |
make clean | |
make emu EMU_THREADS=2 | |
./build/emu -b 0 -e 0 -i ./ready-to-run/microbench.bin --diff ./ready-to-run/riscv64-nemu-interpreter-so |