0hmX/am3352
This code suite comprises TypeScript scripts that analyze, verify, and assemble complex DDR memory interface hardware, focusing on physical routing, via and pad placement, electrical clearance, and physical constraints, often involving precise geometric calculations and consistent provenance tracking.
- Version
- 1.0.5
- License
- unset
- Stars
- 0
scripts/route-ddr-system.ts
/** A separate-process watchdog also bounds a single long synchronous solver step. */
import {resolve} from 'node:path'
import {writeFileSync} from 'node:fs'
const directory=resolve(process.argv[2]??'dist/ddr-system/outward_north')
const seconds=Number(process.argv[3]??120)
if(!Number.isFinite(seconds)||seconds<=0)throw Error('Provide a positive diagnostic time limit in seconds')
const child=Bun.spawn(['bun',new URL('./route-ddr-system-worker.ts',import.meta.url).pathname,...process.argv.slice(2)],{stdout:'inherit',stderr:'inherit'})
let timedOut=false
const timer=setTimeout(()=>{timedOut=true;child.kill()},(seconds+5)*1000)
const exit=await child.exited
clearTimeout(timer)
if(timedOut){
writeFileSync(resolve(directory,'router-report.json'),JSON.stringify({status:'external-time-limit',seconds:seconds+5,scope:'Complete interface routing diagnostic; no successful copper asserted'},null,2)+'\n')
console.error('Full DDR routing exceeded the external diagnostic limit')
process.exit(1)
}
process.exit(exit)