Skip to content

Commit

Permalink
[Makefile & CI] Separate installation and Verilator test stages
Browse files Browse the repository at this point in the history
- Split the Verilator model generation into a distinct verilate target for better modularity.
- Adjusted install to exclude Verilator-related tasks, focusing only on toolchain setup.
- Updated GitHub Actions workflow to include a dedicated Verilator step after compilation.
- Added a verilate function to .github/workflows/tools.sh for consistent environment setup and execution.
  • Loading branch information
bi262934 committed Jan 28, 2025
1 parent b5f51a3 commit 9be5b7e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ jobs:
- name: Compile
run: sbt clean compile

- name: Verilate
run: source .github/workflows/tools.sh && verilate

- name: Regression Test SIMULATOR
run: |
export NAXRISCV_REGRESSION_THREAD_COUNT=1
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,10 @@ install_all(){
export NAXRISCV=${PWD}
make install
}

verilate(){
export NAXRISCV=${PWD}
export VERILATOR_ROOT=${NAXRISCV}/toolchain/verilator-v4.216/bin
export PATH=${VERILATOR_ROOT}:$PATH
make verilate
}
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,10 @@ src/test/cpp/naxriscv/obj_dir/VNaxRiscv:$(PRJ_NAX).v

verilate-$(PRJ_NAX): src/test/cpp/naxriscv/obj_dir/VNaxRiscv

verilate : verilate-$(PRJ_NAX)

# install
install:clean-install clean-toolchain install-toolchain verilate-$(PRJ_NAX)
install:clean-install clean-toolchain install-toolchain
@echo " "
@echo "[SUCCESS] The entire toolchain is built with Success."
@echo "[SUCCESS] Generates the Verilator model for $(TARGET_NAX) NaxRiscv."
Expand Down

0 comments on commit 9be5b7e

Please sign in to comment.