Formatting.
This commit is contained in:
parent
0fea6f5ac3
commit
d6c7f46842
|
@ -272,16 +272,14 @@ bool test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run()
|
||||||
{
|
{
|
||||||
m_board = m_drcEngine->GetBoard();
|
m_board = m_drcEngine->GetBoard();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
std::map<DIFF_PAIR_KEY, DIFF_PAIR_ITEMS> dpRuleMatches;
|
std::map<DIFF_PAIR_KEY, DIFF_PAIR_ITEMS> dpRuleMatches;
|
||||||
|
|
||||||
auto evaluateDpConstraints =
|
auto evaluateDpConstraints =
|
||||||
[&]( BOARD_ITEM *item ) -> bool
|
[&]( BOARD_ITEM *item ) -> bool
|
||||||
{
|
{
|
||||||
DIFF_PAIR_KEY key;
|
DIFF_PAIR_KEY key;
|
||||||
BOARD_CONNECTED_ITEM* citem = static_cast<BOARD_CONNECTED_ITEM*>( item );
|
BOARD_CONNECTED_ITEM* citem = static_cast<BOARD_CONNECTED_ITEM*>( item );
|
||||||
NETINFO_ITEM* refNet = citem->GetNet();
|
NETINFO_ITEM* refNet = citem->GetNet();
|
||||||
|
|
||||||
if( refNet && DRC_ENGINE::IsNetADiffPair( m_board, refNet, key.netP, key.netN ) )
|
if( refNet && DRC_ENGINE::IsNetADiffPair( m_board, refNet, key.netP, key.netN ) )
|
||||||
{
|
{
|
||||||
|
@ -294,8 +292,9 @@ bool test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run()
|
||||||
|
|
||||||
for( int i = 0; i < 2; i++ )
|
for( int i = 0; i < 2; i++ )
|
||||||
{
|
{
|
||||||
auto constraint = m_drcEngine->EvalRules( constraintsToCheck[ i ], item,
|
DRC_CONSTRAINT constraint = m_drcEngine->EvalRules( constraintsToCheck[ i ],
|
||||||
nullptr, item->GetLayer() );
|
item, nullptr,
|
||||||
|
item->GetLayer() );
|
||||||
|
|
||||||
if( constraint.IsNull() || constraint.GetSeverity() == RPT_SEVERITY_IGNORE )
|
if( constraint.IsNull() || constraint.GetSeverity() == RPT_SEVERITY_IGNORE )
|
||||||
continue;
|
continue;
|
||||||
|
@ -321,7 +320,6 @@ bool test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run()
|
||||||
|
|
||||||
drc_dbg( 10, wxT( "dp rule matches %d\n" ), (int) dpRuleMatches.size() );
|
drc_dbg( 10, wxT( "dp rule matches %d\n" ), (int) dpRuleMatches.size() );
|
||||||
|
|
||||||
|
|
||||||
reportAux( wxT( "DPs evaluated:" ) );
|
reportAux( wxT( "DPs evaluated:" ) );
|
||||||
|
|
||||||
for( auto& [ key, itemSet ] : dpRuleMatches )
|
for( auto& [ key, itemSet ] : dpRuleMatches )
|
||||||
|
@ -378,7 +376,7 @@ bool test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run()
|
||||||
|
|
||||||
dp.computedGap = gap;
|
dp.computedGap = gap;
|
||||||
|
|
||||||
auto overlay = m_drcEngine->GetDebugOverlay();
|
std::shared_ptr<KIGFX::VIEW_OVERLAY> overlay = m_drcEngine->GetDebugOverlay();
|
||||||
|
|
||||||
if( overlay )
|
if( overlay )
|
||||||
{
|
{
|
||||||
|
@ -398,8 +396,8 @@ bool test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run()
|
||||||
|
|
||||||
if( gapConstraint )
|
if( gapConstraint )
|
||||||
{
|
{
|
||||||
auto val = gapConstraint->GetValue();
|
const MINOPTMAX<int>& val = gapConstraint->GetValue();
|
||||||
bool insideRange = true;
|
bool insideRange = true;
|
||||||
|
|
||||||
if( val.HasMin() && gap < val.Min() )
|
if( val.HasMin() && gap < val.Min() )
|
||||||
insideRange = false;
|
insideRange = false;
|
||||||
|
@ -427,7 +425,7 @@ bool test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run()
|
||||||
|
|
||||||
bool uncoupledViolation = false;
|
bool uncoupledViolation = false;
|
||||||
|
|
||||||
if( maxUncoupledConstraint && ( !itemSet.itemsP.empty() || ! itemSet.itemsN.empty() ) )
|
if( maxUncoupledConstraint && ( !itemSet.itemsP.empty() || !itemSet.itemsN.empty() ) )
|
||||||
{
|
{
|
||||||
const MINOPTMAX<int>& val = maxUncoupledConstraint->GetValue();
|
const MINOPTMAX<int>& val = maxUncoupledConstraint->GetValue();
|
||||||
|
|
||||||
|
@ -475,7 +473,7 @@ bool test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( gapConstraint && ( uncoupledViolation || !maxUncoupledConstraint ) )
|
if( gapConstraint && ( uncoupledViolation || !maxUncoupledConstraint ) )
|
||||||
{
|
{
|
||||||
for( DIFF_PAIR_COUPLED_SEGMENTS& dp : itemSet.coupled )
|
for( DIFF_PAIR_COUPLED_SEGMENTS& dp : itemSet.coupled )
|
||||||
{
|
{
|
||||||
|
@ -489,12 +487,16 @@ bool test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run()
|
||||||
gapConstraint->GetParentRule()->m_Name + wxS( " " );
|
gapConstraint->GetParentRule()->m_Name + wxS( " " );
|
||||||
|
|
||||||
if( val.HasMin() )
|
if( val.HasMin() )
|
||||||
|
{
|
||||||
msg += wxString::Format( _( "minimum gap: %s; " ),
|
msg += wxString::Format( _( "minimum gap: %s; " ),
|
||||||
MessageTextFromValue( val.Min() ) );
|
MessageTextFromValue( val.Min() ) );
|
||||||
|
}
|
||||||
|
|
||||||
if( val.HasMax() )
|
if( val.HasMax() )
|
||||||
|
{
|
||||||
msg += wxString::Format( _( "maximum gap: %s; " ),
|
msg += wxString::Format( _( "maximum gap: %s; " ),
|
||||||
MessageTextFromValue( val.Max() ) );
|
MessageTextFromValue( val.Max() ) );
|
||||||
|
}
|
||||||
|
|
||||||
msg += wxString::Format( _( "actual: %s)" ),
|
msg += wxString::Format( _( "actual: %s)" ),
|
||||||
MessageTextFromValue( dp.computedGap ) );
|
MessageTextFromValue( dp.computedGap ) );
|
||||||
|
|
Loading…
Reference in New Issue