Minor adjustements for analog device checker (test of AMS c35b4).
* Change: In CRL::GdsStream, no longer export empty Cells as structures, to avoid empty cells in Cadence. To prevent meta-transistors to be exported as real physical objects. Also put a hard-coded test to prevent exporting "control_r" model which is made of AMS standard cells for "amsOTA". * Change: In CRL/PyRoutingGauge, export the isHV() and isVH() methods so the Stack can access it. * Change: In Hurricane/PyCellViewer, export the removeHistory() method. When a Cell is deleted, it must be also removed from the editor history. This should be take care of automatically, but for now we make it manually through scripts. * Bug: In Anabatic::NetBuilder::doRp_accessAnalog(), the gauge offset was not taken into account when creating initial Contact on RoutingPad. The program self corrected afterwards, but with the display of a disgraceful message. * Change: In Anabatic::Configuration and Session, export the gauge offsets.
This commit is contained in:
parent
152276ddbb
commit
b53511ea83
|
@ -984,7 +984,7 @@ namespace Anabatic {
|
||||||
if (gaugeKind < 3) {
|
if (gaugeKind < 3) {
|
||||||
for ( Net* net : getCell()->getNets() ) {
|
for ( Net* net : getCell()->getNets() ) {
|
||||||
if (NetRoutingExtension::isShortNet(net)) {
|
if (NetRoutingExtension::isShortNet(net)) {
|
||||||
AutoSegment::setShortNetMode( true );
|
//AutoSegment::setShortNetMode( true );
|
||||||
++shortNets;
|
++shortNets;
|
||||||
}
|
}
|
||||||
if (NetRoutingExtension::isAutomaticGlobalRoute(net)) {
|
if (NetRoutingExtension::isAutomaticGlobalRoute(net)) {
|
||||||
|
|
|
@ -829,23 +829,26 @@ namespace Anabatic {
|
||||||
size_t rpDepth = Session::getLayerDepth( rpLayer );
|
size_t rpDepth = Session::getLayerDepth( rpLayer );
|
||||||
DbU::Unit viaSide = Session::getViaWidth ( rpDepth );
|
DbU::Unit viaSide = Session::getViaWidth ( rpDepth );
|
||||||
Point position = rp->getCenter();
|
Point position = rp->getCenter();
|
||||||
Point onGrid = Session::getNearestGridPoint( position, gcell->getConstraintBox() );
|
position.translate( -Session::getDVerticalOffset(), -Session::getDHorizontalOffset() );
|
||||||
|
|
||||||
AutoContact* contact = AutoContactTerminal::create( gcell, rp, rpLayer, position, viaSide, viaSide );
|
Point onGrid = Session::getNearestGridPoint( position, gcell->getConstraintBox() );
|
||||||
|
AutoContact* contact = AutoContactTerminal::create( gcell, rp, rpLayer, position, viaSide, viaSide );
|
||||||
|
|
||||||
if (position != onGrid) {
|
if (position != onGrid) {
|
||||||
cerr << Bug( "NetBuilder::doRp_AccessAnalog(): RoutingPad is not under any grid point.\n"
|
cerr << Bug( "NetBuilder::doRp_AccessAnalog(): RoutingPad is not under any grid point.\n"
|
||||||
" %s\n"
|
" %s\n"
|
||||||
" Using nearest grid point: %s"
|
" %s shifted to nearest grid point %s"
|
||||||
, getString(rp).c_str()
|
, getString(rp).c_str()
|
||||||
|
, getString(position).c_str()
|
||||||
, getString(onGrid).c_str()
|
, getString(onGrid).c_str()
|
||||||
) << endl;
|
) << endl;
|
||||||
contact->forceOnGrid( onGrid );
|
contact->forceOnGrid( onGrid );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rpDepth != 1) {
|
if (rpDepth != Session::getDHorizontalDepth()) {
|
||||||
cerr << Bug( "NetBuilder::doRp_AccessAnalog(): RoutingPad must be in METAL2 layer.\n"
|
cerr << Bug( "NetBuilder::doRp_AccessAnalog(): RoutingPad must be in %s layer.\n"
|
||||||
" %s"
|
" %s"
|
||||||
|
, getString(Session::getDHorizontalLayer()->getName()).c_str()
|
||||||
, getString(rp).c_str()
|
, getString(rp).c_str()
|
||||||
) << endl;
|
) << endl;
|
||||||
}
|
}
|
||||||
|
|
|
@ -363,6 +363,7 @@ namespace Anabatic {
|
||||||
, ab.getXMax()
|
, ab.getXMax()
|
||||||
, p.getX()
|
, p.getX()
|
||||||
, Constant::Nearest ) );
|
, Constant::Nearest ) );
|
||||||
|
|
||||||
if (x < constraint.getXMin()) x += lg->getPitch();
|
if (x < constraint.getXMin()) x += lg->getPitch();
|
||||||
if (x > constraint.getXMax()) x -= lg->getPitch();
|
if (x > constraint.getXMax()) x -= lg->getPitch();
|
||||||
|
|
||||||
|
|
|
@ -59,75 +59,77 @@ namespace Anabatic {
|
||||||
static const size_t ndepth = (size_t)-1;
|
static const size_t ndepth = (size_t)-1;
|
||||||
public:
|
public:
|
||||||
// Constructor & Destructor.
|
// Constructor & Destructor.
|
||||||
Configuration ( const CellGauge* cg=NULL, const RoutingGauge* rg=NULL );
|
Configuration ( const CellGauge* cg=NULL, const RoutingGauge* rg=NULL );
|
||||||
Configuration ( const Configuration& );
|
Configuration ( const Configuration& );
|
||||||
virtual ~Configuration ();
|
virtual ~Configuration ();
|
||||||
virtual Configuration* clone () const;
|
virtual Configuration* clone () const;
|
||||||
// Methods.
|
// Methods.
|
||||||
bool isGMetal ( const Layer* ) const;
|
bool isGMetal ( const Layer* ) const;
|
||||||
bool isGContact ( const Layer* ) const;
|
bool isGContact ( const Layer* ) const;
|
||||||
bool isTwoMetals () const;
|
bool isTwoMetals () const;
|
||||||
bool isHV () const;
|
bool isHV () const;
|
||||||
bool isVH () const;
|
bool isVH () const;
|
||||||
const Layer* getGContactLayer () const;
|
const Layer* getGContactLayer () const;
|
||||||
const Layer* getGHorizontalLayer () const;
|
const Layer* getGHorizontalLayer () const;
|
||||||
const Layer* getGVerticalLayer () const;
|
const Layer* getGVerticalLayer () const;
|
||||||
inline size_t getGVerticalDepth () const;
|
inline size_t getGVerticalDepth () const;
|
||||||
inline DbU::Unit getGVerticalPitch () const;
|
inline DbU::Unit getGVerticalPitch () const;
|
||||||
inline size_t getGHorizontalDepth () const;
|
inline size_t getGHorizontalDepth () const;
|
||||||
inline DbU::Unit getGHorizontalPitch () const;
|
inline DbU::Unit getGHorizontalPitch () const;
|
||||||
inline size_t getDVerticalDepth () const;
|
inline size_t getDVerticalDepth () const;
|
||||||
inline const Layer* getDVerticalLayer () const;
|
inline const Layer* getDVerticalLayer () const;
|
||||||
inline DbU::Unit getDVerticalWidth () const;
|
inline DbU::Unit getDVerticalWidth () const;
|
||||||
inline DbU::Unit getDVerticalPitch () const;
|
inline DbU::Unit getDVerticalPitch () const;
|
||||||
inline size_t getDHorizontalDepth () const;
|
inline DbU::Unit getDVerticalOffset () const;
|
||||||
inline const Layer* getDHorizontalLayer () const;
|
inline size_t getDHorizontalDepth () const;
|
||||||
inline DbU::Unit getDHorizontalWidth () const;
|
inline const Layer* getDHorizontalLayer () const;
|
||||||
inline DbU::Unit getDHorizontalPitch () const;
|
inline DbU::Unit getDHorizontalWidth () const;
|
||||||
inline size_t getDContactDepth () const;
|
inline DbU::Unit getDHorizontalPitch () const;
|
||||||
inline const Layer* getDContactLayer () const;
|
inline DbU::Unit getDHorizontalOffset () const;
|
||||||
inline DbU::Unit getDContactWidth () const;
|
inline size_t getDContactDepth () const;
|
||||||
inline DbU::Unit getDContactPitch () const;
|
inline const Layer* getDContactLayer () const;
|
||||||
size_t getDepth () const;
|
inline DbU::Unit getDContactWidth () const;
|
||||||
size_t getAllowedDepth () const;
|
inline DbU::Unit getDContactPitch () const;
|
||||||
size_t getLayerDepth ( const Layer* ) const;
|
size_t getDepth () const;
|
||||||
CellGauge* getCellGauge () const;
|
size_t getAllowedDepth () const;
|
||||||
RoutingGauge* getRoutingGauge () const;
|
size_t getLayerDepth ( const Layer* ) const;
|
||||||
RoutingLayerGauge* getLayerGauge ( size_t depth ) const;
|
CellGauge* getCellGauge () const;
|
||||||
const Layer* getRoutingLayer ( size_t depth ) const;
|
RoutingGauge* getRoutingGauge () const;
|
||||||
Layer* getContactLayer ( size_t depth ) const;
|
RoutingLayerGauge* getLayerGauge ( size_t depth ) const;
|
||||||
DbU::Unit getSliceHeight () const;
|
const Layer* getRoutingLayer ( size_t depth ) const;
|
||||||
DbU::Unit getSliceStep () const;
|
Layer* getContactLayer ( size_t depth ) const;
|
||||||
DbU::Unit getPitch ( size_t depth, Flags flags ) const;
|
DbU::Unit getSliceHeight () const;
|
||||||
DbU::Unit getOffset ( size_t depth ) const;
|
DbU::Unit getSliceStep () const;
|
||||||
DbU::Unit getWireWidth ( size_t depth ) const;
|
DbU::Unit getPitch ( size_t depth, Flags flags ) const;
|
||||||
DbU::Unit getExtensionCap ( size_t depth ) const;
|
DbU::Unit getOffset ( size_t depth ) const;
|
||||||
Flags getDirection ( size_t depth ) const;
|
DbU::Unit getWireWidth ( size_t depth ) const;
|
||||||
DbU::Unit getPitch ( const Layer*, Flags flags ) const;
|
DbU::Unit getExtensionCap ( size_t depth ) const;
|
||||||
DbU::Unit getOffset ( const Layer* ) const;
|
Flags getDirection ( size_t depth ) const;
|
||||||
DbU::Unit getWireWidth ( const Layer* ) const;
|
DbU::Unit getPitch ( const Layer*, Flags flags ) const;
|
||||||
DbU::Unit getExtensionCap ( const Layer* ) const;
|
DbU::Unit getOffset ( const Layer* ) const;
|
||||||
Flags getDirection ( const Layer* ) const;
|
DbU::Unit getWireWidth ( const Layer* ) const;
|
||||||
float getSaturateRatio () const;
|
DbU::Unit getExtensionCap ( const Layer* ) const;
|
||||||
size_t getSaturateRp () const;
|
Flags getDirection ( const Layer* ) const;
|
||||||
DbU::Unit getGlobalThreshold () const;
|
float getSaturateRatio () const;
|
||||||
void setAllowedDepth ( size_t );
|
size_t getSaturateRp () const;
|
||||||
void setSaturateRatio ( float );
|
DbU::Unit getGlobalThreshold () const;
|
||||||
void setSaturateRp ( size_t );
|
void setAllowedDepth ( size_t );
|
||||||
void setGlobalThreshold ( DbU::Unit );
|
void setSaturateRatio ( float );
|
||||||
DbU::Unit getEdgeLength () const;
|
void setSaturateRp ( size_t );
|
||||||
DbU::Unit getEdgeWidth () const;
|
void setGlobalThreshold ( DbU::Unit );
|
||||||
float getEdgeCostH () const;
|
DbU::Unit getEdgeLength () const;
|
||||||
float getEdgeCostK () const;
|
DbU::Unit getEdgeWidth () const;
|
||||||
float getEdgeHInc () const;
|
float getEdgeCostH () const;
|
||||||
float getEdgeHScaling () const;
|
float getEdgeCostK () const;
|
||||||
int getGlobalIterations () const;
|
float getEdgeHInc () const;
|
||||||
DbU::Unit isOnRoutingGrid ( RoutingPad* ) const;
|
float getEdgeHScaling () const;
|
||||||
bool selectRpComponent ( RoutingPad* ) const;
|
int getGlobalIterations () const;
|
||||||
virtual void print ( Cell* ) const;
|
DbU::Unit isOnRoutingGrid ( RoutingPad* ) const;
|
||||||
virtual Record* _getRecord () const;
|
bool selectRpComponent ( RoutingPad* ) const;
|
||||||
virtual string _getString () const;
|
virtual void print ( Cell* ) const;
|
||||||
virtual string _getTypeName () const;
|
virtual Record* _getRecord () const;
|
||||||
|
virtual string _getString () const;
|
||||||
|
virtual string _getTypeName () const;
|
||||||
protected:
|
protected:
|
||||||
// Attributes.
|
// Attributes.
|
||||||
const Layer* _gmetalh;
|
const Layer* _gmetalh;
|
||||||
|
@ -158,22 +160,24 @@ namespace Anabatic {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
inline size_t Configuration::getGHorizontalDepth () const { return _gdepthh; }
|
inline size_t Configuration::getGHorizontalDepth () const { return _gdepthh; }
|
||||||
inline size_t Configuration::getGVerticalDepth () const { return _gdepthv; }
|
inline size_t Configuration::getGVerticalDepth () const { return _gdepthv; }
|
||||||
inline DbU::Unit Configuration::getGHorizontalPitch () const { return getPitch( getGHorizontalDepth(), Flags::NoFlags ); }
|
inline DbU::Unit Configuration::getGHorizontalPitch () const { return getPitch( getGHorizontalDepth(), Flags::NoFlags ); }
|
||||||
inline DbU::Unit Configuration::getGVerticalPitch () const { return getPitch( getGVerticalDepth (), Flags::NoFlags ); }
|
inline DbU::Unit Configuration::getGVerticalPitch () const { return getPitch( getGVerticalDepth (), Flags::NoFlags ); }
|
||||||
inline size_t Configuration::getDVerticalDepth () const { return _ddepthv; }
|
inline size_t Configuration::getDVerticalDepth () const { return _ddepthv; }
|
||||||
inline const Layer* Configuration::getDVerticalLayer () const { return getRoutingLayer( getDVerticalDepth() ); }
|
inline const Layer* Configuration::getDVerticalLayer () const { return getRoutingLayer( getDVerticalDepth() ); }
|
||||||
inline DbU::Unit Configuration::getDVerticalWidth () const { return getWireWidth ( getDVerticalDepth() ); }
|
inline DbU::Unit Configuration::getDVerticalWidth () const { return getWireWidth ( getDVerticalDepth() ); }
|
||||||
inline DbU::Unit Configuration::getDVerticalPitch () const { return getPitch ( getDVerticalDepth(), Flags::NoFlags ); }
|
inline DbU::Unit Configuration::getDVerticalPitch () const { return getPitch ( getDVerticalDepth(), Flags::NoFlags ); }
|
||||||
inline size_t Configuration::getDHorizontalDepth () const { return _ddepthh; }
|
inline DbU::Unit Configuration::getDVerticalOffset () const { return getOffset ( getDVerticalDepth() ); }
|
||||||
inline const Layer* Configuration::getDHorizontalLayer () const { return getRoutingLayer( getDHorizontalDepth() ); }
|
inline size_t Configuration::getDHorizontalDepth () const { return _ddepthh; }
|
||||||
inline DbU::Unit Configuration::getDHorizontalWidth () const { return getWireWidth ( getDHorizontalDepth() ); }
|
inline const Layer* Configuration::getDHorizontalLayer () const { return getRoutingLayer( getDHorizontalDepth() ); }
|
||||||
inline DbU::Unit Configuration::getDHorizontalPitch () const { return getPitch ( getDHorizontalDepth(), Flags::NoFlags ); }
|
inline DbU::Unit Configuration::getDHorizontalWidth () const { return getWireWidth ( getDHorizontalDepth() ); }
|
||||||
inline size_t Configuration::getDContactDepth () const { return _ddepthc; }
|
inline DbU::Unit Configuration::getDHorizontalPitch () const { return getPitch ( getDHorizontalDepth(), Flags::NoFlags ); }
|
||||||
inline const Layer* Configuration::getDContactLayer () const { return getContactLayer( getDContactDepth() ); }
|
inline DbU::Unit Configuration::getDHorizontalOffset () const { return getOffset ( getDHorizontalDepth() ); }
|
||||||
inline DbU::Unit Configuration::getDContactWidth () const { return getWireWidth ( getDContactDepth() ); }
|
inline size_t Configuration::getDContactDepth () const { return _ddepthc; }
|
||||||
inline DbU::Unit Configuration::getDContactPitch () const { return getPitch ( getDContactDepth(), Flags::NoFlags ); }
|
inline const Layer* Configuration::getDContactLayer () const { return getContactLayer( getDContactDepth() ); }
|
||||||
|
inline DbU::Unit Configuration::getDContactWidth () const { return getWireWidth ( getDContactDepth() ); }
|
||||||
|
inline DbU::Unit Configuration::getDContactPitch () const { return getPitch ( getDContactDepth(), Flags::NoFlags ); }
|
||||||
|
|
||||||
|
|
||||||
} // Anabatic namespace.
|
} // Anabatic namespace.
|
||||||
|
|
|
@ -96,10 +96,12 @@ namespace Anabatic {
|
||||||
static inline const Layer* getDVerticalLayer ();
|
static inline const Layer* getDVerticalLayer ();
|
||||||
static inline DbU::Unit getDVerticalWidth ();
|
static inline DbU::Unit getDVerticalWidth ();
|
||||||
static inline DbU::Unit getDVerticalPitch ();
|
static inline DbU::Unit getDVerticalPitch ();
|
||||||
|
static inline DbU::Unit getDVerticalOffset ();
|
||||||
static inline size_t getDHorizontalDepth ();
|
static inline size_t getDHorizontalDepth ();
|
||||||
static inline const Layer* getDHorizontalLayer ();
|
static inline const Layer* getDHorizontalLayer ();
|
||||||
static inline DbU::Unit getDHorizontalWidth ();
|
static inline DbU::Unit getDHorizontalWidth ();
|
||||||
static inline DbU::Unit getDHorizontalPitch ();
|
static inline DbU::Unit getDHorizontalPitch ();
|
||||||
|
static inline DbU::Unit getDHorizontalOffset ();
|
||||||
static inline size_t getDContactDepth ();
|
static inline size_t getDContactDepth ();
|
||||||
static inline const Layer* getDContactLayer ();
|
static inline const Layer* getDContactLayer ();
|
||||||
static inline DbU::Unit getDContactWidth ();
|
static inline DbU::Unit getDContactWidth ();
|
||||||
|
@ -232,10 +234,12 @@ namespace Anabatic {
|
||||||
inline const Layer* Session::getDVerticalLayer () { return getConfiguration()->getDVerticalLayer(); }
|
inline const Layer* Session::getDVerticalLayer () { return getConfiguration()->getDVerticalLayer(); }
|
||||||
inline DbU::Unit Session::getDVerticalWidth () { return getConfiguration()->getDVerticalWidth(); }
|
inline DbU::Unit Session::getDVerticalWidth () { return getConfiguration()->getDVerticalWidth(); }
|
||||||
inline DbU::Unit Session::getDVerticalPitch () { return getConfiguration()->getDVerticalPitch(); }
|
inline DbU::Unit Session::getDVerticalPitch () { return getConfiguration()->getDVerticalPitch(); }
|
||||||
|
inline DbU::Unit Session::getDVerticalOffset () { return getConfiguration()->getDVerticalOffset(); }
|
||||||
inline size_t Session::getDHorizontalDepth () { return getConfiguration()->getDHorizontalDepth(); }
|
inline size_t Session::getDHorizontalDepth () { return getConfiguration()->getDHorizontalDepth(); }
|
||||||
inline const Layer* Session::getDHorizontalLayer () { return getConfiguration()->getDHorizontalLayer(); }
|
inline const Layer* Session::getDHorizontalLayer () { return getConfiguration()->getDHorizontalLayer(); }
|
||||||
inline DbU::Unit Session::getDHorizontalWidth () { return getConfiguration()->getDHorizontalWidth(); }
|
inline DbU::Unit Session::getDHorizontalWidth () { return getConfiguration()->getDHorizontalWidth(); }
|
||||||
inline DbU::Unit Session::getDHorizontalPitch () { return getConfiguration()->getDHorizontalPitch(); }
|
inline DbU::Unit Session::getDHorizontalPitch () { return getConfiguration()->getDHorizontalPitch(); }
|
||||||
|
inline DbU::Unit Session::getDHorizontalOffset () { return getConfiguration()->getDHorizontalOffset(); }
|
||||||
inline size_t Session::getDContactDepth () { return getConfiguration()->getDContactDepth(); }
|
inline size_t Session::getDContactDepth () { return getConfiguration()->getDContactDepth(); }
|
||||||
inline const Layer* Session::getDContactLayer () { return getConfiguration()->getDContactLayer(); }
|
inline const Layer* Session::getDContactLayer () { return getConfiguration()->getDContactLayer(); }
|
||||||
inline DbU::Unit Session::getDContactWidth () { return getConfiguration()->getDContactWidth(); }
|
inline DbU::Unit Session::getDContactWidth () { return getConfiguration()->getDContactWidth(); }
|
||||||
|
|
|
@ -225,7 +225,6 @@ namespace CRL {
|
||||||
long index;
|
long index;
|
||||||
|
|
||||||
divide ( position-start, index, modulo );
|
divide ( position-start, index, modulo );
|
||||||
|
|
||||||
cdebug_log(100,0) << "index := " << index << endl;
|
cdebug_log(100,0) << "index := " << index << endl;
|
||||||
|
|
||||||
if ( index < 0 ) {
|
if ( index < 0 ) {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// | G D S I I / Hurricane Interface |
|
// | G D S I I / Hurricane Interface |
|
||||||
// | |
|
// | |
|
||||||
// | Author : Jean-Paul CHAPUT |
|
// | Author : Jean-Paul CHAPUT |
|
||||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||||
// | =============================================================== |
|
// | =============================================================== |
|
||||||
// | C++ Module : "./gds/GdsDriver.cpp" |
|
// | C++ Module : "./gds/GdsDriver.cpp" |
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
|
@ -51,6 +51,17 @@ namespace {
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
|
bool hasLayout ( const Cell* cell )
|
||||||
|
{
|
||||||
|
for ( Net* net : cell->getNets() ) {
|
||||||
|
for ( Component* component : net->getComponents() ) {
|
||||||
|
if (dynamic_cast<Plug*>(component) == NULL) return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
// Class : "::DepthOrder".
|
// Class : "::DepthOrder".
|
||||||
|
|
||||||
|
@ -545,6 +556,10 @@ namespace {
|
||||||
|
|
||||||
GdsStream& GdsStream::operator<< ( const Cell* cell )
|
GdsStream& GdsStream::operator<< ( const Cell* cell )
|
||||||
{
|
{
|
||||||
|
// Temporay patch for "amsOTA".
|
||||||
|
if (cell->getName() == "control_r") return *this;
|
||||||
|
if (not hasLayout(cell)) return *this;
|
||||||
|
|
||||||
time_t t = time( 0 );
|
time_t t = time( 0 );
|
||||||
tm* now = localtime( &t );
|
tm* now = localtime( &t );
|
||||||
|
|
||||||
|
@ -566,6 +581,9 @@ namespace {
|
||||||
_ostream << STRNAME(cell->getName());
|
_ostream << STRNAME(cell->getName());
|
||||||
|
|
||||||
for ( Instance* instance : cell->getInstances() ) {
|
for ( Instance* instance : cell->getInstances() ) {
|
||||||
|
if (instance->getMasterCell()->getName() == "control_r") continue;
|
||||||
|
if (not hasLayout(instance->getMasterCell())) continue;
|
||||||
|
|
||||||
if (instance->getPlacementStatus() == Instance::PlacementStatus::UNPLACED) continue;
|
if (instance->getPlacementStatus() == Instance::PlacementStatus::UNPLACED) continue;
|
||||||
|
|
||||||
(*this) << SREF;
|
(*this) << SREF;
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
-DPYTHON_SITE_PACKAGES="${PYTHON_SITE_PACKAGES}"
|
-DPYTHON_SITE_PACKAGES="${PYTHON_SITE_PACKAGES}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set( pyConstCpps PyConstant.cpp )
|
||||||
set( pyCpps PyCRL.cpp
|
set( pyCpps PyCRL.cpp
|
||||||
PyBanner.cpp
|
PyBanner.cpp
|
||||||
PyCatalog.cpp
|
PyCatalog.cpp
|
||||||
|
@ -78,3 +79,10 @@
|
||||||
"${depLibs}"
|
"${depLibs}"
|
||||||
include/coriolis2/crlcore
|
include/coriolis2/crlcore
|
||||||
)
|
)
|
||||||
|
add_python_module( "${pyConstCpps}"
|
||||||
|
"crlcore/PyRoutingLayerGauge.h"
|
||||||
|
"pycrlconst;1.0;1"
|
||||||
|
Constant
|
||||||
|
"${depLibs}"
|
||||||
|
include/coriolis2/crlcore
|
||||||
|
)
|
||||||
|
|
|
@ -0,0 +1,98 @@
|
||||||
|
// -*- C++ -*-
|
||||||
|
//
|
||||||
|
// This file is part of the Coriolis Software.
|
||||||
|
// Copyright (c) UPMC 2018-2018, All Rights Reserved
|
||||||
|
//
|
||||||
|
// +-----------------------------------------------------------------+
|
||||||
|
// | C O R I O L I S |
|
||||||
|
// | Alliance / Hurricane Interface |
|
||||||
|
// | |
|
||||||
|
// | Author : Jean-Paul CHAPUT |
|
||||||
|
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||||
|
// | =============================================================== |
|
||||||
|
// | C++ Module : "./PyConstant.cpp" |
|
||||||
|
// +-----------------------------------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
|
#include "hurricane/isobar/PyHurricane.h"
|
||||||
|
#include "crlcore/PyRoutingLayerGauge.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Constant {
|
||||||
|
|
||||||
|
using std::cerr;
|
||||||
|
using std::endl;
|
||||||
|
using std::string;
|
||||||
|
using Hurricane::tab;
|
||||||
|
using Hurricane::Exception;
|
||||||
|
using Hurricane::Bug;
|
||||||
|
using Hurricane::Error;
|
||||||
|
using Hurricane::Warning;
|
||||||
|
using Isobar::ProxyProperty;
|
||||||
|
using Isobar::ProxyError;
|
||||||
|
using Isobar::ConstructorError;
|
||||||
|
using Isobar::HurricaneError;
|
||||||
|
using Isobar::HurricaneWarning;
|
||||||
|
using Isobar::__cs;
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(__PYTHON_MODULE__)
|
||||||
|
|
||||||
|
// +=================================================================+
|
||||||
|
// | "PyConstant" Shared Library Code Part |
|
||||||
|
// +=================================================================+
|
||||||
|
|
||||||
|
|
||||||
|
# else // End of PyHurricane Shared Library Code Part.
|
||||||
|
|
||||||
|
|
||||||
|
// +=================================================================+
|
||||||
|
// | "PyConstant" Python Module Code Part |
|
||||||
|
// +=================================================================+
|
||||||
|
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
|
||||||
|
|
||||||
|
static void LoadConstants ( PyObject* dictionnary ) {
|
||||||
|
PyObject* constant;
|
||||||
|
|
||||||
|
LoadObjectConstant( dictionnary, Constant::Horizontal, "Horizontal" )
|
||||||
|
LoadObjectConstant( dictionnary, Constant::Vertical , "Vertical" )
|
||||||
|
LoadObjectConstant( dictionnary, Constant::Default , "Default" )
|
||||||
|
LoadObjectConstant( dictionnary, Constant::PinOnly , "PinOnly" )
|
||||||
|
LoadObjectConstant( dictionnary, Constant::Superior , "Superior" )
|
||||||
|
LoadObjectConstant( dictionnary, Constant::Inferior , "Inferior" )
|
||||||
|
LoadObjectConstant( dictionnary, Constant::Nearest , "Nearest" )
|
||||||
|
LoadObjectConstant( dictionnary, Constant::Exact , "Exact" )
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static PyMethodDef PyConstant_Methods[] =
|
||||||
|
{ {NULL, NULL, 0, NULL} /* sentinel */
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
DL_EXPORT(void) initConstant () {
|
||||||
|
cdebug_log(30,0) << "initConstant()" << endl;
|
||||||
|
|
||||||
|
PyObject* module = Py_InitModule( "Constant", PyConstant_Methods );
|
||||||
|
if (module == NULL) {
|
||||||
|
cerr << "[ERROR]\n"
|
||||||
|
<< " Failed to initialize Constant module." << endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* dictionnary = PyModule_GetDict( module );
|
||||||
|
LoadConstants( dictionnary );
|
||||||
|
|
||||||
|
cdebug_log(30,0) << "Constant.so loaded " << (void*)&typeid(string) << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} // extern "C".
|
||||||
|
|
||||||
|
|
||||||
|
#endif // Python Module Code Part.
|
||||||
|
|
||||||
|
} // Constant namespace.
|
|
@ -360,6 +360,8 @@ extern "C" {
|
||||||
accessorVectorFromVoid(getLayerGauges,PyRoutingGauge,RoutingGauge,RoutingLayerGauge)
|
accessorVectorFromVoid(getLayerGauges,PyRoutingGauge,RoutingGauge,RoutingLayerGauge)
|
||||||
DirectGetBoolAttribute(PyRoutingGauge_isSymbolic ,isSymbolic ,PyRoutingGauge,RoutingGauge)
|
DirectGetBoolAttribute(PyRoutingGauge_isSymbolic ,isSymbolic ,PyRoutingGauge,RoutingGauge)
|
||||||
DirectSetBoolAttribute(PyRoutingGauge_setSymbolic,setSymbolic,PyRoutingGauge,RoutingGauge)
|
DirectSetBoolAttribute(PyRoutingGauge_setSymbolic,setSymbolic,PyRoutingGauge,RoutingGauge)
|
||||||
|
DirectGetBoolAttribute(PyRoutingGauge_isHV ,isHV ,PyRoutingGauge,RoutingGauge)
|
||||||
|
DirectGetBoolAttribute(PyRoutingGauge_isVH ,isVH ,PyRoutingGauge,RoutingGauge)
|
||||||
|
|
||||||
|
|
||||||
// Standart Destroy (Attribute).
|
// Standart Destroy (Attribute).
|
||||||
|
@ -368,8 +370,12 @@ extern "C" {
|
||||||
PyMethodDef PyRoutingGauge_Methods[] =
|
PyMethodDef PyRoutingGauge_Methods[] =
|
||||||
{ { "create" , (PyCFunction)PyRoutingGauge_create , METH_VARARGS|METH_STATIC
|
{ { "create" , (PyCFunction)PyRoutingGauge_create , METH_VARARGS|METH_STATIC
|
||||||
, "Create a new RoutingGauge." }
|
, "Create a new RoutingGauge." }
|
||||||
, { "isSymbolic" , (PyCFunction)PyRoutingGauge_isSymbolic , METH_NOARGS
|
, { "isSymbolic" , (PyCFunction)PyRoutingGauge_isSymbolic , METH_NOARGS
|
||||||
, "The RoutingGauge is for symbolic technology." }
|
, "The RoutingGauge is for symbolic technology." }
|
||||||
|
, { "isHV" , (PyCFunction)PyRoutingGauge_isHV , METH_NOARGS
|
||||||
|
, "The first routing layer (metal2) is horizontal." }
|
||||||
|
, { "isVH" , (PyCFunction)PyRoutingGauge_isVH , METH_NOARGS
|
||||||
|
, "The first routing layer (metal2) is vertical." }
|
||||||
, { "getName" , (PyCFunction)PyRoutingGauge_getName , METH_NOARGS
|
, { "getName" , (PyCFunction)PyRoutingGauge_getName , METH_NOARGS
|
||||||
, "Return the maximum depth of the RoutingGauge." }
|
, "Return the maximum depth of the RoutingGauge." }
|
||||||
, { "getTechnology" , (PyCFunction)PyRoutingGauge_getTechnology , METH_NOARGS
|
, { "getTechnology" , (PyCFunction)PyRoutingGauge_getTechnology , METH_NOARGS
|
||||||
|
|
|
@ -254,6 +254,23 @@ extern "C" {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static PyObject* PyCellViewer_removeHistory ( PyCellViewer* self, PyObject* args )
|
||||||
|
{
|
||||||
|
cdebug_log(20,0) << "PyCellViewer_removeHistory ()" << endl;
|
||||||
|
|
||||||
|
HTRY
|
||||||
|
METHOD_HEAD("CellViewer.removeHistory()")
|
||||||
|
|
||||||
|
PyCell* cell;
|
||||||
|
if ( not ParseOneArg("CellViewer.removeHistory()",args,CELL_ARG,(PyObject**)&cell) ) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
cw->removeHistory ( PYCELL_O(cell) );
|
||||||
|
HCATCH
|
||||||
|
Py_RETURN_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------
|
// ---------------------------------------------------------------
|
||||||
// PyCellViewer Attribute Method table.
|
// PyCellViewer Attribute Method table.
|
||||||
|
|
||||||
|
@ -280,6 +297,8 @@ extern "C" {
|
||||||
, "Triggers a full redraw of the visible area." }
|
, "Triggers a full redraw of the visible area." }
|
||||||
, { "refresh" , (PyCFunction)PyCellViewer_refresh , METH_NOARGS
|
, { "refresh" , (PyCFunction)PyCellViewer_refresh , METH_NOARGS
|
||||||
, "Fit the contents to the viewer's visible area." }
|
, "Fit the contents to the viewer's visible area." }
|
||||||
|
, { "removeHistory" , (PyCFunction)PyCellViewer_removeHistory , METH_VARARGS
|
||||||
|
, "Remove a Cell from the viewer's history." }
|
||||||
, { "destroy" , (PyCFunction)PyCellViewer_destroy , METH_NOARGS
|
, { "destroy" , (PyCFunction)PyCellViewer_destroy , METH_NOARGS
|
||||||
, "Destroy the associated hurricane object. The python object remains." }
|
, "Destroy the associated hurricane object. The python object remains." }
|
||||||
, {NULL, NULL, 0, NULL} /* sentinel */
|
, {NULL, NULL, 0, NULL} /* sentinel */
|
||||||
|
|
Loading…
Reference in New Issue