New "obstacleDw" for Kite.

* New: In CRL Core, in RoutingLayerGauge, adds a new parameter "obstacleDw".
    It represents the distance to add from the *edge* of a blockage segment
    to the next *axis* of a routing track. This was previously computed as
    the pitch minus the mimimum half wire width. This works if the pitch
    is *equal* to the wire width plus the minimal distance (edge to edge).
    But if the wire width is less, than it leads to too great a distance
    around obstacles, making them bigger than they are. And potentially
    blocking everything. To summarize:
         before:  obstacleDw = pitch - wireWidth/2  (deduced)
         after:   obstacleDw = explicitly setup, usually:
                               pitch - max(wireWidth)/2
      Modify the Alliance configuration helper and the various kite.conf
    file accordingly.
* New: In Kite, in BuildPowerRails, make use of "obstacleDw" to compute
    the footprint of a blockage.
This commit is contained in:
Jean-Paul Chaput 2016-04-13 18:18:43 +02:00
parent a4e46444e2
commit 2a40fa7d92
10 changed files with 86 additions and 62 deletions

View File

@ -25,18 +25,18 @@ parametersTable = \
# Format of routingGaugesTable (dictionary):
# A list of entry of the form:
# ( METAL_NAME, (Direction, Type, depth, density, offset, pitch, wire_width, via_width) )
# ( METAL_NAME, (Direction, Type, depth, density, offset, pitch, wire_width, via_width, obs_dw) )
routingGaugesTable = {}
routingGaugesTable['sxlib'] = \
( ( 'METAL1', ( Gauge.Vertical , Gauge.PinOnly, 0, 0.0, 0, 5, 2, 1 ) )
, ( 'METAL2', ( Gauge.Horizontal, Gauge.Default, 1, 7.0, 0, 5, 2, 1 ) )
, ( 'METAL3', ( Gauge.Vertical , Gauge.Default, 2, 0.0, 0, 5, 2, 1 ) )
, ( 'METAL4', ( Gauge.Horizontal, Gauge.Default, 3, 0.0, 0, 5, 2, 1 ) )
, ( 'METAL5', ( Gauge.Vertical , Gauge.Default, 4, 0.0, 0, 5, 2, 1 ) )
#, ( 'METAL6', ( Gauge.Horizontal, Gauge.Default, 5, 0.0, 0, 5, 2, 1 ) )
#, ( 'METAL7', ( Gauge.Vertical , Gauge.Default, 6, 0.0, 0, 5, 2, 1 ) )
( ( 'METAL1', ( Gauge.Vertical , Gauge.PinOnly, 0, 0.0, 0, 5, 2, 1, 4 ) )
, ( 'METAL2', ( Gauge.Horizontal, Gauge.Default, 1, 7.0, 0, 5, 2, 1, 4 ) )
, ( 'METAL3', ( Gauge.Vertical , Gauge.Default, 2, 0.0, 0, 5, 2, 1, 4 ) )
, ( 'METAL4', ( Gauge.Horizontal, Gauge.Default, 3, 0.0, 0, 5, 2, 1, 4 ) )
, ( 'METAL5', ( Gauge.Vertical , Gauge.Default, 4, 0.0, 0, 5, 2, 1, 4 ) )
#, ( 'METAL6', ( Gauge.Horizontal, Gauge.Default, 5, 0.0, 0, 5, 2, 1, 4 ) )
#, ( 'METAL7', ( Gauge.Vertical , Gauge.Default, 6, 0.0, 0, 5, 2, 1, 4 ) )
)

View File

@ -25,18 +25,18 @@ parametersTable = \
# Format of routingGaugesTable (dictionary):
# A list of entry of the form:
# ( METAL_NAME, (Direction, Type, depth, density, offset, pitch, wire_width, via_width) )
# ( METAL_NAME, (Direction, Type, depth, density, offset, pitch, wire_width, via_width, obs_dw) )
routingGaugesTable = {}
routingGaugesTable['sxlib'] = \
( ( 'METAL1', ( Gauge.Vertical , Gauge.PinOnly, 0, 0.0, 0, 5, 2, 1 ) )
, ( 'METAL2', ( Gauge.Horizontal, Gauge.Default, 1, 7.0, 0, 5, 2, 1 ) )
, ( 'METAL3', ( Gauge.Vertical , Gauge.Default, 2, 0.0, 0, 5, 2, 1 ) )
, ( 'METAL4', ( Gauge.Horizontal, Gauge.Default, 3, 0.0, 0, 5, 2, 1 ) )
, ( 'METAL5', ( Gauge.Vertical , Gauge.Default, 4, 0.0, 0, 5, 2, 1 ) )
#, ( 'METAL6', ( Gauge.Horizontal, Gauge.Default, 5, 0.0, 0, 5, 2, 1 ) )
#, ( 'METAL7', ( Gauge.Vertical , Gauge.Default, 6, 0.0, 0, 5, 2, 1 ) )
( ( 'METAL1', ( Gauge.Vertical , Gauge.PinOnly, 0, 0.0, 0, 5, 2, 1, 4 ) )
, ( 'METAL2', ( Gauge.Horizontal, Gauge.Default, 1, 7.0, 0, 5, 2, 1, 4 ) )
, ( 'METAL3', ( Gauge.Vertical , Gauge.Default, 2, 0.0, 0, 5, 2, 1, 4 ) )
, ( 'METAL4', ( Gauge.Horizontal, Gauge.Default, 3, 0.0, 0, 5, 2, 1, 4 ) )
, ( 'METAL5', ( Gauge.Vertical , Gauge.Default, 4, 0.0, 0, 5, 2, 1, 4 ) )
#, ( 'METAL6', ( Gauge.Horizontal, Gauge.Default, 5, 0.0, 0, 5, 2, 1, 4 ) )
#, ( 'METAL7', ( Gauge.Vertical , Gauge.Default, 6, 0.0, 0, 5, 2, 1, 4 ) )
)

View File

@ -25,17 +25,17 @@ parametersTable = \
# Format of routingGaugesTable (dictionary):
# A list of entry of the form:
# ( METAL_NAME, (Direction, Type, depth, density, offset, pitch, wire_width, via_width) )
# ( METAL_NAME, (Direction, Type, depth, density, offset, pitch, wire_width, via_width, obs_dw) )
routingGaugesTable = {}
routingGaugesTable['msxlib'] = \
( ( 'METAL1' , ( Gauge.Vertical , Gauge.PinOnly, 0, 0.0, 0, 10, 2, 2 ) )
, ( 'METAL2' , ( Gauge.Horizontal, Gauge.Default, 1, 0.0, 0, 10, 3, 2 ) )
, ( 'METAL3' , ( Gauge.Vertical , Gauge.Default, 2, 0.0, 0, 10, 3, 2 ) )
, ( 'METAL4' , ( Gauge.Horizontal, Gauge.Default, 3, 0.0, 0, 10, 3, 2 ) )
, ( 'METAL5' , ( Gauge.Vertical , Gauge.Default, 4, 0.0, 0, 10, 3, 2 ) )
#, ( 'METAL6' , ( Gauge.Horizontal, Gauge.Default, 5, 0.0, 0, 10, 5, 2 ) )
( ( 'METAL1' , ( Gauge.Vertical , Gauge.PinOnly, 0, 0.0, 0, 10, 2, 2, 7 ) )
, ( 'METAL2' , ( Gauge.Horizontal, Gauge.Default, 1, 0.0, 0, 10, 3, 2, 8 ) )
, ( 'METAL3' , ( Gauge.Vertical , Gauge.Default, 2, 0.0, 0, 10, 3, 2, 8 ) )
, ( 'METAL4' , ( Gauge.Horizontal, Gauge.Default, 3, 0.0, 0, 10, 3, 2, 8 ) )
, ( 'METAL5' , ( Gauge.Vertical , Gauge.Default, 4, 0.0, 0, 10, 3, 2, 8 ) )
#, ( 'METAL6' , ( Gauge.Horizontal, Gauge.Default, 5, 0.0, 0, 10, 5, 2, 8 ) )
)

View File

@ -25,18 +25,18 @@ parametersTable = \
# Format of routingGaugesTable (dictionary):
# A list of entry of the form:
# ( METAL_NAME, (Direction, Type, depth, density, offset, pitch, wire_width, via_width) )
# ( METAL_NAME, (Direction, Type, depth, density, offset, pitch, wire_width, via_width, obs_dw) )
routingGaugesTable = {}
routingGaugesTable['vsclib'] = \
( ( 'METAL1', ( Gauge.Vertical , Gauge.PinOnly, 0, 0.0, 4, 8, 3, 2 ) )
, ( 'METAL2', ( Gauge.Horizontal, Gauge.Default, 1, 7.0, 0, 8, 4, 2 ) )
, ( 'METAL3', ( Gauge.Vertical , Gauge.Default, 2, 0.0, 4, 8, 4, 2 ) )
, ( 'METAL4', ( Gauge.Horizontal, Gauge.Default, 3, 0.0, 0, 8, 4, 2 ) )
, ( 'METAL5', ( Gauge.Vertical , Gauge.Default, 4, 0.0, 4, 8, 4, 2 ) )
#, ( 'METAL6', ( Gauge.Horizontal, Gauge.Default, 5, 0.0, 0, 8, 4, 2 ) )
#, ( 'METAL7', ( Gauge.Vertical , Gauge.Default, 6, 0.0, 4, 8, 4, 2 ) )
( ( 'METAL1', ( Gauge.Vertical , Gauge.PinOnly, 0, 0.0, 4, 8, 3, 2, 6.5 ) )
, ( 'METAL2', ( Gauge.Horizontal, Gauge.Default, 1, 7.0, 0, 8, 4, 2, 6 ) )
, ( 'METAL3', ( Gauge.Vertical , Gauge.Default, 2, 0.0, 4, 8, 4, 2, 6 ) )
, ( 'METAL4', ( Gauge.Horizontal, Gauge.Default, 3, 0.0, 0, 8, 4, 2, 6 ) )
, ( 'METAL5', ( Gauge.Vertical , Gauge.Default, 4, 0.0, 4, 8, 4, 2, 6 ) )
#, ( 'METAL6', ( Gauge.Horizontal, Gauge.Default, 5, 0.0, 0, 8, 4, 2, 6 ) )
#, ( 'METAL7', ( Gauge.Vertical , Gauge.Default, 6, 0.0, 4, 8, 4, 2, 6 ) )
)

View File

@ -152,10 +152,10 @@ def loadRoutingGaugesTable ( routingGaugesTable, fromFile ):
,'Must have exactly two fields ("METAL_LAYER", (parameters_list)).'
,str(entry)
])
if len(entry[1]) != 8:
if len(entry[1]) != 9:
raise ErrorMessage(1,['Malformed entry in <routingGaugesTable[%s]>.' % gaugeName
,'Parameters list must have exactly eight fields:'
,' (direction, type, depth, density, offset, pitch, wire_width, via_width)'
,'Parameters list must have exactly nine fields:'
,' (direction, type, depth, density, offset, pitch, wire_width, via_width, obs_dw)'
,str(entry)
])
@ -168,6 +168,7 @@ def loadRoutingGaugesTable ( routingGaugesTable, fromFile ):
, DbU.fromLambda(entry[1][5]) # Pitch.
, DbU.fromLambda(entry[1][6]) # Wire width.
, DbU.fromLambda(entry[1][7]) # Via width.
, DbU.fromLambda(entry[1][8]) # Obstacle dW.
) )
except Exception, e:

View File

@ -80,7 +80,8 @@ namespace CRL {
, gauge._layerGauges[i]->getOffset()
, gauge._layerGauges[i]->getPitch()
, gauge._layerGauges[i]->getWireWidth()
, gauge._layerGauges[i]->getViaWidth() )
, gauge._layerGauges[i]->getViaWidth()
, gauge._layerGauges[i]->getObstacleDw() )
);
}

View File

@ -8,7 +8,7 @@
// | C o r e L i b r a r y |
// | |
// | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
// | C++ Module : "./RoutingLayerGauge.cpp" |
// +-----------------------------------------------------------------+
@ -17,7 +17,6 @@
#include <sstream>
#include "hurricane/BasicLayer.h"
#include "hurricane/DataBase.h"
#include "hurricane/Technology.h"
@ -110,7 +109,8 @@ namespace CRL {
, DbU::Unit offset
, DbU::Unit pitch
, DbU::Unit wireWidth
, DbU::Unit viaWidth )
, DbU::Unit viaWidth
, DbU::Unit obsDw )
: _layer (layer)
, _blockageLayer(layer->getBlockageLayer())
, _direction (direction)
@ -121,6 +121,7 @@ namespace CRL {
, _pitch (pitch)
, _wireWidth (wireWidth)
, _viaWidth (viaWidth)
, _obstacleDw (obsDw)
{ }
@ -132,7 +133,8 @@ namespace CRL {
, DbU::Unit offset
, DbU::Unit pitch
, DbU::Unit wireWidth
, DbU::Unit viaWidth )
, DbU::Unit viaWidth
, DbU::Unit obsDw )
{
// Temporary: must write a more smart check.
// BasicLayer* basicLayer = dynamic_cast<BasicLayer*>(layer);
@ -150,7 +152,8 @@ namespace CRL {
, offset
, pitch
, wireWidth
, viaWidth );
, viaWidth
, obsDw );
return gauge;
}
@ -312,12 +315,13 @@ namespace CRL {
jsonWrite( w, "_layer" , _layer->getName() );
jsonWrite( w, "_direction" , getString(&_direction) );
jsonWrite( w, "_type" , getString(&_type ) );
jsonWrite( w, "_depth" , _depth );
jsonWrite( w, "_density" , _density );
jsonWrite( w, "_offset" , _offset );
jsonWrite( w, "_pitch" , _pitch );
jsonWrite( w, "_wireWidth" , _wireWidth );
jsonWrite( w, "_viaWidth" , _viaWidth );
jsonWrite( w, "_depth" , _depth );
jsonWrite( w, "_density" , _density );
jsonWrite( w, "_offset" , _offset );
jsonWrite( w, "_pitch" , _pitch );
jsonWrite( w, "_wireWidth" , _wireWidth );
jsonWrite( w, "_viaWidth" , _viaWidth );
jsonWrite( w, "_obstacleDw" , _obstacleDw );
w->endObject();
}
@ -345,6 +349,7 @@ namespace CRL {
add( "_pitch" , typeid(int64_t) );
add( "_wireWidth" , typeid(int64_t) );
add( "_viaWidth" , typeid(int64_t) );
add( "_obstacleDw" , typeid(int64_t) );
}
@ -360,16 +365,17 @@ namespace CRL {
{
check( stack, "JsonRoutingLayerGauge::toData" );
Technology* techno = DataBase::getDB()->getTechnology();
RoutingGauge* rg = get<RoutingGauge*>( stack, ".RoutingGauge" );
RoutingLayerGauge* rlg = NULL;
string layer = get<string> ( stack, "_layer" );
unsigned int depth = get<int64_t> ( stack, "_depth" );
double density = get<double> ( stack, "_density" );
DbU::Unit offset = get<int64_t> ( stack, "_offset" );
DbU::Unit pitch = get<int64_t> ( stack, "_pitch" );
DbU::Unit wireWidth = get<int64_t> ( stack, "_wireWidth" );
DbU::Unit viaWidth = get<int64_t> ( stack, "_viaWidth" );
Technology* techno = DataBase::getDB()->getTechnology();
RoutingGauge* rg = get<RoutingGauge*>( stack, ".RoutingGauge" );
RoutingLayerGauge* rlg = NULL;
string layer = get<string> ( stack, "_layer" );
unsigned int depth = get<int64_t> ( stack, "_depth" );
double density = get<double> ( stack, "_density" );
DbU::Unit offset = get<int64_t> ( stack, "_offset" );
DbU::Unit pitch = get<int64_t> ( stack, "_pitch" );
DbU::Unit wireWidth = get<int64_t> ( stack, "_wireWidth" );
DbU::Unit viaWidth = get<int64_t> ( stack, "_viaWidth" );
DbU::Unit obstacleDw = get<int64_t> ( stack, "_obstacleDw" );
Constant::Direction direction;
Constant::LayerGaugeType type;
@ -388,6 +394,7 @@ namespace CRL {
, pitch
, wireWidth
, viaWidth
, obstacleDw
);
rg->addLayerGauge( rlg );
}

View File

@ -86,7 +86,8 @@ namespace CRL {
, DbU::Unit offset
, DbU::Unit pitch
, DbU::Unit wireWidth
, DbU::Unit viaWidth );
, DbU::Unit viaWidth
, DbU::Unit obsDw );
virtual void destroy ();
// Accessors.
inline const Layer* getLayer () const;
@ -102,6 +103,7 @@ namespace CRL {
inline DbU::Unit getHalfWireWidth () const;
inline DbU::Unit getViaWidth () const;
inline DbU::Unit getHalfViaWidth () const;
inline DbU::Unit getObstacleDw () const;
void divide ( DbU::Unit dividend, long& quotient, long& modulo ) const;
unsigned int getTrackNumber ( DbU::Unit start, DbU::Unit stop ) const;
unsigned int getTrackIndex ( DbU::Unit start, DbU::Unit stop, DbU::Unit position, unsigned mode ) const;
@ -124,6 +126,7 @@ namespace CRL {
DbU::Unit _pitch;
DbU::Unit _wireWidth;
DbU::Unit _viaWidth;
DbU::Unit _obstacleDw;
// Internal - Constructors & Destructors.
RoutingLayerGauge ( const Layer* layer
@ -134,7 +137,8 @@ namespace CRL {
, DbU::Unit offset
, DbU::Unit pitch
, DbU::Unit wireWidth
, DbU::Unit viaWidth );
, DbU::Unit viaWidth
, DbU::Unit obsDw );
virtual ~RoutingLayerGauge ();
virtual void _preDestroy();
RoutingLayerGauge& operator= ( const RoutingLayerGauge& );
@ -172,6 +176,7 @@ namespace CRL {
inline DbU::Unit RoutingLayerGauge::getHalfWireWidth () const { return ( _wireWidth>>1 ); }
inline DbU::Unit RoutingLayerGauge::getViaWidth () const { return ( _viaWidth ); }
inline DbU::Unit RoutingLayerGauge::getHalfViaWidth () const { return ( _viaWidth>>1 ); }
inline DbU::Unit RoutingLayerGauge::getObstacleDw () const { return ( _obstacleDw ); }
// -------------------------------------------------------------------

View File

@ -76,9 +76,10 @@ extern "C" {
long pitch;
long wireWidth;
long viaWidth;
long obsDw;
if (PyArg_ParseTuple( args
, "OIIIdllll:RoutingLayerGauge.create"
, "OIIIdlllll:RoutingLayerGauge.create"
, &pyLayer
, &direction
, &type
@ -88,6 +89,7 @@ extern "C" {
, &pitch
, &wireWidth
, &viaWidth
, &obsDw
)) {
if ( not PyObject_IsInstance(pyLayer,(PyObject*)&PyTypeLayer) ) {
PyErr_SetString ( ConstructorError, "Bad type for layer argument of RoutingLayerGauge.create()." );
@ -117,6 +119,7 @@ extern "C" {
, pitch
, wireWidth
, viaWidth
, obsDw
);
} else {
PyErr_SetString ( ConstructorError, "Bad parameters given to RoutingLayerGauge.create()." );
@ -263,6 +266,7 @@ extern "C" {
DirectGetLongAttribute (PyRoutingLayerGauge_getHalfWireWidth,getHalfWireWidth,PyRoutingLayerGauge,RoutingLayerGauge)
DirectGetLongAttribute (PyRoutingLayerGauge_getViaWidth ,getViaWidth ,PyRoutingLayerGauge,RoutingLayerGauge)
DirectGetLongAttribute (PyRoutingLayerGauge_getHalfViaWidth ,getHalfViaWidth ,PyRoutingLayerGauge,RoutingLayerGauge)
DirectGetLongAttribute (PyRoutingLayerGauge_getObstacleDw ,getObstacleDw ,PyRoutingLayerGauge,RoutingLayerGauge)
// Standart Destroy (Attribute).
@ -297,6 +301,8 @@ extern "C" {
, "Returns the VIA width." }
, { "getHalfViaWidth" , (PyCFunction)PyRoutingLayerGauge_getHalfViaWidth , METH_NOARGS
, "Returns the half VIA width." }
, { "getObstacleDw" , (PyCFunction)PyRoutingLayerGauge_getObstacleDw , METH_NOARGS
, "Returns the dW to add to obstacle width." }
, { "getTrackNumber" , (PyCFunction)PyRoutingLayerGauge_getTrackNumber , METH_VARARGS
, "Compute the number of tracks included between <start> & <stop>." }
, { "getTrackIndex" , (PyCFunction)PyRoutingLayerGauge_getTrackIndex , METH_VARARGS

View File

@ -641,9 +641,10 @@ namespace {
Net* net = getNet();
RoutingPlane* plane = getRoutingPlane();
Segment* segment = NULL;
DbU::Unit delta = plane->getLayerGauge()->getPitch()
- plane->getLayerGauge()->getHalfWireWidth()
- DbU::fromLambda(0.1);
//DbU::Unit delta = plane->getLayerGauge()->getPitch()
// - plane->getLayerGauge()->getHalfWireWidth()
// - DbU::fromLambda(0.1);
DbU::Unit delta = plane->getLayerGauge()->getObstacleDw() - DbU::fromLambda(0.1);
DbU::Unit extension = layer->getExtentionCap();
//DbU::Unit extension = Session::getExtentionCap();
//unsigned int type = plane->getLayerGauge()->getType();
@ -728,6 +729,9 @@ namespace {
axisMax += delta;
//}
ltrace(300) << " axisMin:" << DbU::getValueString(axisMin)
<< " axisMax:" << DbU::getValueString(axisMax) << endl;
Track* track = plane->getTrackByPosition ( axisMin, Constant::Superior );
for ( ; track and (track->getAxis() <= axisMax) ; track = track->getNextTrack() ) {
TrackElement* element = TrackFixedSegment::create ( track, segment );