Default skew tuning lenght to diff between N/P, but allow override.

This commit is contained in:
Jeff Young 2023-10-08 20:40:20 +01:00
parent 5793abd310
commit 35d8635a6b
5 changed files with 22 additions and 7 deletions

View File

@ -27,7 +27,7 @@
WX_UNIT_ENTRY_DIALOG::WX_UNIT_ENTRY_DIALOG( EDA_DRAW_FRAME* aParent, const wxString& aCaption,
const wxString& aLabel, int aDefaultValue ) :
const wxString& aLabel, long long int aDefaultValue ) :
WX_UNIT_ENTRY_DIALOG_BASE( ( wxWindow* ) aParent, wxID_ANY, aCaption ),
m_unit_binder( aParent, m_label, m_textCtrl, m_unit_label, true )
{

View File

@ -41,7 +41,7 @@ class WX_UNIT_ENTRY_DIALOG : public WX_UNIT_ENTRY_DIALOG_BASE
{
public:
WX_UNIT_ENTRY_DIALOG( EDA_DRAW_FRAME* aParent, const wxString& aCaption, const wxString& aLabel,
int aDefaultValue );
long long int aDefaultValue );
/**
* Returns the value in internal units

View File

@ -29,6 +29,7 @@
#include <board_design_settings.h>
#include "pns_router.h"
#include "pns_meander_placer.h" // fixme: move settings to separate header
#include "pns_meander_skew_placer.h"
#include "pns_tune_status_popup.h"
#include "length_tuner_tool.h"
@ -184,8 +185,22 @@ void LENGTH_TUNER_TOOL::performTuning()
return;
}
if( m_lastTuneMode == PNS::PNS_MODE_TUNE_SINGLE
|| m_lastTuneMode == PNS::PNS_MODE_TUNE_DIFF_PAIR )
if( m_lastTuneMode == PNS::PNS_MODE_TUNE_DIFF_PAIR_SKEW )
{
PNS::MEANDER_SKEW_PLACER* skewPlacer = static_cast<PNS::MEANDER_SKEW_PLACER*>( placer );
WX_UNIT_ENTRY_DIALOG dlg( frame(), _( "Skew Tuning" ), _( "Target skew:" ),
skewPlacer->CurrentSkew() );
if( dlg.ShowModal() != wxID_OK )
{
m_router->StopRouting();
highlightNets( false );
return;
}
settings->m_targetLength = dlg.GetValue();
}
else
{
std::shared_ptr<DRC_ENGINE>& drcEngine = bds.m_DRCEngine;
DRC_CONSTRAINT constraint;

View File

@ -132,7 +132,7 @@ long long int MEANDER_SKEW_PLACER::origPathLength() const
}
long long int MEANDER_SKEW_PLACER::currentSkew() const
long long int MEANDER_SKEW_PLACER::CurrentSkew() const
{
return m_lastLength - m_coupledLength;
}

View File

@ -51,9 +51,9 @@ public:
/// @copydoc MEANDER_PLACER_BASE::TuningInfo()
const wxString TuningInfo( EDA_UNITS aUnits ) const override;
private:
long long int currentSkew() const;
long long int CurrentSkew() const;
private:
long long int origPathLength() const override;
DIFF_PAIR m_originPair;