astra-abse/t113-s3
Allwinner T113-S3 / JLCPCB C5197687: native saved fanout, LCD top, storage right, 127 perimeter exits, 30 decoupling capacitors, connected GND planes; clean DRC and shorts, all 29 vias connected.
- Version
- 1.2.0
- License
- MIT
- Stars
- 0
scripts/audit-routing-source.ts
import assert from "node:assert/strict";
import { readFile, readdir } from "node:fs/promises";
import { fanoutTracePath } from "@tscircuit/props";
export async function auditRoutingSource() {
const checkedFiles: string[] = [];
for (const directory of ["src", "imports"]) {
for (const entry of await readdir(directory, { withFileTypes: true })) {
if (!entry.isFile() || !/\.(tsx?|json)$/.test(entry.name)) continue;
const file = `${directory}/${entry.name}`;
const text = await readFile(file, "utf8");
assert.ok(
!/\bpcbPath\b|\bpcbPathRelativeTo\b|\bpcbStraightLine\b|\bpcbRouteCache\b|<(?:pcbtrace|via|tracehint)\b/.test(
text,
),
`Manual trace declaration in ${file}`,
);
checkedFiles.push(file);
}
}
const module = await readFile("src/T113S3Module.tsx", "utf8");
assert.match(module, /<fanout\b[\s\S]*?pcbTracePaths=/);
const paths = JSON.parse(
await readFile(
"src/generated/lcd_top_storage_right.trace-paths.json",
"utf8",
),
);
for (const path of paths) fanoutTracePath.parse(path);
return {
mode: "native_saved_fanout",
reference: "astra/f1c100s@0.9.2",
paths: paths.length,
checkedFiles,
};
}