|
KiCad PCB EDA Suite
|
#include <erc.h>
Public Member Functions | |
| ERC_TESTER (SCHEMATIC *aSchematic, bool aShowAllErrors=false) | |
| int | TestDuplicateSheetNames (bool aCreateMarker) |
| Inside a given sheet, one cannot have sheets with duplicate names (file names can be duplicated). | |
| int | TestPinMap (KIFACE *aCvPcb, PROJECT *aProject) |
| Check pin-to-pad maps (issue #2282): stale pin references, duplicate pad targets, bad pads and unmapped connected pins. | |
| void | TestTextVars (DS_PROXY_VIEW_ITEM *aDrawingSheet) |
| Check for any unresolved text variable references. | |
| int | TestFieldNameWhitespace () |
| Check for field names with leading or trailing whitespace. | |
| int | TestEmptyLabelNames () |
| Check for labels with empty or whitespace-only names. | |
| int | TestMultiunitFootprints () |
| Test if all units of each multiunit symbol have the same footprint assigned. | |
| int | TestNoConnectPins () |
| In KiCad 5 and earlier, you could connect stuff up to pins with NC electrical type. | |
| int | TestPinToPin () |
| Checks the full netlist against the pin-to-pin connectivity requirements. | |
| int | TestMultUnitPinConflicts () |
| Checks if shared pins on multi-unit symbols have been connected to different nets. | |
| int | TestDuplicatePinNets () |
| Checks if duplicate pin numbers within a symbol are connected to different nets. | |
| int | TestGroundPins () |
| Checks for ground-labeled pins not on a ground net while another pin is. | |
| int | TestStackedPinNotation () |
| Checks for pin numbers that resemble stacked pin notation but are invalid. | |
| int | TestSameLocalGlobalLabel () |
| Checks for global and local labels with the same name. | |
| int | TestSimilarLabels () |
| Checks for labels that differ only in capitalization. | |
| int | TestFourWayJunction () |
| Test to see if there are potentially confusing 4-way junctions in the schematic. | |
| int | TestLabelMultipleWires () |
| Test to see if there are labels that are connected to more than one wire. | |
| int | TestLibSymbolIssues () |
| Test symbols for changed library symbols and broken symbol library links. | |
| int | TestFootprintLinkIssues (KIFACE *aCvPcb, PROJECT *aProject) |
| Test footprint links against the current footprint libraries. | |
| int | TestFootprintFilters () |
| Test symbols to ensure that assigned footprint passes any given footprint filters. | |
| int | TestOffGridEndpoints () |
| Test pins and wire ends for being off grid. | |
| int | TestSimModelIssues () |
| Test SPICE models for various issues. | |
| int | TestMissingUnits () |
| Test for uninstantiated units of multi unit symbols. | |
| int | TestMissingNetclasses () |
| Tests for netclasses that are referenced but not defined. | |
| int | RunRuleAreaERC () |
| Tests for rule area ERC issues. | |
| int | TestVariantSymbols () |
| Test all variant symbol overrides for resolution and pin compatibility. | |
| void | RunTests (DS_PROXY_VIEW_ITEM *aDrawingSheet, SCH_EDIT_FRAME *aEditFrame, KIFACE *aCvPcb, PROJECT *aProject, PROGRESS_REPORTER *aProgressReporter) |
Private Attributes | |
| SCHEMATIC * | m_schematic |
| ERC_SETTINGS & | m_settings |
| SCH_SHEET_LIST | m_sheetList |
| SCH_SCREENS | m_screens |
| SCH_MULTI_UNIT_REFERENCE_MAP | m_refMap |
| const NET_MAP & | m_nets |
| bool | m_showAllErrors |
|
inline |
Definition at line 51 of file erc.h.
References m_nets, m_refMap, m_schematic, m_screens, m_settings, m_sheetList, m_showAllErrors, and SYMBOL_FILTER_ALL.
| int ERC_TESTER::RunRuleAreaERC | ( | ) |
Tests for rule area ERC issues.
| void ERC_TESTER::RunTests | ( | DS_PROXY_VIEW_ITEM * | aDrawingSheet, |
| SCH_EDIT_FRAME * | aEditFrame, | ||
| KIFACE * | aCvPcb, | ||
| PROJECT * | aProject, | ||
| PROGRESS_REPORTER * | aProgressReporter ) |
Definition at line 2667 of file erc.cpp.
References _, PROGRESS_REPORTER::AdvancePhase(), ERCE_DIFFERENT_UNIT_FP, ERCE_DIFFERENT_UNIT_NET, ERCE_DUPLICATE_PIN_ERROR, ERCE_DUPLICATE_SHEET_NAME, ERCE_EMPTY_LABEL_NAME, ERCE_ENDPOINT_OFF_GRID, ERCE_FIELD_NAME_WHITESPACE, ERCE_FOOTPRINT_FILTERS, ERCE_FOOTPRINT_LINK_ISSUES, ERCE_FOUR_WAY_JUNCTION, ERCE_GROUND_PIN_NOT_GROUND, ERCE_LABEL_MULTIPLE_WIRES, ERCE_LIB_SYMBOL_ISSUES, ERCE_LIB_SYMBOL_MISMATCH, ERCE_MISSING_BIDI_PIN, ERCE_MISSING_INPUT_PIN, ERCE_MISSING_POWER_INPUT_PIN, ERCE_MISSING_UNIT, ERCE_NOCONNECT_CONNECTED, ERCE_PIN_MAP_BAD_PAD, ERCE_PIN_MAP_DUPLICATE_PAD, ERCE_PIN_MAP_STALE_PIN, ERCE_PIN_MAP_UNMAPPED_PIN, ERCE_PIN_NOT_DRIVEN, ERCE_PIN_TO_PIN_ERROR, ERCE_PIN_TO_PIN_WARNING, ERCE_POWERPIN_NOT_DRIVEN, ERCE_SAME_LOCAL_GLOBAL_LABEL, ERCE_SAME_LOCAL_GLOBAL_POWER, ERCE_SIMILAR_LABEL_AND_POWER, ERCE_SIMILAR_LABELS, ERCE_SIMILAR_POWER, ERCE_SIMULATION_MODEL, ERCE_STACKED_PIN_SYNTAX, ERCE_UNDEFINED_NETCLASS, ERCE_UNRESOLVED_VARIABLE, ERCE_VARIANT_SYMBOL_INCOMPATIBLE, ERCE_VARIANT_SYMBOL_INVALID, ADVANCED_CFG::GetCfg(), GLOBAL_CLEANUP, m_schematic, m_settings, m_sheetList, NO_CLEANUP, SCH_EDIT_FRAME::RecalculateConnections(), TestDuplicatePinNets(), TestDuplicateSheetNames(), TestEmptyLabelNames(), TestFieldNameWhitespace(), TestFootprintFilters(), TestFootprintLinkIssues(), TestFourWayJunction(), TestGroundPins(), TestLabelMultipleWires(), TestLibSymbolIssues(), TestMissingNetclasses(), TestMissingUnits(), TestMultiunitFootprints(), TestMultUnitPinConflicts(), TestNoConnectPins(), TestOffGridEndpoints(), TestPinMap(), TestPinToPin(), TestSameLocalGlobalLabel(), TestSimilarLabels(), TestSimModelIssues(), TestStackedPinNotation(), TestTextVars(), and TestVariantSymbols().
Referenced by BOOST_FIXTURE_TEST_CASE(), EESCHEMA_JOBS_HANDLER::JobSchErc(), and DIALOG_ERC::testErc().
| int ERC_TESTER::TestDuplicatePinNets | ( | ) |
Checks if duplicate pin numbers within a symbol are connected to different nets.
Symbols may have multiple pins with the same number if they are all connected to the same net. If duplicate pins are on different nets, an error is reported.
Definition at line 1753 of file erc.cpp.
References _, SCH_SCREEN::Append(), ERC_ITEM::Create(), ERCE_DUPLICATE_PIN_ERROR, LIB_SYMBOL::GetDuplicatePinNumbersAreJumpers(), SCH_SYMBOL::GetLibSymbolRef(), SCH_CONNECTION::GetNetName(), SCH_SYMBOL::GetPins(), SCH_SYMBOL::GetRef(), SCH_SCREEN::Items(), m_sheetList, EE_RTREE::OfType(), pin, and SCH_SYMBOL_T.
Referenced by RunTests().
| int ERC_TESTER::TestDuplicateSheetNames | ( | bool | aCreateMarker | ) |
Inside a given sheet, one cannot have sheets with duplicate names (file names can be duplicated).
| aCreateMarker | true = create error markers in schematic, false = calculate error count only |
Definition at line 145 of file erc.cpp.
References ERC_ITEM::Create(), ERCE_DUPLICATE_SHEET_NAME, SCH_SHEET::GetPosition(), SCH_SHEET::GetShownName(), m_screens, and SCH_SHEET_T.
Referenced by RunTests().
| int ERC_TESTER::TestEmptyLabelNames | ( | ) |
Check for labels with empty or whitespace-only names.
Definition at line 672 of file erc.cpp.
References SCH_SCREEN::Append(), ERC_ITEM::Create(), ERCE_EMPTY_LABEL_NAME, SCH_TEXT::GetPosition(), EDA_TEXT::GetText(), SCH_SCREEN::Items(), labelTypes, m_sheetList, EE_RTREE::OfType(), SCH_GLOBAL_LABEL_T, SCH_HIER_LABEL_T, SCH_LABEL_T, and text.
Referenced by EMPTY_LABEL_ERC_FIXTURE::RunCheck(), and RunTests().
| int ERC_TESTER::TestFieldNameWhitespace | ( | ) |
Check for field names with leading or trailing whitespace.
Definition at line 711 of file erc.cpp.
References _, SCH_SCREEN::Append(), ERC_ITEM::Create(), ERCE_FIELD_NAME_WHITESPACE, SCH_SHEET::GetFields(), SCH_SYMBOL::GetFields(), SCH_SCREEN::Items(), m_sheetList, EE_RTREE::OfType(), SCH_SHEET_T, and SCH_SYMBOL_T.
Referenced by RunTests().
| int ERC_TESTER::TestFootprintFilters | ( | ) |
Test symbols to ensure that assigned footprint passes any given footprint filters.
Definition at line 2343 of file erc.cpp.
References _, ERC_ITEM::Create(), ERCE_FOOTPRINT_FILTERS, filter, SCH_SYMBOL::GetFootprintFieldText(), SCH_SYMBOL::GetLibSymbolRef(), SCH_SYMBOL::GetPosition(), LIB_ID::GetUniStringLibItemName(), m_schematic, m_sheetList, LIB_ID::Parse(), and SCH_SYMBOL_T.
Referenced by BOOST_FIXTURE_TEST_CASE(), and RunTests().
Test footprint links against the current footprint libraries.
Definition at line 2257 of file erc.cpp.
References _, ERC_ITEM::Create(), ERCE_FOOTPRINT_LINK_ISSUES, FOOTPRINT, SCH_SYMBOL::GetFootprintFieldText(), LIB_ID::GetLibItemName(), LIB_ID::GetLibNickname(), SCH_SYMBOL::GetPosition(), KIFACE::IfaceOrAddress(), KIFACE_TEST_FOOTPRINT_LINK, KIFACE_TEST_FOOTPRINT_LINK_LIBRARY_NOT_ENABLED, KIFACE_TEST_FOOTPRINT_LINK_NO_FOOTPRINT, KIFACE_TEST_FOOTPRINT_LINK_NO_LIBRARY, m_schematic, m_sheetList, LIB_ID::Parse(), Pgm(), and SCH_SYMBOL_T.
Referenced by RunTests().
| int ERC_TESTER::TestFourWayJunction | ( | ) |
Test to see if there are potentially confusing 4-way junctions in the schematic.
Definition at line 1083 of file erc.cpp.
References _, ERC_ITEM::Create(), ERCE_FOUR_WAY_JUNCTION, SCH_LINE::GetConnectionPoints(), SCH_SYMBOL::GetPins(), SCH_LINE::IsGraphicLine(), SCH_PIN::IsVisible(), SCH_SCREEN::Items(), m_sheetList, EE_RTREE::OfType(), pin, SCH_LINE_T, SCH_PIN_T, and SCH_SYMBOL_T.
Referenced by BOOST_FIXTURE_TEST_CASE(), and RunTests().
| int ERC_TESTER::TestGroundPins | ( | ) |
Checks for ground-labeled pins not on a ground net while another pin is.
Definition at line 1832 of file erc.cpp.
References _, SCH_SCREEN::Append(), ERC_ITEM::Create(), ERCE_GROUND_PIN_NOT_GROUND, SCH_CONNECTION::GetNetName(), SCH_SYMBOL::GetPins(), SCH_SCREEN::Items(), m_sheetList, EE_RTREE::OfType(), pin, PT_POWER_IN, PT_POWER_OUT, and SCH_SYMBOL_T.
Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and RunTests().
| int ERC_TESTER::TestLabelMultipleWires | ( | ) |
Test to see if there are labels that are connected to more than one wire.
Definition at line 1028 of file erc.cpp.
References _, ERC_ITEM::Create(), ERCE_LABEL_MULTIPLE_WIRES, SCH_LABEL_BASE::GetConnectionPoints(), SCH_LINE::IsEndPoint(), SCH_LINE::IsGraphicLine(), m_sheetList, SCH_LABEL_T, and SCH_LINE_T.
Referenced by BOOST_FIXTURE_TEST_CASE(), and RunTests().
| int ERC_TESTER::TestLibSymbolIssues | ( | ) |
Test symbols for changed library symbols and broken symbol library links.
Definition at line 2135 of file erc.cpp.
References _, CheckDuplicatePins(), ERC_ITEM::Create(), SCH_ITEM::EQUALITY, SCH_ITEM::ERC, ERCE_LIB_SYMBOL_ISSUES, ERCE_LIB_SYMBOL_MISMATCH, LIB_SYMBOL::Flatten(), LIB_SYMBOL::GetDuplicatePinNumbersAreJumpers(), LIBRARY_MANAGER::GetFullURI(), SCH_SYMBOL::GetLibId(), LIB_ID::GetLibItemName(), LIB_ID::GetLibNickname(), PGM_BASE::GetLibraryManager(), SCH_SYMBOL::GetLibSymbolRef(), SCH_SYMBOL::GetPosition(), LIBRARY_MANAGER::GetRow(), LIBRARY_MANAGER_ADAPTER::IsLibraryLoaded(), SYMBOL_LIBRARY_ADAPTER::LoadSymbol(), m_schematic, m_screens, m_settings, MILS, Pgm(), SCH_SYMBOL_T, schIUScale, SYMBOL, PROJECT_SCH::SymbolLibAdapter(), and UnescapeString().
Referenced by RunTests().
| int ERC_TESTER::TestMissingNetclasses | ( | ) |
Tests for netclasses that are referenced but not defined.
Definition at line 975 of file erc.cpp.
References _, SCH_SCREEN::Append(), ERC_ITEM::Create(), ERCE_UNDEFINED_NETCLASS, SCH_FIELD::GetCanonicalName(), SCH_FIELD::GetShownText(), SCH_SCREEN::Items(), SCH_SHEET_PATH::LastScreen(), m_schematic, m_sheetList, NO_RECURSE, SCH_FIELD_T, and EDA_ITEM::Type().
Referenced by RunTests().
| int ERC_TESTER::TestMissingUnits | ( | ) |
Test for uninstantiated units of multi unit symbols.
Definition at line 841 of file erc.cpp.
References _, SCH_SCREEN::Append(), ERC_ITEM::Create(), ERCE_MISSING_BIDI_PIN, ERCE_MISSING_INPUT_PIN, ERCE_MISSING_POWER_INPUT_PIN, ERCE_MISSING_UNIT, SCH_ITEM::GetBodyStyle(), SCH_REFERENCE_LIST::GetCount(), LIB_SYMBOL::GetGraphicalPins(), SCH_REFERENCE_LIST::GetItem(), SCH_REFERENCE::GetLibPart(), SCH_SYMBOL::GetPosition(), SCH_REFERENCE::GetSheetPath(), SCH_REFERENCE::GetSymbol(), SCH_REFERENCE::GetUnit(), LIB_SYMBOL::GetUnitCount(), LIB_SYMBOL::GetUnitDisplayName(), SCH_SHEET_PATH::LastScreen(), m_refMap, m_settings, pin, PT_BIDI, PT_INPUT, and PT_POWER_IN.
Referenced by BOOST_FIXTURE_TEST_CASE(), and RunTests().
| int ERC_TESTER::TestMultiunitFootprints | ( | ) |
Test if all units of each multiunit symbol have the same footprint assigned.
Definition at line 780 of file erc.cpp.
References _, SCH_SCREEN::Append(), ERC_ITEM::Create(), ERCE_DIFFERENT_UNIT_FP, SCH_REFERENCE_LIST::GetCount(), SCH_REFERENCE::GetFootprint(), SCH_REFERENCE_LIST::GetItem(), SCH_SYMBOL::GetPosition(), SCH_SYMBOL::GetRef(), SCH_REFERENCE::GetSheetPath(), SCH_REFERENCE::GetSymbol(), SCH_SHEET_PATH::LastScreen(), and m_refMap.
Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and RunTests().
| int ERC_TESTER::TestMultUnitPinConflicts | ( | ) |
Checks if shared pins on multi-unit symbols have been connected to different nets.
Definition at line 1699 of file erc.cpp.
References _, SCH_SCREEN::Append(), ERC_ITEM::Create(), ERCE_DIFFERENT_UNIT_NET, CONNECTION_SUBGRAPH::GetItems(), CONNECTION_SUBGRAPH::GetSheet(), SCH_SHEET_PATH::LastScreen(), m_nets, name, pin, and SCH_PIN_T.
Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and RunTests().
| int ERC_TESTER::TestNoConnectPins | ( | ) |
In KiCad 5 and earlier, you could connect stuff up to pins with NC electrical type.
In KiCad 6, this no longer results in those pins joining the net, so we need to warn about it
Definition at line 1162 of file erc.cpp.
References _, ERC_ITEM::Create(), ERCE_NOCONNECT_CONNECTED, SCH_SYMBOL::GetPins(), m_sheetList, pin, PT_NC, SCH_NO_CONNECT_T, SCH_PIN_T, SCH_SYMBOL_T, and EDA_ITEM::Type().
Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and RunTests().
| int ERC_TESTER::TestOffGridEndpoints | ( | ) |
Test pins and wire ends for being off grid.
Definition at line 2413 of file erc.cpp.
References ERC_ITEM::Create(), ERCE_ENDPOINT_OFF_GRID, SCH_BUS_ENTRY_BASE::GetConnectionPoints(), SCH_LINE::GetEndPoint(), SCH_SYMBOL::GetPins(), SCH_LINE::GetStartPoint(), m_schematic, m_screens, pin, PT_NC, SCH_BUS_WIRE_ENTRY_T, SCH_LINE_T, SCH_SYMBOL_T, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by BOOST_FIXTURE_TEST_CASE(), and RunTests().
Check pin-to-pad maps (issue #2282): stale pin references, duplicate pad targets, bad pads and unmapped connected pins.
Footprint pad numbers come from the cvpcb kiface (aCvPcb), so the footprint-dependent checks (bad-pad, unmapped-connected-pin) run here when it is available. Drops a SCH_MARKER at the symbol body per violation.
Definition at line 188 of file erc.cpp.
References _, ERC_ITEM::Create(), ERCE_PIN_MAP_BAD_PAD, ERCE_PIN_MAP_DUPLICATE_PAD, ERCE_PIN_MAP_STALE_PIN, ERCE_PIN_MAP_UNMAPPED_PIN, ExpandStackedPinNotation(), PIN_MAP_SET::FindByName(), PIN_MAP_SET::GetAll(), LIB_SYMBOL::GetEffectiveAssociatedFootprints(), LIB_SYMBOL::GetEffectivePinMaps(), PIN_MAP::GetEntries(), SCH_SYMBOL::GetFootprintFieldText(), SCH_SYMBOL::GetLibSymbolRef(), PIN_MAP::GetName(), LIB_SYMBOL::GetPins(), SCH_SYMBOL::GetPins(), SCH_SYMBOL::GetPosition(), LIB_ID::GetUniStringLibId(), group, KIFACE::IfaceOrAddress(), PIN_MAP_SET::IsEmpty(), LIB_SYMBOL::JumperPinGroups(), KIFACE_FOOTPRINT_PAD_NUMBERS, m_schematic, m_screens, m_settings, m_sheetList, pad, LIB_ID::Parse(), pin, and SCH_SYMBOL_T.
Referenced by PIN_MAP_ERC_FIXTURE::runPinMapErc(), and RunTests().
| int ERC_TESTER::TestPinToPin | ( | ) |
Checks the full netlist against the pin-to-pin connectivity requirements.
Definition at line 1253 of file erc.cpp.
References _, ERC_ITEM::Create(), VECTOR2< T >::Distance(), distance(), DrivenPinTypes, DrivingPinTypes, DrivingPowerPinTypes, ElectricalPinTypeGetText(), erc, ERCE_PIN_NOT_DRIVEN, ERCE_PIN_TO_PIN_ERROR, ERCE_PIN_TO_PIN_WARNING, ERCE_POWERPIN_NOT_DRIVEN, CONNECTION_SUBGRAPH::GetItems(), CONNECTION_SUBGRAPH::GetNoConnect(), SCH_PIN::GetPosition(), CONNECTION_SUBGRAPH::GetSheet(), SCH_PIN::GetType(), SCH_PIN::IsPower(), SCH_PIN::IsStacked(), SCH_PIN::IsVisible(), SCH_SHEET_PATH::LastScreen(), m_nets, m_schematic, m_settings, m_showAllErrors, OK, ERC_SCH_PIN_CONTEXT::Pin(), pin, PT_POWER_IN, PT_UNSPECIFIED, SCH_PIN_T, ERC_SCH_PIN_CONTEXT::Sheet(), SM_HEURISTICS, TO_UTF8, traceSchNetChain, and WARNING.
Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and RunTests().
| int ERC_TESTER::TestSameLocalGlobalLabel | ( | ) |
Checks for global and local labels with the same name.
Definition at line 1936 of file erc.cpp.
References ERC_ITEM::Create(), ERCE_SAME_LOCAL_GLOBAL_LABEL, ERCE_SAME_LOCAL_GLOBAL_POWER, CONNECTION_SUBGRAPH::GetItems(), CONNECTION_SUBGRAPH::GetSheet(), SCH_LABEL_BASE::GetShownText(), SCH_SYMBOL::GetValue(), SCH_SYMBOL::IsGlobalPower(), m_nets, m_settings, pin, SCH_GLOBAL_LABEL_T, SCH_LABEL_T, SCH_PIN_T, and text.
Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and RunTests().
| int ERC_TESTER::TestSimilarLabels | ( | ) |
Checks for labels that differ only in capitalization.
Definition at line 2020 of file erc.cpp.
References ERC_ITEM::Create(), ERCE_SIMILAR_LABEL_AND_POWER, ERCE_SIMILAR_LABELS, ERCE_SIMILAR_POWER, CONNECTION_SUBGRAPH::GetItems(), CONNECTION_SUBGRAPH::GetSheet(), SCH_LABEL_BASE::GetShownText(), SCH_SYMBOL::GetValue(), m_nets, pin, SCH_GLOBAL_LABEL_T, SCH_HIER_LABEL_T, SCH_LABEL_T, and SCH_PIN_T.
Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and RunTests().
| int ERC_TESTER::TestSimModelIssues | ( | ) |
Test SPICE models for various issues.
Definition at line 2495 of file erc.cpp.
References ERC_ITEM::Create(), SIM_LIB_MGR::CreateModel(), ERCE_SIMULATION_MODEL, SCH_SYMBOL::GetPosition(), SCH_SYMBOL::GetRef(), m_schematic, m_sheetList, model, reporter, SCH_ITEM::ResolveExcludedFromSim(), and SCH_SYMBOL_T.
Referenced by RunTests().
| int ERC_TESTER::TestStackedPinNotation | ( | ) |
Checks for pin numbers that resemble stacked pin notation but are invalid.
Definition at line 1900 of file erc.cpp.
References SCH_SCREEN::Append(), ERC_ITEM::Create(), ERCE_STACKED_PIN_SYNTAX, SCH_SYMBOL::GetPins(), SCH_SCREEN::Items(), m_sheetList, EE_RTREE::OfType(), pin, and SCH_SYMBOL_T.
Referenced by RunTests().
| void ERC_TESTER::TestTextVars | ( | DS_PROXY_VIEW_ITEM * | aDrawingSheet | ) |
Check for any unresolved text variable references.
Definition at line 389 of file erc.cpp.
References _, SCH_SCREEN::Append(), DS_DRAW_ITEM_LIST::BuildDrawItemsList(), BOX2< Vec >::Centre(), ERC_ITEM::Create(), ERCE_GENERIC_ERROR, ERCE_GENERIC_WARNING, ERCE_UNRESOLVED_VARIABLE, ExpandEnvVarSubstitutions(), FOR_ERC_DRC, SCH_SHAPE::GetBoundingBox(), SCH_TEXT::GetBoundingBox(), SCH_SHEET::GetFields(), SCH_SYMBOL::GetFields(), DS_DRAW_ITEM_LIST::GetFirst(), SCH_SYMBOL::GetLibSymbolRef(), DS_DRAW_ITEM_LIST::GetNext(), DS_PROXY_VIEW_ITEM::GetPageInfo(), SCH_SHEET::GetPins(), EDA_ITEM::GetPosition(), SCH_SHAPE::GetPosition(), SCH_SYMBOL::GetPosition(), SCH_TEXT::GetPosition(), SCH_TEXT::GetShownText(), SCH_TEXTBOX::GetShownText(), EDA_TEXT::GetText(), DS_PROXY_VIEW_ITEM::GetTitleBlock(), SYMBOL::GetTransform(), SCH_SCREEN::Items(), m_schematic, m_sheetList, NO_RECURSE, EE_RTREE::OfType(), pin, SCH_SHEET_PATH::push_back(), LIB_SYMBOL::RunOnChildren(), SCH_FIELD_T, SCH_LOCATE_ANY_T, SCH_SHEET_T, SCH_SYMBOL_T, SCH_TEXT_T, SCH_TEXTBOX_T, schIUScale, DS_DRAW_ITEM_LIST::SetFileName(), DS_DRAW_ITEM_LIST::SetPageNumber(), DS_DRAW_ITEM_LIST::SetProject(), DS_DRAW_ITEM_LIST::SetSheetCount(), DS_DRAW_ITEM_LIST::SetSheetLayer(), DS_DRAW_ITEM_LIST::SetSheetName(), text, TRANSFORM::TransformCoordinate(), and EDA_ITEM::Type().
Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and RunTests().
| int ERC_TESTER::TestVariantSymbols | ( | ) |
Test all variant symbol overrides for resolution and pin compatibility.
Creates ERCE_VARIANT_SYMBOL_INVALID markers when a variant's symbol override LIB_ID cannot be resolved, and ERCE_VARIANT_SYMBOL_INCOMPATIBLE markers when the alternate symbol fails pin compatibility validation against the base symbol.
Definition at line 2549 of file erc.cpp.
References _, SCH_SCREEN::Append(), ERC_ITEM::Create(), ERCE_VARIANT_SYMBOL_INCOMPATIBLE, ERCE_VARIANT_SYMBOL_INVALID, LIB_ID::Format(), SCH_SYMBOL::GetInstance(), SCH_SYMBOL::GetLibId(), SCH_SYMBOL::GetLibSymbolRef(), SCH_SYMBOL::GetPosition(), SCH_SCREEN::Items(), SYMBOL_LIBRARY_ADAPTER::LoadSymbol(), m_schematic, m_settings, m_sheetList, SCH_SYMBOL_INSTANCE::m_Variants, EE_RTREE::OfType(), SCH_SYMBOL_T, PROJECT_SCH::SymbolLibAdapter(), and ValidateVariantSymbolCompatibility().
Referenced by RunTests().
|
private |
Definition at line 228 of file erc.h.
Referenced by ERC_TESTER(), TestMultUnitPinConflicts(), TestPinToPin(), TestSameLocalGlobalLabel(), and TestSimilarLabels().
|
private |
Definition at line 227 of file erc.h.
Referenced by ERC_TESTER(), TestMissingUnits(), and TestMultiunitFootprints().
|
private |
Definition at line 223 of file erc.h.
Referenced by ERC_TESTER(), RunTests(), TestFootprintFilters(), TestFootprintLinkIssues(), TestLibSymbolIssues(), TestMissingNetclasses(), TestOffGridEndpoints(), TestPinMap(), TestPinToPin(), TestSimModelIssues(), TestTextVars(), and TestVariantSymbols().
|
private |
Definition at line 226 of file erc.h.
Referenced by ERC_TESTER(), TestDuplicateSheetNames(), TestLibSymbolIssues(), TestOffGridEndpoints(), and TestPinMap().
|
private |
Definition at line 224 of file erc.h.
Referenced by ERC_TESTER(), RunTests(), TestLibSymbolIssues(), TestMissingUnits(), TestPinMap(), TestPinToPin(), TestSameLocalGlobalLabel(), and TestVariantSymbols().
|
private |
Definition at line 225 of file erc.h.
Referenced by ERC_TESTER(), RunTests(), TestDuplicatePinNets(), TestEmptyLabelNames(), TestFieldNameWhitespace(), TestFootprintFilters(), TestFootprintLinkIssues(), TestFourWayJunction(), TestGroundPins(), TestLabelMultipleWires(), TestMissingNetclasses(), TestNoConnectPins(), TestPinMap(), TestSimModelIssues(), TestStackedPinNotation(), TestTextVars(), and TestVariantSymbols().
|
private |
Definition at line 229 of file erc.h.
Referenced by ERC_TESTER(), and TestPinToPin().