AnasSarkiz/am625sip-linux
An electronic component representing an AM625 system-in-package with mapped pins and physical footprint for PCB integration.
- Version
- 1.0.3
- License
- unset
- Stars
- 0
components/processor-schematic-blocks.ts
import { am625sipBalls } from "./am625sip-balls"
type ProcessorBall = (typeof am625sipBalls)[number]
type ProcessorSection = "power" | "ground" | "storage" | "display" | "high_speed" | "control"
function getProcessorSection(ball: ProcessorBall): ProcessorSection {
if (ball.signal === "VSS") return "ground"
if (/^(VDD|VMON|VPP|CAP_)/.test(ball.signal)) return "power"
if (/^(MMC|OSPI)/.test(ball.signal)) return "storage"
if (/^(VOUT|GPMC)/.test(ball.signal)) return "display"
if (/^(USB|CSI|RGMII|MDIO|OLDI)/.test(ball.signal)) return "high_speed"
return "control"
}
const processorSections: ProcessorSection[] = ["power", "ground", "storage", "display", "high_speed", "control"]
export const processorSchematicBlocks = processorSections.flatMap((section) => {
const sectionBalls = am625sipBalls.filter((ball) => getProcessorSection(ball) === section)
return Array.from({ length: Math.ceil(sectionBalls.length / 60) }, (_, blockIndex) => ({
section,
name: `U1_${section}_${blockIndex + 1}`,
balls: sectionBalls.slice(blockIndex * 60, (blockIndex + 1) * 60),
sheet: section === "power" || section === "ground" ? "processor_power" : "processor",
}))
})