Skip to content

Fix AxiStreamDmaV2Read byte-count handling and expand DMA v2 regression coverage#1388

Merged
ruck314 merged 10 commits intopre-releasefrom
fix-dma-read
Apr 8, 2026
Merged

Fix AxiStreamDmaV2Read byte-count handling and expand DMA v2 regression coverage#1388
ruck314 merged 10 commits intopre-releasefrom
fix-dma-read

Conversation

@bengineerd
Copy link
Copy Markdown
Contributor

@bengineerd bengineerd commented Apr 2, 2026

Description

Fix the AxiStreamDmaV2Read GHDL/runtime failure by bounding the AXI byte-count CONV_INTEGER paths and by generating terminal-beat tKeep/tStrb masks directly from slv byte counts. This also expands the axi/dma/rtl/v2/ regression split so the read, write, mux, and FIFO benches each own a distinct behavior surface without excessive overlap.

Details

  • Add a shared genTKeep(bytes : slv) overload in axi/axi-stream/rtl/AxiStreamPkg.vhd and use it from axi/dma/rtl/v2/AxiStreamDmaV2Read.vhd so short terminal beats no longer depend on wide-slv to integer conversion.
  • Bound the totalBytes conversions in axi/axi4/rtl/AxiPkg.vhd to the burst-size window to avoid the GHDL/std_logic_arith CONV_INTEGER failure that was aborting AxiStreamDmaV2Read.
  • Expand tests/axi/dma/test_AxiStreamDmaV2Read.py from the prior expected-failure smoke into passing aligned and short-terminal-beat cases that check payload, tKeep, tDest, tId, observable tUser, and descriptor return behavior.
  • Expand tests/axi/dma/test_AxiStreamDmaV2Write.py to cover both a stable single-frame write and a multi-burst write with accepted-AW address monitoring.
  • Expand tests/axi/dma/test_AxiStreamDmaV2WriteMux.py to cover descriptor-first, simultaneous-launch, and in-flight data-first arbitration cases, including the ACK_WAIT_BVALID_G path.
  • Expand tests/axi/dma/test_AxiStreamDmaV2Fifo.py to cover the integrated FIFO register map and pause-threshold behavior against the live write-buffer count.
  • Update the regression handoff/progress notes to remove AxiStreamDmaV2Read from the expected-open list and to document the current v2 DMA bench ownership split.

Related

- Added a new `genTKeep` function to handle `slv` input for terminal mask generation in `AxiStreamPkg.vhd`.
- Updated `AxiStreamDmaV2Read` to utilize the new `genTKeep` function, improving the handling of read sizes.
- Modified the test for `AxiStreamDmaV2Read` to cover both aligned 4-byte reads and short 3-byte terminal beats, ensuring accurate payload and descriptor checks.
- Resolved known issues with `CONV_INTEGER` assertions in simulation, stabilizing the read path functionality.
@ruck314 ruck314 mentioned this pull request Apr 2, 2026
@bengineerd bengineerd marked this pull request as ready for review April 2, 2026 20:39
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a GHDL/runtime failure in the AXI-stream DMA v2 read path by avoiding problematic wide CONV_INTEGER conversions and by generating terminal-beat tKeep/tStrb masks directly from the byte-count slv. It also expands the DMA v2 cocotb regressions to cover additional read/write/mux/FIFO behaviors and removes the prior “expected failure” posture for the v2 read test.

Changes:

  • Fix DMA v2 read terminal-beat masking by switching to a new genTKeep(bytes : slv) overload and remove dependency on wide-slv-to-integer conversion in AxiStreamDmaV2Read.
  • Bound totalBytes conversions in AxiPkg.getAxiLen* to avoid GHDL/std_logic_arith CONV_INTEGER failures.
  • Expand and restructure DMA v2 Python/cocotb regression coverage across read, write, write-mux arbitration, and integrated FIFO register/pause-threshold behaviors.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
axi/axi-stream/rtl/AxiStreamPkg.vhd Adds genTKeep(bytes : slv) overload to generate keep masks without integer conversion.
axi/dma/rtl/v2/AxiStreamDmaV2Read.vhd Uses the new genTKeep(slv) overload for terminal-beat tKeep/tStrb.
axi/axi4/rtl/AxiPkg.vhd Bounds CONV_INTEGER conversions to burst-window slices to avoid GHDL failures.
tests/axi/dma/test_AxiStreamDmaV2Read.py Converts read test from xfail smoke to passing aligned + short-terminal-beat cases and customizes sim build per case.
tests/axi/dma/test_AxiStreamDmaV2Write.py Expands write regression to include single-frame and multi-burst scenarios with AW acceptance monitoring.
tests/axi/dma/test_AxiStreamDmaV2WriteMux.py Adds mux arbitration ordering tests (descriptor-first, simultaneous, data-first) and expands parameter sweep.
tests/axi/dma/test_AxiStreamDmaV2Fifo.py Expands FIFO bench to validate integrated register map and pause-threshold behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread axi/axi-stream/rtl/AxiStreamPkg.vhd Outdated
Comment thread tests/axi/dma/test_AxiStreamDmaV2Write.py
Comment thread tests/axi/dma/test_AxiStreamDmaV2Read.py Outdated
bengineerd and others added 5 commits April 2, 2026 15:00
Rename _build_vhdl_sources/_merge_vhdl_sources in
tests/common/regression_utils.py to drop the underscore prefix so
test modules can import them without reaching across a
private-name boundary.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ruck314 ruck314 merged commit 7d92c51 into pre-release Apr 8, 2026
9 checks passed
@ruck314 ruck314 deleted the fix-dma-read branch April 8, 2026 03:06
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.

3 participants