Clamp RSSI AXI-Lite parameters and advertise capabilities#1458
Open
bengineerd wants to merge 2 commits into
Open
Clamp RSSI AXI-Lite parameters and advertise capabilities#1458bengineerd wants to merge 2 commits into
bengineerd wants to merge 2 commits into
Conversation
bengineerd
changed the base branch from
pre-release
to
rssi-regression-foundation
July 7, 2026 21:20
… rssi-axil-reg-fixes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Clamp RSSI AXI-Lite local parameter writes to values the RTL can actually use, and advertise the RSSI core's build-time window and segment-buffer capabilities through reserved upper-byte register fields.
This updates
RssiAxiLiteRegItfso AXI-Lite writes cannot program zero outstanding segments, zero RSSI timeout values, or more outstanding segments thanMAX_NUM_OUTS_SEG_G. The existing max-segment-size clamp is preserved. The register interface now also exposesMAX_NUM_OUTS_SEG_Gat0x0C[31:24]andSEGMENT_ADDR_SIZE_Gat0x28[31:24], allowing PyRogue to discover the firmware limits instead of assuming the legacy defaults. Older firmware reads back zero in those fields, so the PyRogue model falls back to the previous defaults.Details
This was necessary because AXI-Lite register mode lets software override the local RSSI parameters that are advertised during connection negotiation. A zero outstanding-segment window is not usable, zero timeout values break timer semantics, and a software value larger than the implemented receive window can advertise capacity the hardware does not have. The protocol-facing RTL already treated segment size as a bounded hardware capability; this change applies the same protection to the remaining timing/window fields that can make negotiation invalid.
This has usually worked until now because the generic defaults are valid, and typical software does not intentionally write zero timeout/window values. PyRogue also assumed the common legacy firmware shape, so the missing capability discovery only became visible when tests exercised invalid AXI-Lite writes or firmware was built with different window/segment generics.
The RSSI v1 RTL points at the protocol page in each source header and defines these as SYN-negotiated local parameters. In-tree documentation also states that
MAX_SEG_SIZE_Gis the advertised/buffered RSSI DATA payload size and thatSEGMENT_ADDR_SIZE_Gdetermines segment capacity as2**SEGMENT_ADDR_SIZE_G * 8; seeprotocols/rssi/README.md.RssiCoredeclaresMAX_NUM_OUTS_SEG_Gas the receiver window capability and notes timeout recommendations in the generic list. EACK/out-of-sequence remains reserved in this RSSI v1 implementation, so the new segment-address capability is placed in the upper byte of that otherwise unused register word.Rogue handles the software implementation at the API boundary instead of an AXI-Lite register boundary. Its controller initializes valid local defaults, rejects zero
locMaxBuffers,locMaxSegment,locCumAckTout,locRetranTout, andlocNullToutvalues in the setters, and then serializes those configured values directly into SYN headers:Validation
./.venv/bin/python -B -m pytest -q -p no:cacheprovider tests/protocols/rssi/test_RssiAxiLiteRegItf.py./.venv/bin/vsg -c vsg-linter.yml -f protocols/rssi/v1/rtl/RssiAxiLiteRegItf.vhd protocols/rssi/v1/wrappers/RssiAxiLiteRegItfWrapper.vhd./.venv/bin/python -B -m py_compile python/surf/protocols/rssi/_RssiCore.py./.venv/bin/python -B -m pytest -q -p no:cacheprovider tests/protocols/rssiRelated
Builds on the RSSI regression foundation and follows the same split-fix flow as the previous RSSI monitor, TX FSM, RX FSM, and connection FSM PRs.