New DataBase::getCell() and bug in Technology::getNthMetal().

* New: Hurricane::DataBase::getCell() method to search a cell through
    all the libraries of *all* the frameworks, not just Alliance.
    Also exported in Python interface.
* Bug: In Technology::getNthMetal() the function was not returning the
    right metal, there was an offset of one. And when the offset was
    0, no metal was even returned. Same fix goes for getNthCut().
      The fault was in Mask<>::nthbit().
* Change: In Hurricane::CellWidget, the initial window size is too tiny.
    Increase the size from 250 to 500 pixels.
This commit is contained in:
Jean-Paul Chaput 2017-11-17 10:54:19 +01:00
parent 4e8ac63408
commit bed79c0156
58 changed files with 226 additions and 247 deletions

View File

@ -1,30 +0,0 @@
# -*- Mode:Python; explicit-buffer-name: "technology.conf<hcmos9>" -*-
from Hurricane import DbU
technoConfig = { 'name' : 'hcmos9'
, 'gridValue' : 0.005
, 'gridUnit' : DbU.UnitPowerMicro
, 'gridsPerLambda': 24
}
gdsLayersTable = \
( ("nWell" , "NWELL" , 3)
, ("nImplant", "NPLUS" , 26)
, ("pImplant", "PPLUS" , 25)
, ("active" , "ACTIVE" , 6)
, ("poly" , "POLY" , 17)
, ("cut0" , "CONTACT", 30)
, ("metal1" , "METAL1" , 31)
, ("cut1" , "VIA1" , 51)
, ("metal2" , "METAL2" , 32)
, ("cut2" , "VIA2" , 52)
, ("metal3" , "METAL3" , 33)
, ("cut3" , "VIA3" , 53)
, ("metal4" , "METAL4" , 34)
, ("cut4" , "VIA4" , 54)
, ("metal5" , "METAL5" , 35)
, ("cut5" , "VIA5" , 55)
, ("metal6" , "METAL6" , 36)
)

View File

@ -1,40 +1,169 @@
# -*- Mode:Python; explicit-buffer-name: "technology.conf<scn6m_deep>" -*- # -*- Mode:Python; explicit-buffer-name: "technology.conf<scmos_deep_018>" -*-
from Hurricane import DbU import helpers
# MOSIS SCN6M_DEEP is a portable technology where lengths are expresseds # The informations here are extracted from the Alliance ".rds" file,
# in symbolic unit (lambda). We only know that the lambda is equal to half # and must be consistent with it.
# the value of the technology, that is 180nm gives 90nm. We have no information
# about the foundry grid.
# #
# We set the foundry grid to .005um and set the gridsPerLambda to 18. # Provides standard settings for:
# - <viewerConfig>
# - <realLayersTable>
# - <symbolicLayersTable>
# - <workingLayersTable>
technoConfig = { 'name' : 'scn6m_deep' execfile( helpers.sysConfDir+'/common/technology.conf' )
, 'gridValue' : 0.005
, 'gridUnit' : DbU.UnitPowerMicro
, 'gridsPerLambda': 18
}
# Format of an entry in the table:
# (Symbolic_Name, CIF_Name, GDSII_Number) # Format of <symbolicRulesTable>:
gdsLayersTable = \ # Each entry is a pair of (string, value).
( ("pWell" , "CWN" , 41) # * string: a synthetic way to designate the symbolic layer on which
, ("nWell" , "CWP" , 42) # it applies, an optional real layer in case where there is
, ("active" , "CAA" , 43) # more than one, and the dimension name.
, ("pImplant", "CSP" , 44) # * value : the rule (dimension) value expressed in lambda.
, ("nImplant", "CSN" , 45)
, ("poly" , "CPG" , 46) symbolicRulesTable = \
, ("poly2" , "CM1" , 49) # poly2 is in fact metal1. ( ('NWELL.nWell.extention.cap' , 4.0)
, ("cut0" , "CCC" , 25) , ('PWELL.pWell.extention.cap' , 4.0)
, ("metal1" , "CM1" , 49)
, ("cut1" , "CV1" , 50) , ('NTIE.minimum.width' , 3.0)
, ("metal2" , "CM2" , 51) , ('NTIE.nWell.extention.cap' , 3.0)
, ("cut2" , "CV2" , 61) , ('NTIE.nWell.extention.width' , 2.0)
, ("metal3" , "CM3" , 62) , ('NTIE.nImplant.extention.cap' , 2.5)
, ("cut3" , "CV3" , 30) , ('NTIE.nImplant.extention.width' , 1.5)
, ("metal4" , "CM4" , 31) , ('NTIE.active.extention.cap' , 0.5)
, ("cut4" , "CV4" , 32) , ('NTIE.active.extention.width' , -0.5)
, ("metal5" , "CM5" , 33)
, ("cut5" , "CV5" , 36) , ('PTIE.minimum.width' , 3.0)
, ("metal6" , "CM6" , 37) , ('PTIE.pWell.extention.cap' , 3.0)
, ('PTIE.pWell.extention.width' , 2.0)
, ('PTIE.pImplant.extention.cap' , 2.5)
, ('PTIE.pImplant.extention.width' , 1.5)
, ('PTIE.active.extention.cap' , 0.5)
, ('PTIE.active.extention.width' , -0.5)
, ('NDIF.minimum.width' , 3.0)
, ('NDIF.nImplant.extention.cap' , 4.0)
, ('NDIF.nImplant.extention.width' , 2.0)
, ('NDIF.active.extention.cap' , 2.0)
, ('NDIF.active.extention.width' , 0.0)
, ('PDIF.minimum.width' , 3.0)
, ('PDIF.pImplant.extention.cap' , 4.0)
, ('PDIF.pImplant.extention.width' , 2.0)
, ('PDIF.active.extention.cap' , 2.0)
, ('PDIF.active.extention.width' , 0.0)
, ('GATE.minimum.width' , 2.0)
, ('GATE.poly.extention.cap' , 2.5)
, ('NTRANS.minimum.width' , 2.0)
, ('NTRANS.nImplant.extention.cap' , 2.0)
, ('NTRANS.nImplant.extention.width' , 7.0)
, ('NTRANS.active.extention.cap' , 0.0)
, ('NTRANS.active.extention.width' , 3.0)
, ('NTRANS.poly.extention.cap' , 3.0)
, ('NTRANS.poly.extention.width' , 0.0)
, ('PTRANS.minimum.width' , 2.0)
, ('PTRANS.nWell.extention.cap' , 2.5)
, ('PTRANS.nWell.extention.width' , 7.5)
, ('PTRANS.pImplant.extention.cap' , 2.0)
, ('PTRANS.pImplant.extention.width' , 7.0)
, ('PTRANS.active.extention.cap' , 0.0)
, ('PTRANS.active.extention.width' , 3.0)
, ('PTRANS.poly.extention.cap' , 3.0)
, ('PTRANS.poly.extention.width' , 0.0)
, ('POLY.minimum.width' , 2.0)
, ('POLY.poly.extention.cap' , 1.0)
, ('POLY2.minimum.width' , 2.0)
, ('POLY2.poly2.extention.cap' , 2.0)
# Routing Layers.
, ('METAL1.minimum.width' , 2.0)
, ('METAL1.metal1.extention.cap' , 2.0)
, ('METAL1.metal1.extention.width' , 0.5)
, ('METAL2.minimum.width' , 3.0)
, ('METAL2.metal2.extention.cap' , 1.5)
, ('METAL3.minimum.width' , 3.0)
, ('METAL3.metal3.extention.cap' , 1.5)
, ('METAL4.minimum.width' , 3.0)
, ('METAL4.metal4.extention.cap' , 1.5)
, ('METAL5.minimum.width' , 3.0)
, ('METAL5.metal5.extention.cap' , 1.5)
, ('METAL6.minimum.width' , 5.0)
, ('METAL6.metal6.extention.cap' , 2.5)
#, ('METAL7.minimum.width' , 2.0)
#, ('METAL7.metal7.extention.cap' , 2.5)
#, ('METAL8.minimum.width' , 2.0)
#, ('METAL8.metal8.extention.cap' , 2.5)
# Blockages.
, ('BLOCKAGE1.minimum.width' , 3.0)
, ('BLOCKAGE1.blockage1.extention.cap' , 2.0)
, ('BLOCKAGE1.blockage1.extention.width', 0.5)
, ('BLOCKAGE2.minimum.width' , 3.0)
, ('BLOCKAGE2.blockage2.extention.cap' , 2.0)
, ('BLOCKAGE3.minimum.width' , 3.0)
, ('BLOCKAGE3.blockage3.extention.cap' , 2.0)
, ('BLOCKAGE4.minimum.width' , 3.0)
, ('BLOCKAGE4.blockage4.extention.cap' , 2.0)
, ('BLOCKAGE5.minimum.width' , 3.0)
, ('BLOCKAGE5.blockage5.extention.cap' , 2.0)
, ('BLOCKAGE6.minimum.width' , 4.0)
, ('BLOCKAGE6.blockage6.extention.cap' , 2.5)
#, ('BLOCKAGE7.minimum.width' , 2.0)
#, ('BLOCKAGE7.blockage6.extention.cap' , 4.0)
#, ('BLOCKAGE8.minimum.width' , 2.0)
#, ('BLOCKAGE8.blockage6.extention.cap' , 4.0)
# Contacts (i.e. Active <--> Metal).
, ('CONT_BODY_N.minimum.side' , 2.0)
, ('CONT_BODY_N.nWell.enclosure' , 4.0)
, ('CONT_BODY_N.nImplant.enclosure' , 3.5)
, ('CONT_BODY_N.active.enclosure' , 1.5)
, ('CONT_BODY_N.metal1.enclosure' , 1.0)
, ('CONT_BODY_P.minimum.side' , 2.0)
, ('CONT_BODY_P.pWell.enclosure' , 4.0)
, ('CONT_BODY_P.pImplant.enclosure' , 3.5)
, ('CONT_BODY_P.active.enclosure' , 1.5)
, ('CONT_BODY_P.metal1.enclosure' , 1.0)
, ('CONT_DIF_N.minimum.side' , 2.0)
, ('CONT_DIF_N.nImplant.enclosure' , 4.0)
, ('CONT_DIF_N.active.enclosure' , 2.0)
, ('CONT_DIF_N.metal1.enclosure' , 1.0)
, ('CONT_DIF_P.minimum.side' , 2.0)
, ('CONT_DIF_P.pImplant.enclosure' , 4.0)
, ('CONT_DIF_P.active.enclosure' , 2.0)
, ('CONT_DIF_P.metal1.enclosure' , 1.0)
, ('CONT_POLY.minimum.width' , 2.0)
, ('CONT_POLY.poly.enclosure' , 2.0)
, ('CONT_POLY.metal1.enclosure' , 1.0)
# VIAs (i.e. Metal <--> Metal).
, ('VIA12.minimum.side' , 3.0)
, ('VIA12.metal1.enclosure' , 1.0)
, ('VIA12.metal2.enclosure' , 1.0)
, ('VIA23.minimum.side' , 3.0)
, ('VIA23.metal2.enclosure' , 1.0)
, ('VIA23.metal3.enclosure' , 1.0)
, ('VIA34.minimum.side' , 3.0)
, ('VIA34.metal3.enclosure' , 1.0)
, ('VIA34.metal4.enclosure' , 1.0)
, ('VIA45.minimum.side' , 3.0)
, ('VIA45.metal4.enclosure' , 1.0)
, ('VIA45.metal5.enclosure' , 1.0)
, ('VIA56.minimum.side' , 5.0)
, ('VIA56.metal5.enclosure' , 1.0)
, ('VIA56.metal6.enclosure' , 1.5)
#, ('VIA67.minimum.side' , 2.0)
#, ('VIA67.metal6.enclosure' , 3.0)
#, ('VIA67.metal7.enclosure' , 3.0)
#, ('VIA78.minimum.side' , 2.0)
#, ('VIA78.metal7.enclosure' , 3.0)
#, ('VIA78.metal8.enclosure' , 3.0)
) )

View File

@ -1,169 +0,0 @@
# -*- Mode:Python; explicit-buffer-name: "technology.conf<scmos_deep_018>" -*-
import helpers
# The informations here are extracted from the Alliance ".rds" file,
# and must be consistent with it.
#
# Provides standard settings for:
# - <viewerConfig>
# - <realLayersTable>
# - <symbolicLayersTable>
# - <workingLayersTable>
execfile( helpers.sysConfDir+'/common/technology.conf' )
# Format of <symbolicRulesTable>:
# Each entry is a pair of (string, value).
# * string: a synthetic way to designate the symbolic layer on which
# it applies, an optional real layer in case where there is
# more than one, and the dimension name.
# * value : the rule (dimension) value expressed in lambda.
symbolicRulesTable = \
( ('NWELL.nWell.extention.cap' , 4.0)
, ('PWELL.pWell.extention.cap' , 4.0)
, ('NTIE.minimum.width' , 3.0)
, ('NTIE.nWell.extention.cap' , 3.0)
, ('NTIE.nWell.extention.width' , 2.0)
, ('NTIE.nImplant.extention.cap' , 2.5)
, ('NTIE.nImplant.extention.width' , 1.5)
, ('NTIE.active.extention.cap' , 0.5)
, ('NTIE.active.extention.width' , -0.5)
, ('PTIE.minimum.width' , 3.0)
, ('PTIE.pWell.extention.cap' , 3.0)
, ('PTIE.pWell.extention.width' , 2.0)
, ('PTIE.pImplant.extention.cap' , 2.5)
, ('PTIE.pImplant.extention.width' , 1.5)
, ('PTIE.active.extention.cap' , 0.5)
, ('PTIE.active.extention.width' , -0.5)
, ('NDIF.minimum.width' , 3.0)
, ('NDIF.nImplant.extention.cap' , 4.0)
, ('NDIF.nImplant.extention.width' , 2.0)
, ('NDIF.active.extention.cap' , 2.0)
, ('NDIF.active.extention.width' , 0.0)
, ('PDIF.minimum.width' , 3.0)
, ('PDIF.pImplant.extention.cap' , 4.0)
, ('PDIF.pImplant.extention.width' , 2.0)
, ('PDIF.active.extention.cap' , 2.0)
, ('PDIF.active.extention.width' , 0.0)
, ('GATE.minimum.width' , 2.0)
, ('GATE.poly.extention.cap' , 2.5)
, ('NTRANS.minimum.width' , 2.0)
, ('NTRANS.nImplant.extention.cap' , 2.0)
, ('NTRANS.nImplant.extention.width' , 7.0)
, ('NTRANS.active.extention.cap' , 0.0)
, ('NTRANS.active.extention.width' , 3.0)
, ('NTRANS.poly.extention.cap' , 3.0)
, ('NTRANS.poly.extention.width' , 0.0)
, ('PTRANS.minimum.width' , 2.0)
, ('PTRANS.nWell.extention.cap' , 2.5)
, ('PTRANS.nWell.extention.width' , 7.5)
, ('PTRANS.pImplant.extention.cap' , 2.0)
, ('PTRANS.pImplant.extention.width' , 7.0)
, ('PTRANS.active.extention.cap' , 0.0)
, ('PTRANS.active.extention.width' , 3.0)
, ('PTRANS.poly.extention.cap' , 3.0)
, ('PTRANS.poly.extention.width' , 0.0)
, ('POLY.minimum.width' , 2.0)
, ('POLY.poly.extention.cap' , 1.0)
, ('POLY2.minimum.width' , 2.0)
, ('POLY2.poly2.extention.cap' , 2.0)
# Routing Layers.
, ('METAL1.minimum.width' , 2.0)
, ('METAL1.metal1.extention.cap' , 2.0)
, ('METAL1.metal1.extention.width' , 0.5)
, ('METAL2.minimum.width' , 3.0)
, ('METAL2.metal2.extention.cap' , 1.5)
, ('METAL3.minimum.width' , 3.0)
, ('METAL3.metal3.extention.cap' , 1.5)
, ('METAL4.minimum.width' , 3.0)
, ('METAL4.metal4.extention.cap' , 1.5)
, ('METAL5.minimum.width' , 3.0)
, ('METAL5.metal5.extention.cap' , 1.5)
, ('METAL6.minimum.width' , 5.0)
, ('METAL6.metal6.extention.cap' , 2.5)
#, ('METAL7.minimum.width' , 2.0)
#, ('METAL7.metal7.extention.cap' , 2.5)
#, ('METAL8.minimum.width' , 2.0)
#, ('METAL8.metal8.extention.cap' , 2.5)
# Blockages.
, ('BLOCKAGE1.minimum.width' , 3.0)
, ('BLOCKAGE1.blockage1.extention.cap' , 2.0)
, ('BLOCKAGE1.blockage1.extention.width', 0.5)
, ('BLOCKAGE2.minimum.width' , 3.0)
, ('BLOCKAGE2.blockage2.extention.cap' , 2.0)
, ('BLOCKAGE3.minimum.width' , 3.0)
, ('BLOCKAGE3.blockage3.extention.cap' , 2.0)
, ('BLOCKAGE4.minimum.width' , 3.0)
, ('BLOCKAGE4.blockage4.extention.cap' , 2.0)
, ('BLOCKAGE5.minimum.width' , 3.0)
, ('BLOCKAGE5.blockage5.extention.cap' , 2.0)
, ('BLOCKAGE6.minimum.width' , 4.0)
, ('BLOCKAGE6.blockage6.extention.cap' , 2.5)
#, ('BLOCKAGE7.minimum.width' , 2.0)
#, ('BLOCKAGE7.blockage6.extention.cap' , 4.0)
#, ('BLOCKAGE8.minimum.width' , 2.0)
#, ('BLOCKAGE8.blockage6.extention.cap' , 4.0)
# Contacts (i.e. Active <--> Metal).
, ('CONT_BODY_N.minimum.side' , 2.0)
, ('CONT_BODY_N.nWell.enclosure' , 4.0)
, ('CONT_BODY_N.nImplant.enclosure' , 3.5)
, ('CONT_BODY_N.active.enclosure' , 1.5)
, ('CONT_BODY_N.metal1.enclosure' , 1.0)
, ('CONT_BODY_P.minimum.side' , 2.0)
, ('CONT_BODY_P.pWell.enclosure' , 4.0)
, ('CONT_BODY_P.pImplant.enclosure' , 3.5)
, ('CONT_BODY_P.active.enclosure' , 1.5)
, ('CONT_BODY_P.metal1.enclosure' , 1.0)
, ('CONT_DIF_N.minimum.side' , 2.0)
, ('CONT_DIF_N.nImplant.enclosure' , 4.0)
, ('CONT_DIF_N.active.enclosure' , 2.0)
, ('CONT_DIF_N.metal1.enclosure' , 1.0)
, ('CONT_DIF_P.minimum.side' , 2.0)
, ('CONT_DIF_P.pImplant.enclosure' , 4.0)
, ('CONT_DIF_P.active.enclosure' , 2.0)
, ('CONT_DIF_P.metal1.enclosure' , 1.0)
, ('CONT_POLY.minimum.width' , 2.0)
, ('CONT_POLY.poly.enclosure' , 2.0)
, ('CONT_POLY.metal1.enclosure' , 1.0)
# VIAs (i.e. Metal <--> Metal).
, ('VIA12.minimum.side' , 3.0)
, ('VIA12.metal1.enclosure' , 1.0)
, ('VIA12.metal2.enclosure' , 1.0)
, ('VIA23.minimum.side' , 3.0)
, ('VIA23.metal2.enclosure' , 1.0)
, ('VIA23.metal3.enclosure' , 1.0)
, ('VIA34.minimum.side' , 3.0)
, ('VIA34.metal3.enclosure' , 1.0)
, ('VIA34.metal4.enclosure' , 1.0)
, ('VIA45.minimum.side' , 3.0)
, ('VIA45.metal4.enclosure' , 1.0)
, ('VIA45.metal5.enclosure' , 1.0)
, ('VIA56.minimum.side' , 5.0)
, ('VIA56.metal5.enclosure' , 1.0)
, ('VIA56.metal6.enclosure' , 1.5)
#, ('VIA67.minimum.side' , 2.0)
#, ('VIA67.metal6.enclosure' , 3.0)
#, ('VIA67.metal7.enclosure' , 3.0)
#, ('VIA78.minimum.side' , 2.0)
#, ('VIA78.metal7.enclosure' , 3.0)
#, ('VIA78.metal8.enclosure' , 3.0)
)

View File

@ -253,6 +253,26 @@ Cell* DataBase::getCell(string rpath, unsigned int flags)
} }
Cell* DataBase::getCell(string name)
// *********************************
{
vector<Library*> libStack;
libStack.push_back( getRootLibrary() );
while ( not libStack.empty() ) {
Library* library = libStack.back();
libStack.pop_back();
Cell* cell = library->getCell( name );
if (cell) return cell;
for ( Library* child : library->getLibraries() )
libStack.push_back( child );
}
return NULL;
}
void DataBase::_toJson(JsonWriter* w) const void DataBase::_toJson(JsonWriter* w) const
// **************************************** // ****************************************
{ {

View File

@ -290,9 +290,11 @@ ViaLayers Technology::getViaLayers() const
Layer* Technology::getNthMetal ( int nth ) const Layer* Technology::getNthMetal ( int nth ) const
{ { return getLayer ( _metalMask.nthbit(nth) ); }
return getLayer ( _metalMask.nthbit(nth) );
}
Layer* Technology::getNthCut ( int nth ) const
{ return getLayer ( _cutMask.nthbit(nth) ); }
void Technology::_onDbuChange ( float scale ) void Technology::_onDbuChange ( float scale )

View File

@ -86,6 +86,7 @@ class DataBase : public DBo {
public: Library* getRootLibrary() const {return _rootLibrary;}; public: Library* getRootLibrary() const {return _rootLibrary;};
public: Library* getLibrary(string,unsigned int flags); public: Library* getLibrary(string,unsigned int flags);
public: Cell* getCell(string, unsigned int flags); public: Cell* getCell(string, unsigned int flags);
public: Cell* getCell(string);
public: static DataBase* getDB(); public: static DataBase* getDB();
}; };

View File

@ -109,10 +109,11 @@ namespace Hurricane {
template<typename IntType> template<typename IntType>
inline Mask<IntType> Mask<IntType>::nthbit ( unsigned int nth ) const inline Mask<IntType> Mask<IntType>::nthbit ( unsigned int nth ) const
{ {
++nth;
IntType select = 1; IntType select = 1;
for ( ; select ; select=select<<1 ) { for ( ; select ; select=select<<1 ) {
if ( _mask & select ) nth--; if (_mask & select) nth--;
if ( !nth ) break; if (not nth) break;
} }
return select; return select;
} }

View File

@ -97,6 +97,7 @@ namespace Hurricane {
Layer* getCutBelow ( const Layer*, bool useWorking=true ) const; Layer* getCutBelow ( const Layer*, bool useWorking=true ) const;
Layer* getViaBetween ( const Layer*, const Layer* ) const; Layer* getViaBetween ( const Layer*, const Layer* ) const;
Layer* getNthMetal ( int ) const; Layer* getNthMetal ( int ) const;
Layer* getNthCut ( int ) const;
// Updators. // Updators.
void setName ( const Name& ); void setName ( const Name& );
bool setWorkingLayer ( const Name& ); bool setWorkingLayer ( const Name& );

View File

@ -17,6 +17,7 @@
#include "hurricane/isobar/PyDataBase.h" #include "hurricane/isobar/PyDataBase.h"
#include "hurricane/isobar/PyTechnology.h" #include "hurricane/isobar/PyTechnology.h"
#include "hurricane/isobar/PyLibrary.h" #include "hurricane/isobar/PyLibrary.h"
#include "hurricane/isobar/PyCell.h"
namespace Isobar { namespace Isobar {
@ -96,6 +97,26 @@ extern "C" {
return PyLibrary_Link(library); return PyLibrary_Link(library);
} }
static PyObject* PyDataBase_getCell ( PyDataBase* self, PyObject* args ) {
cdebug_log(20,0) << "PyDataBase_getCell ()" << endl;
Cell* cell = NULL;
HTRY
METHOD_HEAD("DataBase.getCell()")
char* name = NULL;
if (PyArg_ParseTuple(args,"s:DataBase.getCell", &name)) {
cell = db->getCell( name );
} else {
PyErr_SetString ( ConstructorError, "invalid number of parameters for DataBase.getCell." );
return NULL;
}
HCATCH
return PyCell_Link( cell );
}
// Standart Accessors (Attributes). // Standart Accessors (Attributes).
// Standart Destroy (Attribute). // Standart Destroy (Attribute).
@ -110,8 +131,9 @@ extern "C" {
, "Create the DataBase (only the first call created it)" } , "Create the DataBase (only the first call created it)" }
, { "getDB" , (PyCFunction)PyDataBase_getDB , METH_NOARGS|METH_STATIC , { "getDB" , (PyCFunction)PyDataBase_getDB , METH_NOARGS|METH_STATIC
, "Get the DataBase" } , "Get the DataBase" }
, { "getTechnology" , (PyCFunction)PyDataBase_getTechnology , METH_NOARGS, "Return the Technology" } , { "getTechnology" , (PyCFunction)PyDataBase_getTechnology , METH_NOARGS , "Return the Technology" }
, { "getRootLibrary", (PyCFunction)PyDataBase_getRootLibrary, METH_NOARGS, "Return the root library" } , { "getRootLibrary", (PyCFunction)PyDataBase_getRootLibrary, METH_NOARGS , "Return the root library" }
, { "getCell" , (PyCFunction)PyDataBase_getCell , METH_VARARGS, "Return a Cell" }
, { "destroy" , (PyCFunction)PyDataBase_destroy , METH_NOARGS , { "destroy" , (PyCFunction)PyDataBase_destroy , METH_NOARGS
, "Destroy associated hurricane object The python object remains." } , "Destroy associated hurricane object The python object remains." }
, {NULL, NULL, 0, NULL} /* sentinel */ , {NULL, NULL, 0, NULL} /* sentinel */

View File

@ -224,15 +224,15 @@ extern "C" {
extern PyObject* PyDbU_setPhysicalsPerGrid ( PyObject* , PyObject* args ) extern PyObject* PyDbU_setPhysicalsPerGrid ( PyObject* , PyObject* args )
{ {
double gridsPerLambda = 0.0; double physicalsPerGrid = 0.0;
unsigned int power = 0; unsigned int power = 0;
HTRY HTRY
if (not PyArg_ParseTuple(args,"di:DbU.setPhysicalsPerGrid", &gridsPerLambda, &power) ) { if (not PyArg_ParseTuple(args,"di:DbU.setPhysicalsPerGrid", &physicalsPerGrid, &power) ) {
PyErr_SetString ( ConstructorError, "DbU.setPhysicalsPerGrid(): Invalid/bad type parameters ." ); PyErr_SetString ( ConstructorError, "DbU.setPhysicalsPerGrid(): Invalid/bad type parameters ." );
return NULL; return NULL;
} }
DbU::setPhysicalsPerGrid(gridsPerLambda,(DbU::UnitPower)power); DbU::setPhysicalsPerGrid(physicalsPerGrid,(DbU::UnitPower)power);
HCATCH HCATCH
Py_RETURN_NONE; Py_RETURN_NONE;

View File

@ -1046,7 +1046,7 @@ namespace Hurricane {
// Class : "Hurricane::CellWidget". // Class : "Hurricane::CellWidget".
int CellWidget::_initialSide = 250; int CellWidget::_initialSide = 500;
CellWidget::CellWidget ( QWidget* parent ) CellWidget::CellWidget ( QWidget* parent )
@ -1088,8 +1088,10 @@ namespace Hurricane {
QFont font = Graphics::getNormalFont(); QFont font = Graphics::getNormalFont();
_textFontHeight = QFontMetrics(font).ascent(); _textFontHeight = QFontMetrics(font).ascent();
if (Graphics::isHighDpi()) resize( Graphics::toHighDpi(_initialSide) if (Graphics::isHighDpi()) {
, Graphics::toHighDpi(_initialSide) ); resize( Graphics::toHighDpi(_initialSide)
, Graphics::toHighDpi(_initialSide) );
}
} }