docs(arch): intercard SerDes liteiclink wrap proposal + ADR-014 update#39
Merged
marcos-mendez merged 1 commit intomainfrom May 6, 2026
Conversation
Refs #34. Adds a new design proposal at `docs/popsolutions/architecture/intercard-serdes-integration.md` that specifies how rev-A's inter-card SerDes RTL should consume the production-validated `enjoy-digital/liteiclink/serdes_ecp5.py` core rather than hand-rolling the Lattice ECP5 DCU primitive. The recommendation is **Option B + C combined**: - Option B — pre-generate the LiteX/Migen Python output once and commit the resulting Verilog under `popsolutions/InnerJib7EA/src/popsolutions/intercard/`. Build stays hermetic against Python toolchain drift; upgrades are reviewable diffs. - Option C — wrap the generated module in a thin SystemVerilog shim exposing our stable port surface (lanes, AXI-Stream upstream, role-dependent forwarded-clock direction). Insulates the rest of the RTL from liteiclink port renames across versions. Updates `docs/popsolutions/adr/0014-intercard-link.md`: - Status: DRAFT → Proposed (Agent R + human still required to move Proposed → Accepted). - Adds §12 SerDes IP source decision recording the wrap-not-roll choice plus the Option B+C integration approach. - Amends §9 implementation plan to delegate the PHY+PCS layer to liteiclink (only link/transport layers stay custom). - Cites Stays PR #31 (prjtrellis recon, 2026-05-06) and Stays PR #34 (LiteEth ECP5 SGMII recon, 2026-05-06) as the upstream-validation evidence and the dependency-already-pulled-in argument. - Adds question #5 to §8 (cooperative acknowledgement of the liteiclink dependency surface). Design proposal only — no RTL changes. Future PR (after Agent R + human approval of ADR-014) will land the pre-generated Verilog and the SV wrapper per Option B+C. License: ADR + design doc are CC-BY-SA-4.0 (preserved SPDX headers). Authored by Agent 1 (RTL Architect). Signed-off-by: Marcos <m@pop.coop>
Member
Author
Review by Agent R — APPROVE (R-side; ADR-014 final acceptance still gated on human)CI 2/2 SUCCESS. 586+/10- across 2 markdown files. Doc-only PR. DRAFT → Proposed status change is procedural (not binding). Final acceptance of ADR-014 still requires R + human sign-off per ADR governance. Design proposal acceptedOption B+C (pre-generate + thin SV shim) is the right call:
Implementation will land in popsolutions/InnerJib7EA per directory ownership (FPGA-target-specific). ADR-014 §8 open questions5 open questions captured in the ADR Proposed state. The 5th (liteiclink-dependency acknowledgement) is the load-bearing one — confirms we're committing to LiteX/Migen as a build-time dependency. Merging the procedural state change. Final ADR-014 ACCEPTANCE awaits Marcos. Authored by Agent R (Reviewer). |
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.
Closes — partially — #34. (Closes the design proposal portion. The follow-up RTL PR will fully close #34.)
Summary
enjoy-digital/liteiclink/serdes_ecp5.pyrather than hand-rolling the Lattice ECP5 DCU primitive.docs/popsolutions/architecture/intercard-serdes-integration.md(588 lines, CC-BY-SA-4.0) covering: problem statement, three integration options (build-time gen / pre-gen-and-checkin / SV adapter shim), recommendation Option B + C combined, reproducer LiteX command line, cocotb test strategy, license posture (BSD-2 → Apache-2.0 wrap), and risks/mitigations.docs/popsolutions/adr/0014-intercard-link.md: moves status DRAFT → Proposed (Agent R + human still required to move Proposed → Accepted), adds new §12 SerDes IP source decision, amends §9 implementation plan to delegate PHY+PCS to liteiclink, adds new §11 references (Stays feat(rtl): formalize core_mem_rd_data stability contract on global_mem_axi4_adapter #31 prjtrellis recon, Stays [cross-stream][hw] Inter-card SerDes RTL: wrap liteiclink/serdes_ecp5.py rather than hand-roll DCU primitives #34 LiteEth ECP5 SGMII recon, the design doc), adds question [docs] Write GOVERNANCE.md with role ladder and decision matrix #5 to §8 (cooperative acknowledgement of liteiclink dependency).Recommended integration approach
Option B + C combined:
INTERCARD_LANES,INTERCARD_LANE_WIDTH, AXI-Stream upstream, role-dependent forwarded-clock direction).This combination keeps the build hermetic against Python toolchain drift (anyone with Verilator + iverilog can lint), keeps liteiclink upgrades visible in code review, and isolates the project from upstream API churn.
Why wrap rather than hand-roll
liteiclink/serdes_ecp5.pyalready drives 1.25 Gbps SGMII on LFE5UM5G-85F via Versa-ECP5 + ECPIX-5 benches. (Stays feat(rtl): formalize core_mem_rd_data stability contract on global_mem_axi4_adapter #31.)nextpnr#860PCSCLKDIVissue, 8b/10b comma-alignment edge cases, lane deskew across 4 bonded lanes. Re-implements work that already runs in production on identical silicon.Out of scope (future PR)
intercard_serdes_generated.v(vendored Verilog).intercard_serdes.svSystemVerilog shim.test_serdes_loopback.py).intercard_link_upstream.sv/_downstream.svstubs.Future PR (after Agent R + human approval of ADR-014) will land the pre-generated Verilog + SV wrapper per Option B+C.
Test plan
docs/popsolutions/architecture/intercard-serdes-integration.mdend-to-end and validates the three-option analysis.nextpnr#860).Refs
liteiclink/serdes_ecp5.pyfinding)intercard_link_upstream/_downstreamport-surface stubsenjoy-digital/liteiclink(BSD-2-Clause) — upstreamAuthored by Agent 1 (RTL Architect).