coriolis/katana/src/TrackFixedSegment.cpp

257 lines
7.8 KiB
C++
Raw Normal View History

Anabatic transient commit 18. Port of Kite (Katana), Yeah, Baby! Yeah! * Bug: In Hurricane, in StaticObservable::getObserver(), if the slot pointer is NULL, do not try to access the owner. Returns NULL, so the caller can be aware of the situation... * Change: In Hurricane, in BreakpointWidget & ExceptionWidget some cosmetic changes (fonts and window sizes). * Bug: In Anabatic, In AutoHorizontal::getConstraints(), take into account the constraints from the source AutoContact, as it holds the constraints transmitted by the RoutingPads and sets up by propageConstraintsFromRp(). It is likely to be a bug affecting the original Katabatic as well. * Change: In Anabatic, in RawGCellsUnder(), check that the segment is not completly oustside the cell abutment box and truncate the coordinates to the part that is inside. Use the "shrink" if we reach the east/north border. * Change: In Anabatic, in Configuration, no more decorator because we will use a true derived relationship. Katana *derives* from *Anabatic* and do not *decorate* it, so the Configuration can do the same. It also implies that we directly create a Katana engine, not an Anabatic one. * Change: In Anabatic, in Session, do not allow the opening of the Session in a standalone fashion (with a static method). Instead it must be opened using the relevant method of the Anabatic/Katana engine. This ensure we are opening the right Session type. * Change: In Anabatic, in AutoSegment_Aligneds() collection the seed segment is not part of the collection by default, but will be included if the Flags::WithSelf is set. * Change: In Configuration, all the flags value are now defined in two steps. Declared in the header and initialized in the module. This is to prevent the fact that on some cases, in relation with the Python "extern C" part modules, we need a true allocated variable. It was causing weird linking problems. A side effect is that they can no longer be used as entry is switches, have to replace them by if/else. * New: In Anabatic, new GCell::getNeighborAt() utility function. * Bug: In Anabatic, in GCell::doGrid(), tag all the GCells of the grid with the grid type... Back annote all the edges capacity (north & east) with the reserved local capacity. * New: Complete portage of Kite over Anabatic. The new engine is christened "Katana" for Kite-Analogic. When it's capabilities and performances will be on a part with Kite, it is to completly replace it (and take back the "Kite" name). Preliminary tests seems to show that, contrary to intuition (because built on a more complex/slower grid), it is even slightly faster than Kite 8-).
2016-08-15 09:30:13 -05:00
// -*- C++ -*-
//
// This file is part of the Coriolis Software.
// Copyright (c) UPMC 2008-2018, All Rights Reserved
Anabatic transient commit 18. Port of Kite (Katana), Yeah, Baby! Yeah! * Bug: In Hurricane, in StaticObservable::getObserver(), if the slot pointer is NULL, do not try to access the owner. Returns NULL, so the caller can be aware of the situation... * Change: In Hurricane, in BreakpointWidget & ExceptionWidget some cosmetic changes (fonts and window sizes). * Bug: In Anabatic, In AutoHorizontal::getConstraints(), take into account the constraints from the source AutoContact, as it holds the constraints transmitted by the RoutingPads and sets up by propageConstraintsFromRp(). It is likely to be a bug affecting the original Katabatic as well. * Change: In Anabatic, in RawGCellsUnder(), check that the segment is not completly oustside the cell abutment box and truncate the coordinates to the part that is inside. Use the "shrink" if we reach the east/north border. * Change: In Anabatic, in Configuration, no more decorator because we will use a true derived relationship. Katana *derives* from *Anabatic* and do not *decorate* it, so the Configuration can do the same. It also implies that we directly create a Katana engine, not an Anabatic one. * Change: In Anabatic, in Session, do not allow the opening of the Session in a standalone fashion (with a static method). Instead it must be opened using the relevant method of the Anabatic/Katana engine. This ensure we are opening the right Session type. * Change: In Anabatic, in AutoSegment_Aligneds() collection the seed segment is not part of the collection by default, but will be included if the Flags::WithSelf is set. * Change: In Configuration, all the flags value are now defined in two steps. Declared in the header and initialized in the module. This is to prevent the fact that on some cases, in relation with the Python "extern C" part modules, we need a true allocated variable. It was causing weird linking problems. A side effect is that they can no longer be used as entry is switches, have to replace them by if/else. * New: In Anabatic, new GCell::getNeighborAt() utility function. * Bug: In Anabatic, in GCell::doGrid(), tag all the GCells of the grid with the grid type... Back annote all the edges capacity (north & east) with the reserved local capacity. * New: Complete portage of Kite over Anabatic. The new engine is christened "Katana" for Kite-Analogic. When it's capabilities and performances will be on a part with Kite, it is to completly replace it (and take back the "Kite" name). Preliminary tests seems to show that, contrary to intuition (because built on a more complex/slower grid), it is even slightly faster than Kite 8-).
2016-08-15 09:30:13 -05:00
//
// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | K i t e - D e t a i l e d R o u t e r |
// | |
// | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
// | C++ Module : "./TrackFixedSegment.cpp" |
// +-----------------------------------------------------------------+
#include <sstream>
#include "hurricane/Bug.h"
#include "hurricane/Warning.h"
#include "hurricane/Net.h"
#include "hurricane/Name.h"
#include "hurricane/RegularLayer.h"
#include "hurricane/Technology.h"
#include "hurricane/DataBase.h"
#include "hurricane/Horizontal.h"
#include "hurricane/Vertical.h"
#include "anabatic/AutoContact.h"
#include "crlcore/RoutingGauge.h"
#include "katana/DataNegociate.h"
#include "katana/TrackFixedSegment.h"
#include "katana/TrackCost.h"
#include "katana/Track.h"
#include "katana/Session.h"
#include "katana/RoutingEvent.h"
#include "katana/NegociateWindow.h"
#include "katana/KatanaEngine.h"
namespace Katana {
using namespace std;
using Hurricane::Warning;
using Hurricane::Bug;
using Hurricane::Error;
using Hurricane::Net;
using Hurricane::Name;
using Hurricane::RegularLayer;
using Hurricane::Technology;
using Hurricane::DataBase;
using Hurricane::Horizontal;
using Hurricane::Vertical;
using Anabatic::GCellsUnder;
// -------------------------------------------------------------------
// Class : "TrackFixedSegment".
Net* TrackFixedSegment::_blockageNet = NULL;
TrackFixedSegment::TrackFixedSegment ( Track* track, Segment* segment )
: TrackElement (NULL)
, _segment (segment)
{
Box boundingBox = segment->getBoundingBox();
uint32_t flags = TElemFixed | ((segment->getNet() == _blockageNet) ? TElemBlockage : 0);
Anabatic transient commit 18. Port of Kite (Katana), Yeah, Baby! Yeah! * Bug: In Hurricane, in StaticObservable::getObserver(), if the slot pointer is NULL, do not try to access the owner. Returns NULL, so the caller can be aware of the situation... * Change: In Hurricane, in BreakpointWidget & ExceptionWidget some cosmetic changes (fonts and window sizes). * Bug: In Anabatic, In AutoHorizontal::getConstraints(), take into account the constraints from the source AutoContact, as it holds the constraints transmitted by the RoutingPads and sets up by propageConstraintsFromRp(). It is likely to be a bug affecting the original Katabatic as well. * Change: In Anabatic, in RawGCellsUnder(), check that the segment is not completly oustside the cell abutment box and truncate the coordinates to the part that is inside. Use the "shrink" if we reach the east/north border. * Change: In Anabatic, in Configuration, no more decorator because we will use a true derived relationship. Katana *derives* from *Anabatic* and do not *decorate* it, so the Configuration can do the same. It also implies that we directly create a Katana engine, not an Anabatic one. * Change: In Anabatic, in Session, do not allow the opening of the Session in a standalone fashion (with a static method). Instead it must be opened using the relevant method of the Anabatic/Katana engine. This ensure we are opening the right Session type. * Change: In Anabatic, in AutoSegment_Aligneds() collection the seed segment is not part of the collection by default, but will be included if the Flags::WithSelf is set. * Change: In Configuration, all the flags value are now defined in two steps. Declared in the header and initialized in the module. This is to prevent the fact that on some cases, in relation with the Python "extern C" part modules, we need a true allocated variable. It was causing weird linking problems. A side effect is that they can no longer be used as entry is switches, have to replace them by if/else. * New: In Anabatic, new GCell::getNeighborAt() utility function. * Bug: In Anabatic, in GCell::doGrid(), tag all the GCells of the grid with the grid type... Back annote all the edges capacity (north & east) with the reserved local capacity. * New: Complete portage of Kite over Anabatic. The new engine is christened "Katana" for Kite-Analogic. When it's capabilities and performances will be on a part with Kite, it is to completly replace it (and take back the "Kite" name). Preliminary tests seems to show that, contrary to intuition (because built on a more complex/slower grid), it is even slightly faster than Kite 8-).
2016-08-15 09:30:13 -05:00
setFlags( flags );
if (track) {
uint32_t depth = track->getDepth();
Anabatic transient commit 18. Port of Kite (Katana), Yeah, Baby! Yeah! * Bug: In Hurricane, in StaticObservable::getObserver(), if the slot pointer is NULL, do not try to access the owner. Returns NULL, so the caller can be aware of the situation... * Change: In Hurricane, in BreakpointWidget & ExceptionWidget some cosmetic changes (fonts and window sizes). * Bug: In Anabatic, In AutoHorizontal::getConstraints(), take into account the constraints from the source AutoContact, as it holds the constraints transmitted by the RoutingPads and sets up by propageConstraintsFromRp(). It is likely to be a bug affecting the original Katabatic as well. * Change: In Anabatic, in RawGCellsUnder(), check that the segment is not completly oustside the cell abutment box and truncate the coordinates to the part that is inside. Use the "shrink" if we reach the east/north border. * Change: In Anabatic, in Configuration, no more decorator because we will use a true derived relationship. Katana *derives* from *Anabatic* and do not *decorate* it, so the Configuration can do the same. It also implies that we directly create a Katana engine, not an Anabatic one. * Change: In Anabatic, in Session, do not allow the opening of the Session in a standalone fashion (with a static method). Instead it must be opened using the relevant method of the Anabatic/Katana engine. This ensure we are opening the right Session type. * Change: In Anabatic, in AutoSegment_Aligneds() collection the seed segment is not part of the collection by default, but will be included if the Flags::WithSelf is set. * Change: In Configuration, all the flags value are now defined in two steps. Declared in the header and initialized in the module. This is to prevent the fact that on some cases, in relation with the Python "extern C" part modules, we need a true allocated variable. It was causing weird linking problems. A side effect is that they can no longer be used as entry is switches, have to replace them by if/else. * New: In Anabatic, new GCell::getNeighborAt() utility function. * Bug: In Anabatic, in GCell::doGrid(), tag all the GCells of the grid with the grid type... Back annote all the edges capacity (north & east) with the reserved local capacity. * New: Complete portage of Kite over Anabatic. The new engine is christened "Katana" for Kite-Analogic. When it's capabilities and performances will be on a part with Kite, it is to completly replace it (and take back the "Kite" name). Preliminary tests seems to show that, contrary to intuition (because built on a more complex/slower grid), it is even slightly faster than Kite 8-).
2016-08-15 09:30:13 -05:00
Technology* technology = DataBase::getDB()->getTechnology();
const Layer* layer1 = track->getLayer()->getBlockageLayer();
RegularLayer* layer2 = dynamic_cast<RegularLayer*>(technology->getLayer(layer1->getMask()));
if ( layer2 ) {
Interval uside = track->getKatanaEngine()->getUSide( track->getDirection() );
Interval segside;
if (track->getDirection() == Flags::Horizontal) {
segside = Interval( boundingBox.getXMin(), boundingBox.getXMax() );
_sourceU = max( boundingBox.getXMin(), uside.getVMin());
_targetU = min( boundingBox.getXMax(), uside.getVMax());
} else {
segside = Interval( boundingBox.getYMin(), boundingBox.getYMax() );
_sourceU = max( boundingBox.getYMin(), uside.getVMin());
_targetU = min( boundingBox.getYMax(), uside.getVMax());
}
GCellsUnder gcells = track->getKatanaEngine()->getGCellsUnder( segment );
for ( size_t i=0 ; i<gcells->size() ; ++i ) {
GCell* gcell = gcells->gcellAt(i);
gcell->addBlockage
( depth, gcell->getSide( track->getDirection() ).getIntersection( segside ).getSize() );
}
}
}
}
void TrackFixedSegment::_postCreate ()
{ TrackElement::_postCreate(); }
TrackFixedSegment::~TrackFixedSegment ()
{ }
void TrackFixedSegment::_preDestroy ()
{
cdebug_log(155,0) << "TrackFixedSegment::_preDestroy() - " << (void*)this << endl;
TrackElement::_preDestroy();
}
TrackElement* TrackFixedSegment::create ( Track* track, Segment* segment )
{
if ( not _blockageNet ) _blockageNet = Session::getBlockageNet();
TrackFixedSegment* trackFixedSegment = NULL;
if (track) {
trackFixedSegment = new TrackFixedSegment ( track, segment );
trackFixedSegment->_postCreate();
cdebug_log(159,0) << "Adding: " << segment << " on " << track << endl;
cdebug_log(159,0) << "TrackFixedSegment::create(): " << trackFixedSegment << endl;
Session::addInsertEvent( trackFixedSegment, track );
}
return trackFixedSegment;
}
Synchronize priority of TrackSegments connecteds through doglegs. * Bug: In Anabatic::Dijsktra, correct the indentation in cdebug calls (lots of them causing a big shift right). * New: In Anabatic::TrackSegment, new helper structure SideStack to manage a set of aligned GCells and their various sides sizes. * Change: In Anabatic::TrackSegment::computeOptimal(), more accurate computation of attractors from global segments and variable size GCells using SideStack. * Change: In Katana::DataSymmetric::checkPairing(), increase the tolerance for misaligned symmetrics from 2 to 5 tracks (should be enough for our narrow channel routing). * New: In Katana::TrackSegment, add a first flag to enable locking of priority. If it is set, calls to either "computePriority()" or "forcePriority()" will have no effect. Added the uint32_t flags paraphernalia. * New: In ::computeNetPriority(), overall function to control the call of TrackSegment::computeAlignedPriority(). The call is done from NegociateWindow::run(). * New: Katana::TrackSegment::computeAlignedPriority(), order the TrackSegments aligneds through doglegs to the one with the highest priority is routed first and others progressively from him. Done by forcing an ever decreasing priority on the aligneds ones. The amount of decrease is small so the aligned segments got routed (ordered) in close, if not contiguous, sequence. Priority is locked for the order to remain. * Bug: In Katana::TrackSegment::computePriority(), correct computation of the priority when there is more than 10 free tracks (a DbU::toLambda() call was missing, leading to very big priorities). * Change: In katana::TrackCost CTOR, do not compute a distance to fixed in the case of analog segments, this is backfiring. Slight change of the compare function when delta differs. Seems to improve a little.
2017-05-30 15:33:06 -05:00
AutoSegment* TrackFixedSegment::base () const { return NULL; }
Segment* TrackFixedSegment::getSegment () const { return _segment; }
DbU::Unit TrackFixedSegment::getAxis () const { return getTrack()->getAxis(); }
bool TrackFixedSegment::isHorizontal () const { return getTrack()->isHorizontal(); }
bool TrackFixedSegment::isVertical () const { return getTrack()->isVertical(); }
bool TrackFixedSegment::isFixed () const { return true; }
bool TrackFixedSegment::isPriorityLocked () const { return false; }
Flags TrackFixedSegment::getDirection () const { return getTrack()->getDirection(); }
Katana manage wide wires, and they can also be symmetric. * New: In Anabatic::AutoContact and the derived classes, manages wide wires. The contact self dimension itself according to the segments it is connected to. Special case for the AutoContactTerminal which also read the size of the component it is anchored upon. New refresh method "updateSize()" and flag CntInvalidatedWidth. to compute the size. In AutoContactTerminal, compute the constraint box according to the width of the segment. * New: In Anabatic::AutoSegment, flags are now implemented as "static const" attributes of the class. The flags are stored into a uint64_t as they are more than 32. Added new flag "SegWide" and associated predicates. * Change: In GCellTopology::_doHChannel() and GCellTopology::_doVChannel(), uses the simpler overload of AutoSegment::create() in order to detect the wire width automatically. * New: In Katana::Manipulator, split insertToTrack() and forceToTrack() into a one-track method and a segment level method that iterate over the track span of the segment. * New: In Katana::SegmentFsm, for each cost in the table, now allow access to a specific track. So the base functions have now two parameters: "icost" and "itrack" (has a cost can have multiple tracks in the case of wide segments). * Change: In Katana::TrackElement, remove the index of the element inside it's track, as for a wide segment it will not be meaningful for the non-base track. This means that we have to use the Track::find() method each time instead. Remove the wide flag, as it is a duplicate of the one in AutoSegment. Added a getTrackCount() method to tell the number of track the segment is inserted into. Needed in the Track destroy step to delete a segment only when the last track that refers it is destroyed. Added getSymmetricAxis() to correct the computation of the symmetric base track in case of wide segment as the base track is not centered but the the leftmost one. * Change: In Track::insert() insert wide segments in their whole track span. * Change: In TrackCost, create an array of costs according to the segment track span. * Change: In TrackSegment::create(), now activate the factory and create wide segments. * Bug: In Katana::AutoSegments_Perpandicular, correct the debug indentation problem (ever shifting to the right).
2017-07-28 08:30:22 -05:00
DbU::Unit TrackFixedSegment::getWidth () const { return _segment->getWidth(); }
Synchronize priority of TrackSegments connecteds through doglegs. * Bug: In Anabatic::Dijsktra, correct the indentation in cdebug calls (lots of them causing a big shift right). * New: In Anabatic::TrackSegment, new helper structure SideStack to manage a set of aligned GCells and their various sides sizes. * Change: In Anabatic::TrackSegment::computeOptimal(), more accurate computation of attractors from global segments and variable size GCells using SideStack. * Change: In Katana::DataSymmetric::checkPairing(), increase the tolerance for misaligned symmetrics from 2 to 5 tracks (should be enough for our narrow channel routing). * New: In Katana::TrackSegment, add a first flag to enable locking of priority. If it is set, calls to either "computePriority()" or "forcePriority()" will have no effect. Added the uint32_t flags paraphernalia. * New: In ::computeNetPriority(), overall function to control the call of TrackSegment::computeAlignedPriority(). The call is done from NegociateWindow::run(). * New: Katana::TrackSegment::computeAlignedPriority(), order the TrackSegments aligneds through doglegs to the one with the highest priority is routed first and others progressively from him. Done by forcing an ever decreasing priority on the aligneds ones. The amount of decrease is small so the aligned segments got routed (ordered) in close, if not contiguous, sequence. Priority is locked for the order to remain. * Bug: In Katana::TrackSegment::computePriority(), correct computation of the priority when there is more than 10 free tracks (a DbU::toLambda() call was missing, leading to very big priorities). * Change: In katana::TrackCost CTOR, do not compute a distance to fixed in the case of analog segments, this is backfiring. Slight change of the compare function when delta differs. Seems to improve a little.
2017-05-30 15:33:06 -05:00
const Layer* TrackFixedSegment::getLayer () const { return _segment->getLayer(); }
Interval TrackFixedSegment::getFreeInterval () const { return Interval(); }
size_t TrackFixedSegment::getTrackSpan () const { return 1; }
Anabatic transient commit 18. Port of Kite (Katana), Yeah, Baby! Yeah! * Bug: In Hurricane, in StaticObservable::getObserver(), if the slot pointer is NULL, do not try to access the owner. Returns NULL, so the caller can be aware of the situation... * Change: In Hurricane, in BreakpointWidget & ExceptionWidget some cosmetic changes (fonts and window sizes). * Bug: In Anabatic, In AutoHorizontal::getConstraints(), take into account the constraints from the source AutoContact, as it holds the constraints transmitted by the RoutingPads and sets up by propageConstraintsFromRp(). It is likely to be a bug affecting the original Katabatic as well. * Change: In Anabatic, in RawGCellsUnder(), check that the segment is not completly oustside the cell abutment box and truncate the coordinates to the part that is inside. Use the "shrink" if we reach the east/north border. * Change: In Anabatic, in Configuration, no more decorator because we will use a true derived relationship. Katana *derives* from *Anabatic* and do not *decorate* it, so the Configuration can do the same. It also implies that we directly create a Katana engine, not an Anabatic one. * Change: In Anabatic, in Session, do not allow the opening of the Session in a standalone fashion (with a static method). Instead it must be opened using the relevant method of the Anabatic/Katana engine. This ensure we are opening the right Session type. * Change: In Anabatic, in AutoSegment_Aligneds() collection the seed segment is not part of the collection by default, but will be included if the Flags::WithSelf is set. * Change: In Configuration, all the flags value are now defined in two steps. Declared in the header and initialized in the module. This is to prevent the fact that on some cases, in relation with the Python "extern C" part modules, we need a true allocated variable. It was causing weird linking problems. A side effect is that they can no longer be used as entry is switches, have to replace them by if/else. * New: In Anabatic, new GCell::getNeighborAt() utility function. * Bug: In Anabatic, in GCell::doGrid(), tag all the GCells of the grid with the grid type... Back annote all the edges capacity (north & east) with the reserved local capacity. * New: Complete portage of Kite over Anabatic. The new engine is christened "Katana" for Kite-Analogic. When it's capabilities and performances will be on a part with Kite, it is to completly replace it (and take back the "Kite" name). Preliminary tests seems to show that, contrary to intuition (because built on a more complex/slower grid), it is even slightly faster than Kite 8-).
2016-08-15 09:30:13 -05:00
Basic support for FreePDK 45 completed. * New: In Commons, inspector support for std::pair<T,U>. * New: In Hurricane::Layer, ContactLayer & ViaLayer, support for non square VIAs. The hole (cut) remains square, but the various metal extensions can now be different in X and Y. The ::getEnclosure() method now takes a flag EnclosureH / EnclosureV. * New: In Hurricane::DbU, inspector support for: std::pair<DbU::Unit,DbU::Unit> std::array<DbU::Unit,3> Must be defined here as DbU do not exists yet in Commons.h * Bug: In Hurricane::Interval::getSize(), when the interval is "full span", do not return the difference between min and max, but directly DbU::Max. (the previous result was -1 !) * New: In CRL Core Python/Technology.py, support for non square VIAs in the configuration files. Applied to FreePDK 45. * New: In CRL::RoutingGauge, added a "symbolic" flag to tell if a gauge is for symbolic layout or not. Exported to Python. * New: In Anabatic::AutoHorizontal::updatePosition(), differentiated computation for soure or target taking account of the VIA extension in the right segment metal (due to non-square VIAs). * Change: In Anabatic::AutoHorizontal::_makeDogleg(), the dogleg is UP for HV gauges and DOWN for VH. * New: In Anabatic::AutoSegment::_initialize(), create a cache of the various extension length for each layer (viaToTop, viaToBottom, viaToSame). New implementation of getExtensionCap() using the previous cached extension table. See updatePositions(). New static functions to access the extension cache in the header: getViaTotopCap() ... * Change: In Anabatic::AutoSegment, in various update methods, updateOrient() must always be called *before* updatePositions() as extensions are dependant on source/target. * New: In Anabatic::AutoSegment::getEndAxes() compute the position of the first source and last target position (center/axes) on an *aligned* set of segments. * New: In Anabatic::AutoSegment, add a new state flag SegAxisFixed to signal segments that can be put on only one track. Specific case to VH gauge for a M1 vertical terminal with a M2 vertical segment. The M2 is effectively bound to the M1 axis position. * Bug: In Anabatic::NetBuilderVH::_do_xG_xM1_xM3(), in case of E/W global and only one RoutingPad the connexion to the RoutingPad was duplicated. It was valid, but totally stupid. * Bug: In Anabatic::Session::_canonize(), for an aligned segment set, intersect the user constraints from all segments instead of only considering the canonical one. Issue a warning about too tight constraints only for symbolic gauges. It may be correct for the real ones. * New: In Katata::DataNegociate::update(), more accurate computation of the perpandicular free interval. Use segment extension cap calculation. Create a special case for fixed axis segments allowing them to find alternative free interval, try under source and under target as they are likely to be draggable segments. * Change: In Katana::Manipulator::relax(), use the extension cap value to compute the axis of the perpandicular segemnts. * Change: In Katana::Manipulator::moveUp(), now move up the whole set of aligned segments instead of just the canonical one. * Change: In Katana::NegociateWindow::loadRoutingPads(), more accurate TrackMarkers insertions for fixed terminals. * New: In Katana::RoutingEvent::Key::Compare::operator(), segments with fixed axis are processed prior to any others. * New: In Katana::RoutingEventLoop, store segment pointers instead of ids to generate more accurate error messages. * Change: In Katana::RoutingPlane::create(), perform local track assignment only for HV gauges. * Change: In Katana::SegmentFsm::_slackenLocal(), add a "dragMinimize" step in the automaton. Mutliple states transitions can occurs in a row if an action fails. * New: In Katana::Session::_toIntervalAxis(), normalize interval bounds so they are on track positions (by shrinking the interval). * Bug: In Katana::TrackMarker CTOR, the weigh computation was wrong.
2018-02-17 13:27:38 -06:00
DbU::Unit TrackFixedSegment::getSourceAxis () const
{
const Horizontal* horizontal = dynamic_cast<const Horizontal*>( _segment );
if (horizontal) return horizontal->getSourceX();
const Vertical* vertical = dynamic_cast<const Vertical*>( _segment );
if (vertical) return vertical->getSourceY();
return 0;
}
DbU::Unit TrackFixedSegment::getTargetAxis () const
{
const Horizontal* horizontal = dynamic_cast<const Horizontal*>( _segment );
if (horizontal) return horizontal->getTargetX();
const Vertical* vertical = dynamic_cast<const Vertical*>( _segment );
if (vertical) return vertical->getTargetY();
return 0;
}
Anabatic transient commit 18. Port of Kite (Katana), Yeah, Baby! Yeah! * Bug: In Hurricane, in StaticObservable::getObserver(), if the slot pointer is NULL, do not try to access the owner. Returns NULL, so the caller can be aware of the situation... * Change: In Hurricane, in BreakpointWidget & ExceptionWidget some cosmetic changes (fonts and window sizes). * Bug: In Anabatic, In AutoHorizontal::getConstraints(), take into account the constraints from the source AutoContact, as it holds the constraints transmitted by the RoutingPads and sets up by propageConstraintsFromRp(). It is likely to be a bug affecting the original Katabatic as well. * Change: In Anabatic, in RawGCellsUnder(), check that the segment is not completly oustside the cell abutment box and truncate the coordinates to the part that is inside. Use the "shrink" if we reach the east/north border. * Change: In Anabatic, in Configuration, no more decorator because we will use a true derived relationship. Katana *derives* from *Anabatic* and do not *decorate* it, so the Configuration can do the same. It also implies that we directly create a Katana engine, not an Anabatic one. * Change: In Anabatic, in Session, do not allow the opening of the Session in a standalone fashion (with a static method). Instead it must be opened using the relevant method of the Anabatic/Katana engine. This ensure we are opening the right Session type. * Change: In Anabatic, in AutoSegment_Aligneds() collection the seed segment is not part of the collection by default, but will be included if the Flags::WithSelf is set. * Change: In Configuration, all the flags value are now defined in two steps. Declared in the header and initialized in the module. This is to prevent the fact that on some cases, in relation with the Python "extern C" part modules, we need a true allocated variable. It was causing weird linking problems. A side effect is that they can no longer be used as entry is switches, have to replace them by if/else. * New: In Anabatic, new GCell::getNeighborAt() utility function. * Bug: In Anabatic, in GCell::doGrid(), tag all the GCells of the grid with the grid type... Back annote all the edges capacity (north & east) with the reserved local capacity. * New: Complete portage of Kite over Anabatic. The new engine is christened "Katana" for Kite-Analogic. When it's capabilities and performances will be on a part with Kite, it is to completly replace it (and take back the "Kite" name). Preliminary tests seems to show that, contrary to intuition (because built on a more complex/slower grid), it is even slightly faster than Kite 8-).
2016-08-15 09:30:13 -05:00
unsigned long TrackFixedSegment::getId () const
{
cerr << Error("::getId() called on %s.",_getString().c_str()) << endl;
return 0;
}
Net* TrackFixedSegment::getNet () const
{
Net* realNet = _segment->getNet();
if (realNet->isSupply() or realNet->isClock())
return _blockageNet;
return realNet;
}
TrackElement* TrackFixedSegment::getNext () const
{
Katana manage wide wires, and they can also be symmetric. * New: In Anabatic::AutoContact and the derived classes, manages wide wires. The contact self dimension itself according to the segments it is connected to. Special case for the AutoContactTerminal which also read the size of the component it is anchored upon. New refresh method "updateSize()" and flag CntInvalidatedWidth. to compute the size. In AutoContactTerminal, compute the constraint box according to the width of the segment. * New: In Anabatic::AutoSegment, flags are now implemented as "static const" attributes of the class. The flags are stored into a uint64_t as they are more than 32. Added new flag "SegWide" and associated predicates. * Change: In GCellTopology::_doHChannel() and GCellTopology::_doVChannel(), uses the simpler overload of AutoSegment::create() in order to detect the wire width automatically. * New: In Katana::Manipulator, split insertToTrack() and forceToTrack() into a one-track method and a segment level method that iterate over the track span of the segment. * New: In Katana::SegmentFsm, for each cost in the table, now allow access to a specific track. So the base functions have now two parameters: "icost" and "itrack" (has a cost can have multiple tracks in the case of wide segments). * Change: In Katana::TrackElement, remove the index of the element inside it's track, as for a wide segment it will not be meaningful for the non-base track. This means that we have to use the Track::find() method each time instead. Remove the wide flag, as it is a duplicate of the one in AutoSegment. Added a getTrackCount() method to tell the number of track the segment is inserted into. Needed in the Track destroy step to delete a segment only when the last track that refers it is destroyed. Added getSymmetricAxis() to correct the computation of the symmetric base track in case of wide segment as the base track is not centered but the the leftmost one. * Change: In Track::insert() insert wide segments in their whole track span. * Change: In TrackCost, create an array of costs according to the segment track span. * Change: In TrackSegment::create(), now activate the factory and create wide segments. * Bug: In Katana::AutoSegments_Perpandicular, correct the debug indentation problem (ever shifting to the right).
2017-07-28 08:30:22 -05:00
size_t dummy = _track->find( this );
Anabatic transient commit 18. Port of Kite (Katana), Yeah, Baby! Yeah! * Bug: In Hurricane, in StaticObservable::getObserver(), if the slot pointer is NULL, do not try to access the owner. Returns NULL, so the caller can be aware of the situation... * Change: In Hurricane, in BreakpointWidget & ExceptionWidget some cosmetic changes (fonts and window sizes). * Bug: In Anabatic, In AutoHorizontal::getConstraints(), take into account the constraints from the source AutoContact, as it holds the constraints transmitted by the RoutingPads and sets up by propageConstraintsFromRp(). It is likely to be a bug affecting the original Katabatic as well. * Change: In Anabatic, in RawGCellsUnder(), check that the segment is not completly oustside the cell abutment box and truncate the coordinates to the part that is inside. Use the "shrink" if we reach the east/north border. * Change: In Anabatic, in Configuration, no more decorator because we will use a true derived relationship. Katana *derives* from *Anabatic* and do not *decorate* it, so the Configuration can do the same. It also implies that we directly create a Katana engine, not an Anabatic one. * Change: In Anabatic, in Session, do not allow the opening of the Session in a standalone fashion (with a static method). Instead it must be opened using the relevant method of the Anabatic/Katana engine. This ensure we are opening the right Session type. * Change: In Anabatic, in AutoSegment_Aligneds() collection the seed segment is not part of the collection by default, but will be included if the Flags::WithSelf is set. * Change: In Configuration, all the flags value are now defined in two steps. Declared in the header and initialized in the module. This is to prevent the fact that on some cases, in relation with the Python "extern C" part modules, we need a true allocated variable. It was causing weird linking problems. A side effect is that they can no longer be used as entry is switches, have to replace them by if/else. * New: In Anabatic, new GCell::getNeighborAt() utility function. * Bug: In Anabatic, in GCell::doGrid(), tag all the GCells of the grid with the grid type... Back annote all the edges capacity (north & east) with the reserved local capacity. * New: Complete portage of Kite over Anabatic. The new engine is christened "Katana" for Kite-Analogic. When it's capabilities and performances will be on a part with Kite, it is to completly replace it (and take back the "Kite" name). Preliminary tests seems to show that, contrary to intuition (because built on a more complex/slower grid), it is even slightly faster than Kite 8-).
2016-08-15 09:30:13 -05:00
return _track->getNext( dummy, getNet() );
}
TrackElement* TrackFixedSegment::getPrevious () const
{
Katana manage wide wires, and they can also be symmetric. * New: In Anabatic::AutoContact and the derived classes, manages wide wires. The contact self dimension itself according to the segments it is connected to. Special case for the AutoContactTerminal which also read the size of the component it is anchored upon. New refresh method "updateSize()" and flag CntInvalidatedWidth. to compute the size. In AutoContactTerminal, compute the constraint box according to the width of the segment. * New: In Anabatic::AutoSegment, flags are now implemented as "static const" attributes of the class. The flags are stored into a uint64_t as they are more than 32. Added new flag "SegWide" and associated predicates. * Change: In GCellTopology::_doHChannel() and GCellTopology::_doVChannel(), uses the simpler overload of AutoSegment::create() in order to detect the wire width automatically. * New: In Katana::Manipulator, split insertToTrack() and forceToTrack() into a one-track method and a segment level method that iterate over the track span of the segment. * New: In Katana::SegmentFsm, for each cost in the table, now allow access to a specific track. So the base functions have now two parameters: "icost" and "itrack" (has a cost can have multiple tracks in the case of wide segments). * Change: In Katana::TrackElement, remove the index of the element inside it's track, as for a wide segment it will not be meaningful for the non-base track. This means that we have to use the Track::find() method each time instead. Remove the wide flag, as it is a duplicate of the one in AutoSegment. Added a getTrackCount() method to tell the number of track the segment is inserted into. Needed in the Track destroy step to delete a segment only when the last track that refers it is destroyed. Added getSymmetricAxis() to correct the computation of the symmetric base track in case of wide segment as the base track is not centered but the the leftmost one. * Change: In Track::insert() insert wide segments in their whole track span. * Change: In TrackCost, create an array of costs according to the segment track span. * Change: In TrackSegment::create(), now activate the factory and create wide segments. * Bug: In Katana::AutoSegments_Perpandicular, correct the debug indentation problem (ever shifting to the right).
2017-07-28 08:30:22 -05:00
size_t dummy = _track->find( this );
Anabatic transient commit 18. Port of Kite (Katana), Yeah, Baby! Yeah! * Bug: In Hurricane, in StaticObservable::getObserver(), if the slot pointer is NULL, do not try to access the owner. Returns NULL, so the caller can be aware of the situation... * Change: In Hurricane, in BreakpointWidget & ExceptionWidget some cosmetic changes (fonts and window sizes). * Bug: In Anabatic, In AutoHorizontal::getConstraints(), take into account the constraints from the source AutoContact, as it holds the constraints transmitted by the RoutingPads and sets up by propageConstraintsFromRp(). It is likely to be a bug affecting the original Katabatic as well. * Change: In Anabatic, in RawGCellsUnder(), check that the segment is not completly oustside the cell abutment box and truncate the coordinates to the part that is inside. Use the "shrink" if we reach the east/north border. * Change: In Anabatic, in Configuration, no more decorator because we will use a true derived relationship. Katana *derives* from *Anabatic* and do not *decorate* it, so the Configuration can do the same. It also implies that we directly create a Katana engine, not an Anabatic one. * Change: In Anabatic, in Session, do not allow the opening of the Session in a standalone fashion (with a static method). Instead it must be opened using the relevant method of the Anabatic/Katana engine. This ensure we are opening the right Session type. * Change: In Anabatic, in AutoSegment_Aligneds() collection the seed segment is not part of the collection by default, but will be included if the Flags::WithSelf is set. * Change: In Configuration, all the flags value are now defined in two steps. Declared in the header and initialized in the module. This is to prevent the fact that on some cases, in relation with the Python "extern C" part modules, we need a true allocated variable. It was causing weird linking problems. A side effect is that they can no longer be used as entry is switches, have to replace them by if/else. * New: In Anabatic, new GCell::getNeighborAt() utility function. * Bug: In Anabatic, in GCell::doGrid(), tag all the GCells of the grid with the grid type... Back annote all the edges capacity (north & east) with the reserved local capacity. * New: Complete portage of Kite over Anabatic. The new engine is christened "Katana" for Kite-Analogic. When it's capabilities and performances will be on a part with Kite, it is to completly replace it (and take back the "Kite" name). Preliminary tests seems to show that, contrary to intuition (because built on a more complex/slower grid), it is even slightly faster than Kite 8-).
2016-08-15 09:30:13 -05:00
return _track->getPrevious( dummy, getNet() );
}
void TrackFixedSegment::addOverlapCost ( TrackCost& cost ) const
{
Track* track = cost.getTrack();
if (not track) return;
track->addOverlapCost( cost );
}
float TrackFixedSegment::getPriority () const
{ return 0.0; }
Synchronize priority of TrackSegments connecteds through doglegs. * Bug: In Anabatic::Dijsktra, correct the indentation in cdebug calls (lots of them causing a big shift right). * New: In Anabatic::TrackSegment, new helper structure SideStack to manage a set of aligned GCells and their various sides sizes. * Change: In Anabatic::TrackSegment::computeOptimal(), more accurate computation of attractors from global segments and variable size GCells using SideStack. * Change: In Katana::DataSymmetric::checkPairing(), increase the tolerance for misaligned symmetrics from 2 to 5 tracks (should be enough for our narrow channel routing). * New: In Katana::TrackSegment, add a first flag to enable locking of priority. If it is set, calls to either "computePriority()" or "forcePriority()" will have no effect. Added the uint32_t flags paraphernalia. * New: In ::computeNetPriority(), overall function to control the call of TrackSegment::computeAlignedPriority(). The call is done from NegociateWindow::run(). * New: Katana::TrackSegment::computeAlignedPriority(), order the TrackSegments aligneds through doglegs to the one with the highest priority is routed first and others progressively from him. Done by forcing an ever decreasing priority on the aligneds ones. The amount of decrease is small so the aligned segments got routed (ordered) in close, if not contiguous, sequence. Priority is locked for the order to remain. * Bug: In Katana::TrackSegment::computePriority(), correct computation of the priority when there is more than 10 free tracks (a DbU::toLambda() call was missing, leading to very big priorities). * Change: In katana::TrackCost CTOR, do not compute a distance to fixed in the case of analog segments, this is backfiring. Slight change of the compare function when delta differs. Seems to improve a little.
2017-05-30 15:33:06 -05:00
void TrackFixedSegment::setPriorityLock ( bool )
{ }
void TrackFixedSegment::forcePriority ( float )
{ }
void TrackFixedSegment::computePriority ()
{ }
void TrackFixedSegment::computeAlignedPriority ()
{ }
Anabatic transient commit 18. Port of Kite (Katana), Yeah, Baby! Yeah! * Bug: In Hurricane, in StaticObservable::getObserver(), if the slot pointer is NULL, do not try to access the owner. Returns NULL, so the caller can be aware of the situation... * Change: In Hurricane, in BreakpointWidget & ExceptionWidget some cosmetic changes (fonts and window sizes). * Bug: In Anabatic, In AutoHorizontal::getConstraints(), take into account the constraints from the source AutoContact, as it holds the constraints transmitted by the RoutingPads and sets up by propageConstraintsFromRp(). It is likely to be a bug affecting the original Katabatic as well. * Change: In Anabatic, in RawGCellsUnder(), check that the segment is not completly oustside the cell abutment box and truncate the coordinates to the part that is inside. Use the "shrink" if we reach the east/north border. * Change: In Anabatic, in Configuration, no more decorator because we will use a true derived relationship. Katana *derives* from *Anabatic* and do not *decorate* it, so the Configuration can do the same. It also implies that we directly create a Katana engine, not an Anabatic one. * Change: In Anabatic, in Session, do not allow the opening of the Session in a standalone fashion (with a static method). Instead it must be opened using the relevant method of the Anabatic/Katana engine. This ensure we are opening the right Session type. * Change: In Anabatic, in AutoSegment_Aligneds() collection the seed segment is not part of the collection by default, but will be included if the Flags::WithSelf is set. * Change: In Configuration, all the flags value are now defined in two steps. Declared in the header and initialized in the module. This is to prevent the fact that on some cases, in relation with the Python "extern C" part modules, we need a true allocated variable. It was causing weird linking problems. A side effect is that they can no longer be used as entry is switches, have to replace them by if/else. * New: In Anabatic, new GCell::getNeighborAt() utility function. * Bug: In Anabatic, in GCell::doGrid(), tag all the GCells of the grid with the grid type... Back annote all the edges capacity (north & east) with the reserved local capacity. * New: Complete portage of Kite over Anabatic. The new engine is christened "Katana" for Kite-Analogic. When it's capabilities and performances will be on a part with Kite, it is to completly replace it (and take back the "Kite" name). Preliminary tests seems to show that, contrary to intuition (because built on a more complex/slower grid), it is even slightly faster than Kite 8-).
2016-08-15 09:30:13 -05:00
string TrackFixedSegment::_getTypeName () const
{ return "TrackFixedSegment"; }
string TrackFixedSegment::_getString () const
{
string s1 = _segment->_getString();
string s2 = " [" + DbU::getValueString(_sourceU)
+ ":" + DbU::getValueString(_targetU) + "]"
+ " " + DbU::getValueString(_targetU-_sourceU)
+ "F"
+ ((isBlockage()) ? "B" : "-");
s1.insert ( s1.size()-1, s2 );
return s1;
}
Record* TrackFixedSegment::_getRecord () const
{
Record* record = TrackElement::_getRecord();
record->add( getSlot( "_segment", _segment ) );
return record;
}
} // Katana namespace.