rtl(PopSoCConfig): v1 Field keys + Master/Slave Config classes #108
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!108
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "auto/issue-105-20260526T163459Z_issue105"
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?
Closes #105.
Implements the v1 of
PopSoCConfigpinned by the Draft SPEC atrtl/src/pop/specs/PopSoCConfig.SPEC.mdand PLAN.md §8.2 (custom module list).What lands
pop(PopSolutions-local namespace perrtl/build.sbtorganization := "coop.pop.fluidpop"):TileCountKey extends Field[Int](ADR-001)ScratchpadSizeKey extends Field[Int](ADR-004, bytes)FabricPortCountKey extends Field[Int](ADR-010)IsMasterKey extends Field[Boolean](ADR-008)VariantKey extends Field[Variant]Every key carries the SPEC §Interface Open-question marker the issue requires; no upstream Chipyard key names are invented.
sealed trait VariantwithEdu/Procase objects, adjacent to the keys (per the issue's no-separate-file note). The trade-off vs a Boolean encoding is annotated inline per the SPEC.Configclasses:FluidPopBaseConfigchains the variant-invariant keys to Edu defaults from ADR-001 (4 tiles), ADR-004 (256 KiB scratchpad in bytes), ADR-010 (4 PopLink ports),Variant.Edu.FluidPopMasterConfigoverlaysIsMasterKey := true(ADR-008 master, instantiates PCIeHostBridge inFluidPopSoC).FluidPopSlaveConfigoverlaysIsMasterKey := false(ADR-008 slave, gates the PCIe path).In-file CDE shim
The Chipyard pin is not yet on the build classpath per PLAN.md §6 Week 4 and
rtl/README.md("Nothing in this tree depends on Chipyard yet");build.sbtis untouched per the issue's AC. To still ship the Field/Config keys honestly today,PopSoCConfig.scalacarries a thin in-file CDE-shaped shim (Field,Parameters,Config) that mirrors the upstreamorg.chipsalliance.cde.configAPI surface. When the Chipyard pin lands, the shim block is deleted and the imports are rewritten toorg.chipsalliance.cde.config.{Field, Config, Parameters}; the key declarations,Variantand the three Config classes keep their shape.The
Configshim uses a() => PartialFunction[Field[_], Any]thunk for its overlay parameter — same shape CDE upstream uses — to defer PartialFunction instantiation past the subclass super-constructor call (Scala 2.13 forbids an anonymous PF literal as a super-arg with "Implementation restriction: requires premature access").Tests
rtl/tests/PopSoCConfig/PopSoCConfigSpec.scalais extended (no Chisel elaboration ofFluidPopSoC):FluidPopMasterConfig(IsMasterKey) == true— ADR-008 masterFluidPopSlaveConfig(IsMasterKey) == false— ADR-008 slaveFluidPopBaseConfigresolves the four chained keys to the ADR-pinned defaultsFull test suite from
rtl/:sbt -no-colors compileis also green.Scope
Edits are bounded to:
rtl/src/pop/PopSoCConfig.scalartl/tests/PopSoCConfig/PopSoCConfigSpec.scalaNo other files touched. The Edu / Pro vs Master / Slave orthogonality, the upstream-key-reuse choice, and the Pro-side specialisation of the chained keys remain Open per SPEC §Interface, and are deferred to the follow-up ADR named there.
VERDICT: PASS
PR #108 lands the v1 of
PopSoCConfig— Field keys,Variantsealed trait, and threeConfigclasses — pinned by the Draft SPEC (PR #97) and PLAN.md §8.2, scoped to exactly the two files Issue #105 asks for. Mechanical guardrails pass: existing SPDX headers preserved (CHARRUA-1.2for the RTL source,AGPL-3.0-or-laterfor the test), both files inpackage pop, no AI/Anthropic attribution, no off-limits paths (and explicitly nobuild.sbtedits per the issue AC), test scaffold present. Rule 4 doesn't strictly apply since this isn't a Chisel Module with an IO bundle (the SPEC itself flags "PopSoCConfig is not achisel3.Modulein the conventional sense"), but the spirit is honored: all five SPEC §Interface "build-time configuration keys" — tile count, scratchpad size, fabric port count, master-vs-slave selector, Edu-vs-Pro selector — are materialised as Field keys (TileCountKey,ScratchpadSizeKey,FabricPortCountKey,IsMasterKey,VariantKey), with the explicit Open-question inline comment the SPEC requires. Rule 6's chiseltest scaffold is appropriately replaced withParameters-resolution tests since there's no Chisel Module to elaborate — the test now exercises the actual config-resolution semantics (IsMasterKey true for Master, false for Slave, chained defaults inherited into both fragments), which is more meaningful for a Config-fragment file. Rule 7 is meticulously handled: every default value cross-checks against a previously-approved ADR cite —TileCountKey=4matches ADR-001 Edu (PR #92/#93/#96/#97),ScratchpadSizeKey=256*1024matches ADR-004's 256 KiB SP per PR #92/#93 (and the PR explicitly notes capacity-only per the MultiGemminiCluster §Behavior Open on port shape),FabricPortCountKey=4matches ADR-010 N/S/E/W (PR #87/#91/#97),IsMasterKeyMaster=true/Slave=false matches ADR-008 (PR #87/#94/#97). The Edu/Pro vs Master/Slave orthogonality recorded as Open in the SPEC is faithfully deferred — the PR implements the orthogonalIsMasterKey ⊕ VariantKeyform and explicitly defers the four-class form (FluidPopMasterEduConfigetc.) to the follow-up ADR. The CDE shim is the one non-trivial design choice and is handled with disciplined transparency: documented as a temporary in-file placeholder (abstract class Field[T],trait Parameters,class Config) mirroring the upstreamorg.chipsalliance.cde.configAPI surface, with an explicit migration recipe (when Chipyard pin lands, delete the shim block, rewrite imports, keep everything else). The Scala 2.13 PF-literal-as-super-arg constraint that forces the() => PartialFunction[...]thunk shape is documented inline — this is genuine engineering trade-off documentation, not fabrication. The PR honestly stops at the Parameters-lookup level for tests and explicitly leaves "full Chisel elaboration ofFluidPopSoCagainst these Configs" to a follow-up onceFluidPopSoCis itself lifted from Stub. The sbt-test output (8 tests passed across 5 suites) is provided.Findings
None.
CI green (head
53a3e2045a), auto-approving53a3e2045ab696cc5e45CI green (head
b696cc5e45), auto-approving