r5823 - in trunk/gta02-core: . bom

werner at docs.openmoko.org werner at docs.openmoko.org
Sun Feb 7 06:39:28 CET 2010


Author: werner
Date: 2010-02-07 06:39:27 +0100 (Sun, 07 Feb 2010)
New Revision: 5823

Modified:
   trunk/gta02-core/bom/Makefile
   trunk/gta02-core/bom/README
   trunk/gta02-core/bom/gta02-core.sub
   trunk/gta02-core/bom/match.pl
   trunk/gta02-core/pmu.sch
Log:
Field substitution got a lot more flexible with "wildcard" field FN. 
Resolved problems of matching inductors.

- bom/match.pl, bom/README: "FN" can be used as a shorthand for "all fields"
- bom/gta02-core.sub: replace all uses of F1, F2, F3 with FN
- bom/gta02-core.sub (L): the maximum current can now be specified
- bom/pardup.pl: script to show multiple choices in the parts list
- bom/Makefile: new target show-dup to show entries in the parts list where
  multiple choices are possible (which is suspicious in our case)
- pmu.sch: added footprint and current rating for L1701 through L1704
- gta02-core.sub (R): commented out 5% tolerance default for now since it
  causes problems matching components and picking the "wrong" component doesn't
  do much harm



Modified: trunk/gta02-core/bom/Makefile
===================================================================
--- trunk/gta02-core/bom/Makefile	2010-02-07 00:13:43 UTC (rev 5822)
+++ trunk/gta02-core/bom/Makefile	2010-02-07 05:39:27 UTC (rev 5823)
@@ -6,7 +6,7 @@
 INV=fic/fic.inv gta02-core.inv dummy.inv fic/missing.inv digi-key.inv
 CHR=darfon.chr ralec.chr avx.chr acx.chr misc.chr
 
-.PHONY:		all spotless upload show-missing show-dk
+.PHONY:		all spotless upload show-dup show-missing show-dk
 # mark them as phony since we have incomplete dependencies in this Makefile
 .PHONY:		fic/fic.equ fic/fic.inv fic/missing.equ
 
@@ -57,6 +57,9 @@
 		$(MAKE) -C fic spotless
 		rm -f gta02-core.par gta02-core.ord darfon.chr ralec.chr
 
+show-dup:	pardup.pl gta02-core.par
+		perl ./pardup.pl gta02-core.par
+
 show-missing:	$(EQU) fic/fic.dsc
 		(echo '#ORD'; grep MISSING gta02-core.ord ; ) | \
 		  ./prettyord - $(EQU) fic/fic.dsc

Modified: trunk/gta02-core/bom/README
===================================================================
--- trunk/gta02-core/bom/README	2010-02-07 00:13:43 UTC (rev 5822)
+++ trunk/gta02-core/bom/README	2010-02-07 05:39:27 UTC (rev 5823)
@@ -150,6 +150,11 @@
 Note that fields with a user-defined name currently still only appear
 as F1, F2, etc.
 
+The special field name FN can be used to look for a match in all of
+F1, F2, ... This way, it's sufficient to use a consistent syntax for
+additional parameters, without having to assign also a fixed location
+for them. If more than one field matches, the first match is taken.
+
 Field names are case-insensitive.
 
 The pattern is uses a notation similar to filename globbing. There
@@ -179,7 +184,7 @@
 
 This rule translates the values of all resistors to SI notation.
 
-D* F1=(*)Vdc -> T=TSV Vdc=F1:1
+D* FN=(*)Vdc -> T=TSV Vdc=FN:1
 
 This rule sets the parameters T and Vdc for Zeners acting as TSVs.
 

Modified: trunk/gta02-core/bom/gta02-core.sub
===================================================================
--- trunk/gta02-core/bom/gta02-core.sub	2010-02-07 00:13:43 UTC (rev 5822)
+++ trunk/gta02-core/bom/gta02-core.sub	2010-02-07 05:39:27 UTC (rev 5823)
@@ -5,8 +5,8 @@
 R[0-9P]* {	# also handle RP...
     -> T=R
     VAL=$R -> R=$VAL
-    -> TOL=5%
-    F1=$% -> TOL=$F1
+#    -> TOL=5%
+    FN=$% -> TOL=$FN
 }
 
 RP[0-9]* {
@@ -23,14 +23,15 @@
 L[0-9]* {
     -> T=L
     VAL=$H -> L=$VAL
+    FN=*A -> I=$FN
 }
 
 B[0-9]* {
     -> T=FILTER M=BEAD
     VAL=$R -> R=$VAL
-    F2=*A -> I=$F2
-    F3=*R -> Rdc=$F3
-    F3=0.45R -> Rdc=450mR	# hack
+    FN=*A -> I=$FN
+    FN=*R -> Rdc=$FN
+    FN=0.45R -> Rdc=450mR	# hack
 }
 
 D[0-9]* {
@@ -38,8 +39,8 @@
     VAL=*F {	# heuristic to detect TVS
 	-> M=TVS
 	VAL=*F -> C=$VAL
-	F1=(*V)ac -> Vac=$F1:1
-	F1=(*V)dc -> Vdc=$F1:1
+	FN=(*V)ac -> Vac=$FN:1
+	FN=(*V)dc -> Vdc=$FN:1
     }
 }
 

Modified: trunk/gta02-core/bom/match.pl
===================================================================
--- trunk/gta02-core/bom/match.pl	2010-02-07 00:13:43 UTC (rev 5822)
+++ trunk/gta02-core/bom/match.pl	2010-02-07 05:39:27 UTC (rev 5823)
@@ -163,19 +163,25 @@
     RULE: for (my $i = 0; $i <= $#match; $i++) {
 	print STDERR "RULE #$i\n" if $debug;
 	%found = %field;
-	for (keys %{ $match[$i] }) {
-	    print STDERR "  MATCH $_=$match[$i]{$_}[0] " if $debug;
-	    if (!defined $found{$_}) {
-		print STDERR "NO FIELD\n" if $debug;
-		next RULE;
+	FIELD: for my $f (keys %{ $match[$i] }) {
+	    my @f = $f ne "FN" ? ($f) :
+	      ("F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9");
+	    for (@f) {
+		print STDERR "  MATCH $_=$match[$i]{$f}[0] " if $debug;
+		if (!defined $found{$_}) {
+		    print STDERR "NO FIELD\n" if $debug;
+		    next;
+		}
+		print STDERR "FIELD $found{$_} " if $debug;
+		if (!defined &sub_match($found{$_}, $f,
+		  $match[$i]{$f}[1], $match[$i]{$f}[2])) {
+		    print STDERR "MISS\n" if $debug;
+		    next;
+		}
+		print STDERR "MATCH\n" if $debug;
+		next FIELD;
 	    }
-	    print STDERR "FIELD $found{$_} " if $debug;
-	    if (!defined &sub_match($found{$_}, $_,
-	      $match[$i]{$_}[1], $match[$i]{$_}[2])) {
-		print STDERR "MISS\n" if $debug;
-		next RULE;
-	    }
-	    print STDERR "MATCH\n" if $debug;
+	    next RULE;
 	}
 	for (keys %{ $action[$i] }) {
 	    my $s = &sub_expand($action[$i]{$_});

Modified: trunk/gta02-core/pmu.sch
===================================================================
--- trunk/gta02-core/pmu.sch	2010-02-07 00:13:43 UTC (rev 5822)
+++ trunk/gta02-core/pmu.sch	2010-02-07 05:39:27 UTC (rev 5823)
@@ -1,4 +1,4 @@
-EESchema Schematic File Version 2  date Sat Jan 30 19:05:11 2010
+EESchema Schematic File Version 2  date Sun Feb  7 02:31:05 2010
 LIBS:power,device,conn,gta02-core,gta02-core-cache
 EELAYER 24  0
 EELAYER END
@@ -1237,6 +1237,8 @@
 P 11100 4650
 F 0 "L1701" V 11050 4650 50  0000 C CNN
 F 1 "2u2" V 11200 4650 50  0000 C CNN
+F 2 "1210" H 11100 4650 60  0001 C CNN
+F 4 "1.6A" V 11200 4850 50  0000 C CNN "I"
 	1    11100 4650
 	0    1    1    0   
 $EndComp
@@ -2094,6 +2096,8 @@
 P 11200 6550
 F 0 "L1704" V 11150 6400 50  0000 C CNN
 F 1 "2u2" V 11150 6650 50  0000 C CNN
+F 2 "0805" H 11200 6550 60  0001 C CNN
+F 4 "800mA" V 11150 6900 50  0000 C CNN "I"
 	1    11200 6550
 	0    1    1    0   
 $EndComp
@@ -2103,6 +2107,8 @@
 P 11100 6050
 F 0 "L1702" V 11050 5900 50  0000 C CNN
 F 1 "4u7" V 11050 6150 50  0000 C CNN
+F 2 "0805" H 11100 6050 60  0001 C CNN
+F 4 "560mA" V 11050 6400 50  0000 C CNN "I"
 	1    11100 6050
 	0    1    1    0   
 $EndComp
@@ -2112,6 +2118,8 @@
 P 11100 5550
 F 0 "L1703" V 11050 5400 50  0000 C CNN
 F 1 "4u7" V 11050 5650 50  0000 C CNN
+F 2 "0805" H 11100 5550 60  0001 C CNN
+F 4 "560mA" V 11050 5900 50  0000 C CNN "I"
 	1    11100 5550
 	0    1    1    0   
 $EndComp




More information about the commitlog mailing list