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

#include <time_domain_parameters_user_defined.h>

Inheritance diagram for TIME_DOMAIN_PARAMETERS_USER_DEFINED:
TIME_DOMAIN_PARAMETERS_IFACE

Classes

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

Public Member Functions

 TIME_DOMAIN_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 TIME_DOMAIN_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 TIME_DOMAIN_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 TIME_DOMAIN_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 TIME_DOMAIN_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 TIME_DOMAIN_GEOMETRY_CONTEXT &aContext, const DELAY_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 DELAY_PROFILEGetDelayProfile (const wxString &aDelayProfileName)
 Gets the tuning profile pointer for the given tuning profile name.
 

Private Attributes

std::map< wxString, const DELAY_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 time_domain_parameters_user_defined.h.

Constructor & Destructor Documentation

◆ TIME_DOMAIN_PARAMETERS_USER_DEFINED()

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

Member Function Documentation

◆ CalculatePropagationDelayForShapeLineChain()

int64_t TIME_DOMAIN_PARAMETERS_USER_DEFINED::CalculatePropagationDelayForShapeLineChain ( const SHAPE_LINE_CHAIN & aShape,
const TIME_DOMAIN_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 TIME_DOMAIN_PARAMETERS_IFACE.

Definition at line 147 of file time_domain_parameters_user_defined.cpp.

References NETCLASS::GetDelayProfile(), GetDelayProfile(), TIME_DOMAIN_GEOMETRY_CONTEXT::Layer, SHAPE_LINE_CHAIN::Length(), DELAY_PROFILE::m_LayerPropagationDelays, TIME_DOMAIN_GEOMETRY_CONTEXT::NetClass, and PCB_IU_PER_MM.

◆ GetDelayProfile()

const DELAY_PROFILE * TIME_DOMAIN_PARAMETERS_USER_DEFINED::GetDelayProfile ( 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 120 of file time_domain_parameters_user_defined.cpp.

References m_delayProfilesCache.

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

◆ GetPropagationDelay()

int64_t TIME_DOMAIN_PARAMETERS_USER_DEFINED::GetPropagationDelay ( const LENGTH_DELAY_CALCULATION_ITEM & aItem,
const TIME_DOMAIN_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 TIME_DOMAIN_PARAMETERS_IFACE.

Definition at line 59 of file time_domain_parameters_user_defined.cpp.

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

◆ getPropagationDelay()

int64_t TIME_DOMAIN_PARAMETERS_USER_DEFINED::getPropagationDelay ( const LENGTH_DELAY_CALCULATION_ITEM & aItem,
const TIME_DOMAIN_GEOMETRY_CONTEXT & aContext,
const DELAY_PROFILE * aDelayProfile ) const
private

Gets the propagation delay (in internal units) for the given item in the given geometry context, for items in the pre-found net class.

Preconditions:

  • aNetClass must not be null
  • Calculation caches must be valid
Parameters
aItemthe board item to query propagation delay for
aContextthe geometry context in which to query to propagation delay
aDelayProfilethe time domain tuning profile for the given item

Definition at line 75 of file time_domain_parameters_user_defined.cpp.

References distance(), PADSTACK::EndLayer(), LENGTH_DELAY_CALCULATION_ITEM::GetEndLayer(), LENGTH_DELAY_CALCULATION_ITEM::GetLine(), LENGTH_DELAY_CALCULATION_ITEM::GetMergeStatus(), LENGTH_DELAY_CALCULATION_ITEM::GetPad(), PAD::GetPadToDieDelay(), LENGTH_DELAY_CALCULATION_ITEM::GetStartLayer(), LENGTH_DELAY_CALCULATION_ITEM::GetVia(), DELAY_PROFILE::m_LayerPropagationDelays, TIME_DOMAIN_PARAMETERS_IFACE::m_lengthCalculation, DELAY_PROFILE::m_ProfileName, m_viaOverridesCache, DELAY_PROFILE::m_ViaPropagationDelay, LENGTH_DELAY_CALCULATION_ITEM::MERGED_RETIRED, PCB_VIA::Padstack(), PCB_IU_PER_MM, PADSTACK::StartLayer(), and LENGTH_DELAY_CALCULATION_ITEM::Type().

Referenced by GetPropagationDelay(), and GetPropagationDelays().

◆ GetPropagationDelays()

std::vector< int64_t > TIME_DOMAIN_PARAMETERS_USER_DEFINED::GetPropagationDelays ( const std::vector< LENGTH_DELAY_CALCULATION_ITEM > & aItems,
const TIME_DOMAIN_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 TIME_DOMAIN_PARAMETERS_IFACE.

Definition at line 37 of file time_domain_parameters_user_defined.cpp.

References GetDelayProfile(), and getPropagationDelay().

◆ GetTrackLengthForPropagationDelay()

int64_t TIME_DOMAIN_PARAMETERS_USER_DEFINED::GetTrackLengthForPropagationDelay ( int64_t aDelay,
const TIME_DOMAIN_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 TIME_DOMAIN_PARAMETERS_IFACE.

Definition at line 132 of file time_domain_parameters_user_defined.cpp.

References NETCLASS::GetDelayProfile(), GetDelayProfile(), TIME_DOMAIN_GEOMETRY_CONTEXT::Layer, DELAY_PROFILE::m_LayerPropagationDelays, TIME_DOMAIN_GEOMETRY_CONTEXT::NetClass, and PCB_IU_PER_MM.

◆ OnSettingsChanged()

void TIME_DOMAIN_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 TIME_DOMAIN_PARAMETERS_IFACE.

Definition at line 30 of file time_domain_parameters_user_defined.cpp.

References rebuildCaches().

◆ OnStackupChanged()

virtual void TIME_DOMAIN_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 73 of file time_domain_parameters_iface.h.

◆ rebuildCaches()

Member Data Documentation

◆ m_board

BOARD* TIME_DOMAIN_PARAMETERS_IFACE::m_board
protectedinherited

The board all calculations are for.

Definition at line 120 of file time_domain_parameters_iface.h.

Referenced by TIME_DOMAIN_PARAMETERS_USER_DEFINED::rebuildCaches(), and TIME_DOMAIN_PARAMETERS_IFACE().

◆ m_delayProfilesCache

std::map<wxString, const DELAY_PROFILE*> TIME_DOMAIN_PARAMETERS_USER_DEFINED::m_delayProfilesCache
private

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

Definition at line 136 of file time_domain_parameters_user_defined.h.

Referenced by GetDelayProfile(), and rebuildCaches().

◆ m_lengthCalculation

LENGTH_DELAY_CALCULATION* TIME_DOMAIN_PARAMETERS_IFACE::m_lengthCalculation
protectedinherited

The parent length / delay calculation object.

Definition at line 123 of file time_domain_parameters_iface.h.

Referenced by TIME_DOMAIN_PARAMETERS_USER_DEFINED::getPropagationDelay(), and TIME_DOMAIN_PARAMETERS_IFACE().

◆ m_viaOverridesCache

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

Cached per-tuning profile via overrides.

Definition at line 139 of file time_domain_parameters_user_defined.h.

Referenced by getPropagationDelay(), and rebuildCaches().


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