2013-04-15 04:51:51 -05:00
// -*- C++ -*-
//
// This file is part of the Coriolis Software.
2018-01-06 10:55:44 -06:00
// Copyright (c) UPMC 2006-2018, All Rights Reserved
2013-04-15 04:51:51 -05:00
//
// +-----------------------------------------------------------------+
2008-03-06 10:46:43 -06:00
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
// | Author : Jean-Paul CHAPUT |
Make the Python interface closely mirroring the C++ one.
* Change: In Isobar, the Python interface was not exactly mirroring the
C++ one, now it is the case. The Python code should look likes almost
exactly like the C++ one, the only differences remaining being due
to the languages respective syntaxes. Note that in the case of
constructor functions, it leads to a slightly longer notation in
Python that it could have been (mimic the ".create()" static
member). Main modifications:
1. Mirror the static constructor syntax with create():
Cell( ... ) ==> Cell.create( ... )
2. Correct hierarchy for constants in Instance, Net, Pin
& Transformation. For example:
Hurricane.PlacementStatusFIXED
==> Hurricane.Instance.PlacementStatus.FIXED
Hurricane.OrientationID
==> Hurricane.Transformation.Orientation.ID
Hurricane.TypeLOGICAL ==> Hurricane.Net.Type.LOGICAL
Hurricane.DirectionIN ==> Hurricane.Net.Direction.IN
* Change: In CRL Core, correction to match the improved Python API
in the configutation helpers.
* Change: In Cumulus, correction to match the improved Python API.
* Change: In Stratus, correction to match the improved Python API.
* Change: In Documenation, update for the new Python interface
(both user's guide & examples).
* Note: We must port those changes into Chams for it to continue
to run.
* Change: In Documenation, update the Python script support part.
2014-06-28 10:37:59 -05:00
// | E-mail : Jean-Paul.Chaput@lip6.fr |
2008-03-06 10:46:43 -06:00
// | =============================================================== |
Make the Python interface closely mirroring the C++ one.
* Change: In Isobar, the Python interface was not exactly mirroring the
C++ one, now it is the case. The Python code should look likes almost
exactly like the C++ one, the only differences remaining being due
to the languages respective syntaxes. Note that in the case of
constructor functions, it leads to a slightly longer notation in
Python that it could have been (mimic the ".create()" static
member). Main modifications:
1. Mirror the static constructor syntax with create():
Cell( ... ) ==> Cell.create( ... )
2. Correct hierarchy for constants in Instance, Net, Pin
& Transformation. For example:
Hurricane.PlacementStatusFIXED
==> Hurricane.Instance.PlacementStatus.FIXED
Hurricane.OrientationID
==> Hurricane.Transformation.Orientation.ID
Hurricane.TypeLOGICAL ==> Hurricane.Net.Type.LOGICAL
Hurricane.DirectionIN ==> Hurricane.Net.Direction.IN
* Change: In CRL Core, correction to match the improved Python API
in the configutation helpers.
* Change: In Cumulus, correction to match the improved Python API.
* Change: In Stratus, correction to match the improved Python API.
* Change: In Documenation, update for the new Python interface
(both user's guide & examples).
* Note: We must port those changes into Chams for it to continue
to run.
* Change: In Documenation, update the Python script support part.
2014-06-28 10:37:59 -05:00
// | C++ Module : "./PyCell.cpp" |
2013-04-15 04:51:51 -05:00
// +-----------------------------------------------------------------+
2008-03-06 10:46:43 -06:00
2008-05-21 17:46:29 -05:00
# include "hurricane/isobar/PyCell.h"
# include "hurricane/isobar/PyBox.h"
# include "hurricane/isobar/PyLibrary.h"
# include "hurricane/isobar/PyInstance.h"
# include "hurricane/isobar/PyOccurrence.h"
# include "hurricane/isobar/ProxyProperty.h"
# include "hurricane/isobar/PyNet.h"
2008-10-14 05:48:53 -05:00
# include "hurricane/isobar/PyNetCollection.h"
2008-10-17 12:27:20 -05:00
# include "hurricane/isobar/PyReferenceCollection.h"
# include "hurricane/isobar/PyInstanceCollection.h"
2013-04-15 04:51:51 -05:00
# include "hurricane/isobar/PyComponentCollection.h"
2008-10-17 12:27:20 -05:00
# include "hurricane/isobar/PyOccurrenceCollection.h"
2008-03-06 10:46:43 -06:00
namespace Isobar {
2008-03-28 04:48:47 -05:00
using namespace Hurricane ;
2008-03-06 10:46:43 -06:00
extern " C " {
# undef ACCESS_OBJECT
# undef ACCESS_CLASS
# define ACCESS_OBJECT _baseObject._object
# define ACCESS_CLASS(_pyObject) &(_pyObject->_baseObject)
# define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Cell,cell,function)
// x=================================================================x
// | "PyCell" Python Module Code Part |
// x=================================================================x
# if defined(__PYTHON_MODULE__)
// x-------------------------------------------------------------x
// | "PyCell" Attribute Methods |
// x-------------------------------------------------------------x
// Standart Accessors (Attributes).
// Standart Delete (Attribute).
2008-03-17 08:54:33 -05:00
DBoDestroyAttribute ( PyCell_destroy , PyCell )
2008-03-06 10:46:43 -06:00
Make the Python interface closely mirroring the C++ one.
* Change: In Isobar, the Python interface was not exactly mirroring the
C++ one, now it is the case. The Python code should look likes almost
exactly like the C++ one, the only differences remaining being due
to the languages respective syntaxes. Note that in the case of
constructor functions, it leads to a slightly longer notation in
Python that it could have been (mimic the ".create()" static
member). Main modifications:
1. Mirror the static constructor syntax with create():
Cell( ... ) ==> Cell.create( ... )
2. Correct hierarchy for constants in Instance, Net, Pin
& Transformation. For example:
Hurricane.PlacementStatusFIXED
==> Hurricane.Instance.PlacementStatus.FIXED
Hurricane.OrientationID
==> Hurricane.Transformation.Orientation.ID
Hurricane.TypeLOGICAL ==> Hurricane.Net.Type.LOGICAL
Hurricane.DirectionIN ==> Hurricane.Net.Direction.IN
* Change: In CRL Core, correction to match the improved Python API
in the configutation helpers.
* Change: In Cumulus, correction to match the improved Python API.
* Change: In Stratus, correction to match the improved Python API.
* Change: In Documenation, update for the new Python interface
(both user's guide & examples).
* Note: We must port those changes into Chams for it to continue
to run.
* Change: In Documenation, update the Python script support part.
2014-06-28 10:37:59 -05:00
// ---------------------------------------------------------------
// Attribute Method : "PyCell_create ()"
Added Resistor support. Completed Capacitor & Resistor support in Bora.
* New: In Analog, added Analog::ResitorFamily & Analog::Resistor classes.
* New: In Analog, added inspector support for all Parameter classes.
* New: In Analog, new FloatParameter class (for resistor value).
* New: In CRL/etc/scn6m_deep_09/devices.py, added resistor device.
* New: In Oroshi, support for Resistors, stub for ResistorSnake generator.
* New: In Bora::DNodeSets, added support for Resistor devices.
* Change: In Bora::DSlicingNode, rename setNFing()/getNFing() into
setBoxSetIndex()/getBoxSetIndex() for semantic coherency.
* New: In Karakaze/python/AnalogDesign.py, added support for Resistor.
Change in addDevice(), the span which was only meaningful for
transistor devices is replaced by a parameter argument.
The parameter argument has to be consistent with the device type.
2019-11-11 19:21:03 -06:00
PyObject * PyCell_create ( PyObject * , PyObject * args )
{
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_create() " < < endl ;
Make the Python interface closely mirroring the C++ one.
* Change: In Isobar, the Python interface was not exactly mirroring the
C++ one, now it is the case. The Python code should look likes almost
exactly like the C++ one, the only differences remaining being due
to the languages respective syntaxes. Note that in the case of
constructor functions, it leads to a slightly longer notation in
Python that it could have been (mimic the ".create()" static
member). Main modifications:
1. Mirror the static constructor syntax with create():
Cell( ... ) ==> Cell.create( ... )
2. Correct hierarchy for constants in Instance, Net, Pin
& Transformation. For example:
Hurricane.PlacementStatusFIXED
==> Hurricane.Instance.PlacementStatus.FIXED
Hurricane.OrientationID
==> Hurricane.Transformation.Orientation.ID
Hurricane.TypeLOGICAL ==> Hurricane.Net.Type.LOGICAL
Hurricane.DirectionIN ==> Hurricane.Net.Direction.IN
* Change: In CRL Core, correction to match the improved Python API
in the configutation helpers.
* Change: In Cumulus, correction to match the improved Python API.
* Change: In Stratus, correction to match the improved Python API.
* Change: In Documenation, update for the new Python interface
(both user's guide & examples).
* Note: We must port those changes into Chams for it to continue
to run.
* Change: In Documenation, update the Python script support part.
2014-06-28 10:37:59 -05:00
Added Resistor support. Completed Capacitor & Resistor support in Bora.
* New: In Analog, added Analog::ResitorFamily & Analog::Resistor classes.
* New: In Analog, added inspector support for all Parameter classes.
* New: In Analog, new FloatParameter class (for resistor value).
* New: In CRL/etc/scn6m_deep_09/devices.py, added resistor device.
* New: In Oroshi, support for Resistors, stub for ResistorSnake generator.
* New: In Bora::DNodeSets, added support for Resistor devices.
* Change: In Bora::DSlicingNode, rename setNFing()/getNFing() into
setBoxSetIndex()/getBoxSetIndex() for semantic coherency.
* New: In Karakaze/python/AnalogDesign.py, added support for Resistor.
Change in addDevice(), the span which was only meaningful for
transistor devices is replaced by a parameter argument.
The parameter argument has to be consistent with the device type.
2019-11-11 19:21:03 -06:00
char * name = NULL ;
Make the Python interface closely mirroring the C++ one.
* Change: In Isobar, the Python interface was not exactly mirroring the
C++ one, now it is the case. The Python code should look likes almost
exactly like the C++ one, the only differences remaining being due
to the languages respective syntaxes. Note that in the case of
constructor functions, it leads to a slightly longer notation in
Python that it could have been (mimic the ".create()" static
member). Main modifications:
1. Mirror the static constructor syntax with create():
Cell( ... ) ==> Cell.create( ... )
2. Correct hierarchy for constants in Instance, Net, Pin
& Transformation. For example:
Hurricane.PlacementStatusFIXED
==> Hurricane.Instance.PlacementStatus.FIXED
Hurricane.OrientationID
==> Hurricane.Transformation.Orientation.ID
Hurricane.TypeLOGICAL ==> Hurricane.Net.Type.LOGICAL
Hurricane.DirectionIN ==> Hurricane.Net.Direction.IN
* Change: In CRL Core, correction to match the improved Python API
in the configutation helpers.
* Change: In Cumulus, correction to match the improved Python API.
* Change: In Stratus, correction to match the improved Python API.
* Change: In Documenation, update for the new Python interface
(both user's guide & examples).
* Note: We must port those changes into Chams for it to continue
to run.
* Change: In Documenation, update the Python script support part.
2014-06-28 10:37:59 -05:00
PyLibrary * pyLibrary = NULL ;
Added Resistor support. Completed Capacitor & Resistor support in Bora.
* New: In Analog, added Analog::ResitorFamily & Analog::Resistor classes.
* New: In Analog, added inspector support for all Parameter classes.
* New: In Analog, new FloatParameter class (for resistor value).
* New: In CRL/etc/scn6m_deep_09/devices.py, added resistor device.
* New: In Oroshi, support for Resistors, stub for ResistorSnake generator.
* New: In Bora::DNodeSets, added support for Resistor devices.
* Change: In Bora::DSlicingNode, rename setNFing()/getNFing() into
setBoxSetIndex()/getBoxSetIndex() for semantic coherency.
* New: In Karakaze/python/AnalogDesign.py, added support for Resistor.
Change in addDevice(), the span which was only meaningful for
transistor devices is replaced by a parameter argument.
The parameter argument has to be consistent with the device type.
2019-11-11 19:21:03 -06:00
Cell * cell = NULL ;
Make the Python interface closely mirroring the C++ one.
* Change: In Isobar, the Python interface was not exactly mirroring the
C++ one, now it is the case. The Python code should look likes almost
exactly like the C++ one, the only differences remaining being due
to the languages respective syntaxes. Note that in the case of
constructor functions, it leads to a slightly longer notation in
Python that it could have been (mimic the ".create()" static
member). Main modifications:
1. Mirror the static constructor syntax with create():
Cell( ... ) ==> Cell.create( ... )
2. Correct hierarchy for constants in Instance, Net, Pin
& Transformation. For example:
Hurricane.PlacementStatusFIXED
==> Hurricane.Instance.PlacementStatus.FIXED
Hurricane.OrientationID
==> Hurricane.Transformation.Orientation.ID
Hurricane.TypeLOGICAL ==> Hurricane.Net.Type.LOGICAL
Hurricane.DirectionIN ==> Hurricane.Net.Direction.IN
* Change: In CRL Core, correction to match the improved Python API
in the configutation helpers.
* Change: In Cumulus, correction to match the improved Python API.
* Change: In Stratus, correction to match the improved Python API.
* Change: In Documenation, update for the new Python interface
(both user's guide & examples).
* Note: We must port those changes into Chams for it to continue
to run.
* Change: In Documenation, update the Python script support part.
2014-06-28 10:37:59 -05:00
HTRY
Added Resistor support. Completed Capacitor & Resistor support in Bora.
* New: In Analog, added Analog::ResitorFamily & Analog::Resistor classes.
* New: In Analog, added inspector support for all Parameter classes.
* New: In Analog, new FloatParameter class (for resistor value).
* New: In CRL/etc/scn6m_deep_09/devices.py, added resistor device.
* New: In Oroshi, support for Resistors, stub for ResistorSnake generator.
* New: In Bora::DNodeSets, added support for Resistor devices.
* Change: In Bora::DSlicingNode, rename setNFing()/getNFing() into
setBoxSetIndex()/getBoxSetIndex() for semantic coherency.
* New: In Karakaze/python/AnalogDesign.py, added support for Resistor.
Change in addDevice(), the span which was only meaningful for
transistor devices is replaced by a parameter argument.
The parameter argument has to be consistent with the device type.
2019-11-11 19:21:03 -06:00
if ( PyArg_ParseTuple ( args , " O!s:Cell.create " , & PyTypeLibrary , & pyLibrary , & name ) ) {
cell = Cell : : create ( PYLIBRARY_O ( pyLibrary ) , Name ( name ) ) ;
} else {
string message = " Cell::create(): Invalid number of parameters for Cell constructor, name= " ;
if ( name ) message + = " \" " + getString ( name ) + " \" . " ;
else message + = " (NULL). " ;
PyErr_SetString ( ConstructorError , message . c_str ( ) ) ;
Make the Python interface closely mirroring the C++ one.
* Change: In Isobar, the Python interface was not exactly mirroring the
C++ one, now it is the case. The Python code should look likes almost
exactly like the C++ one, the only differences remaining being due
to the languages respective syntaxes. Note that in the case of
constructor functions, it leads to a slightly longer notation in
Python that it could have been (mimic the ".create()" static
member). Main modifications:
1. Mirror the static constructor syntax with create():
Cell( ... ) ==> Cell.create( ... )
2. Correct hierarchy for constants in Instance, Net, Pin
& Transformation. For example:
Hurricane.PlacementStatusFIXED
==> Hurricane.Instance.PlacementStatus.FIXED
Hurricane.OrientationID
==> Hurricane.Transformation.Orientation.ID
Hurricane.TypeLOGICAL ==> Hurricane.Net.Type.LOGICAL
Hurricane.DirectionIN ==> Hurricane.Net.Direction.IN
* Change: In CRL Core, correction to match the improved Python API
in the configutation helpers.
* Change: In Cumulus, correction to match the improved Python API.
* Change: In Stratus, correction to match the improved Python API.
* Change: In Documenation, update for the new Python interface
(both user's guide & examples).
* Note: We must port those changes into Chams for it to continue
to run.
* Change: In Documenation, update the Python script support part.
2014-06-28 10:37:59 -05:00
return NULL ;
Added Resistor support. Completed Capacitor & Resistor support in Bora.
* New: In Analog, added Analog::ResitorFamily & Analog::Resistor classes.
* New: In Analog, added inspector support for all Parameter classes.
* New: In Analog, new FloatParameter class (for resistor value).
* New: In CRL/etc/scn6m_deep_09/devices.py, added resistor device.
* New: In Oroshi, support for Resistors, stub for ResistorSnake generator.
* New: In Bora::DNodeSets, added support for Resistor devices.
* Change: In Bora::DSlicingNode, rename setNFing()/getNFing() into
setBoxSetIndex()/getBoxSetIndex() for semantic coherency.
* New: In Karakaze/python/AnalogDesign.py, added support for Resistor.
Change in addDevice(), the span which was only meaningful for
transistor devices is replaced by a parameter argument.
The parameter argument has to be consistent with the device type.
2019-11-11 19:21:03 -06:00
}
Make the Python interface closely mirroring the C++ one.
* Change: In Isobar, the Python interface was not exactly mirroring the
C++ one, now it is the case. The Python code should look likes almost
exactly like the C++ one, the only differences remaining being due
to the languages respective syntaxes. Note that in the case of
constructor functions, it leads to a slightly longer notation in
Python that it could have been (mimic the ".create()" static
member). Main modifications:
1. Mirror the static constructor syntax with create():
Cell( ... ) ==> Cell.create( ... )
2. Correct hierarchy for constants in Instance, Net, Pin
& Transformation. For example:
Hurricane.PlacementStatusFIXED
==> Hurricane.Instance.PlacementStatus.FIXED
Hurricane.OrientationID
==> Hurricane.Transformation.Orientation.ID
Hurricane.TypeLOGICAL ==> Hurricane.Net.Type.LOGICAL
Hurricane.DirectionIN ==> Hurricane.Net.Direction.IN
* Change: In CRL Core, correction to match the improved Python API
in the configutation helpers.
* Change: In Cumulus, correction to match the improved Python API.
* Change: In Stratus, correction to match the improved Python API.
* Change: In Documenation, update for the new Python interface
(both user's guide & examples).
* Note: We must port those changes into Chams for it to continue
to run.
* Change: In Documenation, update the Python script support part.
2014-06-28 10:37:59 -05:00
HCATCH
return PyCell_Link ( cell ) ;
}
2008-03-06 10:46:43 -06:00
// ---------------------------------------------------------------
2008-03-17 08:54:33 -05:00
// Attribute Method : "PyCell_getLibrary ()"
2008-03-06 10:46:43 -06:00
2008-03-17 08:54:33 -05:00
static PyObject * PyCell_getLibrary ( PyCell * self ) {
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getLibrary () " < < endl ;
2008-03-06 10:46:43 -06:00
Library * library = NULL ;
HTRY
2008-03-17 08:54:33 -05:00
METHOD_HEAD ( " Cell.getLibrary() " )
library = cell - > getLibrary ( ) ;
2008-03-06 10:46:43 -06:00
HCATCH
2008-10-17 12:27:20 -05:00
return PyLibrary_Link ( library ) ;
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
2008-03-17 08:54:33 -05:00
// Attribute Method : "PyCell_getName ()"
2008-03-06 10:46:43 -06:00
2008-12-11 06:25:02 -06:00
GetNameMethod ( Cell , cell )
2008-03-06 10:46:43 -06:00
// ---------------------------------------------------------------
2008-03-17 08:54:33 -05:00
// Attribute Method : "PyCell_getInstance ()"
2008-03-06 10:46:43 -06:00
2008-03-17 08:54:33 -05:00
static PyObject * PyCell_getInstance ( PyCell * self , PyObject * args ) {
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getInstance () " < < endl ;
2008-12-10 12:37:32 -06:00
METHOD_HEAD ( " Cell.getInstance() " )
2008-03-06 10:46:43 -06:00
Instance * instance = NULL ;
HTRY
2008-12-10 12:37:32 -06:00
char * name ;
if ( PyArg_ParseTuple ( args , " s:Cell.getInstance " , & name ) ) {
instance = cell - > getInstance ( Name ( name ) ) ;
} else {
PyErr_SetString ( ConstructorError , " invalid number of parameters for Cell.getInstance. " ) ;
2008-10-17 12:27:20 -05:00
return NULL ;
2008-12-10 12:37:32 -06:00
}
2008-03-06 10:46:43 -06:00
HCATCH
2008-12-10 12:37:32 -06:00
return PyInstance_Link ( instance ) ;
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
2008-10-17 12:27:20 -05:00
// Attribute Method : "PyCell_getInstances()"
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
static PyObject * PyCell_getInstances ( PyCell * self ) {
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getInstances() " < < endl ;
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
METHOD_HEAD ( " Cell.getInstances() " )
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
PyInstanceCollection * pyInstanceCollection = NULL ;
2008-03-06 10:46:43 -06:00
HTRY
2008-10-17 12:27:20 -05:00
Instances * instances = new Instances ( cell - > getInstances ( ) ) ;
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
pyInstanceCollection = PyObject_NEW ( PyInstanceCollection , & PyTypeInstanceCollection ) ;
if ( pyInstanceCollection = = NULL ) {
return NULL ;
}
pyInstanceCollection - > _object = instances ;
HCATCH
return ( PyObject * ) pyInstanceCollection ;
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
2008-10-17 12:27:20 -05:00
// Attribute Method : "PyCell_getInstancesUnder()"
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
static PyObject * PyCell_getInstancesUnder ( PyCell * self , PyObject * args ) {
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getInstancesUnder() " < < endl ;
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
METHOD_HEAD ( " Cell.getInstancesUnder() " )
2008-03-06 10:46:43 -06:00
2008-12-12 12:49:17 -06:00
PyBox * pyBox ;
if ( ! PyArg_ParseTuple ( args , " O!:Cell.getInstancesUnder " , & PyTypeBox , & pyBox ) ) {
return NULL ;
}
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
PyInstanceCollection * pyInstanceCollection = NULL ;
2008-03-06 10:46:43 -06:00
HTRY
2008-12-12 12:49:17 -06:00
Instances * instances = new Instances ( cell - > getInstancesUnder ( * PYBOX_O ( pyBox ) ) ) ;
2008-10-17 12:27:20 -05:00
pyInstanceCollection = PyObject_NEW ( PyInstanceCollection , & PyTypeInstanceCollection ) ;
if ( pyInstanceCollection = = NULL ) {
return NULL ;
}
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
pyInstanceCollection - > _object = instances ;
HCATCH
return ( PyObject * ) pyInstanceCollection ;
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
2008-10-17 12:27:20 -05:00
// Attribute Method : "PyCell_getSlaveInstances()"
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
static PyObject * PyCell_getSlaveInstances ( PyCell * self ) {
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getSlaveInstances() " < < endl ;
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
METHOD_HEAD ( " Cell.getSlaveInstances() " )
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
PyInstanceCollection * pyInstanceCollection = NULL ;
2008-03-06 10:46:43 -06:00
HTRY
2008-10-17 12:27:20 -05:00
Instances * instances = new Instances ( cell - > getSlaveInstances ( ) ) ;
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
pyInstanceCollection = PyObject_NEW ( PyInstanceCollection , & PyTypeInstanceCollection ) ;
if ( pyInstanceCollection = = NULL ) {
return NULL ;
}
pyInstanceCollection - > _object = instances ;
HCATCH
return ( PyObject * ) pyInstanceCollection ;
2008-03-06 10:46:43 -06:00
}
2013-04-15 04:51:51 -05:00
// ---------------------------------------------------------------
// Attribute Method : "PyCell_getComponents()"
static PyObject * PyCell_getComponents ( PyCell * self ) {
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getComponents() " < < endl ;
2013-04-15 04:51:51 -05:00
METHOD_HEAD ( " Cell.getComponents() " )
PyComponentCollection * pyComponentCollection = NULL ;
HTRY
Components * components = new Components ( cell - > getComponents ( ) ) ;
pyComponentCollection = PyObject_NEW ( PyComponentCollection , & PyTypeComponentCollection ) ;
if ( pyComponentCollection = = NULL ) {
return NULL ;
}
pyComponentCollection - > _object = components ;
HCATCH
return ( PyObject * ) pyComponentCollection ;
}
// ---------------------------------------------------------------
// Attribute Method : "PyCell_getComponentsUnder()"
static PyObject * PyCell_getComponentsUnder ( PyCell * self , PyObject * args ) {
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getComponentsUnder() " < < endl ;
2013-04-15 04:51:51 -05:00
METHOD_HEAD ( " Cell.getComponentsUnder() " )
PyBox * pyBox ;
if ( ! PyArg_ParseTuple ( args , " O!:Cell.getInstancesUnder " , & PyTypeBox , & pyBox ) ) {
return NULL ;
}
PyComponentCollection * pyComponentCollection = NULL ;
HTRY
Components * components = new Components ( cell - > getComponentsUnder ( * PYBOX_O ( pyBox ) ) ) ;
pyComponentCollection = PyObject_NEW ( PyComponentCollection , & PyTypeComponentCollection ) ;
if ( pyComponentCollection = = NULL ) {
return NULL ;
}
pyComponentCollection - > _object = components ;
HCATCH
return ( PyObject * ) pyComponentCollection ;
}
2008-03-06 10:46:43 -06:00
// ---------------------------------------------------------------
2008-10-17 12:27:20 -05:00
// Attribute Method : "PyCell_getOccurrences()"
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
static PyObject * PyCell_getOccurrences ( PyCell * self ) {
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getOccurrences() " < < endl ;
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
METHOD_HEAD ( " Cell.getOccurrences() " )
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
PyOccurrenceCollection * pyOccurrenceCollection = NULL ;
2008-03-06 10:46:43 -06:00
HTRY
2008-10-17 12:27:20 -05:00
Occurrences * occurrences = new Occurrences ( cell - > getOccurrences ( ) ) ;
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
pyOccurrenceCollection = PyObject_NEW ( PyOccurrenceCollection , & PyTypeOccurrenceCollection ) ;
if ( pyOccurrenceCollection = = NULL ) {
return NULL ;
}
pyOccurrenceCollection - > _object = occurrences ;
HCATCH
return ( PyObject * ) pyOccurrenceCollection ;
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
2008-10-17 12:27:20 -05:00
// Attribute Method : "PyCell_getOccurrencesUnder()"
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
static PyObject * PyCell_getOccurrencesUnder ( PyCell * self , PyObject * args ) {
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getOccurrencesUnder() " < < endl ;
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
METHOD_HEAD ( " Cell.getOccurrencesUnder() " )
2008-03-06 10:46:43 -06:00
2008-12-12 12:49:17 -06:00
PyBox * pyBox ;
if ( ! PyArg_ParseTuple ( args , " O!:Cell.getInstancesUnder " , & PyTypeBox , & pyBox ) ) {
2008-10-17 12:27:20 -05:00
return NULL ;
2008-12-12 12:49:17 -06:00
}
2008-10-17 12:27:20 -05:00
PyOccurrenceCollection * pyOccurrenceCollection = NULL ;
2008-03-06 10:46:43 -06:00
HTRY
2008-12-12 12:49:17 -06:00
Occurrences * occurrences = new Occurrences ( cell - > getOccurrencesUnder ( * PYBOX_O ( pyBox ) ) ) ;
2008-10-17 12:27:20 -05:00
pyOccurrenceCollection = PyObject_NEW ( PyOccurrenceCollection , & PyTypeOccurrenceCollection ) ;
if ( pyOccurrenceCollection = = NULL ) {
return NULL ;
}
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
pyOccurrenceCollection - > _object = occurrences ;
HCATCH
return ( PyObject * ) pyOccurrenceCollection ;
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
// Attribute Method : "PyCell_getTerminalNetlistInstanceOccurrences()"
2008-03-06 10:46:43 -06:00
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
static PyObject * PyCell_getTerminalNetlistInstanceOccurrences ( PyCell * self )
Various bug fixes (Selection, Measures/Histogram, helpers).
* Bug: In CRL/python/helpers/__init__.py, in textPythonTrace(), when an
ErrorMessage was catched, the trace parameter was not correctly
extracted leading to an "exception in exception".
* New: In Isobar/PyCell, exported Cell::getNonLeafInstanceOccurrences()
collection.
* New: In Isobar/PyTransformation, type is now built so the tp_compare
is linked to the C++ operator==().
* Change: In Hurricane::SelectionModel, Hurricane::SelectionWidget and
CellWidget, no longer use Occurrences but directly the Selector property.
We also use the Selector to know if an Occurrence is selected by
looking at that property on it's Quark. This avoid a very lengthy
search in vector when there is many elements (say > 10000).
NOTE: This is a bad implementation as there is a confusion between
beeing selected (that is, having a Selector property attached to
an Occurrence Quark) and being actually displayed as selected.
This lead to awkward implatation of the various "toggle" methods.
Have to rethink that more clearly later.
* Bug: In CRL::Histogram, the non-inline template full specialisation
of Measure<Histogram> must not be put in the header but in the module
to avoid multiple definition and link failure. They are actually
real, classic functions.
2019-11-21 17:24:47 -06:00
{
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getTerminalNetlistInstanceOccurrences() " < < endl ;
2008-03-06 10:46:43 -06:00
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
METHOD_HEAD ( " Cell.getTerminalNetlistInstanceOccurrences() " )
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
PyOccurrenceCollection * pyOccurrenceCollection = NULL ;
2008-03-06 10:46:43 -06:00
HTRY
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
Occurrences * occurrences = new Occurrences ( cell - > getTerminalNetlistInstanceOccurrences ( ) ) ;
Various bug fixes (Selection, Measures/Histogram, helpers).
* Bug: In CRL/python/helpers/__init__.py, in textPythonTrace(), when an
ErrorMessage was catched, the trace parameter was not correctly
extracted leading to an "exception in exception".
* New: In Isobar/PyCell, exported Cell::getNonLeafInstanceOccurrences()
collection.
* New: In Isobar/PyTransformation, type is now built so the tp_compare
is linked to the C++ operator==().
* Change: In Hurricane::SelectionModel, Hurricane::SelectionWidget and
CellWidget, no longer use Occurrences but directly the Selector property.
We also use the Selector to know if an Occurrence is selected by
looking at that property on it's Quark. This avoid a very lengthy
search in vector when there is many elements (say > 10000).
NOTE: This is a bad implementation as there is a confusion between
beeing selected (that is, having a Selector property attached to
an Occurrence Quark) and being actually displayed as selected.
This lead to awkward implatation of the various "toggle" methods.
Have to rethink that more clearly later.
* Bug: In CRL::Histogram, the non-inline template full specialisation
of Measure<Histogram> must not be put in the header but in the module
to avoid multiple definition and link failure. They are actually
real, classic functions.
2019-11-21 17:24:47 -06:00
pyOccurrenceCollection = PyObject_NEW ( PyOccurrenceCollection , & PyTypeOccurrenceCollection ) ;
if ( pyOccurrenceCollection = = NULL ) return NULL ;
pyOccurrenceCollection - > _object = occurrences ;
HCATCH
return ( PyObject * ) pyOccurrenceCollection ;
}
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
static PyObject * PyCell_getNonTerminalNetlistInstanceOccurrences ( PyCell * self )
Various bug fixes (Selection, Measures/Histogram, helpers).
* Bug: In CRL/python/helpers/__init__.py, in textPythonTrace(), when an
ErrorMessage was catched, the trace parameter was not correctly
extracted leading to an "exception in exception".
* New: In Isobar/PyCell, exported Cell::getNonLeafInstanceOccurrences()
collection.
* New: In Isobar/PyTransformation, type is now built so the tp_compare
is linked to the C++ operator==().
* Change: In Hurricane::SelectionModel, Hurricane::SelectionWidget and
CellWidget, no longer use Occurrences but directly the Selector property.
We also use the Selector to know if an Occurrence is selected by
looking at that property on it's Quark. This avoid a very lengthy
search in vector when there is many elements (say > 10000).
NOTE: This is a bad implementation as there is a confusion between
beeing selected (that is, having a Selector property attached to
an Occurrence Quark) and being actually displayed as selected.
This lead to awkward implatation of the various "toggle" methods.
Have to rethink that more clearly later.
* Bug: In CRL::Histogram, the non-inline template full specialisation
of Measure<Histogram> must not be put in the header but in the module
to avoid multiple definition and link failure. They are actually
real, classic functions.
2019-11-21 17:24:47 -06:00
{
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getNonTerminalNetlistInstanceOccurrences() " < < endl ;
Various bug fixes (Selection, Measures/Histogram, helpers).
* Bug: In CRL/python/helpers/__init__.py, in textPythonTrace(), when an
ErrorMessage was catched, the trace parameter was not correctly
extracted leading to an "exception in exception".
* New: In Isobar/PyCell, exported Cell::getNonLeafInstanceOccurrences()
collection.
* New: In Isobar/PyTransformation, type is now built so the tp_compare
is linked to the C++ operator==().
* Change: In Hurricane::SelectionModel, Hurricane::SelectionWidget and
CellWidget, no longer use Occurrences but directly the Selector property.
We also use the Selector to know if an Occurrence is selected by
looking at that property on it's Quark. This avoid a very lengthy
search in vector when there is many elements (say > 10000).
NOTE: This is a bad implementation as there is a confusion between
beeing selected (that is, having a Selector property attached to
an Occurrence Quark) and being actually displayed as selected.
This lead to awkward implatation of the various "toggle" methods.
Have to rethink that more clearly later.
* Bug: In CRL::Histogram, the non-inline template full specialisation
of Measure<Histogram> must not be put in the header but in the module
to avoid multiple definition and link failure. They are actually
real, classic functions.
2019-11-21 17:24:47 -06:00
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
METHOD_HEAD ( " Cell.getTerminalNetlistNonInstanceOccurrences() " )
Various bug fixes (Selection, Measures/Histogram, helpers).
* Bug: In CRL/python/helpers/__init__.py, in textPythonTrace(), when an
ErrorMessage was catched, the trace parameter was not correctly
extracted leading to an "exception in exception".
* New: In Isobar/PyCell, exported Cell::getNonLeafInstanceOccurrences()
collection.
* New: In Isobar/PyTransformation, type is now built so the tp_compare
is linked to the C++ operator==().
* Change: In Hurricane::SelectionModel, Hurricane::SelectionWidget and
CellWidget, no longer use Occurrences but directly the Selector property.
We also use the Selector to know if an Occurrence is selected by
looking at that property on it's Quark. This avoid a very lengthy
search in vector when there is many elements (say > 10000).
NOTE: This is a bad implementation as there is a confusion between
beeing selected (that is, having a Selector property attached to
an Occurrence Quark) and being actually displayed as selected.
This lead to awkward implatation of the various "toggle" methods.
Have to rethink that more clearly later.
* Bug: In CRL::Histogram, the non-inline template full specialisation
of Measure<Histogram> must not be put in the header but in the module
to avoid multiple definition and link failure. They are actually
real, classic functions.
2019-11-21 17:24:47 -06:00
PyOccurrenceCollection * pyOccurrenceCollection = NULL ;
HTRY
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
Occurrences * occurrences = new Occurrences ( cell - > getNonTerminalNetlistInstanceOccurrences ( ) ) ;
Various bug fixes (Selection, Measures/Histogram, helpers).
* Bug: In CRL/python/helpers/__init__.py, in textPythonTrace(), when an
ErrorMessage was catched, the trace parameter was not correctly
extracted leading to an "exception in exception".
* New: In Isobar/PyCell, exported Cell::getNonLeafInstanceOccurrences()
collection.
* New: In Isobar/PyTransformation, type is now built so the tp_compare
is linked to the C++ operator==().
* Change: In Hurricane::SelectionModel, Hurricane::SelectionWidget and
CellWidget, no longer use Occurrences but directly the Selector property.
We also use the Selector to know if an Occurrence is selected by
looking at that property on it's Quark. This avoid a very lengthy
search in vector when there is many elements (say > 10000).
NOTE: This is a bad implementation as there is a confusion between
beeing selected (that is, having a Selector property attached to
an Occurrence Quark) and being actually displayed as selected.
This lead to awkward implatation of the various "toggle" methods.
Have to rethink that more clearly later.
* Bug: In CRL::Histogram, the non-inline template full specialisation
of Measure<Histogram> must not be put in the header but in the module
to avoid multiple definition and link failure. They are actually
real, classic functions.
2019-11-21 17:24:47 -06:00
pyOccurrenceCollection = PyObject_NEW ( PyOccurrenceCollection , & PyTypeOccurrenceCollection ) ;
if ( pyOccurrenceCollection = = NULL ) return NULL ;
pyOccurrenceCollection - > _object = occurrences ;
2008-10-17 12:27:20 -05:00
HCATCH
return ( PyObject * ) pyOccurrenceCollection ;
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
// Attribute Method : "PyCell_getTerminalNetlistInstanceOccurrencesUnder()"
2008-03-06 10:46:43 -06:00
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
static PyObject * PyCell_getTerminalNetlistInstanceOccurrencesUnder ( PyCell * self , PyObject * args ) {
cdebug_log ( 20 , 0 ) < < " PyCell_getTerminalNetlistInstanceOccurrencesUnder() " < < endl ;
2008-03-06 10:46:43 -06:00
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
METHOD_HEAD ( " Cell.getTerminalNetlistInstanceOccurrencesUnder() " )
2008-03-06 10:46:43 -06:00
2008-12-12 12:49:17 -06:00
PyBox * pyBox ;
if ( ! PyArg_ParseTuple ( args , " O!:Cell.getInstancesUnder " , & PyTypeBox , & pyBox ) ) {
return NULL ;
}
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
PyOccurrenceCollection * pyOccurrenceCollection = NULL ;
2008-03-06 10:46:43 -06:00
HTRY
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
Occurrences * occurrences = new Occurrences ( cell - > getTerminalNetlistInstanceOccurrencesUnder ( * PYBOX_O ( pyBox ) ) ) ;
2008-10-17 12:27:20 -05:00
pyOccurrenceCollection = PyObject_NEW ( PyOccurrenceCollection , & PyTypeOccurrenceCollection ) ;
if ( pyOccurrenceCollection = = NULL ) {
return NULL ;
}
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
pyOccurrenceCollection - > _object = occurrences ;
HCATCH
return ( PyObject * ) pyOccurrenceCollection ;
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
2008-10-17 12:27:20 -05:00
// Attribute Method : "PyCell_getReferences()"
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
static PyObject * PyCell_getReferences ( PyCell * self ) {
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getReferences() " < < endl ;
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
METHOD_HEAD ( " Cell.getReferences() " )
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
PyReferenceCollection * pyReferenceCollection = NULL ;
2008-03-06 10:46:43 -06:00
HTRY
2008-10-17 12:27:20 -05:00
References * references = new References ( cell - > getReferences ( ) ) ;
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
pyReferenceCollection = PyObject_NEW ( PyReferenceCollection , & PyTypeReferenceCollection ) ;
if ( pyReferenceCollection = = NULL ) {
return NULL ;
}
pyReferenceCollection - > _object = references ;
HCATCH
return ( PyObject * ) pyReferenceCollection ;
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
2008-10-17 12:27:20 -05:00
// Attribute Method : "PyCell_getHyperNets()"
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
static PyObject * PyCell_getHyperNets ( PyCell * self ) {
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getHyperNets() " < < endl ;
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
METHOD_HEAD ( " Cell.getHyperNets() " )
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
PyOccurrenceCollection * pyOccurrenceCollection = NULL ;
2008-03-06 10:46:43 -06:00
HTRY
2008-10-17 12:27:20 -05:00
Occurrences * occurrences = new Occurrences ( cell - > getHyperNetRootNetOccurrences ( ) ) ;
2008-03-06 10:46:43 -06:00
2008-10-17 12:27:20 -05:00
pyOccurrenceCollection = PyObject_NEW ( PyOccurrenceCollection , & PyTypeOccurrenceCollection ) ;
if ( pyOccurrenceCollection = = NULL ) {
return NULL ;
}
pyOccurrenceCollection - > _object = occurrences ;
HCATCH
return ( ( PyObject * ) pyOccurrenceCollection ) ;
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
2008-03-17 08:54:33 -05:00
// Attribute Method : "PyCell_getNet ()"
2008-03-06 10:46:43 -06:00
2008-12-10 12:37:32 -06:00
static PyObject * PyCell_getNet ( PyCell * self , PyObject * args ) {
2020-10-14 07:58:32 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getNet() " < < endl ;
2008-12-10 12:37:32 -06:00
METHOD_HEAD ( " Cell.getNet() " )
Net * net = NULL ;
HTRY
2020-10-14 07:58:32 -05:00
char * name = NULL ;
if ( not PyArg_ParseTuple ( args , " s:Cell.getNet() " , & name ) ) {
PyErr_SetString ( ProxyError , " Cell.getNet(): Net name argument is not a string. " ) ;
2008-12-10 12:37:32 -06:00
return NULL ;
2020-10-14 07:58:32 -05:00
}
net = cell - > getNet ( Name ( name ) ) ;
2008-12-10 12:37:32 -06:00
HCATCH
return PyNet_Link ( net ) ;
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
2008-10-14 05:48:53 -05:00
// Attribute Method : "PyCell_getNets ()"
2008-03-06 10:46:43 -06:00
2008-10-14 05:48:53 -05:00
static PyObject * PyCell_getNets ( PyCell * self ) {
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getNets() " < < endl ;
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
METHOD_HEAD ( " Cell.getNets() " )
2008-03-06 10:46:43 -06:00
2008-10-14 05:48:53 -05:00
PyNetCollection * pyNetCollection = NULL ;
2008-03-06 10:46:43 -06:00
HTRY
2008-10-14 13:44:20 -05:00
Nets * nets = new Nets ( cell - > getNets ( ) ) ;
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
pyNetCollection = PyObject_NEW ( PyNetCollection , & PyTypeNetCollection ) ;
if ( pyNetCollection = = NULL ) {
return NULL ;
}
2008-03-06 10:46:43 -06:00
2008-10-14 05:48:53 -05:00
pyNetCollection - > _object = nets ;
2008-03-06 10:46:43 -06:00
HCATCH
2008-10-14 13:44:20 -05:00
2008-10-14 05:48:53 -05:00
return ( ( PyObject * ) pyNetCollection ) ;
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
2008-10-14 13:44:20 -05:00
// Attribute Method : "PyCell_getExternalNets()"
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
static PyObject * PyCell_getExternalNets ( PyCell * self ) {
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getExternalNets() " < < endl ;
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
METHOD_HEAD ( " Cell.getExternalNets() " )
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
PyNetCollection * pyNetCollection = NULL ;
2008-03-06 10:46:43 -06:00
HTRY
2008-10-14 13:44:20 -05:00
Nets * nets = new Nets ( cell - > getExternalNets ( ) ) ;
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
pyNetCollection = PyObject_NEW ( PyNetCollection , & PyTypeNetCollection ) ;
if ( pyNetCollection = = NULL ) {
return NULL ;
}
pyNetCollection - > _object = nets ;
2008-03-06 10:46:43 -06:00
HCATCH
2008-10-14 13:44:20 -05:00
return ( ( PyObject * ) pyNetCollection ) ;
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
2008-10-14 13:44:20 -05:00
// Attribute Method : "PyCell_getClockNets()"
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
static PyObject * PyCell_getClockNets ( PyCell * self ) {
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getClockNets() " < < endl ;
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
METHOD_HEAD ( " Cell.getClockNets " )
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
PyNetCollection * pyNetCollection = NULL ;
2008-03-06 10:46:43 -06:00
HTRY
2008-10-14 13:44:20 -05:00
Nets * nets = new Nets ( cell - > getClockNets ( ) ) ;
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
pyNetCollection = PyObject_NEW ( PyNetCollection , & PyTypeNetCollection ) ;
if ( pyNetCollection = = NULL ) {
return NULL ;
}
pyNetCollection - > _object = nets ;
2008-03-06 10:46:43 -06:00
HCATCH
2008-10-14 13:44:20 -05:00
return ( ( PyObject * ) pyNetCollection ) ;
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
2008-10-14 13:44:20 -05:00
// Attribute Method : "PyCell_getSupplyNets()"
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
static PyObject * PyCell_getSupplyNets ( PyCell * self ) {
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getSupplyNets() " < < endl ;
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
METHOD_HEAD ( " Cell.getSupplyNets() " )
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
PyNetCollection * pyNetCollection = NULL ;
2008-03-06 10:46:43 -06:00
HTRY
2008-10-14 13:44:20 -05:00
Nets * nets = new Nets ( cell - > getSupplyNets ( ) ) ;
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
pyNetCollection = PyObject_NEW ( PyNetCollection , & PyTypeNetCollection ) ;
if ( pyNetCollection = = NULL ) {
return NULL ;
}
pyNetCollection - > _object = nets ;
2008-03-06 10:46:43 -06:00
HCATCH
2008-10-14 13:44:20 -05:00
return ( ( PyObject * ) pyNetCollection ) ;
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
2008-10-14 13:44:20 -05:00
// Attribute Method : "PyCell_getPowerNets()"
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
static PyObject * PyCell_getPowerNets ( PyCell * self ) {
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getPowerNets() " < < endl ;
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
METHOD_HEAD ( " Cell.getPowerNets() " )
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
PyNetCollection * pyNetCollection = NULL ;
2008-03-06 10:46:43 -06:00
HTRY
2008-10-14 13:44:20 -05:00
Nets * nets = new Nets ( cell - > getPowerNets ( ) ) ;
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
pyNetCollection = PyObject_NEW ( PyNetCollection , & PyTypeNetCollection ) ;
if ( pyNetCollection = = NULL ) {
return NULL ;
}
pyNetCollection - > _object = nets ;
2008-03-06 10:46:43 -06:00
HCATCH
2008-10-14 13:44:20 -05:00
return ( ( PyObject * ) pyNetCollection ) ;
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
2008-10-14 13:44:20 -05:00
// Attribute Method : "PyCell_getGroundNets()"
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
static PyObject * PyCell_getGroundNets ( PyCell * self ) {
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getGroundNets() " < < endl ;
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
METHOD_HEAD ( " Cell.getGroundNets() " )
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
PyNetCollection * pyNetCollection = NULL ;
2008-03-06 10:46:43 -06:00
HTRY
2008-10-14 13:44:20 -05:00
Nets * nets = new Nets ( cell - > getGroundNets ( ) ) ;
2008-03-06 10:46:43 -06:00
2008-10-14 13:44:20 -05:00
pyNetCollection = PyObject_NEW ( PyNetCollection , & PyTypeNetCollection ) ;
if ( pyNetCollection = = NULL ) {
return NULL ;
}
pyNetCollection - > _object = nets ;
2008-03-06 10:46:43 -06:00
HCATCH
2008-10-14 13:44:20 -05:00
return ( ( PyObject * ) pyNetCollection ) ;
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
2008-03-17 08:54:33 -05:00
// Attribute Method : "PyCell_getAbutmentBox ()"
2008-03-06 10:46:43 -06:00
2008-03-17 08:54:33 -05:00
static PyObject * PyCell_getAbutmentBox ( PyCell * self ) {
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getAbutmentBox() " < < endl ;
2008-03-06 10:46:43 -06:00
2008-03-17 08:54:33 -05:00
METHOD_HEAD ( " Cell.getAbutmentBox() " )
2008-03-06 10:46:43 -06:00
PyBox * abutmentBox = PyObject_NEW ( PyBox , & PyTypeBox ) ;
if ( abutmentBox = = NULL ) { return NULL ; }
HTRY
2008-03-17 08:54:33 -05:00
abutmentBox - > _object = new Box ( cell - > getAbutmentBox ( ) ) ;
2008-03-06 10:46:43 -06:00
HCATCH
return ( ( PyObject * ) abutmentBox ) ;
}
// ---------------------------------------------------------------
2008-03-22 08:18:26 -05:00
// Attribute Method : "PyCell_setName ()"
2008-03-06 10:46:43 -06:00
2008-12-11 06:25:02 -06:00
SetNameMethod ( Cell , cell )
2008-03-06 10:46:43 -06:00
// ---------------------------------------------------------------
2008-03-22 08:18:26 -05:00
// Attribute Method : "PyCell_setAbutmentBox ()"
2008-03-06 10:46:43 -06:00
2008-03-22 08:18:26 -05:00
static PyObject * PyCell_setAbutmentBox ( PyCell * self , PyObject * args ) {
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " Cell.setAbutmentBox() " < < endl ;
2008-03-06 10:46:43 -06:00
HTRY
2008-03-22 08:18:26 -05:00
METHOD_HEAD ( " Cell.setAbutmentBox() " )
2008-03-06 10:46:43 -06:00
2008-12-12 12:49:17 -06:00
PyBox * pyBox ;
2012-12-04 06:29:45 -06:00
if ( ! PyArg_ParseTuple ( args , " O!:Cell.setAbutmentBox " , & PyTypeBox , & pyBox ) ) {
2008-10-17 12:27:20 -05:00
return NULL ;
2008-12-12 12:49:17 -06:00
}
cell - > setAbutmentBox ( * PYBOX_O ( pyBox ) ) ;
2008-03-06 10:46:43 -06:00
HCATCH
Py_RETURN_NONE ;
}
// ---------------------------------------------------------------
2008-03-22 08:18:26 -05:00
// Attribute Method : "PyCell_setTerminal ()"
2008-03-06 10:46:43 -06:00
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
static PyObject * PyCell_setTerminalNetlist ( PyCell * self , PyObject * args ) {
cdebug_log ( 20 , 0 ) < < " PyCell_setTerminalNetlist () " < < endl ;
2008-03-06 10:46:43 -06:00
HTRY
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
METHOD_HEAD ( " Cell.setTerminalNetlist() " )
2008-03-06 10:46:43 -06:00
PyObject * arg0 ;
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
if ( ! PyArg_ParseTuple ( args , " O:Cell.setTerminalNetlist " , & arg0 ) & & PyBool_Check ( arg0 ) ) {
2008-12-12 12:49:17 -06:00
return NULL ;
}
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
PyObject_IsTrue ( arg0 ) ? cell - > setTerminalNetlist ( true ) : cell - > setTerminalNetlist ( false ) ;
2008-03-06 10:46:43 -06:00
HCATCH
Py_RETURN_NONE ;
}
Support for Uniquification. Rewrite of the Blif parser.
* New: In Hurricane, In NetAlias & Net, add an AliasList collection to
iterate over all the aliases names (this *not* include the main
net name).
* New: In Hurricane, In Cell, Instance & Net add support for cloning and
uniquification (update documentation).
All Cells that are uniquified from a given model are kept in an
Uniquify relation. This relation allows to get all the clones and
generate unique clone names by adding a "_uXX" suffix.
* Bug: In Hurricane, the Cell::_isFlattenLeaf attribute was not initialized
in the constructor.
* Change: In CRL Core, in AllianceFramework::getCell(), no longer destroy
a partially loaded Cell in case of parser failure, let the incomplete
Cell be.
* New: In CRL Core, in ApParser, if all the instances are placed, sets the
Cell::Placed flag.
* Change: In CRL Core, in BlifParser, complete rewrite of the parser.
Not so good an idea afterwards...
* New: In Etesian, uniquify the design before placing.
* Change: In Kite, display the list of unrouted wired after all other
statistics.
2015-04-25 09:52:18 -05:00
// ---------------------------------------------------------------
// Attribute Method : "PyCell_uniquify ()"
static PyObject * PyCell_uniquify ( PyCell * self , PyObject * args ) {
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_uniquify () " < < endl ;
Support for Uniquification. Rewrite of the Blif parser.
* New: In Hurricane, In NetAlias & Net, add an AliasList collection to
iterate over all the aliases names (this *not* include the main
net name).
* New: In Hurricane, In Cell, Instance & Net add support for cloning and
uniquification (update documentation).
All Cells that are uniquified from a given model are kept in an
Uniquify relation. This relation allows to get all the clones and
generate unique clone names by adding a "_uXX" suffix.
* Bug: In Hurricane, the Cell::_isFlattenLeaf attribute was not initialized
in the constructor.
* Change: In CRL Core, in AllianceFramework::getCell(), no longer destroy
a partially loaded Cell in case of parser failure, let the incomplete
Cell be.
* New: In CRL Core, in ApParser, if all the instances are placed, sets the
Cell::Placed flag.
* Change: In CRL Core, in BlifParser, complete rewrite of the parser.
Not so good an idea afterwards...
* New: In Etesian, uniquify the design before placing.
* Change: In Kite, display the list of unrouted wired after all other
statistics.
2015-04-25 09:52:18 -05:00
HTRY
METHOD_HEAD ( " Cell.uniquify() " )
unsigned int depth ;
if ( not PyArg_ParseTuple ( args , " I:Cell.uniquify " , & depth ) ) {
PyErr_SetString ( ConstructorError , " Cell.uniquify(): Invalid number/bad type of parameter. " ) ;
return NULL ;
}
cell - > uniquify ( depth ) ;
HCATCH
Py_RETURN_NONE ;
}
// ---------------------------------------------------------------
// Attribute Method : "PyCell_getClone ()"
static PyObject * PyCell_getClone ( PyCell * self ) {
2016-06-11 14:56:12 -05:00
cdebug_log ( 20 , 0 ) < < " PyCell_getClone () " < < endl ;
Support for Uniquification. Rewrite of the Blif parser.
* New: In Hurricane, In NetAlias & Net, add an AliasList collection to
iterate over all the aliases names (this *not* include the main
net name).
* New: In Hurricane, In Cell, Instance & Net add support for cloning and
uniquification (update documentation).
All Cells that are uniquified from a given model are kept in an
Uniquify relation. This relation allows to get all the clones and
generate unique clone names by adding a "_uXX" suffix.
* Bug: In Hurricane, the Cell::_isFlattenLeaf attribute was not initialized
in the constructor.
* Change: In CRL Core, in AllianceFramework::getCell(), no longer destroy
a partially loaded Cell in case of parser failure, let the incomplete
Cell be.
* New: In CRL Core, in ApParser, if all the instances are placed, sets the
Cell::Placed flag.
* Change: In CRL Core, in BlifParser, complete rewrite of the parser.
Not so good an idea afterwards...
* New: In Etesian, uniquify the design before placing.
* Change: In Kite, display the list of unrouted wired after all other
statistics.
2015-04-25 09:52:18 -05:00
Cell * cloneCell = NULL ;
HTRY
METHOD_HEAD ( " Cell.getClone() " )
cloneCell = cell - > getClone ( ) ;
HCATCH
return PyCell_Link ( cloneCell ) ;
}
2008-03-06 10:46:43 -06:00
2020-12-27 05:21:14 -06:00
static PyObject * PyCell_flattenNets ( PyCell * self , PyObject * args )
{
cdebug_log ( 20 , 0 ) < < " PyCell_flattenNets() " < < endl ;
Instance * instance = NULL ;
PyObject * arg0 = NULL ;
PyObject * arg1 = NULL ;
HTRY
METHOD_HEAD ( " Cell.flattenNets() " )
__cs . init ( " Cell.flattenNets " ) ;
if ( not PyArg_ParseTuple ( args , " O&O&:Cell.flattenNets "
, Converter , & arg0
, Converter , & arg1
) ) {
PyErr_SetString ( ConstructorError , " Cell.flattenNets(): Takes exactly two parameters. " ) ;
return NULL ;
}
if ( arg0 = = Py_None ) {
cell - > flattenNets ( NULL , PyInt_AsLong ( arg1 ) ) ;
} else if ( __cs . getObjectIds ( ) = = " :ent:int " ) {
cell - > flattenNets ( PYINSTANCE_O ( arg0 ) , PyInt_AsLong ( arg1 ) ) ;
} else {
string message = " Cell.flattenNets(): Bad type of parameter(s), \" " + __cs . getObjectIds ( ) + " \" . " ;
PyErr_SetString ( ConstructorError , message . c_str ( ) ) ;
return NULL ;
}
HCATCH
Py_RETURN_NONE ;
}
Implement QuadTree pruning to speedup the display of huge designs.
When displaying big designs, the drawing was very slow because all
the graphical objects were browsed *before* deciding if they were
big enough for display. So we introduce a new mode of working of
the QuadTree to that the ones with areas *below* a certain thresold
just get skipped. Of course, the previous behavior must be preserved
(when the threhsold is zero or negative) as most of the time, we
*want* *all* the objects under an area, not only the biggest ones.
For now, in CellWidget, the visibility threshold is set to 20 pixels.
With this, we can display the Libre-SOC "test_issuer" of 100Kgates
in between 20 to 30s.
* New: In Hurricane::QuadTree_GosUnder collection & locator, add a
"threshold" argument so that QuadTree which both area sides are
below that lenght will be ignored (no walkthrough at all).
Zero (or negative) threshold means that no QuadTree will be
pruned, we get back to the previous behavior.
* New: In Hurricane::Slice::getComponentsUnder(), add the threshold
argument (with a default to 0).
* New: In Hurricane::Cell::getInstancesUnder(), add the threshold
argument (with a default to 0).
* New: In Hurricane::Query, added support for the threshold parameter.
In doQuery(), instances that have *both* side under the threshold
are pruned (slightly different from QuadTree areas).
* New: In Hurricane::CellWidget::_redraw(), set the visibility
threshold to 20 pixels (arbitrary, must be parametrized).
* New: In Hurricane::Cell, added destroyPhysical() method.
Remove *all* physical components and the DeepNets (so make
a virtual *unflatten*) in the correct dependency order.
In particular, RoutingPads, that relies on Occurrence over
physical components must be destroyeds *before* the entity
they are based on is destroyed.
2020-08-27 12:14:44 -05:00
// ---------------------------------------------------------------
// Attribute Method : "PyCell_destroyPhysical ()"
static PyObject * PyCell_destroyPhysical ( PyCell * self )
{
cdebug_log ( 20 , 0 ) < < " PyCell_destroyPhysical () " < < endl ;
HTRY
METHOD_HEAD ( " Cell.destroyPhysical() " )
cell - > destroyPhysical ( ) ;
HCATCH
Py_RETURN_NONE ;
}
2008-03-06 10:46:43 -06:00
// Standart Predicates (Attributes).
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
DirectGetBoolAttribute ( PyCell_isTerminal , isTerminal , PyCell , Cell )
DirectGetBoolAttribute ( PyCell_isTerminalNetlist , isTerminalNetlist , PyCell , Cell )
DirectGetBoolAttribute ( PyCell_isUnique , isUnique , PyCell , Cell )
DirectGetBoolAttribute ( PyCell_isUniquified , isUniquified , PyCell , Cell )
DirectGetBoolAttribute ( PyCell_isUniquifyMaster , isUniquifyMaster , PyCell , Cell )
DirectGetBoolAttribute ( PyCell_isRouted , isRouted , PyCell , Cell )
DirectSetBoolAttribute ( PyCell_setRouted , setRouted , PyCell , Cell )
2008-03-06 10:46:43 -06:00
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
GetBoundStateAttribute ( PyCell_isPyBound , PyCell , Cell )
2008-03-06 10:46:43 -06:00
// ---------------------------------------------------------------
// PyCell Attribute Method table.
PyMethodDef PyCell_Methods [ ] =
Make the Python interface closely mirroring the C++ one.
* Change: In Isobar, the Python interface was not exactly mirroring the
C++ one, now it is the case. The Python code should look likes almost
exactly like the C++ one, the only differences remaining being due
to the languages respective syntaxes. Note that in the case of
constructor functions, it leads to a slightly longer notation in
Python that it could have been (mimic the ".create()" static
member). Main modifications:
1. Mirror the static constructor syntax with create():
Cell( ... ) ==> Cell.create( ... )
2. Correct hierarchy for constants in Instance, Net, Pin
& Transformation. For example:
Hurricane.PlacementStatusFIXED
==> Hurricane.Instance.PlacementStatus.FIXED
Hurricane.OrientationID
==> Hurricane.Transformation.Orientation.ID
Hurricane.TypeLOGICAL ==> Hurricane.Net.Type.LOGICAL
Hurricane.DirectionIN ==> Hurricane.Net.Direction.IN
* Change: In CRL Core, correction to match the improved Python API
in the configutation helpers.
* Change: In Cumulus, correction to match the improved Python API.
* Change: In Stratus, correction to match the improved Python API.
* Change: In Documenation, update for the new Python interface
(both user's guide & examples).
* Note: We must port those changes into Chams for it to continue
to run.
* Change: In Documenation, update the Python script support part.
2014-06-28 10:37:59 -05:00
{ { " create " , ( PyCFunction ) PyCell_create , METH_VARARGS | METH_STATIC
, " Create a new cell. " }
, { " getLibrary " , ( PyCFunction ) PyCell_getLibrary , METH_NOARGS , " Returns the library owning the cell. " }
2008-03-17 08:54:33 -05:00
, { " getName " , ( PyCFunction ) PyCell_getName , METH_NOARGS , " Returns the name of the cell. " }
, { " getInstance " , ( PyCFunction ) PyCell_getInstance , METH_VARARGS , " Returns the instance of name <name> if it exists, else NULL. " }
2013-04-15 04:51:51 -05:00
, { " getInstances " , ( PyCFunction ) PyCell_getInstances , METH_NOARGS , " Returns the locator of the collection of all instances called by the cell. " } // getInstances
, { " getInstancesUnder " , ( PyCFunction ) PyCell_getInstancesUnder , METH_VARARGS , " Returns the locator of the collection of all instances of the cell intersecting the given rectangular area. " } // getInstancesUnder
, { " getSlaveInstances " , ( PyCFunction ) PyCell_getSlaveInstances , METH_NOARGS , " Returns the locator of the collection of instances whose master is this cell. " } // getSlaveInstances
2013-04-15 05:49:48 -05:00
, { " getComponents " , ( PyCFunction ) PyCell_getComponents , METH_NOARGS , " Returns the collection of all components belonging to the cell. " }
, { " getComponentsUnder " , ( PyCFunction ) PyCell_getComponentsUnder , METH_VARARGS , " Returns the collection of all components belonging to this cell and intersecting the given rectangular area. " }
, { " getOccurrences " , ( PyCFunction ) PyCell_getOccurrences , METH_NOARGS , " Returns the collection of all occurrences belonging to the cell. " }
, { " getOccurrencesUnder " , ( PyCFunction ) PyCell_getOccurrencesUnder , METH_VARARGS , " Returns the collection of all occurrences belonging to this cell and intersecting the given rectangular area. " }
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
, { " getTerminalNetlistInstanceOccurrences " , ( PyCFunction ) PyCell_getTerminalNetlistInstanceOccurrences , METH_NOARGS
, " Returns the collection all terminal instances occurrences. " }
, { " getNonTerminalNetlistInstanceOccurrences " , ( PyCFunction ) PyCell_getNonTerminalNetlistInstanceOccurrences , METH_NOARGS
, " Returns the collection of all non-terminal instances occurrences. " }
, { " getTerminalNetlistInstanceOccurrencesUnder " , ( PyCFunction ) PyCell_getTerminalNetlistInstanceOccurrencesUnder , METH_VARARGS
, " Returns the collection of all occurrences belonging to this cell and intersecting the given rectangular area. " }
2013-04-15 04:51:51 -05:00
, { " getReferences " , ( PyCFunction ) PyCell_getReferences , METH_VARARGS , " Returns the collection of all references belonging to the cell. " }
, { " getHyperNets " , ( PyCFunction ) PyCell_getHyperNets , METH_VARARGS , " Returns the collection of all hyperNets belonging to the cell. " }
2008-03-17 08:54:33 -05:00
, { " getNet " , ( PyCFunction ) PyCell_getNet , METH_VARARGS , " Returns the net of name <name> if it exists, else NULL. " }
2013-04-15 04:51:51 -05:00
, { " getNets " , ( PyCFunction ) PyCell_getNets , METH_NOARGS , " Returns the collection of all nets of the cell. " }
, { " getExternalNets " , ( PyCFunction ) PyCell_getExternalNets , METH_NOARGS , " Returns the collection of all external nets of the cell. " }
, { " getClockNets " , ( PyCFunction ) PyCell_getClockNets , METH_NOARGS , " Returns the collection of all clock nets of the cell. " }
, { " getSupplyNets " , ( PyCFunction ) PyCell_getSupplyNets , METH_NOARGS , " Returns the collection of all supply nets of the cell. " }
, { " getPowerNets " , ( PyCFunction ) PyCell_getPowerNets , METH_NOARGS , " Returns the collection of all power nets of the cell. " }
, { " getGroundNets " , ( PyCFunction ) PyCell_getGroundNets , METH_NOARGS , " Returns the collection of all ground nets of the cell. " }
2008-03-17 08:54:33 -05:00
, { " getAbutmentBox " , ( PyCFunction ) PyCell_getAbutmentBox , METH_NOARGS , " Returns the abutment box of the cell(which is defined by the designer unlike the bounding box which is managed dynamically) " }
2008-03-22 08:18:26 -05:00
, { " isTerminal " , ( PyCFunction ) PyCell_isTerminal , METH_NOARGS , " Returns true if the cell is marked as terminal, else false. " }
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
, { " isTerminalNetlist " , ( PyCFunction ) PyCell_isTerminalNetlist , METH_NOARGS , " Returns true if the cell is a leaf of the hierarchy, else false. " }
Merged QuadTrees in overlayed Cells (placed together).
* New: In Hurricane, in Cell & Instance, add the ability to merge the
QuadTree when *second level* instances of a Cell are placed in
the same space as the top Cell. This is the case of a deeply
hierarchical design made of only standard cells that are to
be placed in a "flat" manner.
The design is uniquified then the intermediate instances models,
which should be unique at that point have their QuadTree merged
through a call to Instance::slaveAbutmentBox(). That method will
make the model of the instance use the QuadTree of the Cell to
which the instance belong. The instance model no longer posseses
a dedicated QuadTree. As a corollary the abutment box of both
Cell are kept identical and the Instance has it's transformation
set to (0,0,ID).
Remark: when we talk about "QuadTree", we mean in fact the
QuadTree for the instances *and* the SliceMap (Layer+QuadTree).
Consequence in Query: when going through the resulting
"flattened" QuadTree we will find objects with an incomplete
Path du to the fact that we didn't have to explore their
Instance/Cell level to reach them. The shunted part of the
Path is stored in the Go master Cell in the _shuntedPath
attribute. This also affect the displayed depth of hierarchy,
but not too badly.
* New: In Hurricane, in Cell, new methods:
- Cell::updatePlacedFlag() : set the placement flags.
- Cell::isUnique() : one or less instance.
- Cell::isUniquified() : is the result of an uniquification.
- Cell::isUniquifyMaster() : is the reference cell of the
uniquification.
* Change: In Hurricane, in Cell::Uniquify(), uniquify a Cell only
if it is unplaced. We do not need to duplicate placed Cells
(see datapathes).
2015-06-26 11:35:11 -05:00
, { " isUnique " , ( PyCFunction ) PyCell_isUnique , METH_NOARGS , " Returns true if the cell has one or less instance. " }
, { " isUniquified " , ( PyCFunction ) PyCell_isUniquified , METH_NOARGS , " Returns true if the cell is the result of an uniquification. " }
, { " isUniquifyMaster " , ( PyCFunction ) PyCell_isUniquifyMaster , METH_NOARGS , " Returns true if the cell is the reference for an uniquification. " }
Various bug corrections to pass the alliance-check-toolkit reference benchs.
* New: In Isobar::PyCell, export the isRouted() and setRouted() to the
Python interface.
* Bug: In CRL::Entity::parseEntity(), check that the closing parenthesis
is the last character of the net name. Issue a more relevant error
message.
* In Anabatic::NetBuilder::_do_xG() and all other unimplemented methods,
throw an error if called from a derived classes instead of just
issuing a message in the debug stream. Avoid later core dumps...
* In Anabatic::NetBuilderHV, implement the builders for GCells with
one pin. Needed to support chip/corona routing.
* Bug: In Cumulus/plugins/Chip.py, check that coronaCk exists before
using it.
* New: In Cumulus/plugins/PadsCorona/Side._placePad(), when routing
a design with symbolic pads, export the chip external "pad"
connectors to be able to perform a lvx (otherwise cougar do not
create external nets).
In Corona._createCoreWire(), set the minimal gap between the pads
and the corona to 6 pitches. Empirical value to avoid DRC errors
with symbolic pads (pxlib).
When successufully done, mark the Corona cell as routed.
* Bug: In Cumulus/plugins/Core2Chip.IoNet, the regex for vectorizet net
was wrong, it was allowing only one digit in the index.
* Bug: In Cumulus/plugins/Core2Chip.cmos, correct management of
pad & corona clock nets. Correct connexion between vdde/vddi.
* Bug: In Unicorn/cgt.py, forgot to execute scripts when in text mode.
2019-05-24 16:57:22 -05:00
, { " isRouted " , ( PyCFunction ) PyCell_isRouted , METH_NOARGS , " Returns true if the cell is flagged as routed. " }
Support for Uniquification. Rewrite of the Blif parser.
* New: In Hurricane, In NetAlias & Net, add an AliasList collection to
iterate over all the aliases names (this *not* include the main
net name).
* New: In Hurricane, In Cell, Instance & Net add support for cloning and
uniquification (update documentation).
All Cells that are uniquified from a given model are kept in an
Uniquify relation. This relation allows to get all the clones and
generate unique clone names by adding a "_uXX" suffix.
* Bug: In Hurricane, the Cell::_isFlattenLeaf attribute was not initialized
in the constructor.
* Change: In CRL Core, in AllianceFramework::getCell(), no longer destroy
a partially loaded Cell in case of parser failure, let the incomplete
Cell be.
* New: In CRL Core, in ApParser, if all the instances are placed, sets the
Cell::Placed flag.
* Change: In CRL Core, in BlifParser, complete rewrite of the parser.
Not so good an idea afterwards...
* New: In Etesian, uniquify the design before placing.
* Change: In Kite, display the list of unrouted wired after all other
statistics.
2015-04-25 09:52:18 -05:00
, { " isBound " , ( PyCFunction ) PyCell_isPyBound , METH_NOARGS , " Returns true if the cell is bounded to the hurricane cell " }
2008-03-22 08:18:26 -05:00
, { " setName " , ( PyCFunction ) PyCell_setName , METH_VARARGS , " Allows to change the cell name. " }
, { " setAbutmentBox " , ( PyCFunction ) PyCell_setAbutmentBox , METH_VARARGS , " Sets the cell abutment box. " }
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
, { " setTerminalNetlist " , ( PyCFunction ) PyCell_setTerminalNetlist , METH_VARARGS , " Sets the cell terminal netlist status. " }
Various bug corrections to pass the alliance-check-toolkit reference benchs.
* New: In Isobar::PyCell, export the isRouted() and setRouted() to the
Python interface.
* Bug: In CRL::Entity::parseEntity(), check that the closing parenthesis
is the last character of the net name. Issue a more relevant error
message.
* In Anabatic::NetBuilder::_do_xG() and all other unimplemented methods,
throw an error if called from a derived classes instead of just
issuing a message in the debug stream. Avoid later core dumps...
* In Anabatic::NetBuilderHV, implement the builders for GCells with
one pin. Needed to support chip/corona routing.
* Bug: In Cumulus/plugins/Chip.py, check that coronaCk exists before
using it.
* New: In Cumulus/plugins/PadsCorona/Side._placePad(), when routing
a design with symbolic pads, export the chip external "pad"
connectors to be able to perform a lvx (otherwise cougar do not
create external nets).
In Corona._createCoreWire(), set the minimal gap between the pads
and the corona to 6 pitches. Empirical value to avoid DRC errors
with symbolic pads (pxlib).
When successufully done, mark the Corona cell as routed.
* Bug: In Cumulus/plugins/Core2Chip.IoNet, the regex for vectorizet net
was wrong, it was allowing only one digit in the index.
* Bug: In Cumulus/plugins/Core2Chip.cmos, correct management of
pad & corona clock nets. Correct connexion between vdde/vddi.
* Bug: In Unicorn/cgt.py, forgot to execute scripts when in text mode.
2019-05-24 16:57:22 -05:00
, { " setRouted " , ( PyCFunction ) PyCell_setRouted , METH_VARARGS , " Sets the cell routed status. " }
Support for Uniquification. Rewrite of the Blif parser.
* New: In Hurricane, In NetAlias & Net, add an AliasList collection to
iterate over all the aliases names (this *not* include the main
net name).
* New: In Hurricane, In Cell, Instance & Net add support for cloning and
uniquification (update documentation).
All Cells that are uniquified from a given model are kept in an
Uniquify relation. This relation allows to get all the clones and
generate unique clone names by adding a "_uXX" suffix.
* Bug: In Hurricane, the Cell::_isFlattenLeaf attribute was not initialized
in the constructor.
* Change: In CRL Core, in AllianceFramework::getCell(), no longer destroy
a partially loaded Cell in case of parser failure, let the incomplete
Cell be.
* New: In CRL Core, in ApParser, if all the instances are placed, sets the
Cell::Placed flag.
* Change: In CRL Core, in BlifParser, complete rewrite of the parser.
Not so good an idea afterwards...
* New: In Etesian, uniquify the design before placing.
* Change: In Kite, display the list of unrouted wired after all other
statistics.
2015-04-25 09:52:18 -05:00
, { " uniquify " , ( PyCFunction ) PyCell_uniquify , METH_VARARGS , " Uniquify the Cell and it's instances up to <depth>. " }
, { " getClone " , ( PyCFunction ) PyCell_getClone , METH_NOARGS , " Return a copy of the Cell (placement only). " }
2020-12-27 05:21:14 -06:00
, { " flattenNets " , ( PyCFunction ) PyCell_flattenNets , METH_VARARGS , " Perform a virtual flatten, possibly limited to one instance. " }
Implement QuadTree pruning to speedup the display of huge designs.
When displaying big designs, the drawing was very slow because all
the graphical objects were browsed *before* deciding if they were
big enough for display. So we introduce a new mode of working of
the QuadTree to that the ones with areas *below* a certain thresold
just get skipped. Of course, the previous behavior must be preserved
(when the threhsold is zero or negative) as most of the time, we
*want* *all* the objects under an area, not only the biggest ones.
For now, in CellWidget, the visibility threshold is set to 20 pixels.
With this, we can display the Libre-SOC "test_issuer" of 100Kgates
in between 20 to 30s.
* New: In Hurricane::QuadTree_GosUnder collection & locator, add a
"threshold" argument so that QuadTree which both area sides are
below that lenght will be ignored (no walkthrough at all).
Zero (or negative) threshold means that no QuadTree will be
pruned, we get back to the previous behavior.
* New: In Hurricane::Slice::getComponentsUnder(), add the threshold
argument (with a default to 0).
* New: In Hurricane::Cell::getInstancesUnder(), add the threshold
argument (with a default to 0).
* New: In Hurricane::Query, added support for the threshold parameter.
In doQuery(), instances that have *both* side under the threshold
are pruned (slightly different from QuadTree areas).
* New: In Hurricane::CellWidget::_redraw(), set the visibility
threshold to 20 pixels (arbitrary, must be parametrized).
* New: In Hurricane::Cell, added destroyPhysical() method.
Remove *all* physical components and the DeepNets (so make
a virtual *unflatten*) in the correct dependency order.
In particular, RoutingPads, that relies on Occurrence over
physical components must be destroyeds *before* the entity
they are based on is destroyed.
2020-08-27 12:14:44 -05:00
, { " destroyPhysical " , ( PyCFunction ) PyCell_destroyPhysical , METH_NOARGS , " Destroy all physical components, including DeepNets (vflatten). " }
, { " destroy " , ( PyCFunction ) PyCell_destroy , METH_NOARGS , " Destroy associated hurricane object The python object remains. " }
Clarify semantic of flatten Collections (walkthrough).
In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).
* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
them by "TerminalNetlist" one, especially Collections. Now we have
two clear sets of Collections to walkthough the layout or the
netlist.
Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
"TerminalNetlist" collections and apply the new semantic to the
locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
non terminal netlist instances to flag fully placed sub-blocks
as terminal for the netlist. Only then remove the feed cells
from unplaced instances. Previously, the feed cells where stripped
even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
Python None object when we do not want to pass one but need to
have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
renaming.
2020-03-10 06:10:53 -05:00
, { NULL , NULL , 0 , NULL } /* sentinel */
2008-03-06 10:46:43 -06:00
} ;
// x-------------------------------------------------------------x
// | "PyCell" Object Methods |
// x-------------------------------------------------------------x
2009-09-30 10:11:49 -05:00
DBoDeleteMethod ( Cell )
PyTypeObjectLinkPyType ( Cell )
# else // End of Python Module Code Part.
// x=================================================================x
// | "PyCell" Shared Library Code Part |
// x=================================================================x
2008-03-06 10:46:43 -06:00
// Link/Creation Method.
2008-10-12 08:37:33 -05:00
DBoLinkCreateMethod ( Cell )
2009-09-30 10:11:49 -05:00
PyTypeInheritedObjectDefinitions ( Cell , Entity )
2008-03-06 10:46:43 -06:00
2020-12-27 05:21:14 -06:00
extern void PyCell_postModuleInit ( )
{
PyObject * constant ;
LoadObjectConstant ( PyTypeCell . tp_dict , Cell : : Flags : : NoFlags , " Flags_NoFlags " ) ;
LoadObjectConstant ( PyTypeCell . tp_dict , Cell : : Flags : : BuildRings , " Flags_BuildRings " ) ;
LoadObjectConstant ( PyTypeCell . tp_dict , Cell : : Flags : : BuildClockRings , " Flags_BuildClockRings " ) ;
LoadObjectConstant ( PyTypeCell . tp_dict , Cell : : Flags : : BuildSupplyRings , " Flags_BuildSupplyRings " ) ;
LoadObjectConstant ( PyTypeCell . tp_dict , Cell : : Flags : : NoClockFlatten , " Flags_NoClockFlatten " ) ;
}
2008-03-06 10:46:43 -06:00
# endif // End of Shared Library Code Part.
} // End of extern "C".
} // End of Isobar namespace.