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

tests/api.test.ts

import {test,expect} from 'bun:test'
import {getRamFanoutTracePaths,MT41K512M8Fanout} from '../src/index'
import {PIN_MAP} from '../src/pin-map'
test('saved path getters do not share mutable route state',()=>{const a=getRamFanoutTracePaths();a[0]!.route[0]!.x=999;expect(getRamFanoutTracePaths()[0]!.route[0]!.x).not.toBe(999)})
test('bad profiles and terminals fail explicitly',()=>{expect(()=>getRamFanoutTracePaths('wrong' as any)).toThrow();expect(()=>MT41K512M8Fanout({name:'RAM',connections:{DQ8:'R1.1'}})).toThrow()})
test('x8 Micron signal identities distinguish physical balls from addresses',()=>{for(const [ball,signal] of Object.entries({A1:'VSS',L7:'A1',D2:'DQ6',E3:'DQ4',E7:'DQ7',E8:'DQ5',B7:'DM',A7:'TDQS_N',F7:'CK_P',G7:'CK_N',C3:'DQS_P',D3:'DQS_N'}))expect(PIN_MAP.find(p=>p.ball===ball)?.signal).toBe(signal);expect(PIN_MAP.filter(p=>p.routed)).toHaveLength(72)})