2013-03-13 08:38:15 -05:00
|
|
|
// -*- C++ -*-
|
|
|
|
//
|
|
|
|
// This file is part of the Coriolis Software.
|
2018-01-06 10:55:44 -06:00
|
|
|
// Copyright (c) UPMC 2013-2018, All Rights Reserved
|
2013-03-13 08:38:15 -05: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 |
|
|
|
|
// | =============================================================== |
|
|
|
|
// | C++ Module : "./isobar/PyRoutingPad.cpp" |
|
|
|
|
// +-----------------------------------------------------------------+
|
|
|
|
|
|
|
|
|
|
|
|
#include "hurricane/isobar/PyPoint.h"
|
|
|
|
#include "hurricane/isobar/PyNet.h"
|
|
|
|
#include "hurricane/isobar/PyLayer.h"
|
|
|
|
#include "hurricane/isobar/PyPin.h"
|
|
|
|
#include "hurricane/isobar/PyOccurrence.h"
|
|
|
|
#include "hurricane/isobar/PyRoutingPad.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace Isobar {
|
|
|
|
|
|
|
|
using namespace Hurricane;
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
|
|
|
|
#undef ACCESS_OBJECT
|
|
|
|
#undef ACCESS_CLASS
|
|
|
|
#define ACCESS_OBJECT _baseObject._baseObject._object
|
|
|
|
#define ACCESS_CLASS(_pyObject) &(_pyObject->_baseObject._baseObject)
|
|
|
|
#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(RoutingPad,rp,function)
|
|
|
|
|
|
|
|
|
|
|
|
// +=================================================================+
|
|
|
|
// | "PyRoutingPad" Python Module Code Part |
|
|
|
|
// +=================================================================+
|
|
|
|
|
|
|
|
# if defined(__PYTHON_MODULE__)
|
|
|
|
|
|
|
|
|
|
|
|
// x-------------------------------------------------------------x
|
|
|
|
// | "PyRoutingPad" Attribute Methods |
|
|
|
|
// x-------------------------------------------------------------x
|
|
|
|
|
|
|
|
|
|
|
|
DirectGetLongAttribute(PyRoutingPad_getX ,getX ,PyRoutingPad,RoutingPad)
|
|
|
|
DirectGetLongAttribute(PyRoutingPad_getY ,getY ,PyRoutingPad,RoutingPad)
|
|
|
|
DirectGetLongAttribute(PyRoutingPad_getSourceX ,getSourceX ,PyRoutingPad,RoutingPad)
|
|
|
|
DirectGetLongAttribute(PyRoutingPad_getSourceY ,getSourceY ,PyRoutingPad,RoutingPad)
|
|
|
|
DirectGetLongAttribute(PyRoutingPad_getTargetX ,getTargetX ,PyRoutingPad,RoutingPad)
|
|
|
|
DirectGetLongAttribute(PyRoutingPad_getTargetY ,getTargetY ,PyRoutingPad,RoutingPad)
|
Corrections in C-Python interface required by Analagic (CHAMS).
* Change: In Hurricane, in PyHurricane.h, in all DirectSet*() macros,
suppress the third parameter giving the function name. It is now
build from stringification of other parameters.
The various macros calls are also modificated all througout
Isobar.
Added PyAny_AsInt() to convert a Python Int or Long into an int.
Maybe we should manage only long, because the type difference seems
ambiguous in Python itself.
* Change: In Hurricane, in PyHurricane.h, in DirectGetBoolAttribute()
deduce the function name to display in messages from the arguments.
Idem for DirectIsAFromCStringAttribute(), DirectGetIntAttribute(),
DirectGetUIntAttribute(), DirectGetDoubleAttribute() and
DirectGetStringAttribute().
* New: In Hurricane, in PyHurricane.h, new macro DirectGetNameAttribute()
to build accessors for method returning a Name.
* New: In Hurricane, in PyHurricane.h, new macro DirectSetIntAttribute()
to build modificators taking int arguments.
* Bug: In Hurricane, in PyHurricane.h, in macro DirectSetBoolAttribute(),
the check for a boolean PyObject was wrong, leading the macro to
systematically emit a Python exception.
* Bug: In Hurricane, in PyInstance method table, PyLibrary_create() was
registered as a NOARGS function, but it *do* have arguments, change
to VARARGS.
2016-05-01 08:50:27 -05:00
|
|
|
//DirectSetLongAttribute(PyRoutingPad_setX ,setX ,PyRoutingPad,RoutingPad)
|
|
|
|
//DirectSetLongAttribute(PyRoutingPad_setY ,setY ,PyRoutingPad,RoutingPad)
|
2013-03-13 08:38:15 -05:00
|
|
|
|
|
|
|
// Standart destroy (Attribute).
|
|
|
|
DBoDestroyAttribute(PyRoutingPad_destroy, PyRoutingPad)
|
|
|
|
|
|
|
|
|
|
|
|
static PyObject* PyRoutingPad_create ( PyObject*, PyObject* args )
|
|
|
|
{
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(20,0) << "PyRoutingPad_create()" << endl;
|
2013-03-13 08:38:15 -05:00
|
|
|
|
|
|
|
PyObject* arg0 = NULL;
|
|
|
|
PyObject* arg1 = NULL;
|
|
|
|
PyObject* arg2 = NULL;
|
|
|
|
RoutingPad* rp = NULL;
|
|
|
|
|
|
|
|
HTRY
|
|
|
|
__cs.init ("RoutingPad.create");
|
|
|
|
if (not PyArg_ParseTuple(args,"O&|O&O&:RoutingPad.create"
|
|
|
|
,Converter,&arg0
|
|
|
|
,Converter,&arg1
|
|
|
|
,Converter,&arg2
|
|
|
|
)) {
|
|
|
|
PyErr_SetString( ConstructorError, "RoutingPad.create(): Invalid number/bad type of parameters." );
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( __cs.getObjectIds() == ":ent:occur:int" )
|
Correction in plugins to support msxlib compatible pads.
* New: In CRL Core, in helpers & alliance.conf, set and read a "PAD"
variable to define the pad model name extension ("px" for "sxlib
and "pxr" for vsxlib, this is provisional).
* New: In CRL Core, in plugin.conf, add parameters to define the name
of used for power & clock supply. We may remove the extention in
the future (to be more coherent with the previous modification).
* New: In Cumulus, in chip.Configuration.GaugeConf._rpAccess(), no
longer place the accessing contact *at the center* of the
RoutingPad. It works under sxlib because buffers & registers all
have same size terminals. But this is not true under vsxlib,
leading to misaligned contacts & wires. Now systematically place
on the slice midlle track (maybe with one pitch above or below).
This is still very weak as we do not check if the terminal
reach were the contact is being put. Has to be strenthened in
the future.
* New: In Cumulus, in chip.Configuration.ChipConf, read the new
clock & power pad parameters.
* Change: In Isobar (and all other Python wrappers), uses PyLong instead
of PyInt for DbU conversions. In PyHurricane argument converter,
automatically check for both PyLong and then PyInt.
* Change: In Cumulus, in chip.PadsCorona, more accurate error message
in case of discrepency in global net connections (i.e. no net
of the same name in instance model and instance model owner.
* Change: In Kite, in BuildPowerRails, when looking up at the pads
model name to find "pck_" or "pvddeck_", do not compare the
extension part. But we still use hard-coded stem pad names,
maybe we shouldn't.
* Bug: In Katabatic, in GCellConfiguration::_do_xG_xM1_xM3(), there
was a loop in the search of the best N/E initial RoutingPad.
* Bug: In Kite, in KiteEngine::protectRoutingPads(), *do not* protect
RoutingPads of fixed nets, they are already through the
BuildPowerRails stage (and it's causing scary overlap warning
messages).
* Bug: In Cumulus, in ClockTree.HTreeNode.addLeaf(), do not create
deep-plug when the core is flat (not sub-modules). All the new
nets are at core level.
* Bug: In Cumulus, in ChipPlugin.PlaceCore.doFloorplan(), ensure
that the core is aligned on the GCell grid (i.e. the slice
grid of the overall chip).
* Bug: In Kite, in GCellTopology::_do_xG_xM1_xM3(), infinite loop
while looking for the bigger N-E RoutingPad. Forgot to decrement
the index...
2014-09-13 10:45:30 -05:00
|
|
|
rp = RoutingPad::create( PYNET_O(arg0), *(PYOCCURRENCE_O(arg1)), PyAny_AsLong(arg2) );
|
2013-03-13 08:38:15 -05:00
|
|
|
else if ( __cs.getObjectIds() == ":pin" )
|
|
|
|
rp = RoutingPad::create( dynamic_cast<Pin*>(EntityCast(arg0)) );
|
|
|
|
else {
|
|
|
|
PyErr_SetString ( ConstructorError, "invalid number of parameters for RoutingPad constructor." );
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
HCATCH
|
|
|
|
|
|
|
|
return PyRoutingPad_Link( rp );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static PyObject* PyRoutingPad_getOccurrence ( PyRoutingPad *self )
|
|
|
|
{
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(20,0) << "PyRoutingPad_getOccurrence ()" << endl;
|
2013-03-13 08:38:15 -05:00
|
|
|
METHOD_HEAD( "Component.getOccurrence()" )
|
|
|
|
|
|
|
|
PyOccurrence* pyOccurrence = PyObject_NEW(PyOccurrence, &PyTypeOccurrence);
|
|
|
|
if (pyOccurrence == NULL) return NULL;
|
|
|
|
|
|
|
|
HTRY
|
|
|
|
pyOccurrence->_object = new Occurrence(rp->getOccurrence());
|
|
|
|
HCATCH
|
|
|
|
|
|
|
|
return (PyObject*)pyOccurrence;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static PyObject* PyRoutingPad_getPlugOccurrence ( PyRoutingPad *self )
|
|
|
|
{
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(20,0) << "PyRoutingPad_getPlugOccurrence ()" << endl;
|
2013-03-13 08:38:15 -05:00
|
|
|
METHOD_HEAD( "Component.getPlugOccurrence()" )
|
|
|
|
|
|
|
|
PyOccurrence* pyOccurrence = PyObject_NEW(PyOccurrence, &PyTypeOccurrence);
|
|
|
|
if (pyOccurrence == NULL) return NULL;
|
|
|
|
|
|
|
|
HTRY
|
|
|
|
pyOccurrence->_object = new Occurrence(rp->getPlugOccurrence());
|
|
|
|
HCATCH
|
|
|
|
|
|
|
|
return (PyObject*)pyOccurrence;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static PyObject* PyRoutingPad_getSourcePosition ( PyRoutingPad *self )
|
|
|
|
{
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(20,0) << "PyRoutingPad_getSourcePosition ()" << endl;
|
2013-03-13 08:38:15 -05:00
|
|
|
METHOD_HEAD( "Component.getSourcePosition()" )
|
|
|
|
|
|
|
|
PyPoint* pyPoint = PyObject_NEW( PyPoint, &PyTypePoint );
|
|
|
|
if (pyPoint == NULL) return NULL;
|
|
|
|
|
|
|
|
HTRY
|
|
|
|
pyPoint->_object = new Point( rp->getSourcePosition() );
|
|
|
|
HCATCH
|
|
|
|
|
|
|
|
return (PyObject*)pyPoint;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static PyObject* PyRoutingPad_getTargetPosition ( PyRoutingPad *self )
|
|
|
|
{
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(20,0) << "PyRoutingPad_getTargetPosition ()" << endl;
|
2013-03-13 08:38:15 -05:00
|
|
|
METHOD_HEAD( "Component.getTargetPosition()" )
|
|
|
|
|
|
|
|
PyPoint* pyPoint = PyObject_NEW( PyPoint, &PyTypePoint );
|
|
|
|
if (pyPoint == NULL) return NULL;
|
|
|
|
|
|
|
|
HTRY
|
|
|
|
pyPoint->_object = new Point( rp->getTargetPosition() );
|
|
|
|
HCATCH
|
|
|
|
|
|
|
|
return (PyObject*)pyPoint;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static PyObject* PyRoutingPad_translate ( PyRoutingPad *self, PyObject* args )
|
|
|
|
{
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(20,0) << "PyRoutingPad_translate ()" << endl;
|
2013-03-13 08:38:15 -05:00
|
|
|
|
|
|
|
HTRY
|
|
|
|
METHOD_HEAD ( "RoutingPad.translate()" )
|
2016-11-30 14:50:25 -06:00
|
|
|
PyObject* arg0 = NULL;
|
|
|
|
PyObject* arg1 = NULL;
|
|
|
|
__cs.init ("RoutingPad.translate");
|
|
|
|
if (PyArg_ParseTuple(args,"O&O&:RoutingPad.translate", Converter, &arg0, Converter, &arg1)) {
|
|
|
|
if (__cs.getObjectIds() == INTS2_ARG) rp->translate( PyAny_AsLong(arg0), PyAny_AsLong(arg1) );
|
|
|
|
else {
|
|
|
|
PyErr_SetString ( ConstructorError, "RoutingPad.translate(): Invalid type for parameter(s)." );
|
|
|
|
return NULL;
|
|
|
|
}
|
2013-03-13 08:38:15 -05:00
|
|
|
} else {
|
2016-11-30 14:50:25 -06:00
|
|
|
PyErr_SetString ( ConstructorError, "RoutingPad.translate(): Invalid number of parameters." );
|
2013-03-13 08:38:15 -05:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
HCATCH
|
|
|
|
|
|
|
|
Py_RETURN_NONE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 19:26:07 -06:00
|
|
|
#if THIS_IS_DEPRECATED
|
2013-03-13 08:38:15 -05:00
|
|
|
static PyObject* PyRoutingPad_setPosition ( PyRoutingPad *self, PyObject* args )
|
|
|
|
{
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(20,0) << "PyRoutingPad_setPosition ()" << endl;
|
2013-03-13 08:38:15 -05:00
|
|
|
|
|
|
|
HTRY
|
|
|
|
METHOD_HEAD ( "RoutingPad.setPosition()" )
|
|
|
|
PyObject* arg0 = NULL;
|
|
|
|
PyObject* arg1 = NULL;
|
|
|
|
|
|
|
|
__cs.init ("RoutingPad.setPosition");
|
|
|
|
if (not PyArg_ParseTuple(args,"O&|O&:RoutingPad.setPosition"
|
|
|
|
,Converter,&arg0
|
|
|
|
,Converter,&arg1
|
|
|
|
)) {
|
|
|
|
PyErr_SetString( ConstructorError, "RoutingPad.setPosition(): Invalid number/bad type of parameters." );
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( __cs.getObjectIds() == ":int:int" )
|
Correction in plugins to support msxlib compatible pads.
* New: In CRL Core, in helpers & alliance.conf, set and read a "PAD"
variable to define the pad model name extension ("px" for "sxlib
and "pxr" for vsxlib, this is provisional).
* New: In CRL Core, in plugin.conf, add parameters to define the name
of used for power & clock supply. We may remove the extention in
the future (to be more coherent with the previous modification).
* New: In Cumulus, in chip.Configuration.GaugeConf._rpAccess(), no
longer place the accessing contact *at the center* of the
RoutingPad. It works under sxlib because buffers & registers all
have same size terminals. But this is not true under vsxlib,
leading to misaligned contacts & wires. Now systematically place
on the slice midlle track (maybe with one pitch above or below).
This is still very weak as we do not check if the terminal
reach were the contact is being put. Has to be strenthened in
the future.
* New: In Cumulus, in chip.Configuration.ChipConf, read the new
clock & power pad parameters.
* Change: In Isobar (and all other Python wrappers), uses PyLong instead
of PyInt for DbU conversions. In PyHurricane argument converter,
automatically check for both PyLong and then PyInt.
* Change: In Cumulus, in chip.PadsCorona, more accurate error message
in case of discrepency in global net connections (i.e. no net
of the same name in instance model and instance model owner.
* Change: In Kite, in BuildPowerRails, when looking up at the pads
model name to find "pck_" or "pvddeck_", do not compare the
extension part. But we still use hard-coded stem pad names,
maybe we shouldn't.
* Bug: In Katabatic, in GCellConfiguration::_do_xG_xM1_xM3(), there
was a loop in the search of the best N/E initial RoutingPad.
* Bug: In Kite, in KiteEngine::protectRoutingPads(), *do not* protect
RoutingPads of fixed nets, they are already through the
BuildPowerRails stage (and it's causing scary overlap warning
messages).
* Bug: In Cumulus, in ClockTree.HTreeNode.addLeaf(), do not create
deep-plug when the core is flat (not sub-modules). All the new
nets are at core level.
* Bug: In Cumulus, in ChipPlugin.PlaceCore.doFloorplan(), ensure
that the core is aligned on the GCell grid (i.e. the slice
grid of the overall chip).
* Bug: In Kite, in GCellTopology::_do_xG_xM1_xM3(), infinite loop
while looking for the bigger N-E RoutingPad. Forgot to decrement
the index...
2014-09-13 10:45:30 -05:00
|
|
|
rp->setPosition( PyAny_AsLong(arg0), PyAny_AsLong(arg1) );
|
2013-03-13 08:38:15 -05:00
|
|
|
else if ( __cs.getObjectIds() == ":point" )
|
|
|
|
rp->setPosition( *PYPOINT_O(arg0) );
|
|
|
|
else {
|
|
|
|
PyErr_SetString ( ConstructorError, "RoutingPad.setPosition(): Invalid parameters types." );
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
HCATCH
|
|
|
|
|
|
|
|
Py_RETURN_NONE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static PyObject* PyRoutingPad_setOffset ( PyRoutingPad *self, PyObject* args )
|
|
|
|
{
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(20,0) << "PyRoutingPad_setOffset ()" << endl;
|
2013-03-13 08:38:15 -05:00
|
|
|
|
|
|
|
HTRY
|
|
|
|
METHOD_HEAD ( "RoutingPad.setOffset()" )
|
2016-11-30 14:50:25 -06:00
|
|
|
PyObject* arg0 = NULL;
|
|
|
|
PyObject* arg1 = NULL;
|
|
|
|
__cs.init ("RoutingPad.setOffset");
|
|
|
|
if (PyArg_ParseTuple(args,"O&O&:RoutingPad.setOffset", Converter, &arg0, Converter, &arg1)) {
|
|
|
|
if (__cs.getObjectIds() == INTS2_ARG) rp->setOffset( PyAny_AsLong(arg0), PyAny_AsLong(arg1) );
|
|
|
|
else {
|
|
|
|
PyErr_SetString ( ConstructorError, "RoutingPad.setOffset(): Invalid type for parameter(s)." );
|
|
|
|
return NULL;
|
|
|
|
}
|
2013-03-13 08:38:15 -05:00
|
|
|
} else {
|
2016-11-30 14:50:25 -06:00
|
|
|
PyErr_SetString ( ConstructorError, "RoutingPad.setOffset(): Invalid number of parameters." );
|
2013-03-13 08:38:15 -05:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
HCATCH
|
|
|
|
|
|
|
|
Py_RETURN_NONE;
|
|
|
|
}
|
2013-12-03 19:26:07 -06:00
|
|
|
#endif
|
2013-03-13 08:38:15 -05:00
|
|
|
|
|
|
|
|
|
|
|
static PyObject* PyRoutingPad_setExternalComponent ( PyRoutingPad *self, PyObject* args )
|
|
|
|
{
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(20,0) << "PyRoutingPad_setExternalComponent ()" << endl;
|
2013-03-13 08:38:15 -05:00
|
|
|
|
|
|
|
HTRY
|
|
|
|
METHOD_HEAD ( "RoutingPad.setExternalComponent()" )
|
|
|
|
PyObject* pyComponent = NULL;
|
|
|
|
if (PyArg_ParseTuple(args,"O:RoutingPad.setExternalComponent", &pyComponent)) {
|
|
|
|
if (not IsPyComponent(pyComponent)) {
|
|
|
|
PyErr_SetString( ConstructorError, "RoutingPad.setExternalComponent(): Argument is not of type Component." );
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
rp->setExternalComponent( PYCOMPONENT_O(pyComponent) );
|
|
|
|
} else {
|
|
|
|
PyErr_SetString( ConstructorError, "RoutingPad.setExternalComponent(): Invalid number/bad type of parameters." );
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
HCATCH
|
|
|
|
|
|
|
|
Py_RETURN_NONE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static PyObject* PyRoutingPad_setOnBestComponent ( PyRoutingPad *self, PyObject* args )
|
|
|
|
{
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(20,0) << "PyRoutingPad_setOnBestComponent ()" << endl;
|
2013-03-13 08:38:15 -05:00
|
|
|
|
|
|
|
Component* selected = NULL;
|
|
|
|
|
|
|
|
HTRY
|
|
|
|
METHOD_HEAD ( "RoutingPad.setOnBestComponent()" )
|
|
|
|
unsigned int flags = 0;
|
|
|
|
if (PyArg_ParseTuple(args,"I:RoutingPad.setOnBestComponent", &flags)) {
|
|
|
|
selected = rp->setOnBestComponent( flags );
|
|
|
|
} else {
|
|
|
|
PyErr_SetString( ConstructorError, "RoutingPad.setOnBestComponent(): Invalid number/bad type of parameters." );
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
HCATCH
|
|
|
|
|
|
|
|
return PyEntity_NEW(selected);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static PyObject* PyRoutingPad_restorePlugOccurrence ( PyRoutingPad *self, PyObject* args )
|
|
|
|
{
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(20,0) << "PyRoutingPad_restorePlugOccurrence ()" << endl;
|
2013-03-13 08:38:15 -05:00
|
|
|
|
|
|
|
HTRY
|
|
|
|
METHOD_HEAD ( "RoutingPad.restorePlugOccurrence()" )
|
|
|
|
rp->restorePlugOccurrence();
|
|
|
|
HCATCH
|
|
|
|
|
|
|
|
Py_RETURN_NONE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------
|
|
|
|
// PyRoutingPad Attribute Method table.
|
|
|
|
|
|
|
|
PyMethodDef PyRoutingPad_Methods[] =
|
|
|
|
{ { "create" , (PyCFunction)PyRoutingPad_create , METH_VARARGS|METH_STATIC
|
|
|
|
, "Create a RoutingPad." }
|
|
|
|
, { "getOccurrence" , (PyCFunction)PyRoutingPad_getOccurrence , METH_NOARGS , "Get the RoutingPad occurrence (may be a component)." }
|
|
|
|
, { "getPlugOccurrence" , (PyCFunction)PyRoutingPad_getPlugOccurrence , METH_NOARGS , "Get the RoutingPad plug occurrence." }
|
|
|
|
, { "getX" , (PyCFunction)PyRoutingPad_getX , METH_NOARGS , "Get the RoutingPad X position." }
|
|
|
|
, { "getY" , (PyCFunction)PyRoutingPad_getY , METH_NOARGS , "Get the RoutingPad Y position." }
|
|
|
|
, { "getSourcePosition" , (PyCFunction)PyRoutingPad_getSourcePosition , METH_NOARGS , "Get the RoutingPad source position." }
|
|
|
|
, { "getTargetPosition" , (PyCFunction)PyRoutingPad_getTargetPosition , METH_NOARGS , "Get the RoutingPad target position." }
|
|
|
|
, { "getSourceX" , (PyCFunction)PyRoutingPad_getSourceX , METH_NOARGS , "Get the RoutingPad source X position." }
|
|
|
|
, { "getSourceY" , (PyCFunction)PyRoutingPad_getSourceY , METH_NOARGS , "Get the RoutingPad source Y position." }
|
|
|
|
, { "getTargetX" , (PyCFunction)PyRoutingPad_getTargetX , METH_NOARGS , "Get the RoutingPad target X position." }
|
|
|
|
, { "getTargetY" , (PyCFunction)PyRoutingPad_getTargetY , METH_NOARGS , "Get the RoutingPad target Y position." }
|
|
|
|
, { "translate" , (PyCFunction)PyRoutingPad_translate , METH_VARARGS, "Translates the RoutingPad segment of dx and dy." }
|
2013-12-03 19:26:07 -06:00
|
|
|
// , { "setX" , (PyCFunction)PyRoutingPad_setX , METH_VARARGS, "Modify the RoutingPad X position." }
|
|
|
|
// , { "setY" , (PyCFunction)PyRoutingPad_setY , METH_VARARGS, "Modify the RoutingPad Y position." }
|
|
|
|
// , { "setPosition" , (PyCFunction)PyRoutingPad_setPosition , METH_VARARGS, "Sets the RoutingPad absolute position." }
|
|
|
|
// , { "setOffset" , (PyCFunction)PyRoutingPad_setOffset , METH_VARARGS, "Sets the RoutingPad relative position." }
|
2013-03-13 08:38:15 -05:00
|
|
|
, { "setExternalComponent" , (PyCFunction)PyRoutingPad_setExternalComponent , METH_VARARGS, "Sets the RoutingPad on an master net external component." }
|
|
|
|
, { "setOnBestComponent" , (PyCFunction)PyRoutingPad_setOnBestComponent , METH_VARARGS, "Sets the RoutingPad on master net best external component." }
|
|
|
|
, { "restorePlugOccurrence", (PyCFunction)PyRoutingPad_restorePlugOccurrence, METH_VARARGS, "Revert back from an external component to the plug." }
|
|
|
|
, { "destroy" , (PyCFunction)PyRoutingPad_destroy , METH_NOARGS
|
|
|
|
, "destroy associated hurricane object, the python object remains." }
|
2013-12-03 19:26:07 -06:00
|
|
|
, {NULL, NULL, 0, NULL} /* sentinel */
|
2013-03-13 08:38:15 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// x-------------------------------------------------------------x
|
|
|
|
// | "PyRoutingPad" Object Methods |
|
|
|
|
// x-------------------------------------------------------------x
|
|
|
|
|
|
|
|
|
|
|
|
DBoDeleteMethod(RoutingPad)
|
|
|
|
PyTypeObjectLinkPyType(RoutingPad)
|
|
|
|
|
|
|
|
|
|
|
|
#else // End of Python Module Code Part.
|
|
|
|
|
|
|
|
|
|
|
|
// x=================================================================x
|
|
|
|
// | "PyRoutingPad" Shared Library Code Part |
|
|
|
|
// x=================================================================x
|
|
|
|
|
|
|
|
|
|
|
|
// Link/Creation Method.
|
|
|
|
DBoLinkCreateMethod(RoutingPad)
|
|
|
|
|
|
|
|
|
|
|
|
PyTypeInheritedObjectDefinitions(RoutingPad, Component)
|
|
|
|
|
|
|
|
|
|
|
|
static void RoutingPadLoadConstants ( PyObject* dictionnary ) {
|
|
|
|
PyObject* constant;
|
|
|
|
|
|
|
|
LoadObjectConstant( dictionnary, RoutingPad::BiggestArea , "BiggestArea" )
|
|
|
|
LoadObjectConstant( dictionnary, RoutingPad::HighestLayer , "HighestLayer" )
|
|
|
|
LoadObjectConstant( dictionnary, RoutingPad::LowestLayer , "LowestLayer" )
|
|
|
|
LoadObjectConstant( dictionnary, RoutingPad::ComponentSelection, "ComponentSelection" )
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
extern void PyRoutingPad_postModuleInit ()
|
|
|
|
{
|
|
|
|
RoutingPadLoadConstants(PyTypeRoutingPad.tp_dict);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // End of Shared Library Code Part.
|
|
|
|
|
|
|
|
|
|
|
|
} // extern "C".
|
|
|
|
|
|
|
|
|
|
|
|
} // Isobar namespace.
|
|
|
|
|