0hmX/am62l-lpddr4-breakout-repro

This code defines React components that instantiate circuits representing dedicated DDR address control and byte0 data lines.

Version
1.0.11
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-dump-srj",
  "all",
  "--autorouter-timeout",
  "10m",
  "--ignore-errors",
]

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)