rtl: InterGemminiXbar v1 — N×N decoupled crossbar with round-robin arbitration #112

Closed
opened 2026-05-26 18:12:06 -03:00 by navigator · 3 comments
Owner

Goal

Implement v1 of InterGemminiXbar per Draft SPEC at rtl/src/pop/specs/InterGemminiXbar.SPEC.md (#92). The existing skeleton (rtl/src/pop/InterGemminiXbar.scala, 6 LOC code) is an empty IO bundle; this issue lands the actual N×N decoupled crossbar.

Scope — strictly what the Draft SPEC pins

  • class InterGemminiXbar(N: Int = 4) extends Module — N tracks PopSoCConfig.TileCountKey (ADR-001: 4 Edu / 16 Pro). Reject N <= 0 at elaboration.
  • IO bundle: Vec(N, Flipped(Decoupled(...))) ingress + Vec(N, Decoupled(...)) egress. The payload bundle is parameterised — use a Bundle with one tileId = UInt(log2Ceil(N).W) and an opaque payload = UInt(payloadBits.W) field (constructor parameter payloadBits: Int = 32); annotate as // Open question per SPEC §Interface — concrete payload bundle shape pending PopRoCCRouter cluster-side attach decision.
  • Behavior: dimension-ordered (no virtual channels needed at N=4), per-source FIFO at each ingress, round-robin arbitration at each egress. Per-source ordering preserved per §Invariants.
  • No deadlock under back-pressure on any single egress port.

Open Questions — do NOT invent

  • Payload bundle shape — Open per §Interface (parameterise + comment).
  • FIFO depth — Open. Default fifoDepth: Int = 4, annotate.
  • Pro 16×16 area trade-off — Open. Implementation parameterises on N, no v1 changes needed for Pro.

Acceptance criteria

  • rtl/src/pop/InterGemminiXbar.scala body materialises ingress FIFOs + decoded routing + egress arbitration
  • rtl/tests/InterGemminiXbar/InterGemminiXbarSpec.scala extended with three scenarios:
    • All N×N point-to-point pairs route correctly
    • Sustained back-pressure on egress 0 does not block egress 1 (no-deadlock)
    • Two simultaneous requests to the same egress arbitrate fairly (round-robin between sources)
  • sbt -no-colors test green; tests parameterised on N ∈ {2, 4}
  • No fabricated payload field meanings

Plan refs

PLAN.md §8.2, §12.3; ADR-003 (4×4 xbar), ADR-001 (4 Gemminis Edu / 16 Pro).

## Goal Implement v1 of `InterGemminiXbar` per Draft SPEC at `rtl/src/pop/specs/InterGemminiXbar.SPEC.md` (#92). The existing skeleton (`rtl/src/pop/InterGemminiXbar.scala`, 6 LOC code) is an empty IO bundle; this issue lands the actual N×N decoupled crossbar. ## Scope — strictly what the Draft SPEC pins - `class InterGemminiXbar(N: Int = 4) extends Module` — N tracks `PopSoCConfig.TileCountKey` (ADR-001: 4 Edu / 16 Pro). Reject `N <= 0` at elaboration. - IO bundle: `Vec(N, Flipped(Decoupled(...)))` ingress + `Vec(N, Decoupled(...))` egress. The payload bundle is parameterised — use a `Bundle` with one `tileId = UInt(log2Ceil(N).W)` and an opaque `payload = UInt(payloadBits.W)` field (constructor parameter `payloadBits: Int = 32`); annotate as `// Open question per SPEC §Interface — concrete payload bundle shape pending PopRoCCRouter cluster-side attach decision`. - Behavior: dimension-ordered (no virtual channels needed at N=4), per-source FIFO at each ingress, round-robin arbitration at each egress. Per-source ordering preserved per §Invariants. - No deadlock under back-pressure on any single egress port. ## Open Questions — do NOT invent - Payload bundle shape — Open per §Interface (parameterise + comment). - FIFO depth — Open. Default `fifoDepth: Int = 4`, annotate. - Pro 16×16 area trade-off — Open. Implementation parameterises on N, no v1 changes needed for Pro. ## Acceptance criteria - [ ] `rtl/src/pop/InterGemminiXbar.scala` body materialises ingress FIFOs + decoded routing + egress arbitration - [ ] `rtl/tests/InterGemminiXbar/InterGemminiXbarSpec.scala` extended with three scenarios: - All N×N point-to-point pairs route correctly - Sustained back-pressure on egress 0 does not block egress 1 (no-deadlock) - Two simultaneous requests to the same egress arbitrate fairly (round-robin between sources) - [ ] `sbt -no-colors test` green; tests parameterised on `N ∈ {2, 4}` - [ ] No fabricated payload field meanings ## Plan refs PLAN.md §8.2, §12.3; ADR-003 (4×4 xbar), ADR-001 (4 Gemminis Edu / 16 Pro).
Author
Owner
No description provided.
<!-- agent:claim by=dispatcher run=20260526T211219Z_issue112 ts=1779829940 -->
Author
Owner
No description provided.
<!-- agent:heartbeat run=20260526T211219Z_issue112 ts=1779830241 -->
Author
Owner
No description provided.
<!-- agent:pr pr=#115 branch=auto/issue-112-20260526T211219Z_issue112 -->
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Fluid/fluidpop-v1#112
No description provided.