Session(3)

NAME
Session - Kite update Session.

SYNOPSIS

Inherits Session.

  Static Public Member Functions
static Session * open (KiteEngine *)
static Session * get (const char *message=NULL)
static Katabatic::Session * base ()
static bool isEmpty ()
static KiteEngine * getKiteEngine ()
static Configuration * getConfiguration ()
static Net * getBlockageNet ()
static NegociateWindow * getNegociateWindow ()
static Katabatic::GCell * getGCellUnder (DbU::Unit, DbU::Unit)
static void addInsertEvent (TrackElement *, Track *)
static void addRemoveEvent (TrackElement *)
static void addMoveEvent (TrackElement *, Track *)
static void addSortEvent (Track *, bool forced=false)
static size_t revalidate ()
static TrackElement * lookup (Segment *)
static TrackElement * lookup (AutoSegment *)

Detailed Description

Kite update Session. Session extend the Katabatic update session to the Kite router level. Mainly by managing Track update.

Difference between Kite & Katabatic sessions:

•   In Katabatic, segments are actually moved before the revalidation, then during the revalidation, contacts and topologies are adjusteds

•   In Kite, nothing is moved until the revalidation. Requests for segment displacement are queued for the session.

Asymmetry between invalidation & revalidation:

•   When a TrackSegment (or directly an AutoSegment) is invalidated both associated AutoSegment and TrackSegment are invalidated (through the Observer mechanism).

•   When an AutoSegment is revalidated, the TrackSegment is not immediatly revalidated. See the revalidate algorithm for more details.

Indirect TrackSegment invalidation:

•   TrackSegment invalidation do not result only from direct insertion in Track. For example, any or all of it's perpandicular can be invalidated trough the Katabatic::Session update (the perpandicular Katabatic::AutoSegment is revalidated, generating invalidation on their associated TrackSegment).

For details on how Katabatic Sessions works, have a look to Katabatic::Session.

The Session Mechanism.

Delayed modification procedure :

•   Modifications events are recorded (queued) into the Session. At this step, no modification are actually done, the data-base retains it's previous state and coherency.

•   The revalidate() procedure is called (or the Session is closed), then all the modification events are applied. The data-base is in now in it's new state.

The Revalidate Algorithm.

Revalidation steps :

•   Process all remove events. detach TrackSegment from their Track, but do not remove the pointer from the internal vector.

•   Pack all Track in which removal have took place.

•   Process all insert events. This is the time TrackSegment are moved into their new Track (physical displacement). It is at this point that the invalidation of both AutoSegment and TrackSegment is done.

•   Call the Katabatic::Session::revalidate() method which will recompute the correct contact extensions and topologies. After this step the Katabatic data-base is up to date, but not the Kite one. AutoSegment are revalidated.

•   Recompute the canonical position of source and target of all invalidateds TrackSegment (take account of extention modifications). The set of invalidated TrackSegment is computed from the revalidated AutoSegment, that is AutoSegment that are canonical.

•   Perform a sort() on all Track that have been modifieds.

•   Now that the size of the segments have been accurately computed, look for revalidateds TrackSegment that:

1.  Can be reduced, generate a track remove event.

2.  Must be raised, generate a routing event (put into the queue).

•   Process the additional track remove events.

Note: We cannot use the Observer mechanism to automatically update TrackSegment from an AutoSegment, because we must wait for all AutoSegments (canonical or not) involved into the TrackSegment to be up to date before we can update it.

Note: Have to talk about the special case when new canonical AutoSegment appears after dogleg creation.

The Lookup Mechanism

There are two lookup mechanisms:

•   From a Hurricane::Segment, we uses the Katabatic segment lookup table (slow, stored in a map<>).

•   From a Katabatic::AutoSegment, we uses the Observer, it's owner is the TrackSegment (fast).

Member Function Documentation

  Session * open (KiteEngine * kite) [static]

Parameters:
    kite A Kite ToolEngine on which to work.

Returns:
    A new Kite update Session.

Open a new Kite update Session on the kite ToolEngine. At this point only one session can be opened at a time. Attempt to open a second one will result in an exception.

  Session * get (const char * message = NULL) [static]
Returns: The currently opened session, NULL if no session has been opened.

Referenced by NegociateWindow::run().

  Katabatic::Session * base () [inline], [static]
Returns: The Session, casted as it's base object.

  bool isEmpty () [inline], [static]
Ensure that the Session is empty and can be closed (deleted) safely.

Referenced by NegociateWindow::run().

  KiteEngine * getKiteEngine () [inline], [static]
Returns: The Kite ToolEngine associated to the current update session (proxy helper).

Referenced by Manipulator::canRipup(), SegmentFsm::conflictSolveByHistory(), SegmentFsm::conflictSolveByPlaceds(), NegociateWindow::createTrackSegment(), SegmentAction::doAction(), RoutingEvent::process(), RoutingEvent::revalidate(), Manipulator::ripple(), Manipulator::ripupPerpandiculars(), NegociateWindow::run(), SegmentFsm::SegmentFsm(), and NegociateWindow::setGCells().

  Configuration * getConfiguration () [static]
Returns: The Kite Configuration of the Router (proxy helper).

  Net * getBlockageNet () [inline], [static]
Returns: The net used to create blockage components (proxy helper).

Referenced by TrackFixedSegment::create().

  NegociateWindow * getNegociateWindow () [inline], [static]
Returns: The current NegociateWindow (proxy helper).

Referenced by TrackSegment::_postDoglegs(), and TrackSegment::reschedule().

  Katabatic::GCell * getGCellUnder (DbU::Unit x, DbU::Unit y) [inline], [static]
Returns: The GCell under (x,y) (proxy helper, see Katabatic::GCellGrid::getGCell()).

Referenced by SegmentFsm::conflictSolveByHistory().

  void addInsertEvent (TrackElement * segment, Track * track) [inline], [static]

Parameters:
    segment An AutoSegment to insert in a Track.
    track The Track into which the segment will be inserted.

Schedule the insertion of segment into Track track. The segment must not already be part of a Track.

  void addRemoveEvent (TrackElement * segment) [inline], [static]

Parameters:
    segment A TrackSegment to remove from a Track.

Schedule the removal of segment from Track track.

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

  void addMoveEvent (TrackElement * segment, Track * track) [inline], [static]

Parameters:
    segment An AutoSegment to move into a new Track.
    track The Track into which the segment will be moved.

Schedule the displacement of segment into Track track.

  void addSortEvent (Track * track, bool forced = false) [inline], [static]

Parameters:
    track The Track to update.
    forced Force the invalidation of the Track.

Schedule the update of Track track. If the Track has not been invalidated, no actual sort will takes place. To force a sort (manually invalidating the Track), sets forced to true.

See also: Track::pack() & Track::sort().

Referenced by TrackSegment::revalidate().

  void revalidate () [inline], [static]
Applies all the requested modifications, but keeping the session opened.

Referenced by RoutingEvent::process(), NegociateWindow::run(), and NegociateWindow::setGCells().

  TrackElement * lookup (Segment * segment) [static]
Returns: the TrackElement associated to segment.

Referenced by NegociateWindow::computeWirelength(), TrackSegment::create(), TrackSegment::getCanonical(), TrackSegment::getParent(), TrackSegment::getSourceDogleg(), TrackSegment::getTargetDogleg(), Manipulator::relax(), RoutingEventQueue::repushInvalidateds(), and NegociateWindow::setGCells().

  TrackElement * lookup (AutoSegment * segment) [static]
Returns: the TrackElement associated to segment.

Author

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