RoutingEvent(3)

NAME
RoutingEvent - Atomic Placement Request for a TrackSegment.

SYNOPSIS

  Classes
class Key
RoutingEvent cached key for maps.

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

  Public Member Functions
RoutingEvent * clone () 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 Key & getKey () const
TrackElement * getSegment () const
const vector< TrackElement * > & getPerpandiculars () const
DbU::Unit getAxisHint () const
DbU::Unit getAxisHistory () const
long getAxisWeight (DbU::Unit) const
const Interval & getConstraints () const
const Interval & getOptimal () 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 *)
RoutingEvent * reschedule (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 RoutingEvent * create (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

  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

  unsigned int getStage () [static]
Returns: The stage the router is in (see RoutingEvent::Mode).

Referenced by SegmentAction::doAction(), Manipulator::repackPerpandiculars(), RoutingEvent::reschedule(), RoutingEvent::revalidate(), SegmentFsm::SegmentFsm(), and RoutingEvent::setAxisHintFromParent().

  size_t getAllocateds () [static]
Returns: The number of RoutingEvent currently allocateds.

  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().

  void resetProcesseds () [static]
Returns: Reset the number of processeds events.

Referenced by NegociateWindow::run().

  unsigned int setStage (unsigned int mode) [static]
Sets the router's stage (see RoutingEvent::Mode).

  RoutingEvent * create (TrackElement * element, unsigned int mode = Negociate) [static]

Parameters:
    element The element for which to create the event.
    mode The mode into which this event will be valid.

RoutingEvent constructor.

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

  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().

  void destroy ()
The destructor.

  bool isCloned () const [inline]
Returns: true if this event has been cloned at least once.

  bool isValid () const [inline]
Returns: true if the cached informations from the element are valid (i.e. the element has not been changed).

  bool isUnimplemented () const
Returns: true if the event has tried to use an unimplemented feature.

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

  bool isProcessed () const [inline]
Returns: true if the event has been processed.

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

  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().

  bool isForcedToHint () const [inline]
Returns: true the element must be placed exacltly on the given axis hint.

  bool isRipedByLocal () const [inline]
Returns: true the element (global) has been riped up to place a local one.

  unsigned int getMode () const [inline]
Returns: the mode the event must be taken into account to.

  bool canMinimize () const [inline]
Returns: true the element could still be minimized.

Referenced by Manipulator::minimize().

  unsigned int getState () const
Returns: the mode the router is currently in.

Referenced by RoutingEvent::isUnimplemented().

  const Key & getKey () const [inline]
Returns: The key to use in map & queue for this event.

  TrackElement * getSegment () const [inline]
Returns: The associated segment.

Referenced by SegmentFsm::conflictSolveByHistory(), SegmentFsm::conflictSolveByPlaceds(), SegmentFsm::desaturate(), SegmentFsm::doActions(), SegmentFsm::insertInTrack(), Manipulator::ripupPerpandiculars(), SegmentFsm::SegmentFsm(), SegmentFsm::slackenTopology(), and SegmentFsm::solveFullBlockages().

  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().

  DbU::Unit getAxisHint () const [inline]
Returns: The preferred position for the segment axis.

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

  DbU::Unit getAxisHistory () const [inline]
Returns: The previous position of the segment axis (before it's current position).

  DbU::Unit getAxisWeight (DbU::Unit axis) const [inline]
Returns: The distance between axis and the preferred position.

Referenced by SegmentFsm::SegmentFsm().

  const Interval & getConstraints () const [inline]
Returns: The range of legal positions for the axis.

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

  const Interval & getOptimal () const [inline]
Returns: The range of positions for the optimal axis (cached).

Referenced by SegmentFsm::SegmentFsm().

  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: 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().

  unsigned int getTracksNb () const [inline]
Returns: The number of tracks avalaibles for the segment to be placed.

Referenced by SegmentFsm::SegmentFsm().

  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().

  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().

  void revalidate ()
Perform an event revalidation.

Referenced by SegmentFsm::SegmentFsm(), and RoutingEvent::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.

  void process (RoutingEventQueue & queue, RoutingEventHistory & history, RoutingEventLoop & loop)

Parameters:
    queue The main event queue.
    history The event's history list.
    loop The 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.

  void setSegment (TrackElement * element)
Change the associated segment. Used only by TrackSegment::swapTrack().

Referenced by TrackSegment::swapTrack().

  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().

  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().

  void setState (unsigned int state)
Proxy mutator for DataNegociate::setState().

Referenced by RoutingEvent::process().

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

Referenced by RoutingEvent::revalidate().

  void incInsertState () [inline]
Increment the insertion state.

See also: RoutingEvent::getInsertState().

Referenced by SegmentFsm::insertInTrack().

  void resetInsertState () [inline]
Reset the insertion state.

See also: RoutingEvent::getInsertState().

Referenced by SegmentFsm::slackenTopology().

  void setEventLevel (unsigned int level) [inline]
Set the event level (user-controlled re-ordering).

Author

Generated automatically by Doxygen for Kite - Detailed Router from the source code.