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/ProcessorSchematic.tsx
import { Fragment } from "react"
import { processorSchematicBlocks } from "./processor-schematic-blocks"
export function ProcessorSchematic() {
return <>
{processorSchematicBlocks.map((block) => {
const sheetBlocks = processorSchematicBlocks.filter((candidate) => candidate.sheet === block.sheet)
const sheetIndex = sheetBlocks.indexOf(block)
const pinNames = block.balls.map((_, index) => `pin${index + 1}`)
const midpoint = Math.ceil(pinNames.length / 2)
return <Fragment key={block.name}><schematicbox
name={block.name}
chipRef=".U1"
schSheetName={block.sheet}
schSectionName={block.section}
schX={(sheetIndex % 3 - 1) * 20}
schY={12 - Math.floor(sheetIndex / 3) * 20}
width={12}
height={(midpoint - 1) * 0.2 + 0.8}
pinLabels={Object.fromEntries(block.balls.map((ball, index) => [`pin${index + 1}`, [`${ball.signal}_${ball.ball}`, ball.ball]]))}
schPinArrangement={{ leftSide: pinNames.slice(0, midpoint), rightSide: pinNames.slice(midpoint) }}
/></Fragment>
})}
</>
}