umd-lhcb / pyUTM

Python library for Pcad netlist parsing and mapping generation
BSD 2-Clause "Simplified" License
1 stars 1 forks source link

Only consider unique components when net hopping #3

Closed yipengsun closed 5 years ago

yipengsun commented 5 years ago

In a true-type backplane netlist exported on Feb 08, we found some components are triplicated. For example:

  (net "JD8_JP7_EC_RESET_GPIO_1_N"
    (node "CxRB_320" "2")
    (node "CxRB_320" "2")
    (node "CxRB_320" "2")
    (node "JP7" "k3")
    ...

So far, we have tried to:

I plan to only consider the unique components so that:

> set(['CxRB_320', 'CxRB_320', 'CxRB_320'])
{'CxRB_320'}
yipengsun commented 5 years ago

From the same netlist, we see that there are 3 definitions of CxRB_320:

  (compInst "CxRB_320"
    (compRef "RESISTOR_-_1%")
    (originalName "RESISTOR_-_1%")
    (compValue "100")
    (attr "Author" "CERN DEM JLC" (textStyleRef "(Default)"))
    (attr "Case" "0402" (textStyleRef "(Default)"))
    (attr "Component Type" "Standard" (textStyleRef "(Default)"))
    (attr "CreateDate" "12/3/2007" (textStyleRef "(Default)"))
    (attr "Database Table Name" "Resistors SMD" (textStyleRef "(Default)"))
    (attr "Description" "Resistor - 1%" (textStyleRef "(Default)"))
    (attr "HelpURL" "\\\\cern.ch\\dfs\\Applications\\Altium\\Datasheets\\R0402_Phycomp_RC0402.pdf" (textStyleRef "(Default)"))
    (attr "LatestRevisionDate" "10/17/2012" (textStyleRef "(Default)"))
    (attr "Library Name" "Resistors.DbLib" (textStyleRef "(Default)"))
    (attr "Manufacturer" "GENERIC" (textStyleRef "(Default)"))
    (attr "Manufacturer1 ComponentHeight" "0.4mm" (textStyleRef "(Default)"))
    (attr "Manufacturer1 Example" "YAGEO PHYCOMP" (textStyleRef "(Default)"))
    (attr "Manufacturer1 Part Number" "232270671001L" (textStyleRef "(Default)"))
    (attr "Manufacturer Part Number" "R0402_100R_1%_0.0625W_100PPM" (textStyleRef "(Default)"))
    (attr "Mounted" "Yes" (textStyleRef "(Default)"))
    (attr "Part Description" "General Purpose Thick Film Chip Resistor" (textStyleRef "(Default)"))
    (attr "Part Number" "R0402_100R_1%_0.0625W_100PPM" (textStyleRef "(Default)"))
    (attr "Pin Count" "2" (textStyleRef "(Default)"))
    (attr "Power" "0.0625W" (textStyleRef "(Default)"))
    (attr "PressFit" "No" (textStyleRef "(Default)"))
    (attr "Sense" "No" (textStyleRef "(Default)"))
    (attr "SMD" "Yes" (textStyleRef "(Default)"))
    (attr "Socket" "No" (textStyleRef "(Default)"))
    (attr "Status" "Not recommended" (textStyleRef "(Default)"))
    (attr "TC" "?100ppm/?C" (textStyleRef "(Default)"))
    (attr "Tolerance" "?1%" (textStyleRef "(Default)"))
    (attr "Sheet" "Pigtail_Conns_7" (textStyleRef "(Default)"))
  )
  (compInst "CxRB_320"
    (compRef "RESISTOR_-_1%")
    (originalName "RESISTOR_-_1%")
    (compValue "100")
    (attr "Author" "CERN DEM JLC" (textStyleRef "(Default)"))
    (attr "Case" "0402" (textStyleRef "(Default)"))
    (attr "Component Type" "Standard" (textStyleRef "(Default)"))
    (attr "CreateDate" "12/3/2007" (textStyleRef "(Default)"))
    (attr "Database Table Name" "Resistors SMD" (textStyleRef "(Default)"))
    (attr "Description" "Resistor - 1%" (textStyleRef "(Default)"))
    (attr "HelpURL" "\\\\cern.ch\\dfs\\Applications\\Altium\\Datasheets\\R0402_Phycomp_RC0402.pdf" (textStyleRef "(Default)"))
    (attr "LatestRevisionDate" "10/17/2012" (textStyleRef "(Default)"))
    (attr "Library Name" "Resistors.DbLib" (textStyleRef "(Default)"))
    (attr "Manufacturer" "GENERIC" (textStyleRef "(Default)"))
    (attr "Manufacturer1 ComponentHeight" "0.4mm" (textStyleRef "(Default)"))
    (attr "Manufacturer1 Example" "YAGEO PHYCOMP" (textStyleRef "(Default)"))
    (attr "Manufacturer1 Part Number" "232270671001L" (textStyleRef "(Default)"))
    (attr "Manufacturer Part Number" "R0402_100R_1%_0.0625W_100PPM" (textStyleRef "(Default)"))
    (attr "Mounted" "Yes" (textStyleRef "(Default)"))
    (attr "Part Description" "General Purpose Thick Film Chip Resistor" (textStyleRef "(Default)"))
    (attr "Part Number" "R0402_100R_1%_0.0625W_100PPM" (textStyleRef "(Default)"))
    (attr "Pin Count" "2" (textStyleRef "(Default)"))
    (attr "Power" "0.0625W" (textStyleRef "(Default)"))
    (attr "PressFit" "No" (textStyleRef "(Default)"))
    (attr "Sense" "No" (textStyleRef "(Default)"))
    (attr "SMD" "Yes" (textStyleRef "(Default)"))
    (attr "Socket" "No" (textStyleRef "(Default)"))
    (attr "Status" "Not recommended" (textStyleRef "(Default)"))
    (attr "TC" "?100ppm/?C" (textStyleRef "(Default)"))
    (attr "Tolerance" "?1%" (textStyleRef "(Default)"))
    (attr "Sheet" "Pigtail_Conns_7" (textStyleRef "(Default)"))
  )
  (compInst "CxRB_320"
    (compRef "CAPACITOR_-_NON_POLARIZED")
    (originalName "CAPACITOR_-_NON_POLARIZED")
    (compValue "47nF")
    (attr "Author" "CERN DEM JLC" (textStyleRef "(Default)"))
    (attr "Case" "0402" (textStyleRef "(Default)"))
    (attr "Component Type" "Standard" (textStyleRef "(Default)"))
    (attr "CreateDate" "12/3/2007" (textStyleRef "(Default)"))
    (attr "Database Table Name" "Capacitors SMD" (textStyleRef "(Default)"))
    (attr "Description" "Non-polarised capacitor" (textStyleRef "(Default)"))
    (attr "HelpURL" "\\\\cern.ch\\dfs\\Applications\\Altium\\Datasheets\\CC0402_X7R_PHYCOMP.pdf" (textStyleRef "(Default)"))
    (attr "LatestRevisionDate" "12/3/2007" (textStyleRef "(Default)"))
    (attr "Library Name" "Capacitors.DbLib" (textStyleRef "(Default)"))
    (attr "Manufacturer" "GENERIC" (textStyleRef "(Default)"))
    (attr "Manufacturer1 ComponentHeight" "0.55mm" (textStyleRef "(Default)"))
    (attr "Manufacturer1 Example" "PHYCOMP" (textStyleRef "(Default)"))
    (attr "Manufacturer1 Part Number" "223878715645" (textStyleRef "(Default)"))
    (attr "Manufacturer Part Number" "CC0402_47NF_16V_10%_X7R" (textStyleRef "(Default)"))
    (attr "Mounted" "Yes" (textStyleRef "(Default)"))
    (attr "Part Description" "SMD Multilayer Chip Ceramic Capacitor" (textStyleRef "(Default)"))
    (attr "Part Number" "CC0402_47NF_16V_10%_X7R" (textStyleRef "(Default)"))
    (attr "Pin Count" "2" (textStyleRef "(Default)"))
    (attr "Sense" "No" (textStyleRef "(Default)"))
    (attr "SMD" "Yes" (textStyleRef "(Default)"))
    (attr "Socket" "No" (textStyleRef "(Default)"))
    (attr "Status" "Not Recommended" (textStyleRef "(Default)"))
    (attr "TC" "X7R" (textStyleRef "(Default)"))
    (attr "Tolerance" "?10%" (textStyleRef "(Default)"))
    (attr "Voltage" "16V" (textStyleRef "(Default)"))
    (attr "Sheet" "Pigtail_Conns_7" (textStyleRef "(Default)"))
  )
CoffeeIntoScience commented 5 years ago

This does seem to be a glitch in the pcad netlist exporter when variants use part swapping. If I take the offending project, delete the variants, and re-export it I see no such triplication.