Adding a Core
Under BYOC, each OpenPiton core reaches the tile’s L1.5 through its own transducer. There are two ways to add a core. An RV32 core with one hart and no private cache to keep coherent can use the Generic Tile, where only a per-core wrapper is new RTL and MACE can write that wrapper itself. Any other core needs RTL in OpenPiton and a small amount of code in MACE, as this page describes.
What a core needs in OpenPiton
The three native cores share one shape:
A per-core RTL directory under
piton/design/chip/tile/.A transducer between the core’s memory interface and the L1.5. Examples are T1’s CCX transducer, Ariane’s L1.5 adapter inside CVA6, and PicoRV32’s
pico_l15_transducer.v.A core-select arm in the tile template, plus
simssupport for selecting the core.
The core’s cache decides the size of the job. A core with its own coherent cache, such as Ariane, needs coherence-adapter RTL. A core without one, such as PicoRV32, needs only a transducer. A core with no upstream adapter needs one written first, or, for an RV32 core with no private cache, a wrapper for the Generic Tile.
The core also needs a way to run a workload: an assembler or compiler for its ISA, and entries in piton/verif/env/manycore/pc_cmp.v.pyv so the manycore monitor detects its good and bad traps.
What a core needs in MACE
Adding PicoRV32 took these changes:
Add the core name to
PitonCoreand to the core check inPitonConfig.__post_init__(), both inchia_openpiton/state_def.py.Add its
simsselection flags inPitonConfig.sims_flags().Add the name to the core check in
MaceSpec.__post_init__()(mace/spec.py), toSUPPORTED_CORESinmace/cli/session.py, and to the--corechoices ofexamples/mace_end_to_end.py,examples/baseline_one_shot_llm.py, andexamples/recovery_seeded.py. Name the cores each seeded fault inmace/eval/faults.pyapplies to.Mirror the existing cores’ tests in
chia_openpiton/test/.
Changes the core needs in the OpenPiton checkout go into scripts/patch_openpiton.sh as new numbered fixes. Each one is safe to run twice, and a new fix gets a test in chia_openpiton/test/test_patch_openpiton.py. See Environment Patches.
Bring-up checklist
Build a single tile and confirm the build succeeds.
Run a single-hart assembly test, such as the core’s
addi.Sequivalent, and checksim.logforHit Good trap.If the run ends with the
maxcyclesverdict, rule out a build or toolchain problem before you look at the RTL. Compare the transcript with a passing one, and check the diag binary’s symbols againstsymbol.tbl. The failure-analysis toolscompare_to_fixtureandsymbol_checkautomate both checks. See PitonToolServer.Scale to 2x2 and 4x4 and confirm one
Hit Good trapper tile.
On the generic tile
A core on the generic tile needs none of the MACE changes above: it runs as core generic with a core descriptor. Write the descriptor, copy the core’s RTL, and either write the wrapper by hand and climb the verification ladder, or let MACE write it with examples/generic_integrate.py. Both are on the Generic Tile page.