From d8a99ea38f79412bb4123b1b9543a95b86ab8dce Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 7 Aug 2025 13:02:55 -0700 Subject: [PATCH] ADDED: New ERC test for mis-match GND pins If you have a pin with a label containing the letters "GND" in it and it is not connected to a net with a label also containing "GND" AND there is another pin on your symbol that _is_ connected to a net containing "GND", then there is a likelihood that you have accidentally mixed up your connections to the GND pin --- eeschema/erc/erc.cpp | 70 ++ eeschema/erc/erc.h | 6 + eeschema/erc/erc_item.cpp | 6 + eeschema/erc/erc_item.h | 1 + eeschema/erc/erc_settings.cpp | 1 + eeschema/erc/erc_settings.h | 1 + .../eeschema/ground_pin_test_error.kicad_pro | 592 +++++++++ .../eeschema/ground_pin_test_error.kicad_sch | 1074 ++++++++++++++++ .../eeschema/ground_pin_test_mixed.kicad_pro | 624 ++++++++++ .../eeschema/ground_pin_test_mixed.kicad_sch | 1106 +++++++++++++++++ .../ground_pin_test_no_ground_net.kicad_pro | 624 ++++++++++ .../ground_pin_test_no_ground_net.kicad_sch | 492 ++++++++ qa/data/eeschema/ground_pin_test_ok.kicad_pro | 624 ++++++++++ qa/data/eeschema/ground_pin_test_ok.kicad_sch | 636 ++++++++++ qa/tests/eeschema/CMakeLists.txt | 1 + .../eeschema/erc/test_erc_ground_pins.cpp | 438 +++++++ 16 files changed, 6296 insertions(+) create mode 100644 qa/data/eeschema/ground_pin_test_error.kicad_pro create mode 100644 qa/data/eeschema/ground_pin_test_error.kicad_sch create mode 100644 qa/data/eeschema/ground_pin_test_mixed.kicad_pro create mode 100644 qa/data/eeschema/ground_pin_test_mixed.kicad_sch create mode 100644 qa/data/eeschema/ground_pin_test_no_ground_net.kicad_pro create mode 100644 qa/data/eeschema/ground_pin_test_no_ground_net.kicad_sch create mode 100644 qa/data/eeschema/ground_pin_test_ok.kicad_pro create mode 100644 qa/data/eeschema/ground_pin_test_ok.kicad_sch create mode 100644 qa/tests/eeschema/erc/test_erc_ground_pins.cpp diff --git a/eeschema/erc/erc.cpp b/eeschema/erc/erc.cpp index fce55a160d..e8c35b095f 100644 --- a/eeschema/erc/erc.cpp +++ b/eeschema/erc/erc.cpp @@ -1231,6 +1231,73 @@ int ERC_TESTER::TestMultUnitPinConflicts() } +int ERC_TESTER::TestGroundPins() +{ + int errors = 0; + + auto isGround = []( const wxString& txt ) + { + wxString upper = txt.Upper(); + return upper.Contains( wxT( "GND" ) ); + }; + + for( const SCH_SHEET_PATH& sheet : m_sheetList ) + { + SCH_SCREEN* screen = sheet.LastScreen(); + + for( SCH_ITEM* item : screen->Items().OfType( SCH_SYMBOL_T ) ) + { + SCH_SYMBOL* symbol = static_cast( item ); + bool hasGroundNet = false; + std::vector mismatched; + + for( SCH_PIN* pin : symbol->GetPins( &sheet ) ) + { + SCH_CONNECTION* conn = pin->Connection( &sheet ); + wxString net = conn ? conn->GetNetName() : wxString(); + bool netIsGround = isGround( net ); + + // We are only interested in power pins + if( pin->GetType() != ELECTRICAL_PINTYPE::PT_POWER_OUT + && pin->GetType() != ELECTRICAL_PINTYPE::PT_POWER_IN ) + { + continue; + } + + if( netIsGround ) + hasGroundNet = true; + + if( isGround( pin->GetShownName() ) && !netIsGround ) + mismatched.push_back( pin ); + } + + if( hasGroundNet ) + { + for( SCH_PIN* pin : mismatched ) + { + std::shared_ptr ercItem = + ERC_ITEM::Create( ERCE_GROUND_PIN_NOT_GROUND ); + + ercItem->SetErrorMessage( + wxString::Format( _( "Pin %s not connected to ground net" ), + pin->GetShownName() ) ); + ercItem->SetItems( pin ); + ercItem->SetSheetSpecificPath( sheet ); + ercItem->SetItemsSheetPaths( sheet ); + + SCH_MARKER* marker = + new SCH_MARKER( std::move( ercItem ), pin->GetPosition() ); + screen->Append( marker ); + errors++; + } + } + } + } + + return errors; +} + + int ERC_TESTER::TestSameLocalGlobalLabel() { int errCount = 0; @@ -1894,6 +1961,9 @@ void ERC_TESTER::RunTests( DS_PROXY_VIEW_ITEM* aDrawingSheet, SCH_EDIT_FRAME* aE TestPinToPin(); } + if( m_settings.IsTestEnabled( ERCE_GROUND_PIN_NOT_GROUND ) ) + TestGroundPins(); + // Test similar labels (i;e. labels which are identical when // using case insensitive comparisons) if( m_settings.IsTestEnabled( ERCE_SIMILAR_LABELS ) diff --git a/eeschema/erc/erc.h b/eeschema/erc/erc.h index fe923fe304..1ef696fa35 100644 --- a/eeschema/erc/erc.h +++ b/eeschema/erc/erc.h @@ -112,6 +112,12 @@ public: */ int TestMultUnitPinConflicts(); + /** + * Checks for ground-labeled pins not on a ground net while another pin is. + * @return warning count + */ + int TestGroundPins(); + /** * Checks for global and local labels with the same name * @return the error count diff --git a/eeschema/erc/erc_item.cpp b/eeschema/erc/erc_item.cpp index 580390b925..08dd3053f8 100644 --- a/eeschema/erc/erc_item.cpp +++ b/eeschema/erc/erc_item.cpp @@ -157,6 +157,10 @@ ERC_ITEM ERC_ITEM::busToNetConflict( ERCE_BUS_TO_NET_CONFLICT, _HKI( "Invalid connection between bus and net items" ), wxT( "bus_to_net_conflict" ) ); +ERC_ITEM ERC_ITEM::groundPinNotGround( ERCE_GROUND_PIN_NOT_GROUND, + _HKI( "Ground pin not connected to ground net" ), + wxT( "ground_pin_not_ground" ) ); + ERC_ITEM ERC_ITEM::unresolvedVariable( ERCE_UNRESOLVED_VARIABLE, _HKI( "Unresolved text variable" ), wxT( "unresolved_variable" ) ); @@ -261,6 +265,7 @@ std::vector> ERC_ITEM::allItemTypes( ERC_ITEM::busToBusConflict, ERC_ITEM::busToNetConflict, ERC_ITEM::netNotBusMember, + ERC_ITEM::groundPinNotGround, ERC_ITEM::heading_misc, ERC_ITEM::unannotated, @@ -326,6 +331,7 @@ std::shared_ptr ERC_ITEM::Create( int aErrorCode ) case ERCE_BUS_ENTRY_CONFLICT: return std::make_shared( netNotBusMember ); case ERCE_BUS_TO_BUS_CONFLICT: return std::make_shared( busToBusConflict ); case ERCE_BUS_TO_NET_CONFLICT: return std::make_shared( busToNetConflict ); + case ERCE_GROUND_PIN_NOT_GROUND: return std::make_shared( groundPinNotGround ); case ERCE_LABEL_SINGLE_PIN: return std::make_shared( isolatedPinLabel ); case ERCE_UNRESOLVED_VARIABLE: return std::make_shared( unresolvedVariable ); case ERCE_UNDEFINED_NETCLASS: return std::make_shared( undefinedNetclass ); diff --git a/eeschema/erc/erc_item.h b/eeschema/erc/erc_item.h index 0b8527bea1..cbaaab9c29 100644 --- a/eeschema/erc/erc_item.h +++ b/eeschema/erc/erc_item.h @@ -226,6 +226,7 @@ private: static ERC_ITEM netNotBusMember; static ERC_ITEM busToBusConflict; static ERC_ITEM busToNetConflict; + static ERC_ITEM groundPinNotGround; static ERC_ITEM unresolvedVariable; static ERC_ITEM undefinedNetclass; static ERC_ITEM simulationModelIssues; diff --git a/eeschema/erc/erc_settings.cpp b/eeschema/erc/erc_settings.cpp index e00a4c0d1b..3d196693f3 100644 --- a/eeschema/erc/erc_settings.cpp +++ b/eeschema/erc/erc_settings.cpp @@ -102,6 +102,7 @@ ERC_SETTINGS::ERC_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath ) : m_ERCSeverities[ERCE_SIMILAR_LABEL_AND_POWER] = RPT_SEVERITY_WARNING; m_ERCSeverities[ERCE_SINGLE_GLOBAL_LABEL] = RPT_SEVERITY_IGNORE; m_ERCSeverities[ERCE_SAME_LOCAL_GLOBAL_LABEL] = RPT_SEVERITY_WARNING; + m_ERCSeverities[ERCE_GROUND_PIN_NOT_GROUND] = RPT_SEVERITY_WARNING; m_ERCSeverities[ERCE_LABEL_SINGLE_PIN] = RPT_SEVERITY_WARNING; m_ERCSeverities[ERCE_DRIVER_CONFLICT] = RPT_SEVERITY_WARNING; m_ERCSeverities[ERCE_BUS_ENTRY_CONFLICT] = RPT_SEVERITY_WARNING; diff --git a/eeschema/erc/erc_settings.h b/eeschema/erc/erc_settings.h index 1f286fbc42..fa7af8aa19 100644 --- a/eeschema/erc/erc_settings.h +++ b/eeschema/erc/erc_settings.h @@ -68,6 +68,7 @@ enum ERCE_T ///< one net. ERCE_BUS_TO_NET_CONFLICT, ///< A bus wire is graphically connected to a net port/pin ///< (or vice versa). + ERCE_GROUND_PIN_NOT_GROUND, ///< A ground-labeled pin is not on a ground net while another pin is. ERCE_LABEL_SINGLE_PIN, ///< A label is connected only to a single pin ERCE_UNRESOLVED_VARIABLE, ///< A text variable could not be resolved. ERCE_UNDEFINED_NETCLASS, ///< A netclass was referenced but not defined. diff --git a/qa/data/eeschema/ground_pin_test_error.kicad_pro b/qa/data/eeschema/ground_pin_test_error.kicad_pro new file mode 100644 index 0000000000..b0d056b29d --- /dev/null +++ b/qa/data/eeschema/ground_pin_test_error.kicad_pro @@ -0,0 +1,592 @@ +{ + "board": { + "3dviewports": [], + "design_settings": { + "defaults": { + "apply_defaults_to_fp_fields": false, + "apply_defaults_to_fp_shapes": false, + "apply_defaults_to_fp_text": false, + "board_outline_line_width": 0.09999999999999999, + "copper_line_width": 0.19999999999999998, + "copper_text_italic": false, + "copper_text_size_h": 1.5, + "copper_text_size_v": 1.5, + "copper_text_thickness": 0.3, + "copper_text_upright": false, + "courtyard_line_width": 0.049999999999999996, + "dimension_precision": 4, + "dimension_units": 3, + "dimensions": { + "arrow_length": 1270000, + "extension_offset": 500000, + "keep_text_aligned": true, + "suppress_zeroes": false, + "text_position": 0, + "units_format": 1 + }, + "fab_line_width": 0.09999999999999999, + "fab_text_italic": false, + "fab_text_size_h": 1.0, + "fab_text_size_v": 1.0, + "fab_text_thickness": 0.15, + "fab_text_upright": false, + "other_line_width": 0.15, + "other_text_italic": false, + "other_text_size_h": 1.0, + "other_text_size_v": 1.0, + "other_text_thickness": 0.15, + "other_text_upright": false, + "pads": { + "drill": 0.762, + "height": 1.524, + "width": 1.524 + }, + "silk_line_width": 0.15, + "silk_text_italic": false, + "silk_text_size_h": 1.0, + "silk_text_size_v": 1.0, + "silk_text_thickness": 0.15, + "silk_text_upright": false, + "zones": { + "min_clearance": 0.5 + } + }, + "diff_pair_dimensions": [], + "drc_exclusions": [], + "meta": { + "version": 2 + }, + "rule_severities": { + "annular_width": "error", + "clearance": "error", + "connection_width": "warning", + "copper_edge_clearance": "error", + "copper_sliver": "warning", + "courtyards_overlap": "error", + "diff_pair_gap_out_of_range": "error", + "diff_pair_uncoupled_length_too_long": "error", + "drill_out_of_range": "error", + "duplicate_footprints": "warning", + "extra_footprint": "warning", + "footprint": "error", + "footprint_symbol_mismatch": "warning", + "footprint_type_mismatch": "ignore", + "hole_clearance": "error", + "hole_near_hole": "error", + "holes_co_located": "warning", + "invalid_outline": "error", + "isolated_copper": "warning", + "item_on_disabled_layer": "error", + "items_not_allowed": "error", + "length_out_of_range": "error", + "lib_footprint_issues": "warning", + "lib_footprint_mismatch": "warning", + "malformed_courtyard": "error", + "microvia_drill_out_of_range": "error", + "missing_courtyard": "ignore", + "missing_footprint": "warning", + "net_conflict": "warning", + "npth_inside_courtyard": "ignore", + "padstack": "warning", + "pth_inside_courtyard": "ignore", + "shorting_items": "error", + "silk_edge_clearance": "warning", + "silk_over_copper": "warning", + "silk_overlap": "warning", + "skew_out_of_range": "error", + "solder_mask_bridge": "error", + "starved_thermal": "error", + "thermal_via": "error", + "through_hole_pad_without_hole": "error", + "too_many_vias": "error", + "track_dangling": "warning", + "track_width": "error", + "tracks_crossing": "error", + "unconnected_items": "error", + "unresolved_variable": "error", + "via_dangling": "warning", + "zones_intersect": "error" + }, + "rules": { + "max_error": 0.005, + "min_clearance": 0.0, + "min_connection": 0.0, + "min_copper_edge_clearance": 0.5, + "min_hole_clearance": 0.25, + "min_hole_to_hole": 0.25, + "min_microvia_diameter": 0.19999999999999998, + "min_microvia_drill": 0.09999999999999999, + "min_resolved_spokes": 2, + "min_silk_clearance": 0.0, + "min_text_height": 0.7999999999999999, + "min_text_thickness": 0.08, + "min_through_hole_diameter": 0.3, + "min_track_width": 0.0, + "min_via_annular_width": 0.09999999999999999, + "min_via_diameter": 0.5, + "solder_mask_clearance": 0.0, + "solder_mask_min_width": 0.0, + "solder_mask_to_copper_clearance": 0.0, + "use_height_for_length_calcs": true + }, + "teardrop_options": [ + { + "td_onpadsmd": true, + "td_onroundshapesonly": false, + "td_ontrackend": false, + "td_onviapad": true + } + ], + "teardrop_parameters": [ + { + "td_allow_use_two_tracks": true, + "td_curve_segcount": 0, + "td_height_ratio": 1.0, + "td_length_ratio": 0.5, + "td_maxheight": 2.0, + "td_maxlen": 1.0, + "td_on_pad_in_zone": false, + "td_target_name": "td_round_shape", + "td_width_to_size_filter_ratio": 0.9 + }, + { + "td_allow_use_two_tracks": true, + "td_curve_segcount": 0, + "td_height_ratio": 1.0, + "td_length_ratio": 0.5, + "td_maxheight": 2.0, + "td_maxlen": 1.0, + "td_on_pad_in_zone": false, + "td_target_name": "td_rect_shape", + "td_width_to_size_filter_ratio": 0.9 + }, + { + "td_allow_use_two_tracks": true, + "td_curve_segcount": 0, + "td_height_ratio": 1.0, + "td_length_ratio": 0.5, + "td_maxheight": 2.0, + "td_maxlen": 1.0, + "td_on_pad_in_zone": false, + "td_target_name": "td_track_end", + "td_width_to_size_filter_ratio": 0.9 + } + ], + "track_widths": [], + "tuning_pattern_settings": { + "diff_pair_defaults": { + "corner_radius_percentage": 80, + "corner_style": 1, + "max_amplitude": 1.0, + "min_amplitude": 0.2, + "single_sided": false, + "spacing": 1.0 + }, + "diff_pair_skew_defaults": { + "corner_radius_percentage": 80, + "corner_style": 1, + "max_amplitude": 1.0, + "min_amplitude": 0.2, + "single_sided": false, + "spacing": 0.6 + }, + "single_track_defaults": { + "corner_radius_percentage": 80, + "corner_style": 1, + "max_amplitude": 1.0, + "min_amplitude": 0.2, + "single_sided": false, + "spacing": 0.6 + } + }, + "via_dimensions": [], + "zones_allow_external_fillets": false + }, + "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, + 1, + 1, + 1, + 1, + 2 + ], + [ + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 2, + 1, + 2, + 0, + 0, + 1, + 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", + "connections_identical": "warning", + "different_unit_footprint": "error", + "different_unit_net": "error", + "different_unit_value": "error", + "duplicate_reference": "error", + "duplicate_sheet_names": "error", + "endpoint_off_grid": "warning", + "extra_units": "error", + "four_way_junction": "warning", + "global_label_dangling": "warning", + "ground_pin_not_ground": "error", + "hier_label_mismatch": "error", + "label_dangling": "error", + "label_multiple_wires": "error", + "label_single_pin": "warning", + "lib_symbol_issues": "warning", + "lib_symbol_mismatch": "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", + "power_pin_not_driven": "error", + "same_local_global_label": "warning", + "similar_labels": "warning", + "simulation_model_issue": "ignore", + "single_global_label": "warning", + "unannotated": "error", + "undefined_netclass": "warning", + "unresolved_variable": "error", + "wire_dangling": "error" + } + }, + "libraries": { + "pinned_footprint_libs": [], + "pinned_symbol_libs": [] + }, + "meta": { + "filename": "ground_pin_test.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_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": [ + [ + "12345678-1234-1234-1234-123456789abc", + "Root" + ] + ], + "text_variables": {} +} diff --git a/qa/data/eeschema/ground_pin_test_error.kicad_sch b/qa/data/eeschema/ground_pin_test_error.kicad_sch new file mode 100644 index 0000000000..597ff1f246 --- /dev/null +++ b/qa/data/eeschema/ground_pin_test_error.kicad_sch @@ -0,0 +1,1074 @@ +(kicad_sch + (version 20250610) + (generator "eeschema") + (generator_version "9.99") + (uuid "12345678-1234-1234-1234-123456789abc") + (paper "A4") + (lib_symbols + (symbol "Device:R" + (pin_numbers + (hide yes) + ) + (pin_names + (offset 0) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "R" + (at 2.032 0 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "R" + (at 0 0 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at -1.778 0 90) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "R_0_1" + (rectangle + (start -1.016 -2.54) + (end 1.016 2.54) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "R_1_1" + (pin passive line + (at 0 3.81 270) + (length 1.27) + (name "" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 0 -3.81 90) + (length 1.27) + (name "" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + (symbol "Test:Test_Symbol_GND" + (pin_numbers + (hide yes) + ) + (pin_names + (offset 0.254) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "U?" + (at 0 -2.54 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "Test_Symbol_GND" + (at 0 2.54 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "Test_Symbol_GND_0_1" + (rectangle + (start -5.08 3.81) + (end 5.08 -3.81) + (stroke + (width 0.254) + (type default) + ) + (fill + (type background) + ) + ) + ) + (symbol "Test_Symbol_GND_1_1" + (pin power_in line + (at -7.62 0 0) + (length 2.54) + (name "VCC" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin power_in line + (at 7.62 0 180) + (length 2.54) + (name "GND" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + (symbol "power:+5V" + (power global) + (pin_names + (offset 0) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "#PWR" + (at 0 -3.81 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "+5V" + (at 0 3.556 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "+5V_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 2.54) (xy 0.762 1.27) + ) + (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) + ) + ) + ) + (symbol "+5V_1_1" + (pin power_in line + (at 0 0 90) + (length 0) + (hide yes) + (name "" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + (symbol "power:GND" + (power global) + (pin_names + (offset 0) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "#PWR" + (at 0 -6.35 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "GND" + (at 0 -3.81 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (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) + (hide yes) + (name "" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + (symbol "power:PWR_FLAG" + (power global) + (pin_numbers + (hide yes) + ) + (pin_names + (offset 0) + (hide yes) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "#FLG" + (at 0 1.905 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "PWR_FLAG" + (at 0 3.81 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Special symbol for telling ERC where power comes from" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_keywords" "flag power" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (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) + ) + ) + ) + (embedded_fonts no) + ) + ) + (junction + (at 109.22 76.2) + (diameter 0) + (color 0 0 0 0) + (uuid "28993e6b-bbe8-4c93-ba9e-0a66a89a5db7") + ) + (junction + (at 129.54 76.2) + (diameter 0) + (color 0 0 0 0) + (uuid "609fdf68-8d4a-4574-b1ca-23ed4bbec90a") + ) + (junction + (at 134.62 76.2) + (diameter 0) + (color 0 0 0 0) + (uuid "af553814-2165-4dba-b9d7-ffc8a373ef96") + ) + (wire + (pts + (xy 105.41 73.66) (xy 105.41 76.2) + ) + (stroke + (width 0) + (type default) + ) + (uuid "048a4148-ed26-428f-8e92-7489c044f15b") + ) + (wire + (pts + (xy 127 76.2) (xy 129.54 76.2) + ) + (stroke + (width 0) + (type default) + ) + (uuid "558558c9-dd4c-45da-bb3b-eb3082fcedbc") + ) + (wire + (pts + (xy 134.62 76.2) (xy 134.62 83.82) + ) + (stroke + (width 0) + (type default) + ) + (uuid "7c23f0be-33a9-49d9-9c9b-633d20b0cce9") + ) + (wire + (pts + (xy 129.54 76.2) (xy 134.62 76.2) + ) + (stroke + (width 0) + (type default) + ) + (uuid "808874f5-3ae5-47ba-940a-8d7006623158") + ) + (wire + (pts + (xy 109.22 76.2) (xy 111.76 76.2) + ) + (stroke + (width 0) + (type default) + ) + (uuid "ab16eafa-de79-467f-8875-d9b970d5ed66") + ) + (wire + (pts + (xy 134.62 64.77) (xy 134.62 68.58) + ) + (stroke + (width 0) + (type default) + ) + (uuid "f33af61e-3904-4c02-af5e-c3aa8e486c1f") + ) + (wire + (pts + (xy 105.41 76.2) (xy 109.22 76.2) + ) + (stroke + (width 0) + (type default) + ) + (uuid "facfb0b7-1654-44c7-891e-906ec451c299") + ) + (symbol + (lib_id "power:PWR_FLAG") + (at 109.22 76.2 180) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "03eebd65-ebed-463a-9dd1-77e551e15a33") + (property "Reference" "#FLG01" + (at 109.22 78.105 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "PWR_FLAG" + (at 109.22 81.28 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 109.22 76.2 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 109.22 76.2 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Special symbol for telling ERC where power comes from" + (at 109.22 76.2 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "fa21ac0f-00a1-4df7-b55e-290d521e46bf") + ) + (instances + (project "" + (path "/12345678-1234-1234-1234-123456789abc" + (reference "#FLG01") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Device:R") + (at 134.62 72.39 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "327d3d8c-ca60-4e4e-a526-a01b4689b0ef") + (property "Reference" "R1" + (at 136.652 72.39 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "1k" + (at 134.62 72.39 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 132.842 72.39 90) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 134.62 72.39 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 134.62 72.39 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "af0da904-0cba-49b1-8e38-b46991b5b1ff") + ) + (pin "2" + (uuid "76daac01-8c5e-4ac1-85b3-3fedddbe3a30") + ) + (instances + (project "ground_pin_test_error" + (path "/12345678-1234-1234-1234-123456789abc" + (reference "R1") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:+5V") + (at 105.41 73.66 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (uuid "3db5cc34-fba5-4a80-8ee3-386b3535eb12") + (property "Reference" "#PWR01" + (at 105.41 69.85 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "+5V" + (at 105.41 77.216 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 105.41 73.66 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 105.41 73.66 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 105.41 73.66 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "4ff5eb48-d8f2-4a85-8eb6-efb5b3bc134c") + ) + (instances + (project "ground_pin_test_error" + (path "/12345678-1234-1234-1234-123456789abc" + (reference "#PWR01") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Test:Test_Symbol_GND") + (at 119.38 76.2 0) + (mirror y) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (uuid "48258c21-137a-4f2d-80e8-50a4ab08c135") + (property "Reference" "U1" + (at 119.38 67.31 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "Test_Symbol_GND" + (at 119.38 69.85 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 119.38 76.2 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 119.38 76.2 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 119.38 76.2 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "5806f75f-a6f0-44cd-9681-3430d858d3de") + ) + (pin "2" + (uuid "fe8ccf61-97b6-4164-8811-8c6f90f09261") + ) + (instances + (project "ground_pin_test_error" + (path "/12345678-1234-1234-1234-123456789abc" + (reference "U1") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:+5V") + (at 134.62 64.77 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (uuid "ca747ea5-d719-4106-8f62-49820c59ac7c") + (property "Reference" "#PWR02" + (at 134.62 60.96 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "+5V" + (at 134.62 68.326 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 134.62 64.77 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 134.62 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 134.62 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "3f1e4282-bf8c-4b3d-836f-8d4ec7c97c3f") + ) + (instances + (project "ground_pin_test_error" + (path "/12345678-1234-1234-1234-123456789abc" + (reference "#PWR02") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:PWR_FLAG") + (at 129.54 76.2 180) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "d8d81b20-2093-4e20-9611-7d74eef3dfa0") + (property "Reference" "#FLG02" + (at 129.54 78.105 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "PWR_FLAG" + (at 129.54 81.28 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 129.54 76.2 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 129.54 76.2 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Special symbol for telling ERC where power comes from" + (at 129.54 76.2 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "fa21ac0f-00a1-4df7-b55e-290d521e46bf") + ) + (instances + (project "" + (path "/12345678-1234-1234-1234-123456789abc" + (reference "#FLG02") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:GND") + (at 134.62 83.82 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (uuid "eb9fdac8-df2b-483b-a781-a8e234010cd9") + (property "Reference" "#PWR03" + (at 134.62 90.17 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "GND" + (at 134.62 87.63 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 134.62 83.82 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 134.62 83.82 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 134.62 83.82 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "1b50163b-6be0-4b83-a654-52503382ce60") + ) + (instances + (project "ground_pin_test_error" + (path "/12345678-1234-1234-1234-123456789abc" + (reference "#PWR03") + (unit 1) + ) + ) + ) + ) + (sheet_instances + (path "/" + (page "1") + ) + ) + (embedded_fonts no) +) diff --git a/qa/data/eeschema/ground_pin_test_mixed.kicad_pro b/qa/data/eeschema/ground_pin_test_mixed.kicad_pro new file mode 100644 index 0000000000..1452b0b5bc --- /dev/null +++ b/qa/data/eeschema/ground_pin_test_mixed.kicad_pro @@ -0,0 +1,624 @@ +{ + "board": { + "3dviewports": [], + "design_settings": { + "defaults": { + "apply_defaults_to_fp_fields": false, + "apply_defaults_to_fp_shapes": false, + "apply_defaults_to_fp_text": false, + "board_outline_line_width": 0.09999999999999999, + "copper_line_width": 0.19999999999999998, + "copper_text_italic": false, + "copper_text_size_h": 1.5, + "copper_text_size_v": 1.5, + "copper_text_thickness": 0.3, + "copper_text_upright": false, + "courtyard_line_width": 0.049999999999999996, + "dimension_precision": 4, + "dimension_units": 3, + "dimensions": { + "arrow_length": 1270000, + "extension_offset": 500000, + "keep_text_aligned": true, + "suppress_zeroes": false, + "text_position": 0, + "units_format": 1 + }, + "fab_line_width": 0.09999999999999999, + "fab_text_italic": false, + "fab_text_size_h": 1.0, + "fab_text_size_v": 1.0, + "fab_text_thickness": 0.15, + "fab_text_upright": false, + "other_line_width": 0.15, + "other_text_italic": false, + "other_text_size_h": 1.0, + "other_text_size_v": 1.0, + "other_text_thickness": 0.15, + "other_text_upright": false, + "pads": { + "drill": 0.762, + "height": 1.524, + "width": 1.524 + }, + "silk_line_width": 0.15, + "silk_text_italic": false, + "silk_text_size_h": 1.0, + "silk_text_size_v": 1.0, + "silk_text_thickness": 0.15, + "silk_text_upright": false, + "zones": { + "min_clearance": 0.5 + } + }, + "diff_pair_dimensions": [], + "drc_exclusions": [], + "meta": { + "version": 2 + }, + "rule_severities": { + "annular_width": "error", + "clearance": "error", + "connection_width": "warning", + "copper_edge_clearance": "error", + "copper_sliver": "warning", + "courtyards_overlap": "error", + "diff_pair_gap_out_of_range": "error", + "diff_pair_uncoupled_length_too_long": "error", + "drill_out_of_range": "error", + "duplicate_footprints": "warning", + "extra_footprint": "warning", + "footprint": "error", + "footprint_symbol_mismatch": "warning", + "footprint_type_mismatch": "ignore", + "hole_clearance": "error", + "hole_near_hole": "error", + "holes_co_located": "warning", + "invalid_outline": "error", + "isolated_copper": "warning", + "item_on_disabled_layer": "error", + "items_not_allowed": "error", + "length_out_of_range": "error", + "lib_footprint_issues": "warning", + "lib_footprint_mismatch": "warning", + "malformed_courtyard": "error", + "microvia_drill_out_of_range": "error", + "missing_courtyard": "ignore", + "missing_footprint": "warning", + "net_conflict": "warning", + "npth_inside_courtyard": "ignore", + "padstack": "warning", + "pth_inside_courtyard": "ignore", + "shorting_items": "error", + "silk_edge_clearance": "warning", + "silk_over_copper": "warning", + "silk_overlap": "warning", + "skew_out_of_range": "error", + "solder_mask_bridge": "error", + "starved_thermal": "error", + "thermal_via": "error", + "through_hole_pad_without_hole": "error", + "too_many_vias": "error", + "track_dangling": "warning", + "track_width": "error", + "tracks_crossing": "error", + "unconnected_items": "error", + "unresolved_variable": "error", + "via_dangling": "warning", + "zones_intersect": "error" + }, + "rules": { + "max_error": 0.005, + "min_clearance": 0.0, + "min_connection": 0.0, + "min_copper_edge_clearance": 0.5, + "min_hole_clearance": 0.25, + "min_hole_to_hole": 0.25, + "min_microvia_diameter": 0.19999999999999998, + "min_microvia_drill": 0.09999999999999999, + "min_resolved_spokes": 2, + "min_silk_clearance": 0.0, + "min_text_height": 0.7999999999999999, + "min_text_thickness": 0.08, + "min_through_hole_diameter": 0.3, + "min_track_width": 0.0, + "min_via_annular_width": 0.09999999999999999, + "min_via_diameter": 0.5, + "solder_mask_clearance": 0.0, + "solder_mask_min_width": 0.0, + "solder_mask_to_copper_clearance": 0.0, + "use_height_for_length_calcs": true + }, + "teardrop_options": [ + { + "td_onpadsmd": true, + "td_onroundshapesonly": false, + "td_ontrackend": false, + "td_onviapad": true + } + ], + "teardrop_parameters": [ + { + "td_allow_use_two_tracks": true, + "td_curve_segcount": 0, + "td_height_ratio": 1.0, + "td_length_ratio": 0.5, + "td_maxheight": 2.0, + "td_maxlen": 1.0, + "td_on_pad_in_zone": false, + "td_target_name": "td_round_shape", + "td_width_to_size_filter_ratio": 0.9 + }, + { + "td_allow_use_two_tracks": true, + "td_curve_segcount": 0, + "td_height_ratio": 1.0, + "td_length_ratio": 0.5, + "td_maxheight": 2.0, + "td_maxlen": 1.0, + "td_on_pad_in_zone": false, + "td_target_name": "td_rect_shape", + "td_width_to_size_filter_ratio": 0.9 + }, + { + "td_allow_use_two_tracks": true, + "td_curve_segcount": 0, + "td_height_ratio": 1.0, + "td_length_ratio": 0.5, + "td_maxheight": 2.0, + "td_maxlen": 1.0, + "td_on_pad_in_zone": false, + "td_target_name": "td_track_end", + "td_width_to_size_filter_ratio": 0.9 + } + ], + "track_widths": [], + "tuning_pattern_settings": { + "diff_pair_defaults": { + "corner_radius_percentage": 80, + "corner_style": 1, + "max_amplitude": 1.0, + "min_amplitude": 0.2, + "single_sided": false, + "spacing": 1.0 + }, + "diff_pair_skew_defaults": { + "corner_radius_percentage": 80, + "corner_style": 1, + "max_amplitude": 1.0, + "min_amplitude": 0.2, + "single_sided": false, + "spacing": 0.6 + }, + "single_track_defaults": { + "corner_radius_percentage": 80, + "corner_style": 1, + "max_amplitude": 1.0, + "min_amplitude": 0.2, + "single_sided": false, + "spacing": 0.6 + } + }, + "via_dimensions": [], + "zones_allow_external_fillets": false + }, + "ipc2581": { + "dist": "", + "distpn": "", + "internal_id": "", + "mfg": "", + "mpn": "" + }, + "layer_pairs": [], + "layer_presets": [], + "viewports": [] + }, + "boards": [], + "component_class_settings": { + "assignments": [], + "meta": { + "version": 0 + }, + "sheet_component_classes": { + "enabled": false + } + }, + "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, + 1, + 1, + 1, + 1, + 2 + ], + [ + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 2, + 1, + 2, + 0, + 0, + 1, + 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", + "connections_identical": "warning", + "different_unit_footprint": "error", + "different_unit_net": "error", + "different_unit_value": "error", + "duplicate_reference": "error", + "duplicate_sheet_names": "error", + "endpoint_off_grid": "warning", + "extra_units": "error", + "footprint_filter": "ignore", + "footprint_link_issues": "warning", + "four_way_junction": "warning", + "global_label_dangling": "warning", + "ground_pin_not_ground": "error", + "hier_label_mismatch": "error", + "isolated_pin_label": "warning", + "label_dangling": "error", + "label_multiple_wires": "error", + "label_single_pin": "warning", + "lib_symbol_issues": "warning", + "lib_symbol_mismatch": "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": "warning", + "power_pin_not_driven": "error", + "same_local_global_label": "warning", + "similar_label_and_power": "warning", + "similar_labels": "warning", + "similar_power": "warning", + "simulation_model_issue": "ignore", + "single_global_label": "warning", + "unannotated": "error", + "unconnected_wire_endpoint": "warning", + "undefined_netclass": "warning", + "unit_value_mismatch": "error", + "unresolved_variable": "error", + "wire_dangling": "error" + } + }, + "libraries": { + "pinned_footprint_libs": [], + "pinned_symbol_libs": [] + }, + "meta": { + "filename": "ground_pin_test_mixed.kicad_pro", + "version": 3 + }, + "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)", + "priority": 2147483647, + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 0.2, + "tuning_profile": "", + "via_diameter": 0.6, + "via_drill": 0.3, + "wire_width": 6 + } + ], + "meta": { + "version": 5 + }, + "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": "${PROJECTNAME}.csv", + "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, + "include_excluded_from_bom": false, + "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": [], + "hop_over_size_choice": 0, + "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": "", + "reuse_designators": true, + "space_save_all_events": true, + "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, + "used_designators": "" + }, + "sheets": [ + [ + "5e4b0281-93a3-49ab-a5a7-472966b09c07", + "Root" + ] + ], + "text_variables": {}, + "time_domain_parameters": { + "delay_profiles_user_defined": [], + "meta": { + "version": 0 + } + } +} diff --git a/qa/data/eeschema/ground_pin_test_mixed.kicad_sch b/qa/data/eeschema/ground_pin_test_mixed.kicad_sch new file mode 100644 index 0000000000..a5da4abe13 --- /dev/null +++ b/qa/data/eeschema/ground_pin_test_mixed.kicad_sch @@ -0,0 +1,1106 @@ +(kicad_sch + (version 20250610) + (generator "eeschema") + (generator_version "9.99") + (uuid "5e4b0281-93a3-49ab-a5a7-472966b09c07") + (paper "A4") + (lib_symbols + (symbol "Device:R" + (pin_numbers + (hide yes) + ) + (pin_names + (offset 0) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "R" + (at 2.032 0 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "R" + (at 0 0 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at -1.778 0 90) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Resistor" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_keywords" "R res resistor" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_fp_filters" "R_*" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "R_0_1" + (rectangle + (start -1.016 -2.54) + (end 1.016 2.54) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "R_1_1" + (pin passive line + (at 0 3.81 270) + (length 1.27) + (name "" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 0 -3.81 90) + (length 1.27) + (name "" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + (symbol "Test:Test_Symbol_GND" + (pin_numbers + (hide yes) + ) + (pin_names + (offset 0.254) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "U" + (at 0 2.54 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "Test_Symbol_GND" + (at 0 -2.54 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "Test_Symbol_GND_0_1" + (rectangle + (start -2.54 1.27) + (end 2.54 -1.27) + (stroke + (width 0.254) + (type default) + ) + (fill + (type background) + ) + ) + ) + (symbol "Test_Symbol_GND_1_1" + (pin power_in line + (at -5.08 0 0) + (length 2.54) + (name "VCC" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin power_in line + (at 5.08 0 180) + (length 2.54) + (name "GND" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + (symbol "Test:Test_Symbol_Multiple_GND" + (pin_numbers + (hide yes) + ) + (pin_names + (offset 0.254) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "U?" + (at 3.81 -1.27 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "Test_Symbol_Multiple_GND" + (at 3.81 6.35 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "Test_Symbol_Multiple_GND_0_1" + (rectangle + (start -6.35 5.08) + (end 7.62 -5.08) + (stroke + (width 0.254) + (type default) + ) + (fill + (type background) + ) + ) + ) + (symbol "Test_Symbol_Multiple_GND_1_1" + (pin power_in line + (at -8.89 3.81 0) + (length 2.54) + (name "VCC" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin power_in line + (at 10.16 3.81 180) + (length 2.54) + (name "GND" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin power_in line + (at 10.16 1.27 180) + (length 2.54) + (name "GND_ALT" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "3" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + (symbol "power:GND" + (power global) + (pin_names + (offset 0) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "#PWR" + (at 0 -6.35 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "GND" + (at 0 -3.81 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (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) + (hide yes) + (name "" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + (symbol "power:PWR_FLAG" + (power global) + (pin_numbers + (hide yes) + ) + (pin_names + (offset 0) + (hide yes) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "#FLG" + (at 0 1.905 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "PWR_FLAG" + (at 0 3.81 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Special symbol for telling ERC where power comes from" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_keywords" "flag power" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (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) + ) + ) + ) + (embedded_fonts no) + ) + ) + (junction + (at 142.24 74.93) + (diameter 0) + (color 0 0 0 0) + (uuid "0b27e657-483d-4872-9d1c-ced877bf1517") + ) + (junction + (at 110.49 72.39) + (diameter 0) + (color 0 0 0 0) + (uuid "558e5598-91c8-46b0-ba85-928333a3c233") + ) + (junction + (at 142.24 72.39) + (diameter 0) + (color 0 0 0 0) + (uuid "b48ca839-b7ed-4ec3-b18b-84cb622499e1") + ) + (wire + (pts + (xy 102.87 72.39) (xy 102.87 59.69) + ) + (stroke + (width 0) + (type default) + ) + (uuid "03c31267-9c13-4fcb-aeaf-eb68ccb97c3f") + ) + (wire + (pts + (xy 127 59.69) (xy 161.29 59.69) + ) + (stroke + (width 0) + (type default) + ) + (uuid "0a64cf2b-c02b-43df-889c-0f1545616de5") + ) + (wire + (pts + (xy 161.29 59.69) (xy 161.29 72.39) + ) + (stroke + (width 0) + (type default) + ) + (uuid "169cd462-b8f0-4365-9cd9-2c71ff26e37c") + ) + (wire + (pts + (xy 142.24 72.39) (xy 161.29 72.39) + ) + (stroke + (width 0) + (type default) + ) + (uuid "2b592fc8-2f30-418b-82bd-bccdc1d742d5") + ) + (wire + (pts + (xy 132.08 74.93) (xy 142.24 74.93) + ) + (stroke + (width 0) + (type default) + ) + (uuid "5d86d214-f580-4d52-af01-17fe9ef992cf") + ) + (wire + (pts + (xy 102.87 59.69) (xy 119.38 59.69) + ) + (stroke + (width 0) + (type default) + ) + (uuid "a8fa1004-55e3-4519-8c6c-7aa0de5464d1") + ) + (wire + (pts + (xy 110.49 72.39) (xy 113.03 72.39) + ) + (stroke + (width 0) + (type default) + ) + (uuid "aa46e3ee-89ca-430a-bede-5d58165d812f") + ) + (wire + (pts + (xy 132.08 72.39) (xy 142.24 72.39) + ) + (stroke + (width 0) + (type default) + ) + (uuid "aea1199c-998c-422a-8370-112eb04407ac") + ) + (wire + (pts + (xy 102.87 72.39) (xy 110.49 72.39) + ) + (stroke + (width 0) + (type default) + ) + (uuid "af065edb-92b0-4d94-9350-cf0fe63b7af8") + ) + (wire + (pts + (xy 142.24 74.93) (xy 153.67 74.93) + ) + (stroke + (width 0) + (type default) + ) + (uuid "c2fd646b-d9f6-4ebc-a231-5cc338fbb24d") + ) + (wire + (pts + (xy 153.67 74.93) (xy 153.67 82.55) + ) + (stroke + (width 0) + (type default) + ) + (uuid "d710fbda-39c8-4a8c-b027-90a2f7adb657") + ) + (label "VCC" + (at 107.95 72.39 0) + (effects + (font + (size 1.27 1.27) + ) + ) + (uuid "3614192b-2f62-4aed-a52a-24b58a562229") + ) + (label "OTHER" + (at 161.29 72.39 0) + (effects + (font + (size 1.27 1.27) + ) + ) + (uuid "d2537025-5d01-41fe-b2c3-991c7dbe6837") + ) + (symbol + (lib_id "Device:R") + (at 123.19 59.69 90) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "1d17b68b-b62b-44e8-b205-e6b816fb65d0") + (property "Reference" "R1" + (at 123.19 53.34 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "R" + (at 123.19 55.88 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 123.19 61.468 90) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 123.19 59.69 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Resistor" + (at 123.19 59.69 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "05a42244-9bf1-4ed8-b8b8-d721423f1f6b") + ) + (pin "2" + (uuid "ec33e901-8962-4cc4-9719-643b90fb6e4c") + ) + (instances + (project "" + (path "/5e4b0281-93a3-49ab-a5a7-472966b09c07" + (reference "R1") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:PWR_FLAG") + (at 142.24 72.39 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "55016dd0-86d4-43c4-8d5b-77cbcffbb85d") + (property "Reference" "#FLG02" + (at 142.24 70.485 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "PWR_FLAG" + (at 142.24 67.31 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 142.24 72.39 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 142.24 72.39 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Special symbol for telling ERC where power comes from" + (at 142.24 72.39 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "4ed54e9f-8db7-4b05-945e-caa12cdaad5d") + ) + (instances + (project "" + (path "/5e4b0281-93a3-49ab-a5a7-472966b09c07" + (reference "#FLG02") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:PWR_FLAG") + (at 110.49 72.39 180) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "5ae9573f-65b6-4fc4-9b5e-ae5e53086718") + (property "Reference" "#FLG01" + (at 110.49 74.295 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "PWR_FLAG" + (at 110.49 77.47 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 110.49 72.39 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 110.49 72.39 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Special symbol for telling ERC where power comes from" + (at 110.49 72.39 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "4ed54e9f-8db7-4b05-945e-caa12cdaad5d") + ) + (instances + (project "" + (path "/5e4b0281-93a3-49ab-a5a7-472966b09c07" + (reference "#FLG01") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:PWR_FLAG") + (at 142.24 74.93 180) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "9603a3c1-f21a-4a55-a5ec-431c5f8ee086") + (property "Reference" "#FLG03" + (at 142.24 76.835 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "PWR_FLAG" + (at 142.24 80.01 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 142.24 74.93 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 142.24 74.93 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Special symbol for telling ERC where power comes from" + (at 142.24 74.93 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "4ed54e9f-8db7-4b05-945e-caa12cdaad5d") + ) + (instances + (project "" + (path "/5e4b0281-93a3-49ab-a5a7-472966b09c07" + (reference "#FLG03") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:GND") + (at 153.67 82.55 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (uuid "99c04430-50cf-4216-8d3b-e8fe5c448e36") + (property "Reference" "#PWR01" + (at 153.67 88.9 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "GND" + (at 153.67 86.36 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 153.67 82.55 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 153.67 82.55 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 153.67 82.55 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "9fb00e34-3f12-41b3-b64f-554d6358716e") + ) + (instances + (project "ground_pin_test_mixed" + (path "/5e4b0281-93a3-49ab-a5a7-472966b09c07" + (reference "#PWR01") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Test:Test_Symbol_Multiple_GND") + (at 121.92 76.2 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "d8eaf934-6715-43b2-b2f4-46653da95b1c") + (property "Reference" "U1" + (at 122.555 66.04 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "Test_Symbol_Multiple_GND" + (at 122.555 68.58 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 121.92 76.2 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 121.92 76.2 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 121.92 76.2 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "77d83cc2-ad36-413b-959e-5200cdfcf65e") + ) + (pin "2" + (uuid "863e2415-9bff-4ae8-a11e-0b50c8fdd2cf") + ) + (pin "3" + (uuid "6c159536-57cc-4c6a-a6fe-9fa605a2e09a") + ) + (instances + (project "ground_pin_test_mixed" + (path "/5e4b0281-93a3-49ab-a5a7-472966b09c07" + (reference "U1") + (unit 1) + ) + ) + ) + ) + (sheet_instances + (path "/" + (page "1") + ) + ) + (embedded_fonts no) +) diff --git a/qa/data/eeschema/ground_pin_test_no_ground_net.kicad_pro b/qa/data/eeschema/ground_pin_test_no_ground_net.kicad_pro new file mode 100644 index 0000000000..f43c3e4f06 --- /dev/null +++ b/qa/data/eeschema/ground_pin_test_no_ground_net.kicad_pro @@ -0,0 +1,624 @@ +{ + "board": { + "3dviewports": [], + "design_settings": { + "defaults": { + "apply_defaults_to_fp_fields": false, + "apply_defaults_to_fp_shapes": false, + "apply_defaults_to_fp_text": false, + "board_outline_line_width": 0.09999999999999999, + "copper_line_width": 0.19999999999999998, + "copper_text_italic": false, + "copper_text_size_h": 1.5, + "copper_text_size_v": 1.5, + "copper_text_thickness": 0.3, + "copper_text_upright": false, + "courtyard_line_width": 0.049999999999999996, + "dimension_precision": 4, + "dimension_units": 3, + "dimensions": { + "arrow_length": 1270000, + "extension_offset": 500000, + "keep_text_aligned": true, + "suppress_zeroes": false, + "text_position": 0, + "units_format": 1 + }, + "fab_line_width": 0.09999999999999999, + "fab_text_italic": false, + "fab_text_size_h": 1.0, + "fab_text_size_v": 1.0, + "fab_text_thickness": 0.15, + "fab_text_upright": false, + "other_line_width": 0.15, + "other_text_italic": false, + "other_text_size_h": 1.0, + "other_text_size_v": 1.0, + "other_text_thickness": 0.15, + "other_text_upright": false, + "pads": { + "drill": 0.762, + "height": 1.524, + "width": 1.524 + }, + "silk_line_width": 0.15, + "silk_text_italic": false, + "silk_text_size_h": 1.0, + "silk_text_size_v": 1.0, + "silk_text_thickness": 0.15, + "silk_text_upright": false, + "zones": { + "min_clearance": 0.5 + } + }, + "diff_pair_dimensions": [], + "drc_exclusions": [], + "meta": { + "version": 2 + }, + "rule_severities": { + "annular_width": "error", + "clearance": "error", + "connection_width": "warning", + "copper_edge_clearance": "error", + "copper_sliver": "warning", + "courtyards_overlap": "error", + "diff_pair_gap_out_of_range": "error", + "diff_pair_uncoupled_length_too_long": "error", + "drill_out_of_range": "error", + "duplicate_footprints": "warning", + "extra_footprint": "warning", + "footprint": "error", + "footprint_symbol_mismatch": "warning", + "footprint_type_mismatch": "ignore", + "hole_clearance": "error", + "hole_near_hole": "error", + "holes_co_located": "warning", + "invalid_outline": "error", + "isolated_copper": "warning", + "item_on_disabled_layer": "error", + "items_not_allowed": "error", + "length_out_of_range": "error", + "lib_footprint_issues": "warning", + "lib_footprint_mismatch": "warning", + "malformed_courtyard": "error", + "microvia_drill_out_of_range": "error", + "missing_courtyard": "ignore", + "missing_footprint": "warning", + "net_conflict": "warning", + "npth_inside_courtyard": "ignore", + "padstack": "warning", + "pth_inside_courtyard": "ignore", + "shorting_items": "error", + "silk_edge_clearance": "warning", + "silk_over_copper": "warning", + "silk_overlap": "warning", + "skew_out_of_range": "error", + "solder_mask_bridge": "error", + "starved_thermal": "error", + "thermal_via": "error", + "through_hole_pad_without_hole": "error", + "too_many_vias": "error", + "track_dangling": "warning", + "track_width": "error", + "tracks_crossing": "error", + "unconnected_items": "error", + "unresolved_variable": "error", + "via_dangling": "warning", + "zones_intersect": "error" + }, + "rules": { + "max_error": 0.005, + "min_clearance": 0.0, + "min_connection": 0.0, + "min_copper_edge_clearance": 0.5, + "min_hole_clearance": 0.25, + "min_hole_to_hole": 0.25, + "min_microvia_diameter": 0.19999999999999998, + "min_microvia_drill": 0.09999999999999999, + "min_resolved_spokes": 2, + "min_silk_clearance": 0.0, + "min_text_height": 0.7999999999999999, + "min_text_thickness": 0.08, + "min_through_hole_diameter": 0.3, + "min_track_width": 0.0, + "min_via_annular_width": 0.09999999999999999, + "min_via_diameter": 0.5, + "solder_mask_clearance": 0.0, + "solder_mask_min_width": 0.0, + "solder_mask_to_copper_clearance": 0.0, + "use_height_for_length_calcs": true + }, + "teardrop_options": [ + { + "td_onpadsmd": true, + "td_onroundshapesonly": false, + "td_ontrackend": false, + "td_onviapad": true + } + ], + "teardrop_parameters": [ + { + "td_allow_use_two_tracks": true, + "td_curve_segcount": 0, + "td_height_ratio": 1.0, + "td_length_ratio": 0.5, + "td_maxheight": 2.0, + "td_maxlen": 1.0, + "td_on_pad_in_zone": false, + "td_target_name": "td_round_shape", + "td_width_to_size_filter_ratio": 0.9 + }, + { + "td_allow_use_two_tracks": true, + "td_curve_segcount": 0, + "td_height_ratio": 1.0, + "td_length_ratio": 0.5, + "td_maxheight": 2.0, + "td_maxlen": 1.0, + "td_on_pad_in_zone": false, + "td_target_name": "td_rect_shape", + "td_width_to_size_filter_ratio": 0.9 + }, + { + "td_allow_use_two_tracks": true, + "td_curve_segcount": 0, + "td_height_ratio": 1.0, + "td_length_ratio": 0.5, + "td_maxheight": 2.0, + "td_maxlen": 1.0, + "td_on_pad_in_zone": false, + "td_target_name": "td_track_end", + "td_width_to_size_filter_ratio": 0.9 + } + ], + "track_widths": [], + "tuning_pattern_settings": { + "diff_pair_defaults": { + "corner_radius_percentage": 80, + "corner_style": 1, + "max_amplitude": 1.0, + "min_amplitude": 0.2, + "single_sided": false, + "spacing": 1.0 + }, + "diff_pair_skew_defaults": { + "corner_radius_percentage": 80, + "corner_style": 1, + "max_amplitude": 1.0, + "min_amplitude": 0.2, + "single_sided": false, + "spacing": 0.6 + }, + "single_track_defaults": { + "corner_radius_percentage": 80, + "corner_style": 1, + "max_amplitude": 1.0, + "min_amplitude": 0.2, + "single_sided": false, + "spacing": 0.6 + } + }, + "via_dimensions": [], + "zones_allow_external_fillets": false + }, + "ipc2581": { + "dist": "", + "distpn": "", + "internal_id": "", + "mfg": "", + "mpn": "" + }, + "layer_pairs": [], + "layer_presets": [], + "viewports": [] + }, + "boards": [], + "component_class_settings": { + "assignments": [], + "meta": { + "version": 0 + }, + "sheet_component_classes": { + "enabled": false + } + }, + "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, + 1, + 1, + 1, + 1, + 2 + ], + [ + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 2, + 1, + 2, + 0, + 0, + 1, + 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", + "connections_identical": "warning", + "different_unit_footprint": "error", + "different_unit_net": "error", + "different_unit_value": "error", + "duplicate_reference": "error", + "duplicate_sheet_names": "error", + "endpoint_off_grid": "warning", + "extra_units": "error", + "footprint_filter": "ignore", + "footprint_link_issues": "warning", + "four_way_junction": "warning", + "global_label_dangling": "warning", + "ground_pin_not_ground": "error", + "hier_label_mismatch": "error", + "isolated_pin_label": "warning", + "label_dangling": "error", + "label_multiple_wires": "error", + "label_single_pin": "warning", + "lib_symbol_issues": "warning", + "lib_symbol_mismatch": "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": "warning", + "power_pin_not_driven": "error", + "same_local_global_label": "warning", + "similar_label_and_power": "warning", + "similar_labels": "warning", + "similar_power": "warning", + "simulation_model_issue": "ignore", + "single_global_label": "warning", + "unannotated": "error", + "unconnected_wire_endpoint": "warning", + "undefined_netclass": "warning", + "unit_value_mismatch": "error", + "unresolved_variable": "error", + "wire_dangling": "error" + } + }, + "libraries": { + "pinned_footprint_libs": [], + "pinned_symbol_libs": [] + }, + "meta": { + "filename": "ground_pin_test_no_ground_net.kicad_pro", + "version": 3 + }, + "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)", + "priority": 2147483647, + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 0.2, + "tuning_profile": "", + "via_diameter": 0.6, + "via_drill": 0.3, + "wire_width": 6 + } + ], + "meta": { + "version": 5 + }, + "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": "${PROJECTNAME}.csv", + "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, + "include_excluded_from_bom": false, + "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": [], + "hop_over_size_choice": 0, + "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": "", + "reuse_designators": true, + "space_save_all_events": true, + "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, + "used_designators": "" + }, + "sheets": [ + [ + "4c9d4de9-9305-4dd7-bd4d-a30bf65598a4", + "Root" + ] + ], + "text_variables": {}, + "time_domain_parameters": { + "delay_profiles_user_defined": [], + "meta": { + "version": 0 + } + } +} diff --git a/qa/data/eeschema/ground_pin_test_no_ground_net.kicad_sch b/qa/data/eeschema/ground_pin_test_no_ground_net.kicad_sch new file mode 100644 index 0000000000..fbafe32170 --- /dev/null +++ b/qa/data/eeschema/ground_pin_test_no_ground_net.kicad_sch @@ -0,0 +1,492 @@ +(kicad_sch + (version 20250610) + (generator "eeschema") + (generator_version "9.99") + (uuid "4c9d4de9-9305-4dd7-bd4d-a30bf65598a4") + (paper "A4") + (lib_symbols + (symbol "Test:Test_Symbol_GND" + (pin_numbers + (hide yes) + ) + (pin_names + (offset 0.254) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "U?" + (at 0 -2.54 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "Test_Symbol_GND" + (at 0 2.54 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "Test_Symbol_GND_0_1" + (rectangle + (start -7.62 5.08) + (end 7.62 -5.08) + (stroke + (width 0.254) + (type default) + ) + (fill + (type background) + ) + ) + ) + (symbol "Test_Symbol_GND_1_1" + (pin power_in line + (at -10.16 0 0) + (length 2.54) + (name "VCC" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin power_in line + (at 10.16 0 180) + (length 2.54) + (name "GND" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + (symbol "power:PWR_FLAG" + (power global) + (pin_numbers + (hide yes) + ) + (pin_names + (offset 0) + (hide yes) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "#FLG" + (at 0 1.905 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "PWR_FLAG" + (at 0 3.81 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Special symbol for telling ERC where power comes from" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_keywords" "flag power" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (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) + ) + ) + ) + (embedded_fonts no) + ) + ) + (junction + (at 135.89 76.2) + (diameter 0) + (color 0 0 0 0) + (uuid "317e9c16-5487-462e-9d29-ce03c0af82c3") + ) + (junction + (at 109.22 76.2) + (diameter 0) + (color 0 0 0 0) + (uuid "ab597d77-1841-44df-8056-99b3968ee147") + ) + (wire + (pts + (xy 135.89 76.2) (xy 142.24 76.2) + ) + (stroke + (width 0) + (type default) + ) + (uuid "15f17d30-4479-4bf7-8421-4e4946bdb344") + ) + (wire + (pts + (xy 106.68 76.2) (xy 109.22 76.2) + ) + (stroke + (width 0) + (type default) + ) + (uuid "270c84f3-5d4b-43c1-bf80-4b34dbbd97db") + ) + (wire + (pts + (xy 132.08 76.2) (xy 135.89 76.2) + ) + (stroke + (width 0) + (type default) + ) + (uuid "6058b4ad-bbdb-4488-95a3-60da75cd23d2") + ) + (wire + (pts + (xy 109.22 76.2) (xy 111.76 76.2) + ) + (stroke + (width 0) + (type default) + ) + (uuid "eeb5c417-6225-43ce-9f59-2298b9d08360") + ) + (label "OTHER" + (at 142.24 76.2 0) + (effects + (font + (size 1.27 1.27) + ) + (justify bottom) + ) + (uuid "81c85b05-2af4-4606-a034-eb51405bed4e") + ) + (label "VCC" + (at 106.68 76.2 0) + (effects + (font + (size 1.27 1.27) + ) + (justify bottom) + ) + (uuid "e8853bb6-f615-4762-a391-f40fca50a353") + ) + (symbol + (lib_id "Test:Test_Symbol_GND") + (at 121.92 76.2 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "8b3aa65b-4af6-4885-a4ae-c694578b7d31") + (property "Reference" "U1" + (at 121.92 66.04 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "Test_Symbol_GND" + (at 121.92 68.58 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 121.92 76.2 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 121.92 76.2 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 121.92 76.2 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "e709cf6a-88c7-4afe-b393-0ebb1fa90acb") + ) + (pin "2" + (uuid "a4b3c6fe-4504-48b4-8607-8244e1068382") + ) + (instances + (project "ground_pin_test_no_ground_net" + (path "/4c9d4de9-9305-4dd7-bd4d-a30bf65598a4" + (reference "U1") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:PWR_FLAG") + (at 109.22 76.2 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "f7c06075-a4a8-4cb0-9070-fdd6a50e6500") + (property "Reference" "#FLG01" + (at 109.22 74.295 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "PWR_FLAG" + (at 109.22 71.12 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 109.22 76.2 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 109.22 76.2 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Special symbol for telling ERC where power comes from" + (at 109.22 76.2 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "c724064c-74e8-4f54-b9c6-8be1572f57ed") + ) + (instances + (project "" + (path "/4c9d4de9-9305-4dd7-bd4d-a30bf65598a4" + (reference "#FLG01") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:PWR_FLAG") + (at 135.89 76.2 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "ff19308d-cc06-44d6-9f6c-727d7a42667f") + (property "Reference" "#FLG02" + (at 135.89 74.295 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "PWR_FLAG" + (at 135.89 71.12 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 135.89 76.2 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 135.89 76.2 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Special symbol for telling ERC where power comes from" + (at 135.89 76.2 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "c724064c-74e8-4f54-b9c6-8be1572f57ed") + ) + (instances + (project "" + (path "/4c9d4de9-9305-4dd7-bd4d-a30bf65598a4" + (reference "#FLG02") + (unit 1) + ) + ) + ) + ) + (sheet_instances + (path "/" + (page "1") + ) + ) + (embedded_fonts no) +) diff --git a/qa/data/eeschema/ground_pin_test_ok.kicad_pro b/qa/data/eeschema/ground_pin_test_ok.kicad_pro new file mode 100644 index 0000000000..94b72edf5c --- /dev/null +++ b/qa/data/eeschema/ground_pin_test_ok.kicad_pro @@ -0,0 +1,624 @@ +{ + "board": { + "3dviewports": [], + "design_settings": { + "defaults": { + "apply_defaults_to_fp_fields": false, + "apply_defaults_to_fp_shapes": false, + "apply_defaults_to_fp_text": false, + "board_outline_line_width": 0.09999999999999999, + "copper_line_width": 0.19999999999999998, + "copper_text_italic": false, + "copper_text_size_h": 1.5, + "copper_text_size_v": 1.5, + "copper_text_thickness": 0.3, + "copper_text_upright": false, + "courtyard_line_width": 0.049999999999999996, + "dimension_precision": 4, + "dimension_units": 3, + "dimensions": { + "arrow_length": 1270000, + "extension_offset": 500000, + "keep_text_aligned": true, + "suppress_zeroes": false, + "text_position": 0, + "units_format": 1 + }, + "fab_line_width": 0.09999999999999999, + "fab_text_italic": false, + "fab_text_size_h": 1.0, + "fab_text_size_v": 1.0, + "fab_text_thickness": 0.15, + "fab_text_upright": false, + "other_line_width": 0.15, + "other_text_italic": false, + "other_text_size_h": 1.0, + "other_text_size_v": 1.0, + "other_text_thickness": 0.15, + "other_text_upright": false, + "pads": { + "drill": 0.762, + "height": 1.524, + "width": 1.524 + }, + "silk_line_width": 0.15, + "silk_text_italic": false, + "silk_text_size_h": 1.0, + "silk_text_size_v": 1.0, + "silk_text_thickness": 0.15, + "silk_text_upright": false, + "zones": { + "min_clearance": 0.5 + } + }, + "diff_pair_dimensions": [], + "drc_exclusions": [], + "meta": { + "version": 2 + }, + "rule_severities": { + "annular_width": "error", + "clearance": "error", + "connection_width": "warning", + "copper_edge_clearance": "error", + "copper_sliver": "warning", + "courtyards_overlap": "error", + "diff_pair_gap_out_of_range": "error", + "diff_pair_uncoupled_length_too_long": "error", + "drill_out_of_range": "error", + "duplicate_footprints": "warning", + "extra_footprint": "warning", + "footprint": "error", + "footprint_symbol_mismatch": "warning", + "footprint_type_mismatch": "ignore", + "hole_clearance": "error", + "hole_near_hole": "error", + "holes_co_located": "warning", + "invalid_outline": "error", + "isolated_copper": "warning", + "item_on_disabled_layer": "error", + "items_not_allowed": "error", + "length_out_of_range": "error", + "lib_footprint_issues": "warning", + "lib_footprint_mismatch": "warning", + "malformed_courtyard": "error", + "microvia_drill_out_of_range": "error", + "missing_courtyard": "ignore", + "missing_footprint": "warning", + "net_conflict": "warning", + "npth_inside_courtyard": "ignore", + "padstack": "warning", + "pth_inside_courtyard": "ignore", + "shorting_items": "error", + "silk_edge_clearance": "warning", + "silk_over_copper": "warning", + "silk_overlap": "warning", + "skew_out_of_range": "error", + "solder_mask_bridge": "error", + "starved_thermal": "error", + "thermal_via": "error", + "through_hole_pad_without_hole": "error", + "too_many_vias": "error", + "track_dangling": "warning", + "track_width": "error", + "tracks_crossing": "error", + "unconnected_items": "error", + "unresolved_variable": "error", + "via_dangling": "warning", + "zones_intersect": "error" + }, + "rules": { + "max_error": 0.005, + "min_clearance": 0.0, + "min_connection": 0.0, + "min_copper_edge_clearance": 0.5, + "min_hole_clearance": 0.25, + "min_hole_to_hole": 0.25, + "min_microvia_diameter": 0.19999999999999998, + "min_microvia_drill": 0.09999999999999999, + "min_resolved_spokes": 2, + "min_silk_clearance": 0.0, + "min_text_height": 0.7999999999999999, + "min_text_thickness": 0.08, + "min_through_hole_diameter": 0.3, + "min_track_width": 0.0, + "min_via_annular_width": 0.09999999999999999, + "min_via_diameter": 0.5, + "solder_mask_clearance": 0.0, + "solder_mask_min_width": 0.0, + "solder_mask_to_copper_clearance": 0.0, + "use_height_for_length_calcs": true + }, + "teardrop_options": [ + { + "td_onpadsmd": true, + "td_onroundshapesonly": false, + "td_ontrackend": false, + "td_onviapad": true + } + ], + "teardrop_parameters": [ + { + "td_allow_use_two_tracks": true, + "td_curve_segcount": 0, + "td_height_ratio": 1.0, + "td_length_ratio": 0.5, + "td_maxheight": 2.0, + "td_maxlen": 1.0, + "td_on_pad_in_zone": false, + "td_target_name": "td_round_shape", + "td_width_to_size_filter_ratio": 0.9 + }, + { + "td_allow_use_two_tracks": true, + "td_curve_segcount": 0, + "td_height_ratio": 1.0, + "td_length_ratio": 0.5, + "td_maxheight": 2.0, + "td_maxlen": 1.0, + "td_on_pad_in_zone": false, + "td_target_name": "td_rect_shape", + "td_width_to_size_filter_ratio": 0.9 + }, + { + "td_allow_use_two_tracks": true, + "td_curve_segcount": 0, + "td_height_ratio": 1.0, + "td_length_ratio": 0.5, + "td_maxheight": 2.0, + "td_maxlen": 1.0, + "td_on_pad_in_zone": false, + "td_target_name": "td_track_end", + "td_width_to_size_filter_ratio": 0.9 + } + ], + "track_widths": [], + "tuning_pattern_settings": { + "diff_pair_defaults": { + "corner_radius_percentage": 80, + "corner_style": 1, + "max_amplitude": 1.0, + "min_amplitude": 0.2, + "single_sided": false, + "spacing": 1.0 + }, + "diff_pair_skew_defaults": { + "corner_radius_percentage": 80, + "corner_style": 1, + "max_amplitude": 1.0, + "min_amplitude": 0.2, + "single_sided": false, + "spacing": 0.6 + }, + "single_track_defaults": { + "corner_radius_percentage": 80, + "corner_style": 1, + "max_amplitude": 1.0, + "min_amplitude": 0.2, + "single_sided": false, + "spacing": 0.6 + } + }, + "via_dimensions": [], + "zones_allow_external_fillets": false + }, + "ipc2581": { + "dist": "", + "distpn": "", + "internal_id": "", + "mfg": "", + "mpn": "" + }, + "layer_pairs": [], + "layer_presets": [], + "viewports": [] + }, + "boards": [], + "component_class_settings": { + "assignments": [], + "meta": { + "version": 0 + }, + "sheet_component_classes": { + "enabled": false + } + }, + "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, + 1, + 1, + 1, + 1, + 2 + ], + [ + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 2, + 1, + 2, + 0, + 0, + 1, + 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", + "connections_identical": "warning", + "different_unit_footprint": "error", + "different_unit_net": "error", + "different_unit_value": "error", + "duplicate_reference": "error", + "duplicate_sheet_names": "error", + "endpoint_off_grid": "warning", + "extra_units": "error", + "footprint_filter": "ignore", + "footprint_link_issues": "warning", + "four_way_junction": "warning", + "global_label_dangling": "warning", + "ground_pin_not_ground": "error", + "hier_label_mismatch": "error", + "isolated_pin_label": "warning", + "label_dangling": "error", + "label_multiple_wires": "error", + "label_single_pin": "warning", + "lib_symbol_issues": "warning", + "lib_symbol_mismatch": "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": "warning", + "power_pin_not_driven": "error", + "same_local_global_label": "warning", + "similar_label_and_power": "warning", + "similar_labels": "warning", + "similar_power": "warning", + "simulation_model_issue": "ignore", + "single_global_label": "warning", + "unannotated": "error", + "unconnected_wire_endpoint": "warning", + "undefined_netclass": "warning", + "unit_value_mismatch": "error", + "unresolved_variable": "error", + "wire_dangling": "error" + } + }, + "libraries": { + "pinned_footprint_libs": [], + "pinned_symbol_libs": [] + }, + "meta": { + "filename": "ground_pin_test_ok.kicad_pro", + "version": 3 + }, + "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)", + "priority": 2147483647, + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 0.2, + "tuning_profile": "", + "via_diameter": 0.6, + "via_drill": 0.3, + "wire_width": 6 + } + ], + "meta": { + "version": 5 + }, + "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": "${PROJECTNAME}.csv", + "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, + "include_excluded_from_bom": false, + "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": [], + "hop_over_size_choice": 0, + "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": "", + "reuse_designators": true, + "space_save_all_events": true, + "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, + "used_designators": "#FLG1-3,#PWR1,U1" + }, + "sheets": [ + [ + "12345678-1234-1234-1234-123456789def", + "Root" + ] + ], + "text_variables": {}, + "time_domain_parameters": { + "delay_profiles_user_defined": [], + "meta": { + "version": 0 + } + } +} diff --git a/qa/data/eeschema/ground_pin_test_ok.kicad_sch b/qa/data/eeschema/ground_pin_test_ok.kicad_sch new file mode 100644 index 0000000000..eb1e1f6754 --- /dev/null +++ b/qa/data/eeschema/ground_pin_test_ok.kicad_sch @@ -0,0 +1,636 @@ +(kicad_sch + (version 20250610) + (generator "eeschema") + (generator_version "9.99") + (uuid "12345678-1234-1234-1234-123456789def") + (paper "A4") + (lib_symbols + (symbol "Test_Symbol_GND_1" + (pin_numbers + (hide yes) + ) + (pin_names + (offset 0.254) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "U?" + (at 0 -2.54 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "Test_Symbol_GND" + (at 0 2.54 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "Test_Symbol_GND_1_0_1" + (rectangle + (start -7.62 5.08) + (end 7.62 -5.08) + (stroke + (width 0.254) + (type default) + ) + (fill + (type background) + ) + ) + ) + (symbol "Test_Symbol_GND_1_1_1" + (pin power_in line + (at -10.16 0 0) + (length 2.54) + (name "VCC" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin power_in line + (at 10.16 0 180) + (length 2.54) + (name "GND" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + (symbol "power:GND" + (power global) + (pin_names + (offset 0) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "#PWR" + (at 0 -6.35 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "GND" + (at 0 -3.81 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (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) + (hide yes) + (name "" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + (symbol "power:PWR_FLAG" + (power global) + (pin_numbers + (hide yes) + ) + (pin_names + (offset 0) + (hide yes) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "#FLG" + (at 0 1.905 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "PWR_FLAG" + (at 0 3.81 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Special symbol for telling ERC where power comes from" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_keywords" "flag power" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (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) + ) + ) + ) + (embedded_fonts no) + ) + ) + (junction + (at 102.87 87.63) + (diameter 0) + (color 0 0 0 0) + (uuid "4608dddc-fc71-4dc4-927f-b2670da83393") + ) + (junction + (at 135.89 87.63) + (diameter 0) + (color 0 0 0 0) + (uuid "53617e72-eabc-4faa-b2cb-7de1e5f2b88e") + ) + (wire + (pts + (xy 128.27 87.63) (xy 135.89 87.63) + ) + (stroke + (width 0) + (type default) + ) + (uuid "04a51ae9-4ae9-4bed-9fea-7d472d8054d1") + ) + (wire + (pts + (xy 95.25 87.63) (xy 102.87 87.63) + ) + (stroke + (width 0) + (type default) + ) + (uuid "1211de1a-b035-4aae-be44-a9f51776303d") + ) + (wire + (pts + (xy 102.87 87.63) (xy 107.95 87.63) + ) + (stroke + (width 0) + (type default) + ) + (uuid "44083bcb-4fd6-476f-9c08-ba44b0a069da") + ) + (wire + (pts + (xy 135.89 87.63) (xy 135.89 95.25) + ) + (stroke + (width 0) + (type default) + ) + (uuid "dd09693f-4a50-4356-8204-a9e82b01c543") + ) + (label "VCC" + (at 95.25 87.63 0) + (effects + (font + (size 1.27 1.27) + ) + (justify bottom) + ) + (uuid "e28831d2-7598-48e7-a846-5b63c0e95eb9") + ) + (symbol + (lib_id "power:GND") + (at 135.89 95.25 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (uuid "19d8a70f-fdaa-401b-b7db-c26505f6cf90") + (property "Reference" "#PWR01" + (at 135.89 101.6 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "GND" + (at 135.89 99.06 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 135.89 95.25 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 135.89 95.25 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 135.89 95.25 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "28fa0626-4efd-41ee-9e7f-2a5364d0ca32") + ) + (instances + (project "ground_pin_test_ok" + (path "/12345678-1234-1234-1234-123456789def" + (reference "#PWR01") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:PWR_FLAG") + (at 135.89 87.63 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "84ab731b-b6b7-45b2-818f-5cd6ff988fec") + (property "Reference" "#FLG02" + (at 135.89 85.725 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "PWR_FLAG" + (at 135.89 82.55 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 135.89 87.63 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 135.89 87.63 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Special symbol for telling ERC where power comes from" + (at 135.89 87.63 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "2bbd1dce-c066-4f23-9d19-0bc6ccf742bd") + ) + (instances + (project "" + (path "/12345678-1234-1234-1234-123456789def" + (reference "#FLG02") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_name "Test_Symbol_GND_1") + (lib_id "Test:Test_Symbol_GND") + (at 118.11 87.63 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "be7e6f04-02dd-4174-a78c-a4637606f7f0") + (property "Reference" "U1" + (at 118.11 77.47 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "Test_Symbol_GND" + (at 118.11 80.01 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 118.11 87.63 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 118.11 87.63 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 118.11 87.63 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "0487b632-edba-45cc-bd6a-118af1e1071f") + ) + (pin "2" + (uuid "c291e90f-20e3-4834-8bc5-d7788ad45e5e") + ) + (instances + (project "" + (path "/12345678-1234-1234-1234-123456789def" + (reference "U1") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:PWR_FLAG") + (at 102.87 87.63 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "ea8c0936-cdf4-4926-9f9c-ed93a8989f72") + (property "Reference" "#FLG01" + (at 102.87 85.725 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "PWR_FLAG" + (at 102.87 82.55 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 102.87 87.63 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 102.87 87.63 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Special symbol for telling ERC where power comes from" + (at 102.87 87.63 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "2bbd1dce-c066-4f23-9d19-0bc6ccf742bd") + ) + (instances + (project "" + (path "/12345678-1234-1234-1234-123456789def" + (reference "#FLG01") + (unit 1) + ) + ) + ) + ) + (sheet_instances + (path "/" + (page "1") + ) + ) + (embedded_fonts no) +) diff --git a/qa/tests/eeschema/CMakeLists.txt b/qa/tests/eeschema/CMakeLists.txt index 6bba0dab4f..2f13f7fb82 100644 --- a/qa/tests/eeschema/CMakeLists.txt +++ b/qa/tests/eeschema/CMakeLists.txt @@ -62,6 +62,7 @@ set( QA_EESCHEMA_SRCS erc/test_erc_label_multiple_wires.cpp erc/test_erc_unconnected_wire_endpoints.cpp erc/test_erc_wire_bus_entry.cpp + erc/test_erc_ground_pins.cpp test_annotation_refdes_tracker_units.cpp test_annotation_units_conflicts.cpp diff --git a/qa/tests/eeschema/erc/test_erc_ground_pins.cpp b/qa/tests/eeschema/erc/test_erc_ground_pins.cpp new file mode 100644 index 0000000000..f0654a7043 --- /dev/null +++ b/qa/tests/eeschema/erc/test_erc_ground_pins.cpp @@ -0,0 +1,438 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright The 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/ + */ + +/** + * @file test_erc_ground_pins.cpp + * Test suite for the ERC ground pin checks (ERCE_GROUND_PIN_NOT_GROUND) + * + * This test verifies that the ERC correctly detects and reports when pins labeled + * with "GND" are not connected to a ground net while other pins in the same symbol + * are connected to ground nets. + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + + +struct ERC_GROUND_PIN_TEST_FIXTURE +{ + ERC_GROUND_PIN_TEST_FIXTURE() : + m_settingsManager( true /* headless */ ) + { } + + SETTINGS_MANAGER m_settingsManager; + std::unique_ptr m_schematic; +}; + + +/** + * Test case: Pin with "GND" in its name connected to non-ground net while another pin + * in the same symbol is connected to a ground net. + * Expected: 1 ERCE_GROUND_PIN_NOT_GROUND error + */ +BOOST_FIXTURE_TEST_CASE( ERCGroundPinMismatch, ERC_GROUND_PIN_TEST_FIXTURE ) +{ + LOCALE_IO dummy; + + // Test schematic with a symbol that has: + // - One pin (VCC) connected to +5V net + // - One pin labeled "GND" connected to non-ground net "OTHER" + // - A separate GND symbol connected to "GND" net (establishes ground reference) + KI_TEST::LoadSchematic( m_settingsManager, "ground_pin_test_error", m_schematic ); + + ERC_SETTINGS& settings = m_schematic->ErcSettings(); + SHEETLIST_ERC_ITEMS_PROVIDER errors( m_schematic.get() ); + + // Skip the symbol library warnings for this test + settings.m_ERCSeverities[ERCE_LIB_SYMBOL_ISSUES] = RPT_SEVERITY_IGNORE; + settings.m_ERCSeverities[ERCE_LIB_SYMBOL_MISMATCH] = RPT_SEVERITY_IGNORE; + + // Enable the ground pin test + settings.m_ERCSeverities[ERCE_GROUND_PIN_NOT_GROUND] = RPT_SEVERITY_ERROR; + + m_schematic->ConnectionGraph()->RunERC(); + + ERC_TESTER tester( m_schematic.get() ); + tester.TestGroundPins(); + + errors.SetSeverities( RPT_SEVERITY_ERROR | RPT_SEVERITY_WARNING ); + + ERC_REPORT reportWriter( m_schematic.get(), EDA_UNITS::MM ); + + BOOST_CHECK_MESSAGE( errors.GetCount() == 1, + "Expected 1 ERCE_GROUND_PIN_NOT_GROUND error but got " + << errors.GetCount() << "\n" << reportWriter.GetTextReport() ); + + // Verify the error is the correct type + bool foundGroundPinError = false; + for( unsigned i = 0; i < errors.GetCount(); i++ ) + { + if( errors.GetItem( i )->GetErrorCode() == ERCE_GROUND_PIN_NOT_GROUND ) + { + foundGroundPinError = true; + break; + } + } + + BOOST_CHECK_MESSAGE( foundGroundPinError, + "Expected to find ERCE_GROUND_PIN_NOT_GROUND error\n" + << reportWriter.GetTextReport() ); +} + + +/** + * Test case: Pin with "GND" in its name correctly connected to ground net. + * Expected: 0 ERCE_GROUND_PIN_NOT_GROUND errors + */ +BOOST_FIXTURE_TEST_CASE( ERCGroundPinCorrect, ERC_GROUND_PIN_TEST_FIXTURE ) +{ + LOCALE_IO dummy; + + // Test schematic with a symbol where the GND pin is correctly connected to a ground net + KI_TEST::LoadSchematic( m_settingsManager, "ground_pin_test_ok", m_schematic ); + + ERC_SETTINGS& settings = m_schematic->ErcSettings(); + SHEETLIST_ERC_ITEMS_PROVIDER errors( m_schematic.get() ); + + // Skip the symbol library warnings + settings.m_ERCSeverities[ERCE_LIB_SYMBOL_ISSUES] = RPT_SEVERITY_IGNORE; + settings.m_ERCSeverities[ERCE_LIB_SYMBOL_MISMATCH] = RPT_SEVERITY_IGNORE; + + // Enable the ground pin test + settings.m_ERCSeverities[ERCE_GROUND_PIN_NOT_GROUND] = RPT_SEVERITY_ERROR; + + m_schematic->ConnectionGraph()->RunERC(); + + ERC_TESTER tester( m_schematic.get() ); + tester.TestGroundPins(); + + errors.SetSeverities( RPT_SEVERITY_ERROR | RPT_SEVERITY_WARNING ); + + ERC_REPORT reportWriter( m_schematic.get(), EDA_UNITS::MM ); + + // Should have no ground pin errors since the GND pin is correctly connected + int groundPinErrors = 0; + for( unsigned i = 0; i < errors.GetCount(); i++ ) + { + if( errors.GetItem( i )->GetErrorCode() == ERCE_GROUND_PIN_NOT_GROUND ) + { + groundPinErrors++; + } + } + + BOOST_CHECK_MESSAGE( groundPinErrors == 0, + "Expected 0 ERCE_GROUND_PIN_NOT_GROUND errors but got " + << groundPinErrors << "\n" << reportWriter.GetTextReport() ); +} + + +/** + * Test case: Symbol with multiple ground pins, some connected correctly, some not. + * Expected: 1 ERCE_GROUND_PIN_NOT_GROUND error (for the incorrectly connected pin) + */ +BOOST_FIXTURE_TEST_CASE( ERCGroundPinMixed, ERC_GROUND_PIN_TEST_FIXTURE ) +{ + LOCALE_IO dummy; + + // Test schematic with a symbol that has multiple ground-labeled pins: + // - One GND pin correctly connected to ground net + // - One GND_ALT pin connected to non-ground net + KI_TEST::LoadSchematic( m_settingsManager, "ground_pin_test_mixed", m_schematic ); + + ERC_SETTINGS& settings = m_schematic->ErcSettings(); + SHEETLIST_ERC_ITEMS_PROVIDER errors( m_schematic.get() ); + + // Skip the symbol library warnings + settings.m_ERCSeverities[ERCE_LIB_SYMBOL_ISSUES] = RPT_SEVERITY_IGNORE; + settings.m_ERCSeverities[ERCE_LIB_SYMBOL_MISMATCH] = RPT_SEVERITY_IGNORE; + + // Enable the ground pin test + settings.m_ERCSeverities[ERCE_GROUND_PIN_NOT_GROUND] = RPT_SEVERITY_ERROR; + + m_schematic->ConnectionGraph()->RunERC(); + + ERC_TESTER tester( m_schematic.get() ); + tester.TestGroundPins(); + + errors.SetSeverities( RPT_SEVERITY_ERROR | RPT_SEVERITY_WARNING ); + + ERC_REPORT reportWriter( m_schematic.get(), EDA_UNITS::MM ); + + // Should have exactly 1 ground pin error for the GND_ALT pin + int groundPinErrors = 0; + for( unsigned i = 0; i < errors.GetCount(); i++ ) + { + if( errors.GetItem( i )->GetErrorCode() == ERCE_GROUND_PIN_NOT_GROUND ) + { + groundPinErrors++; + } + } + + BOOST_CHECK_MESSAGE( groundPinErrors == 1, + "Expected 1 ERCE_GROUND_PIN_NOT_GROUND error but got " + << groundPinErrors << "\n" << reportWriter.GetTextReport() ); +} + + +/** + * Test case: Symbol with ground-labeled pin but no ground net anywhere in the schematic. + * Expected: 0 ERCE_GROUND_PIN_NOT_GROUND errors (condition not triggered) + */ +BOOST_FIXTURE_TEST_CASE( ERCGroundPinNoGroundNet, ERC_GROUND_PIN_TEST_FIXTURE ) +{ + LOCALE_IO dummy; + + // Test schematic with a symbol that has a GND pin but no ground net exists anywhere + // The error should only trigger when there IS a ground net somewhere but the GND pin + // is not connected to it + KI_TEST::LoadSchematic( m_settingsManager, "ground_pin_test_no_ground_net", m_schematic ); + + ERC_SETTINGS& settings = m_schematic->ErcSettings(); + SHEETLIST_ERC_ITEMS_PROVIDER errors( m_schematic.get() ); + + // Skip the symbol library warnings + settings.m_ERCSeverities[ERCE_LIB_SYMBOL_ISSUES] = RPT_SEVERITY_IGNORE; + settings.m_ERCSeverities[ERCE_LIB_SYMBOL_MISMATCH] = RPT_SEVERITY_IGNORE; + + // Enable the ground pin test + settings.m_ERCSeverities[ERCE_GROUND_PIN_NOT_GROUND] = RPT_SEVERITY_ERROR; + + m_schematic->ConnectionGraph()->RunERC(); + + ERC_TESTER tester( m_schematic.get() ); + tester.TestGroundPins(); + + errors.SetSeverities( RPT_SEVERITY_ERROR | RPT_SEVERITY_WARNING ); + + ERC_REPORT reportWriter( m_schematic.get(), EDA_UNITS::MM ); + + // Should have no ground pin errors since there's no ground net to compare against + int groundPinErrors = 0; + for( unsigned i = 0; i < errors.GetCount(); i++ ) + { + if( errors.GetItem( i )->GetErrorCode() == ERCE_GROUND_PIN_NOT_GROUND ) + { + groundPinErrors++; + } + } + + BOOST_CHECK_MESSAGE( groundPinErrors == 0, + "Expected 0 ERCE_GROUND_PIN_NOT_GROUND errors but got " + << groundPinErrors << "\n" << reportWriter.GetTextReport() ); +} + + +/** + * Test case: Verify that the ground pin check is properly enabled/disabled. + * Expected: Errors only when the check is enabled + */ +BOOST_FIXTURE_TEST_CASE( ERCGroundPinToggle, ERC_GROUND_PIN_TEST_FIXTURE ) +{ + LOCALE_IO dummy; + + KI_TEST::LoadSchematic( m_settingsManager, "ground_pin_test_error", m_schematic ); + + ERC_SETTINGS& settings = m_schematic->ErcSettings(); + SHEETLIST_ERC_ITEMS_PROVIDER errors( m_schematic.get() ); + + // Skip the symbol library warnings + settings.m_ERCSeverities[ERCE_LIB_SYMBOL_ISSUES] = RPT_SEVERITY_IGNORE; + settings.m_ERCSeverities[ERCE_LIB_SYMBOL_MISMATCH] = RPT_SEVERITY_IGNORE; + + int groundPinErrors = 0; + // Disable the ground pin test + settings.m_ERCSeverities[ERCE_GROUND_PIN_NOT_GROUND] = RPT_SEVERITY_IGNORE; + + m_schematic->ConnectionGraph()->RunERC(); + + ERC_TESTER tester( m_schematic.get() ); + tester.TestGroundPins(); + + errors.SetSeverities( RPT_SEVERITY_ERROR | RPT_SEVERITY_WARNING ); + + for( unsigned i = 0; i < errors.GetCount(); i++ ) + { + if( errors.GetItem( i )->GetErrorCode() == ERCE_GROUND_PIN_NOT_GROUND ) + { + groundPinErrors++; + } + } + + BOOST_CHECK_MESSAGE( groundPinErrors == 0, + "Expected 0 errors when test is disabled but got " << groundPinErrors ); + + // Now re-enable the ground pin test and count again + settings.m_ERCSeverities[ERCE_GROUND_PIN_NOT_GROUND] = RPT_SEVERITY_ERROR; + m_schematic->ConnectionGraph()->RunERC(); + + ERC_TESTER tester2( m_schematic.get() ); + tester2.TestGroundPins(); + errors.SetSeverities( RPT_SEVERITY_ERROR | RPT_SEVERITY_WARNING ); + + groundPinErrors = 0; + + for( unsigned i = 0; i < errors.GetCount(); i++ ) + { + if( errors.GetItem( i )->GetErrorCode() == ERCE_GROUND_PIN_NOT_GROUND ) + { + groundPinErrors++; + } + } + + BOOST_CHECK_MESSAGE( groundPinErrors >= 1, + "Expected at least 1 error when test is enabled but got " << groundPinErrors ); +} + + +/** + * Test case: Verify error message content and pin identification. + * Expected: Error message contains pin name and proper item identification + */ +BOOST_FIXTURE_TEST_CASE( ERCGroundPinErrorMessage, ERC_GROUND_PIN_TEST_FIXTURE ) +{ + LOCALE_IO dummy; + + KI_TEST::LoadSchematic( m_settingsManager, "ground_pin_test_error", m_schematic ); + + ERC_SETTINGS& settings = m_schematic->ErcSettings(); + SHEETLIST_ERC_ITEMS_PROVIDER errors( m_schematic.get() ); + + // Skip the symbol library warnings + settings.m_ERCSeverities[ERCE_LIB_SYMBOL_ISSUES] = RPT_SEVERITY_IGNORE; + settings.m_ERCSeverities[ERCE_LIB_SYMBOL_MISMATCH] = RPT_SEVERITY_IGNORE; + + // Enable the ground pin test + settings.m_ERCSeverities[ERCE_GROUND_PIN_NOT_GROUND] = RPT_SEVERITY_ERROR; + + m_schematic->ConnectionGraph()->RunERC(); + + ERC_TESTER tester( m_schematic.get() ); + tester.TestGroundPins(); + + errors.SetSeverities( RPT_SEVERITY_ERROR | RPT_SEVERITY_WARNING ); + + // Find the ground pin error and verify its content + bool foundGroundPinError = false; + wxString errorMessage; + + for( unsigned i = 0; i < errors.GetCount(); i++ ) + { + if( errors.GetItem( i )->GetErrorCode() == ERCE_GROUND_PIN_NOT_GROUND ) + { + foundGroundPinError = true; + errorMessage = errors.GetItem( i )->GetErrorMessage(); + + // Verify the error message contains expected content + BOOST_CHECK_MESSAGE( errorMessage.Contains( "Pin" ), + "Error message should contain 'Pin': " << errorMessage.ToStdString() ); + + BOOST_CHECK_MESSAGE( errorMessage.Contains( "GND" ), + "Error message should contain 'GND': " << errorMessage.ToStdString() ); + + BOOST_CHECK_MESSAGE( errorMessage.Contains( "not connected to ground net" ), + "Error message should contain expected text: " << errorMessage.ToStdString() ); + + // Verify that the error has the pin item associated + std::shared_ptr ercItem = errors.GetItem( i ); + BOOST_CHECK_MESSAGE( ercItem->GetMainItemID() != niluuid, + "ERC item should have a main item (the pin)" ); + + break; + } + } + + BOOST_CHECK_MESSAGE( foundGroundPinError, + "Should have found a ground pin error to test message content" ); +} + + +/** + * Comprehensive test with all ground pin related test cases. + * This demonstrates the expected behavior of the ground pin ERC check. + */ +BOOST_FIXTURE_TEST_CASE( ERCGroundPinComprehensive, ERC_GROUND_PIN_TEST_FIXTURE ) +{ + LOCALE_IO dummy; + + // Test data: schema name and expected number of ERCE_GROUND_PIN_NOT_GROUND errors + std::vector> tests = + { + { "ground_pin_test_error", 1 }, // GND pin on non-ground net while symbol has ground + { "ground_pin_test_ok", 0 }, // GND pin correctly connected + { "ground_pin_test_mixed", 1 }, // Mixed: one correct, one incorrect + { "ground_pin_test_no_ground_net", 0 } // No ground net anywhere (no error triggered) + }; + + 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 symbol library warnings + settings.m_ERCSeverities[ERCE_LIB_SYMBOL_ISSUES] = RPT_SEVERITY_IGNORE; + settings.m_ERCSeverities[ERCE_LIB_SYMBOL_MISMATCH] = RPT_SEVERITY_IGNORE; + + // Enable the ground pin test + settings.m_ERCSeverities[ERCE_GROUND_PIN_NOT_GROUND] = RPT_SEVERITY_ERROR; + + m_schematic->ConnectionGraph()->RunERC(); + + ERC_TESTER tester( m_schematic.get() ); + + // Run all ERC tests to ensure ground pin test integrates properly + tester.TestConflictingBusAliases(); + tester.TestMultUnitPinConflicts(); + tester.TestMultiunitFootprints(); + tester.TestMissingUnits(); + tester.TestNoConnectPins(); + tester.TestPinToPin(); + tester.TestGroundPins(); // Our test + tester.TestSimilarLabels(); + + errors.SetSeverities( RPT_SEVERITY_ERROR | RPT_SEVERITY_WARNING ); + + // Count only ground pin errors + int groundPinErrors = 0; + for( unsigned i = 0; i < errors.GetCount(); i++ ) + { + if( errors.GetItem( i )->GetErrorCode() == ERCE_GROUND_PIN_NOT_GROUND ) + { + groundPinErrors++; + } + } + + ERC_REPORT reportWriter( m_schematic.get(), EDA_UNITS::MM ); + + BOOST_CHECK_MESSAGE( groundPinErrors == test.second, + "Expected " << test.second << " ERCE_GROUND_PIN_NOT_GROUND errors in " + << test.first.ToStdString() << " but got " << groundPinErrors + << "\n" << reportWriter.GetTextReport() ); + } +}