Skip to content

rtl(axi_dw_downsizer): hold BRESP stable while BVALID asserted - #451

Open
devtyagi3909 wants to merge 14 commits into
pulp-platform:masterfrom
devtyagi3909:fix-axi-dw-downsizer-bresp-stability
Open

devtyagi3909 wants to merge 14 commits into
pulp-platform:masterfrom
devtyagi3909:fix-axi-dw-downsizer-bresp-stability

Conversation

@devtyagi3909

@devtyagi3909 devtyagi3909 commented Sep 7, 2026

Copy link
Copy Markdown

Fixes #289.

The AXI specification requires that BRESP does not change value while BVALID is asserted and BREADY has not yet been seen. The downsizer violated this because its AW/W channel FSM (in W_IDLE) could preemptively reset the shared burst_resp accumulator before the slow B channel had finished its wait state, thereby corrupting the output response on subsequent cycles.

This fix ensures that:

  • BRESP output is held stable during the BVALID wait state.
  • The burst response accumulator is initialized at reset, and reset strictly according to B channel handshakes.
  • The idle reset in the W channel FSM has been removed, completely decoupling the response accumulation from W channel boundaries.

@devtyagi3909
devtyagi3909 force-pushed the fix-axi-dw-downsizer-bresp-stability branch from f2eb069 to 5d24780 Compare September 7, 2026 18:21
@imchenwu
imchenwu requested a review from nikgiu September 10, 2026 15:32
nikgiu and others added 13 commits September 16, 2026 09:35
- Add VSIM_JOBS (bounded vsim/license concurrency); set to 2 to evaluate CI impact. 1 = legacy sequential path.
Address review feedback on the bounded-parallelism approach:
- Track launched vsim PIDs explicitly and wait on each one instead of
  scanning `jobs -rp`, which lists only running jobs and would silently
  drop a job that already failed (e.g. an elaboration error) before the
  drain, yielding a false-green CI.
- Restore the IdUsed == IdWidth corner in the xbar sweep (distinct ID
  handling path).
- Drop `+acc` from the xbar sweep: it only adds signal visibility for
  waveform/PLI, useless in a batch-only CI run.
Per review suggestion: rather than driving parallelism from run_vsim.sh with
a bash job pool (VSIM_JOBS/throttle/drain), split the axi_xbar parameter sweep
into two testbench-sharing CI jobs, axi_xbar and axi_xbar2, that the runner
schedules concurrently. This keeps run_vsim.sh simple and sequential
(fail-fast via set -e), makes per-shard results/logs easy to inspect, and lets
CI concurrency limits govern simulator-license usage.

- run_vsim.sh: drop the bounded-parallelism machinery; call_vsim is sequential
  again. Add the axi_xbar2 shard (sweep 2: ID-width usage, data width,
  pipelining) reusing tb_axi_xbar; axi_xbar keeps sweep 1.
- .gitlab-ci.yml: add axi_xbar2 job; factor the shared xbar trigger set into a
  reusable anchor and add tb_axi_xbar_pkg.sv to it (was missing).

Trade-off to evaluate with this trial: license capping now lives with CI job
concurrency rather than the script. Backup of the bash approach kept at branch
ng/vsim_opt-backup.
…ility

+acc tells vopt to preserve access to internal objects for interactive
debugging (waves, single-stepping, PLI). The CI runs are batch-only, so
this only slows the simulations down. Coverage instrumentation is
unaffected: +cover=bcesfx is kept where it was.
The +cover=bcesfx / -coverage / -classdebug flags have collected coverage
into memory since 2020, but no UCDB was ever saved, merged, or reported
anywhere in the repository's history, so the data was discarded on every
vsim exit. The instrumentation only cost simulation time (measured with
questa-2025.1: tb_axi_addr_test 46 s -> 34 s, tb_axi_iw_converter
4.8 s -> 3.1 s per configuration).

If code coverage is ever wanted for real, it needs the full loop (save
per-run UCDBs, vcover merge, report, review); that should be introduced
deliberately as its own change.
…lits

Index every simulation in enumeration order and filter on
CI_NODE_INDEX/CI_NODE_TOTAL, so splitting a heavy sweep is just
`parallel: N` on its CI job. This removes the axi_xbar2 pseudo-test
(sweep merged back into axi_xbar, identical configurations, verified
via --list diff against the old enumeration).

Also: per-config log files (kept as CI artifacts on failure) instead of
one overwritten vsim.log, a --list mode to inspect sweep coverage, and
a loud failure for a shard that executed zero simulations.
…DED opt-in

GitLab sets CI_NODE_INDEX/CI_NODE_TOTAL on parallel:matrix jobs too,
where they mean the matrix position. Trusting them unconditionally made
the 12-module matrix job shard itself 12 ways: some modules executed
nothing and failed, others silently ran a fraction of their configs and
passed. Shard only when the job declares VSIM_SHARDED, as the axi_xbar
job now does alongside its parallel: count.

Also drop the vsim log upload from the test jobs.
Measured on pipeline 6db402a: dropping the dead coverage flags cut most
test jobs by 30-70%, but axi_xbar barely benefits (132 min total, was
148) and its two shards (69/63 min) are now the longest jobs by far.
Four shards of ~33 min each match the heaviest remaining job and the
runner's four concurrent slots.

Also complete the hand-maintained per-job trigger lists with the
transitive dependencies they were missing, audited against the actual
instantiation tree of every testbench. The recurring gaps: axi_err_slv
internally instantiates axi_atop_filter, axi_demux_simple instantiates
axi_demux_id_counters, axi_multicut instantiates axi_cut, axi_mux
instantiates axi_id_prepend, axi_dw_converter instantiates both sizers,
and axi_burst_splitter pulls in a whole chain via its _gran stage.
The rule was folded into an explicit path list when axi_xbar2 shared it
(the $TEST_MODULE-derived paths would not exist for the pseudo-test).
With axi_xbar2 gone, use the same anchor as every other job again; the
extra rule keeps only the testbench package and the submodules.
scripts/run_vsim.sh: fix regression-script bugs and optimize vsim ci jobs for better speed and coverage.
@nikgiu
nikgiu force-pushed the master branch 2 times, most recently from 77d6154 to 3024a69 Compare September 17, 2026 09:22
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.

axi_dw_downsizer: AXI Slave BRESP changes in value during BVALID’s wait for BREADY

3 participants