Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
132d9d6
Integrate ACT4 framework with CVA6(cv32a65x
arshiarifat-10x Apr 2, 2026
7b4c8e8
modified makefile
arshiarifat-10x Apr 7, 2026
9ee0ce2
clean broken ACT submodules state
arshiarifat-10x Apr 16, 2026
a899ee9
Add ACT submmodule correctly (cv32a65x-act4)
arshiarifat-10x Apr 16, 2026
127c023
Merge branch 'master' into cv32a65x-act4
arshiarifat-10x Apr 16, 2026
21d2d2f
CI + Smoke regression integration
arshiarifat-10x Apr 17, 2026
a5beea8
ci: fix RISCV toolchain path for CI
arshiarifat-10x Apr 17, 2026
d2d2ae6
Merge branch 'master' into cv32a65x-act4
arshiarifat-10x Apr 20, 2026
4e90053
ci: fix submodule intitalization for nested ACT4 dependencies
arshiarifat-10x Apr 20, 2026
f6c6cec
Update ACT4 submodule to latest PR commit
arshiarifat-10x Apr 20, 2026
39b97dd
Update .github/workflows/ci.yml
arshiarifat-10x Apr 21, 2026
33619cd
Update .github/workflows/ci.yml
arshiarifat-10x Apr 21, 2026
5567e28
Update verif/regress/wrapper-cv32a65x-act.sh
arshiarifat-10x Apr 21, 2026
cb50e02
Update verif/regress/wrapper-cv32a65x-act.sh
arshiarifat-10x Apr 21, 2026
7a4336e
Update verif/regress/wrapper-cv32a65x-act.sh
arshiarifat-10x Apr 21, 2026
e388f5e
Update verif/regress/wrapper-cv32a65x-act.sh
arshiarifat-10x Apr 21, 2026
bb67dd4
Update verif/sim/Makefile
arshiarifat-10x Apr 21, 2026
3075c16
Update verif/sim/Makefile
arshiarifat-10x Apr 21, 2026
bbecbc3
Updated files
arshiarifat-10x Apr 21, 2026
409406d
Point ACT4 submodule to upstream act4 branch
arshiarifat-10x Apr 21, 2026
ae5c9b1
Updated ACT4 submodules
arshiarifat-10x Apr 21, 2026
dd0cbd1
Merge branch 'openhwgroup:master' into cv32a65x-act4
arshiarifat-10x Apr 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ jobs:
- uses: actions/checkout@v6
with:
submodules: recursive

- name: Fix submodule sync
run: |
git submodule sync --recursive
git submodule update --init --recursive
- name: Get specific submodule hash
id: core-v-submodule-hash
run: |
Expand Down Expand Up @@ -133,9 +136,10 @@ jobs:
runs-on: ubuntu-latest
env:
SPIKE_TANDEM: 1
RISCV: ${{ github.workspace }}/tools/riscv-toolchain
strategy:
matrix:
testcase: [ dv-riscv-arch-test, cv32a6_tests ]
testcase: [ dv-riscv-arch-test, cv32a6_tests, wrapper-cv32a65x-act]
config: [ cv32a65x ]
simulator: [ veri-testharness ]
needs:
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@
[submodule "corev_apu/fpga/src/gpio"]
path = corev_apu/fpga/src/gpio
url = https://github.com/pulp-platform/gpio.git
[submodule "external/act4"]
path = external/act4
url = https://github.com/riscv-non-isa/riscv-arch-test.git
1 change: 1 addition & 0 deletions external/act4
Submodule act4 added at aec3ea
2 changes: 1 addition & 1 deletion verif/core-v-verif
62 changes: 62 additions & 0 deletions verif/regress/wrapper-cv32a65x-act.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/bin/bash
# Run ACT 4.0 tests on cv32a65x via Makefile targets

# where are the tools
if ! [ -n "$RISCV" ]; then
echo "Error: RISCV variable undefined"
exit 1
fi

if ! [ -n "$DV_SIMULATORS" ]; then
DV_SIMULATORS=veri-testharness,spike
fi

# install the required tools
if [[ "$DV_SIMULATORS" == *"veri-testharness"* ]]; then
source ./verif/regress/install-verilator.sh
fi
source ./verif/regress/install-spike.sh

# setup sim env
source ./verif/sim/setup-env.sh

if [ ! -d "external/act4" ]; then
echo "ERROR: ACT4 submodule missing"
exit 1
fi

echo "$SPIKE_INSTALL_DIR"

set -e

# ================== CONFIGURATION ==================
export CVA6_REPO_DIR="$(pwd)"
export ACT4_PKG="$CVA6_REPO_DIR/external/act4"
export TARGET_RTL="cv32a65x"
export CV_SW_PREFIX="riscv64-unknown-elf-"
export max_cycles=2000000

echo "Environment Setup Complete"

# Build the Verilator model
echo "Building Verilator model for ${TARGET_RTL}"
make verilate target="$TARGET_RTL" -j$(nproc)

cd "${CVA6_REPO_DIR}/verif/sim"

# Run generation and certification via Makefile
# This triggers the 'gen' then 'certify' targets defined in verif/sim/Makefile
echo "Starting ACT Regression (Generation + RTL Simulation)"
make gen-certify target="$TARGET_RTL"

#Display Summary
# Path derived from SIM_RESULTS and VERI_LOG_DIR in Makefile
SUMMARY_FILE="${CVA6_REPO_DIR}/verif/sim/simulation_results/certification_summary.txt"

if [ -f "${SUMMARY_FILE}" ]; then
echo ""
cat "${SUMMARY_FILE}"
else
echo "Error: Summary file not found at ${SUMMARY_FILE}"
exit 1
fi
75 changes: 75 additions & 0 deletions verif/sim/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,81 @@ else
spike_params_final := $(spike_params_final) --extension=cvxif
endif


# ==============================================================================
# CVA6 ACT 4.0 Certification Targets (cv32a65x)
# ==============================================================================

# Updated paths for CVA6 directory structure
certification_PROGRAM_PATH = $(ACT4_PKG)/work/cv32a65x/elfs
certification_PROGRAM_RELPATH = ../../vendor_lib/cva6/external/act4/work/cv32a65x/elfs
VERI_LOG_DIR = $(CVA6_REPO_DIR)/verif/sim/simulation_results

.PHONY: gen
gen: $(ACT4_PKG)
@command -v uv >/dev/null 2>&1 || { echo "Error: 'uv' not found. Install from https://docs.astral.sh/uv/getting-started/installation/"; exit 1; }
Comment thread
arshiarifat-10x marked this conversation as resolved.
@echo "* Cleaning ACT4.0 directory..."
$(MAKE) -C $(ACT4_PKG) clean
@echo "* Generating ACT4.0 tests for CVA6 (cv32a65x)..."
# Test generation now relies on the YAML config for extensions and parameters
$(MAKE) -C $(ACT4_PKG) \
CONFIG_FILES=config/cores/cva6/cv32a65x/test_config.yaml EXTENSIONS="" EXCLUDE_EXTENSIONS="InterruptsSm,Sm" \
--jobs $(shell nproc)
@echo "* Tests generated in: $(certification_PROGRAM_PATH)"

.PHONY: certify
certify: TEST = certification
certify:
@echo "$(BANNER)"
@echo "* Running ALL compliance ELFs with CVA6 Verilator Model"
@echo "$(BANNER)"
@set -e; \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this recipe should be moved to a new script file. What do you think about it?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping the logic in the Makefile allows developers to see the entire execution flow( from address discovery to signature validation) in a single place without needing to track down external helper scripts.
As we integrate this into GitHub Actions, having a self-contained Makefile target ensures that the CI runner only needs to execute make certify. This avoids the overhead of managing absolute/relative pathing issues across different environments.

Copy link
Copy Markdown
Author

@arshiarifat-10x arshiarifat-10x Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But if you suggest i can move this recipe to new script file. However, I am open to either approach. Would you prefer:
1- A clean separate script (e.g., verif/sim/run_certification.sh) with the Makefile target acting as a simple wrapper?
2- Keeping it in the Makefile to match the existing simulation target patterns in this repository?
Please let me know which direction aligns better with the project's long-term coding standards, and I will
update the PR accordingly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a lot of scripts in verif/regress/, you might be interested in looking at these. Maybe verif/regress/ is a suitable place to add certify.sh?

For CVA6 designers, these scripts are our entry points to run most simulations: they call the relevant tools (cva6.py and make) for us.
So I think we do not need a Makefile wrapper as make it is not the user-facing entry to run simulations.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current implementation is already aligned with the verif/regress/ flow, the wrapper is placed there intentionally and acts as a standard entry point, similar to existing scripts. It handles environment setup and then invokes the existing Makefile targets (gen and certify) under the hood.

From a user perspective, this keeps the interface consistent with other regression flows:

bash verif/regress/wrapper-cv32a65x-act.sh

So users are not expected to interact with the Makefile directly.

I’ll add a short README section to make the flow and entry point clearer.

mkdir -p "$(VERI_LOG_DIR)"; \
SUMMARY="$(VERI_LOG_DIR)/certification_summary.txt"; \
echo "RESULT TEST" > "$$SUMMARY"; \
echo "------ ----" >> "$$SUMMARY"; \
ROOT="$(certification_PROGRAM_PATH)"; \
ELFS="$$(find -L "$$ROOT" \( -type f -o -type l \) -a \( -iname '*.elf' -o -iname '*.elf32' \) 2>/dev/null | sort)"; \
if [ -z "$$ELFS" ]; then \
echo "No .elf files found under $$ROOT"; \
exit 2; \
fi; \
PASS=0; FAIL=0; TOTAL=0; \
for ELF in $$ELFS; do \
TOTAL=$$((TOTAL+1)); \
REL="$${ELF#$$ROOT/}"; \
LOG="$(VERI_LOG_DIR)/$${REL%.*}.log"; \
mkdir -p "$$(dirname "$$LOG")"; \
# CVA6 requires the exact tohost address to be passed as a plusarg\
TOHOST_ADDR=$$(riscv64-unknown-elf-nm -B $$ELF | grep -w tohost | cut -d' ' -f1); \
set +e; \
# Using the CVA6 Variane_testharness binary directly \
$(CVA6_REPO_DIR)/work-ver/Variane_testharness \
$$ELF \
+elf_file=$$ELF \
+tohost_addr=0x$$TOHOST_ADDR \
+signature=$$ELF.signature_output \
> "$$LOG" 2>&1; \
RC=$$?; \
set -e; \
# CVA6 testbench signals success with "ALL TESTS PASSED"\
if [ $$RC -eq 0 ] && grep -q "PASSED" "$$LOG"; then \
echo "PASS $$REL" | tee -a "$$SUMMARY"; \
PASS=$$((PASS+1)); \
else \
echo "FAIL $$REL" | tee -a "$$SUMMARY"; \
FAIL=$$((FAIL+1)); \
fi; \
done; \
echo "" | tee -a "$$SUMMARY"; \
echo "TOTAL=$$TOTAL PASS=$$PASS FAIL=$$FAIL" | tee -a "$$SUMMARY"; \
echo "Summary saved to: $$SUMMARY"; \
true

.PHONY: gen-certify
gen-certify: gen certify


##############################################
# Waveform configuration
##############################################
Expand Down
Loading