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/NativeClockRoutes.tsx
type Pose = { pcbX:number; pcbY:number; pcbRotation?:number }
type PathPoint = string | {x:number;y:number}
/** Manually engineered surface paths. Numeric points are board coordinates here;
* the native trace API expects the anchor component's local coordinates.
* This helper only changes coordinate frames; it does not find trace paths.
*/
function localPath(path:PathPoint[],anchor:Pose):PathPoint[] {
const a=(anchor.pcbRotation??0)*Math.PI/180,c=Math.cos(a),s=Math.sin(a)
return path.map(p=>typeof p==='string'?p:{
x:(p.x-anchor.pcbX)*c+(p.y-anchor.pcbY)*s,
y:-(p.x-anchor.pcbX)*s+(p.y-anchor.pcbY)*c,
})
}
function surfaceRoutes(prefix:string,paths:PathPoint[][],poses:Record<string,Pose>) {
return paths.map((path,i)=>{
const from=path[0]as string,to=path.at(-1)as string
const ref=from.match(/^\.([^ >]+)/)![1]
// Keep a target selector even on a straight branch. Native routing marks
// nonempty pcbPath routes fixed; pcbPaths is omitted from that fixed set.
return <trace key={`${prefix}_${i}`} name={`${prefix}_${i}`} from={from} to={to}
thickness={.1} maxLength={10} maxViaCount={0}
pcbPath={localPath(path.slice(1),poses[ref])} />
})
}
/** Keep both WKUP oscillator nets on the top face with no escape-via stubs.
* The source crystal and load-capacitor values remain unchanged.
*/
export function NativeWkupClockRoutes({board,cpu,placements}:{board:'pi5'|'cm5';cpu:Pose;placements:Record<string,Pose>}) {
const xi:PathPoint[][]=board==='pi5'?[
['.U28 > .T38',{x:-13.4,y:2.2},{x:-13.6,y:2.4},'.C195 > .pin1'],
['.C195 > .pin1','.Y2 > .pin3'],
]:[
['.U28 > .T38',{x:20.7,y:3.15},{x:22.1,y:3.15},{x:22.3,y:3.6},{x:24.3,y:3.6},'.Y2 > .pin3'],
['.Y2 > .pin3','.C195 > .pin1'],
]
const xo:PathPoint[][]=board==='pi5'?[
['.U28 > .U37',{x:-12.4,y:2.6},{x:-13.6,y:2.6},{x:-13.7,y:2.7},{x:-15.1,y:2.7},{x:-15.3,y:2.9},{x:-16.65,y:2.9},
{x:-16.65,y:.5},{x:-16.6,y:.5},'.Y2 > .pin1'],
['.Y2 > .pin1','.C190 > .pin1'],
]:[
['.U28 > .U37',{x:19.9,y:2.4},{x:20.7,y:2.4},{x:21.4,y:1.7},{x:22.3,y:1.7},
{x:22.3,y:2.4},'.Y2 > .pin1'],
['.C190 > .pin1',{x:23.6,y:.69},{x:23.6,y:2.4},'.Y2 > .pin1'],
]
return <>
{surfaceRoutes('WKUP_XI_SURFACE',xi,{U28:cpu,...placements})}
{surfaceRoutes('WKUP_XO_SURFACE',xo,{U28:cpu,...placements})}
</>
}
/** Two separately laid out PMIC oscillator nets. Crystal rotation preserves its
* nonpolarized electrical function and puts the line ends in routable order.
* Keep the original10mm/zero-via constraints; no internal-package escape used.
*/
export function NativePmicClockRoutes({pmic,placements}:{pmic:Pose;placements:Record<string,Pose>}) {
const xi:PathPoint[][]=[
['.U48 > .pin38',{x:-27.1,y:-9.750066},{x:-27.1,y:-4},'.Y6 > .pin2'],
['.U48 > .pin38',{x:-27.25,y:-9.750066},'.C777 > .pin2'],
]
const xo:PathPoint[][]=[
['.U48 > .pin39',{x:-27.6,y:-9.24994},{x:-27.6,y:-5.05},'.C785 > .pin2'],
['.C785 > .pin2',{x:-28.24,y:-4},'.Y6 > .pin1'],
]
return <>
{surfaceRoutes('PMIC_32KIN_SURFACE',xi,{U48:pmic,...placements})}
{surfaceRoutes('PMIC_32KOUT_SURFACE',xo,{U48:pmic,...placements})}
</>
}