KiCad PCB EDA Suite
Loading...
Searching...
No Matches
TUNING_PROFILE_PARAMETERS_USER_DEFINED Class Referencefinal

#include <tuning_profile_parameters_user_defined.h>

Inheritance diagram for TUNING_PROFILE_PARAMETERS_USER_DEFINED:
TUNING_PROFILE_PARAMETERS_IFACE

Classes

struct  VIA_OVERRIDE_CACHE_KEY
 Cache key for use with std::map. More...
 

Public Member Functions

 TUNING_PROFILE_PARAMETERS_USER_DEFINED (BOARD *aBoard, LENGTH_DELAY_CALCULATION *aCalculation)
 
void OnSettingsChanged () override
 Event called by the length and time calculation architecture if netclass definitions have changed.
 
std::vector< int64_t > GetPropagationDelays (const std::vector< LENGTH_DELAY_CALCULATION_ITEM > &aItems, const TUNING_PROFILE_GEOMETRY_CONTEXT &aContext) override
 Gets the propagation delays (in internal units) for the given items in the given geometry context.
 
int64_t GetPropagationDelay (const LENGTH_DELAY_CALCULATION_ITEM &aItem, const TUNING_PROFILE_GEOMETRY_CONTEXT &aContext) override
 Gets the propagation delay (in internal units) for the given item in the given geometry context.
 
int64_t GetTrackLengthForPropagationDelay (int64_t aDelay, const TUNING_PROFILE_GEOMETRY_CONTEXT &aContext) override
 Gets the track length (in internal distance units) required for the given propagation delay (in internal time units).
 
int64_t CalculatePropagationDelayForShapeLineChain (const SHAPE_LINE_CHAIN &aShape, const TUNING_PROFILE_GEOMETRY_CONTEXT &aContext) override
 Gets the propagation delay for the given shape line chain.
 
virtual void OnStackupChanged ()
 Event called by the length and time calculation architecture if the board stackup has changed.
 

Protected Attributes

BOARDm_board
 The board all calculations are for.
 
LENGTH_DELAY_CALCULATIONm_lengthCalculation
 The parent length / delay calculation object.
 

Private Member Functions

void rebuildCaches ()
 
int64_t getPropagationDelay (const LENGTH_DELAY_CALCULATION_ITEM &aItem, const TUNING_PROFILE_GEOMETRY_CONTEXT &aContext, const TUNING_PROFILE *aDelayProfile) const
 Gets the propagation delay (in internal units) for the given item in the given geometry context, for items in the pre-found net class.
 
const TUNING_PROFILEGetTuningProfile (const wxString &aDelayProfileName)
 Gets the tuning profile pointer for the given tuning profile name.
 

Private Attributes

std::map< wxString, const TUNING_PROFILE * > m_delayProfilesCache
 Cached map of tuning profile names to per-layer time domain parameters.
 
std::map< wxString, std::map< VIA_OVERRIDE_CACHE_KEY, int64_t > > m_viaOverridesCache
 Cached per-tuning profile via overrides.
 

Detailed Description

Definition at line 31 of file tuning_profile_parameters_user_defined.h.

Constructor & Destructor Documentation

◆ TUNING_PROFILE_PARAMETERS_USER_DEFINED()

TUNING_PROFILE_PARAMETERS_USER_DEFINED::TUNING_PROFILE_PARAMETERS_USER_DEFINED ( BOARD * aBoard,
LENGTH_DELAY_CALCULATION * aCalculation )
inlineexplicit

Member Function Documentation

◆ CalculatePropagationDelayForShapeLineChain()

int64_t TUNING_PROFILE_PARAMETERS_USER_DEFINED::CalculatePropagationDelayForShapeLineChain ( const SHAPE_LINE_CHAIN & aShape,
const TUNING_PROFILE_GEOMETRY_CONTEXT & aContext )
overridevirtual

Gets the propagation delay for the given shape line chain.

Parameters
aShapeis the shape to calculate delay for
aContextis the geometry context for which to query to propagation delay

Implements TUNING_PROFILE_PARAMETERS_IFACE.

Definition at line 164 of file tuning_profile_parameters_user_defined.cpp.

References DELAY_PROFILE_TRACK_PROPAGATION_ENTRY::GetDelay(), NETCLASS::GetTuningProfile(), GetTuningProfile(), TUNING_PROFILE_GEOMETRY_CONTEXT::Layer, SHAPE_LINE_CHAIN::Length(), TUNING_PROFILE::m_TrackPropagationEntriesMap, TUNING_PROFILE_GEOMETRY_CONTEXT::NetClass, and PCB_IU_PER_MM.

◆ GetPropagationDelay()

int64_t TUNING_PROFILE_PARAMETERS_USER_DEFINED::GetPropagationDelay ( const LENGTH_DELAY_CALCULATION_ITEM & aItem,
const TUNING_PROFILE_GEOMETRY_CONTEXT & aContext )
overridevirtual

Gets the propagation delay (in internal units) for the given item in the given geometry context.

Parameters
aItemthe board item to query propagation delay for
aContextthe geometry context in which to query to propagation delay

Implements TUNING_PROFILE_PARAMETERS_IFACE.

Definition at line 59 of file tuning_profile_parameters_user_defined.cpp.

References LENGTH_DELAY_CALCULATION_ITEM::GetEffectiveNetClass(), LENGTH_DELAY_CALCULATION_ITEM::GetMergeStatus(), getPropagationDelay(), NETCLASS::GetTuningProfile(), GetTuningProfile(), and LENGTH_DELAY_CALCULATION_ITEM::MERGED_RETIRED.

◆ getPropagationDelay()

int64_t TUNING_PROFILE_PARAMETERS_USER_DEFINED::getPropagationDelay ( const LENGTH_DELAY_CALCULATION_ITEM & aItem,
const TUNING_PROFILE_GEOMETRY_CONTEXT & aContext,
const TUNING_PROFILE * aDelayProfile ) const
private

◆ GetPropagationDelays()

std::vector< int64_t > TUNING_PROFILE_PARAMETERS_USER_DEFINED::GetPropagationDelays ( const std::vector< LENGTH_DELAY_CALCULATION_ITEM > & aItems,
const TUNING_PROFILE_GEOMETRY_CONTEXT & aContext )
overridevirtual

Gets the propagation delays (in internal units) for the given items in the given geometry context.

This assumes that all items are in the same netclass

Parameters
aItemsthe board items to query propagation delay for
aContextthe geometry context in which to query to propagation delay

Implements TUNING_PROFILE_PARAMETERS_IFACE.

Definition at line 37 of file tuning_profile_parameters_user_defined.cpp.

References getPropagationDelay(), and GetTuningProfile().

◆ GetTrackLengthForPropagationDelay()

int64_t TUNING_PROFILE_PARAMETERS_USER_DEFINED::GetTrackLengthForPropagationDelay ( int64_t aDelay,
const TUNING_PROFILE_GEOMETRY_CONTEXT & aContext )
overridevirtual

Gets the track length (in internal distance units) required for the given propagation delay (in internal time units).

The track length should be calculated with the given geometry context.

Parameters
aContextthe geometry context in which to query to propagation delay
aDelaythe propagation delay for which a length should be calculated

Implements TUNING_PROFILE_PARAMETERS_IFACE.

Definition at line 142 of file tuning_profile_parameters_user_defined.cpp.

References DELAY_PROFILE_TRACK_PROPAGATION_ENTRY::GetDelay(), NETCLASS::GetTuningProfile(), GetTuningProfile(), TUNING_PROFILE_GEOMETRY_CONTEXT::Layer, TUNING_PROFILE::m_TrackPropagationEntriesMap, TUNING_PROFILE_GEOMETRY_CONTEXT::NetClass, and PCB_IU_PER_MM.

◆ GetTuningProfile()

const TUNING_PROFILE * TUNING_PROFILE_PARAMETERS_USER_DEFINED::GetTuningProfile ( const wxString & aDelayProfileName)
private

Gets the tuning profile pointer for the given tuning profile name.

Parameters
aDelayProfileNamethe tuning profile name to return
Returns
Valid pointer to a tuning profile, or nullptr if no profile found

Definition at line 131 of file tuning_profile_parameters_user_defined.cpp.

References m_delayProfilesCache.

Referenced by CalculatePropagationDelayForShapeLineChain(), GetPropagationDelay(), GetPropagationDelays(), and GetTrackLengthForPropagationDelay().

◆ OnSettingsChanged()

void TUNING_PROFILE_PARAMETERS_USER_DEFINED::OnSettingsChanged ( )
overridevirtual

Event called by the length and time calculation architecture if netclass definitions have changed.

This can be used to invalidate any calculation / simulation caches.

Reimplemented from TUNING_PROFILE_PARAMETERS_IFACE.

Definition at line 30 of file tuning_profile_parameters_user_defined.cpp.

References rebuildCaches().

◆ OnStackupChanged()

virtual void TUNING_PROFILE_PARAMETERS_IFACE::OnStackupChanged ( )
inlinevirtualinherited

Event called by the length and time calculation architecture if the board stackup has changed.

This can be used to invalidate any calculation / simulation caches.

Definition at line 74 of file tuning_profile_parameters_iface.h.

◆ rebuildCaches()

Member Data Documentation

◆ m_board

BOARD* TUNING_PROFILE_PARAMETERS_IFACE::m_board
protectedinherited

The board all calculations are for.

Definition at line 121 of file tuning_profile_parameters_iface.h.

Referenced by TUNING_PROFILE_PARAMETERS_USER_DEFINED::rebuildCaches(), and TUNING_PROFILE_PARAMETERS_IFACE().

◆ m_delayProfilesCache

std::map<wxString, const TUNING_PROFILE*> TUNING_PROFILE_PARAMETERS_USER_DEFINED::m_delayProfilesCache
private

Cached map of tuning profile names to per-layer time domain parameters.

Definition at line 137 of file tuning_profile_parameters_user_defined.h.

Referenced by GetTuningProfile(), and rebuildCaches().

◆ m_lengthCalculation

LENGTH_DELAY_CALCULATION* TUNING_PROFILE_PARAMETERS_IFACE::m_lengthCalculation
protectedinherited

The parent length / delay calculation object.

Definition at line 124 of file tuning_profile_parameters_iface.h.

Referenced by TUNING_PROFILE_PARAMETERS_USER_DEFINED::getPropagationDelay(), and TUNING_PROFILE_PARAMETERS_IFACE().

◆ m_viaOverridesCache

std::map<wxString, std::map<VIA_OVERRIDE_CACHE_KEY, int64_t> > TUNING_PROFILE_PARAMETERS_USER_DEFINED::m_viaOverridesCache
private

Cached per-tuning profile via overrides.

Definition at line 140 of file tuning_profile_parameters_user_defined.h.

Referenced by getPropagationDelay(), and rebuildCaches().


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