49 BOOST_REQUIRE_MESSAGE( net !=
nullptr,
"net not found: " << aNet.ToStdString() );
51 std::vector<LENGTH_DELAY_CALCULATION_ITEM> items;
60 if( item.
Type() != LENGTH_DELAY_CALCULATION_ITEM::TYPE::UNKNOWN )
61 items.emplace_back( std::move( item ) );
66 for(
PAD*
pad : fp->Pads() )
73 if( item.
Type() != LENGTH_DELAY_CALCULATION_ITEM::TYPE::UNKNOWN )
74 items.emplace_back( std::move( item ) );
91 .OptimiseVias =
true, .MergeTracks =
true, .OptimiseTracesInPads =
true, .InferViaInPad =
false
94 .OptimiseVias =
false, .MergeTracks =
false, .OptimiseTracesInPads =
false, .InferViaInPad =
true
97 const int64_t skewLimit = 100000;
99 for(
const wxString& pair : { wxString(
"net1" ), wxString(
"net2" ), wxString(
"net3" ) } )
101 const wxString p =
"/" + pair +
"_P";
102 const wxString n =
"/" + pair +
"_N";
104 const int64_t drcSkew = std::llabs( netLength( p, drcOpts ) - netLength( n, drcOpts ) );
105 const int64_t tunSkew = std::llabs( netLength( p, tunerOpts ) - netLength( n, tunerOpts ) );
108 <<
" um, tuner skew = " << tunSkew / 1000.0 <<
" um" );
111 pair.ToStdString() <<
": DRC and tuner skew disagree by "
112 << std::llabs( drcSkew - tunSkew ) / 1000.0 <<
" um" );
Lightweight class which holds a pad, via, or a routed trace outline.
TYPE Type() const
Gets the routing item type.
Class which calculates lengths (and associated routing statistics) in a BOARD context.
int64_t CalculateLength(std::vector< LENGTH_DELAY_CALCULATION_ITEM > &aItems, PATH_OPTIMISATIONS aOptimisations, const PAD *aStartPad=nullptr, const PAD *aEndPad=nullptr) const
Calculates the electrical length of the given items.
LENGTH_DELAY_CALCULATION_ITEM GetLengthCalculationItem(const BOARD_CONNECTED_ITEM *aBoardItem) const
Return a LENGTH_CALCULATION_ITEM constructed from the given BOARD_CONNECTED_ITEM.
Handle the data for a net.
void LoadBoard(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< BOARD > &aBoard)
int64_t netLength(const wxString &aNet, const PATH_OPTIMISATIONS &aOpts)
SETTINGS_MANAGER m_settingsManager
std::unique_ptr< BOARD > m_board
Struct to control which optimisations the length calculation code runs on the given path objects.
BOOST_FIXTURE_TEST_CASE(DrcSkewArc_TunerVsDrc, DRC_SKEW_ARC_FIXTURE)
BOOST_CHECK_MESSAGE(totalMismatches==0, std::to_string(totalMismatches)+" board(s) with strategy disagreements")
BOOST_TEST_MESSAGE("\n=== Real-World Polygon PIP Benchmark ===\n"<< formatTable(table))