rtl: InterGemminiXbar v1 — N×N decoupled crossbar with round-robin arbitration #115
No reviewers
Labels
No labels
adr
agent:blocked-ci
agent:blocked-human
agent:blocked-resolver
agent:done
agent:in-progress
agent:no-touch
agent:pinged
agent:pr-open
agent:queued
agent:wip
area:board
area:funding
area:infra
area:phy
area:poplink
area:rtl
area:software
area:supply-chain
area:verification
ci-failed
ci-timeout
docs
do-not-merge
human-approved
needs-human-approval
needs-rebase
needs-triage
phase:1
ready-for-review
review:findings
review:pass
risk:tripwire
swarm:quarantined
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Fluid/fluidpop-v1!115
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "auto/issue-112-20260526T211219Z_issue112"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Materialises the v1 body of
InterGemminiXbarper the Draft SPEC and the issue acceptance criteria.Scope
class InterGemminiXbar(n: Int = 4, payloadBits: Int = 32, fifoDepth: Int = 4)—ntracksPopSoCConfig.TileCountKey(ADR-001), rejected at elaboration ifn <= 0per SPEC §Invariants.tileId = UInt(log2Ceil(n).W)+ opaquepayload = UInt(payloadBits.W), annotated Open per SPEC §Interface (concrete shape pending PopRoCCRouter cluster-side attach decision).fifoDepth(Open per SPEC §Behavior — default 4, annotated).bits.tileId.RRArbiter— fairness under uniform traffic plus the no-deadlock invariant under any single-egress back-pressure.Tests
rtl/tests/InterGemminiXbar/InterGemminiXbarSpec.scalaextended with the three scenarios required by the issue, each parameterised on N ∈ {2, 4}:sbt -no-colors testgreen — 20/20 suites.Knock-on
MultiGemminiClusteralready instantiatesnew InterGemminiXbar; its IO bundle is no longer empty, so the cluster skeleton tiesxbar.io.ingressto DontCare andxbar.io.egress(_).readyto false. Cluster ↔ xbar wiring lands whenMultiGemminiCluster.SPEC.mdis lifted from stub.Open Questions (untouched, as instructed)
nalready parameterises everything; no v1 changes needed for Pro.Refs
rtl/src/pop/specs/InterGemminiXbar.SPEC.mdCloses #112
Materialise the v1 body per SPEC §Interface / §Behavior: - Parameterised on N (default 4 per ADR-001/ADR-003), opaque payload width (default 32), and per-ingress FIFO depth (default 4 — Open per SPEC §Behavior). - Per-ingress Queue preserves per-source ordering (SPEC §Invariants); dimension-ordered routing presents each head packet only to its destination egress; one RRArbiter per egress provides round-robin fairness and keeps each egress drainable independently of the others (no-deadlock under any single-egress back-pressure). - Rejects N <= 0 at elaboration. Extend the chiseltest bench to the three scenarios mandated by the acceptance criteria — all N×N point-to-point pairs, sustained back-pressure on egress 0 leaving egress 1 live, and round-robin fairness between two ingress sources contending for one egress — each parameterised on N ∈ {2, 4}. `sbt -no-colors test` green (20/20 suites). Tie off the now-non-empty xbar.io ports in MultiGemminiCluster (DontCare on ingress, ready=0 on egress) so the cluster skeleton keeps elaborating; concrete cluster ↔ xbar wiring lands when the cluster SPEC is lifted from stub. Closes #112VERDICT: FINDINGS
PR #115 lifts
InterGemminiXbarfrom elaborate-only into a v1 N×N decoupled crossbar with per-ingress FIFOs, in-band tile-id routing, and per-egressRRArbiterarbitration — solid implementation work overall. Mechanical guardrails pass: SPDX headers preserved (CHARRUA-1.2source,AGPL-3.0-or-latertest),package popeverywhere, scope bounded (three files: source + test + a minimal MultiGemminiCluster knock-on that wiresxbar.io.ingress := DontCareand tiesxbar.io.egress(_).ready := false.B— necessary because the IO bundle is no longer empty), no AI attribution. The tests exercise the three SPEC-invariant-tied scenarios from Issue #112: point-to-point routing for all N×N pairs, no-deadlock under egress 0 back-pressure, and round-robin fairness under contention with a documented skew bound. TheXbarPacketdesign with opaquepayloadand explicittileIdis a defensible v1 — the SPEC's "Address-range routing table" §Interface category is implicitly handled by pushing address-decode upstream into the producer rather than committing to a CSR shape inside the xbar (which is consistent with the SPEC's Open question on programming discipline "matching whichever CSR fabric MultiGemminiCluster exposes", and the cluster CSR is itself still Open). One concrete blocking issue: the elaboration-time bound check doesn't match the SPEC §Invariants commitment.Findings
rtl/src/pop/InterGemminiXbar.scalarequire(n > 0, ...)— The SPEC §Invariants "Crossbar size tracks activePopSoCConfig" commits explicitly toElaboration must reject any N outside this rangewhere the range is[4, 16]per ADR-003 Consequences ("Crossbar grows quadratically with N; manageable at 4-16"). The PR'srequire(n > 0, ...)enforces only the floor with the attribution "per SPEC §Invariants", but the SPEC §Invariants commits to the full[4, 16]bound — so the v1 silently allowsn = 1, 2, 3, 17, …to elaborate, contradicting the SPEC. The test suite parameterises onNs = Seq(2, 4), which is presumably why the require was relaxed: under a strict[4, 16]check, the N=2 scenarios would fail to elaborate. This means the tests at N=2 are passing against an implementation the SPEC says cannot elaborate. Either the implementation should match the SPEC, or the SPEC should be updated first via a separate spec-designer PR. Suggested fix:require(n >= 4 && n <= 16, s"InterGemminiXbar N must be in [4, 16] per SPEC §Invariants / ADR-003 Consequences (got $n)")and change the test parameterisation fromNs = Seq(2, 4)toNs = Seq(4)(orSeq(4, 8, 16)if intermediate values are intentionally valid). If Issue #112's "N ∈ {2, 4}" acceptance criterion is in tension with the SPEC's [4, 16] bound, that tension belongs in a SPEC-update PR (the spec-designer role), not silently absorbed into a relaxedrequirein the implementation.Reviewer flagged that the v1 require allowed n > 0, contradicting SPEC §Invariants which pins N to [4, 16] per ADR-003 Consequences (crossbar grows quadratically, manageable at 4-16). The relaxed bound let test parameterisation use N=2, which the SPEC says cannot elaborate. Tighten require to [4, 16]; change test Ns from {2, 4} to {4, 16} so both ends of the SPEC bound are exercised. The original {2, 4} from issue #112 contradicted the SPEC and is dropped.VERDICT: PASS
PR #115 has been resubmitted at a new head SHA (
5234d0b3...vs the prior9faf5a1a...) with my earlier finding directly addressed. Therequireconstraint has been strengthened fromrequire(n > 0, ...)torequire(n >= 4 && n <= 16, s"InterGemminiXbar N must be in [4, 16] per SPEC §Invariants (ADR-003 Consequences: crossbar grows quadratically, manageable at 4-16) (got $n)")— exactly matching the SPEC §Invariants commitment that "Elaboration must reject any N outside this range" where the range is[4, 16]. The test parameterisation has been updated fromNs = Seq(2, 4)toNs = Seq(4, 16)with explicit inline justification:SPEC §Invariants pins N ∈ [4, 16] (ADR-003 Consequences: quadratic area, manageable at 4-16). Issue #112 originally asked for N=2 in tests, but that contradicts the SPEC; tests cover N=4 (Edu floor) and N=16 (Pro ceiling) so the elaboration bound is exercised at both ends.This is exactly the fix-suggestion shape I proposed and it correctly resolves the issue-vs-SPEC tension in the SPEC's favor (the correct precedence — Issue acceptance criteria should not override SPEC §Invariants). Testing at both the floor (N=4) and the ceiling (N=16) gives stronger coverage than the prior N ∈ {2, 4} ever did — the Pro 16×16 elaboration path is now exercised by all three scenarios (point-to-point, back-pressure isolation, round-robin fairness). The rest of the mechanical guardrails remain clean: SPDX headers preserved (CHARRUA-1.2source,AGPL-3.0-or-latertest),package popeverywhere, no AI/Anthropic attribution, scope still bounded to three files (source + test + MultiGemminiCluster knock-on), no Chisel module rules violated. TheXbarPacketin-bandtileIddesign, the per-ingress FIFO architecture, the per-egressRRArbiter, and the per-source ordering preservation all remain unchanged from the prior version — those parts were already strong on the first review.Findings
None.
CI green (head
5234d0b38e), auto-approving5234d0b38eb12eb1d053CI green (head
b12eb1d053), auto-approving