Skip to content

Add Verilator-based verification environment for hwpe_ctrl_target - #33

Merged
FrancescoConti merged 9 commits into
masterfrom
fc/verification
Aug 5, 2026
Merged

Add Verilator-based verification environment for hwpe_ctrl_target#33
FrancescoConti merged 9 commits into
masterfrom
fc/verification

Conversation

@FrancescoConti

Copy link
Copy Markdown
Member

Introduce a dedicated, self-checking test environment for the SystemRDL-based
hwpe_ctrl_target, together with a GitHub Actions CI that runs it. The build and
regression infrastructure mirrors RedMulE's (bender script -> verilator --binary,
bwruntests.py parallel runner, portless *_tb_wrap top).

The testbench drives hwpe_ctrl_intf_periph directly (no core, no golden model),
which allows cycle-exact stimulus for the backpressure and commit/trigger-overlap
corners. Four scenarios, selected with +TEST=:

reg_access every register at its offset: reset values, write/readback,
read-only immutability, reserved-bit masking, byte enables,
and the hardware-to-software paths (STATUS, RUNNING_JOB)
offload repeated ACQUIRE -> COMMIT -> TRIGGER, overlapped and
separated, job-ID sequencing, job FIFO payload ordering,
autotrigger on/off, trigger masking while a job runs
fifo_backpressure job queue filled to NB_CONTEXT, ACQUIRE returning the
queue-full code while gnt stays asserted, then recovery
soft_clear all four encodings, clear_o pulse width, register-file
versus state clear isolation, and reuse after a clear

Other changes:

  • rdl.sh: replace the GNU-only sed -i (broken on macOS) with a portable form,
    and prepend the SPDX header PeakRDL does not emit
  • Bender.yml: sources are guarded by a project-specific hwpe_ctrl_test target;
    the generic 'test' target would also select common_cells' own testbenches,
    since bender applies target flags across the whole dependency tree
  • CI matrix covers NB_CONTEXT 2 and 4, an elaboration-time parameter

Introduce a dedicated, self-checking test environment for the SystemRDL-based
hwpe_ctrl_target, together with a GitHub Actions CI that runs it. The build and
regression infrastructure mirrors RedMulE's (bender script -> verilator --binary,
bwruntests.py parallel runner, portless *_tb_wrap top).

Fix the register-interface naming contract: commits 86e7706 and ce04de5 shortened
the names in hwpe_ctrl_regif_example.rdl without updating hwpe_ctrl_target.sv,
which left the example incoherent with target. Restore the naming used by the target
(and by other HWPE like redmule), and replace the placeholder job-independent and
job-dependent regfiles with an example set that exercises writable, read-only,
nonzero-reset, reserved-masked and hw-driven fields. hwpe_ctrl_target.sv itself is
unchanged.

The testbench drives hwpe_ctrl_intf_periph directly (no core, no golden model),
which allows cycle-exact stimulus for the backpressure and commit/trigger-overlap
corners. Four scenarios, selected with +TEST=:

  reg_access        every register at its offset: reset values, write/readback,
                    read-only immutability, reserved-bit masking, byte enables,
                    and the hardware-to-software paths (STATUS, RUNNING_JOB)
  offload           repeated ACQUIRE -> COMMIT -> TRIGGER, overlapped and
                    separated, job-ID sequencing, job FIFO payload ordering,
                    autotrigger on/off, trigger masking while a job runs
  fifo_backpressure job queue filled to NB_CONTEXT, ACQUIRE returning the
                    queue-full code while gnt stays asserted, then recovery
  soft_clear        all four encodings, clear_o pulse width, register-file
                    versus state clear isolation, and reuse after a clear

Other changes:
  - rdl.sh: replace the GNU-only sed -i (broken on macOS) with a portable form,
    and prepend the SPDX header PeakRDL does not emit
  - Bender.yml: sources are guarded by a project-specific hwpe_ctrl_test target;
    the generic 'test' target would also select common_cells' own testbenches,
    since bender applies target flags across the whole dependency tree
  - CI matrix covers NB_CONTEXT 2 and 4, an elaboration-time parameter

The pre-existing QuestaSim flow under sim/ and tb/ is untouched in this
commit.
The lint-license CI job expects three consecutive comment lines at the top of
each file: a Copyright line, the Solderpad notice, and SPDX-License-Identifier.
The legacy headers carried the long-form Solderpad boilerplate but no SPDX
identifier. Prepend the three-line block to every .sv/.svh, preserving each
file's existing copyright years and keeping the original header underneath.
The licence job checks every tracked file, not just RTL, so the dependency
manifests (Bender.yml, src_files.yml) and the legacy QuestaSim helper scripts
(rtl/rdl.sh, sim/*) failed it -- none of them carries a header today.

Waive them via exclude_paths. Patterns are fnmatch'd against the repo-relative
path, so sim/* covers only the top-level sim/ tree; target/sim (the Verilator
flow) stays checked.
@FrancescoConti
FrancescoConti marked this pull request as ready for review August 5, 2026 17:48
@FrancescoConti
FrancescoConti merged commit 558fe3d into master Aug 5, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant