diff --git a/boom/Makefile b/boom/Makefile new file mode 100644 index 0000000..6651863 --- /dev/null +++ b/boom/Makefile @@ -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 diff --git a/boom/test.mbq b/boom/test.mbq new file mode 100644 index 0000000..31901e6 --- /dev/null +++ b/boom/test.mbq @@ -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 diff --git a/boom/test.sub b/boom/test.sub new file mode 100644 index 0000000..e708f5d --- /dev/null +++ b/boom/test.sub @@ -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 + } + } +}