Fix too naive obstacle detection on non-prefered metal2 wires.
* Fix: In Manipulator::avoidBlockage(), the dedicated function to check if there is an obstacle in the way of a non-prefered routing wire (done for metal2 connecting to terminals only) was too naive. We were checking the tracks for obstacles crossing exactly the axis of the segment. And for near-miss this is not enough. Now check on the whole x-span to be used by the segment. Code borrowed and simplified from Track::addOverlapcost(). * Change: In Manipulator::moveUp(), the default value for the extra reservation allowing a long wire to move up need to be customized for Flexlib/StdCellLib (allow successful routing of ChipFlow/MPW4). Add two new configuration parameters to katana: * "katana.longWireUpThresold1" : the length, expressed in number of *slice height* above which a global wire is considered a *long* wire (not close interconnect). * "katana.longWireUpReserve1" : the extra number of free tracks that must remains free in the up layer after the move up, in each GCell traversed by the wire. Expressed in number of tracks, but can be non-integer (float, for instance: 1.5).
This commit is contained in:
parent
92e5f3fa4d
commit
a4ad671739
|
@ -41,6 +41,8 @@ namespace Katana {
|
||||||
: Anabatic::Configuration()
|
: Anabatic::Configuration()
|
||||||
, _postEventCb ()
|
, _postEventCb ()
|
||||||
, _searchHalo (Cfg::getParamInt ("katana.searchHalo" , 1)->asInt())
|
, _searchHalo (Cfg::getParamInt ("katana.searchHalo" , 1)->asInt())
|
||||||
|
, _longWireUpThreshold1(Cfg::getParamInt ("katana.longWireUpThreshold1" , 60)->asInt())
|
||||||
|
, _longWireUpReserve1 (Cfg::getParamDouble("katana.longWireUpReserve1" , 1.0)->asDouble())
|
||||||
, _hTracksReservedLocal(Cfg::getParamInt ("katana.hTracksReservedLocal" , 3)->asInt())
|
, _hTracksReservedLocal(Cfg::getParamInt ("katana.hTracksReservedLocal" , 3)->asInt())
|
||||||
, _vTracksReservedLocal(Cfg::getParamInt ("katana.vTracksReservedLocal" , 3)->asInt())
|
, _vTracksReservedLocal(Cfg::getParamInt ("katana.vTracksReservedLocal" , 3)->asInt())
|
||||||
, _termSatReservedLocal(Cfg::getParamInt ("katana.termSatReservedLocal" , 9)->asInt())
|
, _termSatReservedLocal(Cfg::getParamInt ("katana.termSatReservedLocal" , 9)->asInt())
|
||||||
|
@ -90,6 +92,8 @@ namespace Katana {
|
||||||
: Anabatic::Configuration(*other.base())
|
: Anabatic::Configuration(*other.base())
|
||||||
, _postEventCb (other._postEventCb)
|
, _postEventCb (other._postEventCb)
|
||||||
, _searchHalo (other._searchHalo)
|
, _searchHalo (other._searchHalo)
|
||||||
|
, _longWireUpThreshold1(other._longWireUpThreshold1)
|
||||||
|
, _longWireUpReserve1 (other._longWireUpReserve1)
|
||||||
, _hTracksReservedLocal(other._hTracksReservedLocal)
|
, _hTracksReservedLocal(other._hTracksReservedLocal)
|
||||||
, _vTracksReservedLocal(other._vTracksReservedLocal)
|
, _vTracksReservedLocal(other._vTracksReservedLocal)
|
||||||
, _termSatReservedLocal(other._termSatReservedLocal)
|
, _termSatReservedLocal(other._termSatReservedLocal)
|
||||||
|
@ -180,6 +184,8 @@ namespace Katana {
|
||||||
cout << Dots::asBool (" - Use GR density estimate" ,useGlobalEstimate()) << endl;
|
cout << Dots::asBool (" - Use GR density estimate" ,useGlobalEstimate()) << endl;
|
||||||
cout << Dots::asBool (" - Use static bloat profile" ,useStaticBloatProfile()) << endl;
|
cout << Dots::asBool (" - Use static bloat profile" ,useStaticBloatProfile()) << endl;
|
||||||
cout << Dots::asDouble(" - GCell saturate ratio (LA)" ,getSaturateRatio()) << endl;
|
cout << Dots::asDouble(" - GCell saturate ratio (LA)" ,getSaturateRatio()) << endl;
|
||||||
|
cout << Dots::asUInt (" - Long wire threshold1 for move up" ,_longWireUpThreshold1) << endl;
|
||||||
|
cout << Dots::asDouble(" - Long wire reserved1 for move up" ,_longWireUpReserve1) << endl;
|
||||||
cout << Dots::asUInt (" - Edge min H reserved local" ,_hTracksReservedMin) << endl;
|
cout << Dots::asUInt (" - Edge min H reserved local" ,_hTracksReservedMin) << endl;
|
||||||
cout << Dots::asUInt (" - Edge min V reserved local" ,_vTracksReservedMin) << endl;
|
cout << Dots::asUInt (" - Edge min V reserved local" ,_vTracksReservedMin) << endl;
|
||||||
cout << Dots::asUInt (" - Edge max H reserved local" ,_hTracksReservedLocal) << endl;
|
cout << Dots::asUInt (" - Edge max H reserved local" ,_hTracksReservedLocal) << endl;
|
||||||
|
@ -217,8 +223,12 @@ namespace Katana {
|
||||||
Record* record = Super::_getRecord();
|
Record* record = Super::_getRecord();
|
||||||
if ( record ) {
|
if ( record ) {
|
||||||
record->add ( getSlot("_searchHalo" ,_searchHalo ) );
|
record->add ( getSlot("_searchHalo" ,_searchHalo ) );
|
||||||
|
record->add ( getSlot("_longWireUpThreshold1" ,_longWireUpThreshold1 ) );
|
||||||
|
record->add ( getSlot("_longWireUpReserved1" ,_longWireUpReserve1 ) );
|
||||||
record->add ( getSlot("_hTracksReservedLocal" ,_hTracksReservedLocal ) );
|
record->add ( getSlot("_hTracksReservedLocal" ,_hTracksReservedLocal ) );
|
||||||
record->add ( getSlot("_vTracksReservedLocal" ,_vTracksReservedLocal ) );
|
record->add ( getSlot("_vTracksReservedLocal" ,_vTracksReservedLocal ) );
|
||||||
|
record->add ( getSlot("_hTracksReservedMin" ,_hTracksReservedMin ) );
|
||||||
|
record->add ( getSlot("_vTracksReservedMin" ,_vTracksReservedMin ) );
|
||||||
record->add ( getSlot("_ripupCost" ,_ripupCost ) );
|
record->add ( getSlot("_ripupCost" ,_ripupCost ) );
|
||||||
record->add ( getSlot("_eventsLimit" ,_eventsLimit ) );
|
record->add ( getSlot("_eventsLimit" ,_eventsLimit ) );
|
||||||
|
|
||||||
|
|
|
@ -187,9 +187,10 @@ namespace Katana {
|
||||||
if (fontHeight > ((edge->isHorizontal()) ? pixelBb.height() : pixelBb.width()) + 4) return;
|
if (fontHeight > ((edge->isHorizontal()) ? pixelBb.height() : pixelBb.width()) + 4) return;
|
||||||
|
|
||||||
//QString text = QString("%1/%2").arg(edge->getRealOccupancy()).arg(edge->getCapacity());
|
//QString text = QString("%1/%2").arg(edge->getRealOccupancy()).arg(edge->getCapacity());
|
||||||
QString text = QString("%1/%2 %3")
|
QString text = QString("%1/%2[-%3] %4")
|
||||||
.arg( edgeOccupancy )
|
.arg( edgeOccupancy )
|
||||||
.arg( edge->getCapacity() )
|
.arg( edge->getCapacity() )
|
||||||
|
.arg( edge->getReservedCapacity() )
|
||||||
.arg( edge->getHistoricCost() );
|
.arg( edge->getHistoricCost() );
|
||||||
QColor color ( (occupancy > 170) ? Qt::black : Qt::white );
|
QColor color ( (occupancy > 170) ? Qt::black : Qt::white );
|
||||||
painter.setPen (DisplayStyle::darken(color,widget->getDarkening()));
|
painter.setPen (DisplayStyle::darken(color,widget->getDarkening()));
|
||||||
|
|
|
@ -106,6 +106,10 @@ namespace Katana {
|
||||||
{ DebugSession::close(); }
|
{ DebugSession::close(); }
|
||||||
|
|
||||||
|
|
||||||
|
uint32_t Manipulator::getLongWireUpThreshold1 () const { return Session::getConfiguration()->getLongWireUpThreshold1(); }
|
||||||
|
double Manipulator::getLongWireUpReserve1 () const { return Session::getConfiguration()->getLongWireUpReserve1(); }
|
||||||
|
|
||||||
|
|
||||||
bool Manipulator::canRipup ( uint32_t flags ) const
|
bool Manipulator::canRipup ( uint32_t flags ) const
|
||||||
{
|
{
|
||||||
if (_data) {
|
if (_data) {
|
||||||
|
@ -1183,7 +1187,7 @@ namespace Katana {
|
||||||
float reserve = 1.0;
|
float reserve = 1.0;
|
||||||
//float reserve = 0.5;
|
//float reserve = 0.5;
|
||||||
if (_segment->base() and (_segment->base()->getRpDistance() > 2)) reserve = 1.0;
|
if (_segment->base() and (_segment->base()->getRpDistance() > 2)) reserve = 1.0;
|
||||||
if (_segment->getLength() > 60*getPitch()) reserve = 1.0;
|
if (_segment->getLength() > getLongWireUpThreshold1()*getPitch()) reserve = getLongWireUpReserve1();
|
||||||
|
|
||||||
if (_segment->isFixed()) return false;
|
if (_segment->isFixed()) return false;
|
||||||
if (not (flags & AllowLocalMoveUp)) {
|
if (not (flags & AllowLocalMoveUp)) {
|
||||||
|
@ -1697,6 +1701,7 @@ namespace Katana {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RoutingPlane* plane = Session::getKatanaEngine()->getRoutingPlaneByLayer(_segment->getLayer());
|
||||||
AutoContact* terminal = _segment->base()->getAutoSource();
|
AutoContact* terminal = _segment->base()->getAutoSource();
|
||||||
AutoContact* turn = _segment->base()->getAutoTarget();
|
AutoContact* turn = _segment->base()->getAutoTarget();
|
||||||
|
|
||||||
|
@ -1710,18 +1715,37 @@ namespace Katana {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Interval xspan ( terminal->getX() );
|
||||||
|
xspan.inflate( ( plane->getLayerGauge()->getPWireWidth()
|
||||||
|
+ plane->getLayerGauge()->getPitch()
|
||||||
|
- plane->getLayerGauge()->getWireWidth()) / 2 );
|
||||||
|
|
||||||
Box termConstraints ( terminal->getConstraintBox() );
|
Box termConstraints ( terminal->getConstraintBox() );
|
||||||
Box turnConstraints ( turn ->getConstraintBox() );
|
Box turnConstraints ( turn ->getConstraintBox() );
|
||||||
Interval axisRange = terminal->getUConstraints( Flags::Vertical );
|
Interval axisRange = terminal->getUConstraints( Flags::Vertical );
|
||||||
|
axisRange.inflate( plane->getLayerGauge()->getPitch() );
|
||||||
|
cdebug_log(159,0) << "Axis range (UConstraints) " << axisRange << endl;
|
||||||
|
|
||||||
size_t offset = Track::npos;
|
size_t offset = Track::npos;
|
||||||
size_t minBlockage = Track::npos;
|
size_t minBlockage = Track::npos;
|
||||||
size_t maxBlockage = Track::npos;
|
size_t maxBlockage = Track::npos;
|
||||||
RoutingPlane* plane = Session::getKatanaEngine()->getRoutingPlaneByLayer(_segment->getLayer());
|
|
||||||
for ( Track* track : Tracks_Range::get(plane,axisRange) ) {
|
for ( Track* track : Tracks_Range::get(plane,axisRange) ) {
|
||||||
if (offset == Track::npos) offset = track->getIndex();
|
if (offset == Track::npos) offset = track->getIndex();
|
||||||
TrackElement* element = track->getSegment( terminal->getX() );
|
cdebug_log(159,0) << "| track=" << track << endl;
|
||||||
if (element and (element->isBlockage() or element->isFixed())) {
|
Interval freeInterval = track->getFreeInterval( xspan.getCenter(), _segment->getNet() );
|
||||||
|
if (freeInterval.contains(xspan)) continue;
|
||||||
|
|
||||||
|
size_t begin = Track::npos;
|
||||||
|
size_t end = Track::npos;
|
||||||
|
track->getOverlapBounds( xspan, begin, end );
|
||||||
|
if (begin == Track::npos) continue;
|
||||||
|
|
||||||
|
for ( bool trackDone=false ; not trackDone and (begin < end) ; begin++ ) {
|
||||||
|
TrackElement* element = track->getSegment( begin );
|
||||||
|
if (element->getNet() == _segment->getNet()) continue;
|
||||||
|
if (xspan.getIntersection( element->getCanonicalInterval() ).getSize() == 0) continue;
|
||||||
|
if (element->isBlockage() or element->isFixed()) {
|
||||||
|
trackDone = true;
|
||||||
if (track->getIndex() == offset) {
|
if (track->getIndex() == offset) {
|
||||||
minBlockage = track->getIndex();
|
minBlockage = track->getIndex();
|
||||||
continue;
|
continue;
|
||||||
|
@ -1731,9 +1755,12 @@ namespace Katana {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
maxBlockage = track->getIndex();
|
maxBlockage = track->getIndex();
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (maxBlockage != Track::npos) break;
|
||||||
|
}
|
||||||
|
cdebug_log(159,0) << "minBlockage=" << minBlockage << endl;
|
||||||
|
cdebug_log(159,0) << "maxBlockage=" << maxBlockage << endl;
|
||||||
Interval nonBlocked ( (minBlockage == Track::npos) ? terminal->getGCell()->getYMin()
|
Interval nonBlocked ( (minBlockage == Track::npos) ? terminal->getGCell()->getYMin()
|
||||||
: plane->getTrackByIndex(minBlockage)->getAxis()
|
: plane->getTrackByIndex(minBlockage)->getAxis()
|
||||||
, (maxBlockage == Track::npos) ? terminal->getGCell()->getYMax()
|
, (maxBlockage == Track::npos) ? terminal->getGCell()->getYMax()
|
||||||
|
|
|
@ -639,7 +639,7 @@ namespace Katana {
|
||||||
// _pack( count, false );
|
// _pack( count, false );
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// if (RoutingEvent::getProcesseds() == 330332) {
|
// if (RoutingEvent::getProcesseds() == 65092) {
|
||||||
// UpdateSession::close();
|
// UpdateSession::close();
|
||||||
// Breakpoint::stop( 0, "Overlap has happened" );
|
// Breakpoint::stop( 0, "Overlap has happened" );
|
||||||
// UpdateSession::open();
|
// UpdateSession::open();
|
||||||
|
|
|
@ -75,6 +75,8 @@ namespace Katana {
|
||||||
uint32_t getRipupLimit ( uint32_t type ) const;
|
uint32_t getRipupLimit ( uint32_t type ) const;
|
||||||
inline uint32_t getSearchHalo () const;
|
inline uint32_t getSearchHalo () const;
|
||||||
inline uint32_t getBloatOverloadAdd () const;
|
inline uint32_t getBloatOverloadAdd () const;
|
||||||
|
inline uint32_t getLongWireUpThreshold1 () const;
|
||||||
|
inline double getLongWireUpReserve1 () const;
|
||||||
inline uint32_t getHTracksReservedLocal () const;
|
inline uint32_t getHTracksReservedLocal () const;
|
||||||
inline uint32_t getVTracksReservedLocal () const;
|
inline uint32_t getVTracksReservedLocal () const;
|
||||||
inline uint32_t getTermSatReservedLocal () const;
|
inline uint32_t getTermSatReservedLocal () const;
|
||||||
|
@ -103,6 +105,8 @@ namespace Katana {
|
||||||
// Attributes.
|
// Attributes.
|
||||||
PostEventCb_t _postEventCb;
|
PostEventCb_t _postEventCb;
|
||||||
uint32_t _searchHalo;
|
uint32_t _searchHalo;
|
||||||
|
uint32_t _longWireUpThreshold1;
|
||||||
|
double _longWireUpReserve1;
|
||||||
uint32_t _hTracksReservedLocal;
|
uint32_t _hTracksReservedLocal;
|
||||||
uint32_t _vTracksReservedLocal;
|
uint32_t _vTracksReservedLocal;
|
||||||
uint32_t _termSatReservedLocal;
|
uint32_t _termSatReservedLocal;
|
||||||
|
@ -131,6 +135,8 @@ namespace Katana {
|
||||||
inline uint32_t Configuration::getSearchHalo () const { return _searchHalo; }
|
inline uint32_t Configuration::getSearchHalo () const { return _searchHalo; }
|
||||||
inline uint32_t Configuration::getRipupCost () const { return _ripupCost; }
|
inline uint32_t Configuration::getRipupCost () const { return _ripupCost; }
|
||||||
inline uint32_t Configuration::getBloatOverloadAdd () const { return _bloatOverloadAdd; }
|
inline uint32_t Configuration::getBloatOverloadAdd () const { return _bloatOverloadAdd; }
|
||||||
|
inline uint32_t Configuration::getLongWireUpThreshold1 () const { return _longWireUpThreshold1; }
|
||||||
|
inline double Configuration::getLongWireUpReserve1 () const { return _longWireUpReserve1; }
|
||||||
inline uint32_t Configuration::getHTracksReservedLocal () const { return _hTracksReservedLocal; }
|
inline uint32_t Configuration::getHTracksReservedLocal () const { return _hTracksReservedLocal; }
|
||||||
inline uint32_t Configuration::getVTracksReservedLocal () const { return _vTracksReservedLocal; }
|
inline uint32_t Configuration::getVTracksReservedLocal () const { return _vTracksReservedLocal; }
|
||||||
inline uint32_t Configuration::getTermSatReservedLocal () const { return _termSatReservedLocal; }
|
inline uint32_t Configuration::getTermSatReservedLocal () const { return _termSatReservedLocal; }
|
||||||
|
|
|
@ -14,9 +14,7 @@
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
#ifndef KATANA_MANIPULATOR_H
|
#pragma once
|
||||||
#define KATANA_MANIPULATOR_H
|
|
||||||
|
|
||||||
#include "hurricane/DbU.h"
|
#include "hurricane/DbU.h"
|
||||||
#include "anabatic/Constants.h"
|
#include "anabatic/Constants.h"
|
||||||
|
|
||||||
|
@ -53,6 +51,8 @@ namespace Katana {
|
||||||
public:
|
public:
|
||||||
Manipulator ( TrackElement*, SegmentFsm& );
|
Manipulator ( TrackElement*, SegmentFsm& );
|
||||||
~Manipulator ();
|
~Manipulator ();
|
||||||
|
uint32_t getLongWireUpThreshold1 () const;
|
||||||
|
double getLongWireUpReserve1 () const;
|
||||||
inline TrackElement* getSegment () const;
|
inline TrackElement* getSegment () const;
|
||||||
inline DataNegociate* getData () const;
|
inline DataNegociate* getData () const;
|
||||||
inline RoutingEvent* getEvent () const;
|
inline RoutingEvent* getEvent () const;
|
||||||
|
@ -112,5 +112,3 @@ namespace Katana {
|
||||||
|
|
||||||
|
|
||||||
} // Katana namespace.
|
} // Katana namespace.
|
||||||
|
|
||||||
#endif // KATANA_MANIPULATOR_H
|
|
||||||
|
|
|
@ -14,9 +14,7 @@
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
#ifndef KATANA_TRACK_ELEMENT_H
|
#pragma once
|
||||||
#define KATANA_TRACK_ELEMENT_H
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
@ -295,5 +293,3 @@ namespace Katana {
|
||||||
|
|
||||||
|
|
||||||
INSPECTOR_P_SUPPORT(Katana::TrackElement);
|
INSPECTOR_P_SUPPORT(Katana::TrackElement);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -14,9 +14,7 @@
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
#ifndef KATANA_TRACK_SEGMENT_NON_PREF_H
|
#pragma once
|
||||||
#define KATANA_TRACK_SEGMENT_NON_PREF_H
|
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include "katana/TrackSegment.h"
|
#include "katana/TrackSegment.h"
|
||||||
|
@ -72,5 +70,3 @@ namespace Katana {
|
||||||
|
|
||||||
|
|
||||||
INSPECTOR_P_SUPPORT(Katana::TrackSegmentNonPref);
|
INSPECTOR_P_SUPPORT(Katana::TrackSegmentNonPref);
|
||||||
|
|
||||||
#endif // KATANA_TRACK_SEGMENT_WIDE_H
|
|
||||||
|
|
Loading…
Reference in New Issue