mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-12-22 23:26:47 +02:00
Test query to exercise the big resistor database we now have.
- boom/test.mbq: sample query (a bunch of 0402 resistors) - boom/test.sub: basic substitution rules - boom/Makefile: tie it all together
This commit is contained in:
parent
7190706c6e
commit
df88430d48
31
boom/Makefile
Normal file
31
boom/Makefile
Normal file
@ -0,0 +1,31 @@
|
||||
BOOM=PATH=/home/moko/svn.openmoko.org/trunk/eda/boom:../boom:$$PATH boom
|
||||
|
||||
KITS = 1
|
||||
|
||||
INV = dist/dk/db/digi-key.inv
|
||||
EQU = dist/dk/db/digi-key.equ
|
||||
DSC = dist/dk/db/digi-key.dsc
|
||||
CHR = manu/panasonic/panasonic.chr manu/stackpole/stackpole.chr
|
||||
|
||||
.PHONY: all show again
|
||||
|
||||
all: show
|
||||
|
||||
show: test.ord $(DSC)
|
||||
$(BOOM) prettyord -t $^
|
||||
|
||||
again:
|
||||
$(MAKE) spotless
|
||||
$(MAKE) all
|
||||
|
||||
test.ord: test.par $(INV) $(EQU)
|
||||
$(BOOM) part2order $(KITS) $^ >$@ || { rm -f $@; exit 1; }
|
||||
|
||||
test.par: $(EQU) $(INV) $(CHR) test.lst test.sub
|
||||
$(BOOM) bom2part $^ >$@ || { rm -f $@; exit 1; }
|
||||
|
||||
test.lst: test.mbq
|
||||
perl ./mbq2lst $^ >$@ || { rm -f $@; exit 1; }
|
||||
|
||||
spotless:
|
||||
rm -f test.lst test.par test.ord
|
34
boom/test.mbq
Normal file
34
boom/test.mbq
Normal file
@ -0,0 +1,34 @@
|
||||
1 R 0402 12R
|
||||
1 R 0402 15R
|
||||
1 R 0402 36R
|
||||
1 R 0402 47R
|
||||
1 R 0402 68R
|
||||
1 R 0402 82R
|
||||
|
||||
1 R 0402 120R
|
||||
1 R 0402 150R
|
||||
1 R 0402 360R
|
||||
1 R 0402 470R
|
||||
1 R 0402 680R
|
||||
1 R 0402 820R
|
||||
|
||||
1 R 0402 1k2
|
||||
1 R 0402 1k5
|
||||
1 R 0402 3k6
|
||||
1 R 0402 4k7
|
||||
1 R 0402 6k8
|
||||
1 R 0402 8k2
|
||||
|
||||
1 R 0402 12k
|
||||
1 R 0402 15k
|
||||
1 R 0402 36k
|
||||
1 R 0402 47k
|
||||
1 R 0402 68k
|
||||
1 R 0402 82k
|
||||
|
||||
1 R 0402 120k
|
||||
1 R 0402 150k
|
||||
1 R 0402 360k
|
||||
1 R 0402 470k
|
||||
1 R 0402 680k
|
||||
1 R 0402 820k
|
61
boom/test.sub
Normal file
61
boom/test.sub
Normal file
@ -0,0 +1,61 @@
|
||||
#SUB
|
||||
|
||||
# Taken from ben-wpan. Removed anything project-specific but the translation
|
||||
# rules.
|
||||
|
||||
-> T=unknown
|
||||
|
||||
R[0-9P]* { # also handle RP...
|
||||
-> T=R
|
||||
VAL=$R -> R=$VAL
|
||||
# -> TOL=5%
|
||||
FN=$% -> TOL=$FN
|
||||
}
|
||||
|
||||
RP[0-9]* {
|
||||
-> T=RA
|
||||
# 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
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user