0hmX/am62l-lpddr4-ti-pth-router
This code defines a hardware-oriented React/TypeScript setup for a PCB breakout circuit featuring an AM62L LPDDR4 interface, including detailed PCB component placement, routing algorithms, and validation scripts for DDR connections, via placement, and manufacturing constraints.
- Version
- 1.0.1
- License
- unset
- Stars
- 0
scripts/build-with-pcb-images.ts
import { mkdir } from "node:fs/promises"
const command = [
"bunx",
"tsci",
"build",
"index.circuit.tsx",
"--pcb-svgs",
"--pcb-png",
"--profile",
"--autorouter-debug",
"--autorouter-debug-dir",
"dist/autorouter-debug",
"--autorouter-dump-srj",
"all",
"--autorouter-timeout",
"10m",
]
const startedAt = new Date()
const startedAtMs = performance.now()
const child = Bun.spawn(command, {
cwd: process.cwd(),
stdout: "inherit",
stderr: "inherit",
})
const exitCode = await child.exited
const durationSeconds = (performance.now() - startedAtMs) / 1000
await mkdir("dist", { recursive: true })
await Bun.write(
"dist/routing-timing.json",
`${JSON.stringify(
{
command,
startedAt: startedAt.toISOString(),
finishedAt: new Date().toISOString(),
durationSeconds,
exitCode,
},
null,
2,
)}\n`,
)
console.log(`PCB-image build wall time: ${durationSeconds.toFixed(3)} s`)
process.exit(exitCode)