coriolis/hurricane/src/isobar/PyCell.cpp

804 lines
28 KiB
C++
Raw Normal View History

// -*- C++ -*-
//
// This file is part of the Coriolis Software.
// Copyright (c) UPMC 2006-2018, All Rights Reserved
//
// +-----------------------------------------------------------------+
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 |
// | E-mail : Jean-Paul.Chaput@lip6.fr |
2008-03-06 10:46:43 -06:00
// | =============================================================== |
// | C++ Module : "./PyCell.cpp" |
// +-----------------------------------------------------------------+
2008-03-06 10:46:43 -06: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"
#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
// ---------------------------------------------------------------
// Attribute Method : "PyCell_create ()"
PyObject* PyCell_create ( PyObject*, PyObject* args )
{
cdebug_log(20,0) << "PyCell_create()" << endl;
char* name = NULL;
PyLibrary* pyLibrary = NULL;
Cell* cell = NULL;
HTRY
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() );
return NULL;
}
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 ) {
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
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 ) {
cdebug_log(20,0) << "PyCell_getInstance ()" << endl;
METHOD_HEAD("Cell.getInstance()")
2008-03-06 10:46:43 -06:00
Instance* instance = NULL;
HTRY
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-03-06 10:46:43 -06:00
HCATCH
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 ) {
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) {
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) {
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
}
// ---------------------------------------------------------------
// Attribute Method : "PyCell_getComponents()"
static PyObject* PyCell_getComponents(PyCell *self) {
cdebug_log(20,0) << "PyCell_getComponents()" << endl;
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) {
cdebug_log(20,0) << "PyCell_getComponentsUnder()" << endl;
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) {
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) {
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)
{
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());
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)
{
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;
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()" )
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());
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) {
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) {
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
static PyObject* PyCell_getNet(PyCell *self, PyObject* args) {
cdebug_log(20,0) << "PyCell_getNet ()" << endl;
METHOD_HEAD ( "Cell.getNet()" )
Net* net = NULL;
HTRY
char* name = NULL;
2008-12-12 12:49:17 -06:00
if (!PyArg_ParseTuple(args,"s:Cell.getNet", &name)) {
return NULL;
2008-12-12 12:49:17 -06:00
}
net = cell->getNet(Name(name));
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 ) {
cdebug_log(20,0) << "PyCell_getNets()" << endl;
2008-03-06 10:46:43 -06: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
Nets* nets = new Nets(cell->getNets());
2008-03-06 10:46:43 -06: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 05:48:53 -05:00
return ( (PyObject*)pyNetCollection);
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
// Attribute Method : "PyCell_getExternalNets()"
2008-03-06 10:46:43 -06:00
static PyObject* PyCell_getExternalNets(PyCell *self) {
cdebug_log(20,0) << "PyCell_getExternalNets()" << endl;
2008-03-06 10:46:43 -06:00
METHOD_HEAD("Cell.getExternalNets()")
2008-03-06 10:46:43 -06:00
PyNetCollection* pyNetCollection = NULL;
2008-03-06 10:46:43 -06:00
HTRY
Nets* nets = new Nets(cell->getExternalNets());
2008-03-06 10:46:43 -06:00
pyNetCollection = PyObject_NEW(PyNetCollection, &PyTypeNetCollection);
if (pyNetCollection == NULL) {
return NULL;
}
pyNetCollection->_object = nets;
2008-03-06 10:46:43 -06:00
HCATCH
return ((PyObject*)pyNetCollection);
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
// Attribute Method : "PyCell_getClockNets()"
2008-03-06 10:46:43 -06:00
static PyObject* PyCell_getClockNets(PyCell *self) {
cdebug_log(20,0) << "PyCell_getClockNets()" << endl;
2008-03-06 10:46:43 -06:00
METHOD_HEAD("Cell.getClockNets")
2008-03-06 10:46:43 -06:00
PyNetCollection* pyNetCollection = NULL;
2008-03-06 10:46:43 -06:00
HTRY
Nets* nets = new Nets(cell->getClockNets());
2008-03-06 10:46:43 -06:00
pyNetCollection = PyObject_NEW(PyNetCollection, &PyTypeNetCollection);
if (pyNetCollection == NULL) {
return NULL;
}
pyNetCollection->_object = nets;
2008-03-06 10:46:43 -06:00
HCATCH
return ((PyObject*)pyNetCollection);
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
// Attribute Method : "PyCell_getSupplyNets()"
2008-03-06 10:46:43 -06:00
static PyObject* PyCell_getSupplyNets(PyCell *self) {
cdebug_log(20,0) << "PyCell_getSupplyNets()" << endl;
2008-03-06 10:46:43 -06:00
METHOD_HEAD ( "Cell.getSupplyNets()" )
2008-03-06 10:46:43 -06:00
PyNetCollection* pyNetCollection = NULL;
2008-03-06 10:46:43 -06:00
HTRY
Nets* nets = new Nets(cell->getSupplyNets());
2008-03-06 10:46:43 -06:00
pyNetCollection = PyObject_NEW(PyNetCollection, &PyTypeNetCollection);
if (pyNetCollection == NULL) {
return NULL;
}
pyNetCollection->_object = nets;
2008-03-06 10:46:43 -06:00
HCATCH
return ((PyObject*)pyNetCollection);
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
// Attribute Method : "PyCell_getPowerNets()"
2008-03-06 10:46:43 -06:00
static PyObject* PyCell_getPowerNets(PyCell *self) {
cdebug_log(20,0) << "PyCell_getPowerNets()" << endl;
2008-03-06 10:46:43 -06:00
METHOD_HEAD ( "Cell.getPowerNets()" )
2008-03-06 10:46:43 -06:00
PyNetCollection* pyNetCollection = NULL;
2008-03-06 10:46:43 -06:00
HTRY
Nets* nets = new Nets(cell->getPowerNets());
2008-03-06 10:46:43 -06:00
pyNetCollection = PyObject_NEW(PyNetCollection, &PyTypeNetCollection);
if (pyNetCollection == NULL) {
return NULL;
}
pyNetCollection->_object = nets;
2008-03-06 10:46:43 -06:00
HCATCH
return ((PyObject*)pyNetCollection);
2008-03-06 10:46:43 -06:00
}
// ---------------------------------------------------------------
// Attribute Method : "PyCell_getGroundNets()"
2008-03-06 10:46:43 -06:00
static PyObject* PyCell_getGroundNets(PyCell *self) {
cdebug_log(20,0) << "PyCell_getGroundNets()" << endl;
2008-03-06 10:46:43 -06:00
METHOD_HEAD ( "Cell.getGroundNets()" )
2008-03-06 10:46:43 -06:00
PyNetCollection* pyNetCollection = NULL;
2008-03-06 10:46:43 -06:00
HTRY
Nets* nets = new Nets(cell->getGroundNets());
2008-03-06 10:46:43 -06:00
pyNetCollection = PyObject_NEW(PyNetCollection, &PyTypeNetCollection);
if (pyNetCollection == NULL) {
return NULL;
}
pyNetCollection->_object = nets;
2008-03-06 10:46:43 -06:00
HCATCH
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 ) {
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
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 ) {
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;
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;
}
// ---------------------------------------------------------------
// Attribute Method : "PyCell_uniquify ()"
static PyObject* PyCell_uniquify ( PyCell *self, PyObject* args ) {
cdebug_log(20,0) << "PyCell_uniquify ()" << endl;
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 ) {
cdebug_log(20,0) << "PyCell_getClone ()" << endl;
Cell* cloneCell = NULL;
HTRY
METHOD_HEAD( "Cell.getClone()" )
cloneCell = cell->getClone();
HCATCH
return PyCell_Link( cloneCell );
}
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[] =
{ { "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." }
, { "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
, { "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." }
, { "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." }
, { "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." }
, { "isRouted" , (PyCFunction)PyCell_isRouted , METH_NOARGS , "Returns true if the cell is flagged as routed." }
, { "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." }
, { "setRouted" , (PyCFunction)PyCell_setRouted , METH_VARARGS, "Sets the cell routed status." }
, { "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)." }
2008-03-22 08:18:26 -05:00
, { "destroy" , (PyCFunction)PyCell_destroy , METH_NOARGS
2008-03-17 08:54:33 -05:00
, "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
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.
DBoLinkCreateMethod(Cell)
PyTypeInheritedObjectDefinitions(Cell, Entity)
2008-03-06 10:46:43 -06:00
#endif // End of Shared Library Code Part.
} // End of extern "C".
} // End of Isobar namespace.