119 lines
6.0 KiB
Plaintext
119 lines
6.0 KiB
Plaintext
|
|
||
|
// -*- C++ -*-
|
||
|
|
||
|
|
||
|
namespace Kite {
|
||
|
|
||
|
/*! \class TrackSegmentCost
|
||
|
* \brief The cost calculator of a TrackSegment.
|
||
|
*
|
||
|
* \section secMiscAttributes Miscellaneous attributes
|
||
|
*
|
||
|
* Net instead of \TrackSegment : what we will access the most is the
|
||
|
* \TrackSegment owner, so it's it we keep as an attribute. The consequence
|
||
|
* beeing that the update member function should be given the \TrackSegment
|
||
|
* as argument.
|
||
|
*
|
||
|
*
|
||
|
* \section secBoundInterval Bound interval cost component
|
||
|
*
|
||
|
* This is the minimal interval to which the \TrackSegment can be
|
||
|
* shrunk without breaking the net's connexity. The interval is
|
||
|
* computed by AutoSegment::getTopologicalInfos(). And the computation
|
||
|
* is as follow :
|
||
|
* <ol>
|
||
|
* <li>Each AutoContact has a <em>constraint box</em> which defines
|
||
|
* the legal area where the AutoContact could be positionned.
|
||
|
* <li>The <em>left bound</em> is the minimum of all constraints
|
||
|
* boxes max.
|
||
|
* <li>Conversely, the <em>right bound</em> is the maximum of all
|
||
|
* constraints boxes min.
|
||
|
* </ol>
|
||
|
* \image html TrackSegmentCost-1.png "Left bound & right bound"
|
||
|
* \image latex TrackSegmentCost-1.pdf "Left bound & right bound" width=0.6\textwidth
|
||
|
*
|
||
|
* \image html TrackSegmentCost-2.png "Maximal shrink example"
|
||
|
* \image latex TrackSegmentCost-2.pdf "Maximal shrink example" width=0.6\textwidth
|
||
|
*
|
||
|
*
|
||
|
* \section secCostAttractors Attractors and differential wirelength cost component
|
||
|
*
|
||
|
* The goal of attractors is to compute the wirelength variation whenever
|
||
|
* the \TrackSegment changes of supporting \Track.
|
||
|
*
|
||
|
* The \TrackSegment is connected to perpandicular \TrackSegment, attractors
|
||
|
* are the extremity position of those perpandicular <em>which are not</em>
|
||
|
* connected to the reference \TrackSegment. The true rule is more complex
|
||
|
* an is computed by AutoSegment::isTopologicalBound().
|
||
|
*
|
||
|
* \image html TrackSegmentCost-3.png "Attractors example"
|
||
|
* \image latex TrackSegmentCost-3.pdf "Attractors example" width=0.6\textwidth
|
||
|
*
|
||
|
* In the attractor example, the reference horizontal \TrackSegment (in
|
||
|
* black) which is made of (at least) three \c AutoSegments, is connected
|
||
|
* to five vertical canonical \TrackSegment (labelled \e A through \e E).
|
||
|
*
|
||
|
* \e Left attractors are below the horizontal \TrackSegment axis,
|
||
|
* \e right ones are above. Punctual attractors are exactly on the axis.
|
||
|
*
|
||
|
* As both \TrackSegment and \c AutoSegment are orienteds, source is always
|
||
|
* the minimum and target always the maximum.
|
||
|
*
|
||
|
* The attractors are deduced as follow :
|
||
|
* <ul>
|
||
|
* <li>\e A : source is on the axis and move with it, so it is not took
|
||
|
* into account. Target <code>\@2:19</code> is a right attractor.
|
||
|
* <li>\e B : not aligned due to constraints on \e A, fully included in
|
||
|
* \e A, do not generate attractor.
|
||
|
* <li>\e C : canonical is accross the reference horizontal, both source
|
||
|
* and target generate attractors : <code>left \@7:6</code> and
|
||
|
* <code>right \@7:16</code>.
|
||
|
* <li>\e D : punctual, that is null-length canonical exactly on the
|
||
|
* axis. Generate only one attractor : <code>punctual \@14:10</code>
|
||
|
* (i.e. not one for each extremity).
|
||
|
* <li>\e E : target is on the axis and move with it, so it is not took
|
||
|
* into account. Target <code>\@23:4</code> is a left attractor.
|
||
|
* </ul>
|
||
|
* The concept of left/right and punctual flavor for attractors are only
|
||
|
* used dured construction. Once built only the coordinate remains.
|
||
|
*
|
||
|
* The extremity of perpandicular canonical \TrackSegment connected to
|
||
|
* the reference segment do not generate attractors because they move
|
||
|
* with it. But there are exception to this behavior : one is that
|
||
|
* the extremity is in fact anchored to a terminal and will not move.
|
||
|
* This is the work of the AutoSegment::isTopologicalBound() function
|
||
|
* to check for thoses exceptions, in which case an attractor will be
|
||
|
* created.
|
||
|
*
|
||
|
*
|
||
|
* \section secTerminalCount The terminal count cost component
|
||
|
*
|
||
|
* The number of terminals directly connected to this \TrackSegment.
|
||
|
* Computation relies on AutoSegment::getTerminalCount().
|
||
|
*/
|
||
|
|
||
|
/*! \function Net* TrackSegmentCost::getNet () const;
|
||
|
* \Return The Net owning this TrackSegment.
|
||
|
*/
|
||
|
|
||
|
/*! \function unsigned int TrackSegmentCost::getTerminals () const;
|
||
|
* \Return The number of terminal directly connected to this \TrackSegment.
|
||
|
*/
|
||
|
|
||
|
/*! \function DbU::Unit TrackSegmentCost::getWiringDelta ( DbU::Unit axis ) const;
|
||
|
* \param axis The axis where to put the TrackSegment.
|
||
|
*
|
||
|
* \return The total wirelengh needed for perpandicular TrackSegment to connect
|
||
|
* with this one sets on <em>axis</em>. The sum of distance to all the
|
||
|
* attractors.
|
||
|
*/
|
||
|
|
||
|
/*! \function void TrackSegmentCost::update ( TrackSegment* trackSegment );
|
||
|
* \param trackSegment the associated \TrackSegment, must be the same as used
|
||
|
* in the construction.
|
||
|
*
|
||
|
* Update the cost calculator after a relative position change.
|
||
|
*/
|
||
|
|
||
|
} // End of Kite namespace.
|