Add tUserFirst alignment checking to AxiStreamBatcherEventBuilder#1442
Open
ruck314 wants to merge 2 commits into
Open
Add tUserFirst alignment checking to AxiStreamBatcherEventBuilder#1442ruck314 wants to merge 2 commits into
ruck314 wants to merge 2 commits into
Conversation
Add an optional check (EnableAlignCheck @ 0xFF8[1]) that requires all non-bypassed inbound streams to present the same tUserFirst value before an event is forwarded to the batcher. On a mismatch the per-channel ErrorAlignDet status (@ 0xFD4) latches and the builder stops moving data, keeping corrupted/misaligned data out of the downstream batcher until a DAQ transition or blowoff clears the pipeline. - Preserve EnableAlignCheck across soft/hard reset alongside bypass/timeout/blowoff - Exclude bypassed channels from the alignment check - Add PyRogue ErrorAlignDet (RO) and EnableAlignCheck (RW) variables - Add cocotb coverage: mismatch stall + recovery, aligned pass-through, bypassed-channel exclusion, and config survival across soft reset The comparison reference is slave index 0, which must remain enabled when the check is in use.
A NULL frame carries tUserFirst=0x01 (EOFE), which differs from the reference channel's tUserFirst. With EnableAlignCheck=1, a data channel (i>0) issuing a NULL frame for an event without data was incorrectly flagged as a misalignment, stalling the event builder. Gate errorAlignDet with not(nullDet(i)) so NULL frames do not trip the check. Add a cocotb regression (align_check_ignores_null_source_test) covering a NULL frame on a data channel with EnableAlignCheck=1, and document that stream[0] must never be NULL or bypassed when the check is enabled.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## pre-release #1442 +/- ##
===============================================
- Coverage 25.23% 25.19% -0.05%
===============================================
Files 258 258
Lines 20423 20516 +93
===============================================
+ Hits 5153 5168 +15
- Misses 15270 15348 +78 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
Adds an optional tUserFirst alignment check to
AxiStreamBatcherEventBuilder.When
EnableAlignCheck(0xFF8[1]) is set, every active (non-bypassed) inboundstream must present the same first-word
tUser(tUserFirst) value before anevent is forwarded to the batcher. On a mismatch, the per-channel
ErrorAlignDetstatus (
0xFD4) latches and the builder stops moving data, keepingcorrupted/misaligned data out of the downstream batcher. Recovery is a normal DAQ
run transition and/or blowoff to flush the pipeline. With
EnableAlignCheck=0thebehavior is unchanged and
ErrorAlignDetreads zero.Changes
protocols/batcher/rtl/AxiStreamBatcherEventBuilder.vhd)EnableAlignCheckcontrol bit (0xFF8[1]) andErrorAlignDetstatus word (0xFD4).errorAlignDet = 0; clear it on a transition frame.EnableAlignCheckacross soft/hard reset, alongside bypass/timeout/blowoff(otherwise the auto soft-reset on a blowoff
1->0edge /initialize()would silentlydisable the check).
r.enAlignCheck and not(r.bypass(i))) so abypassed stream cannot deadlock the flow.
python/surf/protocols/batcher/_AxiStreamBatcherEventBuilder.py)ErrorAlignDet(RO) andEnableAlignCheck(RW) variables.tests/protocols/batcher/test_AxiStreamBatcherEventBuilder.py)recovery, aligned pass-through, bypassed-channel exclusion, and
EnableAlignChecksurvival across a soft reset.
Known limitation
The comparison reference is slave index 0; it must remain enabled when the check is in use.
Verification (local, mirrors CI)
vsg-linter.yml): passcompileall+flake8 python/ scripts/ tests/: passpytest -n auto tests/axi tests/base tests/dsp tests/protocols: 671 passed