42 const wxString delayProfileName = aItems.front().GetEffectiveNetClass()->GetTuningProfile();
46 return std::vector<int64_t>( aItems.size(), 0 );
48 std::vector<int64_t> propagationDelays;
49 propagationDelays.reserve( aItems.size() );
54 return propagationDelays;
83 if( itemType == LENGTH_DELAY_CALCULATION_ITEM::TYPE::LINE )
85 double delayUnit = 0.0;
94 return static_cast<int64_t
>( delayUnit * (
static_cast<double>( aItem.
GetLine().Length() ) /
PCB_IU_PER_MM ) );
97 if( itemType == LENGTH_DELAY_CALCULATION_ITEM::TYPE::VIA )
107 return getViaPropagationDelay( signalStartLayer, signalEndLayer, viaStartLayer, viaEndLayer, aDelayProfile );
110 if( itemType == LENGTH_DELAY_CALCULATION_ITEM::TYPE::PAD )
129 return getViaPropagationDelay( aSignalStartLayer, aSignalEndLayer, aViaStartLayer, aViaEndLayer, tuningProfile );
141 std::swap( aSignalStartLayer, aSignalEndLayer );
144 std::swap( aViaStartLayer, aViaEndLayer );
149 const auto viaItr = viaOverrides.find(
152 if( viaItr != viaOverrides.end() )
153 return viaItr->second;
189 return entry->second.GetDelay();
205 if( delayUnit <= 0.0 )
208 const double lengthInMM =
static_cast<double>( aDelay ) / delayUnit;
218 return static_cast<int64_t
>( delayUnit * (
static_cast<double>( aShape.
Length() ) /
PCB_IU_PER_MM ) );
234 std::map<VIA_OVERRIDE_CACHE_KEY, int64_t>& viaOverrides =
m_viaOverridesCache[profile.m_ProfileName];
constexpr double PCB_IU_PER_MM
Pcbnew IU is 1 nanometer.
Represents a single line in a time domain profile track propagation setup.
int GetDelay(const bool aForce=false) const
Lightweight class which holds a pad, via, or a routed trace outline.
MERGE_STATUS GetMergeStatus() const
Gets the MERGE_STATUS of this item.
TYPE
The type of routing object this item proxies.
TYPE Type() const
Gets the routing item type.
const PCB_VIA * GetVia() const
Gets the VIA associated with this item.
const NETCLASS * GetEffectiveNetClass() const
Returns the effective net class for the item.
SHAPE_LINE_CHAIN & GetLine() const
Gets the SHAPE_LINE_CHAIN associated with this item.
PCB_LAYER_ID GetEndLayer() const
Gets the end board layer for the proxied item.
const PAD * GetPad() const
Gets the parent PAD associated with this item.
PCB_LAYER_ID GetStartLayer() const
Gets the start board layer for the proxied item.
wxString GetTuningProfile() const
PCB_LAYER_ID EndLayer() const
PCB_LAYER_ID StartLayer() const
int GetPadToDieDelay() const
const PADSTACK & Padstack() const
Container for project specific data.
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
long long int Length() const
Return length of the line chain in Euclidean metric.
TUNING_PROFILES stores the configuration for impedance / delay tuning profiles.
const std::vector< TUNING_PROFILE > & GetTuningProfiles() const
BOARD * m_board
The board all calculations are for.
LENGTH_DELAY_CALCULATION * m_lengthCalculation
The parent length / delay calculation object.
std::map< wxString, const TUNING_PROFILE * > m_delayProfilesCache
Cached map of tuning profile names to per-layer time domain parameters.
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 inter...
int64_t getViaPropagationDelay(const PCB_LAYER_ID aSignalStartLayer, const PCB_LAYER_ID aSignalEndLayer, const PCB_LAYER_ID aViaStartLayer, const PCB_LAYER_ID aViaEndLayer, const TUNING_PROFILE *aTuningProfile) const
Gets the via propagation delay for the given via layer geometry.
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.
std::map< wxString, std::map< VIA_OVERRIDE_CACHE_KEY, int64_t > > m_viaOverridesCache
Cached per-tuning profile via overrides.
bool CanCalculateLengthForDelay(const TUNING_PROFILE_GEOMETRY_CONTEXT &aContext) const override
Returns true if the net class tuning profile defines a non-zero track delay for the context layer.
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.
const TUNING_PROFILE * GetTuningProfile(const wxString &aDelayProfileName) const
Gets the tuning profile pointer for the given tuning profile name.
double getTrackDelayPerMM(const TUNING_PROFILE_GEOMETRY_CONTEXT &aContext) const
Gets the track propagation delay per millimetre for the given geometry context.
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, const TUNING_PROFILE *aDelayProfile) const
Gets the propagation delay (in internal units) for the given item in the given geometry context,...
int64_t GetViaPropagationDelay(const PCB_LAYER_ID aSignalStartLayer, const PCB_LAYER_ID aSignalEndLayer, const PCB_LAYER_ID aViaStartLayer, const PCB_LAYER_ID aViaEndLayer, const TUNING_PROFILE_GEOMETRY_CONTEXT &aContext) const override
Gets the via propagation delay for the given via layer geometry.
bool IsCopperLayerLowerThan(PCB_LAYER_ID aLayerA, PCB_LAYER_ID aLayerB)
Return true if copper aLayerA is placed lower than aLayerB, false otherwise.
PCB_LAYER_ID
A quick note on layer IDs:
static float distance(const SFVEC2UI &a, const SFVEC2UI &b)
Represents a single line in the time domain configuration via overrides configuration grid.
PCB_LAYER_ID m_SignalLayerFrom
PCB_LAYER_ID m_ViaLayerFrom
PCB_LAYER_ID m_SignalLayerTo
PCB_LAYER_ID m_ViaLayerTo
A data structure to contain basic geometry data which can affect signal propagation calculations.
const NETCLASS * NetClass
The net class this track belongs to.
PCB_LAYER_ID Layer
The layer this track is on.
Cache key for use with std::map.
Represents a single line in the tuning profile configuration grid.
bool m_EnableTimeDomainTuning
std::map< PCB_LAYER_ID, DELAY_PROFILE_TRACK_PROPAGATION_ENTRY > m_TrackPropagationEntriesMap
int m_ViaPropagationDelay