]> rtime.felk.cvut.cz Git - fpga/zynq/canbench-hw.git/commitdiff
added BOM, schematic changes (present in RevA)
authorMartin Jerabek <jerabma7@fel.cvut.cz>
Fri, 6 May 2016 08:30:03 +0000 (10:30 +0200)
committerMartin Jerabek <jerabma7@fel.cvut.cz>
Fri, 6 May 2016 08:30:03 +0000 (10:30 +0200)
can-interface.sch
can.sch
canbench-BOM.ods [new file with mode: 0644]
xsl/bom2groupedCsv.xsl [new file with mode: 0644]

index 7c0ff7cae59db3b00029c1a6cc852d436ec8ca42..70eeb9ebe58c796a7af0e9f854def67cf3e9295b 100644 (file)
@@ -105,7 +105,7 @@ AR Path="/56EC20E2/5713CFE4/56F326CC/56E6BD6C" Ref="U8"  Part="1"
 AR Path="/56EC20E2/5713CFE4/570971DE/56E6BD6C" Ref="U9"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/57098102/56E6BD6C" Ref="U10"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/5709853A/56E6BD6C" Ref="U11"  Part="1" 
-F 0 "U9" H 1400 1800 50  0000 L CNN
+F 0 "U8" H 1400 1800 50  0000 L CNN
 F 1 "MCP2562FD" H 1900 1800 50  0000 L CNN
 F 2 "SMD_Packages:SOIC-8-N" H 1800 1450 50  0001 C CIN
 F 3 "" H 1800 1450 50  0000 C CNN
@@ -124,7 +124,7 @@ AR Path="/56EC20E2/5713CFE4/56F326CC/56E6C777" Ref="#PWR094"  Part="1"
 AR Path="/56EC20E2/5713CFE4/570971DE/56E6C777" Ref="#PWR0102"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/57098102/56E6C777" Ref="#PWR0110"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/5709853A/56E6C777" Ref="#PWR0118"  Part="1" 
-F 0 "#PWR0118" H 1800 1650 50  0001 C CNN
+F 0 "#PWR094" H 1800 1650 50  0001 C CNN
 F 1 "GND" H 1800 1750 50  0000 C CNN
 F 2 "" H 1800 1900 50  0000 C CNN
 F 3 "" H 1800 1900 50  0000 C CNN
@@ -143,7 +143,7 @@ AR Path="/56EC20E2/5713CFE4/56F326CC/56E6C797" Ref="#PWR095"  Part="1"
 AR Path="/56EC20E2/5713CFE4/570971DE/56E6C797" Ref="#PWR0103"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/57098102/56E6C797" Ref="#PWR0111"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/5709853A/56E6C797" Ref="#PWR0119"  Part="1" 
-F 0 "#PWR0119" H 1800 800 50  0001 C CNN
+F 0 "#PWR095" H 1800 800 50  0001 C CNN
 F 1 "+5V" H 1800 1090 50  0000 C CNN
 F 2 "" H 1800 950 50  0000 C CNN
 F 3 "" H 1800 950 50  0000 C CNN
@@ -162,7 +162,7 @@ AR Path="/56EC20E2/5713CFE4/56F326CC/56E6C88E" Ref="C24"  Part="1"
 AR Path="/56EC20E2/5713CFE4/570971DE/56E6C88E" Ref="C26"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/57098102/56E6C88E" Ref="C28"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/5709853A/56E6C88E" Ref="C30"  Part="1" 
-F 0 "C26" H 3975 1350 50  0000 L CNN
+F 0 "C24" H 3975 1350 50  0000 L CNN
 F 1 "100n" H 3975 1150 50  0000 L CNN
 F 2 "Capacitors_SMD:C_0805_HandSoldering" H 3988 1100 50  0001 C CNN
 F 3 "" H 3950 1250 50  0000 C CNN
@@ -181,7 +181,7 @@ AR Path="/56EC20E2/5713CFE4/56F326CC/56E6CBF0" Ref="#PWR096"  Part="1"
 AR Path="/56EC20E2/5713CFE4/570971DE/56E6CBF0" Ref="#PWR0104"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/57098102/56E6CBF0" Ref="#PWR0112"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/5709853A/56E6CBF0" Ref="#PWR0120"  Part="1" 
-F 0 "#PWR0120" H 3950 850 50  0001 C CNN
+F 0 "#PWR096" H 3950 850 50  0001 C CNN
 F 1 "+5V" H 3950 1140 50  0000 C CNN
 F 2 "" H 3950 1000 50  0000 C CNN
 F 3 "" H 3950 1000 50  0000 C CNN
@@ -200,7 +200,7 @@ AR Path="/56EC20E2/5713CFE4/56F326CC/56E6CC07" Ref="#PWR097"  Part="1"
 AR Path="/56EC20E2/5713CFE4/570971DE/56E6CC07" Ref="#PWR0105"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/57098102/56E6CC07" Ref="#PWR0113"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/5709853A/56E6CC07" Ref="#PWR0121"  Part="1" 
-F 0 "#PWR0121" H 3950 1250 50  0001 C CNN
+F 0 "#PWR097" H 3950 1250 50  0001 C CNN
 F 1 "GND" H 3950 1350 50  0000 C CNN
 F 2 "" H 3950 1500 50  0000 C CNN
 F 3 "" H 3950 1500 50  0000 C CNN
@@ -219,7 +219,7 @@ AR Path="/56EC20E2/5713CFE4/56F326CC/56E6CD41" Ref="C25"  Part="1"
 AR Path="/56EC20E2/5713CFE4/570971DE/56E6CD41" Ref="C27"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/57098102/56E6CD41" Ref="C29"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/5709853A/56E6CD41" Ref="C31"  Part="1" 
-F 0 "C27" H 4375 1350 50  0000 L CNN
+F 0 "C25" H 4375 1350 50  0000 L CNN
 F 1 "100n" H 4375 1150 50  0000 L CNN
 F 2 "Capacitors_SMD:C_0805_HandSoldering" H 4388 1100 50  0001 C CNN
 F 3 "" H 4350 1250 50  0000 C CNN
@@ -238,7 +238,7 @@ AR Path="/56EC20E2/5713CFE4/56F326CC/56E6CD72" Ref="#PWR098"  Part="1"
 AR Path="/56EC20E2/5713CFE4/570971DE/56E6CD72" Ref="#PWR0106"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/57098102/56E6CD72" Ref="#PWR0114"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/5709853A/56E6CD72" Ref="#PWR0122"  Part="1" 
-F 0 "#PWR0122" H 4350 1250 50  0001 C CNN
+F 0 "#PWR098" H 4350 1250 50  0001 C CNN
 F 1 "GND" H 4350 1350 50  0000 C CNN
 F 2 "" H 4350 1500 50  0000 C CNN
 F 3 "" H 4350 1500 50  0000 C CNN
@@ -261,7 +261,7 @@ AR Path="/56EC20E2/5713CFE4/56F326CC/56E8A2EB" Ref="#PWR099"  Part="1"
 AR Path="/56EC20E2/5713CFE4/570971DE/56E8A2EB" Ref="#PWR0107"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/57098102/56E8A2EB" Ref="#PWR0115"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/5709853A/56E8A2EB" Ref="#PWR0123"  Part="1" 
-F 0 "#PWR0123" H 1100 850 50  0001 C CNN
+F 0 "#PWR099" H 1100 850 50  0001 C CNN
 F 1 "VCCIO_35" H 1100 1150 50  0000 C CNN
 F 2 "" H 1100 1000 50  0000 C CNN
 F 3 "" H 1100 1000 50  0000 C CNN
@@ -280,7 +280,7 @@ AR Path="/56EC20E2/5713CFE4/56F326CC/56E8F0C0" Ref="#PWR0100"  Part="1"
 AR Path="/56EC20E2/5713CFE4/570971DE/56E8F0C0" Ref="#PWR0108"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/57098102/56E8F0C0" Ref="#PWR0116"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/5709853A/56E8F0C0" Ref="#PWR0124"  Part="1" 
-F 0 "#PWR0124" H 4350 850 50  0001 C CNN
+F 0 "#PWR0100" H 4350 850 50  0001 C CNN
 F 1 "VCCIO_35" H 4350 1150 50  0000 C CNN
 F 2 "" H 4350 1000 50  0000 C CNN
 F 3 "" H 4350 1000 50  0000 C CNN
@@ -343,7 +343,7 @@ AR Path="/56EC20E2/5713CFE4/56F326CC/5709272B" Ref="#PWR0101"  Part="1"
 AR Path="/56EC20E2/5713CFE4/570971DE/5709272B" Ref="#PWR0109"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/57098102/5709272B" Ref="#PWR0117"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/5709853A/5709272B" Ref="#PWR0125"  Part="1" 
-F 0 "#PWR0125" H 7350 1750 50  0001 C CNN
+F 0 "#PWR0101" H 7350 1750 50  0001 C CNN
 F 1 "GND" H 7350 1850 50  0000 C CNN
 F 2 "" H 7350 2000 50  0000 C CNN
 F 3 "" H 7350 2000 50  0000 C CNN
@@ -362,7 +362,7 @@ AR Path="/56EC20E2/5713CFE4/56F326CC/57092E6D" Ref="JP6"  Part="1"
 AR Path="/56EC20E2/5713CFE4/570971DE/57092E6D" Ref="JP9"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/57098102/57092E6D" Ref="JP12"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/5709853A/57092E6D" Ref="JP15"  Part="1" 
-F 0 "JP9" H 6050 1530 50  0000 C CNN
+F 0 "JP6" H 6050 1530 50  0000 C CNN
 F 1 "Jumper_NC_Small" H 6060 1390 50  0001 C CNN
 F 2 "footprints:Pin_Header_Straight_1x02" H 6050 1450 50  0001 C CNN
 F 3 "" H 6050 1450 50  0000 C CNN
@@ -381,8 +381,8 @@ AR Path="/56EC20E2/5713CFE4/56F326CC/5709312A" Ref="R11"  Part="1"
 AR Path="/56EC20E2/5713CFE4/570971DE/5709312A" Ref="R14"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/57098102/5709312A" Ref="R17"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/5709853A/5709312A" Ref="R20"  Part="1" 
-F 0 "R14" V 6130 1800 50  0000 C CNN
-F 1 "120R" V 6050 1800 50  0000 C CNN
+F 0 "R11" V 6130 1800 50  0000 C CNN
+F 1 "120R 250mW" V 5950 1800 50  0000 C CNN
 F 2 "Resistors_SMD:R_0805_HandSoldering" V 5980 1800 50  0001 C CNN
 F 3 "" H 6050 1800 50  0000 C CNN
        1    6050 1800
@@ -400,7 +400,7 @@ AR Path="/56EC20E2/5713CFE4/56F326CC/57093CFD" Ref="JP4"  Part="1"
 AR Path="/56EC20E2/5713CFE4/570971DE/57093CFD" Ref="JP7"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/57098102/57093CFD" Ref="JP10"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/5709853A/57093CFD" Ref="JP13"  Part="1" 
-F 0 "JP7" H 2850 1630 50  0000 C CNN
+F 0 "JP4" H 2850 1630 50  0000 C CNN
 F 1 "Jumper_NO_Small" H 2860 1490 50  0001 C CNN
 F 2 "footprints:Pin_Header_Straight_1x02" H 2850 1550 50  0001 C CNN
 F 3 "" H 2850 1550 50  0000 C CNN
@@ -421,7 +421,7 @@ AR Path="/56EC20E2/5713CFE4/56F326CC/5709431A" Ref="JP5"  Part="1"
 AR Path="/56EC20E2/5713CFE4/570971DE/5709431A" Ref="JP8"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/57098102/5709431A" Ref="JP11"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/5709853A/5709431A" Ref="JP14"  Part="1" 
-F 0 "JP8" H 2850 1430 50  0000 C CNN
+F 0 "JP5" H 2850 1430 50  0000 C CNN
 F 1 "Jumper_NO_Small" H 2860 1290 50  0001 C CNN
 F 2 "footprints:Pin_Header_Straight_1x02" H 2850 1350 50  0001 C CNN
 F 3 "" H 2850 1350 50  0000 C CNN
@@ -446,7 +446,7 @@ AR Path="/56EC20E2/5713CFE4/56F326CC/570FA364" Ref="J1"  Part="1"
 AR Path="/56EC20E2/5713CFE4/570971DE/570FA364" Ref="J2"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/57098102/570FA364" Ref="J3"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/5709853A/570FA364" Ref="J4"  Part="1" 
-F 0 "J2" H 8000 2050 50  0000 C CNN
+F 0 "J1" H 8000 2050 50  0000 C CNN
 F 1 "DB9" H 8000 950 50  0000 C CNN
 F 2 "conn_DBxx:DB9FU_small" H 8000 1500 50  0001 C CNN
 F 3 "" H 8000 1500 50  0000 C CNN
@@ -494,9 +494,9 @@ AR Path="/56EC20E2/5713CFE4/56F326CC/57123D2D" Ref="R12"  Part="1"
 AR Path="/56EC20E2/5713CFE4/570971DE/57123D2D" Ref="R15"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/57098102/57123D2D" Ref="R18"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/5709853A/57123D2D" Ref="R21"  Part="1" 
-F 0 "R15" V 6730 1150 50  0000 C CNN
-F 1 "0R" V 6650 1150 50  0000 C CNN
-F 2 "Resistors_SMD:R_0805_HandSoldering" V 6580 1150 50  0001 C CNN
+F 0 "R12" V 6730 1150 50  0000 C CNN
+F 1 "0R 250mW" V 6550 1150 50  0000 C CNN
+F 2 "Resistors_SMD:R_1206_HandSoldering" V 6580 1150 50  0001 C CNN
 F 3 "" H 6650 1150 50  0000 C CNN
        1    6650 1150
        0    1    1    0   
@@ -513,9 +513,9 @@ AR Path="/56EC20E2/5713CFE4/56F326CC/57123DAF" Ref="R13"  Part="1"
 AR Path="/56EC20E2/5713CFE4/570971DE/57123DAF" Ref="R16"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/57098102/57123DAF" Ref="R19"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/5709853A/57123DAF" Ref="R22"  Part="1" 
-F 0 "R16" V 6730 2150 50  0000 C CNN
-F 1 "0R" V 6650 2150 50  0000 C CNN
-F 2 "Resistors_SMD:R_0805_HandSoldering" V 6580 2150 50  0001 C CNN
+F 0 "R13" V 6550 2150 50  0000 C CNN
+F 1 "0R 250mW" V 6750 2150 50  0000 C CNN
+F 2 "Resistors_SMD:R_1206_HandSoldering" V 6580 2150 50  0001 C CNN
 F 3 "" H 6650 2150 50  0000 C CNN
        1    6650 2150
        0    1    1    0   
@@ -546,7 +546,7 @@ AR Path="/56EC20E2/5713CFE4/56F326CC/57122F04" Ref="T1"  Part="1"
 AR Path="/56EC20E2/5713CFE4/570971DE/57122F04" Ref="T2"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/57098102/57122F04" Ref="T3"  Part="1" 
 AR Path="/56EC20E2/5713CFE4/5709853A/57122F04" Ref="T4"  Part="1" 
-F 0 "T2" H 6650 1900 50  0000 C CNN
+F 0 "T1" H 6650 1900 50  0000 C CNN
 F 1 "DPWC1206-XXX" H 6650 1350 50  0000 C CNN
 F 2 "footprints:Choke_Dual_1206_HandSoldering_RCOMP" H 6650 1650 50  0001 C CNN
 F 3 "" H 6650 1650 50  0000 C CNN
diff --git a/can.sch b/can.sch
index fa9a8d2282f758375e4bf6b571abd625dabf62bd..0cfbac1ba42d3602bc7a7ccefd08629366caa471 100644 (file)
--- a/can.sch
+++ b/can.sch
@@ -241,7 +241,7 @@ L R R9
 U 1 1 570A351E
 P 5200 1050
 F 0 "R9" V 5280 1050 50  0000 C CNN
-F 1 "120R" V 5200 1050 50  0000 C CNN
+F 1 "120R 250mW" V 5100 1050 50  0000 C CNN
 F 2 "Resistors_SMD:R_0805_HandSoldering" V 5130 1050 50  0001 C CNN
 F 3 "" H 5200 1050 50  0000 C CNN
        1    5200 1050
@@ -261,8 +261,8 @@ $Comp
 L R R10
 U 1 1 5707BAE6
 P 5200 1300
-F 0 "R10" V 5280 1300 50  0000 C CNN
-F 1 "120R" V 5200 1300 50  0000 C CNN
+F 0 "R10" V 5100 1300 50  0000 C CNN
+F 1 "120R 250mW" V 5300 1300 50  0000 C CNN
 F 2 "Resistors_SMD:R_0805_HandSoldering" V 5130 1300 50  0001 C CNN
 F 3 "" H 5200 1300 50  0000 C CNN
        1    5200 1300
diff --git a/canbench-BOM.ods b/canbench-BOM.ods
new file mode 100644 (file)
index 0000000..54754ac
Binary files /dev/null and b/canbench-BOM.ods differ
diff --git a/xsl/bom2groupedCsv.xsl b/xsl/bom2groupedCsv.xsl
new file mode 100644 (file)
index 0000000..b230b5b
--- /dev/null
@@ -0,0 +1,94 @@
+<!--XSL style sheet to convert EESCHEMA XML Partlist Format to grouped CSV BOM Format
+    Copyright (C) 2014, Wolf Walter.
+    Copyright (C) 2013, Stefan Helmert.
+    GPL v2.
+
+       Functionality:
+               Generation of Digi-Key ordering system compatible BOM 
+
+    How to use this is explained in eeschema.pdf chapter 14.  You enter a command line into the
+    netlist exporter using a new (custom) tab in the netlist export dialog.  The command is
+        on Windows:
+            xsltproc -o "%O.csv" "pathToFile\bom2groupedCsv.xsl" "%I"
+        on Linux:
+            xsltproc -o %O.csv pathToFile/bom2groupedCsv.xsl %I
+-->
+
+<!DOCTYPE xsl:stylesheet [
+  <!ENTITY nl  "&#xd;&#xa;">    <!--new line CR, LF, or LF, your choice -->
+]>
+
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions">
+       <xsl:output method="text"/>
+
+       <!-- for Muenchian grouping of footprint and value combination -->
+       <xsl:key name="partTypeByValueAndFootprint" match="comp" use="concat(footprint, '-', value)" />
+
+       <!-- for table head and empty table fields-->
+       <xsl:key name="headentr" match="field" use="@name"/>
+
+           <!-- main part -->
+       <xsl:template match="/export">
+           <xsl:text>Reference, Quantity, Value, Footprint</xsl:text>
+           <xsl:text>, Datasheet</xsl:text>
+
+           <!-- find all existing table head entries and list each one once -->
+           <xsl:for-each select="components/comp/fields/field[generate-id(.) = generate-id(key('headentr',@name)[1])]">
+               <xsl:text>, </xsl:text>
+               <xsl:value-of select="@name"/>
+           </xsl:for-each>
+
+           <!-- all table entries -->
+           <xsl:apply-templates select="components"/>
+       </xsl:template>
+
+       <xsl:template match="components">
+           <!-- for Muenchian grouping of footprint and value combination -->
+           <xsl:for-each select="comp[count(. | key('partTypeByValueAndFootprint', concat(footprint, '-', value))[1]) = 1]">
+               <xsl:sort select="concat(@ref, '|', value/text())" />
+               <xsl:text>&nl;</xsl:text>
+               <!-- list of all references -->
+               <xsl:for-each select="key('partTypeByValueAndFootprint', concat(footprint, '-', value))">
+                       <xsl:sort select="number(substring(@ref, 2))" data-type="number" />
+                       <xsl:value-of select="@ref"/><xsl:text> </xsl:text>
+               </xsl:for-each><xsl:text>,</xsl:text>
+               <!-- quantity of parts with same footprint and value -->
+               <xsl:value-of select="count(key('partTypeByValueAndFootprint', concat(footprint, '-', value)))"/><xsl:text>,</xsl:text>
+               <xsl:value-of select="value"/><xsl:text>,</xsl:text>
+               <xsl:value-of select="footprint"/>
+               <xsl:text>,</xsl:text><xsl:value-of select="datasheet"/>
+               <xsl:apply-templates select="fields"/>
+           </xsl:for-each>
+       </xsl:template>
+
+        <!-- table entries with dynamic table head -->
+       <xsl:template match="fields">
+
+           <!-- remember current fields section -->
+           <xsl:variable name="fieldvar" select="field"/>
+
+           <!-- for all existing head entries -->
+           <xsl:for-each select="/export/components/comp/fields/field[generate-id(.) = generate-id(key('headentr',@name)[1])]">
+               <xsl:variable name="allnames" select="@name"/>
+               <xsl:text>,</xsl:text>
+
+               <!-- for all field entries in the remembered fields section -->
+               <xsl:for-each select="$fieldvar">
+
+                   <!-- only if this field entry exists in this fields section -->
+                   <xsl:if test="@name=$allnames">
+                       <!-- content of the field -->
+                       <xsl:text>"</xsl:text>
+                       <xsl:value-of select="."/>
+                       <xsl:text>"</xsl:text>
+                   </xsl:if>
+                   <!--
+                       If it does not exist, use an empty cell in output for this row.
+                       Every non-blank entry is assigned to its proper column.
+                   -->
+               </xsl:for-each>
+           </xsl:for-each>
+       </xsl:template>
+
+ </xsl:stylesheet>