From 81ecccb21ce9879f1eead1e5209e6ba5a43ba4bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Treffenst=C3=A4dt?= Date: Fri, 22 Nov 2024 23:26:31 +0000 Subject: [PATCH] Fixed: Fewer ERC items for pin connection conflicts in larger set of conflicting pins --- eeschema/erc/erc.cpp | 118 +- eeschema/erc/erc_settings.cpp | 16 + eeschema/erc/erc_settings.h | 38 + .../erc_multiple_pin_to_pin.kicad_pro | 384 ++++ .../erc_multiple_pin_to_pin.kicad_sch | 1811 +++++++++++++++++ qa/tests/eeschema/CMakeLists.txt | 1 + .../erc/test_erc_multiple_pin_to_pin.cpp | 78 + .../eeschema/erc/test_erc_stacking_pins.cpp | 5 +- 8 files changed, 2434 insertions(+), 17 deletions(-) create mode 100644 qa/data/eeschema/erc_multiple_pin_to_pin.kicad_pro create mode 100644 qa/data/eeschema/erc_multiple_pin_to_pin.kicad_sch create mode 100644 qa/tests/eeschema/erc/test_erc_multiple_pin_to_pin.cpp diff --git a/eeschema/erc/erc.cpp b/eeschema/erc/erc.cpp index 9a2e3c5cf5..99b1142c06 100644 --- a/eeschema/erc/erc.cpp +++ b/eeschema/erc/erc.cpp @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #include @@ -888,6 +889,7 @@ int ERC_TESTER::TestPinToPin() for( const std::pair> net : m_nets ) { + using iterator_t = std::vector::iterator; std::vector pins; std::unordered_map pinToScreenMap; bool has_noconnect = false; @@ -940,6 +942,9 @@ int ERC_TESTER::TestPinToPin() } } + std::vector> pin_mismatches; + std::map pin_mismatch_counts; + for( auto refIt = pins.begin(); refIt != pins.end(); ++refIt ) { ERC_SCH_PIN_CONTEXT& refPin = *refIt; @@ -986,25 +991,112 @@ int ERC_TESTER::TestPinToPin() if( erc != PIN_ERROR::OK && m_settings.IsTestEnabled( ERCE_PIN_TO_PIN_WARNING ) ) { - std::shared_ptr ercItem = - ERC_ITEM::Create( erc == PIN_ERROR::WARNING ? ERCE_PIN_TO_PIN_WARNING : - ERCE_PIN_TO_PIN_ERROR ); - ercItem->SetItems( refPin.Pin(), testPin.Pin() ); - ercItem->SetSheetSpecificPath( refPin.Sheet() ); - ercItem->SetItemsSheetPaths( refPin.Sheet(), testPin.Sheet() ); + pin_mismatches.emplace_back( + std::tuple{ refIt, testIt, erc } ); - ercItem->SetErrorMessage( - wxString::Format( _( "Pins of type %s and %s are connected" ), - ElectricalPinTypeGetText( refType ), - ElectricalPinTypeGetText( testType ) ) ); + if( m_settings.GetERCSortingMetric() == ERC_PIN_SORTING_METRIC::SM_HEURISTICS ) + { + pin_mismatch_counts[refIt] = + m_settings.GetPinTypeWeight( ( *refIt ).Pin()->GetType() ); - SCH_MARKER* marker = new SCH_MARKER( ercItem, refPin.Pin()->GetPosition() ); - pinToScreenMap[refPin.Pin()]->Append( marker ); - errors++; + pin_mismatch_counts[testIt] = + m_settings.GetPinTypeWeight( ( *testIt ).Pin()->GetType() ); + } + else + { + if( !pin_mismatch_counts.contains( testIt ) ) + pin_mismatch_counts.emplace( testIt, 1 ); + else + pin_mismatch_counts[testIt]++; + + if( !pin_mismatch_counts.contains( refIt ) ) + pin_mismatch_counts.emplace( refIt, 1 ); + else + pin_mismatch_counts[refIt]++; + } } } } + std::multimap> pins_dsc; + + std::transform( pin_mismatch_counts.begin(), pin_mismatch_counts.end(), + std::inserter( pins_dsc, pins_dsc.begin() ), + []( const auto& p ) + { + return std::pair( p.second, p.first ); + } ); + + for( const auto& [amount, pinIt] : pins_dsc ) + { + if( pin_mismatches.empty() ) + break; + + SCH_PIN* pin = ( *pinIt ).Pin(); + VECTOR2I position = pin->GetPosition(); + + iterator_t nearest_pin = pins.end(); + double smallest_distance = std::numeric_limits::infinity(); + PIN_ERROR erc; + + std::erase_if( + pin_mismatches, + [&]( const auto& tuple ) + { + iterator_t other; + + if( pinIt == std::get<0>( tuple ) ) + other = std::get<1>( tuple ); + else if( pinIt == std::get<1>( tuple ) ) + other = std::get<0>( tuple ); + else + return false; + + if( ( *pinIt ).Sheet().Cmp( ( *other ).Sheet() ) != 0 ) + { + if( std::isinf( smallest_distance ) ) + { + nearest_pin = other; + erc = std::get<2>( tuple ); + } + } + else + { + double distance = position.Distance( ( *other ).Pin()->GetPosition() ); + + if( std::isinf( smallest_distance ) || distance < smallest_distance ) + { + smallest_distance = distance; + nearest_pin = other; + erc = std::get<2>( tuple ); + } + } + + return true; + } ); + + if( nearest_pin != pins.end() ) + { + SCH_PIN* other_pin = ( *nearest_pin ).Pin(); + + std::shared_ptr ercItem = + ERC_ITEM::Create( erc == PIN_ERROR::WARNING ? ERCE_PIN_TO_PIN_WARNING + : ERCE_PIN_TO_PIN_ERROR ); + ercItem->SetItems( pin, other_pin ); + ercItem->SetSheetSpecificPath( ( *pinIt ).Sheet() ); + ercItem->SetItemsSheetPaths( ( *pinIt ).Sheet(), ( *nearest_pin ).Sheet() ); + + ercItem->SetErrorMessage( + wxString::Format( _( "Pins of type %s and %s are connected" ), + ElectricalPinTypeGetText( pin->GetType() ), + ElectricalPinTypeGetText( other_pin->GetType() ) ) ); + + SCH_MARKER* marker = new SCH_MARKER( ercItem, pin->GetPosition() ); + pinToScreenMap[pin]->Append( marker ); + errors++; + } + } + if( needsDriver.Pin() && !hasDriver && !has_noconnect ) { int err_code = ispowerNet ? ERCE_POWERPIN_NOT_DRIVEN : ERCE_PIN_NOT_DRIVEN; diff --git a/eeschema/erc/erc_settings.cpp b/eeschema/erc/erc_settings.cpp index ef8632dd6a..3760a6cf7c 100644 --- a/eeschema/erc/erc_settings.cpp +++ b/eeschema/erc/erc_settings.cpp @@ -232,6 +232,22 @@ ERC_SETTINGS::ERC_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath ) : } }, {} ) ); + + // Pin weights used for sorting. Take care, sorting is descending! + m_PinTypeWeights.emplace( ELECTRICAL_PINTYPE::PT_NIC, 11 ); + m_PinTypeWeights.emplace( ELECTRICAL_PINTYPE::PT_UNSPECIFIED, 10 ); + m_PinTypeWeights.emplace( ELECTRICAL_PINTYPE::PT_PASSIVE, 9 ); + m_PinTypeWeights.emplace( ELECTRICAL_PINTYPE::PT_OPENCOLLECTOR, 8 ); + m_PinTypeWeights.emplace( ELECTRICAL_PINTYPE::PT_OPENEMITTER, 7 ); + m_PinTypeWeights.emplace( ELECTRICAL_PINTYPE::PT_INPUT, 6 ); + m_PinTypeWeights.emplace( ELECTRICAL_PINTYPE::PT_TRISTATE, 5 ); + m_PinTypeWeights.emplace( ELECTRICAL_PINTYPE::PT_BIDI, 4 ); + m_PinTypeWeights.emplace( ELECTRICAL_PINTYPE::PT_OUTPUT, 3 ); + m_PinTypeWeights.emplace( ELECTRICAL_PINTYPE::PT_POWER_IN, 2 ); + m_PinTypeWeights.emplace( ELECTRICAL_PINTYPE::PT_POWER_OUT, 1 ); + m_PinTypeWeights.emplace( ELECTRICAL_PINTYPE::PT_NC, 0 ); + + m_ERCSortingMetric = ERC_PIN_SORTING_METRIC::SM_HEURISTICS; } diff --git a/eeschema/erc/erc_settings.h b/eeschema/erc/erc_settings.h index c12739fd62..3b688bb737 100644 --- a/eeschema/erc/erc_settings.h +++ b/eeschema/erc/erc_settings.h @@ -111,6 +111,13 @@ enum class PIN_ERROR UNCONNECTED }; +/// The sorting metric used for erc resolution of multi-pin errors. +enum class ERC_PIN_SORTING_METRIC +{ + SM_HEURISTICS, + SM_VIOLATION_COUNT +}; + /// Types of drive on a net (used for legacy ERC) #define NPI 4 // Net with Pin isolated, this pin has type Not Connected and must be left N.C. #define DRV 3 // Net driven by a signal (a pin output for instance) @@ -152,6 +159,24 @@ public: void ResetPinMap(); + /** + * Get the weight for an electrical pin type. + * Used for sorting of pins in pin-to-pin erc resolution. + * @param aPinType the pin type to check + * @returns the weight for sorting + */ + int GetPinTypeWeight( ELECTRICAL_PINTYPE aPinType ) const + { + wxASSERT( static_cast( aPinType ) < ELECTRICAL_PINTYPES_TOTAL ); + return m_PinTypeWeights.at( aPinType ); + } + + /** + * Get the type of sorting metric the ERC checker should + * use to resolve multi-pin errors. + */ + ERC_PIN_SORTING_METRIC GetERCSortingMetric() const { return m_ERCSortingMetric; } + PIN_ERROR GetPinMapValue( int aFirstType, int aSecondType ) const { wxASSERT( aFirstType < ELECTRICAL_PINTYPES_TOTAL @@ -195,6 +220,19 @@ public: private: static PIN_ERROR m_defaultPinMap[ELECTRICAL_PINTYPES_TOTAL][ELECTRICAL_PINTYPES_TOTAL]; + + /** + * Weights for electrical pins used in ERC + * to decide which pin gets the marker + * in case of a multi-pin erc pin-to-pin error. + */ + std::map m_PinTypeWeights; + + /** + * The type of sorting used by the ERC checker + * to resolve multi-pin errors. + */ + ERC_PIN_SORTING_METRIC m_ERCSortingMetric; }; diff --git a/qa/data/eeschema/erc_multiple_pin_to_pin.kicad_pro b/qa/data/eeschema/erc_multiple_pin_to_pin.kicad_pro new file mode 100644 index 0000000000..ddb3cf8083 --- /dev/null +++ b/qa/data/eeschema/erc_multiple_pin_to_pin.kicad_pro @@ -0,0 +1,384 @@ +{ + "board": { + "3dviewports": [], + "ipc2581": { + "dist": "", + "distpn": "", + "internal_id": "", + "mfg": "", + "mpn": "" + }, + "layer_presets": [], + "viewports": [] + }, + "boards": [], + "cvpcb": { + "equivalence_files": [] + }, + "erc": { + "erc_exclusions": [], + "meta": { + "version": 0 + }, + "pin_map": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 2, + 0, + 1, + 0, + 0, + 1, + 0, + 2, + 2, + 2, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 2 + ], + [ + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 2, + 1, + 1, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2 + ], + [ + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 2, + 2, + 1, + 1, + 2 + ], + [ + 0, + 0, + 0, + 1, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 2, + 1, + 2, + 0, + 0, + 2, + 0, + 2, + 2, + 2, + 2 + ], + [ + 0, + 2, + 0, + 1, + 0, + 0, + 1, + 0, + 2, + 0, + 0, + 2 + ], + [ + 0, + 2, + 1, + 1, + 0, + 0, + 1, + 0, + 2, + 0, + 0, + 2 + ], + [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ] + ], + "rule_severities": { + "bus_definition_conflict": "error", + "bus_entry_needed": "error", + "bus_to_bus_conflict": "error", + "bus_to_net_conflict": "error", + "conflicting_netclasses": "error", + "different_unit_footprint": "error", + "different_unit_net": "error", + "duplicate_reference": "error", + "duplicate_sheet_names": "error", + "endpoint_off_grid": "warning", + "extra_units": "error", + "global_label_dangling": "warning", + "hier_label_mismatch": "error", + "label_dangling": "error", + "lib_symbol_issues": "warning", + "missing_bidi_pin": "warning", + "missing_input_pin": "warning", + "missing_power_pin": "error", + "missing_unit": "warning", + "multiple_net_names": "warning", + "net_not_bus_member": "warning", + "no_connect_connected": "warning", + "no_connect_dangling": "warning", + "pin_not_connected": "error", + "pin_not_driven": "error", + "pin_to_pin": "error", + "power_pin_not_driven": "error", + "similar_labels": "warning", + "simulation_model_issue": "ignore", + "unannotated": "error", + "unit_value_mismatch": "error", + "unresolved_variable": "error", + "wire_dangling": "error" + } + }, + "libraries": { + "pinned_footprint_libs": [], + "pinned_symbol_libs": [] + }, + "meta": { + "filename": "erc_multiple_pin_to_pin.kicad_pro", + "version": 1 + }, + "net_settings": { + "classes": [ + { + "bus_width": 12, + "clearance": 0.2, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "Default", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 0.2, + "via_diameter": 0.6, + "via_drill": 0.3, + "wire_width": 6 + } + ], + "meta": { + "version": 3 + }, + "net_colors": null, + "netclass_assignments": null, + "netclass_patterns": [] + }, + "pcbnew": { + "last_paths": { + "gencad": "", + "idf": "", + "netlist": "", + "plot": "", + "pos_files": "", + "specctra_dsn": "", + "step": "", + "svg": "", + "vrml": "" + }, + "page_layout_descr_file": "" + }, + "schematic": { + "annotate_start_num": 0, + "bom_export_filename": "", + "bom_fmt_presets": [], + "bom_fmt_settings": { + "field_delimiter": ",", + "keep_line_breaks": false, + "keep_tabs": false, + "name": "CSV", + "ref_delimiter": ",", + "ref_range_delimiter": "", + "string_delimiter": "\"" + }, + "bom_presets": [], + "bom_settings": { + "exclude_dnp": false, + "fields_ordered": [ + { + "group_by": false, + "label": "Reference", + "name": "Reference", + "show": true + }, + { + "group_by": true, + "label": "Value", + "name": "Value", + "show": true + }, + { + "group_by": false, + "label": "Datasheet", + "name": "Datasheet", + "show": true + }, + { + "group_by": false, + "label": "Footprint", + "name": "Footprint", + "show": true + }, + { + "group_by": false, + "label": "Qty", + "name": "${QUANTITY}", + "show": true + }, + { + "group_by": true, + "label": "DNP", + "name": "${DNP}", + "show": true + } + ], + "filter_string": "", + "group_symbols": true, + "name": "Grouped By Value", + "sort_asc": true, + "sort_field": "Reference" + }, + "connection_grid_size": 50.0, + "drawing": { + "dashed_lines_dash_length_ratio": 12.0, + "dashed_lines_gap_length_ratio": 3.0, + "default_line_thickness": 6.0, + "default_text_size": 50.0, + "field_names": [], + "intersheets_ref_own_page": false, + "intersheets_ref_prefix": "", + "intersheets_ref_short": false, + "intersheets_ref_show": false, + "intersheets_ref_suffix": "", + "junction_size_choice": 3, + "label_size_ratio": 0.375, + "operating_point_overlay_i_precision": 3, + "operating_point_overlay_i_range": "~A", + "operating_point_overlay_v_precision": 3, + "operating_point_overlay_v_range": "~V", + "overbar_offset_ratio": 1.23, + "pin_symbol_size": 25.0, + "text_offset_ratio": 0.15 + }, + "legacy_lib_dir": "", + "legacy_lib_list": [], + "meta": { + "version": 1 + }, + "net_format_name": "", + "page_layout_descr_file": "", + "plot_directory": "", + "spice_current_sheet_as_root": false, + "spice_external_command": "spice \"%I\"", + "spice_model_current_sheet_as_root": true, + "spice_save_all_currents": false, + "spice_save_all_dissipations": false, + "spice_save_all_voltages": false, + "subpart_first_id": 65, + "subpart_id_separator": 0 + }, + "sheets": [ + [ + "c9b0dfd9-0180-4a78-8afb-2260035ff793", + "" + ] + ], + "text_variables": {} +} diff --git a/qa/data/eeschema/erc_multiple_pin_to_pin.kicad_sch b/qa/data/eeschema/erc_multiple_pin_to_pin.kicad_sch new file mode 100644 index 0000000000..8e46ddfaa6 --- /dev/null +++ b/qa/data/eeschema/erc_multiple_pin_to_pin.kicad_sch @@ -0,0 +1,1811 @@ +(kicad_sch + (version 20231120) + (generator "eeschema") + (generator_version "8.0") + (uuid "c9b0dfd9-0180-4a78-8afb-2260035ff793") + (paper "A4") + (lib_symbols + (symbol "Connector_Generic:Conn_01x01" + (pin_names + (offset 1.016) hide) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "J1" + (at 2.54 1.2701 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "Conn_01x01" + (at 2.54 -1.2699 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Generic connector, single row, 01x01, script generated (kicad-library-utils/schlib/autogen/connector/)" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "connector" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_fp_filters" "Connector*:*_1x??_*" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (symbol "Conn_01x01_1_1" + (rectangle + (start -1.27 0.127) + (end 0 -0.127) + (stroke + (width 0.1524) + (type default) + ) + (fill + (type none) + ) + ) + (rectangle + (start -1.27 1.27) + (end 1.27 -1.27) + (stroke + (width 0.254) + (type default) + ) + (fill + (type background) + ) + ) + (pin unspecified line + (at -5.08 0 0) + (length 3.81) + (name "Pin_1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + ) + (symbol "power:GND" + (power) + (pin_numbers hide) + (pin_names + (offset 0) hide) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "#PWR" + (at 0 -6.35 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "GND" + (at 0 -3.81 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"GND\" , ground" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "global power" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (symbol "GND_0_1" + (polyline + (pts + (xy 0 0) (xy 0 -1.27) (xy 1.27 -1.27) (xy 0 -2.54) (xy -1.27 -1.27) (xy 0 -1.27) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "GND_1_1" + (pin power_in line + (at 0 0 270) + (length 0) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + ) + (symbol "power:PWR_FLAG" + (power) + (pin_numbers hide) + (pin_names + (offset 0) hide) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "#FLG" + (at 0 1.905 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "PWR_FLAG" + (at 0 3.81 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Special symbol for telling ERC where power comes from" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "flag power" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (symbol "PWR_FLAG_0_0" + (pin power_out line + (at 0 0 90) + (length 0) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (symbol "PWR_FLAG_0_1" + (polyline + (pts + (xy 0 0) (xy 0 1.27) (xy -1.016 1.905) (xy 0 2.54) (xy 1.016 1.905) (xy 0 1.27) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + ) + ) + (symbol "power:VCC" + (power) + (pin_numbers hide) + (pin_names + (offset 0) hide) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "#PWR" + (at 0 -3.81 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "VCC" + (at 0 3.556 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"VCC\"" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "global power" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (symbol "VCC_0_1" + (polyline + (pts + (xy -0.762 1.27) (xy 0 2.54) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0 0) (xy 0 2.54) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0 2.54) (xy 0.762 1.27) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "VCC_1_1" + (pin power_in line + (at 0 0 90) + (length 0) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + ) + ) + (junction + (at 96.52 68.58) + (diameter 0) + (color 0 0 0 0) + (uuid "0633dbac-fdd0-44b2-b5a1-5fb3e935e35c") + ) + (junction + (at 111.76 68.58) + (diameter 0) + (color 0 0 0 0) + (uuid "5a493683-f92a-42a8-8485-4380ca122dc2") + ) + (junction + (at 101.6 85.09) + (diameter 0) + (color 0 0 0 0) + (uuid "6024c909-1a40-456d-a085-047200c9087e") + ) + (junction + (at 91.44 68.58) + (diameter 0) + (color 0 0 0 0) + (uuid "614e14e8-93ec-44e0-9452-f823c5aab88f") + ) + (junction + (at 96.52 85.09) + (diameter 0) + (color 0 0 0 0) + (uuid "6a557880-3fe6-4d44-9570-deea497822e9") + ) + (junction + (at 86.36 85.09) + (diameter 0) + (color 0 0 0 0) + (uuid "6df36e97-f380-4ef9-93db-db3234cdfc59") + ) + (junction + (at 106.68 85.09) + (diameter 0) + (color 0 0 0 0) + (uuid "8387cf20-ca52-40e5-ae3f-8ef5ff88c2b1") + ) + (junction + (at 101.6 68.58) + (diameter 0) + (color 0 0 0 0) + (uuid "b3fa58a6-f0d1-4cf5-a7e6-7335ef8faa2e") + ) + (junction + (at 91.44 85.09) + (diameter 0) + (color 0 0 0 0) + (uuid "cd088a0d-116e-4180-9017-d6594842877a") + ) + (junction + (at 86.36 68.58) + (diameter 0) + (color 0 0 0 0) + (uuid "cf76f7b5-1ada-484e-8078-2a81d2561d3b") + ) + (junction + (at 111.76 85.09) + (diameter 0) + (color 0 0 0 0) + (uuid "efc41310-8076-45b3-8ae4-9c94964f63f0") + ) + (junction + (at 106.68 68.58) + (diameter 0) + (color 0 0 0 0) + (uuid "fe57e1a4-fa25-4be1-932e-feda738bb807") + ) + (wire + (pts + (xy 111.76 85.09) (xy 111.76 88.9) + ) + (stroke + (width 0) + (type default) + ) + (uuid "0d469046-c7bf-484f-9c1e-e61106a0176d") + ) + (wire + (pts + (xy 106.68 85.09) (xy 111.76 85.09) + ) + (stroke + (width 0) + (type default) + ) + (uuid "22405147-36c2-4cca-b322-1e00b2628e91") + ) + (wire + (pts + (xy 106.68 68.58) (xy 111.76 68.58) + ) + (stroke + (width 0) + (type default) + ) + (uuid "2d9e821b-9532-4d6d-86cd-b06c281526d6") + ) + (wire + (pts + (xy 106.68 85.09) (xy 106.68 88.9) + ) + (stroke + (width 0) + (type default) + ) + (uuid "33744bb7-31d6-445e-8f02-6ed4b10945f9") + ) + (wire + (pts + (xy 96.52 85.09) (xy 101.6 85.09) + ) + (stroke + (width 0) + (type default) + ) + (uuid "4e08aef3-b48e-4d48-8f86-b9eb80c8b67f") + ) + (wire + (pts + (xy 101.6 85.09) (xy 106.68 85.09) + ) + (stroke + (width 0) + (type default) + ) + (uuid "4ed15847-8044-4cff-8f6f-8c987954520e") + ) + (wire + (pts + (xy 101.6 68.58) (xy 106.68 68.58) + ) + (stroke + (width 0) + (type default) + ) + (uuid "53a3fef1-a389-45ad-a6a4-3759a6d4afac") + ) + (wire + (pts + (xy 86.36 85.09) (xy 86.36 88.9) + ) + (stroke + (width 0) + (type default) + ) + (uuid "597e7f78-e02e-455b-9103-7703eb7929e8") + ) + (wire + (pts + (xy 91.44 64.77) (xy 91.44 68.58) + ) + (stroke + (width 0) + (type default) + ) + (uuid "672614c2-e800-48b9-9f20-71d2a0993955") + ) + (wire + (pts + (xy 91.44 85.09) (xy 96.52 85.09) + ) + (stroke + (width 0) + (type default) + ) + (uuid "6f7a8653-ed41-41c9-9598-85b847fc2e54") + ) + (wire + (pts + (xy 101.6 68.58) (xy 101.6 64.77) + ) + (stroke + (width 0) + (type default) + ) + (uuid "76283adc-4501-4a76-afff-b28088c38f82") + ) + (wire + (pts + (xy 91.44 68.58) (xy 96.52 68.58) + ) + (stroke + (width 0) + (type default) + ) + (uuid "7bb392d8-b081-4027-938f-e8dd3f26b1e6") + ) + (wire + (pts + (xy 86.36 64.77) (xy 86.36 68.58) + ) + (stroke + (width 0) + (type default) + ) + (uuid "8b27f395-ca33-4b6e-9072-ff0ec0afc291") + ) + (wire + (pts + (xy 86.36 85.09) (xy 91.44 85.09) + ) + (stroke + (width 0) + (type default) + ) + (uuid "9282d83d-b343-4516-bef4-67c2849dfda0") + ) + (wire + (pts + (xy 111.76 68.58) (xy 111.76 64.77) + ) + (stroke + (width 0) + (type default) + ) + (uuid "99f4281f-92de-43cd-b14d-8b8b5464affe") + ) + (wire + (pts + (xy 96.52 68.58) (xy 101.6 68.58) + ) + (stroke + (width 0) + (type default) + ) + (uuid "a0d5e4d0-17d1-41f9-8300-1d244d7d26e5") + ) + (wire + (pts + (xy 106.68 68.58) (xy 106.68 64.77) + ) + (stroke + (width 0) + (type default) + ) + (uuid "a66717c0-415b-452d-9017-58927394bf50") + ) + (wire + (pts + (xy 101.6 85.09) (xy 101.6 88.9) + ) + (stroke + (width 0) + (type default) + ) + (uuid "a75722d2-a897-4beb-9be9-9845b5ee0207") + ) + (wire + (pts + (xy 120.65 85.09) (xy 111.76 85.09) + ) + (stroke + (width 0) + (type default) + ) + (uuid "abb8c625-3471-4db8-802a-d7aeb8db0552") + ) + (wire + (pts + (xy 120.65 68.58) (xy 111.76 68.58) + ) + (stroke + (width 0) + (type default) + ) + (uuid "b103c2b3-b5bf-4e12-9669-dc1e20859b08") + ) + (wire + (pts + (xy 96.52 85.09) (xy 96.52 88.9) + ) + (stroke + (width 0) + (type default) + ) + (uuid "cfc3f340-568c-4597-9a48-13ded87f3699") + ) + (wire + (pts + (xy 91.44 85.09) (xy 91.44 88.9) + ) + (stroke + (width 0) + (type default) + ) + (uuid "e10549e2-8281-4dad-a64a-bf06e5c6542f") + ) + (wire + (pts + (xy 86.36 68.58) (xy 91.44 68.58) + ) + (stroke + (width 0) + (type default) + ) + (uuid "e1a6c92f-245b-46bb-9fd5-11c2f26f759d") + ) + (wire + (pts + (xy 96.52 68.58) (xy 96.52 64.77) + ) + (stroke + (width 0) + (type default) + ) + (uuid "fc856079-6bc9-436e-a46c-4ffab2362859") + ) + (symbol + (lib_id "power:GND") + (at 106.68 88.9 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "187f23b9-58d1-473f-ba55-f22ee9dd0dbf") + (property "Reference" "#PWR05" + (at 106.68 95.25 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "GND" + (at 106.68 93.98 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 106.68 88.9 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 106.68 88.9 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"GND\" , ground" + (at 106.68 88.9 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "c52a2094-c449-4394-9bb9-af6d8a8818e2") + ) + (instances + (project "" + (path "/c9b0dfd9-0180-4a78-8afb-2260035ff793" + (reference "#PWR05") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:GND") + (at 111.76 88.9 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "3545a458-a38c-43c1-ab77-3b23d4e2aafd") + (property "Reference" "#PWR06" + (at 111.76 95.25 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "GND" + (at 111.76 93.98 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 111.76 88.9 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 111.76 88.9 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"GND\" , ground" + (at 111.76 88.9 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "c531f886-d1d8-40ae-af50-b8a34ab54e8d") + ) + (instances + (project "" + (path "/c9b0dfd9-0180-4a78-8afb-2260035ff793" + (reference "#PWR06") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:VCC") + (at 96.52 64.77 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "36552470-5db5-43cc-bf05-304eb0f7158a") + (property "Reference" "#PWR9" + (at 96.52 68.58 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "VCC" + (at 96.52 59.69 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 96.52 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 96.52 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"VCC\"" + (at 96.52 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "eefd8e4c-c745-4157-bfaa-5c860cb0c64e") + ) + (instances + (project "erc_multiple_pin_to_pin" + (path "/c9b0dfd9-0180-4a78-8afb-2260035ff793" + (reference "#PWR9") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:VCC") + (at 111.76 64.77 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "37a1927f-b2f4-4311-84e0-0f2e66db7bad") + (property "Reference" "#PWR12" + (at 111.76 68.58 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "VCC" + (at 111.76 59.69 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 111.76 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 111.76 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"VCC\"" + (at 111.76 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "b4caecda-6029-40f1-b96b-3a8683ede8d7") + ) + (instances + (project "erc_multiple_pin_to_pin" + (path "/c9b0dfd9-0180-4a78-8afb-2260035ff793" + (reference "#PWR12") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:GND") + (at 101.6 88.9 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "39edd33a-556d-4204-bc19-7e9219bcb168") + (property "Reference" "#PWR04" + (at 101.6 95.25 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "GND" + (at 101.6 93.98 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 101.6 88.9 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 101.6 88.9 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"GND\" , ground" + (at 101.6 88.9 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "2b351a74-af61-49a2-9289-6ad58d3c0fbd") + ) + (instances + (project "" + (path "/c9b0dfd9-0180-4a78-8afb-2260035ff793" + (reference "#PWR04") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Connector_Generic:Conn_01x01") + (at 125.73 85.09 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "3cfa213e-b01a-41f6-92ad-2e991d50d214") + (property "Reference" "J1" + (at 128.27 83.8199 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "Conn_01x01" + (at 128.27 86.3599 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 125.73 85.09 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 125.73 85.09 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Generic connector, single row, 01x01, script generated (kicad-library-utils/schlib/autogen/connector/)" + (at 125.73 85.09 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "8dd39357-b8a0-43cb-ae06-69b3802e7301") + ) + (instances + (project "" + (path "/c9b0dfd9-0180-4a78-8afb-2260035ff793" + (reference "J1") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:GND") + (at 86.36 88.9 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "3e289df7-dc13-4b08-85f8-937eeb5ec2a9") + (property "Reference" "#PWR01" + (at 86.36 95.25 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "GND" + (at 86.36 93.98 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 86.36 88.9 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 86.36 88.9 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"GND\" , ground" + (at 86.36 88.9 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "62ff4fc9-4a71-4464-9fac-e42afa3b9ae2") + ) + (instances + (project "" + (path "/c9b0dfd9-0180-4a78-8afb-2260035ff793" + (reference "#PWR01") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:GND") + (at 96.52 88.9 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "4c0ea90b-bf0a-4183-8c02-7a3eacecfbb6") + (property "Reference" "#PWR03" + (at 96.52 95.25 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "GND" + (at 96.52 93.98 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 96.52 88.9 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 96.52 88.9 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"GND\" , ground" + (at 96.52 88.9 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "c8e179d3-c0c3-42c6-bc76-fed406e43061") + ) + (instances + (project "" + (path "/c9b0dfd9-0180-4a78-8afb-2260035ff793" + (reference "#PWR03") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:VCC") + (at 106.68 64.77 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "4ededa2d-ddd2-4a2c-94ed-9ef7ac98d340") + (property "Reference" "#PWR11" + (at 106.68 68.58 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "VCC" + (at 106.68 59.69 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 106.68 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 106.68 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"VCC\"" + (at 106.68 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "9e367e1c-5ed5-413c-bafa-833cb61a8d13") + ) + (instances + (project "erc_multiple_pin_to_pin" + (path "/c9b0dfd9-0180-4a78-8afb-2260035ff793" + (reference "#PWR11") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:PWR_FLAG") + (at 86.36 68.58 90) + (mirror x) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "68d7b657-7c92-4214-a4d5-580730e0b323") + (property "Reference" "#FLG02" + (at 84.455 68.58 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "PWR_FLAG" + (at 82.55 68.5799 90) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 86.36 68.58 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 86.36 68.58 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Special symbol for telling ERC where power comes from" + (at 86.36 68.58 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "8804aaff-b77e-46f4-8d89-e3da9642c398") + ) + (instances + (project "erc_multiple_pin_to_pin" + (path "/c9b0dfd9-0180-4a78-8afb-2260035ff793" + (reference "#FLG02") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:PWR_FLAG") + (at 86.36 85.09 90) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "7219516e-3c72-4062-98b8-ac232f202f81") + (property "Reference" "#FLG01" + (at 84.455 85.09 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "PWR_FLAG" + (at 82.55 85.0899 90) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 86.36 85.09 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 86.36 85.09 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Special symbol for telling ERC where power comes from" + (at 86.36 85.09 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "b3c8106c-c3a1-458f-89b5-ca23804e4ded") + ) + (instances + (project "" + (path "/c9b0dfd9-0180-4a78-8afb-2260035ff793" + (reference "#FLG01") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:VCC") + (at 101.6 64.77 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "8ecf4d13-1bdd-4381-b913-1da6f1be91c3") + (property "Reference" "#PWR10" + (at 101.6 68.58 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "VCC" + (at 101.6 59.69 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 101.6 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 101.6 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"VCC\"" + (at 101.6 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "95134d6e-e80b-4352-9203-0e827e56de12") + ) + (instances + (project "erc_multiple_pin_to_pin" + (path "/c9b0dfd9-0180-4a78-8afb-2260035ff793" + (reference "#PWR10") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:VCC") + (at 86.36 64.77 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "a658e09d-f5f4-420d-806a-5bd64074b36a") + (property "Reference" "#PWR7" + (at 86.36 68.58 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "VCC" + (at 86.36 59.69 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 86.36 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 86.36 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"VCC\"" + (at 86.36 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "e0a7cc59-71a1-424d-aa17-d49a9daeffa9") + ) + (instances + (project "erc_multiple_pin_to_pin" + (path "/c9b0dfd9-0180-4a78-8afb-2260035ff793" + (reference "#PWR7") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:VCC") + (at 91.44 64.77 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "d0254b2a-c59b-4750-b54b-b5df46110509") + (property "Reference" "#PWR8" + (at 91.44 68.58 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "VCC" + (at 91.44 59.69 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 91.44 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 91.44 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"VCC\"" + (at 91.44 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "a6ce20e1-a567-49a5-a7c4-700a2f469fcc") + ) + (instances + (project "erc_multiple_pin_to_pin" + (path "/c9b0dfd9-0180-4a78-8afb-2260035ff793" + (reference "#PWR8") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:GND") + (at 91.44 88.9 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "ea7b49fb-5519-46d9-98f3-d1c4682336ff") + (property "Reference" "#PWR02" + (at 91.44 95.25 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "GND" + (at 91.44 93.98 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 91.44 88.9 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 91.44 88.9 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"GND\" , ground" + (at 91.44 88.9 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "d09d202a-3e95-4ba5-ae53-89ae638b398e") + ) + (instances + (project "" + (path "/c9b0dfd9-0180-4a78-8afb-2260035ff793" + (reference "#PWR02") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Connector_Generic:Conn_01x01") + (at 125.73 68.58 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "f3197d36-2dba-4c4d-8c62-b92294427599") + (property "Reference" "J2" + (at 128.27 67.3099 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "Conn_01x01" + (at 128.27 69.8499 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 125.73 68.58 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 125.73 68.58 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Generic connector, single row, 01x01, script generated (kicad-library-utils/schlib/autogen/connector/)" + (at 125.73 68.58 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "41b05516-08b7-4132-9bf9-b29e6d04ae81") + ) + (instances + (project "erc_multiple_pin_to_pin" + (path "/c9b0dfd9-0180-4a78-8afb-2260035ff793" + (reference "J2") + (unit 1) + ) + ) + ) + ) + (sheet_instances + (path "/" + (page "1") + ) + ) +) diff --git a/qa/tests/eeschema/CMakeLists.txt b/qa/tests/eeschema/CMakeLists.txt index ccfeb65a3f..b20a455360 100644 --- a/qa/tests/eeschema/CMakeLists.txt +++ b/qa/tests/eeschema/CMakeLists.txt @@ -53,6 +53,7 @@ set( QA_EESCHEMA_SRCS erc/test_erc_four_way.cpp erc/test_erc_label_not_connected.cpp + erc/test_erc_multiple_pin_to_pin.cpp erc/test_erc_stacking_pins.cpp erc/test_erc_label_names.cpp erc/test_erc_global_labels.cpp diff --git a/qa/tests/eeschema/erc/test_erc_multiple_pin_to_pin.cpp b/qa/tests/eeschema/erc/test_erc_multiple_pin_to_pin.cpp new file mode 100644 index 0000000000..b0e7c25003 --- /dev/null +++ b/qa/tests/eeschema/erc/test_erc_multiple_pin_to_pin.cpp @@ -0,0 +1,78 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2022 KiCad Developers, see AUTHORS.TXT for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one at + * http://www.gnu.org/licenses/ + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + + +struct ERC_REGRESSION_TEST_FIXTURE +{ + ERC_REGRESSION_TEST_FIXTURE() : m_settingsManager( true /* headless */ ) {} + + SETTINGS_MANAGER m_settingsManager; + std::unique_ptr m_schematic; +}; + + +BOOST_FIXTURE_TEST_CASE( ERCMultiplePinToPin, ERC_REGRESSION_TEST_FIXTURE ) +{ + LOCALE_IO dummy; + + std::vector> tests = { { "erc_multiple_pin_to_pin", 2 } }; + + for( const std::pair& test : tests ) + { + KI_TEST::LoadSchematic( m_settingsManager, test.first, m_schematic ); + + ERC_SETTINGS& settings = m_schematic->ErcSettings(); + SHEETLIST_ERC_ITEMS_PROVIDER errors( m_schematic.get() ); + + // Skip the "Modified symbol" warning + settings.m_ERCSeverities[ERCE_LIB_SYMBOL_ISSUES] = RPT_SEVERITY_IGNORE; + settings.m_ERCSeverities[ERCE_LIB_SYMBOL_MISMATCH] = RPT_SEVERITY_IGNORE; + + m_schematic->ConnectionGraph()->RunERC(); + + ERC_TESTER tester( m_schematic.get() ); + tester.TestConflictingBusAliases(); + tester.TestMultUnitPinConflicts(); + tester.TestMultiunitFootprints(); + tester.TestNoConnectPins(); + tester.TestPinToPin(); + tester.TestSimilarLabels(); + + errors.SetSeverities( RPT_SEVERITY_ERROR | RPT_SEVERITY_WARNING ); + + ERC_REPORT reportWriter( m_schematic.get(), EDA_UNITS::MILLIMETRES ); + + BOOST_CHECK_MESSAGE( errors.GetCount() == test.second, + "Expected " << test.second << " errors in " << test.first.ToStdString() + << " but got " << errors.GetCount() << "\n" + << reportWriter.GetTextReport() ); + } +} diff --git a/qa/tests/eeschema/erc/test_erc_stacking_pins.cpp b/qa/tests/eeschema/erc/test_erc_stacking_pins.cpp index f3ca962d33..b836366f81 100644 --- a/qa/tests/eeschema/erc/test_erc_stacking_pins.cpp +++ b/qa/tests/eeschema/erc/test_erc_stacking_pins.cpp @@ -47,10 +47,7 @@ BOOST_FIXTURE_TEST_CASE( ERCStackingPins, ERC_REGRESSION_TEST_FIXTURE ) // Check for Errors when stacking pins - std::vector> tests = - { - { "issue6588", 5 } - }; + std::vector> tests = { { "issue6588", 3 } }; for( const std::pair& test : tests ) {