0hmX/simplified-am62l-computer
This code defines components and scripts for physically representing and routing high-speed DDR memory signals, power lines, and ground planes on an 8-layer PCB with detailed pin assignments, copper pours, and precise via and trace layouts based on TI EVM reference data.
- Version
- 1.0.16
- License
- unset
- Stars
- 0
components/registry-memory.tsx
import {
MT53E1G16D1ZW,
ballMap,
} from "@tsci/0hmX.mt53e1g16d1zw-footprint"
import type { ComponentProps } from "react"
import { Fragment } from "react"
const connectedSignals = new Set([
...Array.from({ length: 16 }, (_, bit) => `DQ${bit}`),
"DMI0", "DMI1", "DQS0_t", "DQS0_c", "DQS1_t", "DQS1_c",
"CA0", "CA1", "CA2", "CA3", "CA4", "CA5",
"CS", "CKE", "ODT_CA", "CK_t", "CK_c", "RESET_n", "ZQ",
"VSS", "VDD1", "VDD2", "VDDQ",
])
const memoryNoConnects = ballMap
.map(({ signal }, index) => ({ signal, pin: `pin${index + 1}` }))
.filter(({ signal }) => !connectedSignals.has(signal))
.map(({ pin }) => pin)
/**
* Uses the registry component directly so its published pin labels,
* pinAttributes, footprint, and datasheet metadata remain authoritative.
*/
export const RegistryMt53e1g16 = (
props: ComponentProps<typeof MT53E1G16D1ZW>,
) => {
const name = props.name ?? "U2"
const railConnections = ballMap.flatMap(({ ball, signal }) => {
const net = signal === "VSS"
? "GND"
: signal === "VDD1"
? "VDD_1V8"
: signal === "VDD2" || signal === "VDDQ"
? "VDD_DDR_1V1"
: undefined
return net ? [{ ball, net }] : []
})
return (
<>
<MT53E1G16D1ZW {...props} noConnect={memoryNoConnects as never[]} />
{railConnections.map(({ ball, net }, index) => (
<Fragment key={`${ball}-${net}`}>
<trace
name={`MEM_RAIL_${index + 1}`}
from={`${name}.${ball}`}
to={`net.${net}`}
/>
</Fragment>
))}
</>
)
}