Kite - Detailed Router


Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
RoutingEvent Class Reference

Atomic Placement Request for a TrackSegment. More...

Classes

class  Key
 RoutingEvent cached key for maps. More...
 

Public Types

enum  Mode {
  Negociate =1,
  Pack =2,
  Repair =3
}
 

Public Member Functions

RoutingEventclone () const
 
void destroy ()
 
bool isCloned () const
 
bool isValid () const
 
bool isUnimplemented () const
 
bool isProcessed () const
 
bool isDisabled () const
 
bool isForcedToHint () const
 
bool isRipedByLocal () const
 
bool getMode () const
 
bool canMinimize () const
 
unsigned int getState () const
 
const KeygetKey () const
 
TrackElementgetSegment () const
 
const vector< TrackElement * > & getPerpandiculars () const
 
DbU::Unit getAxisHint () const
 
DbU::Unit getAxisHistory () const
 
long getAxisWeight (DbU::Unit) const
 
const IntervalgetConstraints () const
 
const IntervalgetOptimal () const
 
float getPriority () const
 
unsigned int getTracksNb () const
 
unsigned int getInsertState () const
 
unsigned int getEventLevel () const
 
void revalidate ()
 
void updateKey ()
 
void process (RoutingEventQueue &, RoutingEventHistory &, RoutingEventLoop &)
 
void setSegment (TrackElement *)
 
RoutingEventreschedule (RoutingEventQueue &, unsigned int eventLevel)
 
void setMode (unsigned int)
 
void setState (unsigned int)
 
void setAxisHintFromParent ()
 
void incInsertState ()
 
void resetInsertState ()
 
void setEventLevel (unsigned int)
 

Static Public Member Functions

static unsigned int getStage ()
 
static size_t getAllocateds ()
 
static size_t getProcesseds ()
 
static void resetProcesseds ()
 
static void setStage (unsigned int)
 
static RoutingEventcreate (TrackElement *, unsigned int mode=Negociate)
 

Detailed Description

Atomic Placement Request for a TrackSegment.

The trackFrees attribute has to be reviewed not sure it's still useful.

Cached key for stable sorting, see RoutingEvent::Key.

Member Enumeration Documentation

◆ Mode

enum Mode

The working mode of the router, affect how events are to be handled.

Enumerator
Negociate 

This is the normal mode of operation, topological modifications and ripup are enableds.

Pack 

First post-processing step. For each segment, tries to find a more compact position for a segment, but without riping any others.

Repair 

Second post-processing step, try to find a suitable location for a segment more aggressively.

Member Function Documentation

◆ getStage()

unsigned int getStage ( )
static

◆ getAllocateds()

size_t getAllocateds ( )
static

Returns: The number of RoutingEvent currently allocateds.

◆ getProcesseds()

size_t getProcesseds ( )
static

Returns: The number of RoutingEvent that have been processeds since the last call to RoutingEvent::resetProcesseds().

Referenced by NegociateWindow::printStatistics(), RoutingEvent::process(), and RoutingEventLoop::update().

◆ resetProcesseds()

void resetProcesseds ( )
static

Returns: Reset the number of processeds events.

Referenced by NegociateWindow::run().

◆ setStage()

unsigned int setStage ( unsigned int  mode)
static

Sets the router's stage (see RoutingEvent::Mode).

◆ create()

RoutingEvent * create ( TrackElement element,
unsigned int  mode = Negociate 
)
static
Parameters
elementThe element for which to create the event.
modeThe mode into which this event will be valid.

RoutingEvent constructor.

Referenced by RoutingEventQueue::add(), and RoutingEventQueue::load().

◆ clone()

RoutingEvent * clone ( ) const
Returns
A clone of the event.

Cloning an event is slightly different from copying it (which is forbidden). There can be multiple events for one element but only one must be active at a time. This is a cheap way of implementing the rescheduling mechanism. The original event remains the active one, but it's cloned flag is raised. The cloned event is created inactive and with a null eventLevel.

Referenced by RoutingEvent::reschedule().

◆ destroy()

void destroy ( )

The destructor.

◆ isCloned()

bool isCloned ( ) const
inline

Returns: true if this event has been cloned at least once.

◆ isValid()

bool isValid ( ) const
inline

Returns: true if the cached informations from the element are valid (i.e. the element has not been changed).

◆ isUnimplemented()

bool isUnimplemented ( ) const

Returns: true if the event has tried to use an unimplemented feature.

Referenced by Manipulator::canRipup(), and RoutingEvent::reschedule().

◆ isProcessed()

bool isProcessed ( ) const
inline

Returns: true if the event has been processed.

Referenced by RoutingEvent::process(), and RoutingEvent::reschedule().

◆ isDisabled()

bool isDisabled ( ) const
inline

Returns: true if the event is not the active one. It should be discarted by the algorithm.

Referenced by RoutingEvent::process().

◆ isForcedToHint()

bool isForcedToHint ( ) const
inline

Returns: true the element must be placed exacltly on the given axis hint.

◆ isRipedByLocal()

bool isRipedByLocal ( ) const
inline

Returns: true the element (global) has been riped up to place a local one.

◆ getMode()

unsigned int getMode ( ) const
inline

Returns: the mode the event must be taken into account to.

◆ canMinimize()

bool canMinimize ( ) const
inline

Returns: true the element could still be minimized.

Referenced by Manipulator::minimize().

◆ getState()

unsigned int getState ( ) const

Returns: the mode the router is currently in.

Referenced by RoutingEvent::isUnimplemented().

◆ getKey()

const Key & getKey ( ) const
inline

Returns: The key to use in map & queue for this event.

◆ getSegment()

TrackElement * getSegment ( ) const
inline

◆ getPerpandiculars()

const vector< TrackElement * > & getPerpandiculars ( ) const
inline

Returns: A vector of cached perpandiculars to the associated segment.

Referenced by Manipulator::minimize(), Manipulator::repackPerpandiculars(), and Manipulator::ripupPerpandiculars().

◆ getAxisHint()

DbU::Unit getAxisHint ( ) const
inline

Returns: The preferred position for the segment axis.

Referenced by RoutingEvent::getAxisWeight(), RoutingEvent::revalidate(), Manipulator::ripple(), and SegmentFsm::SegmentFsm().

◆ getAxisHistory()

DbU::Unit getAxisHistory ( ) const
inline

Returns: The previous position of the segment axis (before it's current position).

◆ getAxisWeight()

DbU::Unit getAxisWeight ( DbU::Unit  axis) const
inline

Returns: The distance between axis and the preferred position.

Referenced by SegmentFsm::SegmentFsm().

◆ getConstraints()

const Interval & getConstraints ( ) const
inline

Returns: The range of legal positions for the axis.

Referenced by Manipulator::minimize(), Manipulator::ripupPerpandiculars(), and SegmentFsm::SegmentFsm().

◆ getOptimal()

const Interval & getOptimal ( ) const
inline

Returns: The range of positions for the optimal axis (cached).

Referenced by SegmentFsm::SegmentFsm().

◆ getPriority()

unsigned int getPriority ( ) const
inline

Returns: The priority of the event, it quantify the degree of freedom of the segment. Currently it's computed from the length of the segment and it's slack:

\[ priority = (slack(segment)+1.0) \times (length(segment)+1.0) \]

A high priority means that the segment will be harder to place thus it will be scheduled first. With this function, longer segments will be placed first.

Referenced by RoutingEvent::process().

◆ getTracksNb()

unsigned int getTracksNb ( ) const
inline

Returns: The number of tracks avalaibles for the segment to be placed.

Referenced by SegmentFsm::SegmentFsm().

◆ getInsertState()

unsigned int getInsertState ( ) const
inline
Returns
The kind of track insertion that will be intended. It's a counter whose values have the following meaning:
  • 1 : normal insert.
  • 2 : shrink the segment to it's minimum before inserting.
  • 3 : attempt to ripup conflicting others before inserting.

Referenced by SegmentFsm::insertInTrack().

◆ getEventLevel()

unsigned int getEventLevel ( ) const
inline

Returns: The event level of the event, used to tweak the order inside the event queue. It differs from the priority in the sense that it isn't a topologicaly based value, but manipulated by the algorithm.

Referenced by RoutingEvent::process().

◆ revalidate()

void revalidate ( )

Perform an event revalidation.

Referenced by SegmentFsm::SegmentFsm(), and RoutingEvent::updateKey().

◆ updateKey()

void updateKey ( )
inline

Update the key with the new values from the event, the key must not be inserted in the queue when this method is called.

◆ process()

void process ( RoutingEventQueue queue,
RoutingEventHistory history,
RoutingEventLoop loop 
)
Parameters
queueThe main event queue.
historyThe event's history list.
loopThe loop detector.

Process the event, that is:

  • First, check if there is no looping, if any, do not process the event but dicard it (marked as unimplemented).
  • Second, attempt to place the associated segment. Pass it to the relevant function, according to the router's mode (_processNegociate(), processPack() or _processRepair() ). Once processed, the event is added to both history (for the record) and loop to check if we are not looping.

◆ setSegment()

void setSegment ( TrackElement element)

Change the associated segment. Used only by TrackSegment::swapTrack().

Referenced by TrackSegment::swapTrack().

◆ reschedule()

RoutingEvent * reschedule ( RoutingEventQueue queue,
unsigned int  eventLevel 
)
Returns
The newly reinserted event. Depending on the cases it could be itself.

Insert or reinsert an event in the scheduler. The eventLevel parameter only allows to increase the level (if it is less than the current level of the event, it will be ignored).

Cloning Management. As an event could be cloned, if we try to re-insert a disabled original, we must first lookup the currently cloned active event. This is done through the associated segment which must always be associated with the active event (if any).

Unimplemented Protection. If the unimplemented flag is set the reschedule is cancelled (NULL is returned).

Unprocessed Event. The event is still in queue, waiting to be processed, then just repush it in the queue with it's new level.

Processed Event. Clone the already processed one, activate it and push it on the queue.

Router's Mode. The mode is also updated.

Referenced by SegmentAction::doAction(), and RoutingEvent::reschedule().

◆ setMode()

void setMode ( unsigned int  mode)

Set the mode in which the event must be processed (see RoutingEvent::Mode).

Referenced by SegmentAction::doAction(), and RoutingEvent::reschedule().

◆ setState()

void setState ( unsigned int  state)

Proxy mutator for DataNegociate::setState().

Referenced by RoutingEvent::process().

◆ setAxisHintFromParent()

void setAxisHintFromParent ( )

Sets the axis hint from it's parent segment. The parentage is found through the TrackSegment parentage.

Referenced by RoutingEvent::revalidate().

◆ incInsertState()

void incInsertState ( )
inline

Increment the insertion state.

See also:  RoutingEvent::getInsertState().

Referenced by SegmentFsm::insertInTrack().

◆ resetInsertState()

void resetInsertState ( )
inline

Reset the insertion state.

See also:  RoutingEvent::getInsertState().

Referenced by SegmentFsm::slackenTopology().

◆ setEventLevel()

void setEventLevel ( unsigned int  level)
inline

Set the event level (user-controlled re-ordering).


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


Generated by doxygen 1.8.14 on Sun Nov 21 2021 Return to top of page
Kite - Detailed Router Copyright © 2008-2020 Sorbonne Universite. All rights reserved