0hmX/mt41k512m8da-107-it-p-fanout

This code defines the physical footprint, routing, and layout configuration for a DDR3 memory module using surface-mount pads, vias, and copper traces on a printed circuit board (PCB).

Version
0.2.3
License
unset
Stars
0

src/index.tsx

import { MicronJlcFootprint } from "../imports/MicronJlcFootprint"
import { PIN_MAP, ROUTED_PINS, EXTERNAL_TERMINALS, pinLabels } from "./pin-map"
import { assertLayoutProfile, RULES, type LayoutProfile } from "./profiles"
import { getRamFanoutTracePaths } from "./saved-paths"
export { LAYOUT_PROFILES, PROFILE_LAYOUTS, RULES, BREAKOUT, PACKAGE_BODY, FANOUT_PADDING_MM, getExitLayer, type LayoutProfile } from "./profiles"
export { PIN_MAP, EXTERNAL_TERMINALS } from "./pin-map"
export { getRamFanoutTracePaths } from "./saved-paths"
export interface MT41K512M8FanoutProps {
 name:string
 layoutProfile?:LayoutProfile
 pcbX?:number
 pcbY?:number
 pcbRotation?:number
 schX?:number
 schY?:number
 connections?:Partial<Record<string,string>>
}
export function MT41K512M8Fanout({name, layoutProfile="outward_north",connections={},...placement}:MT41K512M8FanoutProps) {
 assertLayoutProfile(layoutProfile)
 if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(name)) throw new Error("Use a selector-safe module name")
 for(const terminal of Object.keys(connections)) if(!EXTERNAL_TERMINALS.includes(terminal)) throw new Error(`Unknown RAM terminal ${terminal}`)
 return <>
  <subcircuit name={name} {...placement} minTraceWidth={RULES.traceWidth}
    minViaPadDiameter={RULES.viaDiameter} minViaHoleDiameter={RULES.viaDrill}>
   <fanout name="ESCAPE" pcbX={0} pcbY={0} pcbTracePaths={getRamFanoutTracePaths(layoutProfile)}>
    <chip name="U1" manufacturerPartNumber="MT41K512M8DA-107 IT:P"
      supplierPartNumbers={{jlcpcb:["C2888412"]}} pinLabels={pinLabels}
      pcbX={0} pcbY={0} footprint={<MicronJlcFootprint/>}/>
   </fanout>
   {ROUTED_PINS.map(p=><net name={`${name}_${p.terminal}`}/>)}
   {ROUTED_PINS.map(p=><trace key={p.ball} name={`${name}_${p.terminal}_escape`} from={`U1.ball_${p.ball}`} to={`net.${name}_${p.terminal}`}/>)}
  </subcircuit>
  {Object.entries(connections).map(([terminal,target])=>target?<trace key={terminal} name={`${name}_${terminal}_external`} from={`.${name} .U1 > .SIG_${terminal}`} to={target}/>:null)}
 </>
}
export default MT41K512M8Fanout

export { PAIRS, MATCH_GROUPS, TUNING, PROVISIONAL_STACKUP } from "./timing"