ShiboSoftwareDev/am69-pi5
A 85×56 mm 10-layer AM69A single-board computer carrier integrates 8 GiB LPDDR4, 32 GB eMMC, Pi-style expansion and multimedia/USB/Ethernet connectors, multi-rail PMIC power, STM32 boot/power control, USB-C PD, SD/fan protection, and HDI-controlled high-speed routing.
- Version
- 0.0.8-engineering-draft-20261107-dqs19
- License
- unset
- Stars
- 0
Use with the tscircuit CLI
tsci is the tscircuit CLI. Install it with npm install -g tscircuit.
tsci clone ShiboSoftwareDev/am69-pi5 # download the package files into ./am69-pi5
tsci add ShiboSoftwareDev/am69-pi5 # add it to your project as @tsci/ShiboSoftwareDev.am69-pi5In a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.
components/shared/core/ReferenceDecoupling.tsx
import {feedthroughManufacturerPart,feedthroughInternalConnections} from "./support-footprints/FeedthroughParts"
import { referenceDecouplingParts, referenceNetNameMap } from "./ReferenceDecoupling.data"
import { NFM15HC105Footprint, NFM18HC106Footprint } from "./support-footprints/FeedthroughFilters"
import {uniqueNativeEscapeConnections,type NativeHdiBoard} from './NativeEscapeConnections'
export { referenceDecouplingParts, referenceNetNameMap }
export type ReferenceDecouplingPart = (typeof referenceDecouplingParts)[number]
export type ReferencePartPlacement = {
pcbX?: number
pcbY?: number
pcbRotation?: number
layer?: "top" | "bottom"
schX?: number
schY?: number
schRotation?: number
schSectionName?: string
}
/** Use this same mapping when wiring the parent CPU, RAM and power circuitry. */
export function sourceNetToTscircuitNet(source: string): string {
if (source === "DGND" || source === "VDD_CPU_HCPS_GOSNS") return "GND"
if (/^[A-Za-z_][A-Za-z0-9_]*$/.test(source) && !source.startsWith("AM69_SRC_")) return source
const hex = Array.from(new TextEncoder().encode(source), byte => byte.toString(16).padStart(2, "0")).join("").toUpperCase()
return `AM69_SRC_${hex}`
}
export type ReferenceDecouplingProps = {
/** Explicit placement belongs to the parent board; no reference coordinates are implied. */
placements?: Partial<Record<string, ReferencePartPlacement>>
/** Select a documented subset for a particular physical sheet or placement group. */
references?: readonly string[]
/** Source assembly BOM marks 29 records DNI. Their schematic data remains exported. */
includeDni?: boolean
/** Prefix component references when displaying multiple independent copies. */
referencePrefix?: string
netOverrides?: Record<string, string>
nativeHdiBoard?:NativeHdiBoard
nativeGroundPaths?:boolean
}
/**
* DDRSS0 support and CPU decoupling extracted from reference sheets 12 and 22–25.
* CPU U28, RAM U25 and the four debug testpoints are explicitly excluded.
* This fragment is not the complete power supply, boot or reset circuit.
*/
export function ReferenceDecoupling({
placements = {}, references, includeDni = false, referencePrefix = "", netOverrides = {},nativeHdiBoard,nativeGroundPaths=false,
}: ReferenceDecouplingProps) {
const net = (name: string) => netOverrides[name] ?? `net.${name}`
return <>
{referenceDecouplingParts
.filter(part => includeDni || part.fitted_in_source_bom)
.filter(part => !references || references.includes(part.reference))
.map(part => {
const name = `${referencePrefix}${part.reference}`
const position = placements[part.reference] ?? {}
const connections = uniqueNativeEscapeConnections(name,Object.fromEntries(
Object.entries(part.nets).map(([pin, name]) => [`pin${pin}`, net(name)]),
),nativeHdiBoard,nativeGroundPaths)
const mpn = part.source_bom.mpn === "DNI" ? undefined : part.source_bom.mpn
if (part.kind === "capacitor") {
return <capacitor key={name} name={name} schRotation={-90} {...position}
capacitance={part.capacitance} maxVoltageRating={part.voltage_rating}
manufacturerPartNumber={mpn} footprint={part.size_code}
connections={connections} />
}
if (part.kind === "resistor") {
return <resistor key={name} name={name}
schRotation={part.nets["1"] === "GND" || /^(VDD|VDA|VCAP)/.test(part.nets["2"]) ? 90 : -90}
{...position}
resistance={part.resistance} manufacturerPartNumber={mpn}
footprint={part.size_code} connections={connections} />
}
if (part.kind === "ferrite_bead") {
return <chip key={name} name={name} {...position}
manufacturerPartNumber={mpn} footprint={part.size_code}
pinLabels={{pin1:"IN", pin2:"OUT"}}
schPinArrangement={{topSide:["IN"], bottomSide:["OUT"]}}
pinAttributes={{pin1:{isPassive:true}, pin2:{isPassive:true}}}
connections={connections} />
}
// Native Murata land pattern has 3 copper pads. Source terminals 2 and 4
// are both ground and share its continuous ground pad 2. Preserve both
// source terminal records in ReferenceDecoupling.reference.json.
if (part.nets["2"] !== part.nets["4"]) {
throw new Error(`${part.reference}: source filter grounds differ; cannot share physical pad 2`)
}
return <chip key={name} name={name} {...position}
manufacturerPartNumber={feedthroughManufacturerPart(part.source_bom.mpn)}
internallyConnectedPins={feedthroughInternalConnections}
pinLabels={{pin1:"LINE_A", pin2:["SOURCE_GND_2", "SOURCE_GND_4"], pin3:"LINE_B"}}
pinAttributes={{pin1:{isPassive:true}, pin2:{isPassive:true}, pin3:{isPassive:true}}}
footprint={part.size_code === "0402" ? <NFM15HC105Footprint /> : <NFM18HC106Footprint />}
connections={uniqueNativeEscapeConnections(name,{pin1:net(part.nets["1"]), pin2:net(part.nets["2"]), pin3:net(part.nets["3"])},nativeHdiBoard,nativeGroundPaths)} />
})}
</>
}