Date:2012-06-01 10:24:01 (8 years 2 months ago)
Author:Adam Wang
Commit:b287ab53d2419449c87da73e3eb0696fa3ac3953
Message:eus.fpd: smarter codes from Werner Almesberger

Files: modules/eus.fpd (4 diffs)

Change Details

modules/eus.fpd
11/* MACHINE-GENERATED ! */
22
3frame pin_b {
4    __0: vec @(Hole/2, Hole/2)
5    __1: vec @(-Hole/2, -Hole/2)
6    hole . __0
7    __2: vec @(-ratio*Hole/2, ratio*Hole/2)
8    __3: vec @(ratio*Hole/2, -ratio*Hole/2)
9    rpad "$n" __2 .
10}
11
12frame pins_bottom {
13    set n = i+1
14
15    __0: vec @(x, 0mm)
16    frame pin_b .
17}
18
19frame pins_b {
20    set y = h/2
21
22    set x = (i-(N/2-1)/2)*Pitch
23
24    loop i = 0, N/2-1
25
26    __1: vec @(0mm, -y)
27    frame pins_bottom .
28}
29
30frame pin_t {
3frame pin {
314    __0: vec @(Hole/2, Hole/2)
325    __1: vec @(-Hole/2, -Hole/2)
336    hole . __0
...... 
369    rpad "$n" . __2
3710}
3811
39frame pins_top {
40    set n = N-i-2
41
42    __0: vec @(x, 0mm)
43    frame pin_t .
44}
45
46frame pins_t {
47    set y = h/2
12frame pins {
13    table
14        { n, top, ix }
15        { 1, 0, 0 }
16        { 2, 0, 1 }
17        { 3, 0, 2 }
18        { 4, 0, 3 }
19        { 5, 1, 3 }
20        { 6, 1, 0 }
4821
49    set x = (3*i-(N/2-1)/2)*Pitch
22    set x = (ix-N/4+0.5)*Pitch
5023
51    loop i = 0, 1
24    set y = h*(top-0.5)
5225
53    __0: vec @(0mm, y)
54    frame pins_top .
26    __0: vec @(x, y)
27    frame pin .
5528}
5629
5730frame marker {
...... 
7346    __1: vec @(-x/2, -y/2)
7447    rect . __0 w
7548    frame marker @
76    frame pins_t @
7749}
7850
7951package "EUS"
80unit mm
52unit auto
8153
8254set Pitch = 3.18mm
8355
...... 
8759
8860table
8961    { name, N, B, H, h, W }
90    { "SOIC", 8, 2.8mm, 19.94mm, 15.88mm, 13.59mm }
62    { "EUS", 8, 2.8mm, 19.94mm, 15.88mm, 13.59mm }
9163
9264frame outline @
93frame pins_b @
94measy pin_b.__1 >> pin_b.__0 -16mm
95measx pin_b.__1 -> pin_b.__0 -2mm
96measy outline.__0 >> outline.__1 -19mm
97measx outline.__1 >> outline.__0 -2mm
98measy pin_b.__3 -> pin_b.__2 7.5mm
99measy pins_bottom.__0 >> outline.__1 -5mm
100measx outline.__1 -> pins_bottom.__0 5mm
101measx pins_bottom.__0 -> pins_bottom.__0 3mm
102measy outline.__0 << pins_top.__0 -4mm
103measx outline.__0 << pins_top.__0 3mm
104meas pins_top.__0 >> pins_top.__0 3mm
65frame pins @
66measy outline.__0 >> outline.__1 -18mm
67measx outline.__1 >> outline.__0 -3mm
68measx outline.__0 << pins.__0 3mm
69measy outline.__0 << pins.__0 -4mm
70measx pins.__0 >> pins.__0 h+3mm
71measx outline.__1 -> pins.__0 5mm
72measx pins.__0 -> pins.__0 3mm
73measx pin.__1 -> pin.__0 -2.5mm
74measy pin.__2 -> pin.__3 6mm
75measx pin.__3 -> pin.__2 -6mm

Archive Download the corresponding diff file

Branches:
master



interactive