2010-03-09 09:24:55 -06:00
|
|
|
// -*- C++ -*-
|
|
|
|
|
|
|
|
|
|
|
|
namespace Kite {
|
|
|
|
|
|
|
|
/*! \class TrackSegment
|
|
|
|
* \brief Derived Katabatic::AutoSegment for the router.
|
|
|
|
*
|
2013-12-03 18:59:29 -06:00
|
|
|
* \image html TrackSegment-10.png "Fig 1: TrackSegment Context"
|
|
|
|
*
|
2010-03-09 09:24:55 -06:00
|
|
|
* We create one TrackSegment per aligned Katabatic::AutoSegment set,
|
|
|
|
* the TrackSegment is associated to the canonical one of the set.
|
|
|
|
*
|
|
|
|
* To provide some speedup, the full extention of the aligned segment
|
|
|
|
* set is computed once and stored in the TrackSegment itself.
|
|
|
|
* The drawback beeing that whenever one segment from the aligned
|
|
|
|
* set has it's extention modified, the full extention must be
|
|
|
|
* recomputed.
|
|
|
|
*
|
|
|
|
*
|
2013-12-03 18:59:29 -06:00
|
|
|
* \section secTSLazyRevalidate Lazy Revalidate
|
2010-03-09 09:24:55 -06:00
|
|
|
*
|
2013-12-03 18:59:29 -06:00
|
|
|
* When the TrackSegment::revalidate() method is called, it only update
|
|
|
|
* the cached size of the segment (from the AutoSegment set of aligneds)
|
|
|
|
* and the track into which it may be inserted.
|
2010-03-09 09:24:55 -06:00
|
|
|
*
|
2013-12-03 18:59:29 -06:00
|
|
|
* The associated DataNegociate and RoutingEvent are \b not updated.
|
|
|
|
* - The RoutingEvent will be updated when it's key is updated,
|
|
|
|
* typically during a requeueing operation \b and in the
|
Added support for "same layer" dogleg. Big fix for pad routing.
* Change: In Knik, in Vertex, add a "blocked" flag to signal disabled
vertexes in the grid (must not be used by the global router).
Modificate the Graph::getVertex() method so that when a vertex
is geometrically queried, if is a blocked one, return a non-blocked
neighbor. This mechanism is introduced to, at last, prevent the
global router to go *under* the pad in case of a commplete chip.
* New: In Katabatic, in AutoSegment, a new state has been added: "reduced".
A reduced segment is in the same layer as it's perpandiculars.
To be reduced, a segments has to be connected on source & target to
AutoContactTurn, both of the perpandiculars must be of the same layer
(below or above) and it's length must not exceed one pitch in the
perpandicular direction.
To reduce an AutoSegment, call ::reduce() and to revert the state,
call ::raise(). Two associated predicates are associated:
::canReduce() and ::mustRaise().
Note: No two adjacent segments can be reduced at the same time.
* Bug: In Katabatic, in GCellTopology, add a new method ::doRp_AccessPad()
to connect to the pads. Create wiring, fixed and non managed by
Katabatic, to connect the pad connector layer to the lowest routing
layers (depth 1 & 2). The former implementation was sometimes leading
to gaps (sheared contact) that *must not* occurs during the building
stage.
Remark: This bug did put under the light the fact that the initial
wiring must be created without gaps. Gaps are closed by making doglegs
on contacts. But this mechanism could only work when the database if
fully initialised (the cache is up to date). Otherwise various problems
arise, in the canonization process for example.
* New: In Katabatic, in AutoContactTerminal::getNativeConstraintBox(),
when anchored on a RoutingPad, now take account the potential rotation
of the Path's transformation. Here again, for the chip's pads.
* New: In Kite, support for reduced AutoSegment. TrackSegment associateds
to reduced AutoSegment are *not* inserted into track to become
effectively invisibles. When a segment becomes reduced, a TrackEvent
is generated to remove it. Conversely when it is raised a RoutingEvent
is created/rescheduled to insert it. All this is mostly managed inside
the Session::revalidate() method.
* New: In Kite, in KiteEngine::createGlobalGraph(), in case of a chip,
mark all global routing vertexes (Knik) that are under a pad, as blockeds.
* Bug: In Cumulus, in PadsCorona.Side.getAxis(), inversion between X and
Y coordinate of the chip size. Did not show until a non-square chip
was routed (i.e. our MIPS R3000).
* Change: In Stratus1, in st_placement.py add the ClockBuffer class for
backward compatibility with the MIPS32 bench. Have to review this
functionnality coming from the deprecated placeAndroute.py.
In st_instance.py, no longer creates the Plug ring of a Net.
In my opinion it just clutter the display until the P&R is called.
Can re-enable later as an option (in Unicorn).
* Change: In Unicorn, in cgt.py, more reliable way of loading then running
user supplied scripts. Borrowed from alliance-checker-toolkit doChip.py .
2015-08-16 16:29:28 -05:00
|
|
|
* SegmentFsm constructor. This should be optimized in the future.
|
2013-12-03 18:59:29 -06:00
|
|
|
* - The DataNegociate is updated \e only in the SegmentFsm
|
|
|
|
* constructor. This is the most costly of the two updates as
|
|
|
|
* it perform a perpandicular & parallel connexity exploration.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* \section secDogleg Dogleg Management
|
|
|
|
*
|
|
|
|
* The basic AutoSegment::canDogleg() method is declined in three more
|
|
|
|
* dedicated methods in this class:
|
|
|
|
* - TrackSegment::canDogleg(), for locals only, check if a break
|
|
|
|
* is possible, never break a segment more than once (to avoid
|
|
|
|
* fragmentation).
|
|
|
|
* - TrackSegment::canDogleg(Katabatic::GCell*,unsigned int flags)
|
|
|
|
* for globals, check that the segment is breakable in the desired
|
|
|
|
* GCell. Never break twice in the first/last GCell (fragmentation
|
|
|
|
* limitation), but may \e reuse an already existing dogleg.
|
|
|
|
* - TrackSegment::canDogleg(Interval), for locals only, direct proxy
|
|
|
|
* for the AutoSegment method. Never allow more than one break.
|
|
|
|
*
|
|
|
|
* <b>Relationship between AutoSegment and TrackSegment</b>
|
|
|
|
*
|
|
|
|
* Figure 2 below, shows an example of dogleg creation:
|
|
|
|
* - At the Katabatic level, AutoSegment \c id:12 is broken. Thus
|
Added support for "same layer" dogleg. Big fix for pad routing.
* Change: In Knik, in Vertex, add a "blocked" flag to signal disabled
vertexes in the grid (must not be used by the global router).
Modificate the Graph::getVertex() method so that when a vertex
is geometrically queried, if is a blocked one, return a non-blocked
neighbor. This mechanism is introduced to, at last, prevent the
global router to go *under* the pad in case of a commplete chip.
* New: In Katabatic, in AutoSegment, a new state has been added: "reduced".
A reduced segment is in the same layer as it's perpandiculars.
To be reduced, a segments has to be connected on source & target to
AutoContactTurn, both of the perpandiculars must be of the same layer
(below or above) and it's length must not exceed one pitch in the
perpandicular direction.
To reduce an AutoSegment, call ::reduce() and to revert the state,
call ::raise(). Two associated predicates are associated:
::canReduce() and ::mustRaise().
Note: No two adjacent segments can be reduced at the same time.
* Bug: In Katabatic, in GCellTopology, add a new method ::doRp_AccessPad()
to connect to the pads. Create wiring, fixed and non managed by
Katabatic, to connect the pad connector layer to the lowest routing
layers (depth 1 & 2). The former implementation was sometimes leading
to gaps (sheared contact) that *must not* occurs during the building
stage.
Remark: This bug did put under the light the fact that the initial
wiring must be created without gaps. Gaps are closed by making doglegs
on contacts. But this mechanism could only work when the database if
fully initialised (the cache is up to date). Otherwise various problems
arise, in the canonization process for example.
* New: In Katabatic, in AutoContactTerminal::getNativeConstraintBox(),
when anchored on a RoutingPad, now take account the potential rotation
of the Path's transformation. Here again, for the chip's pads.
* New: In Kite, support for reduced AutoSegment. TrackSegment associateds
to reduced AutoSegment are *not* inserted into track to become
effectively invisibles. When a segment becomes reduced, a TrackEvent
is generated to remove it. Conversely when it is raised a RoutingEvent
is created/rescheduled to insert it. All this is mostly managed inside
the Session::revalidate() method.
* New: In Kite, in KiteEngine::createGlobalGraph(), in case of a chip,
mark all global routing vertexes (Knik) that are under a pad, as blockeds.
* Bug: In Cumulus, in PadsCorona.Side.getAxis(), inversion between X and
Y coordinate of the chip size. Did not show until a non-square chip
was routed (i.e. our MIPS R3000).
* Change: In Stratus1, in st_placement.py add the ClockBuffer class for
backward compatibility with the MIPS32 bench. Have to review this
functionnality coming from the deprecated placeAndroute.py.
In st_instance.py, no longer creates the Plug ring of a Net.
In my opinion it just clutter the display until the P&R is called.
Can re-enable later as an option (in Unicorn).
* Change: In Unicorn, in cgt.py, more reliable way of loading then running
user supplied scripts. Borrowed from alliance-checker-toolkit doChip.py .
2015-08-16 16:29:28 -05:00
|
|
|
* the creation of AutoSegments \c id:20 and \c id:21. The orignal
|
|
|
|
* TrackSegment (canonical AutoSegment \c id:10) remains on the
|
|
|
|
* right side (target) of the break.
|
2013-12-03 18:59:29 -06:00
|
|
|
* - But, because the canonical of the former aligned AutoSegment
|
|
|
|
* set \c (10,11,12,13,14) was on the \e right side of the break,
|
|
|
|
* the new parallel TrackSegment will be created on the \c left
|
|
|
|
* side, associated to the newly promoted canonical AutoSegment
|
|
|
|
* \c id:12.
|
|
|
|
*
|
|
|
|
* \image html _makeDogleg-10.png "Fig 2: Dogleg Management"
|
|
|
|
*
|
|
|
|
* The TrackSegment::_postDoglegs() method called by all flavors of
|
|
|
|
* TrackSegment::makeDogleg() methods is responsible for creating new
|
|
|
|
* TrackSegments for the new doglegs (there may be more than one), it
|
|
|
|
* also update the dogleg level and source/target dogleg flags.
|
|
|
|
*
|
|
|
|
* \redB{This section is not finished.} I need to review the parent and
|
|
|
|
* doglevel numbering management. There seems to be a risk of infinite
|
|
|
|
* fragmentation as the numbering of the original segment is not
|
|
|
|
* increased, we should create a \e break counter separate from
|
|
|
|
* deepness.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* \section secWeakGlobal Global, Weak Global and Local Segments
|
|
|
|
*
|
|
|
|
* There's a slight semantic change between Katabatic and Kite about
|
|
|
|
* what is local and what is local. This is due to how we consider the
|
|
|
|
* intermediate status of \e WeakGlobal.
|
|
|
|
*
|
|
|
|
* A \c WeakGlobal segment is a local segment which is aligned with a
|
|
|
|
* global (though a VTee or an HTee contact).
|
|
|
|
*
|
|
|
|
* In Katabatic a local segment is one that is not \c Global, a local segment
|
|
|
|
* can be both \c Local and \c WeakGlobal.
|
|
|
|
*
|
|
|
|
* In Kite a local segment is one that is neither \c Global or \c WeakGlobal.
|
|
|
|
* The \c WeakGlobal sides with \c Global unlike in Katabatic.
|
2010-03-09 09:24:55 -06:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
//! \function static TrackSegment* TrackSegment::create ( AutoSegment* segment, Track* track, bool& created );
|
|
|
|
//! \param segment The Katabatic AutoSegment to decorate.
|
|
|
|
//! \param track A Track into which insert the TrackSegment (may be \NULL).
|
|
|
|
//! \param created This flag is sets is a new TrackSegment has be created.
|
|
|
|
//! \return A TrackSegment wrapped around an AutoSegment.
|
|
|
|
//!
|
|
|
|
//! Constructor mainly used at loading time to decorate the Katabatic
|
|
|
|
//! data-base with the router attributes.
|
|
|
|
|
|
|
|
//! \function unsigned long TrackElement::getFreedomDegree() const;
|
|
|
|
//! \sreturn The degree of freedom of the element. It is used as a priority value
|
|
|
|
//! when sorting TrackElement (in RoutingEvent).
|
|
|
|
//!
|
|
|
|
//! Currently, it is the \e slack of the Katabatic::AutoSegment.
|
|
|
|
|
|
|
|
//! \function void TrackSegment::revalidate ();
|
|
|
|
//! Actualize the TrackSegment characteristics from the supporting
|
|
|
|
//! elements (set of AutoSegment).
|
|
|
|
//!
|
|
|
|
//! This method do not update the DataNegociate or the RoutingEvent.
|
|
|
|
//! This is a lazy update delayed until the constructor of SegmentFsm is called.
|
|
|
|
//! (see \ref secTSLazyRevalidate "Lazy Revalidate").
|
|
|
|
|
|
|
|
//! \function TrackSegment* TrackSegment::_postDoglegs ( TrackElement*& perpandicular, TrackElement*& parallel );
|
|
|
|
//! Post-process to be called inside the various dogleg creation or slacken
|
|
|
|
//! methods. Iterate through the newly created AutoSegments to create, for
|
|
|
|
//! the <em>perpandicular</em> and the <em>new parallel</em> associateds
|
|
|
|
//! TrackSegments. Also sets the dogleg levels and flags of the newly
|
|
|
|
//! created elements.
|
|
|
|
//!
|
|
|
|
//! The session dogleg reset is called at the end of this method. The \c perpandicular
|
|
|
|
//! and \c parallel references to pointers contains the newly created segments
|
|
|
|
//! for the \b last dogleg. If more than one was created, you cannot access them
|
|
|
|
//! (the need has not arised yet).
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
}
|