JESD204B cocotb regression suite with RTL compliance fixes#1432
Open
ruck314 wants to merge 6 commits into
Open
JESD204B cocotb regression suite with RTL compliance fixes#1432ruck314 wants to merge 6 commits into
ruck314 wants to merge 6 commits into
Conversation
…dRxReg The 0x24 address decode had its read and write actions swapped: the write branch drove rdata from r.rxPowerDown while the read branch loaded v.rxPowerDown from wdata. Swap them so AXI-Lite writes set rxPowerDown and reads return its current value.
…eadback The read decode never cleared v.axilReadSlave.rdata before the address case, so bits left over from a previous read of a wider register could leak into the readback of a narrower field. Zero rdata at the start of every read transaction, matching the JesdRxReg decode.
… multiframe Per JESD204B section 8.2 (Figure 50) and 8.3 (Tables 20/21), the second ILAS multiframe must carry /Q/ (K28.4) at octet 1 followed by 14 link-configuration octets including the FCHK checksum. JesdIlasGen previously emitted only the /R/ and /A/ frame delimiters. - JesdIlasGen: add mfCnt/wordCnt counters and emit /Q/ plus the 14 config octets during the second multiframe (mfCnt=1) in GT byte order. FCHK is the mod-256 sum of config octets 0-12. - Add Q_CHAR_C (K28.4, 0x9C) to Jesd204bPkg. - Thread the ILAS link-config generics (DID_G, BID_G, M_G, N_G, NPRIME_G, CS_G, S_G, HD_G, CF_G) through JesdTxLane and Jesd204bTx, and drive per-lane LID via a new lid_i port. All generics and the lid_i port are defaulted so existing instantiations compile unchanged. The SURF RX ILA state counts multiframes and does not parse config octets, so the added content cannot break SURF-to-SURF links.
…mments - Jesd204bPkg: drop the unused jesdScrambler procedure (no references anywhere in the library; the per-lane scrambling lives in JesdScrCmb/descrambler logic). - JesdSyncFsmRx: correct the comma-detect comment (the AND chain spans four consecutive cycles, not three) and remove the stale readBuff TODO note. - Jesd204bTx: replace the 'scrambling not tested' header warning now that TX scrambling is exercised end-to-end by the cocotb loopback bench.
…s plumbing Add a cocotb-based regression suite for the JESD204B library under tests/protocols/jesd204b: - jesd204b_test_utils.py: golden models (LFSR scrambler, LMFC, ILAS timeline builders) and shared testbench helpers - Unit benches: JesdLmfcGen, JesdScramblerWrapper, Jesd16bTo32b, Jesd32bTo16b, JesdSyncFsmTx, JesdIlasGen, JesdTxLane, JesdSyncFsmRx, JesdAlignFrRepCh, JesdRxLane - Register benches: JesdTxReg and JesdRxReg full map walks - test_Jesd204bLoopback: end-to-end TX-to-RX loopback across parameter cases with golden scrambler cross-checks - README with the coverage model and bench-to-module map Add cocotb-facing wrappers under protocols/jesd204b/wrappers that flatten record ports and expose AXI-Lite/GT interfaces for simulation (JesdTxLaneWrapper, JesdRxLaneWrapper, JesdScramblerWrapper, Jesd204bTxWrapper, Jesd204bRxWrapper, Jesd204bLoopbackWrapper), and load them from ruckus.tcl.
175be01 to
9c873b0
Compare
Contributor
Author
|
Status: Released a FW build using this SURF PR to SMURF to HW regression test and validate these changes still work for their system before opening up this PR for review |
Contributor
Author
|
Shawn confirmed that JESD still working after using a new FW build that uses this SURF branch. I think we are ready for PR reviewing now: |
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
Adds a spec-grounded cocotb regression suite for the SURF JESD204B (
tests/protocols/jesd204b/), built clause-by-clause from the JESD204B spec, plus the RTL fixes the suite proved out.Test suite (98 tests, all green)
JesdLmfcGenframe/multiframe counters, scrambler round-trip against a 1+x^14+x^15 golden LFSR model,Jesd16bTo32b/Jesd32bTo16bwidth adaptersJesdSyncFsmTxcode-group sync handshake,JesdIlasGenILAS sequence content,JesdTxLanecharacter replacement plus in-context ILAS/CGSJesdSyncFsmRxsync FSM and error recovery,JesdAlignFrRepChalignment-character replacement,JesdRxLaneend-to-end ILAS capture and error handlingJesdTxReg/JesdRxRegAXI-Lite map walksRTL fixes
JesdIlasGen: ILAS multiframe 2 now emits /Q/ + the 14 JESD204B Table-21 link-configuration octets + FCHK (previously missing entirely); config fields threaded throughJesdTxLane/Jesd204bTxwith defaulted generics — no netlist change for existing instantiationsJesdRxReg: 0x24 PowerDown read/write action swap correctedJesdTxReg: missing rdata-zeroing in read decode addedJesd204bTx: stale "untested scrambling" header warning cleared (now covered by the loopback scrambling tests)