Skip to content

Harden RSSI core buffering and backpressure#1461

Open
bengineerd wants to merge 2 commits into
rssi-regression-foundationfrom
rssi-core-fixes
Open

Harden RSSI core buffering and backpressure#1461
bengineerd wants to merge 2 commits into
rssi-regression-foundationfrom
rssi-core-fixes

Conversation

@bengineerd

Copy link
Copy Markdown
Contributor

Description

Harden the RSSI core buffering path and enable the core-level integration regressions that exercise full RSSI endpoint behavior.

This updates RssiCore so the transmit and receive segment buffers explicitly instantiate the RAM implementation that matches SYNTH_MODE_G (xpm, altera_mf, or inferred) instead of passing that mode through the generic SimpleDualPortRam wrapper. It also clamps the application FIFO pause threshold so very small segment-buffer configurations do not create an invalid threshold, and extends local busy detection to include downstream application backpressure.

Details

This was necessary because the core-level RSSI regressions exercise combinations that are more aggressive than the historical defaults: small segment buffers, wrapper backpressure, packetizer paths, and multi-stream packetizer2 routing. Those cases exposed three core-level issues:

  • small SEGMENT_ADDR_SIZE_G values could make (2**SEGMENT_ADDR_SIZE_G) - 16 non-positive even though the FIFO pause threshold generic is positive;
  • downstream application backpressure was not always reflected in the local busy signal advertised by RSSI;
  • RAM selection was implicit through SimpleDualPortRam, which is less robust for this core because the RSSI buffer ports use write-enable shapes that differ between inferred and vendor-specific implementations.

This has usually worked until now because common RSSI builds use larger segment buffers, valid default timing/window settings, and do not hold the application sink in sustained backpressure during connection negotiation and data transfer. The bug shows up when tests intentionally reduce buffer sizes or force downstream pressure to pin the protocol-visible busy behavior.

Protocol-wise, the local RSSI endpoint must not advertise that it can accept more traffic when its application path is unable to receive data. The existing RSSI documentation also defines SEGMENT_ADDR_SIZE_G as segment-buffer capacity in 64-bit RSSI words, so the FIFO threshold needs to remain valid across the supported generic range.

Dependency Note

This PR is intentionally draft and depends on the preceding RSSI fix PRs:

The direct diff for this PR is one commit and four files. However, the ungated integration tests require the earlier FSM/monitor/register fixes to be present. Against rssi-regression-foundation alone, these tests fail first in the old RssiConnFsm path before this core change is meaningfully exercised.

Validation

On the isolated branch:

  • ./.venv/bin/vsg -c vsg-linter.yml -f protocols/rssi/v1/rtl/RssiCore.vhd
  • git diff --check

On a temporary stacked validation branch containing #1454 through #1458 plus this patch:

  • ./.venv/bin/python -B -m pytest -q -p no:cacheprovider tests/protocols/rssi/test_RssiCore.py -> 6 passed
  • ./.venv/bin/python -B -m pytest -q -p no:cacheprovider tests/protocols/rssi/test_RssiCoreWrapper.py -> 5 passed
  • ./.venv/bin/python -B -m pytest -q -p no:cacheprovider tests/protocols/rssi/test_RssiCoreWrapperMultiStream.py -> 1 passed, 2 skipped

Related

Part of the RSSI regression split after the regression foundation PR.

@bengineerd
bengineerd marked this pull request as ready for review July 13, 2026 18:18
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