mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-25 21:12:48 +02:00
bom/: automatic BOM generation (work in progress)
- bom/Makefile: run and control the BOM generation system - bom/atrf.equ: project-specific equivalences - bom/atrf.inv: "inventory" of parts implemented as PCB features - bom/atrf.sub: substitution rules - bom/avx.gen, bom/johanson.gen, bom/tdk.gen, bom/yageo-cap.gen: part number translators for capacitors
This commit is contained in:
parent
6fc656fd7f
commit
1a5d9f5a1e
54
bom/Makefile
Normal file
54
bom/Makefile
Normal file
@ -0,0 +1,54 @@
|
||||
BOOM=PATH=/home/moko/svn.openmoko.org/trunk/eda/boom:../boom:$$PATH boom
|
||||
|
||||
KITS=1
|
||||
|
||||
EQU=atrf.equ dk/digi-key.equ
|
||||
INV=dk/digi-key.inv
|
||||
CHR=avx.chr tdk.chr yageo-cap.chr
|
||||
|
||||
|
||||
.PHONY: all again show-atusd spotless
|
||||
|
||||
all: atusd.ord
|
||||
|
||||
again:
|
||||
$(MAKE) spotless
|
||||
$(MAKE) all
|
||||
|
||||
atusd.ord: atusd.par $(INV) $(EQU)
|
||||
$(BOOM) part2order $(KITS) $(INV) $(EQU) atusd.par >$@ || \
|
||||
{ rm -rf $@; exit 1; }
|
||||
|
||||
atusd.par: $(EQU) $(INV) $(CHR) ../atusd/atusd.lst atrf.sub
|
||||
$(BOOM) bom2part $(EQU) $(INV) $(CHR) \
|
||||
../atusd/atusd.lst atrf.sub \
|
||||
>$@ || { rm -rf $@; exit 1; }
|
||||
|
||||
avx.chr: dk/digi-key.equ avx.gen
|
||||
$(BOOM) gen2chr AVX dk/digi-key.equ avx.gen >$@ || \
|
||||
{ rm -f $@; exit 1; }
|
||||
|
||||
tdk.chr: dk/digi-key.equ tdk.gen
|
||||
$(BOOM) gen2chr TDK dk/digi-key.equ tdk.gen >$@ || \
|
||||
{ rm -f $@; exit 1; }
|
||||
|
||||
yageo-cap.chr: dk/digi-key.equ yageo-cap.gen
|
||||
$(BOOM) gen2chr YAGEO dk/digi-key.equ yageo-cap.gen >$@ || \
|
||||
{ rm -f $@; exit 1; }
|
||||
|
||||
dk/digi-key.inv:
|
||||
$(MAKE) -C dk digi-key.inv
|
||||
|
||||
SHOW_PRETTY = (echo '\#ORD'; grep '^$(2) ' $(1).ord ; ) | \
|
||||
$(BOOM) prettyord - $(3) | \
|
||||
sed 's/^... //' | \
|
||||
awk '{ s += $$(NF); if ($$(NF)+0) n++; print; } \
|
||||
END { print "$(4)", s, "items:", n }'
|
||||
|
||||
show-atusd: atusd.ord dk/digi-key.dsc
|
||||
$(call SHOW_PRETTY,atusd,DIGI-KEY,dk/digi-key.dsc,USD)
|
||||
|
||||
spotless:
|
||||
$(MAKE) -C dk spotless
|
||||
rm -f atusd.par atusd.ord
|
||||
rm -f avx.chr tdk.chr yageo-cap.chr
|
3
bom/atrf.equ
Normal file
3
bom/atrf.equ
Normal file
@ -0,0 +1,3 @@
|
||||
#EQU
|
||||
|
||||
ATMEL AT86RF230 ATMEL AT86RF230-ZU
|
7
bom/atrf.inv
Normal file
7
bom/atrf.inv
Normal file
@ -0,0 +1,7 @@
|
||||
#INV
|
||||
|
||||
# Pseudo-inventory for PCB features.
|
||||
|
||||
ATRF meander 999999 USD 1 0
|
||||
ATRF uSD-Card 999999 USD 1 0
|
||||
ATRF PAD_60x60 999999 USD 1 0
|
67
bom/atrf.sub
Normal file
67
bom/atrf.sub
Normal file
@ -0,0 +1,67 @@
|
||||
#SUB
|
||||
|
||||
# Taked from gta02-core. Left in the hacks, since we may use similar components
|
||||
# in the future.
|
||||
|
||||
-> T=unknown
|
||||
|
||||
R[0-9P]* { # also handle RP...
|
||||
-> T=R
|
||||
VAL=$R -> R=$VAL
|
||||
# -> TOL=5%
|
||||
FN=$% -> TOL=$FN
|
||||
}
|
||||
|
||||
RP[0-9]* {
|
||||
-> T=RA
|
||||
RP220[123] -> ARRAY=4
|
||||
# the other parameters have already been taken care of by R*
|
||||
}
|
||||
|
||||
C[0-9]* {
|
||||
-> T=C
|
||||
VAL=$F -> C=$VAL
|
||||
FN=*V -> V=>=$FN
|
||||
}
|
||||
|
||||
L[0-9]* {
|
||||
-> T=L
|
||||
VAL=$H -> L=$VAL
|
||||
FN=*A -> I=>=$FN
|
||||
}
|
||||
|
||||
B[0-9]* {
|
||||
-> T=FILTER M=BEAD
|
||||
VAL=$R -> R=$VAL
|
||||
FN=*A -> I=$FN
|
||||
FN=*R -> Rdc=$FN
|
||||
FN=0.45R -> Rdc=450mR # hack
|
||||
}
|
||||
|
||||
D[0-9]* {
|
||||
-> T=D
|
||||
VAL=*F { # heuristic to detect TVS
|
||||
-> M=TVS
|
||||
VAL=*F -> C=<=$VAL
|
||||
FN=(*V)ac -> Vac=$FN:1
|
||||
FN=(*V)dc -> Vdc=$FN:1
|
||||
|
||||
#
|
||||
# Hack: some companies specify the class of varistors with Vdc = 9 V
|
||||
# as Vac = 6.5 V while others use Vac = 7 V. Sometimes, Vac is even
|
||||
# omitted entirely.
|
||||
#
|
||||
# Here, we work around the issue that Karmax use Vac = 6.5 V,
|
||||
# Cooper/Bussmann use Vac = 7V if at all, and out schematics specify
|
||||
# Vac = 6.5 V.
|
||||
#
|
||||
Vac=6.5V {
|
||||
-> Vac=
|
||||
-> Vdc=9V
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
FP=meander -> VAL=meander
|
||||
FP=uSD-Card -> VAL=uSD-Card
|
48
bom/avx.gen
Normal file
48
bom/avx.gen
Normal file
@ -0,0 +1,48 @@
|
||||
#GEN
|
||||
|
||||
# http://www.avx.com/docs/Catalogs/ccog.pdf
|
||||
|
||||
C* -> T=C {
|
||||
(????)(?)(???)([0-9][0-9][0-9])(?)(?)* ->
|
||||
FP=$REF:1 _V=$REF:2 M=$REF:3 _E12_P=$REF:4 _TOL=$REF:5
|
||||
|
||||
M=C0G -> M=NP0 # normalize
|
||||
|
||||
_TOL=B -> TOL=0.10pF
|
||||
_TOL=C -> TOL=0.25pF
|
||||
_TOL=D -> TOL=0.5pF
|
||||
_TOL=F -> TOL=1%
|
||||
_TOL=J -> TOL=5%
|
||||
_TOL=K -> TOL=10%
|
||||
_TOL=M -> TOL=20%
|
||||
_TOL=Z -> TOL=80/20%
|
||||
|
||||
_V=6 -> V=6.3V
|
||||
_V=Z -> V=10V
|
||||
_V=Y -> V=16V
|
||||
_V=3 -> V=25V
|
||||
_V=5 -> V=50V
|
||||
_V=1 -> V=100V
|
||||
_V=2 -> V=200V
|
||||
_V=7 -> V=500V
|
||||
}
|
||||
|
||||
# E12 scale, base multiplier is 10^-12 (pico)
|
||||
|
||||
_E12_P=(??)8 -> _E12=${_E12_P:1}0f
|
||||
_E12_P=(?)(?)9 -> _E12=$_E12_P:1.${_E12_P:2}p
|
||||
_E12_P=(??)0 -> _E12=${_E12_P:1}p
|
||||
_E12_P=(??)1 -> _E12=${_E12_P:1}0p
|
||||
_E12_P=(?)(?)2 -> _E12=$_E12_P:1.${_E12_P:2}n
|
||||
_E12_P=(??)3 -> _E12=${_E12_P:1}n
|
||||
_E12_P=(??)4 -> _E12=${_E12_P:1}0n
|
||||
_E12_P=(?)(?)5 -> _E12=$_E12_P:1.${_E12_P:2}u
|
||||
_E12_P=(??)6 -> _E12=${_E12_P:1}u
|
||||
_E12_P=(??)7 -> _E12=${_E12_P:1}0u
|
||||
|
||||
# remove trailing zeroes
|
||||
|
||||
_E12=(*).0([fpnu]) -> _E12=$_E12:1$_E12:2
|
||||
_E12=(*).0 -> _E12=$_E12:1
|
||||
|
||||
T=C -> C=${_E12}F !
|
62
bom/johanson.gen
Normal file
62
bom/johanson.gen
Normal file
@ -0,0 +1,62 @@
|
||||
#GEN
|
||||
|
||||
# http://www.johansontechnology.com/images/stories/rfcaps/mlhqcaps/jti_high-q-mlcc_2008-11.pdf
|
||||
|
||||
C* -> T=C {
|
||||
(???)([RS][0-9][0-9])(?)([0-9][0-9][0-9])(?)* ->
|
||||
_V=$REF:1 _FP=$REF:2 _M=$REF:3 _E12=$REF:4 _TOL=$REF:5
|
||||
|
||||
_V=6R3 -> V=6.3V
|
||||
_V=160 -> V=16V
|
||||
_V=250 -> V=25V
|
||||
_V=500 -> V=50V
|
||||
_V=251 -> V=250V
|
||||
_V=501 -> V=500V
|
||||
_V=102 -> V=1000V
|
||||
_V=152 -> V=1500V
|
||||
_V=202 -> V=2000V
|
||||
_V=252 -> V=2500V
|
||||
|
||||
_M=S -> M=NP0/RF
|
||||
_M=L -> M=NP0/RF
|
||||
_M=E -> M=NP0/RF
|
||||
_M=W -> M=X7R/RF
|
||||
|
||||
_TOL=A -> TOL=0.05pF
|
||||
_TOL=B -> TOL=0.10pF
|
||||
_TOL=C -> TOL=0.25pF
|
||||
_TOL=D -> TOL=0.5pF
|
||||
_TOL=F -> TOL=1%
|
||||
_TOL=G -> TOL=2%
|
||||
_TOL=J -> TOL=5%
|
||||
_TOL=K -> TOL=10%
|
||||
|
||||
_V=6 -> V=6.3V
|
||||
_V=Z -> V=10V
|
||||
_V=Y -> V=16V
|
||||
_V=3 -> V=25V
|
||||
_V=5 -> V=50V
|
||||
_V=1 -> V=100V
|
||||
_V=2 -> V=200V
|
||||
_V=7 -> V=500V
|
||||
}
|
||||
|
||||
# E12 scale, base multiplier is 10^-12 (pico)
|
||||
|
||||
_E12_P=(??)8 -> _E12=${_E12_P:1}0f
|
||||
_E12_P=(?)(?)9 -> _E12=$_E12_P:1.${_E12_P:2}p
|
||||
_E12_P=(??)0 -> _E12=${_E12_P:1}p
|
||||
_E12_P=(??)1 -> _E12=${_E12_P:1}0p
|
||||
_E12_P=(?)(?)2 -> _E12=$_E12_P:1.${_E12_P:2}n
|
||||
_E12_P=(??)3 -> _E12=${_E12_P:1}n
|
||||
_E12_P=(??)4 -> _E12=${_E12_P:1}0n
|
||||
_E12_P=(?)(?)5 -> _E12=$_E12_P:1.${_E12_P:2}u
|
||||
_E12_P=(??)6 -> _E12=${_E12_P:1}u
|
||||
_E12_P=(??)7 -> _E12=${_E12_P:1}0u
|
||||
|
||||
# remove trailing zeroes
|
||||
|
||||
_E12=(*).0([fpnu]) -> _E12=$_E12:1$_E12:2
|
||||
_E12=(*).0 -> _E12=$_E12:1
|
||||
|
||||
T=C -> C=${_E12}F !
|
54
bom/tdk.gen
Normal file
54
bom/tdk.gen
Normal file
@ -0,0 +1,54 @@
|
||||
#GEN
|
||||
|
||||
# http://www.tdk.co.jp/tefe02/e412_c.pdf
|
||||
|
||||
C* -> T=C {
|
||||
C(????)(???)(??)([0-9][0-9R][0-9])(?)(?)* ->
|
||||
_FP=$REF:1 M=$REF:2 _V=$REF:3 _E12_P=$REF:4 _TOL=$REF:5
|
||||
|
||||
M=C0G -> M=NP0 # normalize
|
||||
|
||||
_FP=0603 -> FP=0201
|
||||
_FP=1005 -> FP=0402
|
||||
_FP=1608 -> FP=0603
|
||||
_FP=2012 -> FP=0805
|
||||
_FP=3216 -> FP=1206
|
||||
_FP=3225 -> FP=1210
|
||||
_FP=4532 -> FP=1812
|
||||
_FP=5750 -> FP=2220
|
||||
|
||||
_TOL=C -> TOL=0.25pF
|
||||
_TOL=D -> TOL=0.5pF
|
||||
_TOL=J -> TOL=5%
|
||||
_TOL=K -> TOL=10%
|
||||
_TOL=M -> TOL=20%
|
||||
_TOL=Z -> TOL=80/20%
|
||||
|
||||
_V=0G -> V=4V
|
||||
_V=0J -> V=6.3V
|
||||
_V=1A -> V=10V
|
||||
_V=1C -> V=16V
|
||||
_V=1E -> V=25V
|
||||
_V=1H -> V=50V
|
||||
}
|
||||
|
||||
# E12 scale, base multiplier is 10^-12 (pico)
|
||||
|
||||
_E12_P=(??)8 -> _E12=${_E12_P:1}0f
|
||||
_E12_P=(?)(?)9 -> _E12=$_E12_P:1.${_E12_P:2}p
|
||||
_E12_P=(??)0 -> _E12=${_E12_P:1}p
|
||||
_E12_P=(??)1 -> _E12=${_E12_P:1}0p
|
||||
_E12_P=(?)(?)2 -> _E12=$_E12_P:1.${_E12_P:2}n
|
||||
_E12_P=(??)3 -> _E12=${_E12_P:1}n
|
||||
_E12_P=(??)4 -> _E12=${_E12_P:1}0n
|
||||
_E12_P=(?)(?)5 -> _E12=$_E12_P:1.${_E12_P:2}u
|
||||
_E12_P=(??)6 -> _E12=${_E12_P:1}u
|
||||
_E12_P=(??)7 -> _E12=${_E12_P:1}0u
|
||||
_E12_P=(?)R(?) -> _E12=$_E12_P:1.${_E12_P:2}p # strange
|
||||
|
||||
# remove trailing zeroes
|
||||
|
||||
_E12=(*).0([fpnu]) -> _E12=$_E12:1$_E12:2
|
||||
_E12=(*).0 -> _E12=$_E12:1
|
||||
|
||||
T=C -> C=${_E12}F !
|
43
bom/yageo-cap.gen
Normal file
43
bom/yageo-cap.gen
Normal file
@ -0,0 +1,43 @@
|
||||
#GEN
|
||||
|
||||
# http://www.yageo.com/pdf/yageo/NP0_16V-to-100V_6.pdf
|
||||
|
||||
CC* -> T=C {
|
||||
CC(????)(?)?NP0(?)BN([0-9][0-9R][0-9]) ->
|
||||
FP=$REF:1 _TOL=$REF:2 _V=$REF:3 _E12_P=$REF:4
|
||||
|
||||
M=NP0
|
||||
|
||||
_TOL=B -> TOL=0.1pF
|
||||
_TOL=C -> TOL=0.25pF
|
||||
_TOL=D -> TOL=0.5pF
|
||||
_TOL=F -> TOL=1%
|
||||
_TOL=G -> TOL=2%
|
||||
_TOL=J -> TOL=5%
|
||||
|
||||
_V=7 -> V=16V
|
||||
_V=8 -> V=25V
|
||||
_V=9 -> V=50V
|
||||
_V=0 -> V=100V
|
||||
}
|
||||
|
||||
# E12 scale, base multiplier is 10^-12 (pico)
|
||||
|
||||
_E12_P=(??)8 -> _E12=${_E12_P:1}0f
|
||||
_E12_P=(?)(?)9 -> _E12=$_E12_P:1.${_E12_P:2}p
|
||||
_E12_P=(??)0 -> _E12=${_E12_P:1}p
|
||||
_E12_P=(??)1 -> _E12=${_E12_P:1}0p
|
||||
_E12_P=(?)(?)2 -> _E12=$_E12_P:1.${_E12_P:2}n
|
||||
_E12_P=(??)3 -> _E12=${_E12_P:1}n
|
||||
_E12_P=(??)4 -> _E12=${_E12_P:1}0n
|
||||
_E12_P=(?)(?)5 -> _E12=$_E12_P:1.${_E12_P:2}u
|
||||
_E12_P=(??)6 -> _E12=${_E12_P:1}u
|
||||
_E12_P=(??)7 -> _E12=${_E12_P:1}0u
|
||||
_E12_P=(?)R(?) -> _E12=$_E12_P:1.${_E12_P:2}p # strange
|
||||
|
||||
# remove trailing zeroes
|
||||
|
||||
_E12=(*).0([fpnu]) -> _E12=$_E12:1$_E12:2
|
||||
_E12=(*).0 -> _E12=$_E12:1
|
||||
|
||||
T=C -> C=${_E12}F !
|
Loading…
Reference in New Issue
Block a user