Added Routing Gauge for 2-Metal technologies only.

* New: In CRL Core, etc/cmos/kite.conf new routing gauge "sxlib-2M" for
    two metals only technologies.
* New: In CRL Core, python/helpers/kite.py, new parameter to set the
    routing gauge to be used: "kite.routingGauge" (default: "sxlib").
* Change: In CRL/AllianceFramework.cpp, forgot to put the Cell gauges
    and RoutingGauges in the object Records (Inspector).
* New: In pyCRL/PyAllianceFramework.cpp, export the setRoutingGauge()
    function.
This commit is contained in:
Jean-Paul Chaput 2017-08-18 18:16:43 +02:00
parent 2127fa916b
commit 809a91c9c1
6 changed files with 69 additions and 33 deletions

View File

@ -11,6 +11,7 @@ parametersTable = \
, ("katabatic.saturateRatio" ,TypePercentage,80 ) , ("katabatic.saturateRatio" ,TypePercentage,80 )
, ("katabatic.saturateRp" ,TypeInt ,8 ) , ("katabatic.saturateRp" ,TypeInt ,8 )
, ('katabatic.topRoutingLayer' ,TypeString , 'METAL5') , ('katabatic.topRoutingLayer' ,TypeString , 'METAL5')
, ('anabatic.routingGauge' ,TypeString , 'sxlib' )
# Kite parameters. # Kite parameters.
, ("kite.hTracksReservedLocal" ,TypeInt ,3 , { 'min':0, 'max':20 } ) , ("kite.hTracksReservedLocal" ,TypeInt ,3 , { 'min':0, 'max':20 } )
, ("kite.vTracksReservedLocal" ,TypeInt ,3 , { 'min':0, 'max':20 } ) , ("kite.vTracksReservedLocal" ,TypeInt ,3 , { 'min':0, 'max':20 } )
@ -48,6 +49,11 @@ routingGaugesTable['sxlib'] = \
#, ( 'METAL7', ( Gauge.Vertical , Gauge.Default, 6, 0.0, 0, 5, 2, 1, 4 ) ) #, ( 'METAL7', ( Gauge.Vertical , Gauge.Default, 6, 0.0, 0, 5, 2, 1, 4 ) )
) )
routingGaugesTable['sxlib-2M'] = \
( ( 'METAL1', ( Gauge.Horizontal, Gauge.Default, 0, 0.0, 0, 5, 2, 1, 4 ) )
, ( 'METAL2', ( Gauge.Vertical , Gauge.Default, 1, 0.0, 0, 5, 2, 1, 4 ) )
)
# Format of cellGaugesTable (dictionary): # Format of cellGaugesTable (dictionary):
# A list of entry of the form: # A list of entry of the form:

View File

@ -9,6 +9,9 @@ Cfg.getParamPercentage("katabatic.saturateRatio" ).setPercentage(80 )
Cfg.getParamInt ("katabatic.saturateRp" ).setInt (8 ) Cfg.getParamInt ("katabatic.saturateRp" ).setInt (8 )
Cfg.getParamInt ("kite.borderRipupLimit" ).setInt (26 ) Cfg.getParamInt ("kite.borderRipupLimit" ).setInt (26 )
# Alliance parameters.
Cfg.getParamString ("kite.routingGauge" ).setString ('sxlib')
# Kite parameters. # Kite parameters.
Cfg.getParamPercentage("kite.edgeCapacity" ).setPercentage(65 ) Cfg.getParamPercentage("kite.edgeCapacity" ).setPercentage(65 )
Cfg.getParamPercentage("kite.edgeCapacity" ).setMin (0 ) Cfg.getParamPercentage("kite.edgeCapacity" ).setMin (0 )

View File

@ -692,7 +692,7 @@ namespace CRL {
{ {
if ( name.isEmpty() ) return _defaultRoutingGauge; if ( name.isEmpty() ) return _defaultRoutingGauge;
map<const Name,RoutingGauge*>::iterator igauge = _routingGauges.find ( name ); map<Name,RoutingGauge*>::iterator igauge = _routingGauges.find ( name );
if ( igauge != _routingGauges.end() ) if ( igauge != _routingGauges.end() )
return igauge->second; return igauge->second;
@ -735,7 +735,7 @@ namespace CRL {
{ {
if ( name.isEmpty() ) return _defaultCellGauge; if ( name.isEmpty() ) return _defaultCellGauge;
map<const Name,CellGauge*>::iterator igauge = _cellGauges.find ( name ); map<Name,CellGauge*>::iterator igauge = _cellGauges.find ( name );
if ( igauge != _cellGauges.end() ) if ( igauge != _cellGauges.end() )
return igauge->second; return igauge->second;
@ -796,9 +796,9 @@ namespace CRL {
record->add ( getSlot ( "_libraries" , &_libraries ) ); record->add ( getSlot ( "_libraries" , &_libraries ) );
record->add ( getSlot ( "_catalog" , &_catalog ) ); record->add ( getSlot ( "_catalog" , &_catalog ) );
record->add ( getSlot ( "_defaultRoutingGauge", _defaultRoutingGauge ) ); record->add ( getSlot ( "_defaultRoutingGauge", _defaultRoutingGauge ) );
record->add ( getSlot ( "_routingGauges" , _routingGauges ) ); record->add ( getSlot ( "_routingGauges" , &_routingGauges ) );
record->add ( getSlot ( "_defaultCellGauge" , _defaultCellGauge ) ); record->add ( getSlot ( "_defaultCellGauge" , _defaultCellGauge ) );
record->add ( getSlot ( "_cellGauges" , _cellGauges ) ); record->add ( getSlot ( "_cellGauges" , &_cellGauges ) );
return record; return record;
} }

View File

@ -132,11 +132,9 @@ namespace CRL {
Catalog _catalog; Catalog _catalog;
AllianceLibraries _libraries; AllianceLibraries _libraries;
Library* _parentLibrary; Library* _parentLibrary;
map<const Name,RoutingGauge*> map<Name,RoutingGauge*> _routingGauges;
_routingGauges;
RoutingGauge* _defaultRoutingGauge; RoutingGauge* _defaultRoutingGauge;
map<const Name,CellGauge*> map<Name,CellGauge*> _cellGauges;
_cellGauges;
CellGauge* _defaultCellGauge; CellGauge* _defaultCellGauge;
// Internals - Constructors. // Internals - Constructors.

View File

@ -90,6 +90,8 @@ namespace CRL {
, DbU::Unit obsDw ); , DbU::Unit obsDw );
virtual void destroy (); virtual void destroy ();
// Accessors. // Accessors.
inline bool isHorizontal () const;
inline bool isVertical () const;
inline const Layer* getLayer () const; inline const Layer* getLayer () const;
inline const Layer* getBlockageLayer () const; inline const Layer* getBlockageLayer () const;
inline unsigned int getDepth () const; inline unsigned int getDepth () const;
@ -163,20 +165,22 @@ namespace CRL {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Inline Functions. // Inline Functions.
inline const Layer* RoutingLayerGauge::getLayer () const { return ( _layer ); } inline bool RoutingLayerGauge::isHorizontal () const { return (_direction == Constant::Direction::Horizontal); }
inline const Layer* RoutingLayerGauge::getBlockageLayer () const { return ( _blockageLayer ); } inline bool RoutingLayerGauge::isVertical () const { return (_direction == Constant::Direction::Vertical); }
inline Constant::Direction RoutingLayerGauge::getDirection () const { return ( _direction ); } inline const Layer* RoutingLayerGauge::getLayer () const { return _layer; }
inline Constant::LayerGaugeType RoutingLayerGauge::getType () const { return ( _type ); } inline const Layer* RoutingLayerGauge::getBlockageLayer () const { return _blockageLayer; }
inline unsigned int RoutingLayerGauge::getDepth () const { return ( _depth ); } inline Constant::Direction RoutingLayerGauge::getDirection () const { return _direction; }
inline double RoutingLayerGauge::getDensity () const { return ( _density ); } inline Constant::LayerGaugeType RoutingLayerGauge::getType () const { return _type; }
inline DbU::Unit RoutingLayerGauge::getOffset () const { return ( _offset ); } inline unsigned int RoutingLayerGauge::getDepth () const { return _depth; }
inline DbU::Unit RoutingLayerGauge::getPitch () const { return ( _pitch ); } inline double RoutingLayerGauge::getDensity () const { return _density; }
inline DbU::Unit RoutingLayerGauge::getHalfPitch () const { return ( _pitch>>1 ); } inline DbU::Unit RoutingLayerGauge::getOffset () const { return _offset; }
inline DbU::Unit RoutingLayerGauge::getWireWidth () const { return ( _wireWidth ); } inline DbU::Unit RoutingLayerGauge::getPitch () const { return _pitch; }
inline DbU::Unit RoutingLayerGauge::getHalfWireWidth () const { return ( _wireWidth>>1 ); } inline DbU::Unit RoutingLayerGauge::getHalfPitch () const { return _pitch>>1; }
inline DbU::Unit RoutingLayerGauge::getViaWidth () const { return ( _viaWidth ); } inline DbU::Unit RoutingLayerGauge::getWireWidth () const { return _wireWidth; }
inline DbU::Unit RoutingLayerGauge::getHalfViaWidth () const { return ( _viaWidth>>1 ); } inline DbU::Unit RoutingLayerGauge::getHalfWireWidth () const { return _wireWidth>>1; }
inline DbU::Unit RoutingLayerGauge::getObstacleDw () const { return ( _obstacleDw ); } 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

@ -363,6 +363,29 @@ extern "C" {
} }
static PyObject* PyAllianceFramework_setRoutingGauge ( PyAllianceFramework* self, PyObject* args )
{
cdebug_log(30,0) << "PyAllianceFramework_setRoutingGauge()" << endl;
HTRY
METHOD_HEAD("AllianceFramework.setRoutingGauge()")
PyObject* arg0;
__cs.init ("AllianceFramework.setRoutingGauge");
if (not PyArg_ParseTuple( args, "O&:AllianceFramework.setRoutingGauge", Converter, &arg0 )) {
PyErr_SetString( ConstructorError, "Invalid number of parameters for AllianceFramework.setRoutingGauge()." );
return NULL;
}
if (__cs.getObjectIds() == ":string") af->setRoutingGauge( Name(PyString_AsString(arg0)) );
else {
PyErr_SetString( ConstructorError, "Bad parameter type for AllianceFramework.setRoutingGauge()." );
return NULL;
}
HCATCH
Py_RETURN_NONE;
}
static PyObject* PyAllianceFramework_addCellGauge ( PyAllianceFramework* self, PyObject* args ) static PyObject* PyAllianceFramework_addCellGauge ( PyAllianceFramework* self, PyObject* args )
{ {
cdebug_log(30,0) << "PyAllianceFramework_addCellGauge ()" << endl; cdebug_log(30,0) << "PyAllianceFramework_addCellGauge ()" << endl;
@ -470,6 +493,8 @@ extern "C" {
, "Add a new routing gauge." } , "Add a new routing gauge." }
, { "getRoutingGauge" , (PyCFunction)PyAllianceFramework_getRoutingGauge , METH_VARARGS , { "getRoutingGauge" , (PyCFunction)PyAllianceFramework_getRoutingGauge , METH_VARARGS
, "Get a routing gauge (whithout a name, return the default)." } , "Get a routing gauge (whithout a name, return the default)." }
, { "setRoutingGauge" , (PyCFunction)PyAllianceFramework_setRoutingGauge , METH_VARARGS
, "Select the default routing gauge." }
//, { "destroy" , (PyCFunction)PyAllianceFramework_destroy , METH_NOARGS //, { "destroy" , (PyCFunction)PyAllianceFramework_destroy , METH_NOARGS
// , "Destroy the associated hurricane object. The python object remains." } // , "Destroy the associated hurricane object. The python object remains." }
, {NULL, NULL, 0, NULL} /* sentinel */ , {NULL, NULL, 0, NULL} /* sentinel */