80 "net for skew tuning. Make sure the names of the nets belonging "
81 "to a differential pair end with either _N/_P or +/-." ) );
144 long long int extraSignalLen = 0;
145 long long int extraSignalDelay = 0;
147 extraSignalLen, extraSignalDelay );
213 PNS_DBG(
Dbg(), AddItem, l,
BLUE, 10000, wxT(
"tuned-path-skew-p" ) );
215 m_router->GetInterface()->DisplayPathLine( l->CLine(), isPositive ? 1 : 0 );
225 m_router->GetInterface()->DisplayPathLine( l->CLine(), isPositive ? 0 : 1 );
256 auto calculateTargetSkew = [
this](
const int64_t targetSkewDelay )
259 const int64_t skewDelayDifference = targetSkewDelay - curSkewDelay;
261 int64_t skewLengthDiff =
m_router->GetInterface()->CalculateLengthForDelay(
266 skewLengthDiff = skewDelayDifference > 0 ? skewLengthDiff : -skewLengthDiff;
268 return static_cast<int>( curSkew + skewLengthDiff );
273 const int minSkew = calculateTargetSkew(
m_settings.m_targetSkewDelay.Min() );
274 m_settings.m_targetSkew.SetMin(
static_cast<int>( minSkew ) );
276 const int optSkew = calculateTargetSkew(
m_settings.m_targetSkewDelay.Opt() );
277 m_settings.m_targetSkew.SetOpt(
static_cast<int>( optSkew ) );
279 const int maxSkew = calculateTargetSkew(
m_settings.m_targetSkewDelay.Max() );
280 m_settings.m_targetSkew.SetMax(
static_cast<int>( maxSkew ) );
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
virtual NETCLASS * GetEffectiveNetClass() const
Return the NETCLASS for this item.
ROUTER * Router() const
Return the instance of our router.
DEBUG_DECORATOR * Dbg() const
Base class for PNS router board items.
BOARD_ITEM * GetSourceItem() const
bool OfKind(int aKindMask) const
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads,...
long long int chainNarrowingOffset() const
Return the length offset to subtract when converting a user-facing total signal length target into a ...
int m_currentWidth
Width of the meandered trace(s).
long long int m_startPathLength
Active path length at Start().
VECTOR2I m_currentEnd
The current end point.
void initChainExtras()
Cache the per-session chain-extras length/delay (other nets in the same chain) so per-Move use does n...
MEANDER_SETTINGS m_settings
Meander settings.
int64_t lineDelay(const ITEM_SET &aLine, const SOLID *aStartPad, const SOLID *aEndPad) const
Calculate the total delay of the line represented by an item set (tracks and vias)
NODE * m_world
Pointer to world to search colliding items.
long long int lineLength(const ITEM_SET &aLine, const SOLID *aStartPad, const SOLID *aEndPad) const
Calculate the total length of the line represented by an item set (tracks and vias)
long long int m_baselineLength
The tuning results as they were at Start(). The deltas measure change from these.
NODE * m_currentNode
Current world state.
bool doMove(const VECTOR2I &aP, ITEM *aEndItem, long long int aTargetLength, long long int aTargetMin, long long int aTargetMax)
LINKED_ITEM * m_initialSegment
MEANDER_PLACER(ROUTER *aRouter)
VECTOR2I m_currentStart
current routing start point (end of tail, beginning of head)
NETCLASS * m_netClass
The netclass for the placed segments.
long long int m_lastLength
int64_t origPathDelay() const override
long long int origPathLength() const override
long long int m_coupledLength
MEANDER_SKEW_PLACER(ROUTER *aRouter)
bool Move(const VECTOR2I &aP, ITEM *aEndItem) override
Move the end of the currently routed primtive(s) to the point aP, taking aEndItem as the anchor (if n...
bool Start(const VECTOR2I &aP, ITEM *aStartItem) override
Start placement/drag operation at point aP, taking item aStartItem as anchor (unless NULL).
long long int TuningLengthResult() const override
Return the resultant length or skew of the tuned traces.
long long int CurrentSkew() const
void calculateTimeDomainTargets() override
int64_t TuningDelayResult() const override
Return the resultant delay or skew of the tuned traces.
NODE * Branch()
Create a lightweight copy (called branch) of self that tracks the changes (added/removed items) wrs t...
virtual bool GetSignalAggregate(NET_HANDLE aNetP, NET_HANDLE aNetN, long long &aExtraLength, long long &aExtraDelay) const =0
ROUTER_IFACE * GetInterface() const
void SetFailureReason(const wxString &aReason)
const DIFF_PAIR AssembleDiffPair(SEGMENT *aStart)
const ITEM_SET AssembleTuningPath(ROUTER_IFACE *aRouterIface, ITEM *aStart, SOLID **aStartPad=nullptr, SOLID **aEndPad=nullptr)
Like AssembleTrivialPath, but follows the track length algorithm, which discards segments that are fu...
const ITEM_SET AssembleTrivialPath(ITEM *aStart, std::pair< const JOINT *, const JOINT * > *aTerminalJoints=nullptr, bool aFollowLockedSegments=false)
Assemble a trivial path between two joints given a starting item.
Push and Shove diff pair dimensions (gap) settings dialog.
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
#define PNS_DBG(dbg, method,...)
static VECTOR2I GetSnappedStartPoint(LINKED_ITEM *aStartItem, VECTOR2I aStartPoint)
Casted dyn_cast(From aObject)
A lightweight dynamic downcast.
VECTOR2< int32_t > VECTOR2I