Pseudo-decorator to process a RoutingEvent. More...
Public Types | |
enum | State { MissingData = (1<<0), EmptyTrackList = (1<<1), Inserted = (1<<2), Self = (1<<3), Other = (1<<4), Ripup = (1<<5), MaximumSlack = (1<<6), SelfInserted = Self | Inserted, OtherRipup = Other | Ripup, SelfMaximumSlack = Self | MaximumSlack } |
Public Member Functions | |
SegmentFsm (RoutingEvent *, RoutingEventQueue &, RoutingEventHistory &) | |
bool | isFullBlocked () const |
RoutingEvent * | getEvent () const |
RoutingEventQueue & | getQueue () const |
RoutingEventHistory & | getHistory () const |
unsigned int | getState () const |
DataNegociate * | getData () |
Interval & | getConstraint () |
Interval & | getOptimal () |
vector< TrackCost > & | getCosts () |
TrackCost & | getCost (size_t) |
Track * | getTrack (size_t) |
size_t | getBegin (size_t) |
size_t | getEnd (size_t) |
vector< SegmentAction > & | getActions () |
void | setState (unsigned int) |
void | addAction (TrackElement *, unsigned int type, DbU::Unit axisHint=0, unsigned int toState=0) |
void | doActions () |
void | clearActions () |
bool | insertInTrack (size_t) |
bool | conflictSolveByHistory () |
bool | conflictSolveByPlaceds () |
bool | desaturate () |
bool | slackenTopology (unsigned int flags=0) |
bool | solveFullBlockages () |
Pseudo-decorator to process a RoutingEvent.
The SegmentFsm class actually perform the placement of the Kite::TrackElement of the Kite::RoutingEvent. It structured around three goals:
The constructor of SegmentFsm triggers the update of the RoutingEvent and through it DataNegociate.
A transition occurs in the FSM whenener all the availables ripup methods for a segment have failed. Failure means that the topology of the net itself must be altered to allow a greater level of flexibility. Modifying the net topology means to give the current segment some more slack.
Availables slackening operations:
Simple slackening operations are defined in Manipulator and complex ones directly in SegmentFsm.
In addition, some operation that do not modifies the topology are availables:
enum State |
Indicates what the SegmentFsm has done the processed TrackElement, possible values are:
Enumerator | |
---|---|
MissingData | [Flag], see SegmentFsm::SegmentFsmValue. |
EmptyTrackList | [Flag], see SegmentFsm::SegmentFsmValue. |
Inserted | [Flag], the TrackElement can be inserted in a Track. |
Self | [Flag], the action is related to the processed TrackSegment. |
Other | [Flag], the action is not related to the processed TrackSegment, that is, others are being topologically modificated or riped up. |
Ripup | [Flag], segement, that are not the processed one are being ripped up. |
MaximumSlack | [Flag], the processed segment as reached it's maximum ripup count on the last possible slackening state. |
SelfInserted | [Mask], see SegmentFsm::SegmentFsmValue. |
OtherRipup | [Mask], see SegmentFsm::SegmentFsmValue. |
SelfMaximumSlack | [Mask], see SegmentFsm::SegmentFsmValue. |
SegmentFsm | ( | RoutingEvent * | event, |
RoutingEventQueue & | queue, | ||
RoutingEventHistory & | history | ||
) |
event | The RoutingEvent to be processed. |
queue | The RoutingEvent queue. |
history | The complete history of RoutingEvent. |
Construct a SegmentFsm from a RoutingEvent. The constructor is in charge of computing all the cached values.
|
inline |
Returns: true if there are Tracks avalaibles but the constraints are such that none is actually usable.
|
inline |
Returns: The currently processed RoutingEvent (cached).
Referenced by SegmentFsm::doActions(), SegmentFsm::slackenTopology(), and SegmentFsm::solveFullBlockages().
|
inline |
Returns: The RoutingEvent queue (cached).
|
inline |
Returns: The RoutingEvent history (cached).
Referenced by SegmentFsm::conflictSolveByHistory().
|
inline |
Returns: The state (SegmentFsm::SegmentFsmValues) which the SegmentFsm has computed for the RoutingEvent. This is not the state of the DataNegociate
|
inline |
Returns: The DataNegociate of the TrackElement (cached).
|
inline |
Returns: The interval into which the segment axis can be set (computed from the topological constraints and the placement constraints on the already placed perpandiculars).
|
inline |
Returns: The interval for an optimal placement of the segment axis.
|
inline |
Returns: The table of cost for all the candidates Tracks of the segment. The table is sorted in increasing cost order (see TrackCost).
Referenced by SegmentFsm::desaturate(), Manipulator::forceOverLocals(), Manipulator::makeDogleg(), and Manipulator::minimize().
|
inline |
Returns: The cost at index i
in the table.
Referenced by SegmentFsm::desaturate(), Manipulator::forceOverLocals(), Manipulator::forceToTrack(), Manipulator::insertInTrack(), Manipulator::minimize(), and SegmentFsm::solveFullBlockages().
|
inline |
Returns: The Track for cost at index i
in the table.
Referenced by SegmentFsm::desaturate(), Manipulator::forceOverLocals(), Manipulator::forceToTrack(), Manipulator::insertInTrack(), Manipulator::makeDogleg(), Manipulator::minimize(), and Manipulator::shrinkToTrack().
|
inline |
Returns: The overlapping begin index in Track for cost at index i
in the table.
Referenced by SegmentFsm::desaturate(), Manipulator::forceOverLocals(), Manipulator::forceToTrack(), Manipulator::insertInTrack(), Manipulator::makeDogleg(), Manipulator::minimize(), and Manipulator::shrinkToTrack().
|
inline |
Returns: The overlapping end index in Track for cost at index i
in the table.
Referenced by SegmentFsm::desaturate(), Manipulator::forceOverLocals(), Manipulator::forceToTrack(), Manipulator::insertInTrack(), Manipulator::makeDogleg(), Manipulator::minimize(), and Manipulator::shrinkToTrack().
|
inline |
Returns: The table of SegmentAction, that is the delayed requests for RoutingEvent creation.
Referenced by Manipulator::shrinkToTrack().
|
inline |
Returns: Sets the state of the state...
Referenced by SegmentFsm::desaturate(), Manipulator::forceOverLocals(), Manipulator::forceToTrack(), Manipulator::insertInTrack(), and Manipulator::shrinkToTrack().
void addAction | ( | TrackElement * | segment, |
unsigned int | type, | ||
DbU::Unit | axisHint = 0 , |
||
unsigned int | toState = 0 |
||
) |
Request the creation of a new delayed RoutingEvent, for the meaning of the parameters, see SegmentAction::SegmentAction.
Referenced by SegmentFsm::desaturate(), Manipulator::forceOverLocals(), Manipulator::forceToTrack(), Manipulator::insertInTrack(), Manipulator::minimize(), Manipulator::relax(), Manipulator::repackPerpandiculars(), Manipulator::ripple(), Manipulator::ripup(), Manipulator::ripupPerpandiculars(), Manipulator::shrinkToTrack(), and SegmentFsm::slackenTopology().
bool doActions | ( | ) |
Actually generate RoutingEvent(s) from the SegmentAction(s).
|
inline |
Clear the the table of requested actions, whithout generating them.
Referenced by Manipulator::insertInTrack(), and SegmentFsm::slackenTopology().
bool insertInTrack | ( | size_t | i | ) |
Try to insert the TrackElement in the Track at index i
(in the cost table). Return true if the insertion is possible.
The insertion is not done at this stage, but a set of ripup actions is emitted to allow insertion the next time the segment will be processed.
Three subsequent trials are done before giving up on inserting the segment:
The event keeps track of the insertion attempt step (see RoutingEvent::getInsertState()).
bool conflictSolveByHistory | ( | ) |
Returns: true if a suitable dogleg has been created in the segment.
Initially, global segments may be very long, and a placement solution in which each one is placed on a track of it's own may not be realisable. In that case, at least one of the global segment must be broken. The figure below illustrate the case: (a), (b), (c) form a first cluster and (d), (e), (f) form a second one. Due to the constraints of the segments the remaining free track cannot be the same in both clusters. The only solution to place (g) is to break it into two sub-globals. The whole point of the conflict solve is to correctly detect the cluster and choose the breaking point.
This variant of the conflict solve method try to guess the track span for which there is a conflict by looking at the event history.
Dislodger Definition:
A segment is said to be a dislodger if it matches the two following criterions:
For the time beeing we limit the search to the last three dislodgers, to not waste too much time looking back the event history. We merge overlapping intervals into one (see the undocumented class UnionIntervals
and RipupHistory
in SegmentFsm.cpp
).
For the time beeing we only look on the track into which the to be inserted segment wants to be placed.
Then we try to break the to be placed segment, first under the lower bound (source) of the conflicting interval then, in case of failure under the upper bound (target).
bool conflictSolveByPlaceds | ( | ) |
Returns: true if a suitable dogleg has been created in the segment or a dislodger has been moved up.
This methods achieve the same goal as SegmentFsm::conflictSolveByHistory() but uses a different strategy.
Instead of looking through the history to find dislodgers it analyses the placed segments in all the candidates tracks for the to be placed segment. Unlike it's sibling method, which creates only one dogleg, as it uses the Manipulator::relax() method, it may creates up to two doglegs.
Synthetic Description
Interval Accounting
Only global conflicting segments are took into account. Local segments may be took into account if they overlap global ones (all part of the same net). All overlapping segments are merged into one big conflict interval. The whole length of a conflict interval is took into account event if it's overlap with the to be placed segment is only partial.
Track Ordering (lexicographic)
Interval accounting and Track ordering is managed through the undocumented Cs1Candidate
class implemented in SegmentFsm.cpp
.
bool desaturate | ( | ) |
Try to create a suitable empty space in a cost Track by moving up TrackElement in conflict.
bool slackenTopology | ( | unsigned int | flags = 0 | ) |
Modificate the topology of the TrackElement to slacken it. It is the implementation of the slakening finite state machine.
bool solveFullBlockages | ( | ) |
Try to solve a fully blocked configuration.
Generated by doxygen 1.8.14 on Mon Apr 27 2020 | Return to top of page |
Kite - Detailed Router | Copyright © 2008-2016 UPMC. All rights reserved |