2017-05-11 10:26:56 -05:00
|
|
|
// -*- C++ -*-
|
|
|
|
//
|
|
|
|
// This file is part of the Coriolis Software.
|
2018-01-06 10:55:44 -06:00
|
|
|
// Copyright (c) UPMC 2017-2018, All Rights Reserved
|
2017-05-11 10:26:56 -05:00
|
|
|
//
|
|
|
|
// +-----------------------------------------------------------------+
|
|
|
|
// | C O R I O L I S |
|
|
|
|
// | K i t e - D e t a i l e d R o u t e r |
|
|
|
|
// | |
|
|
|
|
// | Author : Jean-Paul CHAPUT |
|
|
|
|
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
|
|
|
// | =============================================================== |
|
|
|
|
// | C++ Module : "./PyKatanaFlags.cpp" |
|
|
|
|
// +-----------------------------------------------------------------+
|
|
|
|
|
|
|
|
|
|
|
|
#include "katana/PyKatanaFlags.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace Katana {
|
|
|
|
|
|
|
|
using std::cerr;
|
|
|
|
using std::endl;
|
|
|
|
using std::hex;
|
|
|
|
using std::ostringstream;
|
|
|
|
using Hurricane::tab;
|
|
|
|
using Hurricane::Error;
|
|
|
|
using Hurricane::Warning;
|
|
|
|
using Isobar::ProxyProperty;
|
|
|
|
using Isobar::ProxyError;
|
|
|
|
using Isobar::ConstructorError;
|
|
|
|
using Isobar::HurricaneError;
|
|
|
|
using Isobar::HurricaneWarning;
|
|
|
|
using Isobar::ParseOneArg;
|
|
|
|
using Isobar::ParseTwoArg;
|
|
|
|
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
|
|
|
|
|
|
|
|
#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Flags,flags,function)
|
|
|
|
|
|
|
|
|
|
|
|
// +=================================================================+
|
|
|
|
// | "PyKatanaFlags" Python Module Code Part |
|
|
|
|
// +=================================================================+
|
|
|
|
|
|
|
|
#if defined(__PYTHON_MODULE__)
|
|
|
|
|
|
|
|
|
|
|
|
// Standart Accessors (Attributes).
|
|
|
|
|
|
|
|
|
|
|
|
// Standart Destroy (Attribute).
|
|
|
|
// DBoDestroyAttribute(PyKatanaFlags_destroy,PyKatanaFlags)
|
|
|
|
|
|
|
|
|
|
|
|
PyMethodDef PyKatanaFlags_Methods[] =
|
|
|
|
{ {NULL, NULL, 0, NULL} /* sentinel */
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
PythonOnlyDeleteMethod(KatanaFlags)
|
|
|
|
DirectReprMethod(PyKatanaFlags_Repr, PyKatanaFlags, Katana::Flags)
|
|
|
|
DirectStrMethod (PyKatanaFlags_Str, PyKatanaFlags, Katana::Flags)
|
|
|
|
DirectCmpMethod (PyKatanaFlags_Cmp, IsPyKatanaFlags, PyKatanaFlags)
|
|
|
|
DirectHashMethod(PyKatanaFlags_Hash, PyKatanaFlags)
|
|
|
|
|
|
|
|
extern void PyKatanaFlags_LinkPyType() {
|
|
|
|
cdebug_log(20,0) << "PyKatanaFlags_LinkType()" << endl;
|
|
|
|
PyTypeKatanaFlags.tp_dealloc = (destructor) PyKatanaFlags_DeAlloc;
|
|
|
|
PyTypeKatanaFlags.tp_compare = (cmpfunc) PyKatanaFlags_Cmp;
|
|
|
|
PyTypeKatanaFlags.tp_repr = (reprfunc) PyKatanaFlags_Repr;
|
|
|
|
PyTypeKatanaFlags.tp_str = (reprfunc) PyKatanaFlags_Str;
|
|
|
|
PyTypeKatanaFlags.tp_hash = (hashfunc) PyKatanaFlags_Hash;
|
|
|
|
PyTypeKatanaFlags.tp_methods = PyKatanaFlags_Methods;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#else // End of Python Module Code Part.
|
|
|
|
|
|
|
|
|
|
|
|
// +=================================================================+
|
|
|
|
// | "PyKatanaFlags" Shared Library Code Part |
|
|
|
|
// +=================================================================+
|
|
|
|
|
|
|
|
// Link/Creation Method.
|
|
|
|
PyTypeObjectDefinitions(KatanaFlags)
|
|
|
|
|
|
|
|
|
|
|
|
extern void PyKatanaFlags_postModuleInit ()
|
|
|
|
{
|
|
|
|
PyObject* constant;
|
|
|
|
|
Added analog type on segment NetRoutingProperty.
* New: In Anabatic_AutoSegments collection, added a Flag to the constructors
to allow different behavior between digital and analog modes.
For "Aligneds" and "Perpandiculars" collections, now manage a new
Flag WithDoglegs to follow aligned globals through local doglegs
(for analog nets).
Adjust the log level of collections to 144 (formerly 145).
* New: In Anabatic::AutoSegment, new flag SegAnalog for segments that are
part of an analog net.
Note that with this flag, we reach the 32 bits limit...
* Change: In Anabatic::Constants, Flags are now declared as BaseFlags
objects and *not* uint64_t. This avoids overload resolution problems with
arithmetical overload of the operators.
The BaseFlags/Flags types are now completly "isolated" from the
uint64_t, it has the advantage of showing where unwanted previous implicit
conversions where occuring.
* Change: In Katana::Constants, Flags values are now of BaseFlags type instead
of uint64_t.
* Change: In Anabatic::Dijkstra, lots of log cleanup.
* Change: In Anabatic::GCell::getSide(), make the "shrink" parameter visible
to allow to substract the topmost and rightmost track for axis span
computation in AutoSegment::computeOptimal(). Used for analog mode.
* Change: In NetRoutingState, added a flag for analog mode. Use uint32_t
for the flags type.
* New: In Isobar, export the NetRoutingState and NetRoutingExtension objects.
2017-05-20 05:33:12 -05:00
|
|
|
LoadObjectConstant(PyTypeKatanaFlags.tp_dict,(uint64_t)Katana::Flags::NoFlags ,"NoFlags" );
|
|
|
|
LoadObjectConstant(PyTypeKatanaFlags.tp_dict,(uint64_t)Katana::Flags::SlowMotion ,"SlowMotion" );
|
|
|
|
LoadObjectConstant(PyTypeKatanaFlags.tp_dict,(uint64_t)Katana::Flags::PreRoutedStage,"PreRoutedStage");
|
2017-05-26 06:32:30 -05:00
|
|
|
LoadObjectConstant(PyTypeKatanaFlags.tp_dict,(uint64_t)Katana::Flags::PairSymmetrics,"PairSymmetrics");
|
2017-05-11 10:26:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif // Shared Library Code Part.
|
|
|
|
|
|
|
|
} // extern "C".
|
|
|
|
|
|
|
|
} // Katana namespace.
|
|
|
|
|