KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PANEL_SETUP_TUNING_PROFILE_INFO Class Reference

#include <panel_setup_tuning_profile_info.h>

Inheritance diagram for PANEL_SETUP_TUNING_PROFILE_INFO:
PANEL_SETUP_TUNING_PROFILE_INFO_BASE

Public Member Functions

 PANEL_SETUP_TUNING_PROFILE_INFO (wxWindow *aParentWindow, PANEL_SETUP_TUNING_PROFILES *parentPanel)
 
 ~PANEL_SETUP_TUNING_PROFILE_INFO () override
 
void UpdateLayerNames ()
 Updates the displayed layer names in all grids.
 
void LoadProfile (const TUNING_PROFILE &aProfile)
 Loads the given profile in to the panel.
 
TUNING_PROFILE GetProfile () const
 Saves the panel to the given profile.
 
void OnProfileNameChanged (wxCommandEvent &event) override
 Updates the parent notebook control.
 
void OnChangeProfileType (wxCommandEvent &event) override
 Changes between Single and Differential profiles.
 
void OnAddTrackRow (wxCommandEvent &event) override
 Adds a row to the track propagation grid.
 
void OnRemoveTrackRow (wxCommandEvent &event) override
 Removes a row from the track propagation grid.
 
void OnAddViaOverride (wxCommandEvent &event) override
 Adds a via override row.
 
void OnRemoveViaOverride (wxCommandEvent &event) override
 Removes a via override row.
 
wxString GetProfileName () const
 Gets the name of this profile.
 
bool ValidateProfile (size_t aPageIndex)
 Validate this panel's data.
 
void m_splitter1OnIdle (wxIdleEvent &)
 

Protected Attributes

wxStaticText * m_nameLabel
 
wxTextCtrl * m_name
 
wxStaticText * m_typeLabel
 
wxChoice * m_type
 
wxStaticText * m_targetImpedanceLabel
 
wxTextCtrl * m_targetImpedance
 
wxStaticText * m_ohmsLabel
 
wxCheckBox * m_enableDrcGeneration
 
wxCheckBox * m_enableDelayTuning
 
wxStaticLine * m_staticline1
 
wxSplitterWindow * m_splitter1
 
wxPanel * m_panel3
 
WX_GRIDm_trackPropagationGrid
 
STD_BITMAP_BUTTONm_addTrackPropogationLayer
 
STD_BITMAP_BUTTONm_deleteTrackPropogationLayer
 
wxPanel * m_panel4
 
wxStaticText * m_viaPropagationSpeedLabel
 
wxTextCtrl * m_viaPropagationSpeed
 
wxStaticText * m_viaPropSpeedUnits
 
wxStaticText * m_viaDelayOverridesLabel
 
WX_GRIDm_viaOverrides
 
STD_BITMAP_BUTTONm_addViaPropagationOverride
 
STD_BITMAP_BUTTONm_removeViaPropagationOverride
 

Private Types

enum  TRACK_GRID_COLS {
  TRACK_GRID_SIGNAL_LAYER = 0 , TRACK_GRID_TOP_REFERENCE , TRACK_GRID_BOTTOM_REFERENCE , TRACK_GRID_TRACK_WIDTH ,
  TRACK_GRID_TRACK_GAP , TRACK_GRID_DELAY
}
 
enum  VIA_GRID_COLS {
  VIA_GRID_SIGNAL_LAYER_FROM = 0 , VIA_GRID_SIGNAL_LAYER_TO , VIA_GRID_VIA_LAYER_FROM , VIA_GRID_VIA_LAYER_TO ,
  VIA_GRID_DELAY
}
 
enum class  CalculationType { WIDTH , GAP , DELAY }
 

Private Member Functions

void initPanel ()
 Initialises all controls on the panel.
 
void setColumnWidths ()
 Set up the widths of all grid columns.
 
std::pair< int, int > calculateSingleMicrostrip (const int aRow, CalculationType aCalculationType)
 Calculates the track width or delay for the given propagation grid row.
 
std::pair< int, int > calculateSingleStripline (const int aRow, CalculationType aCalculationType)
 Calculates the track width or delay for the given propagation grid row.
 
std::tuple< int, int, int > calculateDifferentialMicrostrip (int aRow, CalculationType aCalculationType)
 Calculates the track width, pair gap, or delay for the given propagation grid row.
 
std::tuple< int, int, int > calculateDifferentialStripline (int aRow, CalculationType aCalculationType)
 Calculates the track width, pair gap, or delay for the given propagation grid row.
 
void getDielectricDetails (const std::vector< BOARD_STACKUP_ITEM * > &aStackupLayerList, int aSignalLayerId, int aReferenceLayerId, std::vector< int > &aDielectricLayerStackupIds, double &aDielectricLayerHeight)
 Gets the dielectric layers and heights for dielectrics between the two given copper layer IDs.
 
double getTargetImpedance () const
 Gets the target impedance for the profile.
 
void calculateTrackParametersForCell (int aRow, int aCol)
 Calculates the required track parameters for the given track parameters grid row and col.
 
void onChangeProfileType (TUNING_PROFILE::PROFILE_TYPE aType) const
 Sets the panel display for the given tuning type.
 

Static Private Member Functions

static double calculateSkinDepth (double aFreq, double aMurc, double aSigma)
 Calculate the effective skin depth for the given parameters.
 
static int getStackupLayerId (const std::vector< BOARD_STACKUP_ITEM * > &aLayerList, PCB_LAYER_ID aPcbLayerId)
 Gets the index in to the layer list for the given layer.
 
static std::pair< double, double > calculateAverageDielectricConstants (const std::vector< BOARD_STACKUP_ITEM * > &aStackupLayerList, const std::vector< int > &dielectricLayerStackupIds, const EDA_IU_SCALE &aIuScale)
 Calculates the geometric average of the dielectric material properties.
 

Private Attributes

PANEL_SETUP_TUNING_PROFILESm_parentPanel
 The parent setup panel.
 
UNIT_BINDER m_viaPropagationUnits
 Units for global via propagation unit delay.
 
MICROSTRIP m_microstripCalc
 Calculator for single microstrip parameters.
 
STRIPLINE m_striplineCalc
 Calculator for single stripline parameters.
 
COUPLED_MICROSTRIP m_coupledMicrostripCalc
 Calculator for coupled (differential) microstrip parameters.
 
COUPLED_STRIPLINE m_coupledStriplineCalc
 Calculator for coupled (differential) stripline parameters.
 

Static Private Attributes

static constexpr double RHO = 1.72e-8
 

Detailed Description

Definition at line 39 of file panel_setup_tuning_profile_info.h.

Member Enumeration Documentation

◆ CalculationType

Enumerator
WIDTH 
GAP 
DELAY 

Definition at line 99 of file panel_setup_tuning_profile_info.h.

◆ TRACK_GRID_COLS

Enumerator
TRACK_GRID_SIGNAL_LAYER 
TRACK_GRID_TOP_REFERENCE 
TRACK_GRID_BOTTOM_REFERENCE 
TRACK_GRID_TRACK_WIDTH 
TRACK_GRID_TRACK_GAP 
TRACK_GRID_DELAY 

Definition at line 80 of file panel_setup_tuning_profile_info.h.

◆ VIA_GRID_COLS

Enumerator
VIA_GRID_SIGNAL_LAYER_FROM 
VIA_GRID_SIGNAL_LAYER_TO 
VIA_GRID_VIA_LAYER_FROM 
VIA_GRID_VIA_LAYER_TO 
VIA_GRID_DELAY 

Definition at line 90 of file panel_setup_tuning_profile_info.h.

Constructor & Destructor Documentation

◆ PANEL_SETUP_TUNING_PROFILE_INFO()

◆ ~PANEL_SETUP_TUNING_PROFILE_INFO()

PANEL_SETUP_TUNING_PROFILE_INFO::~PANEL_SETUP_TUNING_PROFILE_INFO ( )
override

Member Function Documentation

◆ calculateAverageDielectricConstants()

std::pair< double, double > PANEL_SETUP_TUNING_PROFILE_INFO::calculateAverageDielectricConstants ( const std::vector< BOARD_STACKUP_ITEM * > & aStackupLayerList,
const std::vector< int > & dielectricLayerStackupIds,
const EDA_IU_SCALE & aIuScale )
staticprivate

Calculates the geometric average of the dielectric material properties.

Note: This is a poor approximation as the electric field distribution is not equal across the dielectrics. However, it will do as an approximation before we have a field solver integrated.

Returns
(E_r, LossTangent) pair

Definition at line 654 of file panel_setup_tuning_profile_info.cpp.

References BOARD_STACKUP_ITEM::GetEpsilonR(), BOARD_STACKUP_ITEM::GetLossTangent(), BOARD_STACKUP_ITEM::GetThickness(), and EDA_IU_SCALE::IUTomm().

Referenced by calculateDifferentialMicrostrip(), calculateDifferentialStripline(), calculateSingleMicrostrip(), and calculateSingleStripline().

◆ calculateDifferentialMicrostrip()

◆ calculateDifferentialStripline()

◆ calculateSingleMicrostrip()

◆ calculateSingleStripline()

◆ calculateSkinDepth()

double PANEL_SETUP_TUNING_PROFILE_INFO::calculateSkinDepth ( double aFreq,
double aMurc,
double aSigma )
staticprivate

Calculate the effective skin depth for the given parameters.

Definition at line 614 of file panel_setup_tuning_profile_info.cpp.

References M_PI, and TRANSLINE_CALCULATIONS::MU0.

Referenced by calculateDifferentialMicrostrip(), calculateDifferentialStripline(), calculateSingleMicrostrip(), and calculateSingleStripline().

◆ calculateTrackParametersForCell()

◆ getDielectricDetails()

void PANEL_SETUP_TUNING_PROFILE_INFO::getDielectricDetails ( const std::vector< BOARD_STACKUP_ITEM * > & aStackupLayerList,
int aSignalLayerId,
int aReferenceLayerId,
std::vector< int > & aDielectricLayerStackupIds,
double & aDielectricLayerHeight )
private

◆ GetProfile()

TUNING_PROFILE PANEL_SETUP_TUNING_PROFILE_INFO::GetProfile ( ) const

Saves the panel to the given profile.

Definition at line 209 of file panel_setup_tuning_profile_info.cpp.

References DELAY_PROFILE_TRACK_PROPAGATION_ENTRY::GetSignalLayer(), IsCopperLayerLowerThan(), PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_enableDelayTuning, PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_enableDrcGeneration, TUNING_PROFILE::m_EnableTimeDomainTuning, TUNING_PROFILE::m_GenerateNetClassDRCRules, PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_name, m_parentPanel, TUNING_PROFILE::m_ProfileName, TUNING_PROFILE::m_TargetImpedance, PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_targetImpedance, TUNING_PROFILE::m_TrackPropagationEntries, TUNING_PROFILE::m_TrackPropagationEntriesMap, PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_trackPropagationGrid, TUNING_PROFILE::m_Type, PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_type, TUNING_PROFILE::m_ViaOverrides, PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_viaOverrides, TUNING_PROFILE::m_ViaPropagationDelay, m_viaPropagationUnits, DELAY_PROFILE_TRACK_PROPAGATION_ENTRY::SetBottomReferenceLayer(), DELAY_PROFILE_TRACK_PROPAGATION_ENTRY::SetDelay(), DELAY_PROFILE_TRACK_PROPAGATION_ENTRY::SetDiffPairGap(), DELAY_PROFILE_TRACK_PROPAGATION_ENTRY::SetEnableTimeDomainTuning(), DELAY_PROFILE_TRACK_PROPAGATION_ENTRY::SetSignalLayer(), DELAY_PROFILE_TRACK_PROPAGATION_ENTRY::SetTopReferenceLayer(), DELAY_PROFILE_TRACK_PROPAGATION_ENTRY::SetWidth(), TRACK_GRID_BOTTOM_REFERENCE, TRACK_GRID_DELAY, TRACK_GRID_SIGNAL_LAYER, TRACK_GRID_TOP_REFERENCE, TRACK_GRID_TRACK_GAP, TRACK_GRID_TRACK_WIDTH, UNDEFINED_LAYER, VIA_GRID_DELAY, VIA_GRID_SIGNAL_LAYER_FROM, VIA_GRID_SIGNAL_LAYER_TO, VIA_GRID_VIA_LAYER_FROM, and VIA_GRID_VIA_LAYER_TO.

Referenced by PANEL_SETUP_TUNING_PROFILES::TransferDataFromWindow().

◆ GetProfileName()

wxString PANEL_SETUP_TUNING_PROFILE_INFO::GetProfileName ( ) const

Gets the name of this profile.

Definition at line 608 of file panel_setup_tuning_profile_info.cpp.

References PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_name.

◆ getStackupLayerId()

int PANEL_SETUP_TUNING_PROFILE_INFO::getStackupLayerId ( const std::vector< BOARD_STACKUP_ITEM * > & aLayerList,
PCB_LAYER_ID aPcbLayerId )
staticprivate

Gets the index in to the layer list for the given layer.

Returns
-1 if not found

Definition at line 621 of file panel_setup_tuning_profile_info.cpp.

Referenced by calculateDifferentialMicrostrip(), calculateDifferentialStripline(), calculateSingleMicrostrip(), and calculateSingleStripline().

◆ getTargetImpedance()

double PANEL_SETUP_TUNING_PROFILE_INFO::getTargetImpedance ( ) const
private

◆ initPanel()

◆ LoadProfile()

◆ m_splitter1OnIdle()

void PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_splitter1OnIdle ( wxIdleEvent & )
inlineinherited

◆ OnAddTrackRow()

void PANEL_SETUP_TUNING_PROFILE_INFO::OnAddTrackRow ( wxCommandEvent & event)
overridevirtual

◆ OnAddViaOverride()

void PANEL_SETUP_TUNING_PROFILE_INFO::OnAddViaOverride ( wxCommandEvent & event)
overridevirtual

◆ OnChangeProfileType()

void PANEL_SETUP_TUNING_PROFILE_INFO::OnChangeProfileType ( wxCommandEvent & event)
overridevirtual

Changes between Single and Differential profiles.

Reimplemented from PANEL_SETUP_TUNING_PROFILE_INFO_BASE.

Definition at line 489 of file panel_setup_tuning_profile_info.cpp.

References TUNING_PROFILE::DIFFERENTIAL, onChangeProfileType(), and TUNING_PROFILE::SINGLE.

◆ onChangeProfileType()

void PANEL_SETUP_TUNING_PROFILE_INFO::onChangeProfileType ( TUNING_PROFILE::PROFILE_TYPE aType) const
private

◆ OnProfileNameChanged()

void PANEL_SETUP_TUNING_PROFILE_INFO::OnProfileNameChanged ( wxCommandEvent & event)
overridevirtual

Updates the parent notebook control.

Reimplemented from PANEL_SETUP_TUNING_PROFILE_INFO_BASE.

Definition at line 482 of file panel_setup_tuning_profile_info.cpp.

References m_parentPanel.

◆ OnRemoveTrackRow()

void PANEL_SETUP_TUNING_PROFILE_INFO::OnRemoveTrackRow ( wxCommandEvent & event)
overridevirtual

Removes a row from the track propagation grid.

Reimplemented from PANEL_SETUP_TUNING_PROFILE_INFO_BASE.

Definition at line 577 of file panel_setup_tuning_profile_info.cpp.

References PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_trackPropagationGrid.

◆ OnRemoveViaOverride()

void PANEL_SETUP_TUNING_PROFILE_INFO::OnRemoveViaOverride ( wxCommandEvent & event)
overridevirtual

Removes a via override row.

Reimplemented from PANEL_SETUP_TUNING_PROFILE_INFO_BASE.

Definition at line 599 of file panel_setup_tuning_profile_info.cpp.

References PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_viaOverrides.

◆ setColumnWidths()

◆ UpdateLayerNames()

◆ ValidateProfile()

bool PANEL_SETUP_TUNING_PROFILE_INFO::ValidateProfile ( size_t aPageIndex)

Member Data Documentation

◆ m_addTrackPropogationLayer

STD_BITMAP_BUTTON* PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_addTrackPropogationLayer
protectedinherited

◆ m_addViaPropagationOverride

STD_BITMAP_BUTTON* PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_addViaPropagationOverride
protectedinherited

◆ m_coupledMicrostripCalc

COUPLED_MICROSTRIP PANEL_SETUP_TUNING_PROFILE_INFO::m_coupledMicrostripCalc
private

Calculator for coupled (differential) microstrip parameters.

Definition at line 174 of file panel_setup_tuning_profile_info.h.

Referenced by calculateDifferentialMicrostrip().

◆ m_coupledStriplineCalc

COUPLED_STRIPLINE PANEL_SETUP_TUNING_PROFILE_INFO::m_coupledStriplineCalc
private

Calculator for coupled (differential) stripline parameters.

Definition at line 177 of file panel_setup_tuning_profile_info.h.

Referenced by calculateDifferentialStripline().

◆ m_deleteTrackPropogationLayer

STD_BITMAP_BUTTON* PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_deleteTrackPropogationLayer
protectedinherited

◆ m_enableDelayTuning

wxCheckBox* PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_enableDelayTuning
protectedinherited

◆ m_enableDrcGeneration

wxCheckBox* PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_enableDrcGeneration
protectedinherited

◆ m_microstripCalc

MICROSTRIP PANEL_SETUP_TUNING_PROFILE_INFO::m_microstripCalc
private

Calculator for single microstrip parameters.

Definition at line 168 of file panel_setup_tuning_profile_info.h.

Referenced by calculateDifferentialMicrostrip(), and calculateSingleMicrostrip().

◆ m_name

◆ m_nameLabel

wxStaticText* PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_nameLabel
protectedinherited

◆ m_ohmsLabel

wxStaticText* PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_ohmsLabel
protectedinherited

◆ m_panel3

wxPanel* PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_panel3
protectedinherited

◆ m_panel4

wxPanel* PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_panel4
protectedinherited

◆ m_parentPanel

◆ m_removeViaPropagationOverride

STD_BITMAP_BUTTON* PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_removeViaPropagationOverride
protectedinherited

◆ m_splitter1

wxSplitterWindow* PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_splitter1
protectedinherited

◆ m_staticline1

wxStaticLine* PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_staticline1
protectedinherited

◆ m_striplineCalc

STRIPLINE PANEL_SETUP_TUNING_PROFILE_INFO::m_striplineCalc
private

Calculator for single stripline parameters.

Definition at line 171 of file panel_setup_tuning_profile_info.h.

Referenced by calculateSingleStripline().

◆ m_targetImpedance

◆ m_targetImpedanceLabel

wxStaticText* PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_targetImpedanceLabel
protectedinherited

◆ m_trackPropagationGrid

◆ m_type

◆ m_typeLabel

wxStaticText* PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_typeLabel
protectedinherited

◆ m_viaDelayOverridesLabel

wxStaticText* PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_viaDelayOverridesLabel
protectedinherited

◆ m_viaOverrides

◆ m_viaPropagationSpeed

wxTextCtrl* PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_viaPropagationSpeed
protectedinherited

◆ m_viaPropagationSpeedLabel

wxStaticText* PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_viaPropagationSpeedLabel
protectedinherited

◆ m_viaPropagationUnits

UNIT_BINDER PANEL_SETUP_TUNING_PROFILE_INFO::m_viaPropagationUnits
private

Units for global via propagation unit delay.

Definition at line 165 of file panel_setup_tuning_profile_info.h.

Referenced by GetProfile(), initPanel(), LoadProfile(), and PANEL_SETUP_TUNING_PROFILE_INFO().

◆ m_viaPropSpeedUnits

wxStaticText* PANEL_SETUP_TUNING_PROFILE_INFO_BASE::m_viaPropSpeedUnits
protectedinherited

◆ RHO

double PANEL_SETUP_TUNING_PROFILE_INFO::RHO = 1.72e-8
staticconstexprprivate

The documentation for this class was generated from the following files: