Skip to content

Commit

Permalink
[ci] add --impure flag to verilator CI
Browse files Browse the repository at this point in the history
Signed-off-by: unlsycn <[email protected]>
  • Loading branch information
unlsycn authored and sequencer committed Nov 8, 2024
1 parent ea83e0e commit 9855071
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/verilator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
- name: "Build verilator emulator"
run: |
nix build '.#t1.${{ matrix.config }}.${{ env.EMU_TOP }}.verilator-emu' -L --no-link --cores 64
nix build '.#t1.${{ matrix.config }}.${{ env.EMU_TOP }}.verilator-emu' --impure -L --no-link --cores 64
- name: "Build all testcases"
run: |
# Build testcases with vlen 1024 and vlen 4096
nix build ".#t1.${{ matrix.config }}.${{ env.EMU_TOP }}.cases._all" --max-jobs auto -L --no-link --cores 64
nix build ".#t1.${{ matrix.config }}.${{ env.EMU_TOP }}.cases._all" --impure --max-jobs auto -L --no-link --cores 64
# In the future, we may choose Verdi for trace, and left verilator trace only for performance evaluation
build-verilator-trace-emulators:
Expand All @@ -52,7 +52,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: "Build verilator emulator with trace"
run: nix build '.#t1.${{ matrix.config }}.${{ env.EMU_TOP }}.verilator-emu-trace' -L --no-link --cores 64
run: nix build '.#t1.${{ matrix.config }}.${{ env.EMU_TOP }}.verilator-emu-trace' --impure -L --no-link --cores 64

gen-matrix:
name: "Prepare for running testcases"
Expand Down
7 changes: 3 additions & 4 deletions script/ci/src/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,15 @@ object Main:
os.Path(
nixResolvePath(
testAttr,
if emuLib == "vcs" then Seq("--impure") else Seq()
Seq("--impure")
)
)
catch
case _ =>
Logger.error(
s"Online driver for config $config, case $caseName fail, please check manually on local machine"
)
Logger.error(s"nix build $testAttr" ++ (if emuLib == "vcs" then " --impure" else ""))
Logger.error(s"nix build $testAttr --impure")
Logger.fatal("Online Drive run fail, exiting CI")

Logger.info("Checking RTL event from event log")
Expand Down Expand Up @@ -249,8 +249,7 @@ object Main:
val emuResultPath = os.Path(
nixResolvePath(
s".#t1.$config.${top}.run._${emuLib}EmuResult",
if emuLib.toLowerCase() == "vcs" then Seq("--impure")
else Seq()
Seq("--impure")
)
)

Expand Down

0 comments on commit 9855071

Please sign in to comment.