|
KiCad PCB EDA Suite
|
#include <topo_match.h>
Public Member Functions | |
| CONNECTION_GRAPH () | |
| ~CONNECTION_GRAPH () | |
| void | BuildConnectivity () |
| void | AddFootprint (FOOTPRINT *aFp, const VECTOR2I &aOffset) |
| bool | FindIsomorphism (CONNECTION_GRAPH *target, COMPONENT_MATCHES &result, std::vector< TOPOLOGY_MISMATCH_REASON > &aFailureDetails, const ISOMORPHISM_PARAMS &aParams={}) |
| std::vector< COMPONENT * > & | Components () |
Static Public Member Functions | |
| static std::unique_ptr< CONNECTION_GRAPH > | BuildFromFootprintSet (const std::set< FOOTPRINT * > &aFps) |
Public Attributes | |
| const int | c_ITER_LIMIT = 10000 |
Private Member Functions | |
| void | breakTie (COMPONENT *aRef, std::vector< COMPONENT * > &aMatches) const |
| Many times components are electrically/topologically identical, e.g. | |
| bool | breakTieBySymbolUuid (COMPONENT *aRef, std::vector< COMPONENT * > &aMatches) const |
| The most useful tie breaker is based on symbol/sheet instances, since multiple channels in a design are very often multiple instances of the same sheet. | |
| void | sortByPinCount () |
| std::vector< COMPONENT * > | findMatchingComponents (COMPONENT *ref, const std::vector< COMPONENT * > &aStructuralMatches, const BACKTRACK_STAGE &partialMatches, std::vector< TOPOLOGY_MISMATCH_REASON > &aFailureDetails, const std::atomic< bool > *aCancelled=nullptr) |
Private Attributes | |
| std::vector< COMPONENT * > | m_components |
Definition at line 186 of file topo_match.h.
| CONNECTION_GRAPH::CONNECTION_GRAPH | ( | ) |
Definition at line 1153 of file topo_match.cpp.
Referenced by FindIsomorphism().
| CONNECTION_GRAPH::~CONNECTION_GRAPH | ( | ) |
Definition at line 1159 of file topo_match.cpp.
References m_components.
Definition at line 1117 of file topo_match.cpp.
References COMPONENT, FOOTPRINT::GetReference(), m_components, pad, FOOTPRINT::Pads(), PIN, and pin.
|
private |
Many times components are electrically/topologically identical, e.g.
a bunch of decoupling capacitors connected to the same power supply and ground. However, the user doesn't want them to be picked randomly, so we implement a number of strategies to break ties between components.
Definition at line 370 of file topo_match.cpp.
References breakTieBySymbolUuid(), TMATCH::COMPONENT::GetParent(), FOOTPRINT::GetReferenceAsString(), traceTopoMatch, and traceTopoMatchDetail.
|
private |
The most useful tie breaker is based on symbol/sheet instances, since multiple channels in a design are very often multiple instances of the same sheet.
Definition at line 403 of file topo_match.cpp.
References KIID::AsString(), TMATCH::COMPONENT::GetParent(), FOOTPRINT::GetReferenceAsString(), niluuid, path, and traceTopoMatchDetail.
Referenced by breakTie().
| void CONNECTION_GRAPH::BuildConnectivity | ( | ) |
Definition at line 525 of file topo_match.cpp.
References m_components, sortByPinCount(), and traceTopoMatch.
|
static |
Definition at line 1134 of file topo_match.cpp.
Referenced by MULTICHANNEL_TOOL::resolveConnectionTopology().
|
inline |
Definition at line 200 of file topo_match.h.
References m_components.
| bool CONNECTION_GRAPH::FindIsomorphism | ( | CONNECTION_GRAPH * | target, |
| COMPONENT_MATCHES & | result, | ||
| std::vector< TOPOLOGY_MISMATCH_REASON > & | aFailureDetails, | ||
| const ISOMORPHISM_PARAMS & | aParams = {} ) |
Definition at line 572 of file topo_match.cpp.
References _, CONNECTION_GRAPH(), GetKiCadThreadPool(), TMATCH::ISOMORPHISM_PARAMS::m_cancelled, m_components, TMATCH::TOPOLOGY_MISMATCH_REASON::m_reason, TMATCH::ISOMORPHISM_PARAMS::m_totalComponents, top(), and tp.
|
private |
Definition at line 257 of file topo_match.cpp.
References _, TMATCH::buildBaseNetMapping(), TMATCH::checkCandidateNetConsistency(), TMATCH::COMPONENT::GetParent(), TMATCH::COMPONENT::GetPinCount(), FOOTPRINT::GetReferenceAsString(), TMATCH::TOPOLOGY_MISMATCH_REASON::m_candidate, TMATCH::BACKTRACK_STAGE::m_locked, TMATCH::COMPONENT::m_pins, TMATCH::TOPOLOGY_MISMATCH_REASON::m_reason, TMATCH::COMPONENT::m_reference, TMATCH::TOPOLOGY_MISMATCH_REASON::m_reference, PROF_TIMER::msecs(), PROF_TIMER::Stop(), PROF_TIMER::to_string(), traceTopoMatch, and traceTopoMatchDetail.
|
private |
Definition at line 512 of file topo_match.cpp.
References m_components.
Referenced by BuildConnectivity().
| const int TMATCH::CONNECTION_GRAPH::c_ITER_LIMIT = 10000 |
Definition at line 189 of file topo_match.h.
|
private |
Definition at line 224 of file topo_match.h.
Referenced by AddFootprint(), BuildConnectivity(), Components(), FindIsomorphism(), sortByPinCount(), and ~CONNECTION_GRAPH().