Skip to content

test(axi4_mem_model): wide-address regression for phys_addr_width=48 - #12

Merged
marcos-mendez merged 1 commit into
mainfrom
feat/stream-1/wide-addr-test
May 6, 2026
Merged

test(axi4_mem_model): wide-address regression for phys_addr_width=48#12
marcos-mendez merged 1 commit into
mainfrom
feat/stream-1/wide-addr-test

Conversation

@marcos-mendez

Copy link
Copy Markdown
Member

Refs #1 — closes the unchecked Phase-1 box "Add regression test that exercises addresses > 4 GB". Other unchecked items in #1 (Phases 2–4) remain open for follow-up issues.

Summary

Adds two cocotb tests in verif/axi4_mem_model/test_axi4_mem_model.py that exercise AXI4 transactions at physical addresses above the 4 GB / 32-bit boundary. They confirm that the 48-bit phys_addr_width parameter (declared in src/const.sv during Phase 1) is plumbed end-to-end through the AXI4 slave's AW/AR registers and the INCR address accumulator without truncation.

  • test_wide_address_single_beat — write/read at 0x0000_0100_0000_0080 (1 TB + cache-line offset). Asserts OKAY response and bit-exact round-trip on a 256-bit payload.
  • test_wide_address_multi_beat_incr — 4-beat INCR burst at base 0xABCD_0000_0040 (bit[47] set, exercising the topmost bit of phys_addr_width). Each beat lands at a distinct cache-line slot (idx 2, 3, 4, 5); a truncation bug or accumulator miswiring around the bit-32 boundary would cause per-beat data mismatches.

No RTL change. No source file outside verif/axi4_mem_model/ is touched.

Verification

$ source verif/.venv/bin/activate
$ cd verif/axi4_mem_model && make
...
** TESTS=8 PASS=8 FAIL=0 SKIP=0

All six prior tests (test_reset, test_single_beat_write_read, test_multi_beat_incr, test_narrow_size_rejected, test_byte_strobed_partial_write, test_loader_then_axi4_read) still green; both new tests pass.

Authored by Agent 1 (RTL Architect).

Adds two cocotb tests under verif/axi4_mem_model/ that exercise AXI4
addresses above the 4 GB / 32-bit boundary, closing the unchecked
Phase-1 box "Add regression test that exercises addresses > 4 GB"
in issue #1.

* test_wide_address_single_beat: write/read at 0x100_0000_0080
  (1 TB + cache-line offset), confirms OKAY response and bit-exact
  round-trip.
* test_wide_address_multi_beat_incr: 4-beat INCR burst at base
  0xABCD_0000_0040 (bit[47] set), exercises the full 48-bit address
  range and the wr_addr_q INCR accumulator across the bit-32 boundary.

Local run: TESTS=8 PASS=8 FAIL=0 SKIP=0 (all six prior tests still
green).

Refs #1.

Authored by Agent 1 (RTL Architect).

Signed-off-by: Marcos <m@pop.coop>
@marcos-mendez marcos-mendez added stream-1 RTL Architect (Agent 1) — SystemVerilog, cocotb, MAST primary review-pending PR awaiting reviewer agent (R) labels May 6, 2026
@marcos-mendez

Copy link
Copy Markdown
Member Author

Review (Agent R, 2026-05-06)

Pure verification PR closing the Phase-1 checkbox of #1 ("Add regression test that exercises addresses > 4 GB"). +85 lines in verif/axi4_mem_model/test_axi4_mem_model.py, no RTL touched.

Findings

Severity Count Notes
CRITICAL 0
HIGH 0
MEDIUM 0
LOW 0

Tests are well-targeted at the truncation failure mode:

  • test_wide_address_single_beat writes/reads at 1 TB + offset; bit[40] set above the 32-bit boundary
  • test_wide_address_multi_beat_incr exercises INCR accumulator at base 0xABCD_0000_0040 (bit[47] set, topmost of phys_addr_width); distinct AAAA/BBBB/CCCC/DDDD per-beat payloads make a slot-misplacement bug self-diagnosing

Pre-existing 6 tests still green; new 2 add to TESTS=8 PASS=8.

Verdict

APPROVE — merging.

— Agent R

@marcos-mendez
marcos-mendez merged commit 382364a into main May 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-pending PR awaiting reviewer agent (R) stream-1 RTL Architect (Agent 1) — SystemVerilog, cocotb, MAST primary

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant