feat(interconnect): inter-card link RTL skeleton + cocotb tests - #14
Closed
marcos-mendez wants to merge 1 commit into
Closed
feat(interconnect): inter-card link RTL skeleton + cocotb tests#14marcos-mendez wants to merge 1 commit into
marcos-mendez wants to merge 1 commit into
Conversation
Adds the skeleton interconnect module under src/popsolutions/interconnect/, locking the interface contract (TX/RX handshakes, link-state enum, lane parameters) so that the Stays PCB layout can commit to connector pinout in parallel with ADR-014 (#9). Behavior is intentionally stubbed; real protocol body lands once the ADR closes. Files: * src/popsolutions/interconnect/intercard_pkg.sv INTERCARD_LANES (default 4, overridable via -DMAST_INTERCARD_LANES), INTERCARD_LANE_WIDTH (32), INTERCARD_BUS_WIDTH (128 default), link_state_t enum (DOWN / TRAINING / UP / FAULT-reserved). * src/popsolutions/interconnect/intercard_link.sv Link-up FSM (DOWN -> TRAINING -> UP under sustained train_req). TX/RX gated on link_up; PHY-side stubs await ADR-014. * src/popsolutions/interconnect/README.md Interface contract + explicit list of what the skeleton does NOT do (framing, peer training, CRC, flow control, fault handling). * verif/intercard_link/Makefile, test_intercard_link.py 6 cocotb tests: reset, link-up after training, link-drop from UP, link-drop from TRAINING, TX gating, RX gating. Local run: verif/intercard_link/ TESTS=6 PASS=6 FAIL=0 SKIP=0 verif/axi4_mem_model/ TESTS=8 PASS=8 FAIL=0 SKIP=0 (no regression) Closes #10. Depends on no other open issues; ADR-014 (#9) blocks the follow-up protocol implementation but does not block this skeleton. Authored by Agent 1 (RTL Architect). Signed-off-by: Marcos <m@pop.coop>
4 tasks
Member
Author
Review (Agent R, 2026-05-06)Skeleton-only RTL locking the inter-card link interface contract so Stays PCB can commit to connector pinout in parallel with ADR-014 (#9). +529 lines: package + link module + 6 cocotb tests + comprehensive README. Findings
Quality signals:
Cross-stream impact: zero. Stays (Agent 2's PCB) can now read VerdictAPPROVE — merging. — Agent R |
marcos-mendez
pushed a commit
that referenced
this pull request
May 6, 2026
Closes #10. Skeleton-only RTL locking the inter-card link interface contract so Stays PCB (Agent 2) can commit to connector pinout in parallel with ADR-014 (#9) protocol decision. Files: src/popsolutions/interconnect/{intercard_pkg.sv, intercard_link.sv, README.md} + verif/intercard_link/{Makefile, test_intercard_link.py}. What lands: - INTERCARD_LANES (default 4, override via -DMAST_INTERCARD_LANES) - INTERCARD_LANE_WIDTH (32) → INTERCARD_BUS_WIDTH (default 128) - link_state_t (DOWN/TRAINING/UP/FAULT-reserved) - Skeleton FSM: link_train_req → TRAIN_CYCLES → LINK_UP - TX/RX gated on link_up; immediate ready/valid handshake (no flow control, no buffering, no framing — protocol-defined) Skeleton intentionally does NOT do: framing/flits, peer training, CRC/ECC, flow control beyond r/v, LINK_FAULT entry, packet boundaries. README enumerates each gap. Verification: TESTS=6 PASS=6 (intercard_link) + axi4_mem_model regression green (TESTS=8 PASS=8). Authored by Agent 1 (RTL Architect) Reviewed-by: Agent R (Reviewer) Signed-off-by: Marcos <m@pop.coop>
Member
Author
|
Merged manually as squash on main. |
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 #10.
Summary
Skeleton-only RTL for the inter-card / inter-chiplet link, locking the interface contract so that the Stays PCB (KiCad) can commit to connector pinout in parallel with ADR-014 (#9). Real protocol behavior — framing, peer training, CRC, flow control, fault handling — is intentionally absent and lands with the protocol decision in #9.
Files added
src/popsolutions/interconnect/intercard_pkg.svINTERCARD_LANES(default 4, overridable via-DMAST_INTERCARD_LANES),INTERCARD_LANE_WIDTH(32),INTERCARD_BUS_WIDTH(128 default),link_state_tenum (DOWN / TRAINING / UP / FAULT-reserved)src/popsolutions/interconnect/intercard_link.svlink_train_req); TX/RX gated onlink_up; PHY-side stubs reserved for ADR-014src/popsolutions/interconnect/README.mdverif/intercard_link/Makefileverif/intercard_link/test_intercard_link.pyWhat this skeleton intentionally does NOT do
LINK_FAULTentry/exit conditionstx_last/rx_lastpacket-boundary semanticsThese all belong to the protocol decided in ADR-014 (#9). The README spells this out so the skeleton's deliberate gaps don't get mistaken for missing work.
Verification
Six tests cover: reset behaviour, link-up after sustained training, link-drop from
LINK_UP, link-drop fromLINK_TRAINING, TX gating on link-up, RX gating on link-up.Sanity-checked the existing
verif/axi4_mem_model/suite on the same branch:TESTS=8 PASS=8 FAIL=0 SKIP=0— no regression.A few notes for review
.valuewrites by one delta cycle, so the immediately-nextRisingEdgefires before the simulator picks up the new input. Fixed by widening the cycle slack in the FSM-state assertions and documenting why. The pattern (set input → 2 awaits → check sequential output) generalizes to other future tests in this directory.// verilator -DMAST_INTERCARD_LANES=8 …as a hint comment; Verilator's pragma scanner read it as// verilator <directive>and errored withBADVLTPRAGMA. Reworded to avoidverilatoras the first keyword on a//line.tx_last/rx_readyare intentionally unused at the skeleton depth — declared so the integration ports already match the protocol layer's eventual shape. There's awire _unused_ok = &{1'b0, tx_last, rx_ready};line documenting that explicitly (the Makefile already passes-Wno-UNUSEDSIGNAL, but the explicit reference makes intent legible).INTERCARD_LANES,INTERCARD_LANE_WIDTH, and the connector pinout assumption fromintercard_pkg.svand the README without waiting on ADR-014.Authored by Agent 1 (RTL Architect).