diff --git a/anabatic/CMakeLists.txt b/anabatic/CMakeLists.txt index 9786c67f..1b59b28d 100644 --- a/anabatic/CMakeLists.txt +++ b/anabatic/CMakeLists.txt @@ -7,6 +7,7 @@ option(BUILD_DOC "Build the documentation (doxygen)" OFF) option(CHECK_DATABASE "Run database in full check mode (very slow)" OFF) + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) cmake_minimum_required(VERSION 2.8.9) @@ -18,10 +19,9 @@ setup_boost() setup_qt() - find_package(PythonLibs 2 REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(FLUTE REQUIRED) - find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) find_package(ETESIAN REQUIRED) diff --git a/anabatic/src/AntennaProtect.cpp b/anabatic/src/AntennaProtect.cpp index 7f08ef9b..9e16089c 100644 --- a/anabatic/src/AntennaProtect.cpp +++ b/anabatic/src/AntennaProtect.cpp @@ -1109,12 +1109,17 @@ namespace Anabatic { } EtesianEngine* etesian = static_cast ( ToolEngine::get( getCell(), EtesianEngine::staticGetName() )); - DbU::Unit segmentMaxWL = etesian->getAntennaDiodeMaxWL() / 2; if (not etesian->getDiodeCell()) { cerr << Warning( "AnabaticEngine::antennaProtect(): No diode cell found, skipped." ) << endl; return; } + if (etesian->getAntennaDiodeMaxWL() <= 0) { + cerr << Warning( "AnabaticEngine::antennaProtect(): Maximum antenna diode WL not set, skipped." ) << endl; + return; + } + + DbU::Unit segmentMaxWL = etesian->getAntennaDiodeMaxWL() / 2; cmess1 << " o Antenna effect protection." << endl; startMeasures(); diff --git a/anabatic/src/CMakeLists.txt b/anabatic/src/CMakeLists.txt index 0752d5f1..9495599a 100644 --- a/anabatic/src/CMakeLists.txt +++ b/anabatic/src/CMakeLists.txt @@ -12,7 +12,7 @@ endif ( CHECK_DETERMINISM ) ${FLUTE_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${QtX_INCLUDE_DIR} - ${PYTHON_INCLUDE_PATH} + ${Python_INCLUDE_DIRS} ) set( includes anabatic/Constants.h anabatic/Configuration.h @@ -86,7 +86,7 @@ endif ( CHECK_DETERMINISM ) ${QtX_LIBRARIES} ${Boost_LIBRARIES} ${LIBXML2_LIBRARIES} - ${PYTHON_LIBRARIES} -lutil + ${Python_LIBRARIES} -lutil ) add_library( anabatic ${cpps} ) diff --git a/anabatic/src/Configuration.cpp b/anabatic/src/Configuration.cpp index 3585a962..5e8a7085 100644 --- a/anabatic/src/Configuration.cpp +++ b/anabatic/src/Configuration.cpp @@ -17,7 +17,7 @@ #include #include #include -#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/Warning.h" #include "hurricane/Error.h" #include "hurricane/Technology.h" diff --git a/anabatic/src/GCell.cpp b/anabatic/src/GCell.cpp index c1454f1a..1ae7ea86 100644 --- a/anabatic/src/GCell.cpp +++ b/anabatic/src/GCell.cpp @@ -298,6 +298,7 @@ namespace Anabatic { , _contacts () , _depth (Session::getRoutingGauge()->getDepth()) , _pinDepth (0) + , _satProcessed (0) , _rpCount (0) , _blockages (new DbU::Unit [_depth]) , _cDensity (0.0) diff --git a/anabatic/src/LayerAssign.cpp b/anabatic/src/LayerAssign.cpp index fd5424d5..3943e3d7 100644 --- a/anabatic/src/LayerAssign.cpp +++ b/anabatic/src/LayerAssign.cpp @@ -368,10 +368,13 @@ namespace Anabatic { if (not finished) { optimized = gcell->stepNetDesaturate( depth, globalNets, invalidateds ); + gcell->setSatProcessed( depth ); if (optimized) { for ( GCell* gcell : invalidateds ) { - queue.push( gcell->cloneKey(depth) ); + if (not gcell->isSatProcessed(depth)) + queue.push( gcell->cloneKey(depth) ); } + invalidateds.clear(); } } } @@ -830,7 +833,7 @@ namespace Anabatic { cmess1 << " o Balance Global Density " << Session::getRoutingGauge()->getRoutingLayer(depth)->getName() << endl; - GCellDensitySet queue ( depth, getGCells()) ); + GCellDensitySet queue ( depth, getGCells() ); GCell::Set invalidateds; bool optimized = true; diff --git a/anabatic/src/PyAnabatic.cpp b/anabatic/src/PyAnabatic.cpp index 57614ac0..8813a67f 100644 --- a/anabatic/src/PyAnabatic.cpp +++ b/anabatic/src/PyAnabatic.cpp @@ -55,17 +55,32 @@ extern "C" { }; + static PyModuleDef PyAnabatic_ModuleDef = + { PyModuleDef_HEAD_INIT + , "Anabatic" /* m_name */ + , "Low level database for global & detailed routing." + /* m_doc */ + , -1 /* m_size */ + , PyAnabatic_Methods /* m_methods */ + , NULL /* m_reload */ + , NULL /* m_traverse */ + , NULL /* m_clear */ + , NULL /* m_free */ + }; + + // --------------------------------------------------------------- // Module Initialization : "initAnabatic ()" - DL_EXPORT(void) initAnabatic () { - cdebug_log(32,0) << "initAnabatic()" << endl; + PyMODINIT_FUNC PyInit_Anabatic ( void ) + { + cdebug_log(32,0) << "PyInit_Anabatic()" << endl; - PyObject* module = Py_InitModule( "Anabatic", PyAnabatic_Methods ); + PyObject* module = PyModule_Create( &PyAnabatic_ModuleDef ); if (module == NULL) { cerr << "[ERROR]\n" << " Failed to initialize Anabatic module." << endl; - return; + return NULL; } PyObject* dictionnary = PyModule_GetDict(module); @@ -77,6 +92,8 @@ extern "C" { LoadObjectConstant( dictionnary,EngineLayerAssignByTrunk ,"EngineLayerAssignByTrunk" ); LoadObjectConstant( dictionnary,EngineLayerAssignNoGlobalM2V,"EngineLayerAssignNoGlobalM2V" ); LoadObjectConstant( dictionnary,EngineNoNetLayerAssign ,"EngineNoNetLayerAssign" ); + + return module; } diff --git a/anabatic/src/anabatic/GCell.h b/anabatic/src/anabatic/GCell.h index 8660d7c5..c2f505be 100644 --- a/anabatic/src/anabatic/GCell.h +++ b/anabatic/src/anabatic/GCell.h @@ -140,6 +140,7 @@ namespace Anabatic { public: static GCell* create ( AnabaticEngine* ); public: + inline bool isSatProcessed ( size_t depth ) const; inline bool isSaturated () const; bool isSaturated ( size_t depth ) const; inline bool isInvalidated () const; @@ -257,6 +258,7 @@ namespace Anabatic { size_t checkDensity () const; bool checkEdgeSaturation ( size_t hreserved, size_t vreserved) const; void setType ( Flags ); + inline void setSatProcessed ( size_t depth ); void addBlockage ( size_t depth, DbU::Unit ); inline void addHSegment ( AutoSegment* ); inline void addVSegment ( AutoSegment* ); @@ -334,6 +336,7 @@ namespace Anabatic { vector _contacts; size_t _depth; size_t _pinDepth; + uint32_t _satProcessed; int _rpCount; DbU::Unit* _blockages; float _cDensity; @@ -486,6 +489,12 @@ namespace Anabatic { inline void GCell::addContact ( AutoContact* contact ) { _flags |= Flags::Invalidated; _contacts.push_back(contact); } + inline bool GCell::isSatProcessed ( size_t depth ) const + { return (_satProcessed & (1 << depth)); } + + inline void GCell::setSatProcessed ( size_t depth ) + { _satProcessed |= (1 << depth); } + inline bool operator< ( const GCell& lhs, const GCell& rhs ) { diff --git a/bootstrap/CMakeLists.txt b/bootstrap/CMakeLists.txt index 4f32de56..4a4c9f3a 100644 --- a/bootstrap/CMakeLists.txt +++ b/bootstrap/CMakeLists.txt @@ -3,14 +3,15 @@ set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(Bootstrap) - cmake_minimum_required(VERSION 2.4.0) + cmake_minimum_required(VERSION 2.8.0) - set(ignoreVariables "${BUILD_DOC} ${CMAKE_INSTALL_DIR}") + set(ignoreVariables USE_LIBBFD "${BUILD_DOC} ${CMAKE_INSTALL_DIR}") add_subdirectory(cmake_modules) list(INSERT CMAKE_MODULE_PATH 0 "${Bootstrap_SOURCE_DIR}/cmake_modules/") - find_package(Bootstrap REQUIRED) + find_package(Bootstrap REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development ) find_package(PythonSitePackages REQUIRED) print_cmake_module_path() @@ -23,7 +24,7 @@ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE) install(DIRECTORY builder - DESTINATION ${PYTHON_SITE_PACKAGES} ) + DESTINATION ${Python_CORIOLISLIB} ) install(FILES ccb.py DESTINATION bin diff --git a/bootstrap/build.conf b/bootstrap/build.conf index ebfc43e2..86143759 100644 --- a/bootstrap/build.conf +++ b/bootstrap/build.conf @@ -15,7 +15,6 @@ projects = [ , 'tools' : [ "bootstrap" , "lefdef" , "coloquinte" - , "vlsisapd" , "hurricane" , "crlcore" , "flute" diff --git a/bootstrap/builder/AboutWidget.py b/bootstrap/builder/AboutWidget.py index e9f95fab..c58d3257 100644 --- a/bootstrap/builder/AboutWidget.py +++ b/bootstrap/builder/AboutWidget.py @@ -2,98 +2,88 @@ # -*- mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC/LIP6 2012-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | -# | C o r i o l i s / C h a m s B u i l d e r | +# | T o o l c h a i n B u i l d e r | # | | # | Author : Jean-Paul Chaput | -# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +# | E-mail : Jean-Paul.Chaput@lip6.fr | # | =============================================================== | # | Python : "./builder/AboutWidget.py" | # +-----------------------------------------------------------------+ -from PyQt4.QtCore import Qt -from PyQt4.QtGui import QPalette -from PyQt4.QtGui import QColor -from PyQt4.QtGui import QFont -from PyQt4.QtGui import QWidget -from PyQt4.QtGui import QFrame -from PyQt4.QtGui import QLabel -from PyQt4.QtGui import QVBoxLayout -from PyQt4.QtGui import QAction -from PyQt4.QtGui import QKeySequence -from PyQt4.QtGui import QApplication +from PyQt4.QtCore import Qt +from PyQt4.QtGui import QPalette, QColor, QFont, QWidget, \ + QFrame, QLabel, QVBoxLayout, QAction, \ + QKeySequence, QApplication class AboutWidget ( QWidget ): - def __init__ ( self, parent=None ): - QWidget.__init__ ( self, parent ) - self.setFixedSize( 500, 400 ) - self.setStyleSheet( 'background-color: #ffffdd;' ) + def __init__ ( self, parent=None ): + QWidget.__init__ ( self, parent ) + self.setFixedSize( 500, 400 ) + self.setStyleSheet( 'background-color: #ffffdd;' ) - topLine = QFrame() - topLine.setFrameShape( QFrame.HLine ) - topLine.setLineWidth ( 2 ) - botLine = QFrame() - botLine.setFrameShape( QFrame.HLine ) - botLine.setLineWidth ( 2 ) + topLine = QFrame() + topLine.setFrameShape( QFrame.HLine ) + topLine.setLineWidth ( 2 ) + botLine = QFrame() + botLine.setFrameShape( QFrame.HLine ) + botLine.setLineWidth ( 2 ) - title = QLabel( 'CCB' ) - title.setAlignment( Qt.AlignCenter ) - font = title.font() - font.setPointSize( 72 ) - font.setWeight ( QFont.Bold ) - title.setFont( font ) + title = QLabel( 'CCB' ) + title.setAlignment( Qt.AlignCenter ) + font = title.font() + font.setPointSize( 72 ) + font.setWeight ( QFont.Bold ) + title.setFont( font ) - subTitle = QLabel( 'Coriolis & Chams Builder for the Dummies' ) - subTitle.setAlignment( Qt.AlignCenter ) - subTitle.setFont( QFont('Courier',10,QFont.Bold) ) - - authors = QLabel( 'Coriolis CAD System 1.0 . . . . . . . . ccb 1.0\n' - 'Copyright (c) 2008-2016 . . . . . . . . . . UPMC\n' - 'Authors . . . . . . . . . . . . . Damien Dupuis\n' - ' . . . . . . . . . . . . Jean-Paul Chaput\n' - 'E-Mail . . . . . . . . Jean-Paul.Chaput@lip6.fr' - ) - authors.setAlignment( Qt.AlignCenter ) - authors.setFont( QFont('Courier',10,QFont.Bold) ) - - vLayout = QVBoxLayout() - vLayout.addStretch(10) - vLayout.addWidget( topLine ) - vLayout.addWidget( title ) - vLayout.addStretch(1) - vLayout.addWidget( subTitle ) - vLayout.addWidget( authors ) - vLayout.addStretch(1) - vLayout.addWidget( botLine ) - vLayout.addStretch(10) - - frame = QFrame() - frame.setFrameShape ( QFrame.Box ) - frame.setFrameShadow( QFrame.Sunken ) - frame.setLayout ( vLayout ) - frame.setLineWidth ( 1 ) - - vLayout = QVBoxLayout() - vLayout.addWidget( frame ) + subTitle = QLabel( 'Coriolis Toolchain Builder for the Dummies' ) + subTitle.setAlignment( Qt.AlignCenter ) + subTitle.setFont( QFont('Courier',10,QFont.Bold) ) + authors = QLabel( 'Coriolis CAD System 3.0 . . . . . . . . ccb 1.0\n' + 'Copyright (c) 2008-2021 . . Sorbonne Universite\n' + 'Authors . . . . . . . . . . . . . Damien Dupuis\n' + ' . . . . . . . . . . . . Jean-Paul Chaput\n' + 'E-Mail . . . . . . . . Jean-Paul.Chaput@lip6.fr' + ) + authors.setAlignment( Qt.AlignCenter ) + authors.setFont( QFont('Courier',10,QFont.Bold) ) - self.setLayout( vLayout ) - - self._exitAction = QAction( '&Exit', self ) - self._exitAction.setStatusTip( 'Exit CCB (settings are saved)' ) - self._exitAction.setShortcut ( QKeySequence('CTRL+Q') ) - self._exitAction.triggered.connect( QApplication.closeAllWindows ) - self.addAction( self._exitAction ) - - self._closeAction = QAction( '&Close', self ) - self._closeAction.setStatusTip( 'Close the About Window' ) - self._closeAction.setShortcut ( QKeySequence('CTRL+A') ) - self._closeAction.triggered.connect( self.close ) - self.addAction( self._closeAction ) + vLayout = QVBoxLayout() + vLayout.addStretch(10) + vLayout.addWidget( topLine ) + vLayout.addWidget( title ) + vLayout.addStretch(1) + vLayout.addWidget( subTitle ) + vLayout.addWidget( authors ) + vLayout.addStretch(1) + vLayout.addWidget( botLine ) + vLayout.addStretch(10) - return + frame = QFrame() + frame.setFrameShape ( QFrame.Box ) + frame.setFrameShadow( QFrame.Sunken ) + frame.setLayout ( vLayout ) + frame.setLineWidth ( 1 ) + + vLayout = QVBoxLayout() + vLayout.addWidget( frame ) + self.setLayout( vLayout ) + + self._exitAction = QAction( '&Exit', self ) + self._exitAction.setStatusTip( 'Exit CCB (settings are saved)' ) + self._exitAction.setShortcut ( QKeySequence('CTRL+Q') ) + self._exitAction.triggered.connect( QApplication.closeAllWindows ) + self.addAction( self._exitAction ) + + self._closeAction = QAction( '&Close', self ) + self._closeAction.setStatusTip( 'Close the About Window' ) + self._closeAction.setShortcut ( QKeySequence('CTRL+A') ) + self._closeAction.triggered.connect( self.close ) + self.addAction( self._closeAction ) + return diff --git a/bootstrap/builder/Builder.py b/bootstrap/builder/Builder.py index d5323f9f..7cabbadb 100644 --- a/bootstrap/builder/Builder.py +++ b/bootstrap/builder/Builder.py @@ -1,14 +1,14 @@ # -*- mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC/LIP6 2008-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2008-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | -# | C o r i o l i s / C h a m s B u i l d e r | +# | T o o l c h a i n B u i l d e r | # | | # | Author : Jean-Paul Chaput | -# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +# | E-mail : Jean-Paul.Chaput@lip6.fr | # | =============================================================== | # | Python : "./builder/Builder.py" | # +-----------------------------------------------------------------+ @@ -20,9 +20,9 @@ import os import os.path import datetime import subprocess -from . import ErrorMessage -from Project import Project -from Configuration import Configuration +from . import ErrorMessage +from .Project import Project +from .Configuration import Configuration class Builder: @@ -51,14 +51,11 @@ class Builder: self._environment = os.environ return - def __setattr__ ( self, attribute, value ): if attribute[0] == "_": self.__dict__[attribute] = value return - if attribute in self._conf.getAllIds(): setattr( self._conf, attribute, value ) - if attribute == "quiet": self._quiet = value elif attribute == "rmBuild": self._rmBuild = value elif attribute == "doBuild": self._doBuild = value @@ -84,18 +81,15 @@ class Builder: elif attribute == "makeArguments": self._makeArguments = value.split () return - def __getattr__ ( self, attribute ): if attribute[0] != "_": if attribute == 'conf': return self._conf if attribute in self._conf.getAllIds(): return getattr( self._conf, attribute ) - - if not self.__dict__.has_key(attribute): + if not attribute in self.__dict__: raise ErrorMessage( 1, 'Builder has no attribute <%s>.'%attribute ) return self.__dict__[attribute] - def _guessGitHash ( self, project ): self.gitHash = 'x' os.chdir ( self.sourceDir+'/'+project.getName() ) @@ -103,58 +97,48 @@ class Builder: self.gitHash = subprocess.Popen ( command, stdout=subprocess.PIPE ).stdout.readlines()[0] return - def _configure ( self, fileIn, fileOut ): fdFileIn = open ( fileIn , "r" ) fdFileOut = open ( fileOut, "w" ) - for line in fdFileIn.readlines(): stable = False substituted0 = line - while not stable: substituted1 = re.sub ( r"@revdate@" , self.revDate, substituted0 ) substituted1 = re.sub ( r"@githash@" , self.gitHash, substituted1 ) substituted1 = re.sub ( r"@coriolisTop@", "/usr" , substituted1 ) if substituted0 == substituted1: stable = True else: substituted0 = substituted1 - fdFileOut.write ( substituted0 ) - fdFileIn.close () fdFileOut.close () return - def _doSpec ( self ): self._configure ( self.specFileIn, self.specFile ) return - def _doDebChangelog ( self ): self._configure ( self.debChangelogIn, self.debChangelog ) return - def _execute ( self, command, error ): collections = [] if self._devtoolset: - collections.append( 'devtoolset-%d' % self._devtoolset ) - print 'Using devtoolset-%(v)d (scl enable devtoolset-%(v)d ...)' % {'v':self._devtoolset} + collections.append( 'devtoolset-{}'.format(self._devtoolset) ) + print( 'Using devtoolset-{0} (scl enable devtoolset-{0} ...)'.format(self._devtoolset) ) if self._llvmtoolset: - collections.append( 'llvm-toolset-%d' % self._llvmtoolset ) - print 'Using llvm-toolset-%(v)d (scl enable llvm-toolset-%(v)d ...)' % {'v':self._llvmtoolset} - + collections.append( 'llvm-toolset-{}'.format(self._llvmtoolset) ) + print( 'Using llvm-toolset-{0} (scl enable llvm-toolset-{v} ...)'.format(self._llvmtoolset) ) if collections: - commandAsString = '' - for i in range(len(command)): - if i: commandAsString += ' ' - if ' ' in command[i]: commandAsString += '"'+command[i]+'"' - else: commandAsString += command[i] - command = [ 'scl', 'enable' ] - command += collections - command.append( commandAsString ) - + commandAsString = '' + for i in range(len(command)): + if i: commandAsString += ' ' + if ' ' in command[i]: commandAsString += '"'+command[i]+'"' + else: commandAsString += command[i] + command = [ 'scl', 'enable' ] + command += collections + command.append( commandAsString ) sys.stdout.flush () sys.stderr.flush () child = subprocess.Popen ( command, env=self._environment, stdout=None ) @@ -164,28 +148,26 @@ class Builder: ErrorMessage( status, "%s (status:%d)."%(error,status) ).terminate() return - def _enableTool ( self, tool ): return - def _build ( self, tool ): toolSourceDir = os.path.join ( self.sourceDir, tool.getToolDir() ) toolBuildDir = os.path.join ( self.buildDir , tool.name ) cmakeInstallDir = os.path.join ( self.installDir, "share", "cmake", "Modules" ) # Supplied directly in the CMakeLists.txt. #cmakeModules = os.path.join ( self.installDir, "share", "cmake", "Modules" ) - if not os.path.isdir(toolSourceDir): - print ErrorMessage( 0, "Missing tool source directory: \"%s\" (skipped)."%toolSourceDir ) + print( ErrorMessage( 0, 'Missing tool source directory: "{}" (skipped).' \ + .format(toolSourceDir) )) return - if self._rmBuild: - print "Removing tool build directory: \"%s\"." % toolBuildDir + print( 'Removing tool build directory: "{}".'.format(toolBuildDir) ) command = [ "/bin/rm", "-rf", toolBuildDir ] self._execute ( command, "Removing tool build directory" ) command = [ 'cmake' ] + if self.libSuffix: command += [ "-D", "LIB_SUFFIX:STRING=%s" % self.libSuffix ] if self._ninja: command += [ "-G", "Ninja" ] if self._macports: command += [ "-D", "WITH_MACPORTS:STRING=TRUE" ] if self._noSystemBoost: command += [ "-D", "Boost_NO_SYSTEM_PATHS:STRING=TRUE" @@ -195,7 +177,6 @@ class Builder: if self._bfd: command += [ "-D", "USE_LIBBFD:STRING=%s" % self._bfd ] if self._qt5: command += [ "-D", "WITH_QT5:STRING=TRUE" ] if self._openmp: command += [ "-D", "WITH_OPENMP:STRING=TRUE" ] - command += [ "-D", "CMAKE_BUILD_TYPE:STRING=%s" % self.buildMode #, "-D", "BUILD_SHARED_LIBS:STRING=%s" % self.enableShared , "-D", "CMAKE_INSTALL_PREFIX:STRING=%s" % self.installDir @@ -203,13 +184,12 @@ class Builder: #, "-D", "CMAKE_MODULE_PATH:STRING=%s" % cmakeModules #, "-D", "Boost_DEBUG:STRING=TRUE" , toolSourceDir ] - + if not os.path.isdir(toolBuildDir): - print "Creating tool build directory: \"%s\"." % toolBuildDir + print( 'Creating tool build directory: "{}".'.format(toolBuildDir) ) os.makedirs ( toolBuildDir ) os.chdir ( toolBuildDir ) self._execute ( command, "First CMake failed" ) - os.chdir ( toolBuildDir ) if self._noCache: cmakeCache = os.path.join(toolBuildDir,"CMakeCache.txt") @@ -226,22 +206,19 @@ class Builder: command += [ toolSourceDir ] self._execute ( command, "Second CMake failed" ) - if self._doBuild: command = [ "make" ] if self._ninja: command = [ "ninja-build" ] #command += [ "DESTDIR=%s" % self.installDir ] command += self._makeArguments - print "Make/Ninja command:", command + print( "Make/Ninja command:", command ) sys.stdout.flush () self._execute ( command, "Build failed" ) return - def gitArchive ( self, projectName ): rawArchive = self.tarballDir+'/'+projectName+'.tar' - os.chdir ( self.sourceDir+'/'+projectName ) command = [ 'git' , 'archive' @@ -250,11 +227,10 @@ class Builder: , 'devel' ] self._execute ( command, "git archive of project %s" % projectName ) - if not os.path.isdir ( self.archiveDir ): os.mkdir ( self.archiveDir ) - os.chdir ( self.archiveDir ) + command = [ 'tar', 'xf', rawArchive ] self._execute ( command, "unpacking raw archive %s" % rawArchive ) @@ -265,7 +241,7 @@ class Builder: command = [ "/bin/ln", "-s", "./coriolis/bootstrap/Makefile.package" , self.archiveDir+"/Makefile" ] self._execute ( command, "link of %s failed" % "coriolis/boostrap/Makefile.package") - + command = [ "/bin/ln", "-s", "./coriolis/bootstrap/debian", self.archiveDir ] self._execute ( command, "Copying Debian/Ubuntu package control files" ) @@ -284,32 +260,27 @@ class Builder: # , "--no-backup-if-mismatch" # , "-p0", "-i", self.distribPatch ] # self._execute ( command, "patch for distribution command failed" ) - absSourceTarBz2 = '%s/%s' % (self.tarballDir,self.sourceTarBz2) os.chdir ( self.tarballDir ) command = [ 'tar', 'jcf', absSourceTarBz2, os.path.basename(self.archiveDir) ] self._execute ( command, "Creating composite archive %s" % absSourceTarBz2 ) - return - def _setEnvironment ( self, systemVariable, userVariable ): - if not self._environment.has_key(systemVariable) or self._environment[systemVariable] == "": - if not self._environment.has_key(userVariable) or self._environment[userVariable] == "" : + if not systemVariable in self._environment or self._environment[systemVariable] == "": + if not userVariable in self._environment or self._environment[userVariable] == "" : self._environment[ systemVariable ] = self.installDir - print "[WARNING] Neither <%s> nor <%s> environment variables are sets." \ - % (systemVariable,userVariable) - print " Setting <%s> to <%s>." % (systemVariable,self.installDir) + print( '[WARNING] Neither "{0}" nor "{1}" environment variables are sets.' \ + .format(systemVariable,userVariable) ) + print( ' Setting "{0}" to "{1}".'.format(systemVariable,self.installDir) ) else: self._environment[ systemVariable ] = self._environment[ userVariable ] - if not self._quiet: - print "Setting <%s> to <%s>." % (systemVariable,self._environment[systemVariable]) - if self._environment.has_key(userVariable): - print "Transmitting <%s> as <%s>." % (userVariable,self._environment[userVariable]) + print( 'Setting "{0}" to "{1}".'.format(systemVariable,self._environment[systemVariable]) ) + if userVariable in self._environment: + print( 'Transmitting "{0}" as "{1}".'.format(userVariable,self._environment[userVariable]) ) return - def _commandTemplate ( self, tools, projects, command ): if self._clang: self._environment[ 'CC' ] = 'clang' @@ -320,87 +291,70 @@ class Builder: if self._macports: self._environment[ 'BOOST_INCLUDEDIR' ] = '/opt/local/include' self._environment[ 'BOOST_LIBRARYDIR' ] = '/opt/local/lib' - # Set or guess the various projects TOP environment variables. for project in self.projects: topVariable = "%s_TOP" % project.getName().upper() topUserVariable = "%s_USER_TOP" % project.getName().upper() self._setEnvironment ( topVariable, topUserVariable ) - if tools: # Checks if the requested tools are in the various projects. self.standalones = tools for project in self.projects: self.standalones = project.activate ( self.standalones ) for tool in self.standalones: - print "[WARNING] Tool \"%s\" is not part of any project." % tool - + print( '[WARNING] Tool "{}" is not part of any project.'.format(tool) ) if projects: for projectName in projects: project = self.getProject ( projectName ) if not project: ErrorMessage( 1, "No project of name \"%s\"."%projectName ).terminate() project.activateAll() - if not tools and not projects: for project in self.projects: project.activateAll () - for project in self.projects: for tool in project.getActives(): - print "\nProcessing tool: \"%s\"." % tool.name + print( '\nProcessing tool: "{}".'.format(tool.name) ) getattr(self,command) ( tool ) return - def enable ( self, tools, projects ): self._commandTemplate ( tools, projects, "_enableTool" ) return - def enabledTools ( self ): tools = [] for project in self.projects: tools += project.getActives() return tools - def build ( self, tools, projects ): self._commandTemplate ( tools, projects, "_build" ) return - def gitTarball ( self, tools, projects ): if self.gitHash == "x": self._guessGitHash ( self.getProject(projects[0]) ) - self._doSpec () # self._doDebChangelog () - if os.path.isdir(self.tarballDir): - print "Removing previous tarball directory: \"%s\"." % self.tarballDir + print( 'Removing previous tarball directory: "{}".'.format(self.tarballDir) ) command = [ "/bin/rm", "-rf", self.tarballDir ] self._execute ( command, "Removing top export (tarball) directory" ) - - print "Creating tarball directory: \"%s\"." % self.tarballDir + print( 'Creating tarball directory: "{}".'.format(self.tarballDir) ) os.makedirs ( self.tarballDir ) self.gitArchive ( projects[0] ) - return - def userTarball ( self, tools, projects ): self.enable( tools, projects ) - userSourceTarBz2 = os.path.join ( self.tarballDir , datetime.date.today().strftime('%s-%s-%%Y%%m%%d.tar.bz2'% (self.packageName ,self.packageVersion)) ) - excludes = [] for exclude in self.packageExcludes: excludes += [ '--exclude='+exclude ] - os.chdir ( self.sourceDir ) command = [ "/bin/tar" , "--exclude-backups" @@ -410,40 +364,34 @@ class Builder: + [ "-jcvf", userSourceTarBz2 ] \ + self.enabledTools() self._execute ( command, "tar command failed" ) - return - def doRpm ( self ): self.gitTarball ( [], self.packageProjects ) - for rpmDir in [ "SOURCES", "SPECS", "BUILD", "tmp" , "SRPMS", "RPMS/i386", "RPMS/i686", "RPMS/x86_64" ]: - rpmFullDir = os.path.join ( self.rpmbuildDir, rpmDir ) - if not os.path.isdir(rpmFullDir): - os.makedirs ( rpmFullDir ) - else: - for entry in os.listdir(rpmFullDir): - path = os.path.join( rpmFullDir, entry ) - if os.path.islink(path): - realpath = os.path.realpath( os.readlink(path) ) - if not os.path.isfile(realpath): - print 'Remove obsolete link: <%s>.' % path - os.unlink( path ) - + rpmFullDir = os.path.join ( self.rpmbuildDir, rpmDir ) + if not os.path.isdir(rpmFullDir): + os.makedirs ( rpmFullDir ) + else: + for entry in os.listdir(rpmFullDir): + path = os.path.join( rpmFullDir, entry ) + if os.path.islink(path): + realpath = os.path.realpath( os.readlink(path) ) + if not os.path.isfile(realpath): + print( 'Remove obsolete link: "{}".'.format(path) ) + os.unlink( path ) rpmSpecFile = os.path.join ( self.rpmbuildDir, "SPECS" , "coriolis2.spec" ) rpmSourceFile = os.path.join ( self.rpmbuildDir, "SOURCES", self.sourceTarBz2 ) sourceFile = os.path.join ( self.tarballDir , self.sourceTarBz2 ) - + if os.path.isfile ( rpmSpecFile ): os.unlink ( rpmSpecFile ) os.symlink ( self.specFile, rpmSpecFile ) - if not os.path.islink ( rpmSourceFile ): os.symlink ( sourceFile, rpmSourceFile ) os.chdir ( self.rpmbuildDir ) - command = [ "/usr/bin/rpmbuild" , "--define", "_topdir %s" % self.rpmbuildDir , "--define", "_tmppath %s" % self.tmppathDir @@ -452,18 +400,13 @@ class Builder: if self._devtoolset: command += [ "--define", "scl devtoolset-%d"%self._devtoolset ] command += [ "-ba", "--clean", rpmSpecFile ] - self._execute ( command, "Rebuild rpm packages" ) - return - def doDeb ( self ): self.svnTarball ( [], self.packageProjects ) - if not os.path.isdir(self.debbuildDir): os.makedirs ( self.debbuildDir ) - os.chdir ( self.debbuildDir ) sourceFile = os.path.join ( self.tarballDir , self.sourceTarBz2 ) debOrigFile = os.path.join ( self.debbuildDir, "coriolis2_1.0.%s.orig.tar.bz2" % self.gitHash ) @@ -478,17 +421,12 @@ class Builder: packageDir = os.path.join ( self.debbuildDir, "coriolis2-1.0.%s" % self.gitHash ) os.chdir ( packageDir ) - self._environment["CFLAGS" ] = "-O2" self._environment["CXXFLAGS"] = "-O2" command = [ "/usr/bin/debuild", "-us", "-uc" ] self._execute ( command, "Rebuild Debian packages" ) - return - def getProject ( self, name ): return self._conf.getProject(name) def loadConfiguration ( self, confFile ): self._conf.load( confFile ) def showConfiguration ( self ): self._conf.show() - - diff --git a/bootstrap/builder/BuilderGui.py b/bootstrap/builder/BuilderGui.py index aff453ab..82233dbf 100644 --- a/bootstrap/builder/BuilderGui.py +++ b/bootstrap/builder/BuilderGui.py @@ -2,75 +2,72 @@ # -*- mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC/LIP6 2012-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | -# | C o r i o l i s / C h a m s B u i l d e r | +# | T o o l c h a i n B u i l d e r | # | | # | Author : Damien Dupuis | -# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +# | E-mail : Jean-Paul.Chaput@lip6.fr | # | =============================================================== | # | Python : "./builder/BuilderGui.py" | # +-----------------------------------------------------------------+ -from PyQt4.QtGui import QTabWidget -from PyQt4.QtGui import QApplication -from PyQt4.QtGui import QMainWindow -from PyQt4.QtGui import QAction -from PyQt4.QtGui import QKeySequence -from OptionsWidget import OptionsWidget -from CompileWidget import CompileWidget -from ConfigureWidget import ConfigureWidget -from AboutWidget import AboutWidget +from PyQt4.QtGui import QTabWidget, QApplication, QMainWindow, \ + QAction , QKeySequence +from .OptionsWidget import OptionsWidget +from .CompileWidget import CompileWidget +from .ConfigureWidget import ConfigureWidget +from .AboutWidget import AboutWidget class BuilderGui ( QMainWindow ): - def __init__ ( self, confFile, parent=None ): - QMainWindow.__init__( self, parent ) - self.setWindowTitle( 'Coriolis/Chams Builder' ) - self._tabWidget = QTabWidget() - self._configureWidget = ConfigureWidget(confFile) - self._optionsWidget = OptionsWidget(self._configureWidget.conf) - self._compileWidget = CompileWidget() - self._aboutWidget = AboutWidget() - - self._tabWidget.addTab( self._optionsWidget , 'Options' ) - self._tabWidget.addTab( self._compileWidget , 'Compile' ) - self._tabWidget.addTab( self._configureWidget, 'Configure' ) - self.setCentralWidget( self._tabWidget ) - - self._compileWidget.conf = self._configureWidget - self._compileWidget.options = self._optionsWidget - - self._exitAction = QAction( '&Exit', self ) - self._exitAction.setStatusTip( 'Exit CCB (settings are saved)' ) - self._exitAction.setShortcut ( QKeySequence('CTRL+Q') ) - self._exitAction.triggered.connect( QApplication.closeAllWindows ) - - self._saveAction = QAction( '&Save Settings', self ) - self._saveAction.setStatusTip( 'Save Settings' ) - self._saveAction.setShortcut ( QKeySequence('CTRL+S') ) - self._saveAction.triggered.connect( self._configureWidget.saveSettings ) - self._saveAction.triggered.connect( self._optionsWidget.saveSettings ) - self._saveAction.triggered.connect( self._compileWidget.saveSettings ) - - self._aboutAction = QAction( '&About', self ) - self._aboutAction.setStatusTip( 'A Word About Who\'s Responsible for This Thing' ) - self._aboutAction.setShortcut ( QKeySequence('CTRL+A') ) - self._aboutAction.triggered.connect( self._aboutWidget.show ) - - fileMenu = self.menuBar().addMenu( 'File' ) - fileMenu.addAction( self._exitAction ) - fileMenu.addAction( self._saveAction ) - fileMenu.addAction( self._aboutAction ) - return - - def closeEvent ( self, event ): - self._configureWidget.saveSettings() - self._optionsWidget .saveSettings() - self._compileWidget .saveSettings() - event.accept() - return + def __init__ ( self, confFile, parent=None ): + QMainWindow.__init__( self, parent ) + self.setWindowTitle( 'Coriolis Toolchain Builder' ) + self._tabWidget = QTabWidget() + self._configureWidget = ConfigureWidget(confFile) + self._optionsWidget = OptionsWidget(self._configureWidget.conf) + self._compileWidget = CompileWidget() + self._aboutWidget = AboutWidget() + + self._tabWidget.addTab( self._optionsWidget , 'Options' ) + self._tabWidget.addTab( self._compileWidget , 'Compile' ) + self._tabWidget.addTab( self._configureWidget, 'Configure' ) + self.setCentralWidget( self._tabWidget ) + + self._compileWidget.conf = self._configureWidget + self._compileWidget.options = self._optionsWidget + + self._exitAction = QAction( '&Exit', self ) + self._exitAction.setStatusTip( 'Exit CCB (settings are saved)' ) + self._exitAction.setShortcut ( QKeySequence('CTRL+Q') ) + self._exitAction.triggered.connect( QApplication.closeAllWindows ) + + self._saveAction = QAction( '&Save Settings', self ) + self._saveAction.setStatusTip( 'Save Settings' ) + self._saveAction.setShortcut ( QKeySequence('CTRL+S') ) + self._saveAction.triggered.connect( self._configureWidget.saveSettings ) + self._saveAction.triggered.connect( self._optionsWidget.saveSettings ) + self._saveAction.triggered.connect( self._compileWidget.saveSettings ) + + self._aboutAction = QAction( '&About', self ) + self._aboutAction.setStatusTip( 'A Word About Who\'s Responsible for This Thing' ) + self._aboutAction.setShortcut ( QKeySequence('CTRL+A') ) + self._aboutAction.triggered.connect( self._aboutWidget.show ) + + fileMenu = self.menuBar().addMenu( 'File' ) + fileMenu.addAction( self._exitAction ) + fileMenu.addAction( self._saveAction ) + fileMenu.addAction( self._aboutAction ) + return + + def closeEvent ( self, event ): + self._configureWidget.saveSettings() + self._optionsWidget .saveSettings() + self._compileWidget .saveSettings() + event.accept() + return diff --git a/bootstrap/builder/CompileWidget.py b/bootstrap/builder/CompileWidget.py index a589e3de..e442bc7d 100644 --- a/bootstrap/builder/CompileWidget.py +++ b/bootstrap/builder/CompileWidget.py @@ -2,11 +2,11 @@ # -*- mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC/LIP6 2012-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | -# | C o r i o l i s / C h a m s B u i l d e r | +# | T o o l c h a i n B u i l d e r | # | | # | Author : Damien Dupuis | # | E-mail : Jean-Paul.Chaput@asim.lip6.fr | @@ -17,195 +17,166 @@ import re import subprocess -from PyQt4.QtCore import Qt -from PyQt4.QtCore import pyqtSignal -from PyQt4.QtCore import QSettings -from PyQt4.QtGui import QFont -from PyQt4.QtGui import QColor -from PyQt4.QtGui import QPalette -from PyQt4.QtGui import QTextCharFormat -from PyQt4.QtGui import QWidget -from PyQt4.QtGui import QLabel -from PyQt4.QtGui import QPushButton -from PyQt4.QtGui import QCheckBox -from PyQt4.QtGui import QGroupBox -from PyQt4.QtGui import QButtonGroup -from PyQt4.QtGui import QVBoxLayout -from PyQt4.QtGui import QHBoxLayout -from PyQt4.QtGui import QGridLayout -from PyQt4.QtGui import QScrollArea -from PyQt4.QtGui import QComboBox -from PyQt4.QtGui import QLineEdit -from PyQt4.QtGui import QTextEdit -from PyQt4.QtGui import QFileDialog -from PyQt4.QtGui import QProgressBar -from PyQt4.QtGui import QApplication -from builder.Highlighter import Highlighter +from PyQt4.QtCore import Qt, pyqtSignal, QSettings +from PyQt4.QtGui import QFont, QColor, QPalette, QTextCharFormat, \ + QWidget, QLabel, QPushButton, QCheckBox, \ + QGroupBox, QButtonGroup, QVBoxLayout, \ + QHBoxLayout, QGridLayout, QScrollArea, \ + QComboBox, QLineEdit, QTextEdit, \ + QFileDialog, QProgressBar, QApplication +from .Highlighter import Highlighter class CompileWidget ( QWidget ): - - progress = pyqtSignal(int) - - def __init__ ( self, parent=None ): - QWidget.__init__ ( self, parent ) - self._options = None - self._conf = None - - self._go = QPushButton( 'Go' ) - self._go.setMaximumWidth( 100 ) - font = self._go.font() - font.setPointSizeF( font.pointSizeF()*2.0 ) - font.setWeight ( QFont.Bold ) - self._go.setFont( font ) - self._go.clicked.connect( self.go ) - - self._saveLog = QPushButton( 'Save' ) - saveLogLabel = QLabel( 'Log File:' ) - saveLogBrowse = QPushButton( '&Browse' ) - saveLogBrowse.clicked.connect( self.browseSaveLog ) - self._saveLogEdit = QLineEdit( '' ) - - gLayout = QGridLayout() - gLayout.addWidget( saveLogLabel , 0, 0, 1, 1, Qt.AlignRight ) - gLayout.addWidget( self._saveLogEdit, 0, 1, 1, 6 ) - gLayout.addWidget( saveLogBrowse , 0, 7, 1, 1 ) - - self._console = QTextEdit() - self._console.setLineWrapMode( QTextEdit.NoWrap ) - self._console.setMinimumSize ( 800, 400 ) - palette = self._console.palette() - palette.setColor( QPalette.Base, QColor.fromRgb(255,255,221) ) # ffffdd. - self._console.setPalette( palette ) - font = QFont( 'Bitstream Vera Sans Mono', self._console.font().pointSize() ) - self._console.setFont( font ) - self._highlighter = Highlighter( self._console.document() ) - - self._progressBar = QProgressBar() - self._progressBar.setRange ( 0, 100 ) - self._progressBar.setTextVisible( True ) - - hLayout = QHBoxLayout() - hLayout.addStretch() - hLayout.addWidget( self._go ) - hLayout.addStretch() - hLayout.addWidget( self._saveLog ) - hLayout.addStretch() - - vLayout = QVBoxLayout() - vLayout.addLayout( hLayout ) - vLayout.addLayout( gLayout ) - vLayout.addWidget( self._progressBar ) - vLayout.addWidget( self._console ) - self.setLayout( vLayout ) - - self.progress.connect( self._progressBar.setValue ) - self._saveLog.clicked.connect( self.saveLog ) - - self.readSettings() - return - - - def _setOptions ( self, options ): self._options = options - def _setConf ( self, conf ): self._conf = conf - def _getOptions ( self ): return self._options - def _getConf ( self ): return self._conf - - options = property( _getOptions, _setOptions ) - conf = property( _getConf , _setConf ) - - - def browseSaveLog ( self ): - self._saveLogEdit.setText( QFileDialog.getSaveFileName(self - ,'Select Log File Report' - ,self._saveLogEdit.text() - ,'Report Files (*.log *.txt)') ) - return - - def saveLog ( self ): - if self._saveLogEdit.text(): - fd = open( self._saveLogEdit.text(), 'w+' ) - fd.write( self._console.toPlainText() ) - fd.close() - return - - - def shellCommand ( self ): - command = [ self.conf.bootstrapDir+'/ccb.py' ] - for project in self.options.projects: - for tool in project.actives: - command += [ '--tool='+tool ] - toolsCount = len(command) - 1 - - if self.conf.rootDir: command += [ '--root=%s'%self.conf.rootDir ] - - #if self.options.svnUpdate: command += [ '--svn-update' ] - #if self.options.svnStatus: command += [ '--svn-update' ] - if self.options.enableDoc: command += [ '--doc' ] - if self.options.devtoolset: command += [ '--devtoolset-8' ] - if self.options.qt5: command += [ '--qt5' ] - if self.options.noCache: command += [ '--no-cache' ] - if self.options.rmBuild: command += [ '--rm-build' ] - if self.options.verbose: command += [ '--verbose' ] - if self.options.make: - makeArguments='install '+self.options.threads - command += [ '--make=%s'%makeArguments ] + + progress = pyqtSignal(int) + + def __init__ ( self, parent=None ): + QWidget.__init__ ( self, parent ) + self._options = None + self._conf = None - if self.options.buildMode == 'Debug': - command += [ '--debug' ] - return toolsCount, command - - - def go ( self ): - rePercentage = re.compile(r'^\[\s*(?P\d+)%\].*') - reProcessTool = re.compile(r'^Processing tool:\s*"(?P.+)"') - - if not self.options or not self.conf: return - - toolsCount, command = self.shellCommand() - if not toolsCount: return - - self._progressBar.reset() - self._progressBar.setRange( 0, toolsCount*100 ) - - strCommand = command[0] - for arg in command[1:]: - strCommand += ' ' + arg - strCommand += '\n\n' - self._console.setFontItalic( True ) - self._console.insertPlainText( strCommand ) - self._console.setFontItalic( False ) - - toolsDone = -1 - builderProcess = subprocess.Popen( command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT ) - while True: - line = builderProcess.stdout.readline() - if line == '': break - - m = rePercentage.match( line ) - if m: - self.progress.emit( toolsDone*100+int(m.group('percent')) ) - else: - m = reProcessTool.match( line ) - if m: - toolsDone += 1 - - self._console.insertPlainText( line ) - - scrollBar = self._console.verticalScrollBar() - scrollBar.setValue( scrollBar.maximum() ) - QApplication.processEvents() - builderProcess.wait() - if builderProcess.returncode == None: - pass - return - - def readSettings ( self ): - settings = QSettings() - self._saveLogEdit.setText( settings.value('compile/saveLog').toString() ) - return - - def saveSettings ( self ): - settings = QSettings() - settings.setValue( 'compile/saveLog', self._saveLogEdit.text() ) - return + self._go = QPushButton( 'Go' ) + self._go.setMaximumWidth( 100 ) + font = self._go.font() + font.setPointSizeF( font.pointSizeF()*2.0 ) + font.setWeight ( QFont.Bold ) + self._go.setFont( font ) + self._go.clicked.connect( self.go ) + + self._saveLog = QPushButton( 'Save' ) + saveLogLabel = QLabel( 'Log File:' ) + saveLogBrowse = QPushButton( '&Browse' ) + saveLogBrowse.clicked.connect( self.browseSaveLog ) + self._saveLogEdit = QLineEdit( '' ) + + gLayout = QGridLayout() + gLayout.addWidget( saveLogLabel , 0, 0, 1, 1, Qt.AlignRight ) + gLayout.addWidget( self._saveLogEdit, 0, 1, 1, 6 ) + gLayout.addWidget( saveLogBrowse , 0, 7, 1, 1 ) + + self._console = QTextEdit() + self._console.setLineWrapMode( QTextEdit.NoWrap ) + self._console.setMinimumSize ( 800, 400 ) + palette = self._console.palette() + palette.setColor( QPalette.Base, QColor.fromRgb(255,255,221) ) # ffffdd. + self._console.setPalette( palette ) + font = QFont( 'Bitstream Vera Sans Mono', self._console.font().pointSize() ) + self._console.setFont( font ) + self._highlighter = Highlighter( self._console.document() ) + + self._progressBar = QProgressBar() + self._progressBar.setRange ( 0, 100 ) + self._progressBar.setTextVisible( True ) + + hLayout = QHBoxLayout() + hLayout.addStretch() + hLayout.addWidget( self._go ) + hLayout.addStretch() + hLayout.addWidget( self._saveLog ) + hLayout.addStretch() + + vLayout = QVBoxLayout() + vLayout.addLayout( hLayout ) + vLayout.addLayout( gLayout ) + vLayout.addWidget( self._progressBar ) + vLayout.addWidget( self._console ) + self.setLayout( vLayout ) + + self.progress.connect( self._progressBar.setValue ) + self._saveLog.clicked.connect( self.saveLog ) + + self.readSettings() + return + + def _setOptions ( self, options ): self._options = options + def _setConf ( self, conf ): self._conf = conf + def _getOptions ( self ): return self._options + def _getConf ( self ): return self._conf + + options = property( _getOptions, _setOptions ) + conf = property( _getConf , _setConf ) + + def browseSaveLog ( self ): + self._saveLogEdit.setText( QFileDialog.getSaveFileName( self + , 'Select Log File Report' + , self._saveLogEdit.text() + , 'Report Files (*.log *.txt)' ) ) + return + + def saveLog ( self ): + if self._saveLogEdit.text(): + fd = open( self._saveLogEdit.text(), 'w+' ) + fd.write( self._console.toPlainText() ) + fd.close() + return + + def shellCommand ( self ): + command = [ self.conf.bootstrapDir+'/ccb.py' ] + for project in self.options.projects: + for tool in project.actives: + command += [ '--tool='+tool ] + toolsCount = len(command) - 1 + if self.conf.rootDir: command += [ '--root=%s'%self.conf.rootDir ] + #if self.options.svnUpdate: command += [ '--svn-update' ] + #if self.options.svnStatus: command += [ '--svn-update' ] + if self.options.enableDoc: command += [ '--doc' ] + if self.options.devtoolset: command += [ '--devtoolset-8' ] + if self.options.qt5: command += [ '--qt5' ] + if self.options.noCache: command += [ '--no-cache' ] + if self.options.rmBuild: command += [ '--rm-build' ] + if self.options.verbose: command += [ '--verbose' ] + if self.options.make: + makeArguments='install '+self.options.threads + command += [ '--make=%s'%makeArguments ] + if self.options.buildMode == 'Debug': + command += [ '--debug' ] + return toolsCount, command + + def go ( self ): + rePercentage = re.compile(r'^\[\s*(?P\d+)%\].*') + reProcessTool = re.compile(r'^Processing tool:\s*"(?P.+)"') + if not self.options or not self.conf: return + toolsCount, command = self.shellCommand() + if not toolsCount: return + self._progressBar.reset() + self._progressBar.setRange( 0, toolsCount*100 ) + + strCommand = command[0] + for arg in command[1:]: + strCommand += ' ' + arg + strCommand += '\n\n' + self._console.setFontItalic( True ) + self._console.insertPlainText( strCommand ) + self._console.setFontItalic( False ) + + toolsDone = -1 + builderProcess = subprocess.Popen( command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT ) + while True: + line = builderProcess.stdout.readline() + if line == '': break + m = rePercentage.match( line ) + if m: + self.progress.emit( toolsDone*100+int(m.group('percent')) ) + else: + m = reProcessTool.match( line ) + if m: + toolsDone += 1 + self._console.insertPlainText( line ) + scrollBar = self._console.verticalScrollBar() + scrollBar.setValue( scrollBar.maximum() ) + QApplication.processEvents() + builderProcess.wait() + if builderProcess.returncode == None: + pass + return + + def readSettings ( self ): + settings = QSettings() + self._saveLogEdit.setText( settings.value('compile/saveLog') ) + return + + def saveSettings ( self ): + settings = QSettings() + settings.setValue( 'compile/saveLog', self._saveLogEdit.text() ) + return diff --git a/bootstrap/builder/Configuration.py b/bootstrap/builder/Configuration.py index 3f2ec6fe..98565f28 100644 --- a/bootstrap/builder/Configuration.py +++ b/bootstrap/builder/Configuration.py @@ -2,14 +2,14 @@ # -*- mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2008-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2008-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | -# | C o r i o l i s / C h a m s B u i l d e r | +# | T o o l c h a i n B u i l d e r | # | | # | Author : Jean-Paul Chaput | -# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +# | E-mail : Jean-Paul.Chaput@lip6.fr | # | =============================================================== | # | Python : "./builder/Configuration.py" | # +-----------------------------------------------------------------+ @@ -21,8 +21,8 @@ import os import os.path import datetime import subprocess -from . import ErrorMessage -from Project import Project +from . import ErrorMessage +from .Project import Project class Configuration ( object ): @@ -64,31 +64,26 @@ class Configuration ( object ): self._updateSecondary() return - def __setattr__ ( self, attribute, value ): if attribute in Configuration.SecondaryNames: - print ErrorMessage( 1, 'Attempt to write in read-only attribute <%s> in Configuration.'%attribute ) + print( ErrorMessage( 1, 'Attempt to write in read-only attribute "{}" in Configuration.' \ + .format(attribute) )) return - if attribute[0] == '_': self.__dict__[attribute] = value return - if attribute == 'rootDir': value = os.path.expanduser(value) elif attribute == 'enableShared' and value != 'ON': value = 'OFF' - self.__dict__['_'+attribute] = value self._updateSecondary() return - def __getattr__ ( self, attribute ): if attribute[0] != '_': attribute = '_'+attribute - if not self.__dict__.has_key(attribute): + if not attribute in self.__dict__: raise ErrorMessage( 1, 'Configuration has no attribute <%s>.'%attribute ) return self.__dict__[attribute] - def _updateSecondary ( self ): if self._enableShared == "ON": self._libMode = "Shared" else: self._libMode = "Static" @@ -109,7 +104,6 @@ class Configuration ( object ): , "%s.%s" % (self._buildMode,self._libMode) ) self._buildDir = os.path.join ( self._osDir, "build" ) self._installDir = os.path.join ( self._osDir, "install" ) - self._specFileIn = os.path.join ( self._bootstrapDir, "%s.spec.in"%self._packageName ) self._specFile = os.path.join ( self._bootstrapDir, "%s.spec" %self._packageName ) self._debianDir = os.path.join ( self._bootstrapDir, "debian" ) @@ -126,7 +120,6 @@ class Configuration ( object ): self._distribPatch = os.path.join ( self._sourceDir, "bootstrap", "%s-for-distribution.patch"%self._packageName ) return - def _guessOs ( self ): self._libSuffix = None self._osSlsoc7x_64 = re.compile (".*Linux.*(el7|slsoc7).*x86_64.*") @@ -149,95 +142,89 @@ class Configuration ( object ): self._osCygwinW10_64 = re.compile (".*CYGWIN_NT-10\.[0-3].*x86_64.*") self._osCygwinW10 = re.compile (".*CYGWIN_NT-10\.[0-3].*i686.*") - uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE ) - lines = uname.stdout.readlines() - - if self._osSlsoc7x_64.match(lines[0]): + uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE ) + lines = uname.stdout.readlines() + osLine = lines[0].decode( 'ascii' ) + if self._osSlsoc7x_64.match(osLine): self._osType = "Linux.el7_64" self._libSuffix = "64" - elif self._osSlsoc6x_64.match(lines[0]): + elif self._osSlsoc6x_64.match(osLine): self._osType = "Linux.slsoc6x_64" self._libSuffix = "64" - elif self._osSlsoc6x .match(lines[0]): self._osType = "Linux.slsoc6x" - elif self._osSLSoC5x_64.match(lines[0]): + elif self._osSlsoc6x .match(osLine): self._osType = "Linux.slsoc6x" + elif self._osSLSoC5x_64.match(osLine): self._osType = "Linux.SLSoC5x_64" self._libSuffix = "64" - elif self._osSLSoC5x .match(lines[0]): self._osType = "Linux.SLSoC5x" - elif self._osFedora_64 .match(lines[0]): + elif self._osSLSoC5x .match(osLine): self._osType = "Linux.SLSoC5x" + elif self._osFedora_64 .match(osLine): self._osType = "Linux.fc_64" self._libSuffix = "64" - elif self._osFedora .match(lines[0]): self._osType = "Linux.fc" - elif self._osLinux_64 .match(lines[0]): + elif self._osFedora .match(osLine): self._osType = "Linux.fc" + elif self._osLinux_64 .match(osLine): self._osType = "Linux.x86_64" if os.path.exists("/usr/lib64/"): self._libSuffix = "64" - elif self._osLinux .match(lines[0]): self._osType = "Linux.i386" - elif self._osDarwin .match(lines[0]): self._osType = "Darwin" - elif self._osFreeBSD8x_amd64.match(lines[0]): + elif self._osLinux .match(osLine): self._osType = "Linux.i386" + elif self._osDarwin .match(osLine): self._osType = "Darwin" + elif self._osFreeBSD8x_amd64.match(osLine): self._osType = "FreeBSD.8x.amd64" self._libSuffix = "64" - elif self._osFreeBSD8x_64.match(lines[0]): + elif self._osFreeBSD8x_64.match(osLine): self._osType = "FreeBSD.8x.x86_64" self._libSuffix = "64" - elif self._osFreeBSD8x .match(lines[0]): self._osType = "FreeBSD.8x.i386" - elif self._osCygwinW7_64.match(lines[0]): + elif self._osFreeBSD8x .match(osLine): self._osType = "FreeBSD.8x.i386" + elif self._osCygwinW7_64.match(osLine): self._osType = "Cygwin.W7_64" self._libSuffix = "64" - elif self._osCygwinW7.match(lines[0]): self._osType = "Cygwin.W7" - elif self._osCygwinW8_64.match(lines[0]): + elif self._osCygwinW7.match(osLine): self._osType = "Cygwin.W7" + elif self._osCygwinW8_64.match(osLine): self._osType = "Cygwin.W8_64" self._libSuffix = "64" - elif self._osCygwinW8.match(lines[0]): self._osType = "Cygwin.W8" - elif self._osCygwinW10_64.match(lines[0]): + elif self._osCygwinW8.match(osLine): self._osType = "Cygwin.W8" + elif self._osCygwinW10_64.match(osLine): self._osType = "Cygwin.W10_64" self._libSuffix = "64" - elif self._osCygwinW10.match(lines[0]): self._osType = "Cygwin.W10" + elif self._osCygwinW10.match(osLine): self._osType = "Cygwin.W10" else: uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE ) self._osType = uname.stdout.readlines()[0][:-1] - print "[WARNING] Unrecognized OS: \"%s\"." % lines[0][:-1] - print " (using: \"%s\")" % self._osType + print( '[WARNING] Unrecognized OS: "{}."'.format(osLine[:-1]) ) + print( ' (using: "{}")'.format(self._osType) ) if self._libSuffix == '64' and not os.path.exists('/usr/lib64'): self._libSuffix = None - return - def getPrimaryIds ( self ): return Configuration.PrimaryNames def getSecondaryIds ( self ): return Configuration.SecondaryNames def getAllIds ( self ): return Configuration.PrimaryNames + Configuration.SecondaryNames - def register ( self, project ): for registered in self._projects: if registered.getName() == project.getName(): - print ErrorMessage( 0, "Project \"%s\" is already registered (ignored)." ) + print( ErrorMessage( 0, 'Project "{}" is already registered (ignored).'.format(project.getName()) )) return self._projects += [ project ] return - def getProject ( self, name ): for project in self._projects: if project.getName() == name: return project return None - def getToolProject ( self, name ): for project in self._projects: if project.hasTool(name): return project return None - def load ( self, confFile ): moduleGlobals = globals() if not confFile: - print 'Making an educated guess to locate the configuration file:' + print( 'Making an educated guess to locate the configuration file:' ) locations = [ os.path.abspath(os.path.dirname(sys.argv[0])) , os.environ['HOME']+'/coriolis-2.x/src/coriolis/bootstrap' , os.environ['HOME']+'/coriolis/src/coriolis/bootstrap' @@ -247,86 +234,82 @@ class Configuration ( object ): for location in locations: self._confFile = location + '/build.conf' - print ' <%s>' % self._confFile + print( ' "{}"'.format(self._confFile) ) if os.path.isfile(self._confFile): break if not self._confFile: ErrorMessage( 1, 'Cannot locate any configuration file.' ).terminate() else: - print 'Using user-supplied configuration file:' - print ' <%s>' % confFile + print( 'Using user-supplied configuration file:' ) + print( ' "{}"'.format(confFile) ) self._confFile = confFile if not os.path.isfile(self._confFile): ErrorMessage( 1, 'Missing configuration file:', '<%s>'%self._confFile ).terminate() - print 'Reading configuration from:' - print ' <%s>' % self._confFile - + print( 'Reading configuration from:' ) + print( ' "{}"'.format(self._confFile) ) try: - execfile( self._confFile, moduleGlobals ) - except Exception, e: + exec( open(self._confFile).read(), globals() ) + except Exception as e: ErrorMessage( 1, 'An exception occured while loading the configuration file:' , '<%s>\n' % (self._confFile) , 'You should check for simple python errors in this file.' , 'Error was:' , '%s\n' % e ).terminate() - - if moduleGlobals.has_key('projects'): + + if 'projects' in moduleGlobals: entryNb = 0 for entry in moduleGlobals['projects']: entryNb += 1 - if not entry.has_key('name'): + if not 'name' in entry: raise ErrorMessage( 1, 'Missing project name in project entry #%d.' % entryNb ) - if not entry.has_key('tools'): + if not 'tools' in entry: raise ErrorMessage( 1, 'Missing tools list in project entry #%d (<%s>).' \ % (entryNb,entry['name']) ) if not isinstance(entry['tools'],list): raise ErrorMessage( 1, 'Tools item of project entry #%d (<%s>) is not a list.' \ % (entryNb,entry['name']) ) - if not entry.has_key('repository'): + if not 'repository' in entry: raise ErrorMessage( 1, 'Missing project repository in project entry #%d.' \ % entryNb ) self.register( Project(entry['name'],entry['tools'],entry['repository']) ) else: - ErrorMessage( 1, 'Configuration file is missing the \'project\' symbol.' - , '<%s>'%self._confFile ).terminate() + ErrorMessage( 1, 'Configuration file is missing the "project" symbol.' + , '"{}"'.format(self._confFile) ).terminate() - if moduleGlobals.has_key('projectdir'): + if 'projectdir' in moduleGlobals: self.projectDir = moduleGlobals['projectdir'] - - if moduleGlobals.has_key('svnconfig'): + if 'svnconfig' in moduleGlobals: svnconfig = moduleGlobals['svnconfig'] - if svnconfig.has_key('method'): self._svnMethod = svnconfig['method'] - - if moduleGlobals.has_key('package'): + if 'method' in svnconfig: self._svnMethod = svnconfig['method'] + if 'package' in moduleGlobals: package = moduleGlobals['package'] - if package.has_key('name' ): self.packageName = package['name'] - if package.has_key('version' ): self.packageVersion = package['version'] - if package.has_key('excludes'): + if 'name' in package: self.packageName = package['name'] + if 'version' in package: self.packageVersion = package['version'] + if 'excludes' in package: if not isinstance(package['excludes'],list): raise ErrorMessage( 1, 'Excludes of package configuration is not a list.') self._packageExcludes = package['excludes'] - if package.has_key('projects'): + if 'projects' in package: if not isinstance(package['projects'],list): raise ErrorMessage( 1, 'Projects to package is not a list.') self._packageProjects = package['projects'] return - def show ( self ): - print 'CCB Configuration:' + print( 'CCB Configuration:' ) if self._gitMethod: - print ' Git Method: <%s>' % self._gitMethod + print( ' Git Method: "{}"'.format(self._gitMethod) ) else: - print ' Git Method not defined, will not be able to push/pull.' - + print( ' Git Method not defined, will not be able to push/pull.' ) for project in self._projects: - print ' project:%-15s repository:<%s>' % ( ('<%s>'%project.getName()), project.getRepository() ) + print( ' project:{0:>15} repository:"{1}"' \ + .format( '"{}"'.format(project.getName()), project.getRepository() )) toolOrder = 1 for tool in project.getTools(): - print '%s%02d:<%s>' % (' '*26,toolOrder,tool) + print( '{0}{1:02}:"{2}"'.format( ' '*26, toolOrder, tool )) toolOrder += 1 print return diff --git a/bootstrap/builder/ConfigureWidget.py b/bootstrap/builder/ConfigureWidget.py index 8094e1bc..be3600a0 100644 --- a/bootstrap/builder/ConfigureWidget.py +++ b/bootstrap/builder/ConfigureWidget.py @@ -2,45 +2,32 @@ # -*- mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC/LIP6 2012-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | -# | C o r i o l i s / C h a m s B u i l d e r | +# | T o o l c h a i n B u i l d e r | # | | # | Author : Damien Dupuis | -# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +# | E-mail : Jean-Paul.Chaput@lip6.fr | # | =============================================================== | # | Python : "./builder/ConfigureWidget.py" | # +-----------------------------------------------------------------+ -from PyQt4.QtCore import Qt -from PyQt4.QtCore import QVariant -from PyQt4.QtCore import pyqtSignal -from PyQt4.QtCore import QSettings -from PyQt4.QtGui import QFont -from PyQt4.QtGui import QWidget -from PyQt4.QtGui import QGridLayout -from PyQt4.QtGui import QHBoxLayout -from PyQt4.QtGui import QVBoxLayout -from PyQt4.QtGui import QLabel -from PyQt4.QtGui import QPushButton -from PyQt4.QtGui import QLineEdit -from PyQt4.QtCore import QModelIndex -from PyQt4.QtCore import QAbstractTableModel -from PyQt4.QtGui import QAbstractItemView -from PyQt4.QtGui import QHeaderView -from PyQt4.QtGui import QTableView -from PyQt4.QtGui import QGroupBox -from PyQt4.QtGui import QFileDialog -from PyQt4.QtGui import QApplication -from Configuration import Configuration +from PyQt4.QtCore import Qt, QVariant, pyqtSignal, QSettings, \ + QModelIndex, QAbstractTableModel +from PyQt4.QtGui import QFont, QWidget, QGridLayout, QHBoxLayout, \ + QVBoxLayout, QLabel, QPushButton, \ + QLineEdit, QAbstractItemView, QHeaderView, \ + QTableView, QGroupBox, QFileDialog, \ + QApplication +from .Configuration import Configuration class ConfSettingsModel ( QAbstractTableModel ): - HeaderFont = QApplication.font() + HeaderFont = QApplication.font() PrimaryFont = QFont('Courier',HeaderFont.pointSize()-2,QFont.Normal) SecondaryFont = QFont('Courier',HeaderFont.pointSize()-2,QFont.Normal) ValueFont = QFont('Courier',HeaderFont.pointSize()-2,QFont.Bold) @@ -48,7 +35,6 @@ class ConfSettingsModel ( QAbstractTableModel ): def __init__ ( self, conf, parent=None ): ConfSettingsModel.HeaderFont.setBold( True ) ConfSettingsModel.SecondaryFont.setItalic( True ) - QAbstractTableModel.__init__( self, parent ) self._conf = conf self._ids = self._conf.getAllIds() @@ -70,20 +56,15 @@ class ConfSettingsModel ( QAbstractTableModel ): if row < self.rowCount(): if index.column() == 0: return self._ids[row] elif index.column() == 1: return getattr( self._conf, self._ids[row] ) - - return QVariant() - + return None def headerData ( self, section, orientation, role ): - if orientation == Qt.Vertical: return QVariant() + if orientation == Qt.Vertical: return None if role == Qt.FontRole: return ConfSettingsModel.HeaderFont - if role != Qt.DisplayRole: return QVariant() - + if role != Qt.DisplayRole: return None if section == 0: return 'Setting' elif section == 1: return 'Value' - - return QVariant('?') - + return '?' def rowCount ( self, index=QModelIndex() ): return len(self._ids) def columnCount ( self, index=QModelIndex() ): return 2 @@ -119,79 +100,73 @@ class ConfSettingsWidget ( QWidget ): peanoDataLayout = QGridLayout(); peanoDataLayout.addWidget( self._view, 0, 0, 1, 1 ); - self.setLayout ( peanoDataLayout ); return class ConfigureWidget ( QWidget ): - - def __init__ ( self, confFile, parent=None ): - QWidget.__init__ ( self, parent ) - self._confFile = confFile - self._conf = Configuration() - self._rootDir = '' - - rootDirLabel = QLabel( 'Root Directory' ) - rootDirBrowse = QPushButton( '&Browse' ) - rootDirBrowse.clicked.connect( self.browseRootDir ) - self._rootDirEdit = QLineEdit( '' ) - #self._rootDirEdit.setFixedWidth( 600 ) - - gLayout = QGridLayout() - gLayout.addWidget( rootDirLabel , 0, 0, 1, 1 ) - gLayout.addWidget( self._rootDirEdit, 0, 1, 1, 6 ) - gLayout.addWidget( rootDirBrowse , 0, 7, 1, 1 ) - groupDirs = QGroupBox( 'Directories' ) - groupDirs.setLayout( gLayout ) - - gLayout = QGridLayout() - groupConf = QGroupBox( 'Configuration' ) - groupConf.setLayout( gLayout ) - - vLayout = QVBoxLayout() - vLayout.addWidget ( groupDirs ) - vLayout.addWidget ( groupConf ) - #vLayout.addStretch() - - self.setLayout( vLayout ) - - self._rootDirEdit.textChanged.connect( self.rootDirChanged ) - - self.readSettings() - - noteLabel = QLabel( 'Those settings can be changed only by editing build.conf' ) - gLayout.addWidget( noteLabel , 0, 0, 1, 1 ) - gLayout.addWidget( ConfSettingsWidget(self._conf), 1, 0, 1, 1 ) - - - def _getConf ( self ): return self._conf - def _getRootDir ( self ): return self._rootDir - def _getBootstrapDir ( self ): return self._getConf().bootstrapDir - - conf = property( _getConf ) - rootDir = property( _getRootDir ) - bootstrapDir = property( _getBootstrapDir ) - - - def rootDirChanged ( self, rootDir ): - self._rootDir = rootDir - return - - def browseRootDir ( self ): - self._rootDirEdit.setText( QFileDialog.getExistingDirectory(self,'Select the Building Root Directory') ) - return - - def readSettings ( self ): - settings = QSettings() - self._rootDirEdit.setText( settings.value('conf/rootDir').toString() ) - if not self._confFile and settings.value('conf/confFile'): - self._confFile = str( settings.value('conf/confFile').toString() ) - self._conf.load( self._confFile ) - return - - def saveSettings ( self ): - settings = QSettings() - settings.setValue( 'conf/rootDir' , self._rootDirEdit.text() ) - settings.setValue( 'conf/confFile', self._confFile ) - return + + def __init__ ( self, confFile, parent=None ): + QWidget.__init__ ( self, parent ) + self._confFile = confFile + self._conf = Configuration() + self._rootDir = '' + + rootDirLabel = QLabel( 'Root Directory' ) + rootDirBrowse = QPushButton( '&Browse' ) + rootDirBrowse.clicked.connect( self.browseRootDir ) + self._rootDirEdit = QLineEdit( '' ) + #self._rootDirEdit.setFixedWidth( 600 ) + + gLayout = QGridLayout() + gLayout.addWidget( rootDirLabel , 0, 0, 1, 1 ) + gLayout.addWidget( self._rootDirEdit, 0, 1, 1, 6 ) + gLayout.addWidget( rootDirBrowse , 0, 7, 1, 1 ) + groupDirs = QGroupBox( 'Directories' ) + groupDirs.setLayout( gLayout ) + gLayout = QGridLayout() + groupConf = QGroupBox( 'Configuration' ) + groupConf.setLayout( gLayout ) + + vLayout = QVBoxLayout() + vLayout.addWidget ( groupDirs ) + vLayout.addWidget ( groupConf ) + #vLayout.addStretch() + + self.setLayout( vLayout ) + self._rootDirEdit.textChanged.connect( self.rootDirChanged ) + self.readSettings() + + noteLabel = QLabel( 'Those settings can be changed only by editing build.conf' ) + gLayout.addWidget( noteLabel , 0, 0, 1, 1 ) + gLayout.addWidget( ConfSettingsWidget(self._conf), 1, 0, 1, 1 ) + + def _getConf ( self ): return self._conf + def _getRootDir ( self ): return self._rootDir + def _getBootstrapDir ( self ): return self._getConf().bootstrapDir + + conf = property( _getConf ) + rootDir = property( _getRootDir ) + bootstrapDir = property( _getBootstrapDir ) + + def rootDirChanged ( self, rootDir ): + self._rootDir = rootDir + return + + def browseRootDir ( self ): + self._rootDirEdit.setText( QFileDialog.getExistingDirectory(self,'Select the Building Root Directory') ) + return + + def readSettings ( self ): + settings = QSettings() + self._rootDirEdit.setText( settings.value('conf/rootDir') ) + if not self._confFile and settings.value('conf/confFile'): + self._confFile = str( settings.value('conf/confFile') ) + self._conf.load( self._confFile ) + return + + def saveSettings ( self ): + settings = QSettings() + settings.setValue( 'conf/rootDir' , self._rootDirEdit.text() ) + settings.setValue( 'conf/confFile', self._confFile ) + return diff --git a/bootstrap/builder/Highlighter.py b/bootstrap/builder/Highlighter.py index cfe45bfe..95f64705 100644 --- a/bootstrap/builder/Highlighter.py +++ b/bootstrap/builder/Highlighter.py @@ -2,14 +2,14 @@ # -*- mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC/LIP6 2012-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | -# | C o r i o l i s / C h a m s B u i l d e r | +# | T o o l c h a i n B u i l d e r | # | | # | Author : Damien Dupuis | -# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +# | E-mail : Jean-Paul.Chaput@lip6.fr | # | =============================================================== | # | Python : "./builder/Highlighter.py" | # +-----------------------------------------------------------------+ @@ -17,64 +17,61 @@ import re from PyQt4.QtCore import Qt -from PyQt4.QtGui import QFont -from PyQt4.QtGui import QColor -from PyQt4.QtGui import QTextCharFormat -from PyQt4.QtGui import QSyntaxHighlighter +from PyQt4.QtGui import QFont, QColor, QTextCharFormat, QSyntaxHighlighter class Highlighter ( QSyntaxHighlighter ): - - Normal = 0x0001 - Bold = 0x0002 - Italic = 0x0004 - - ttyBackground = QColor.fromRgb( 255, 255, 221 ) # #ffffdd - ttyBlack = QColor.fromRgb( 46, 52, 54 ) # #2e3436 - ttyRed = QColor.fromRgb( 204, 0, 0 ) # #cc0000 - ttyGreen = QColor.fromRgb( 78, 154, 6 ) # #4e9a06 - ttyYellow = QColor.fromRgb( 196, 160, 0 ) # #c4a000 - ttyBlue = QColor.fromRgb( 52, 101, 164 ) # #3465a4 - ttyViolet = QColor.fromRgb( 117, 80, 123 ) # #75507b - ttyCyan = QColor.fromRgb( 6, 152, 154 ) # #06989a - ttyGrey = QColor.fromRgb( 211, 215, 207 ) # #d3d7cf - ttyLightBlack = QColor.fromRgb( 85, 87, 83 ) # #555753 - ttyLightRed = QColor.fromRgb( 239, 41, 41 ) # #ef2929 - ttyLightGreen = QColor.fromRgb( 138, 226, 52 ) # #8ae234 - ttyLightYellow = QColor.fromRgb( 252, 233, 79 ) # #fce94f - ttyLightBlue = QColor.fromRgb( 114, 159, 207 ) # #729fcf - ttyLightViolet = QColor.fromRgb( 173, 127, 168 ) # #ad7fa8 - ttyLightCyan = QColor.fromRgb( 52, 226, 226 ) # #34e2e2 - ttyLightGrey = QColor.fromRgb( 238, 238, 236 ) # #eeeeec - - Rules = [ [ttyLightViolet, Bold , re.compile(r'^Scanning.*'), None] - , [ttyLightRed , Bold , re.compile(r'^Linking.*'), None] - , [ttyLightGreen , Normal , re.compile(r'^\[(?P\s*\d+)%\]\s*(?PBuilding.*)'), None] - , [ttyLightGreen , Bold , re.compile(r'^\[(?P\s*\d+)%\]\s*(?PBuilt target.*)'), None] - , [ttyLightBlue , Normal , re.compile(r'^\[(?P\s*\d+)%\]\s*(?PGenerating.*moc_.*)'), None] - , [ttyLightBlue , Bold , re.compile(r'^Generating.*'), None] - , [ttyLightCyan , Normal , re.compile(r'^Install the project.*'), None] - , [ttyCyan , Bold , re.compile(r'^-- Install.*'), None] - , [ttyCyan , Bold|Italic, re.compile(r'^-- Up-to-date.*'), None] - ] - - def __init__ ( self, parent=None ): - QSyntaxHighlighter.__init__ ( self, parent ) - for rule in Highlighter.Rules: - if not rule[3]: - rule[3] = QTextCharFormat() - rule[3].setForeground( rule[0] ) - if rule[1] & Highlighter.Normal: rule[3].setFontWeight( QFont.Normal ) - if rule[1] & Highlighter.Bold: rule[3].setFontWeight( QFont.Bold ) - if rule[1] & Highlighter.Italic: rule[3].setFontItalic( True ) - return - - def highlightBlock ( self, line ): - for rule in Highlighter.Rules: - m = rule[2].match(line) - if m: - if m.groupdict().has_key('percent'): - self.setFormat( 7, len(line), rule[3] ) - else: - self.setFormat( 0, len(line), rule[3] ) - return + + Normal = 0x0001 + Bold = 0x0002 + Italic = 0x0004 + + ttyBackground = QColor.fromRgb( 255, 255, 221 ) # #ffffdd + ttyBlack = QColor.fromRgb( 46, 52, 54 ) # #2e3436 + ttyRed = QColor.fromRgb( 204, 0, 0 ) # #cc0000 + ttyGreen = QColor.fromRgb( 78, 154, 6 ) # #4e9a06 + ttyYellow = QColor.fromRgb( 196, 160, 0 ) # #c4a000 + ttyBlue = QColor.fromRgb( 52, 101, 164 ) # #3465a4 + ttyViolet = QColor.fromRgb( 117, 80, 123 ) # #75507b + ttyCyan = QColor.fromRgb( 6, 152, 154 ) # #06989a + ttyGrey = QColor.fromRgb( 211, 215, 207 ) # #d3d7cf + ttyLightBlack = QColor.fromRgb( 85, 87, 83 ) # #555753 + ttyLightRed = QColor.fromRgb( 239, 41, 41 ) # #ef2929 + ttyLightGreen = QColor.fromRgb( 138, 226, 52 ) # #8ae234 + ttyLightYellow = QColor.fromRgb( 252, 233, 79 ) # #fce94f + ttyLightBlue = QColor.fromRgb( 114, 159, 207 ) # #729fcf + ttyLightViolet = QColor.fromRgb( 173, 127, 168 ) # #ad7fa8 + ttyLightCyan = QColor.fromRgb( 52, 226, 226 ) # #34e2e2 + ttyLightGrey = QColor.fromRgb( 238, 238, 236 ) # #eeeeec + + Rules = [ [ttyLightViolet, Bold , re.compile(r'^Scanning.*'), None] + , [ttyLightRed , Bold , re.compile(r'^Linking.*'), None] + , [ttyLightGreen , Normal , re.compile(r'^\[(?P\s*\d+)%\]\s*(?PBuilding.*)'), None] + , [ttyLightGreen , Bold , re.compile(r'^\[(?P\s*\d+)%\]\s*(?PBuilt target.*)'), None] + , [ttyLightBlue , Normal , re.compile(r'^\[(?P\s*\d+)%\]\s*(?PGenerating.*moc_.*)'), None] + , [ttyLightBlue , Bold , re.compile(r'^Generating.*'), None] + , [ttyLightCyan , Normal , re.compile(r'^Install the project.*'), None] + , [ttyCyan , Bold , re.compile(r'^-- Install.*'), None] + , [ttyCyan , Bold|Italic, re.compile(r'^-- Up-to-date.*'), None] + ] + + def __init__ ( self, parent=None ): + QSyntaxHighlighter.__init__ ( self, parent ) + for rule in Highlighter.Rules: + if not rule[3]: + rule[3] = QTextCharFormat() + rule[3].setForeground( rule[0] ) + if rule[1] & Highlighter.Normal: rule[3].setFontWeight( QFont.Normal ) + if rule[1] & Highlighter.Bold: rule[3].setFontWeight( QFont.Bold ) + if rule[1] & Highlighter.Italic: rule[3].setFontItalic( True ) + return + + def highlightBlock ( self, line ): + for rule in Highlighter.Rules: + m = rule[2].match(line) + if m: + if 'percent' in m.groupdict(): + self.setFormat( 7, len(line), rule[3] ) + else: + self.setFormat( 0, len(line), rule[3] ) + return diff --git a/bootstrap/builder/OptionsWidget.py b/bootstrap/builder/OptionsWidget.py index 7ce71d83..6f91e28c 100644 --- a/bootstrap/builder/OptionsWidget.py +++ b/bootstrap/builder/OptionsWidget.py @@ -2,14 +2,14 @@ # -*- mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC/LIP6 2012-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | -# | C o r i o l i s / C h a m s B u i l d e r | +# | T o o l c h a i n B u i l d e r | # | | # | Author : Damien Dupuis | -# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +# | E-mail : Jean-Paul.Chaput@lip6.fr | # | =============================================================== | # | Python : "./builder/OptionsWidget.py" | # +-----------------------------------------------------------------+ @@ -17,176 +17,163 @@ import re import subprocess -from PyQt4.QtCore import Qt -from PyQt4.QtCore import pyqtSignal -from PyQt4.QtCore import QSettings -from PyQt4.QtGui import QColor -from PyQt4.QtGui import QWidget -from PyQt4.QtGui import QPushButton -from PyQt4.QtGui import QCheckBox -from PyQt4.QtGui import QGroupBox -from PyQt4.QtGui import QButtonGroup -from PyQt4.QtGui import QVBoxLayout -from PyQt4.QtGui import QHBoxLayout -from PyQt4.QtGui import QGridLayout -from PyQt4.QtGui import QScrollArea -from PyQt4.QtGui import QComboBox -from builder.Project import Project -from builder.ConfigureWidget import ConfigureWidget -from builder.ProjectWidgets import ProjectWidgets +from PyQt4.QtCore import Qt, pyqtSignal, QSettings +from PyQt4.QtGui import QColor, QWidget, QPushButton, \ + QCheckBox, QGroupBox, QButtonGroup, \ + QVBoxLayout, QHBoxLayout, QGridLayout, \ + QScrollArea, QComboBox +from .Project import Project +from .ConfigureWidget import ConfigureWidget +from .ProjectWidgets import ProjectWidgets class OptionsWidget ( QWidget ): - - progress = pyqtSignal(int) - - def __init__ ( self, conf, parent=None ): - QWidget.__init__ ( self, parent ) - self._conf = conf - self._projects = [] - for project in self._conf.projects: - self._projects += [ ProjectWidgets(project) ] + + progress = pyqtSignal(int) + + def __init__ ( self, conf, parent=None ): + QWidget.__init__ ( self, parent ) + self._conf = conf + self._projects = [] + for project in self._conf.projects: + self._projects += [ ProjectWidgets(project) ] + + gLayout = QGridLayout() + column = 0 + for iproject in range(len(self._projects)): + column += self._projects[iproject].addToLayout( column, gLayout ) + toolsGroup = QGroupBox( 'Projects && Tools' ) + toolsGroup.setLayout( gLayout ) - gLayout = QGridLayout() - column = 0 - for iproject in range(len(self._projects)): - column += self._projects[iproject].addToLayout( column, gLayout ) - toolsGroup = QGroupBox( 'Projects && Tools' ) - toolsGroup.setLayout( gLayout ) - - scrollToolsGroup = QScrollArea() - scrollToolsGroup.setMinimumHeight( 350 ) - #scrollToolsGroup.setVerticalScrollBarPolicy( Qt.ScrollBarAlwaysOn ) - scrollToolsGroup.setWidget( toolsGroup ) - - self._buildMode = QComboBox() - self._buildMode.addItems( ('Release', 'Debug') ) - #self._svnUpdate = QCheckBox( 'SVN Update' ) - #self._svnStatus = QCheckBox( 'SVN Status' ) - self._make = QCheckBox( 'Build' ) - self._enableDoc = QCheckBox( 'Build Documentation' ) - self._devtoolset = QCheckBox( 'Build with devtoolset 8' ) - self._qt5 = QCheckBox( 'Build with Qt 5 (Qt 4 default)' ) - self._noCache = QCheckBox( 'Remove previous CMake cache' ) - self._rmBuild = QCheckBox( 'Cleanup Build Directory' ) - self._verbose = QCheckBox( 'Display Compiler Commands' ) - self._threads = QComboBox() - for j in range(16): - self._threads.addItem( '-j%d'%(j+1), j+1 ) - - self._commandGroup = QButtonGroup() - self._commandGroup.setExclusive( True ) - #self._commandGroup.addButton( self._svnUpdate ) - #self._commandGroup.addButton( self._svnStatus ) - self._commandGroup.addButton( self._make ) - - vLayout = QVBoxLayout() - #vLayout.addWidget( self._svnUpdate ) - #vLayout.addWidget( self._svnStatus ) - vLayout.addWidget( self._make ) - vLayout.addStretch() - commandGroup = QGroupBox( 'Command' ) - commandGroup.setLayout( vLayout ) - - vLayout = QVBoxLayout() - vLayout.addWidget( self._buildMode ) - vLayout.addWidget( self._enableDoc ) - vLayout.addWidget( self._devtoolset ) - vLayout.addWidget( self._qt5 ) - vLayout.addWidget( self._noCache ) - vLayout.addWidget( self._rmBuild ) - vLayout.addStretch() - optionsGroup = QGroupBox( 'Command Options' ) - optionsGroup.setLayout( vLayout ) - - vLayout = QVBoxLayout() - vLayout.addWidget( self._threads ) - vLayout.addWidget( self._verbose ) - vLayout.addStretch() - miscGroup = QGroupBox( 'Misc. Options' ) - miscGroup.setLayout( vLayout ) - - hLayout = QHBoxLayout() - hLayout.addWidget( commandGroup ) - hLayout.addWidget( optionsGroup ) - hLayout.addWidget( miscGroup ) - commands = QWidget() - commands.setLayout( hLayout ) - - vLayout = QVBoxLayout() - vLayout.addWidget( commands ) - vLayout.addWidget( scrollToolsGroup ) - vLayout.addStretch() - self.setLayout( vLayout ) - - self.readSettings() - return - - - def _getProjects ( self ): return self._projects - def _getBuildMode ( self ): return self._buildMode.currentText() - def _getThreads ( self ): return self._threads.currentText() - #def _getSvnUpdate ( self ): return self._svnUpdate.isChecked() - #def _getSvnStatus ( self ): return self._svnStatus.isChecked() - def _getMake ( self ): return self._make.isChecked() - def _getEnableDoc ( self ): return self._enableDoc.isChecked() - def _getDevtoolset ( self ): return self._devtoolset.isChecked() - def _getQt5 ( self ): return self._qt5.isChecked() - def _getNoCache ( self ): return self._noCache.isChecked() - def _getRmBuild ( self ): return self._rmBuild.isChecked() - def _getVerbose ( self ): return self._verbose.isChecked() - - projects = property( _getProjects ) - buildMode = property( _getBuildMode ) - threads = property( _getThreads ) - #svnUpdate = property( _getSvnUpdate ) - #svnStatus = property( _getSvnStatus ) - make = property( _getMake ) - enableDoc = property( _getEnableDoc ) - devtoolset = property( _getDevtoolset ) - qt5 = property( _getQt5 ) - noCache = property( _getNoCache ) - rmBuild = property( _getRmBuild ) - verbose = property( _getVerbose ) - - - def readSettings ( self ): - settings = QSettings() - #self._svnUpdate .setChecked( settings.value('builder/svnUpdate').toBool() ) - #self._svnStatus .setChecked( settings.value('builder/svnStatus').toBool() ) - self._make .setChecked( settings.value('builder/make' ).toBool() ) - self._enableDoc .setChecked( settings.value('builder/enableDoc').toBool() ) - self._devtoolset .setChecked( settings.value('builder/devtoolset').toBool() ) - self._qt5 .setChecked( settings.value('builder/qt5').toBool() ) - self._noCache .setChecked( settings.value('builder/noCache' ).toBool() ) - self._rmBuild .setChecked( settings.value('builder/rmBuild' ).toBool() ) - self._verbose .setChecked( settings.value('builder/verbose' ).toBool() ) - - buildModeName = settings.value('builder/buildMode').toString() - index = self._buildMode.findText( buildModeName ) - if index >= 0: self._buildMode.setCurrentIndex( index ) - - threads = settings.value('builder/threads').toString() - index = self._threads.findText( threads ) - if index >= 0: self._threads.setCurrentIndex( index ) - - for project in self._projects: project.readFromSettings() - return - - - def saveSettings ( self ): - settings = QSettings() - #settings.setValue('builder/svnUpdate' , self._svnUpdate .isChecked() ) - #settings.setValue('builder/svnStatus' , self._svnStatus .isChecked() ) - settings.setValue('builder/make' , self._make .isChecked() ) - settings.setValue('builder/enableDoc' , self._enableDoc .isChecked() ) - settings.setValue('builder/devtoolset', self._devtoolset.isChecked() ) - settings.setValue('builder/qt5' , self._qt5 .isChecked() ) - settings.setValue('builder/buildMode' , self._buildMode .currentText() ) - settings.setValue('builder/noCache' , self._noCache .isChecked() ) - settings.setValue('builder/rmBuild' , self._rmBuild .isChecked() ) - settings.setValue('builder/verbose' , self._verbose .isChecked() ) - settings.setValue('builder/threads' , self._threads .currentText() ) - - for project in self._projects: project.saveToSettings() - return + scrollToolsGroup = QScrollArea() + scrollToolsGroup.setMinimumHeight( 350 ) + #scrollToolsGroup.setVerticalScrollBarPolicy( Qt.ScrollBarAlwaysOn ) + scrollToolsGroup.setWidget( toolsGroup ) + + self._buildMode = QComboBox() + self._buildMode.addItems( ('Release', 'Debug') ) + #self._svnUpdate = QCheckBox( 'SVN Update' ) + #self._svnStatus = QCheckBox( 'SVN Status' ) + self._make = QCheckBox( 'Build' ) + self._enableDoc = QCheckBox( 'Build Documentation' ) + self._devtoolset = QCheckBox( 'Build with devtoolset 8' ) + self._qt5 = QCheckBox( 'Build with Qt 5 (Qt 4 default)' ) + self._noCache = QCheckBox( 'Remove previous CMake cache' ) + self._rmBuild = QCheckBox( 'Cleanup Build Directory' ) + self._verbose = QCheckBox( 'Display Compiler Commands' ) + self._threads = QComboBox() + for j in range(16): + self._threads.addItem( '-j%d'%(j+1), j+1 ) + + self._commandGroup = QButtonGroup() + self._commandGroup.setExclusive( True ) + #self._commandGroup.addButton( self._svnUpdate ) + #self._commandGroup.addButton( self._svnStatus ) + self._commandGroup.addButton( self._make ) + + vLayout = QVBoxLayout() + #vLayout.addWidget( self._svnUpdate ) + #vLayout.addWidget( self._svnStatus ) + vLayout.addWidget( self._make ) + vLayout.addStretch() + commandGroup = QGroupBox( 'Command' ) + commandGroup.setLayout( vLayout ) + + vLayout = QVBoxLayout() + vLayout.addWidget( self._buildMode ) + vLayout.addWidget( self._enableDoc ) + vLayout.addWidget( self._devtoolset ) + vLayout.addWidget( self._qt5 ) + vLayout.addWidget( self._noCache ) + vLayout.addWidget( self._rmBuild ) + vLayout.addStretch() + optionsGroup = QGroupBox( 'Command Options' ) + optionsGroup.setLayout( vLayout ) + + vLayout = QVBoxLayout() + vLayout.addWidget( self._threads ) + vLayout.addWidget( self._verbose ) + vLayout.addStretch() + miscGroup = QGroupBox( 'Misc. Options' ) + miscGroup.setLayout( vLayout ) + + hLayout = QHBoxLayout() + hLayout.addWidget( commandGroup ) + hLayout.addWidget( optionsGroup ) + hLayout.addWidget( miscGroup ) + commands = QWidget() + commands.setLayout( hLayout ) + + vLayout = QVBoxLayout() + vLayout.addWidget( commands ) + vLayout.addWidget( scrollToolsGroup ) + vLayout.addStretch() + self.setLayout( vLayout ) + + self.readSettings() + return + + def _getProjects ( self ): return self._projects + def _getBuildMode ( self ): return self._buildMode.currentText() + def _getThreads ( self ): return self._threads.currentText() + #def _getSvnUpdate ( self ): return self._svnUpdate.isChecked() + #def _getSvnStatus ( self ): return self._svnStatus.isChecked() + def _getMake ( self ): return self._make.isChecked() + def _getEnableDoc ( self ): return self._enableDoc.isChecked() + def _getDevtoolset ( self ): return self._devtoolset.isChecked() + def _getQt5 ( self ): return self._qt5.isChecked() + def _getNoCache ( self ): return self._noCache.isChecked() + def _getRmBuild ( self ): return self._rmBuild.isChecked() + def _getVerbose ( self ): return self._verbose.isChecked() + + projects = property( _getProjects ) + buildMode = property( _getBuildMode ) + threads = property( _getThreads ) + #svnUpdate = property( _getSvnUpdate ) + #svnStatus = property( _getSvnStatus ) + make = property( _getMake ) + enableDoc = property( _getEnableDoc ) + devtoolset = property( _getDevtoolset ) + qt5 = property( _getQt5 ) + noCache = property( _getNoCache ) + rmBuild = property( _getRmBuild ) + verbose = property( _getVerbose ) + + def readSettings ( self ): + settings = QSettings() + #self._svnUpdate .setChecked( bool(settings.value('builder/svnUpdate' )) ) + #self._svnStatus .setChecked( bool(settings.value('builder/svnStatus' )) ) + self._make .setChecked( bool(settings.value('builder/make' )) ) + self._enableDoc .setChecked( bool(settings.value('builder/enableDoc' )) ) + self._devtoolset .setChecked( bool(settings.value('builder/devtoolset')) ) + self._qt5 .setChecked( bool(settings.value('builder/qt5' )) ) + self._noCache .setChecked( bool(settings.value('builder/noCache' )) ) + self._rmBuild .setChecked( bool(settings.value('builder/rmBuild' )) ) + self._verbose .setChecked( bool(settings.value('builder/verbose' )) ) + + buildModeName = settings.value('builder/buildMode') + index = self._buildMode.findText( buildModeName ) + if index >= 0: self._buildMode.setCurrentIndex( index ) + + threads = settings.value('builder/threads') + index = self._threads.findText( threads ) + if index >= 0: self._threads.setCurrentIndex( index ) + + for project in self._projects: project.readFromSettings() + return + + def saveSettings ( self ): + settings = QSettings() + #settings.setValue('builder/svnUpdate' , self._svnUpdate .isChecked() ) + #settings.setValue('builder/svnStatus' , self._svnStatus .isChecked() ) + settings.setValue('builder/make' , self._make .isChecked() ) + settings.setValue('builder/enableDoc' , self._enableDoc .isChecked() ) + settings.setValue('builder/devtoolset', self._devtoolset.isChecked() ) + settings.setValue('builder/qt5' , self._qt5 .isChecked() ) + settings.setValue('builder/buildMode' , self._buildMode .currentText() ) + settings.setValue('builder/noCache' , self._noCache .isChecked() ) + settings.setValue('builder/rmBuild' , self._rmBuild .isChecked() ) + settings.setValue('builder/verbose' , self._verbose .isChecked() ) + settings.setValue('builder/threads' , self._threads .currentText() ) + for project in self._projects: project.saveToSettings() + return diff --git a/bootstrap/builder/Project.py b/bootstrap/builder/Project.py index b41c522f..f5a8e6e4 100644 --- a/bootstrap/builder/Project.py +++ b/bootstrap/builder/Project.py @@ -2,14 +2,14 @@ # -*- mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC/LIP6 2012-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | -# | C o r i o l i s / C h a m s B u i l d e r | +# | T o o l c h a i n B u i l d e r | # | | # | Author : Jean-Paul Chaput | -# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +# | E-mail : Jean-Paul.Chaput@lip6.fr | # | =============================================================== | # | Python : "./builder/Project.py" | # +-----------------------------------------------------------------+ diff --git a/bootstrap/builder/ProjectWidgets.py b/bootstrap/builder/ProjectWidgets.py index 32b7bf6e..e0bd3d3f 100644 --- a/bootstrap/builder/ProjectWidgets.py +++ b/bootstrap/builder/ProjectWidgets.py @@ -2,93 +2,83 @@ # -*- mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC/LIP6 2012-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | -# | C o r i o l i s / C h a m s B u i l d e r | +# | T o o l c h a i n B u i l d e r | # | | # | Author : Jean-Paul Chaput | -# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +# | E-mail : Jean-Paul.Chaput@lip6.fr | # | =============================================================== | # | Python : "./builder/ProjectWidget.py" | # +-----------------------------------------------------------------+ import string -from PyQt4.QtCore import Qt -from PyQt4.QtCore import QObject -from PyQt4.QtCore import QSettings -from PyQt4.QtGui import QSizePolicy -from PyQt4.QtGui import QFrame -from PyQt4.QtGui import QPushButton -from PyQt4.QtGui import QCheckBox -from PyQt4.QtGui import QLabel +from PyQt4.QtCore import Qt, QObject, QSettings +from PyQt4.QtGui import QSizePolicy, QFrame, QPushButton, QCheckBox, \ + QLabel class ProjectWidgets ( QObject ): - - def __init__ ( self, project ): - self._project = project - self._projectButton = QLabel( string.capwords(self._project.getName()) ) - self._projectButton.setStyleSheet( 'font-weight: bold;' ) - self._projectButton.setFrameShape( QFrame.Box ) - self._projectButton.setSizePolicy( QSizePolicy.Expanding, QSizePolicy.Preferred ) - - self._toolsCheckBoxes = [] - for tool in self._project.getTools(): - self._toolsCheckBoxes += [ QCheckBox( tool.name ) ] - - #self._projectButton.clicked.connect( self.toggleToolsVisibility ) - return - - def _getProjectButton ( self ): return self._projectButton - def _getToolsCheckBoxes ( self ): return self._toolsCheckBoxes - - def _getActives ( self ): - actives = [] - for toolCb in self._toolsCheckBoxes: - if toolCb.isChecked(): actives += [ str(toolCb.text()) ] - return actives - - projectButton = property( _getProjectButton ) - toolsCheckBoxes = property( _getToolsCheckBoxes ) - actives = property( _getActives ) - - def addToLayout( self, column, layout ): - toolsNb = len(self._toolsCheckBoxes) - if toolsNb <= 10: - layout.addWidget( self._projectButton, 0, column, Qt.AlignLeft ) - for row in range(toolsNb): - layout.addWidget( self._toolsCheckBoxes[row], row+1, column, Qt.AlignTop ) - return 1 - - columnSpan = toolsNb / 10 - if toolsNb % 10: columnSpan += 1 - - layout.addWidget( self._projectButton, 0, column, 1, columnSpan, Qt.AlignJustify ) - for row in range(toolsNb): - if row and row % 10 == 0: column += 1 - layout.addWidget( self._toolsCheckBoxes[row], row%10+1, column, Qt.AlignTop ) - - return columnSpan - - #def toggleToolsVisibility ( self ): - # self._visibleTools = not self._visibleTools - # for toolCb in self._toolsCheckBoxes: - # toolCb.setVisible( self._visibleTools ) - # return - - def readFromSettings ( self ): - settings = QSettings() - for toolCb in self._toolsCheckBoxes: - toolId = 'tools/'+self._project.getName()+'/'+toolCb.text() - toolCb.setChecked( settings.value(toolId).toBool() ) - return - - def saveToSettings ( self ): - settings = QSettings() - for toolCb in self._toolsCheckBoxes: - toolId = 'tools/'+self._project.getName()+'/'+toolCb.text() - settings.setValue( toolId, toolCb.isChecked() ) - return + + def __init__ ( self, project ): + self._project = project + self._projectButton = QLabel( string.capwords(self._project.getName()) ) + self._projectButton.setStyleSheet( 'font-weight: bold;' ) + self._projectButton.setFrameShape( QFrame.Box ) + self._projectButton.setSizePolicy( QSizePolicy.Expanding, QSizePolicy.Preferred ) + self._toolsCheckBoxes = [] + for tool in self._project.getTools(): + self._toolsCheckBoxes += [ QCheckBox( tool.name ) ] + #self._projectButton.clicked.connect( self.toggleToolsVisibility ) + return + + def _getProjectButton ( self ): return self._projectButton + def _getToolsCheckBoxes ( self ): return self._toolsCheckBoxes + + def _getActives ( self ): + actives = [] + for toolCb in self._toolsCheckBoxes: + if toolCb.isChecked(): actives += [ str(toolCb.text()) ] + return actives + + projectButton = property( _getProjectButton ) + toolsCheckBoxes = property( _getToolsCheckBoxes ) + actives = property( _getActives ) + + def addToLayout( self, column, layout ): + toolsNb = len(self._toolsCheckBoxes) + if toolsNb <= 10: + layout.addWidget( self._projectButton, 0, column, Qt.AlignLeft ) + for row in range(toolsNb): + layout.addWidget( self._toolsCheckBoxes[row], row+1, column, Qt.AlignTop ) + return 1 + columnSpan = toolsNb / 10 + if toolsNb % 10: columnSpan += 1 + layout.addWidget( self._projectButton, 0, column, 1, columnSpan, Qt.AlignJustify ) + for row in range(toolsNb): + if row and row % 10 == 0: column += 1 + layout.addWidget( self._toolsCheckBoxes[row], row%10+1, column, Qt.AlignTop ) + return columnSpan + + #def toggleToolsVisibility ( self ): + # self._visibleTools = not self._visibleTools + # for toolCb in self._toolsCheckBoxes: + # toolCb.setVisible( self._visibleTools ) + # return + + def readFromSettings ( self ): + settings = QSettings() + for toolCb in self._toolsCheckBoxes: + toolId = 'tools/'+self._project.getName()+'/'+toolCb.text() + toolCb.setChecked( bool(settings.value(toolId)) ) + return + + def saveToSettings ( self ): + settings = QSettings() + for toolCb in self._toolsCheckBoxes: + toolId = 'tools/'+self._project.getName()+'/'+toolCb.text() + settings.setValue( toolId, toolCb.isChecked() ) + return diff --git a/bootstrap/builder/__init__.py b/bootstrap/builder/__init__.py index 947787ce..0ae343f5 100644 --- a/bootstrap/builder/__init__.py +++ b/bootstrap/builder/__init__.py @@ -2,14 +2,14 @@ # -*- mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC/LIP6 2012-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | -# | C o r i o l i s / C h a m s B u i l d e r | +# | T o o l c h a i n B u i l d e r | # | | # | Author : Damien Dupuis | -# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +# | E-mail : Jean-Paul.Chaput@lip6.fr | # | =============================================================== | # | Python : "./builder/__init__.py" | # +-----------------------------------------------------------------+ @@ -21,8 +21,7 @@ class ErrorMessage ( Exception ): def __init__ ( self, code, *arguments ): self._code = code - self._errors = [ 'Malformed call to ErrorMessage()' - , '%s' % str(arguments) ] + self._errors = [ 'Malformed call to ErrorMessage()', '{}'.format(arguments) ] text = None if len(arguments) == 1: @@ -31,7 +30,6 @@ class ErrorMessage ( Exception ): self._errors = arguments[0] elif len(arguments) > 1: text = list(arguments) - if text: self._errors = [] while len(text[0]) == 0: del text[0] @@ -50,11 +48,10 @@ class ErrorMessage ( Exception ): def __str__ ( self ): if not isinstance(self._errors,list): return "[ERROR] %s" % self._errors - formatted = "\n" for i in range(len(self._errors)): - if i == 0: formatted += "[ERROR] %s" % self._errors[i] - else: formatted += " %s" % self._errors[i] + if i == 0: formatted += "[ERROR] {}".format(self._errors[i] ) + else: formatted += " {}".format(self._errors[i] ) if i+1 < len(self._errors): formatted += "\n" return formatted @@ -69,7 +66,7 @@ class ErrorMessage ( Exception ): return def terminate ( self ): - print self + print( self ) sys.exit(self._code) def _getCode ( self ): return self._code diff --git a/bootstrap/ccb.py b/bootstrap/ccb.py index fc130c09..d70dba08 100755 --- a/bootstrap/ccb.py +++ b/bootstrap/ccb.py @@ -1,17 +1,17 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # -*- mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2008-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2008-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | -# | C o r i o l i s / C h a m s B u i l d e r | +# | T o o l c h a i n B u i l d e r | # | | # | Authors : Jean-Paul Chaput | # | Damien Dupuis | -# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +# | E-mail : Jean-Paul.Chaput@lip6.fr | # | =============================================================== | # | Python : "./ccb.py" | # +-----------------------------------------------------------------+ @@ -19,37 +19,36 @@ showTrace = True try: - import sys - import os.path - import optparse - import traceback - import distutils.sysconfig - import subprocess - import re -except ImportError, e: - module = str(e).split()[-1] - - print '[ERROR] The <%s> python module or symbol cannot be loaded.' % module - print ' Please check your standard Python installation, it may have problems.' - quit() + import sys + import os.path + import optparse + import traceback + import distutils.sysconfig + import subprocess + import re +except ImportError as e: + module = str(e).split()[-1] + print( '[ERROR] The "{}" python module or symbol cannot be loaded.'.format(module) ) + print( ' Please check your standard Python installation, it may have problems.' ) + quit() def safeImport ( moduleName, symbol=None ): - try: - module = __import__( moduleName, globals(), locals(), symbol ) - except ImportError, e: - print '[ERROR] The <%s> python module or symbol cannot be loaded.' % moduleName - print ' Please check the integrity of the package.' - if showTrace: traceback.print_tb(sys.exc_info()[2]) - sys.exit(1) - except Exception, e: - print '[ERROR] An exception occured while importing module <%s>. Is is a bug,' % moduleName - print ' you may want to report it...' - print ' %s' % e - if showTrace: traceback.print_tb(sys.exc_info()[2]) - sys.exit(2) - if symbol: return module.__dict__[symbol] - return module + try: + module = __import__( moduleName, globals(), locals(), symbol ) + except ImportError as e: + print( '[ERROR] The "{}" python module or symbol cannot be loaded.'.format(moduleName) ) + print( ' Please check the integrity of the "coriolis/boostrap" package.' ) + if showTrace: traceback.print_tb(sys.exc_info()[2]) + sys.exit(1) + except Exception as e: + print( '[ERROR] An exception occured while importing module "{}". Is is a bug,'.format(moduleName) ) + print( ' you may want to report it...' ) + print( ' {}'.format(e) ) + if showTrace: traceback.print_tb(sys.exc_info()[2]) + sys.exit(2) + if symbol: return module.__dict__[symbol] + return module def checkCMake (): @@ -57,8 +56,8 @@ def checkCMake (): (pid,status) = os.waitpid ( child.pid, 0 ) status >>= 8 if status != 0: - print '[ERROR] The program has not been found, please install it.' - sys.exit(1) + print( '[ERROR] The "cmake" program has not been found, please install it.' ) + sys.exit(1) def guessOs (): @@ -85,62 +84,60 @@ def guessOs (): uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE ) lines = uname.stdout.readlines() - - if osSlsoc7x_64.match(lines[0]): + line = lines[0].decode( 'ascii' ) + if osSlsoc7x_64.match(line): osType = "Linux.el7_64" libDir = "lib64" - elif osSlsoc6x_64.match(lines[0]): + elif osSlsoc6x_64.match(line): osType = "Linux.slsoc6x_64" libDir = "lib64" - elif osSlsoc6x.match(lines[0]): + elif osSlsoc6x.match(line): osType = "Linux.slsoc6x" - elif osSLSoC5x_64.match(lines[0]): + elif osSLSoC5x_64.match(line): osType = "Linux.SLSoC5x_64" libDir = "lib64" - elif osSLSoC5x .match(lines[0]): + elif osSLSoC5x .match(line): osType = "Linux.SLSoC5x" - elif osFedora_64.match(lines[0]): + elif osFedora_64.match(line): osType = "Linux.fc_64" libDir = "lib64" - elif osFedora .match(lines[0]): + elif osFedora .match(line): osType = "Linux.fc" - elif osLinux_64.match(lines[0]): + elif osLinux_64.match(line): osType = "Linux.x86_64" libDir = "lib64" - elif osLinux .match(lines[0]): + elif osLinux .match(line): osType = "Linux.i386" - elif osDarwin.match(lines[0]): + elif osDarwin.match(line): osType = "Darwin" - elif osFreeBSD8x_amd64.match(lines[0]): + elif osFreeBSD8x_amd64.match(line): osType = "FreeBSD.8x.amd64" libDir = "lib64" - elif osFreeBSD8x_64.match(lines[0]): + elif osFreeBSD8x_64.match(line): osType = "FreeBSD.8x.x86_64" libDir = "lib64" - elif osFreeBSD8x.match(lines[0]): + elif osFreeBSD8x.match(line): osType = "FreeBSD.8x.i386" - elif osCygwinW7_64.match(lines[0]): + elif osCygwinW7_64.match(line): osType = "Cygwin.W7_64" libDir = "lib64" - elif osCygwinW7.match(lines[0]): + elif osCygwinW7.match(line): osType = "Cygwin.W7" - elif osCygwinW8_64.match(lines[0]): + elif osCygwinW8_64.match(line): osType = "Cygwin.W8_64" libDir = "lib64" - elif osCygwinW8.match(lines[0]): + elif osCygwinW8.match(line): osType = "Cygwin.W8" - elif osCygwinW10_64.match(lines[0]): + elif osCygwinW10_64.match(line): osType = "Cygwin.W10_64" libDir = "lib64" - elif osCygwinW10.match(lines[0]): + elif osCygwinW10.match(line): osType = "Cygwin.W10" else: uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE ) osType = uname.stdout.readlines()[0][:-1] - - print "[WARNING] Unrecognized OS: \"%s\"." % lines[0][:-1] - print " (using: \"%s\")" % osType - + print( '[WARNING] Unrecognized OS: "{}".'.format(lines[0][:-1]) ) + print( ' (using: "{}")'.format(osType) ) return osType, libDir @@ -151,10 +148,9 @@ def guessPythonSitePackage (): def autoLocate (): osType, libDir = guessOs() - print 'Building for target: <%s>' % osType - print 'Making an educated guess to locate myself:' - sitePackage = guessPythonSitePackage() - + print( 'Building for target: "{}"'.format(osType) ) + print( 'Making an educated guess to locate myself:' ) + sitePackage = guessPythonSitePackage() builderDir = None locations = [ os.path.abspath(os.path.dirname(sys.argv[0])) , os.environ['HOME']+'/coriolis-2.x/src/coriolis/bootstrap' @@ -163,26 +159,22 @@ def autoLocate (): , os.environ['HOME']+'/coriolis-2.x/'+osType+'/Release.Shared/install/'+libDir+'/'+sitePackage , '/users/outil/coriolis/coriolis-2.x/'+osType+'/Release.Shared/install/'+libDir+'/'+sitePackage ] - for location in locations: - print ' <%s>' % location, + print( ' "{}" '.format(location), end='' ) if os.path.isfile(location + '/builder/__init__.py'): if not builderDir: builderDir = location - print '(Found*)' + print( '(Found*)' ) else: - print '(Found)' + print( '(Found)' ) else: - print '(No)' - + print( '(No)' ) if not builderDir: - print '[ERROR] Failed to locate the builder modules in any of the normal pathes.' - print ' Please check your Coriolis/Bootsrap installation.' + print( '[ERROR] Failed to locate the builder modules in any of the normal pathes.' ) + print( ' Please check your Coriolis/Bootsrap installation.' ) if showTrace: traceback.print_tb(sys.exc_info()[2]) sys.exit(1) - sys.path.insert( 0, builderDir ) - return @@ -193,125 +185,117 @@ autoLocate() checkCMake() parser = optparse.OptionParser () -parser.add_option ( "-g", "--gui" , action="store_true" , dest="gui" , help="Lauch the graphical interface." ) -# Build relateds. -parser.add_option ( "-c", "--conf" , type="string", dest="conf" , help="Fichier de configuration." ) -parser.add_option ( "--show-conf" , action="store_true" , dest="showConf" , help="Display the Project/Tools configuration, then exit." ) -parser.add_option ( "-q", "--quiet" , action="store_true" , dest="quiet" , help="Do not print all the informative messages." ) -parser.add_option ( "-r", "--release" , action="store_true" , dest="release" , help="Build a aka optimized version." ) -parser.add_option ( "-d", "--debug" , action="store_true" , dest="debug" , help="Build a aka (-g) version." ) -parser.add_option ( "-s", "--static" , action="store_true" , dest="static" , help="Try to link statically, as much as possible." ) -parser.add_option ( "--doc" , action="store_true" , dest="doc" , help="Enable the documentation building (uses with -j1)." ) -parser.add_option ( "-v", "--verbose" , action="store_true" , dest="verboseMakefile" , help="Tells CMake to print all compilation commands." ) -parser.add_option ( "--root" , action="store" , type="string", dest="rootDir" , help="The root directory (default: <~/coriolis-2.x/>)." ) -parser.add_option ( "--no-build" , action="store_true" , dest="noBuild" , help="Do *not* build anything (by default: build)." ) -parser.add_option ( "--no-cache" , action="store_true" , dest="noCache" , help="Remove previous CMake cache before building." ) -parser.add_option ( "--rm-build" , action="store_true" , dest="rmBuild" , help="Remove previous build directoty before building." ) -parser.add_option ( "--macports" , action="store_true" , dest="macports" , help="Build against MacPorts." ) -parser.add_option ( "--devtoolset" , action="store" , type="int" , dest="devtoolset" , help="Build against TUV Dev Toolset N." ) -parser.add_option ( "--llvm-toolset" , action="store" , type="int" , dest="llvmtoolset" , help="Build against TUV Dev LLVM Toolset N." ) -parser.add_option ( "--qt5" , action="store_true" , dest="qt5" , help="Build against Qt 5 (default: Qt 4)." ) -parser.add_option ( "--bfd" , action="store_true" , dest="bfd" , help="Build against Qt 5 (default: Qt 4)." ) -parser.add_option ( "--openmp" , action="store_true" , dest="openmp" , help="Enable the use of OpenMP in Gcc." ) -parser.add_option ( "--ninja" , action="store_true" , dest="ninja" , help="Use Ninja instead of UNIX Makefile." ) -parser.add_option ( "--clang" , action="store_true" , dest="clang" , help="Force use of Clang C/C++ compiler instead of system default." ) -parser.add_option ( "--make" , action="store" , type="string", dest="makeArguments", help="Arguments to pass to make (ex: \"-j4 install\")." ) -parser.add_option ( "--project" , action="append" , type="string", dest="projects" , help="The name of a project to build (may appears any number of time)." ) -parser.add_option ( "-t", "--tool" , action="append" , type="string", dest="tools" , help="The name of a tool to build (may appears any number of time)." ) +parser.add_option ( "-g", "--gui" , action="store_true" , dest="gui" , help="Lauch the graphical interface." ) +# Build relateds. +parser.add_option ( "-c", "--conf" , type="string", dest="conf" , help="Fichier de configuration." ) +parser.add_option ( "--show-conf" , action="store_true" , dest="showConf" , help="Display the Project/Tools configuration, then exit." ) +parser.add_option ( "-q", "--quiet" , action="store_true" , dest="quiet" , help="Do not print all the informative messages." ) +parser.add_option ( "-r", "--release" , action="store_true" , dest="release" , help="Build a aka optimized version." ) +parser.add_option ( "-d", "--debug" , action="store_true" , dest="debug" , help="Build a aka (-g) version." ) +parser.add_option ( "-s", "--static" , action="store_true" , dest="static" , help="Try to link statically, as much as possible." ) +parser.add_option ( "--doc" , action="store_true" , dest="doc" , help="Enable the documentation building (uses with -j1)." ) +parser.add_option ( "-v", "--verbose" , action="store_true" , dest="verboseMakefile", help="Tells CMake to print all compilation commands." ) +parser.add_option ( "--root" , action="store" , type="string", dest="rootDir" , help="The root directory (default: <~/coriolis-2.x/>)." ) +parser.add_option ( "--no-build" , action="store_true" , dest="noBuild" , help="Do *not* build anything (by default: build)." ) +parser.add_option ( "--no-cache" , action="store_true" , dest="noCache" , help="Remove previous CMake cache before building." ) +parser.add_option ( "--rm-build" , action="store_true" , dest="rmBuild" , help="Remove previous build directoty before building." ) +parser.add_option ( "--macports" , action="store_true" , dest="macports" , help="Build against MacPorts." ) +parser.add_option ( "--devtoolset" , action="store" , type="int" , dest="devtoolset" , help="Build against TUV Dev Toolset N." ) +parser.add_option ( "--llvm-toolset" , action="store" , type="int" , dest="llvmtoolset" , help="Build against TUV Dev LLVM Toolset N." ) +parser.add_option ( "--qt5" , action="store_true" , dest="qt5" , help="Build against Qt 5 (default: Qt 4)." ) +parser.add_option ( "--bfd" , action="store_true" , dest="bfd" , help="Build against Qt 5 (default: Qt 4)." ) +parser.add_option ( "--openmp" , action="store_true" , dest="openmp" , help="Enable the use of OpenMP in Gcc." ) +parser.add_option ( "--ninja" , action="store_true" , dest="ninja" , help="Use Ninja instead of UNIX Makefile." ) +parser.add_option ( "--clang" , action="store_true" , dest="clang" , help="Force use of Clang C/C++ compiler instead of system default." ) +parser.add_option ( "--make" , action="store" , type="string", dest="makeArguments" , help="Arguments to pass to make (ex: \"-j4 install\")." ) +parser.add_option ( "--project" , action="append" , type="string", dest="projects" , help="The name of a project to build (may appears any number of time)." ) +parser.add_option ( "-t", "--tool" , action="append" , type="string", dest="tools" , help="The name of a tool to build (may appears any number of time)." ) # SVN repository relateds. # Have to be ported to Git. -#parser.add_option ( "--svn-tag" , action="store" , type="string", dest="svnTag" , help="Explicitly select a SVN tag (for SVN related commands)." ) -#parser.add_option ( "--svn-method" , action="store" , type="string", dest="svnMethod" , help="Allows to sets the svn checkout method (svn+ssh://coriolis.soc.lip6.fr)." ) -#parser.add_option ( "--svn-status" , action="store_true" , dest="svnStatus" , help="Check status against the SVN repository." ) -#parser.add_option ( "--svn-diff" , action="store_true" , dest="svnDiff" , help="Perform a diff against the SVN repository." ) -#parser.add_option ( "--svn-update" , action="store_true" , dest="svnUpdate" , help="Update to the latest SVN version *or* the one given by svn-tag." ) -#parser.add_option ( "--svn-checkout" , action="store_true" , dest="svnCheckout" , help="Checkout the latest SVN version *or* the one given by svn-tag." ) +#parser.add_option ( "--svn-tag" , action="store" , type="string", dest="svnTag" , help="Explicitly select a SVN tag (for SVN related commands)." ) +#parser.add_option ( "--svn-method" , action="store" , type="string", dest="svnMethod" , help="Allows to sets the svn checkout method (svn+ssh://coriolis.soc.lip6.fr)." ) +#parser.add_option ( "--svn-status" , action="store_true" , dest="svnStatus" , help="Check status against the SVN repository." ) +#parser.add_option ( "--svn-diff" , action="store_true" , dest="svnDiff" , help="Perform a diff against the SVN repository." ) +#parser.add_option ( "--svn-update" , action="store_true" , dest="svnUpdate" , help="Update to the latest SVN version *or* the one given by svn-tag." ) +#parser.add_option ( "--svn-checkout" , action="store_true" , dest="svnCheckout" , help="Checkout the latest SVN version *or* the one given by svn-tag." ) # Miscellaneous. -parser.add_option ( "--user-tarball" , action="store_true" , dest="userTarball" , help="Regenerate a tarball from checked out sources (in /tarball/." ) -parser.add_option ( "--tarball" , action="store_true" , dest="tarball" , help="Regenerate a tarball (in /tarball/." ) -parser.add_option ( "--rpm" , action="store_true" , dest="doRpm" , help="Regenerate RPM packages." ) -parser.add_option ( "--deb" , action="store_true" , dest="doDeb" , help="Regenerate Debian/Ubuntu packages." ) -# Katabatic/Kite specific options. -parser.add_option ( "-D", "--check-db" , action="store_true" , dest="checkDb" , help="Enable Katabatic/Kite data-base checking (*very* slow)." ) -parser.add_option ( "-u", "--check-deter" , action="store_true" , dest="checkDeterminism", help="Enable Katabatic/Kite determinism checking (*very* slow)." ) +parser.add_option ( "--user-tarball" , action="store_true" , dest="userTarball" , help="Regenerate a tarball from checked out sources (in /tarball/." ) +parser.add_option ( "--tarball" , action="store_true" , dest="tarball" , help="Regenerate a tarball (in /tarball/." ) +parser.add_option ( "--rpm" , action="store_true" , dest="doRpm" , help="Regenerate RPM packages." ) +parser.add_option ( "--deb" , action="store_true" , dest="doDeb" , help="Regenerate Debian/Ubuntu packages." ) +# Katabatic/Kite specific options. +parser.add_option ( "-D", "--check-db" , action="store_true" , dest="checkDb" , help="Enable Katabatic/Kite data-base checking (*very* slow)." ) +parser.add_option ( "-u", "--check-deter" , action="store_true" , dest="checkDeterminism", help="Enable Katabatic/Kite determinism checking (*very* slow)." ) (options, args) = parser.parse_args () if options.gui: - ErrorMessage = safeImport( 'builder' , 'ErrorMessage' ) - QApplication = safeImport( 'PyQt4.QtGui' , 'QApplication' ) - BuilderGui = safeImport( 'builder.BuilderGui', 'BuilderGui' ) - - try: - app = QApplication( sys.argv ) - app.setOrganizationName ( 'UPMC' ) - app.setOrganizationDomain( 'lip6.fr' ) - app.setApplicationName ( 'CoriolisBuilder' ) - gui = BuilderGui( options.conf ) - gui.show() - rcode = app.exec_() - sys.exit( rcode ) - except ErrorMessage, e: - print e - if showTrace: traceback.print_tb(sys.exc_info()[2]) - sys.exit(2) - except Exception, e: - print '[ERROR] An exception occured while running the Qt application.' - print ' %s' % e - if showTrace: traceback.print_tb(sys.exc_info()[2]) - sys.exit(2) - + ErrorMessage = safeImport( 'builder' , 'ErrorMessage' ) + QApplication = safeImport( 'PyQt4.QtGui' , 'QApplication' ) + BuilderGui = safeImport( 'builder.BuilderGui', 'BuilderGui' ) + try: + app = QApplication( sys.argv ) + app.setOrganizationName ( 'UPMC' ) + app.setOrganizationDomain( 'lip6.fr' ) + app.setApplicationName ( 'CoriolisBuilder' ) + gui = BuilderGui( options.conf ) + gui.show() + rcode = app.exec_() + sys.exit( rcode ) + except ErrorMessage as e: + print( e ) + if showTrace: traceback.print_tb(sys.exc_info()[2]) + sys.exit(2) + except Exception as e: + print( '[ERROR] An exception occured while running the Qt application.' ) + print( ' {}'.format(e) ) + if showTrace: traceback.print_tb(sys.exc_info()[2]) + sys.exit(2) else: - - ErrorMessage = safeImport( 'builder' , 'ErrorMessage' ) - Builder = safeImport( 'builder.Builder', 'Builder' ) - - try: - builder = Builder() - builder.loadConfiguration( options.conf ) - - if options.showConf: - builder.showConfiguration () - sys.exit(0) - - if options.quiet: builder.quiet = True - if options.release: builder.buildMode = "Release" - if options.debug: builder.buildMode = "Debug" - if options.static: builder.enableShared = "OFF" - if options.doc: builder.enableDoc = "ON" - if options.checkDb: builder.checkDatabase = "ON" - if options.checkDeterminism: builder.checkDeterminism = "ON" - if options.verboseMakefile: builder.verboseMakefile = "ON" - if options.rootDir: builder.rootDir = options.rootDir - if options.noBuild: builder.doBuild = False - if options.noCache: builder.noCache = True - if options.rmBuild: builder.rmBuild = True - if options.ninja: builder.ninja = True - if options.clang or options.llvmtoolset: builder.clang = True - if options.macports: builder.macports = True - if options.devtoolset: builder.devtoolset = options.devtoolset - if options.llvmtoolset: builder.llvmtoolset = options.llvmtoolset - if options.bfd: builder.bfd = "ON" - if options.qt5: builder.qt5 = True - if options.openmp: builder.openmp = True - if options.makeArguments: builder.makeArguments = options.makeArguments - #if options.svnMethod: builder.svnMethod = options.svnMethod - #if options.svnTag: builder.svnTag = options.svnTag - - #if options.svnStatus: builder.svnStatus ( tools=options.tools, projects=options.projects ) - #elif options.svnUpdate: builder.svnUpdate ( tools=options.tools, projects=options.projects ) - #elif options.svnDiff: builder.svnDiff ( tools=options.tools, projects=options.projects ) - #elif options.svnCheckout: builder.svnCheckout ( tools=options.tools, projects=options.projects ) - if options.userTarball: builder.userTarball ( tools=options.tools, projects=options.projects ) - elif options.tarball: builder.svnTarball ( tools=options.tools, projects=options.projects ) - elif options.doRpm: builder.doRpm () - elif options.doDeb: builder.doDeb () - else: builder.build ( tools=options.tools, projects=options.projects ) - except ErrorMessage, e: - print e - if showTrace: traceback.print_tb(sys.exc_info()[2]) - sys.exit(e.code) - except KeyboardInterrupt, e: - print '\n[ERROR] Interrupted by user\'s request (CTRL+C)' - sys.exit(1) - + ErrorMessage = safeImport( 'builder' , 'ErrorMessage' ) + Builder = safeImport( 'builder.Builder', 'Builder' ) + try: + builder = Builder() + builder.loadConfiguration( options.conf ) + if options.showConf: + builder.showConfiguration () + sys.exit(0) + if options.quiet: builder.quiet = True + if options.release: builder.buildMode = "Release" + if options.debug: builder.buildMode = "Debug" + if options.static: builder.enableShared = "OFF" + if options.doc: builder.enableDoc = "ON" + if options.checkDb: builder.checkDatabase = "ON" + if options.checkDeterminism: builder.checkDeterminism = "ON" + if options.verboseMakefile: builder.verboseMakefile = "ON" + if options.rootDir: builder.rootDir = options.rootDir + if options.noBuild: builder.doBuild = False + if options.noCache: builder.noCache = True + if options.rmBuild: builder.rmBuild = True + if options.ninja: builder.ninja = True + if options.clang or options.llvmtoolset: builder.clang = True + if options.macports: builder.macports = True + if options.devtoolset: builder.devtoolset = options.devtoolset + if options.llvmtoolset: builder.llvmtoolset = options.llvmtoolset + if options.bfd: builder.bfd = "ON" + if options.qt5: builder.qt5 = True + if options.openmp: builder.openmp = True + if options.makeArguments: builder.makeArguments = options.makeArguments + #if options.svnMethod: builder.svnMethod = options.svnMethod + #if options.svnTag: builder.svnTag = options.svnTag + #if options.svnStatus: builder.svnStatus ( tools=options.tools, projects=options.projects ) + #elif options.svnUpdate: builder.svnUpdate ( tools=options.tools, projects=options.projects ) + #elif options.svnDiff: builder.svnDiff ( tools=options.tools, projects=options.projects ) + #elif options.svnCheckout: builder.svnCheckout ( tools=options.tools, projects=options.projects ) + if options.userTarball: builder.userTarball ( tools=options.tools, projects=options.projects ) + elif options.tarball: builder.svnTarball ( tools=options.tools, projects=options.projects ) + elif options.doRpm: builder.doRpm () + elif options.doDeb: builder.doDeb () + else: builder.build ( tools=options.tools, projects=options.projects ) + except ErrorMessage as e: + print( e ) + if showTrace: traceback.print_tb(sys.exc_info()[2]) + sys.exit(e.code) + except KeyboardInterrupt as e: + print( '\n[ERROR] Interrupted by user\'s request (CTRL+C)' ) + sys.exit(1) sys.exit(0) diff --git a/bootstrap/cmake_modules/FindBootstrap.cmake b/bootstrap/cmake_modules/FindBootstrap.cmake index bf7ac00c..adac9371 100644 --- a/bootstrap/cmake_modules/FindBootstrap.cmake +++ b/bootstrap/cmake_modules/FindBootstrap.cmake @@ -7,12 +7,12 @@ if(COMMAND CMAKE_POLICY) cmake_policy(SET CMP0003 NEW) cmake_policy(SET CMP0005 NEW) - if(NOT (CMAKE_VERSION VERSION_LESS 2.8.0)) - cmake_policy(SET CMP0014 OLD) - endif() - if(NOT (CMAKE_VERSION VERSION_LESS 2.8.12)) - cmake_policy(SET CMP0022 OLD) - endif() + #if(NOT (CMAKE_VERSION VERSION_LESS 2.8.0)) + # cmake_policy(SET CMP0014 OLD) + #endif() + #if(NOT (CMAKE_VERSION VERSION_LESS 2.8.12)) + # cmake_policy(SET CMP0022 OLD) + #endif() endif(COMMAND CMAKE_POLICY) endmacro(set_cmake_policies) @@ -85,12 +85,12 @@ set(ADDTIONAL_FLAGS "") set(CXX_STANDARD "c++11") endif() - set(CMAKE_C_FLAGS_DEBUG " -Wall -fsanitize=address ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE) -#set(CMAKE_C_FLAGS_DEBUG " -Wall ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE) +#set(CMAKE_C_FLAGS_DEBUG " -Wall -fsanitize=address ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE) + set(CMAKE_C_FLAGS_DEBUG " -Wall ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE) set(CMAKE_C_FLAGS_RELEASE " -Wall -O2 ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C Compiler Release options." FORCE) #set(CMAKE_C_FLAGS_RELEASE " -Wall -fsanitize=address ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C Compiler Release options." FORCE) - set(CMAKE_CXX_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall -fsanitize=address ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C++ Compiler Debug options." FORCE) -#set(CMAKE_CXX_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C++ Compiler Debug options." FORCE) +#set(CMAKE_CXX_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall -fsanitize=address ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C++ Compiler Debug options." FORCE) + set(CMAKE_CXX_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C++ Compiler Debug options." FORCE) set(CMAKE_CXX_FLAGS_RELEASE "-std=${CXX_STANDARD} -Wall -O2 ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C++ Compiler Release options." FORCE) #set(CMAKE_CXX_FLAGS_RELEASE "-std=${CXX_STANDARD} -Wall -fsanitize=address ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C++ Compiler Release options." FORCE) @@ -410,8 +410,30 @@ ) target_link_libraries( ${pytarget} ${pyDeplibs} ) - install( TARGETS ${pytarget} DESTINATION ${PYTHON_SITE_PACKAGES} ) + install( TARGETS ${pytarget} DESTINATION ${Python_CORIOLISARCH} ) if( NOT ("${pyIncludes}" STREQUAL "None") ) install( FILES ${pyIncludes} DESTINATION ${inc_install_dir} ) endif() endmacro( add_python_module ) + + +# +# Build a Python extention module (3rd version). +# Usage: +# * pyCpps: The list of C/C++ module files. +# * pyIncludes: The list of C/C++ header files (will be installed in +# "inc_install_dir"). +# * pymodule: The name of the Python module (for "import PYMODULE"). +# * deplibs: The list of dependencies. +# * inc_install_dir: The directory into which install the includes. +# + macro( add_python_module3 pyCpps pyIncludes pymodule deplibs inc_install_dir ) + add_library( ${pymodule} MODULE ${pyCpps} ) + set_target_properties( ${pymodule} PROPERTIES PREFIX "" ) + target_link_libraries( ${pymodule} ${deplibs} ) + + install( TARGETS ${pymodule} DESTINATION ${Python_CORIOLISARCH} ) + if( NOT ("${pyIncludes}" STREQUAL "None") ) + install( FILES ${pyIncludes} DESTINATION ${inc_install_dir} ) + endif() + endmacro( add_python_module3 ) diff --git a/bootstrap/cmake_modules/FindPythonSitePackages.cmake b/bootstrap/cmake_modules/FindPythonSitePackages.cmake index 841d0003..f9fc16b7 100644 --- a/bootstrap/cmake_modules/FindPythonSitePackages.cmake +++ b/bootstrap/cmake_modules/FindPythonSitePackages.cmake @@ -1,13 +1,26 @@ if(UNIX) + if(NOT Python_FOUND) + message(FATAL_ERROR "Python has not been found, maybe forgot to call find_package(Python). ") + endif() # This way avoids newline in the script string. set(SCRIPT "import os.path,distutils.sysconfig") - set(SCRIPT "${SCRIPT}; pathes = distutils.sysconfig.get_python_lib().split('/')") - set(SCRIPT "${SCRIPT}; print os.path.join(pathes[-2],pathes[-1])") + set(SCRIPT "${SCRIPT}; pathes = distutils.sysconfig.get_python_lib('platstdlib').split('/')") + set(SCRIPT "${SCRIPT}; print( os.path.join(pathes[-2],pathes[-1]) )") - execute_process(COMMAND "python" "-c" "${SCRIPT}" + execute_process(COMMAND "${Python_EXECUTABLE}" "-c" "${SCRIPT}" RESULT_VARIABLE RETURN_CODE - OUTPUT_VARIABLE PYTHON_SITE_PACKAGES + OUTPUT_VARIABLE Python_CORIOLISARCH + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + + set(SCRIPT "import os.path,distutils.sysconfig") + set(SCRIPT "${SCRIPT}; pathes = distutils.sysconfig.get_python_lib('stdlib').split('/')") + set(SCRIPT "${SCRIPT}; print( os.path.join(pathes[-2],pathes[-1]) )") + + execute_process(COMMAND "${Python_EXECUTABLE}" "-c" "${SCRIPT}" + RESULT_VARIABLE RETURN_CODE + OUTPUT_VARIABLE Python_CORIOLISLIB OUTPUT_STRIP_TRAILING_WHITESPACE ) @@ -17,14 +30,17 @@ if(UNIX) set(FindPythonSitePackages_FOUND FALSE) endif(RETURN_CODE EQUAL 0) - set(PYTHON_SITE_PACKAGES "lib${LIB_SUFFIX}/${PYTHON_SITE_PACKAGES}" - CACHE STRING "Python site packages directory." FORCE) - mark_as_advanced(PYTHON_SITE_PACKAGES) + set(Python_CORIOLISARCH "lib${LIB_SUFFIX}/${Python_CORIOLISARCH}" + CACHE STRING "Python platform dependent install directory." FORCE) + set(Python_CORIOLISLIB "lib${LIB_SUFFIX}/${Python_CORIOLISLIB}" + CACHE STRING "Python platform independent install directory." FORCE) + mark_as_advanced(Python_CORIOLISARCH) + mark_as_advanced(Python_CORIOLISLIB) if(FindPythonSitePackages_FOUND) if(NOT FindPythonSitePackages_FIND_QUIETLY) if(FindPythonSitePackages_FOUND) - message(STATUS "Found FindPythonSitePackages : ${PYTHON_SITE_PACKAGES}") + message(STATUS "Found FindPythonSitePackages : ${Python_CORIOLISARCH}") endif(FindPythonSitePackages_FOUND) endif(NOT FindPythonSitePackages_FIND_QUIETLY) else(FindPythonSitePackages_FOUND) diff --git a/bootstrap/coriolisEnv.py b/bootstrap/coriolisEnv.py index fa8aeff4..ab86d3ea 100755 --- a/bootstrap/coriolisEnv.py +++ b/bootstrap/coriolisEnv.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import re @@ -17,27 +17,23 @@ reDebugStaticPattern = re.compile( r".*Debug\.Static.*" ) def scrubPath ( pathName ): - pathEnv = os.getenv( pathName ) - if not pathEnv: return "" - - pathList = string.split( pathEnv, ':' ) - scrubbedList = [] - for pathElement in pathList: - if reCoriolisPattern .match(pathElement) \ - or reReleaseSharedPattern.match(pathElement) \ - or reReleaseStaticPattern.match(pathElement) \ - or reDebugSharedPattern .match(pathElement) \ - or reDebugStaticPattern .match(pathElement): - continue - scrubbedList += [ pathElement ] - - if len(scrubbedList) == 0: return "" - - scrubbedEnv = scrubbedList[0] - for pathElement in scrubbedList[1:]: - scrubbedEnv += ":" + pathElement - - return scrubbedEnv + pathEnv = os.getenv( pathName ) + if not pathEnv: return "" + pathList = pathEnv.split( ':' ) + scrubbedList = [] + for pathElement in pathList: + if reCoriolisPattern .match(pathElement) \ + or reReleaseSharedPattern.match(pathElement) \ + or reReleaseStaticPattern.match(pathElement) \ + or reDebugSharedPattern .match(pathElement) \ + or reDebugStaticPattern .match(pathElement): + continue + scrubbedList += [ pathElement ] + if len(scrubbedList) == 0: return "" + scrubbedEnv = scrubbedList[0] + for pathElement in scrubbedList[1:]: + scrubbedEnv += ":" + pathElement + return scrubbedEnv def guessOs (): @@ -67,80 +63,83 @@ def guessOs (): uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE ) lines = uname.stdout.readlines() - if osSlsoc7x_64.match(lines[0]): osType = "Linux.el7_64" - elif osSlsoc6x_64.match(lines[0]): - osType = "Linux.slsoc6x_64" - useDevtoolset = True - elif osSlsoc6x.match(lines[0]): - osType = "Linux.slsoc6x" - useDevtoolset = True - elif osSLSoC5x_64 .match(lines[0]): osType = "Linux.SLSoC5x_64" - elif osSLSoC5x .match(lines[0]): osType = "Linux.SLSoC5x" - elif osFedora_64 .match(lines[0]): osType = "Linux.fc_64" - elif osFedora .match(lines[0]): osType = "Linux.fc" - elif osUbuntu1004 .match(lines[0]): osType = "Linux.Ubuntu1004" - elif osUbuntu1004_64 .match(lines[0]): osType = "Linux.Ubuntu1004_64" - elif osLinux_64 .match(lines[0]): osType = "Linux.x86_64" - elif osLinux .match(lines[0]): osType = "Linux.i386" - elif osFreeBSD8x_64 .match(lines[0]): osType = "FreeBSD.8x.x86_64" - elif osFreeBSD8x_amd64.match(lines[0]): osType = "FreeBSD.8x.amd64" - elif osFreeBSD8x .match(lines[0]): osType = "FreeBSD.8x.i386" - elif osDarwin .match(lines[0]): osType = "Darwin" - elif osCygwinW7_64 .match(lines[0]): osType = "Cygwin.W7_64" - elif osCygwinW7 .match(lines[0]): osType = "Cygwin.W7" - elif osCygwinW8_64 .match(lines[0]): osType = "Cygwin.W8_64" - elif osCygwinW8 .match(lines[0]): osType = "Cygwin.W8" - elif osCygwinW10_64 .match(lines[0]): osType = "Cygwin.W10_64" - elif osCygwinW10 .match(lines[0]): osType = "Cygwin.W10" + line = lines[0].decode( 'ascii' ) + if osSlsoc7x_64.match(line): osType = "Linux.el7_64" + elif osSlsoc6x_64.match(line): + osType = "Linux.slsoc6x_64" + useDevtoolset = True + elif osSlsoc6x.match(line): + osType = "Linux.slsoc6x" + useDevtoolset = True + elif osSLSoC5x_64 .match(line): osType = "Linux.SLSoC5x_64" + elif osSLSoC5x .match(line): osType = "Linux.SLSoC5x" + elif osFedora_64 .match(line): osType = "Linux.fc_64" + elif osFedora .match(line): osType = "Linux.fc" + elif osUbuntu1004 .match(line): osType = "Linux.Ubuntu1004" + elif osUbuntu1004_64 .match(line): osType = "Linux.Ubuntu1004_64" + elif osLinux_64 .match(line): osType = "Linux.x86_64" + elif osLinux .match(line): osType = "Linux.i386" + elif osFreeBSD8x_64 .match(line): osType = "FreeBSD.8x.x86_64" + elif osFreeBSD8x_amd64.match(line): osType = "FreeBSD.8x.amd64" + elif osFreeBSD8x .match(line): osType = "FreeBSD.8x.i386" + elif osDarwin .match(line): osType = "Darwin" + elif osCygwinW7_64 .match(line): osType = "Cygwin.W7_64" + elif osCygwinW7 .match(line): osType = "Cygwin.W7" + elif osCygwinW8_64 .match(line): osType = "Cygwin.W8_64" + elif osCygwinW8 .match(line): osType = "Cygwin.W8" + elif osCygwinW10_64 .match(line): osType = "Cygwin.W10_64" + elif osCygwinW10 .match(line): osType = "Cygwin.W10" else: - uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE ) - osType = uname.stdout.readlines()[0][:-1] + uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE ) + osType = uname.stdout.readlines()[0][:-1] - print "[WARNING] Unrecognized OS: \"%s\"." % lines[0][:-1] - print " (using: \"%s\")" % osType + print( "[WARNING] Unrecognized OS: \"{}\".".format( line[:-1] )) + print( " (using: \"{}\")".format( osType )) ldLibraryPath = os.getenv('LD_LIBRARY_PATH') if ldLibraryPath and 'devtoolset' in ldLibraryPath: useDevtoolset = False - - return (osType,useDevtoolset) + return ( osType, useDevtoolset ) -def guessShell (): +def guessShell ( forcedShell ): # This environement variable cannot be trusted as it is set once when # the user logs in. If aftewards it changes it that variable is *not* # affected :-(. - #if os.environ.has_key('SHELL'): return os.environ['SHELL'] - - psCommand = subprocess.Popen ( ['ps', '-p', str(os.getppid()) ], stdout=subprocess.PIPE ) - shell = psCommand.stdout.readlines()[1][:-1].split()[3].lstrip('-') - whichCommand = subprocess.Popen ( ['which', shell ], stdout=subprocess.PIPE ) - shellPath = whichCommand.stdout.readlines()[0][:-1] - + #if 'SHELL' in os.environ: return os.environ['SHELL'] isBourneShell = True - cshBins = [ '/usr/bin/tcsh' - , '/bin/tcsh' - , '/usr/pkg/bin/tcsh' - , '/usr/local/bin/tcsh' - , '/usr/bin/csh' - , '/bin/csh' - , '/usr/pkg/bin/csh' - , '/usr/local/bin/csh' + cshBins = [ u'/usr/bin/tcsh' + , u'/bin/tcsh' + , u'/usr/pkg/bin/tcsh' + , u'/usr/local/bin/tcsh' + , u'/usr/bin/csh' + , u'/bin/csh' + , u'/usr/pkg/bin/csh' + , u'/usr/local/bin/csh' ] - if shellPath in cshBins: isBourneShell = False - #print 'GUESSED SHELL: "%s"' % shellPath - + if shellName is None: + psCommand = subprocess.Popen ( ['ps', '-p', str(os.getppid()) ], stdout=subprocess.PIPE ) + shell = psCommand.stdout.readlines()[1].decode('utf8')[:-1].split()[3].lstrip('-') + whichCommand = subprocess.Popen ( ['which', shell ], stdout=subprocess.PIPE ) + shellPath = whichCommand.stdout.readlines()[0][:-1].decode('utf8') + #print( 'GUESSED shellPath={}'.format(shellPath) ) + else: + shellPath = forcedShell + #print( 'FORCED shellPath={}'.format(shellPath) ) + if shellPath in cshBins: + #print( 'Matched C-Shell' ) + isBourneShell = False + #print( 'isBourneShell={}\n'.format(isBourneShell) ) return shellPath, isBourneShell - if __name__ == "__main__": osType,useDevtoolset = guessOs() buildType = "Release" linkType = "Shared" rootDir = None - shellBin, isBourneShell = guessShell() + shellName = None - parser = optparse.OptionParser () + parser = optparse.OptionParser() # Build relateds. parser.add_option ( "--query-inst-root", action="store_true" , dest="queryInstRoot" ) parser.add_option ( "--query-isys-root", action="store_true" , dest="queryISysRoot" ) @@ -152,7 +151,8 @@ if __name__ == "__main__": parser.add_option ( "--no-python" , action="store_true" , dest="nopython" ) parser.add_option ( "--root" , action="store" , type="string", dest="rootDir" ) parser.add_option ( "--remove" , action="store_true" , dest="remove" ) - ( options, args ) = parser.parse_args () + parser.add_option ( "--shell" , action="store" , type="string", dest="shell" ) + ( options, args ) = parser.parse_args() if options.release: buildType = "Release" if options.debug: buildType = "Debug" @@ -160,159 +160,158 @@ if __name__ == "__main__": if options.static: linkType = "Static" if options.shared: linkType = "Shared" if options.rootDir: rootDir = options.rootDir + if options.shell: shellName = options.shell + shellBin, isBourneShell = guessShell( shellName ) - scriptPath = os.path.abspath(os.path.dirname(sys.argv[0])) + scriptPath = os.path.abspath( os.path.dirname( sys.argv[0] )) if 'Debug.' in scriptPath: buildType = 'Debug' - if not shellBin: - print 'echo "[ERROR] coriolisEnv.py was not able to guess/find the current shell interpeter."' - sys.exit( 1 ) - + print( 'echo "[ERROR] coriolisEnv.py was not able to guess/find the current shell interpeter."' ) + sys.exit( 1 ) strippedPath = scrubPath( "PATH" ) strippedLibraryPath = scrubPath( "LD_LIBRARY_PATH" ) strippedPythonPath = scrubPath( "PYTHONPATH" ) - if options.remove: - shellScript = 'echo "Removing Coriolis environment";' - if osType == "Darwin": - ldVar = 'DYLD_LIBRARY_PATH' - else: - ldVar = 'LD_LIBRARY_PATH' - - if isBourneShell: - shellScript += 'export PATH={};hash -r;'.format(strippedPath) - shellScript += 'BOOTSTRAP_TOP="";CORIOLIS_TOP="";export -n BOOTSTRAP_TOP CORIOLIS_TOP;' - if strippedLibraryPath: - shellScript += 'export {}={};'.format(ldVar, strippedLibraryPath) + shellScript = 'echo "Removing Coriolis environment";' + if osType == "Darwin": + ldVar = 'DYLD_LIBRARY_PATH' else: - shellScript += '{0}=""; export -n {0};'.format(ldVar) - else: - shellScript += 'setenv PATH {};rehash;'.format(strippedPath) - shellScript += 'unsetenv BOOTSTRAP_TOP CORIOLIS_TOP;' - if strippedLibraryPath: - shellScript += 'setenv {} {};'.format(ldVar, strippedLibraryPath) + ldVar = 'LD_LIBRARY_PATH' + if isBourneShell: + shellScript += 'export PATH={};hash -r;'.format(strippedPath) + shellScript += 'BOOTSTRAP_TOP="";CORIOLIS_TOP="";export -n BOOTSTRAP_TOP CORIOLIS_TOP;' + if strippedLibraryPath: + shellScript += 'export {}={};'.format(ldVar, strippedLibraryPath) + else: + shellScript += '{0}=""; export -n {0};'.format(ldVar) else: - shellScript += 'unsetenv {};'.format(ldVar) - - print(shellScript) - sys.exit(0) + shellScript += 'setenv PATH {};rehash;'.format(strippedPath) + shellScript += 'unsetenv BOOTSTRAP_TOP CORIOLIS_TOP;' + if strippedLibraryPath: + shellScript += 'setenv {} {};'.format(ldVar, strippedLibraryPath) + else: + shellScript += 'unsetenv {};'.format(ldVar) + print( shellScript ) + sys.exit(0) shellScriptSh = \ - 'echo "%(MESSAGE)s";' \ - 'echo "Switching to Coriolis 2.x (%(buildDir)s)";' \ - 'PATH="%(PATH)s";' \ - 'BOOTSTRAP_TOP="%(BOOTSTRAP_TOP)s";' \ - 'CORIOLIS_TOP="%(CORIOLIS_TOP)s";' \ - 'export PATH BOOTSTRAP_TOP CORIOLIS_TOP STRATUS_MAPPING_NAME;' + 'echo "Issuing commands for Bourne shell like interpreters";' \ + 'echo "%(MESSAGE)s";' \ + 'echo "Switching to Coriolis 2.x (%(buildDir)s)";' \ + 'PATH="%(PATH)s";' \ + 'BOOTSTRAP_TOP="%(BOOTSTRAP_TOP)s";' \ + 'CORIOLIS_TOP="%(CORIOLIS_TOP)s";' \ + 'export PATH BOOTSTRAP_TOP CORIOLIS_TOP STRATUS_MAPPING_NAME;' -# 'STRATUS_MAPPING_NAME="%(SYSCONF_DIR)s/stratus2sxlib.xml";' \ +# 'STRATUS_MAPPING_NAME="%(SYSCONF_DIR)s/stratus2sxlib.xml";' \ shellScriptCsh = \ - 'echo "%(MESSAGE)s";' \ - 'echo "Switching to Coriolis 2.x (%(buildDir)s)";' \ - 'setenv PATH "%(PATH)s";' \ - 'setenv BOOTSTRAP_TOP "%(BOOTSTRAP_TOP)s";' \ - 'setenv CORIOLIS_TOP "%(CORIOLIS_TOP)s";' + 'echo "Issuing commands for C-shell like interpreters";' \ + 'echo "%(MESSAGE)s";' \ + 'echo "Switching to Coriolis 2.x (%(buildDir)s)";' \ + 'setenv PATH "%(PATH)s";' \ + 'setenv BOOTSTRAP_TOP "%(BOOTSTRAP_TOP)s";' \ + 'setenv CORIOLIS_TOP "%(CORIOLIS_TOP)s";' -# 'setenv STRATUS_MAPPING_NAME "%(SYSCONF_DIR)s/stratus2sxlib.xml";' \ +# 'setenv STRATUS_MAPPING_NAME "%(SYSCONF_DIR)s/stratus2sxlib.xml";' \ reDevtoolset = re.compile( r'/opt/rh/devtoolset-(?P\d+)/root/etc/coriolis2.*' ) buildDir = buildType + "." + linkType scriptDir = os.path.dirname ( os.path.abspath(__file__) ) - #print "echo \"Script Location: %s\";" % scriptDir, + #print( "echo \"Script Location: {}\";".format( scriptDir )) if scriptDir.startswith("/etc/coriolis2"): - coriolisTop = "/usr" - sysconfDir = scriptDir - shellMessage = "Using system-wide Coriolis 2 (/usr)" + coriolisTop = "/usr" + sysconfDir = scriptDir + shellMessage = "Using system-wide Coriolis 2 (/usr)" else: - m = reDevtoolset.match( scriptDir ) - if m: - coriolisTop = "/opt/rh/devtoolset-%d/root/usr" % m.group('version') - sysconfDir = scriptDir - shellMessage = "Using system-wide devtoolset-%(v)d Coriolis 2 (/opt/rh/devtoolset-%(v)d/root/usr)" \ - % { 'v':m.group('version') } - elif scriptDir.startswith(os.getenv("HOME")+"/nightly/coriolis-2.x/"): - rootDir = os.getenv("HOME") + "/nightly/coriolis-2.x" - coriolisTop = "%s/%s/%s/install" % ( rootDir, osType, buildDir ) - sysconfDir = scriptDir - shellMessage = "Using Nightly build Coriolis 2 (%s)" % coriolisTop - elif scriptDir.startswith("/users/outil/coriolis/coriolis-2.x/") \ - or scriptDir.startswith("/soc/coriolis2/"): - coriolisTop = "/soc/coriolis2" - sysconfDir = coriolisTop + "/etc/coriolis2" - shellMessage = "Using SoC network-wide Coriolis 2 (/soc/coriolis2)" - else: - if not rootDir: - rootDir = os.getenv("HOME") + "/coriolis-2.x" - coriolisTop = "%s/%s/%s/install" % ( rootDir, osType, buildDir ) - sysconfDir = coriolisTop + "/etc/coriolis2" - shellMessage = "Using user-selected Coriolis 2 (%s)" % rootDir + m = reDevtoolset.match( scriptDir ) + if m: + coriolisTop = "/opt/rh/devtoolset-%d/root/usr" % m.group('version') + sysconfDir = scriptDir + shellMessage = "Using system-wide devtoolset-%(v)d Coriolis 2 (/opt/rh/devtoolset-%(v)d/root/usr)" \ + % { 'v':m.group('version') } + elif scriptDir.startswith(os.getenv("HOME")+"/nightly/coriolis-2.x/"): + rootDir = os.getenv("HOME") + "/nightly/coriolis-2.x" + coriolisTop = "%s/%s/%s/install" % ( rootDir, osType, buildDir ) + sysconfDir = scriptDir + shellMessage = "Using Nightly build Coriolis 2 (%s)" % coriolisTop + elif scriptDir.startswith("/users/outil/coriolis/coriolis-2.x/") \ + or scriptDir.startswith("/soc/coriolis2/"): + coriolisTop = "/soc/coriolis2" + sysconfDir = coriolisTop + "/etc/coriolis2" + shellMessage = "Using SoC network-wide Coriolis 2 (/soc/coriolis2)" + else: + if not rootDir: + scriptRoot = '/'.join( scriptDir.split('/')[:-2] ) + if not os.path.exists(scriptRoot): + rootDir = os.getenv("HOME") + "/coriolis-2.x" + coriolisTop = "%s/%s/%s/install" % ( rootDir, osType, buildDir ) + sysconfDir = coriolisTop + "/etc/coriolis2" + shellMessage = "Using user-selected Coriolis 2 (%s)" % rootDir + else: + rootDir = scriptRoot + coriolisTop = rootDir + sysconfDir = coriolisTop + "/etc/coriolis2" + shellMessage = "Using script location Coriolis 2 (%s)" % rootDir if osType.startswith("Cygwin"): - strippedPath = "%s/lib:%s" % ( coriolisTop, libDir, strippedPath ) - + strippedPath = "%s/lib:%s" % ( coriolisTop, libDir, strippedPath ) if not os.path.exists(coriolisTop): - print 'echo "[ERROR] coriolisEnv.py, top directory <%s> do not exists."' % coriolisTop - sys.exit( 1 ) - + print( 'echo "[ERROR] coriolisEnv.py, top directory "{}" do not exists."'.format( coriolisTop )) + sys.exit( 1 ) for lib in [ 'lib64', 'lib' ]: - libDir = lib - absLibDir = '{0}/{1}'.format( coriolisTop, lib ) - if os.path.isdir(absLibDir): break - libDir = None - + libDir = lib + absLibDir = '{0}/{1}'.format( coriolisTop, lib ) + if os.path.isdir(absLibDir): break + libDir = None if libDir is None: - print 'echo "[ERROR] coriolisEnv.py, library directory not found."' - sys.exit( 1 ) + print( 'echo "[ERROR] coriolisEnv.py, library directory not found."' ) + sys.exit( 1 ) strippedPath = "%s/bin:%s" % ( coriolisTop, strippedPath ) strippedLibraryPath = "%s:%s" % ( absLibDir , strippedLibraryPath ) - if not options.nopython: - pyVersion = sys.version_info - version = "%d.%d" % (pyVersion[0],pyVersion[1]) - - sitePackagesDir = "sitePackageDir_has_been_not_found" - for pyPackageDir in [ "%s/python%s/site-packages" % (absLibDir,version) - , "%s/python%s/dist-packages" % (absLibDir,version) - , "%s/%s/site-packages" % (absLibDir,version) - ]: - if os.path.isdir(pyPackageDir): - sitePackagesDir = pyPackageDir - break - - strippedPythonPath = "%s:" % (sitePackagesDir) + strippedPythonPath - strippedPythonPath = "%s/crlcore:" % (sitePackagesDir) + strippedPythonPath - strippedPythonPath = "%s/cumulus:" % (sitePackagesDir) + strippedPythonPath - strippedPythonPath = "%s/cumulus/plugins:" % (sitePackagesDir) + strippedPythonPath - strippedPythonPath = "%s/stratus:" % (sitePackagesDir) + strippedPythonPath - strippedPythonPath = "%s:" % (sysconfDir) + strippedPythonPath - - shellScriptSh += 'PYTHONPATH="%(PYTHONPATH)s";' \ - 'export PYTHONPATH;' - shellScriptCsh += 'setenv PYTHONPATH "%(PYTHONPATH)s";' - - if osType == "Darwin": - shellScriptSh += 'DYLD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";' \ - 'export DYLD_LIBRARY_PATH;' - shellScriptCsh += 'setenv DYLD_LIBRARY_PATH "%(LD_LIBRARY_PATH)s";' - else: - shellScriptSh += 'LD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";' \ - 'export LD_LIBRARY_PATH;' - shellScriptCsh += 'setenv LD_LIBRARY_PATH "%(LD_LIBRARY_PATH)s";' + pyVersion = sys.version_info + version = "%d.%d" % (pyVersion[0],pyVersion[1]) + sitePackagesDir = "sitePackageDir_has_been_not_found" + for pyPackageDir in [ "%s/python%s.%s/site-packages" % (absLibDir,pyVersion[0],pyVersion[1]) + , "%s/python%s.%s/dist-packages" % (absLibDir,pyVersion[0],pyVersion[1]) + , "%s/%s.%s/site-packages" % (absLibDir,pyVersion[0],pyVersion[1]) + , "%s/python%s/site-packages" % (absLibDir,pyVersion[0]) + , "%s/python%s/dist-packages" % (absLibDir,pyVersion[0]) + , "%s/%s/site-packages" % (absLibDir,pyVersion[0]) + ]: + if os.path.isdir(pyPackageDir): + sitePackagesDir = pyPackageDir + break + strippedPythonPath = "%s:" % (sitePackagesDir) + strippedPythonPath + strippedPythonPath = "%s/crlcore:" % (sitePackagesDir) + strippedPythonPath + strippedPythonPath = "%s/cumulus:" % (sitePackagesDir) + strippedPythonPath + strippedPythonPath = "%s/cumulus/plugins:" % (sitePackagesDir) + strippedPythonPath + strippedPythonPath = "%s/stratus:" % (sitePackagesDir) + strippedPythonPath + strippedPythonPath = "%s:" % (sysconfDir) + strippedPythonPath + shellScriptSh += 'PYTHONPATH="%(PYTHONPATH)s";' \ + 'export PYTHONPATH;' + shellScriptCsh += 'setenv PYTHONPATH "%(PYTHONPATH)s";' + if osType == "Darwin": + shellScriptSh += 'DYLD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";' \ + 'export DYLD_LIBRARY_PATH;' + shellScriptCsh += 'setenv DYLD_LIBRARY_PATH "%(LD_LIBRARY_PATH)s";' + else: + shellScriptSh += 'LD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";' \ + 'export LD_LIBRARY_PATH;' + shellScriptCsh += 'setenv LD_LIBRARY_PATH "%(LD_LIBRARY_PATH)s";' shellScriptSh += "hash -r;" shellScriptCsh += "rehash;" - if isBourneShell: shellScript = shellScriptSh else: shellScript = shellScriptCsh - if useDevtoolset: - shellScript += \ - ' echo "Launching a devtoolset-8 subshell though scl (CTRL+D to exit).";' \ - ' scl enable devtoolset-8 %(SHELL)s' + shellScript += \ + ' echo "Launching a devtoolset-8 subshell though scl (CTRL+D to exit).";' \ + ' scl enable devtoolset-8 %(SHELL)s' evalScript = shellScript % { "PATH" : strippedPath , "LD_LIBRARY_PATH" : strippedLibraryPath @@ -325,12 +324,10 @@ if __name__ == "__main__": , 'SHELL' : shellBin } if options.queryISysRoot: - print '%s/%s' % (rootDir,osType) - sys.exit( 0 ) - + print( '{}/{}'.format( rootDir, osType )) + sys.exit( 0 ) if options.queryInstRoot: - print coriolisTop - sys.exit( 0 ) - - print evalScript + print( coriolisTop ) + sys.exit( 0 ) + print( evalScript ) sys.exit( 0 ) diff --git a/bootstrap/socInstaller.py b/bootstrap/socInstaller.py index e0d2d26b..74c3030f 100755 --- a/bootstrap/socInstaller.py +++ b/bootstrap/socInstaller.py @@ -1,9 +1,9 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # -*- mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2015-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2015-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -24,77 +24,73 @@ showTrace = True try: - import sys - import os.path - import shutil - import optparse - import time - import traceback - import distutils.sysconfig - import subprocess - import socket - import re - import bz2 - import smtplib - from email.mime.text import MIMEText - from email.mime.multipart import MIMEMultipart - from email.mime.application import MIMEApplication -except ImportError, e: - module = str(e).split()[-1] + import sys + import os.path + import shutil + import optparse + import time + import traceback + import distutils.sysconfig + import subprocess + import socket + import re + import bz2 + import smtplib + from io import IOBase + from email.mime.text import MIMEText + from email.mime.multipart import MIMEMultipart + from email.mime.application import MIMEApplication +except ImportError as e: + module = str(e).split()[-1] class ErrorMessage ( Exception ): def __init__ ( self, code, *arguments ): self._code = code - self._errors = [ 'Malformed call to ErrorMessage()', '%s' % str(arguments) ] - + self._errors = [ 'Malformed call to ErrorMessage()', '{}'.format(arguments) ] text = None if len(arguments) == 1: - if isinstance(arguments[0],Exception): text = str(arguments[0]).split('\n') - else: - self._errors = arguments[0] - elif len(arguments) > 1: - text = list(arguments) - - if text: - self._errors = [] - while len(text[0]) == 0: del text[0] - - lstrip = 0 - if text[0].startswith('[ERROR]'): lstrip = 8 - - for line in text: - if line[0:lstrip ] == ' '*lstrip or \ - line[0:lstrip-1] == '[ERROR]': - self._errors += [ line[lstrip:] ] + if isinstance(arguments[0],Exception): text = str(arguments[0]).split('\n') else: - self._errors += [ line.lstrip() ] + self._errors = arguments[0] + elif len(arguments) > 1: + text = list(arguments) + if text: + self._errors = [] + while len(text[0]) == 0: del text[0] + lstrip = 0 + if text[0].startswith('[ERROR]'): lstrip = 8 + for line in text: + if line[0:lstrip ] == ' '*lstrip or \ + line[0:lstrip-1] == '[ERROR]': + self._errors += [ line[lstrip:] ] + else: + self._errors += [ line.lstrip() ] return def __str__ ( self ): if not isinstance(self._errors,list): - return "[ERROR] %s" % self._errors - + return "[ERROR] {}".format(self._errors) formatted = "\n" for i in range(len(self._errors)): - if i == 0: formatted += "[ERROR] %s" % self._errors[i] - else: formatted += " %s" % self._errors[i] - if i+1 < len(self._errors): formatted += "\n" + if i == 0: formatted += "[ERROR] {}".format(self._errors[i]) + else: formatted += " {}".format(self._errors[i]) + if i+1 < len(self._errors): formatted += "\n" return formatted def addMessage ( self, message ): if not isinstance(self._errors,list): - self._errors = [ self._errors ] + self._errors = [ self._errors ] if isinstance(message,list): - for line in message: - self._errors += [ line ] + for line in message: + self._errors += [ line ] else: - self._errors += [ message ] + self._errors += [ message ] return def terminate ( self ): - print self + print( self ) sys.exit(self._code) @property @@ -104,14 +100,14 @@ class ErrorMessage ( Exception ): class BadBinary ( ErrorMessage ): def __init__ ( self, binary ): - ErrorMessage.__init__( self, 1, "Binary not found: <%s>." % binary ) + ErrorMessage.__init__( self, 1, 'Binary not found: "{}".'.format(binary) ) return class BadReturnCode ( ErrorMessage ): def __init__ ( self, status ): - ErrorMessage.__init__( self, 1, "Command returned status:%d." % status ) + ErrorMessage.__init__( self, 1, 'Command returned status:{}.'.format(status) ) return @@ -120,25 +116,31 @@ class Command ( object ): def __init__ ( self, arguments, fdLog=None ): self.arguments = arguments self.fdLog = fdLog - - if self.fdLog != None and not isinstance(self.fdLog,file): - print '[WARNING] Command.__init__(): is neither None or a file.' + if self.fdLog != None and not isinstance(self.fdLog,IOBase): + print( '[WARNING] Command.__init__(): "fdLog" is neither None or a file.' ) return def _argumentsToStr ( self, arguments ): s = '' for argument in arguments: - if argument.find(' ') >= 0: s += ' "' + argument + '"' - else: s += ' ' + argument + if argument.find(' ') >= 0: s += ' "' + argument + '"' + else: s += ' ' + argument return s def log ( self, text ): - print text[:-1] + if isinstance(self.fdLog,IOBase): + if isinstance(text,bytes): + print( text[:-1].decode('utf-8') ) + self.fdLog.write( text.decode('utf-8') ) + elif isinstance(text,str): + print( text[:-1] ) + self.fdLog.write( text ) + else: + print( '[ERROR] Command.log(): "text" is neither bytes or str.' ) + print( ' {}'.format(text) ) + self.fdLog.flush() sys.stdout.flush() sys.stderr.flush() - if isinstance(self.fdLog,file): - self.fdLog.write( text ) - self.fdLog.flush() return def execute ( self ): @@ -149,29 +151,26 @@ class Command ( object ): homeDir = os.environ['HOME'] workDir = os.getcwd() if homeDir.startswith(homeDir): - workDir = '~' + workDir[ len(homeDir) : ] + workDir = '~' + workDir[ len(homeDir) : ] user = 'root' - if os.environ.has_key('USER'): user = os.environ['USER'] - prompt = '%s@%s:%s$' % (user,conf.masterHost,workDir) + if 'USER' in os.environ: user = os.environ['USER'] + prompt = '{}@{}:{}$'.format(user,conf.masterHost,workDir) try: - self.log( '%s%s\n' % (prompt,self._argumentsToStr(self.arguments)) ) - print self.arguments - child = subprocess.Popen( self.arguments, stdout=subprocess.PIPE, stderr=subprocess.STDOUT ) - - while True: - line = child.stdout.readline() - if not line: break - - self.log( line ) - except OSError, e: - raise BadBinary( self.arguments[0] ) + self.log( '{}{}\n'.format(prompt,self._argumentsToStr(self.arguments)) ) + print( self.arguments ) + child = subprocess.Popen( self.arguments, stdout=subprocess.PIPE, stderr=subprocess.STDOUT ) + while True: + line = child.stdout.readline() + if not line: break + self.log( line ) + except OSError as e: + raise BadBinary( self.arguments[0] ) (pid,status) = os.waitpid( child.pid, 0 ) status >>= 8 if status != 0: - raise BadReturnCode( status ) - + raise BadReturnCode( status ) return @@ -186,11 +185,10 @@ class CommandArg ( object ): def __str__ ( self ): s = '' - if self.wd: s = 'cd %s && ' % self.wd - + if self.wd: s = 'cd {} && '.format(self.wd) for i in range(len(self.command)): - if i: s += ' ' - s += self.command[i] + if i: s += ' ' + s += self.command[i] return s def getArgs ( self ): @@ -223,7 +221,7 @@ class CoriolisCommand ( CommandArg ): CommandArg.__init__ ( self, [ ccbBin , '--root='+rootDir , '--project=coriolis' - , '--make=-j%d install' % threads + , '--make=-j{} install'.format(threads) ] + otherArgs , fdLog=fdLog ) return @@ -258,21 +256,20 @@ class GitRepository ( object ): def removeLocalRepo ( self ): if os.path.isdir(self.localRepoDir): - print 'Removing Git local repository: <%s>' % self.localRepoDir - shutil.rmtree( self.localRepoDir ) + print( 'Removing Git local repository: "{}"'.format(self.localRepoDir) ) + shutil.rmtree( self.localRepoDir ) return def clone ( self ): - print 'Clone/pull from:', self.url + print( 'Clone/pull from:', self.url ) if not os.path.isdir(self.cloneDir): - os.makedirs( self.cloneDir ) - + os.makedirs( self.cloneDir ) if not os.path.isdir(self.localRepoDir): - os.chdir( self.cloneDir ) - Command( [ 'git', 'clone', self.url ], self.fdLog ).execute() + os.chdir( self.cloneDir ) + Command( [ 'git', 'clone', self.url ], self.fdLog ).execute() else: - os.chdir( self.localRepoDir ) - Command( [ 'git', 'pull' ], self.fdLog ).execute() + os.chdir( self.localRepoDir ) + Command( [ 'git', 'pull' ], self.fdLog ).execute() return def checkout ( self, branch ): @@ -323,28 +320,26 @@ class Configuration ( object ): self._masterHost = self._detectMasterHost() self._success = False self._rcode = 0 - self._updateSecondaries() return def __setattr__ ( self, attribute, value ): if attribute in Configuration.SecondaryNames: - print ErrorMessage( 1, 'Attempt to write in read-only attribute <%s> in Configuration.'%attribute ) - return + print( ErrorMessage( 1, 'Attempt to write in read-only attribute "{}" in Configuration.' \ + .format(attribute) )) + return if attribute == 'masterHost' or attribute == '_masterHost': - if value == 'lepka': - print 'Never touch the Git tree when running on .' - self._rmSource = False - self._rmBuild = False - self._doGit = False - self._doSendReport = False - + if value == 'lepka': + print( 'Never touch the Git tree when running on "lepka".' ) + self._rmSource = False + self._rmBuild = False + self._doGit = False + self._doSendReport = False if attribute[0] == '_': - self.__dict__[attribute] = value - return - - if attribute == 'homeDir': value = os.path.expanduser(value) + self.__dict__[attribute] = value + return + if attribute == 'homeDir': value = os.path.expanduser(value) self.__dict__['_'+attribute] = value self._updateSecondaries() @@ -352,15 +347,15 @@ class Configuration ( object ): def __getattr__ ( self, attribute ): if attribute[0] != '_': attribute = '_'+attribute - if not self.__dict__.has_key(attribute): - raise ErrorMessage( 1, 'Configuration has no attribute <%s>.'%attribute ) + if not attribute in self.__dict__: + raise ErrorMessage( 1, 'Configuration has no attribute "{}".'.format(attribute) ) return self.__dict__[attribute] def _updateSecondaries ( self ): if self._nightlyMode: - self._rootDir = self._homeDir + '/nightly/coriolis-2.x' + self._rootDir = self._homeDir + '/nightly/coriolis-2.x' else: - self._rootDir = self._homeDir + '/coriolis-2.x' + self._rootDir = self._homeDir + '/coriolis-2.x' self._srcDir = self._rootDir + '/src' self._logDir = self._srcDir + '/logs' self._yosysBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/yosysInstaller.sh' @@ -373,27 +368,24 @@ class Configuration ( object ): def _detectMasterHost ( self ): if self._chrootMode is None: return 'unknown' if self._chrootMode: return 'chrooted-host' - masterHost = 'unknown' hostname = socket.gethostname() hostAddr = socket.gethostbyname(hostname) - if hostname == 'lepka' and hostAddr == '127.0.0.1': - masterHost = 'lepka' + masterHost = 'lepka' else: - masterHost = hostname.split('.')[0] + masterHost = hostname.split('.')[0] return masterHost def openLog ( self, stem ): if not os.path.isdir(self._logDir): - os.makedirs( self._logDir ) - + os.makedirs( self._logDir ) index = 0 timeTag = time.strftime( "%Y.%m.%d" ) while True: - logFile = os.path.join(self._logDir,"%s-%s-%02d.log" % (stem,timeTag,index)) + logFile = os.path.join(self._logDir,"{}-{}-{:02}.log".format(stem,timeTag,index)) if not os.path.isfile(logFile): - print "Report log: <%s>" % logFile + print( 'Report log: "{}"'.format(logFile) ) break index += 1 fd = open( logFile, "w" ) @@ -403,65 +395,59 @@ class Configuration ( object ): def closeLogs ( self ): for fd in self._fds.values(): - if fd: fd.close() + if fd: fd.close() return def compressLogs ( self ): for log in self._logs.values(): - if not log: continue - - fd = open( log, 'r' ) - bzfd = bz2.BZ2File( log+'.bz2', 'w' ) - - for line in fd.readlines(): bzfd.write( line ) - - bzfd.close() - fd.close() - - os.unlink( log ) + if not log: continue + fd = open( log, 'r' ) + bzfd = bz2.BZ2File( log+'.bz2', 'w' ) + for line in fd.readlines(): + if isinstance(line,str): + bzfd.write( line.encode('utf-8') ) + elif isinstance(line,bytes): + bzfd.write( line ) + bzfd.close() + fd.close() + os.unlink( log ) return def getCommands ( self, target ): - commands = [] - + commands = [] if self.doYosys: - if not os.path.isfile( self.yosysBin ): - raise ErrorMessage( 1, [ 'Cannot find , should be here:' - , ' <%s>' % self.yosysBin - ] ) - commands.append( YosysCommand( self.yosysBin, fdLog=self.fds['yosys'] ) ) - + if not os.path.isfile( self.yosysBin ): + raise ErrorMessage( 1, [ 'Cannot find , should be here:' + , ' "{}"'.format(self.yosysBin) + ] ) + commands.append( YosysCommand( self.yosysBin, fdLog=self.fds['yosys'] ) ) if self.doAlliance: - if not os.path.isfile( self.alcBin ): - raise ErrorMessage( 1, [ 'Cannot find , should be here:' - , ' <%s>' % self.alcBin - ] ) - commands.append( AllianceCommand( self.alcBin, fdLog=self.fds['alliance'] ) ) - + if not os.path.isfile( self.alcBin ): + raise ErrorMessage( 1, [ 'Cannot find , should be here:' + , ' "{}"'.format(self.alcBin) + ] ) + commands.append( AllianceCommand( self.alcBin, fdLog=self.fds['alliance'] ) ) if self.doCoriolis: - if not os.path.isfile( self.ccbBin ): - raise ErrorMessage( 1, [ 'Cannot find , should be here:' - , ' <%s>' % self.ccbBin - ] ) - - otherArgs = [] - if self.debugArg: otherArgs.append( self.debugArg ) - - if target == 'SL7_64': - otherArgs.append( '--project=support' ) - commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) ) - commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) ) - elif target == 'SL6_64' or target == 'SL6': - otherArgs.append( '--project=support' ) - otherArgs.append( '--devtoolset=8' ) - commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 6, otherArgs , fdLog=self.fds['coriolis'] ) ) - commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) ) - elif target == 'Ubuntu18' or target == 'Debian9' or target == 'Debian10': - if target == 'Ubuntu18': otherArgs.append( '--qt5' ) - commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs, fdLog=self.fds['coriolis'] ) ) - + if not os.path.isfile( self.ccbBin ): + raise ErrorMessage( 1, [ 'Cannot find , should be here:' + , ' "{}"'.format(self.ccbBin) + ] ) + otherArgs = [] + if self.debugArg: otherArgs.append( self.debugArg ) + if target == 'SL7_64': + otherArgs.append( '--project=support' ) + commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) ) + commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) ) + elif target == 'SL6_64' or target == 'SL6': + otherArgs.append( '--project=support' ) + otherArgs.append( '--devtoolset=8' ) + commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 6, otherArgs , fdLog=self.fds['coriolis'] ) ) + commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) ) + elif target == 'Ubuntu18' or target == 'Debian9' or target == 'Debian10': + if target == 'Ubuntu18': otherArgs.append( '--qt5' ) + commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs, fdLog=self.fds['coriolis'] ) ) if self.doBenchs: - commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) ) + commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) ) return commands @@ -469,33 +455,30 @@ class Report ( object ): def __init__ ( self, conf ): self.conf = conf - commaspace = ', ' date = time.strftime( "%A %d %B %Y" ) stateText = 'FAILED' modeText = 'SoC installation' if self.conf.success: stateText = 'SUCCESS' if self.conf.nightlyMode: modeText = 'Nightly build' - self.message = MIMEMultipart() - self.message['Subject'] = '[%s] Coriolis %s %s' % (stateText,modeText,date) + self.message['Subject'] = '[{}] Coriolis {} {}'.format(stateText,modeText,date) self.message['From' ] = self.conf.sender self.message['To' ] = commaspace.join( self.conf.receivers ) self.attachements = [] - self.mainText = '\n' self.mainText += 'Salut le Crevard,\n' self.mainText += '\n' if self.conf.nightlyMode: - self.mainText += 'This is the nightly build report of Coriolis.\n' + self.mainText += 'This is the nightly build report of Coriolis.\n' else: - self.mainText += 'SoC installer report of Coriolis.\n' - self.mainText += '%s\n' % date + self.mainText += 'SoC installer report of Coriolis.\n' + self.mainText += '{}\n'.format(date) self.mainText += '\n' if self.conf.success: - self.mainText += 'Build was SUCCESSFUL\n' + self.mainText += 'Build was SUCCESSFUL\n' else: - self.mainText += 'Build has FAILED, please have a look to the attached log file(s).\n' + self.mainText += 'Build has FAILED, please have a look to the attached log file(s).\n' self.mainText += '\n' self.mainText += 'Complete log file(s) can be found here:\n' return @@ -505,28 +488,27 @@ class Report ( object ): fd = open( logFile, 'rb' ) try: - fd.seek( -1024*100, os.SEEK_END ) - except IOError, e: - pass + fd.seek( -1024*100, os.SEEK_END ) + except IOError as e: + pass tailLines = '' for line in fd.readlines()[1:]: - tailLines += line + tailLines += line.decode( 'latin_1' ) fd.close() - self.mainText += ' <%s>\n' % logFile + self.mainText += ' "{}"\n'.format(logFile) attachement = MIMEApplication(tailLines) attachement.add_header( 'Content-Disposition', 'attachment', filename=os.path.basename(logFile) ) - self.attachements.append( attachement ) return def send ( self ): self.message.attach( MIMEText(self.mainText) ) for attachement in self.attachements: - self.message.attach( attachement ) + self.message.attach( attachement ) - print "Sending mail report to:" - for receiver in self.conf.receivers: print ' <%s>' % receiver + print( "Sending mail report to:" ) + for receiver in self.conf.receivers: print( ' <{}>'.format(receiver) ) session = smtplib.SMTP( 'localhost' ) session.sendmail( self.conf.sender, self.conf.receivers, self.message.as_string() ) session.quit() @@ -577,7 +559,6 @@ try: if conf.doAlliance: conf.openLog( 'alliance' ) if conf.doCoriolis: conf.openLog( 'coriolis' ) if conf.doBenchs: conf.openLog( 'benchs' ) - if conf.dockerMode: os.environ['USER'] = 'root' gitSupports = [] @@ -613,29 +594,28 @@ try: for entry in os.listdir(conf.rootDir): if entry.startswith('Linux.'): buildDir = conf.rootDir+'/'+entry - print 'Removing OS build directory: <%s>' % buildDir + print( 'Removing OS build directory: "{}"'.format(buildDir) ) shutil.rmtree( buildDir ) commands = conf.getCommands( options.profile ) for command in commands: if command.host: - print 'Executing command on remote host <%s>:' % host + print( 'Executing command on remote host "{}":'.format(host) ) else: - print 'Executing command on *local* host:' - print ' %s' % str(command) + print( 'Executing command on *local* host:' ) + print( ' {}'.format(command) ) command.execute() conf.closeLogs() - conf.success = True -except ErrorMessage, e: - print e +except ErrorMessage as e: + print( e ) conf.closeLogs() conf.success = False if showTrace: - print '\nPython stack trace:' + print( '\nPython stack trace:' ) traceback.print_tb( sys.exc_info()[2] ) conf.rcode = e.code diff --git a/bora/CMakeLists.txt b/bora/CMakeLists.txt index a5964191..47ff1916 100644 --- a/bora/CMakeLists.txt +++ b/bora/CMakeLists.txt @@ -4,6 +4,7 @@ project(BORA) option(BUILD_DOC "Build the documentation (doxygen)" OFF) + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) cmake_minimum_required(VERSION 2.8.9) @@ -14,15 +15,14 @@ setup_project_paths(CORIOLIS) set_cmake_policies() - setup_boost(program_options filesystem python regex) + setup_boost(program_options) setup_qt() setup_qwt() find_package(Libexecinfo REQUIRED) - find_package(PythonLibs 2 REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) - find_package(VLSISAPD REQUIRED) find_package(FLUTE REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/bora/python/CMakeLists.txt b/bora/python/CMakeLists.txt index 26104e4d..a2f0ef8f 100644 --- a/bora/python/CMakeLists.txt +++ b/bora/python/CMakeLists.txt @@ -1,2 +1,2 @@ - install ( FILES boraInit.py DESTINATION ${PYTHON_SITE_PACKAGES}/bora ) + install ( FILES boraInit.py DESTINATION ${Python_CORIOLISLIB}/bora ) diff --git a/bora/python/boraInit.py b/bora/python/boraInit.py index 9ba76a52..ecbb70ed 100644 --- a/bora/python/boraInit.py +++ b/bora/python/boraInit.py @@ -1,29 +1,27 @@ -#!/usr/bin/env python try: - import sys - import os.path - import helpers.io - from helpers.io import ErrorMessage - from helpers.io import WarningMessage - import Viewer -except Exception, e: - helpers.io.catch( e ) - sys.exit( 1 ) + import sys + import os.path + import helpers.io + from helpers.io import ErrorMessage + from helpers.io import WarningMessage + import Viewer +except Exception as e: + helpers.io.catch( e ) + sys.exit( 1 ) def boraHook ( **kw ): bora = None - if kw.has_key('bora'): - bora = kw['bora'] + if 'bora' in kw: + bora = kw['bora'] else: - print ErrorMessage( 3, 'boraHook(): Must be run from a BoraEngine.' ) - return - + print( ErrorMessage( 3, 'boraHook(): Must be run from a BoraEngine.' )) + return try: - userInit = os.path.join( os.getcwd(), 'coriolis2/bora.py' ) - if (os.path.exists(userInit)): - execfile( userInit ) - except Exception, e: - helpers.io.catch( e ) + userInit = os.path.join( os.getcwd(), 'coriolis2/bora.py' ) + if (os.path.exists(userInit)): + exec( open(userInit).read() ) + except Exception as e: + helpers.io.catch( e ) return diff --git a/bora/src/CMakeLists.txt b/bora/src/CMakeLists.txt index 7be6544f..a8771c0a 100644 --- a/bora/src/CMakeLists.txt +++ b/bora/src/CMakeLists.txt @@ -9,7 +9,7 @@ ${Boost_INCLUDE_DIRS} ${QWT_INCLUDE_DIR} ${QtX_INCLUDE_DIR} - ${PYTHON_INCLUDE_PATH} + ${Python_INCLUDE_DIRS} ) set( includes bora/Constants.h bora/ParameterRange.h @@ -101,7 +101,7 @@ ${QWT_LIBRARY} ${QtX_LIBRARIES} ${Boost_LIBRARIES} - ${PYTHON_LIBRARIES} -lutil + ${Python_LIBRARIES} -lutil ) add_library( bora ${cpps} ${mocCpps} ${pyCpps} ) diff --git a/bora/src/PyBora.cpp b/bora/src/PyBora.cpp index f2f40072..f6d31031 100644 --- a/bora/src/PyBora.cpp +++ b/bora/src/PyBora.cpp @@ -1,7 +1,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC 2016-2018, All Rights Reserved +// Copyright (c) Sorbonne Université 2016-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -63,12 +63,21 @@ extern "C" { }; - // --------------------------------------------------------------- - // Module Initialization : "initBora ()" + static PyModuleDef PyBora_ModuleDef = + { PyModuleDef_HEAD_INIT + , .m_name = "Bora" + , .m_doc = "Analog Place & Global Route." + , .m_size = -1 + , .m_methods = PyBora_Methods + }; - DL_EXPORT(void) initBora () + + // --------------------------------------------------------------- + // Module Initialization : "PyInit_Bora ()" + + PyMODINIT_FUNC PyInit_Bora ( void ) { - cdebug.log(61) << "initBora()" << endl; + cdebug.log(61) << "PyInit_Bora()" << endl; PyParameterRange_LinkPyType(); PyStepParameterRange_LinkPyType(); @@ -95,12 +104,11 @@ extern "C" { PYTYPE_READY_SUB( BoraEngine , ToolEngine ); PYTYPE_READY_SUB( GraphicBoraEngine , GraphicTool ); - - PyObject* module = Py_InitModule( "Bora", PyBora_Methods ); + PyObject* module = PyModule_Create( &PyBora_ModuleDef ); if (module == NULL) { cerr << "[ERROR]\n" << " Failed to initialize Bora module." << endl; - return; + return NULL; } Py_INCREF( &PyTypeParameterRange ); @@ -128,6 +136,8 @@ extern "C" { PySlicingNode_postModuleInit(); PyBoraEngine_postModuleInit(); + + return module; } diff --git a/bora/src/PyDSlicingNode.cpp b/bora/src/PyDSlicingNode.cpp index 7532fc76..0be8b518 100644 --- a/bora/src/PyDSlicingNode.cpp +++ b/bora/src/PyDSlicingNode.cpp @@ -62,12 +62,12 @@ extern "C" { DSlicingNode* node = NULL; HTRY - if (not PyArg_ParseTuple( args,"SOO|O:DSlicingNode.create" + if (not PyArg_ParseTuple( args,"OOO|O:DSlicingNode.create" , &pyInstance , &pyCell , &pyParameterRange , &pyRoutingGauge ) ) { - PyErr_SetString ( ConstructorError, "DSlicingNode.create(): Invalid/bad number of parameters ." ); + PyErr_SetString ( ConstructorError, "DSlicingNode.create(): Invalid/bad number of parameters." ); return NULL; } if (not IsPyCell(pyCell)) { diff --git a/bora/src/SlicingPlotWidget.cpp b/bora/src/SlicingPlotWidget.cpp index c3418bec..89995b0b 100644 --- a/bora/src/SlicingPlotWidget.cpp +++ b/bora/src/SlicingPlotWidget.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/bora/src/bora/NodeSets.h b/bora/src/bora/NodeSets.h index c0a32025..e57bb952 100644 --- a/bora/src/bora/NodeSets.h +++ b/bora/src/bora/NodeSets.h @@ -17,6 +17,7 @@ #ifndef BORA_NODE_SETS_H #define BORA_NODE_SETS_H +#include #include #include #include "BoxSet.h" diff --git a/coloquinte/CMakeLists.txt b/coloquinte/CMakeLists.txt index c815d38d..60d6bf7a 100644 --- a/coloquinte/CMakeLists.txt +++ b/coloquinte/CMakeLists.txt @@ -3,9 +3,10 @@ set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(COLOQUINTE) - set(ignoreVariables "${CMAKE_INSTALL_DIR}") + set(ignoreVariables "${CMAKE_INSTALL_DIR}" "${BUILD_DOC}") - option(BUILD_DOC "Build the documentation (doxygen)" OFF) +#option(BUILD_DOC "Build the documentation (doxygen)" OFF) + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) cmake_minimum_required(VERSION 2.8.9) diff --git a/coloquinte/src/coloquinte/optimization_subproblems.hxx b/coloquinte/src/coloquinte/optimization_subproblems.hxx index e0849b23..3ccbdfcc 100644 --- a/coloquinte/src/coloquinte/optimization_subproblems.hxx +++ b/coloquinte/src/coloquinte/optimization_subproblems.hxx @@ -9,6 +9,7 @@ #include #include #include +#include namespace coloquinte{ diff --git a/coloquinte/src/solvers.cxx b/coloquinte/src/solvers.cxx index 57f0fbc1..27d75bae 100644 --- a/coloquinte/src/solvers.cxx +++ b/coloquinte/src/solvers.cxx @@ -4,6 +4,7 @@ #include #include #include +#include namespace coloquinte{ namespace gp{ diff --git a/coloquinte/src/topologies.cxx b/coloquinte/src/topologies.cxx index d36cee41..c9b952f0 100644 --- a/coloquinte/src/topologies.cxx +++ b/coloquinte/src/topologies.cxx @@ -9,6 +9,7 @@ #include #include #include +#include namespace coloquinte{ using edge_t = std::pair; diff --git a/crlcore/CMakeLists.txt b/crlcore/CMakeLists.txt index b13f4331..a753658a 100644 --- a/crlcore/CMakeLists.txt +++ b/crlcore/CMakeLists.txt @@ -19,20 +19,21 @@ set_cmake_policies() check_distribution() setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") - setup_boost(program_options python regex wave) + setup_boost(program_options) setup_qt() + cmake_policy(SET CMP0054 NEW) + if (USE_LIBBFD) find_package(Libbfd) endif() find_package(LibXml2 REQUIRED) - find_package(PythonLibs 2 REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(BISON REQUIRED) find_package(FLEX REQUIRED) find_package(LEFDEF) find_package(OPENACCESS) - find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) find_package(Libexecinfo REQUIRED) #include(UseLATEX) diff --git a/crlcore/doc/crlcore/html/AcmSigda_8h_source.html b/crlcore/doc/crlcore/html/AcmSigda_8h_source.html index 97b1056c..e6efbf9f 100644 --- a/crlcore/doc/crlcore/html/AcmSigda_8h_source.html +++ b/crlcore/doc/crlcore/html/AcmSigda_8h_source.html @@ -54,7 +54,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/AllianceFramework_8h_source.html b/crlcore/doc/crlcore/html/AllianceFramework_8h_source.html index 9e12dc08..3db51c68 100644 --- a/crlcore/doc/crlcore/html/AllianceFramework_8h_source.html +++ b/crlcore/doc/crlcore/html/AllianceFramework_8h_source.html @@ -77,7 +77,7 @@ $(function() {
Catalog * getCatalog()
Definition: AllianceFramework.h:176
Definition: AllianceFramework.h:49
RoutingGauge * getRoutingGauge(const Name &name="")
-
A Registry to store Alliance Cell metadatas.
Definition: Catalog.h:56
+
A Registry to store Alliance Cell metadatas.
Definition: Catalog.h:54
AllianceLibrary * getAllianceLibrary(unsigned int index)
Definition: AllianceFramework.h:53
Holds all the Alliance environment variables.
Definition: Environment.h:33
@@ -92,7 +92,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/AllianceLibrary_8h_source.html b/crlcore/doc/crlcore/html/AllianceLibrary_8h_source.html index 814eb1b3..00fa5721 100644 --- a/crlcore/doc/crlcore/html/AllianceLibrary_8h_source.html +++ b/crlcore/doc/crlcore/html/AllianceLibrary_8h_source.html @@ -59,7 +59,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/Banner_8h_source.html b/crlcore/doc/crlcore/html/Banner_8h_source.html index 40487b5c..87df2349 100644 --- a/crlcore/doc/crlcore/html/Banner_8h_source.html +++ b/crlcore/doc/crlcore/html/Banner_8h_source.html @@ -66,7 +66,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/Catalog_8h_source.html b/crlcore/doc/crlcore/html/Catalog_8h_source.html index 90a7547b..bee2619d 100644 --- a/crlcore/doc/crlcore/html/Catalog_8h_source.html +++ b/crlcore/doc/crlcore/html/Catalog_8h_source.html @@ -44,81 +44,81 @@ $(function() {
Catalog.h
-
1 // -*- C++ -*-
2 //
3 // This file is part of the Coriolis Software.
4 // Copyright (c) UPMC 2008-2018, All Rights Reserved
5 //
6 // +-----------------------------------------------------------------+
7 // | C O R I O L I S |
8 // | Alliance / Hurricane Interface |
9 // | |
10 // | Author : Jean-Paul CHAPUT |
11 // | E-mail : Jean-Paul.Chaput@lip6.fr |
12 // | =============================================================== |
13 // | C++ Header : "./crlcore/Catalog.h" |
14 // +-----------------------------------------------------------------+
15 
16 
17 #ifndef CRL_CATALOG_H
18 #define CRL_CATALOG_H
19 
20 #include <string>
21 #include <map>
22 #include "hurricane/Name.h"
23 #include "hurricane/Property.h"
24 #include "hurricane/Slot.h"
25 
26 namespace Hurricane {
27  class Cell;
28  class Library;
29 }
30 
31 
32 namespace CRL {
33 
34 
35  using std::string;
36  using std::map;
39  using Hurricane::_TName;
40  using Hurricane::Name;
41  using Hurricane::Record;
43  using Hurricane::DBo;
44  using Hurricane::Cell;
45  using Hurricane::Library;
46  using Hurricane::Property;
47 
48 
49  extern const char* MissingStateProperty;
50 
51 
52 // -------------------------------------------------------------------
53 // Class : "CRL::Catalog".
54 
55 
56  class Catalog {
57 
58  public:
59  class State;
60  public:
61  inline Catalog ();
62  ~Catalog ();
63  State* getState ( const Name& name, bool add=false );
64  void mergeState ( const Name& name, const State& other );
65  bool deleteState ( const Name& name );
66  void clear ();
67  bool loadFromFile ( const string& path, Library* library );
68  void saveToFile ( const string& path, Library* library );
69  inline map<Name,State*>* getStates ();
70  string _getPrint () const;
71  inline string _getTypeName () const;
72  string _getString () const;
73  Record* _getRecord () const;
74 
75  public:
76  // Sub-Class: State.
77  class State {
78  public:
79  // Flags Constants.
80  enum Flags { TerminalNetlist = 1 << 0
81  , Feed = 1 << 1
82  , Pad = 1 << 2
83  , GDS = 1 << 3
84  , Delete = 1 << 4
85  , Logical = 1 << 5
86  , Physical = 1 << 6
87  , InMemory = 1 << 7
88  , Foreign = 1 << 8
89  , VstUseConcat = 1 << 9
90  , VstNoLowerCase = 1 << 10
91  , VstNoLinkage = 1 << 11
93  };
94  // Constructors.
95  inline State ();
96  ~State ();
97  // Predicates.
98  inline bool isTerminalNetlist () const;
99  inline bool isFeed () const;
100  inline bool isPad () const;
101  inline bool isGds () const;
102  inline bool isDelete () const;
103  inline bool isPhysical () const;
104  inline bool isLogical () const;
105  inline bool isInMemory () const;
106  // Flags management.
107  inline unsigned int getFlags ( unsigned int mask=(unsigned int)-1 ) const;
108  inline bool setFlags ( unsigned int mask, bool value );
109  inline bool setTerminalNetlist ( bool value );
110  inline bool setFeed ( bool value );
111  inline bool setPad ( bool value );
112  inline bool setGds ( bool value );
113  inline bool setDelete ( bool value );
114  inline bool setPhysical ( bool value );
115  inline bool setLogical ( bool value );
116  inline bool setInMemory ( bool value );
117  // Accessors.
118  inline Cell* getCell () const;
119  inline Library* getLibrary () const;
120  inline unsigned int getDepth () const;
121  // Modifiers.
122  inline void merge ( const State& other );
123  Cell* setCell ( Cell* cell );
124  inline Library* setLibrary ( Library* library );
125  inline void setDepth ( unsigned int depth );
126  // Hurricane Management.
127  void toJson ( JsonWriter* w ) const;
128  inline string _getTypeName () const;
129  string _getString () const;
130  Record* _getRecord () const;
131 
132  private:
133  // Internal - Attributes.
134  unsigned int _flags;
135  unsigned int _depth;
136  Cell* _cell;
137  Library* _library;
138 
139  // Json Property.
140  public:
141  class JsonState : public JsonObject {
142  public:
143  static void initialize ();
144  JsonState ( unsigned long flags );
145  virtual string getTypeName () const;
146  virtual JsonState* clone ( unsigned long ) const;
147  virtual void toData ( JsonStack& );
148  };
149  };
150 
151  private:
152  // Attributes.
153  map<Name,State*> _states;
154 
155  private:
156  Catalog ( const Catalog& );
157  static bool readLine ( const string& s, string& name, State* state );
158 
159  };
160 
161 
162 // -------------------------------------------------------------------
163 // Class : "CRL::CatalogProperty".
164 
165  class CatalogProperty : public PrivateProperty {
166 
167  public:
168  static Name _name;
169  public:
170  static CatalogProperty* create ( Catalog::State* state );
171  static Name getPropertyName ();
172  virtual Name getName () const;
173  inline Catalog::State* getState () const;
174  inline void setState ( Catalog::State* state );
175  virtual void onReleasedBy ( DBo* owner );
176  virtual bool hasJson () const;
177  virtual void toJson ( JsonWriter* w, const DBo* ) const;
178  virtual string _getTypeName () const;
179  virtual string _getString () const;
180  virtual Record* _getRecord () const;
181 
182  protected:
183  // Attributes.
184  Catalog::State* _state;
185 
186  protected:
187  // Constructor.
188  inline CatalogProperty ( Catalog::State* state );
189  };
190 
191 
192 // -------------------------------------------------------------------
193 // Class : "CRL::JsonCatalogProperty".
194 
195  class JsonCatalogProperty : public JsonObject {
196  public:
197  static void initialize ();
198  JsonCatalogProperty ( unsigned long );
199  virtual string getTypeName () const;
200  virtual JsonCatalogProperty* clone ( unsigned long ) const;
201  virtual void toData ( JsonStack& );
202  };
203 
204 
205 // -------------------------------------------------------------------
206 // Inline Functions.
207 
208  inline Catalog::State::State () : _flags(0), _depth(1), _cell(NULL), _library(NULL) { }
209  inline bool Catalog::State::isTerminalNetlist () const { return (_flags&TerminalNetlist)?1:0; }
210  inline bool Catalog::State::isFeed () const { return (_flags&Feed )?1:0; }
211  inline bool Catalog::State::isPad () const { return (_flags&Pad )?1:0; }
212  inline bool Catalog::State::isGds () const { return (_flags&GDS )?1:0; }
213  inline bool Catalog::State::isDelete () const { return (_flags&Delete )?1:0; }
214  inline bool Catalog::State::isPhysical () const { return (_flags&Physical )?1:0; }
215  inline bool Catalog::State::isLogical () const { return (_flags&Logical )?1:0; }
216  inline bool Catalog::State::isInMemory () const { return (_flags&InMemory )?1:0; }
217  inline unsigned int Catalog::State::getFlags ( unsigned int mask ) const { return ( _flags & mask ); }
218  inline bool Catalog::State::setFlags ( unsigned int mask, bool value ) {
219  if (value) { _flags |= mask; }
220  else { _flags &= ~mask; }
221  return ((_flags&mask) ? true : false);
222  }
223  inline bool Catalog::State::setTerminalNetlist ( bool value ) { return setFlags(TerminalNetlist,value); }
224  inline bool Catalog::State::setFeed ( bool value ) { return setFlags(Feed ,value); }
225  inline bool Catalog::State::setPad ( bool value ) { return setFlags(Pad ,value); }
226  inline bool Catalog::State::setGds ( bool value ) { return setFlags(GDS ,value); }
227  inline bool Catalog::State::setDelete ( bool value ) { return setFlags(Delete ,value); }
228  inline bool Catalog::State::setPhysical ( bool value ) { return setFlags(Physical ,value); }
229  inline bool Catalog::State::setLogical ( bool value ) { return setFlags(Logical ,value); }
230  inline bool Catalog::State::setInMemory ( bool value ) { return setFlags(InMemory ,value); }
231  inline Library* Catalog::State::setLibrary ( Library* library ) { return _library = library; }
232  inline void Catalog::State::setDepth ( unsigned int depth ) { _depth = depth; }
233  inline Cell* Catalog::State::getCell () const { return _cell; }
234  inline Library* Catalog::State::getLibrary () const { return _library; }
235  inline unsigned int Catalog::State::getDepth () const { return _depth; }
236  inline string Catalog::State::_getTypeName () const { return _TName("Catalog::State"); }
237 
238  inline Catalog::Catalog () : _states() { }
239  inline map<Name,Catalog::State*>*
240  Catalog::getStates () { return &_states; }
241  inline string Catalog::_getTypeName () const { return _TName("Catalog"); }
242 
243  inline CatalogProperty::CatalogProperty ( Catalog::State* state ) : PrivateProperty(), _state(state) {}
244  inline Catalog::State* CatalogProperty::getState () const { return _state; }
245  inline void CatalogProperty::setState ( Catalog::State* state ) { _state = state; }
246 
247 
248 // -------------------------------------------------------------------
249 // Class : "CRL::CatalogExtension".
250 
251 
253  public:
254  static Catalog::State* get ( const Cell* );
255  public:
256  static inline bool isTerminalNetlist ( const Cell* );
257  static inline bool isFeed ( const Cell* );
258  static inline bool isPad ( const Cell* );
259  static inline bool isGds ( const Cell* );
260  static inline bool isDelete ( const Cell* );
261  static inline bool isPhysical ( const Cell* );
262  static inline bool isLogical ( const Cell* );
263  // Flags management.
264  static inline unsigned int getFlags ( const Cell*, unsigned int mask=(unsigned int)-1 );
265  static inline bool setFlags ( const Cell*, unsigned int mask, bool value );
266  static inline bool setTerminalNetlist ( const Cell*, bool value );
267  static inline bool setFeed ( const Cell*, bool value );
268  static inline bool setPad ( const Cell*, bool value );
269  static inline bool setGds ( const Cell*, bool value );
270  static inline bool setDelete ( const Cell*, bool value );
271  static inline bool setPhysical ( const Cell*, bool value );
272  static inline bool setLogical ( const Cell*, bool value );
273  // Accessors.
274  static inline Library* getLibrary ( const Cell* );
275  static inline unsigned int getDepth ( const Cell* );
276  // Modifiers.
277  static inline Library* setLibrary ( const Cell*, Library* library );
278  static inline void setDepth ( const Cell*, unsigned int depth );
279  private:
280  static const Cell* _owner;
281  static Catalog::State* _cache;
282  };
283 
284 
285  inline bool CatalogExtension::isTerminalNetlist ( const Cell* cell )
286  {
287  Catalog::State* state = get(cell);
288  return (state == NULL) ? false : state->isTerminalNetlist();
289  }
290 
291 
292  inline bool CatalogExtension::isFeed ( const Cell* cell )
293  {
294  Catalog::State* state = get(cell);
295  return (state == NULL) ? false : state->isFeed();
296  }
297 
298 
299  inline bool CatalogExtension::isGds ( const Cell* cell )
300  {
301  Catalog::State* state = get(cell);
302  return (state == NULL) ? false : state->isGds();
303  }
304 
305 
306  inline bool CatalogExtension::isPad ( const Cell* cell )
307  {
308  Catalog::State* state = get(cell);
309  return (state == NULL) ? false : state->isPad();
310  }
311 
312 
313  inline bool CatalogExtension::isDelete ( const Cell* cell )
314  {
315  Catalog::State* state = get(cell);
316  return (state == NULL) ? false : state->isDelete();
317  }
318 
319 
320  inline bool CatalogExtension::isPhysical ( const Cell* cell )
321  {
322  Catalog::State* state = get(cell);
323  return (state == NULL) ? false : state->isPhysical();
324  }
325 
326 
327  inline bool CatalogExtension::isLogical ( const Cell* cell )
328  {
329  Catalog::State* state = get(cell);
330  return (state == NULL) ? false : state->isLogical();
331  }
332 
333 
334  inline unsigned int CatalogExtension::getFlags ( const Cell* cell, unsigned int mask )
335  {
336  Catalog::State* state = get(cell);
337  return (state == NULL) ? 0 : state->getFlags();
338  }
339 
340 
341  inline bool CatalogExtension::setFlags ( const Cell* cell, unsigned int mask, bool value )
342  {
343  Catalog::State* state = get(cell);
344  return (state == NULL) ? false : state->setFlags(mask,value);
345  }
346 
347 
348  inline bool CatalogExtension::setTerminalNetlist ( const Cell* cell, bool value )
349  {
350  Catalog::State* state = get(cell);
351  return (state == NULL) ? false : state->setTerminalNetlist(value);
352  }
353 
354 
355  inline bool CatalogExtension::setFeed ( const Cell* cell, bool value )
356  {
357  Catalog::State* state = get(cell);
358  return (state == NULL) ? false : state->setFeed(value);
359  }
360 
361 
362  inline bool CatalogExtension::setPad ( const Cell* cell, bool value )
363  {
364  Catalog::State* state = get(cell);
365  return (state == NULL) ? false : state->setPad(value);
366  }
367 
368 
369  inline bool CatalogExtension::setGds ( const Cell* cell, bool value )
370  {
371  Catalog::State* state = get(cell);
372  return (state == NULL) ? false : state->setGds(value);
373  }
374 
375 
376  inline bool CatalogExtension::setDelete ( const Cell* cell, bool value )
377  {
378  Catalog::State* state = get(cell);
379  return (state == NULL) ? false : state->setDelete(value);
380  }
381 
382 
383  inline bool CatalogExtension::setPhysical ( const Cell* cell, bool value )
384  {
385  Catalog::State* state = get(cell);
386  return (state == NULL) ? false : state->setPhysical(value);
387  }
388 
389 
390  inline bool CatalogExtension::setLogical ( const Cell* cell, bool value )
391  {
392  Catalog::State* state = get(cell);
393  return (state == NULL) ? false : state->setLogical(value);
394  }
395 
396 
397  inline Library* CatalogExtension::getLibrary ( const Cell* cell )
398  {
399  Catalog::State* state = get(cell);
400  return (state == NULL) ? NULL : state->getLibrary();
401  }
402 
403 
404  inline unsigned int CatalogExtension::getDepth ( const Cell* cell )
405  {
406  Catalog::State* state = get(cell);
407  return (state == NULL) ? 0 : state->getDepth();
408  }
409 
410 
411  inline Library* CatalogExtension::setLibrary ( const Cell* cell, Library* library )
412  {
413  Catalog::State* state = get(cell);
414  return (state == NULL) ? NULL : state->setLibrary(library);
415  }
416 
417 
418  inline void CatalogExtension::setDepth ( const Cell* cell, unsigned int depth )
419  {
420  Catalog::State* state = get(cell);
421  if ( state == NULL ) state->setDepth(depth);
422  }
423 
424 
425 } // End of CRL namespace.
426 
427 
428 
429 
430 // x-----------------------------------------------------------------x
431 // | Functions Overload for Hurricane Management |
432 // x-----------------------------------------------------------------x
433 
434 
435 inline std::string getPrint ( const CRL::Catalog &CATAL ) { return CATAL._getPrint(); }
436 
437 INSPECTOR_P_SUPPORT(CRL::Catalog);
438 INSPECTOR_P_SUPPORT(CRL::Catalog::State);
439 
440 
441 #endif // CRL_CATALOG_H
unsigned int getFlags(unsigned int mask=(unsigned int) -1) const
Definition: Catalog.h:217
+
1 // -*- C++ -*-
2 //
3 // This file is part of the Coriolis Software.
4 // Copyright (c) UPMC 2008-2018, All Rights Reserved
5 //
6 // +-----------------------------------------------------------------+
7 // | C O R I O L I S |
8 // | Alliance / Hurricane Interface |
9 // | |
10 // | Author : Jean-Paul CHAPUT |
11 // | E-mail : Jean-Paul.Chaput@lip6.fr |
12 // | =============================================================== |
13 // | C++ Header : "./crlcore/Catalog.h" |
14 // +-----------------------------------------------------------------+
15 
16 
17 #pragma once
18 #include <string>
19 #include <map>
20 #include "hurricane/Name.h"
21 #include "hurricane/Property.h"
22 #include "hurricane/Slot.h"
23 
24 namespace Hurricane {
25  class Cell;
26  class Library;
27 }
28 
29 
30 namespace CRL {
31 
32 
33  using std::string;
34  using std::map;
37  using Hurricane::_TName;
38  using Hurricane::Name;
39  using Hurricane::Record;
41  using Hurricane::DBo;
42  using Hurricane::Cell;
43  using Hurricane::Library;
44  using Hurricane::Property;
45 
46 
47  extern const char* MissingStateProperty;
48 
49 
50 // -------------------------------------------------------------------
51 // Class : "CRL::Catalog".
52 
53 
54  class Catalog {
55 
56  public:
57  class State;
58  public:
59  inline Catalog ();
60  ~Catalog ();
61  State* getState ( const Name& name, bool add=false );
62  void mergeState ( const Name& name, const State& other );
63  bool deleteState ( const Name& name );
64  void clear ();
65  bool loadFromFile ( const string& path, Library* library );
66  void saveToFile ( const string& path, Library* library );
67  inline map<Name,State*>* getStates ();
68  string _getPrint () const;
69  inline string _getTypeName () const;
70  string _getString () const;
71  Record* _getRecord () const;
72 
73  public:
74  // Sub-Class: State.
75  class State {
76  public:
77  // Flags Constants.
78  enum Flags { TerminalNetlist = 1 << 0
79  , Feed = 1 << 1
80  , Pad = 1 << 2
81  , GDS = 1 << 3
82  , Delete = 1 << 4
83  , Logical = 1 << 5
84  , Physical = 1 << 6
85  , InMemory = 1 << 7
86  , Foreign = 1 << 8
87  , VstUseConcat = 1 << 9
88  , VstNoLowerCase = 1 << 10
89  , VstUniquifyUpperCase = 1 << 11
90  , VstNoLinkage = 1 << 12
92  };
93  // Constructors.
94  inline State ();
95  ~State ();
96  // Predicates.
97  inline bool isTerminalNetlist () const;
98  inline bool isFeed () const;
99  inline bool isPad () const;
100  inline bool isGds () const;
101  inline bool isDelete () const;
102  inline bool isPhysical () const;
103  inline bool isLogical () const;
104  inline bool isInMemory () const;
105  // Flags management.
106  inline unsigned int getFlags ( unsigned int mask=(unsigned int)-1 ) const;
107  inline bool setFlags ( unsigned int mask, bool value );
108  inline bool setTerminalNetlist ( bool value );
109  inline bool setFeed ( bool value );
110  inline bool setPad ( bool value );
111  inline bool setGds ( bool value );
112  inline bool setDelete ( bool value );
113  inline bool setPhysical ( bool value );
114  inline bool setLogical ( bool value );
115  inline bool setInMemory ( bool value );
116  // Accessors.
117  inline Cell* getCell () const;
118  inline Library* getLibrary () const;
119  inline unsigned int getDepth () const;
120  // Modifiers.
121  inline void merge ( const State& other );
122  Cell* setCell ( Cell* cell );
123  inline Library* setLibrary ( Library* library );
124  inline void setDepth ( unsigned int depth );
125  // Hurricane Management.
126  void toJson ( JsonWriter* w ) const;
127  inline string _getTypeName () const;
128  string _getString () const;
129  Record* _getRecord () const;
130 
131  private:
132  // Internal - Attributes.
133  unsigned int _flags;
134  unsigned int _depth;
135  Cell* _cell;
136  Library* _library;
137 
138  // Json Property.
139  public:
140  class JsonState : public JsonObject {
141  public:
142  static void initialize ();
143  JsonState ( unsigned long flags );
144  virtual string getTypeName () const;
145  virtual JsonState* clone ( unsigned long ) const;
146  virtual void toData ( JsonStack& );
147  };
148  };
149 
150  private:
151  // Attributes.
152  map<Name,State*> _states;
153 
154  private:
155  Catalog ( const Catalog& );
156  static bool readLine ( const string& s, string& name, State* state );
157 
158  };
159 
160 
161 // -------------------------------------------------------------------
162 // Class : "CRL::CatalogProperty".
163 
164  class CatalogProperty : public PrivateProperty {
165 
166  public:
167  static Name _name;
168  public:
169  static CatalogProperty* create ( Catalog::State* state );
170  static Name getPropertyName ();
171  virtual Name getName () const;
172  inline Catalog::State* getState () const;
173  inline void setState ( Catalog::State* state );
174  virtual void onReleasedBy ( DBo* owner );
175  virtual bool hasJson () const;
176  virtual void toJson ( JsonWriter* w, const DBo* ) const;
177  virtual string _getTypeName () const;
178  virtual string _getString () const;
179  virtual Record* _getRecord () const;
180 
181  protected:
182  // Attributes.
183  Catalog::State* _state;
184 
185  protected:
186  // Constructor.
187  inline CatalogProperty ( Catalog::State* state );
188  };
189 
190 
191 // -------------------------------------------------------------------
192 // Class : "CRL::JsonCatalogProperty".
193 
194  class JsonCatalogProperty : public JsonObject {
195  public:
196  static void initialize ();
197  JsonCatalogProperty ( unsigned long );
198  virtual string getTypeName () const;
199  virtual JsonCatalogProperty* clone ( unsigned long ) const;
200  virtual void toData ( JsonStack& );
201  };
202 
203 
204 // -------------------------------------------------------------------
205 // Inline Functions.
206 
207  inline Catalog::State::State () : _flags(0), _depth(1), _cell(NULL), _library(NULL) { }
208  inline bool Catalog::State::isTerminalNetlist () const { return (_flags&TerminalNetlist)?1:0; }
209  inline bool Catalog::State::isFeed () const { return (_flags&Feed )?1:0; }
210  inline bool Catalog::State::isPad () const { return (_flags&Pad )?1:0; }
211  inline bool Catalog::State::isGds () const { return (_flags&GDS )?1:0; }
212  inline bool Catalog::State::isDelete () const { return (_flags&Delete )?1:0; }
213  inline bool Catalog::State::isPhysical () const { return (_flags&Physical )?1:0; }
214  inline bool Catalog::State::isLogical () const { return (_flags&Logical )?1:0; }
215  inline bool Catalog::State::isInMemory () const { return (_flags&InMemory )?1:0; }
216  inline unsigned int Catalog::State::getFlags ( unsigned int mask ) const { return ( _flags & mask ); }
217  inline bool Catalog::State::setFlags ( unsigned int mask, bool value ) {
218  if (value) { _flags |= mask; }
219  else { _flags &= ~mask; }
220  return ((_flags&mask) ? true : false);
221  }
222  inline bool Catalog::State::setTerminalNetlist ( bool value ) { return setFlags(TerminalNetlist,value); }
223  inline bool Catalog::State::setFeed ( bool value ) { return setFlags(Feed ,value); }
224  inline bool Catalog::State::setPad ( bool value ) { return setFlags(Pad ,value); }
225  inline bool Catalog::State::setGds ( bool value ) { return setFlags(GDS ,value); }
226  inline bool Catalog::State::setDelete ( bool value ) { return setFlags(Delete ,value); }
227  inline bool Catalog::State::setPhysical ( bool value ) { return setFlags(Physical ,value); }
228  inline bool Catalog::State::setLogical ( bool value ) { return setFlags(Logical ,value); }
229  inline bool Catalog::State::setInMemory ( bool value ) { return setFlags(InMemory ,value); }
230  inline Library* Catalog::State::setLibrary ( Library* library ) { return _library = library; }
231  inline void Catalog::State::setDepth ( unsigned int depth ) { _depth = depth; }
232  inline Cell* Catalog::State::getCell () const { return _cell; }
233  inline Library* Catalog::State::getLibrary () const { return _library; }
234  inline unsigned int Catalog::State::getDepth () const { return _depth; }
235  inline string Catalog::State::_getTypeName () const { return _TName("Catalog::State"); }
236 
237  inline Catalog::Catalog () : _states() { }
238  inline map<Name,Catalog::State*>*
239  Catalog::getStates () { return &_states; }
240  inline string Catalog::_getTypeName () const { return _TName("Catalog"); }
241 
242  inline CatalogProperty::CatalogProperty ( Catalog::State* state ) : PrivateProperty(), _state(state) {}
243  inline Catalog::State* CatalogProperty::getState () const { return _state; }
244  inline void CatalogProperty::setState ( Catalog::State* state ) { _state = state; }
245 
246 
247 // -------------------------------------------------------------------
248 // Class : "CRL::CatalogExtension".
249 
250 
252  public:
253  static Catalog::State* get ( const Cell* );
254  public:
255  static inline bool isTerminalNetlist ( const Cell* );
256  static inline bool isFeed ( const Cell* );
257  static inline bool isPad ( const Cell* );
258  static inline bool isGds ( const Cell* );
259  static inline bool isDelete ( const Cell* );
260  static inline bool isPhysical ( const Cell* );
261  static inline bool isLogical ( const Cell* );
262  // Flags management.
263  static inline unsigned int getFlags ( const Cell*, unsigned int mask=(unsigned int)-1 );
264  static inline bool setFlags ( const Cell*, unsigned int mask, bool value );
265  static inline bool setTerminalNetlist ( const Cell*, bool value );
266  static inline bool setFeed ( const Cell*, bool value );
267  static inline bool setPad ( const Cell*, bool value );
268  static inline bool setGds ( const Cell*, bool value );
269  static inline bool setDelete ( const Cell*, bool value );
270  static inline bool setPhysical ( const Cell*, bool value );
271  static inline bool setLogical ( const Cell*, bool value );
272  // Accessors.
273  static inline Library* getLibrary ( const Cell* );
274  static inline unsigned int getDepth ( const Cell* );
275  // Modifiers.
276  static inline Library* setLibrary ( const Cell*, Library* library );
277  static inline void setDepth ( const Cell*, unsigned int depth );
278  private:
279  static const Cell* _owner;
280  static Catalog::State* _cache;
281  };
282 
283 
284  inline bool CatalogExtension::isTerminalNetlist ( const Cell* cell )
285  {
286  Catalog::State* state = get(cell);
287  return (state == NULL) ? false : state->isTerminalNetlist();
288  }
289 
290 
291  inline bool CatalogExtension::isFeed ( const Cell* cell )
292  {
293  Catalog::State* state = get(cell);
294  return (state == NULL) ? false : state->isFeed();
295  }
296 
297 
298  inline bool CatalogExtension::isGds ( const Cell* cell )
299  {
300  Catalog::State* state = get(cell);
301  return (state == NULL) ? false : state->isGds();
302  }
303 
304 
305  inline bool CatalogExtension::isPad ( const Cell* cell )
306  {
307  Catalog::State* state = get(cell);
308  return (state == NULL) ? false : state->isPad();
309  }
310 
311 
312  inline bool CatalogExtension::isDelete ( const Cell* cell )
313  {
314  Catalog::State* state = get(cell);
315  return (state == NULL) ? false : state->isDelete();
316  }
317 
318 
319  inline bool CatalogExtension::isPhysical ( const Cell* cell )
320  {
321  Catalog::State* state = get(cell);
322  return (state == NULL) ? false : state->isPhysical();
323  }
324 
325 
326  inline bool CatalogExtension::isLogical ( const Cell* cell )
327  {
328  Catalog::State* state = get(cell);
329  return (state == NULL) ? false : state->isLogical();
330  }
331 
332 
333  inline unsigned int CatalogExtension::getFlags ( const Cell* cell, unsigned int mask )
334  {
335  Catalog::State* state = get(cell);
336  return (state == NULL) ? 0 : state->getFlags();
337  }
338 
339 
340  inline bool CatalogExtension::setFlags ( const Cell* cell, unsigned int mask, bool value )
341  {
342  Catalog::State* state = get(cell);
343  return (state == NULL) ? false : state->setFlags(mask,value);
344  }
345 
346 
347  inline bool CatalogExtension::setTerminalNetlist ( const Cell* cell, bool value )
348  {
349  Catalog::State* state = get(cell);
350  return (state == NULL) ? false : state->setTerminalNetlist(value);
351  }
352 
353 
354  inline bool CatalogExtension::setFeed ( const Cell* cell, bool value )
355  {
356  Catalog::State* state = get(cell);
357  return (state == NULL) ? false : state->setFeed(value);
358  }
359 
360 
361  inline bool CatalogExtension::setPad ( const Cell* cell, bool value )
362  {
363  Catalog::State* state = get(cell);
364  return (state == NULL) ? false : state->setPad(value);
365  }
366 
367 
368  inline bool CatalogExtension::setGds ( const Cell* cell, bool value )
369  {
370  Catalog::State* state = get(cell);
371  return (state == NULL) ? false : state->setGds(value);
372  }
373 
374 
375  inline bool CatalogExtension::setDelete ( const Cell* cell, bool value )
376  {
377  Catalog::State* state = get(cell);
378  return (state == NULL) ? false : state->setDelete(value);
379  }
380 
381 
382  inline bool CatalogExtension::setPhysical ( const Cell* cell, bool value )
383  {
384  Catalog::State* state = get(cell);
385  return (state == NULL) ? false : state->setPhysical(value);
386  }
387 
388 
389  inline bool CatalogExtension::setLogical ( const Cell* cell, bool value )
390  {
391  Catalog::State* state = get(cell);
392  return (state == NULL) ? false : state->setLogical(value);
393  }
394 
395 
396  inline Library* CatalogExtension::getLibrary ( const Cell* cell )
397  {
398  Catalog::State* state = get(cell);
399  return (state == NULL) ? NULL : state->getLibrary();
400  }
401 
402 
403  inline unsigned int CatalogExtension::getDepth ( const Cell* cell )
404  {
405  Catalog::State* state = get(cell);
406  return (state == NULL) ? 0 : state->getDepth();
407  }
408 
409 
410  inline Library* CatalogExtension::setLibrary ( const Cell* cell, Library* library )
411  {
412  Catalog::State* state = get(cell);
413  return (state == NULL) ? NULL : state->setLibrary(library);
414  }
415 
416 
417  inline void CatalogExtension::setDepth ( const Cell* cell, unsigned int depth )
418  {
419  Catalog::State* state = get(cell);
420  if ( state == NULL ) state->setDepth(depth);
421  }
422 
423 
424 } // End of CRL namespace.
425 
426 
427 
428 
429 // x-----------------------------------------------------------------x
430 // | Functions Overload for Hurricane Management |
431 // x-----------------------------------------------------------------x
432 
433 
434 inline std::string getPrint ( const CRL::Catalog &CATAL ) { return CATAL._getPrint(); }
435 
436 INSPECTOR_P_SUPPORT(CRL::Catalog);
437 INSPECTOR_P_SUPPORT(CRL::Catalog::State);
unsigned int getFlags(unsigned int mask=(unsigned int) -1) const
Definition: Catalog.h:216
-
static bool setPad(const Cell *, bool value)
Definition: Catalog.h:362
+
static bool setPad(const Cell *, bool value)
Definition: Catalog.h:361
-
An entry to store the Cell State in the Catalog.
Definition: Catalog.h:77
-
Definition: Catalog.h:87
-
static bool setLogical(const Cell *, bool value)
Definition: Catalog.h:390
+
An entry to store the Cell State in the Catalog.
Definition: Catalog.h:75
+
Definition: Catalog.h:85
+
static bool setLogical(const Cell *, bool value)
Definition: Catalog.h:389
-
bool setPad(bool value)
Definition: Catalog.h:225
-
static bool isGds(const Cell *)
Definition: Catalog.h:299
-
bool setGds(bool value)
Definition: Catalog.h:226
+
bool setPad(bool value)
Definition: Catalog.h:224
+
static bool isGds(const Cell *)
Definition: Catalog.h:298
+
bool setGds(bool value)
Definition: Catalog.h:225
Cell * setCell(Cell *cell)
-
Catalog()
Definition: Catalog.h:238
-
static bool isDelete(const Cell *)
Definition: Catalog.h:313
-
static bool isLogical(const Cell *)
Definition: Catalog.h:327
-
static bool setFeed(const Cell *, bool value)
Definition: Catalog.h:355
+
Catalog()
Definition: Catalog.h:237
+
static bool isDelete(const Cell *)
Definition: Catalog.h:312
+
static bool isLogical(const Cell *)
Definition: Catalog.h:326
+
static bool setFeed(const Cell *, bool value)
Definition: Catalog.h:354
-
bool isLogical() const
Definition: Catalog.h:215
+
bool isLogical() const
Definition: Catalog.h:214
void merge(const State &other)
-
bool isPhysical() const
Definition: Catalog.h:214
-
bool isDelete() const
Definition: Catalog.h:213
+
bool isPhysical() const
Definition: Catalog.h:213
+
bool isDelete() const
Definition: Catalog.h:212
-
static unsigned int getFlags(const Cell *, unsigned int mask=(unsigned int) -1)
Definition: Catalog.h:334
-
Library * setLibrary(Library *library)
Definition: Catalog.h:231
-
Definition: Catalog.h:86
-
Definition: Catalog.h:92
-
bool setLogical(bool value)
Definition: Catalog.h:229
-
static bool setGds(const Cell *, bool value)
Definition: Catalog.h:369
-
Definition: Catalog.h:84
+
static unsigned int getFlags(const Cell *, unsigned int mask=(unsigned int) -1)
Definition: Catalog.h:333
+
Library * setLibrary(Library *library)
Definition: Catalog.h:230
+
Definition: Catalog.h:84
+
Definition: Catalog.h:91
+
bool setLogical(bool value)
Definition: Catalog.h:228
+
static bool setGds(const Cell *, bool value)
Definition: Catalog.h:368
+
Definition: Catalog.h:82
bool deleteState(const Name &name)
void mergeState(const Name &name, const State &other)
-
bool setFeed(bool value)
Definition: Catalog.h:224
-
Library * getLibrary() const
Definition: Catalog.h:234
+
bool setFeed(bool value)
Definition: Catalog.h:223
+
Library * getLibrary() const
Definition: Catalog.h:233
-
Definition: Catalog.h:81
-
Cell * getCell() const
Definition: Catalog.h:233
-
bool setFlags(unsigned int mask, bool value)
Definition: Catalog.h:218
+
Definition: Catalog.h:79
+
Cell * getCell() const
Definition: Catalog.h:232
+
bool setFlags(unsigned int mask, bool value)
Definition: Catalog.h:217
-
map< Name, State * > * getStates()
Definition: Catalog.h:240
-
static bool isFeed(const Cell *)
Definition: Catalog.h:292
-
Definition: Catalog.h:82
-
static Library * getLibrary(const Cell *)
Definition: Catalog.h:397
+
map< Name, State * > * getStates()
Definition: Catalog.h:239
+
static bool isFeed(const Cell *)
Definition: Catalog.h:291
+
Definition: Catalog.h:80
+
static Library * getLibrary(const Cell *)
Definition: Catalog.h:396
State * getState(const Name &name, bool add=false)
-
State()
Definition: Catalog.h:208
-
static bool isPad(const Cell *)
Definition: Catalog.h:306
+
State()
Definition: Catalog.h:207
+
static bool isPad(const Cell *)
Definition: Catalog.h:305
bool loadFromFile(const string &path, Library *library)
-
bool isFeed() const
Definition: Catalog.h:210
-
bool setDelete(bool value)
Definition: Catalog.h:227
-
static Library * setLibrary(const Cell *, Library *library)
Definition: Catalog.h:411
-
static bool setPhysical(const Cell *, bool value)
Definition: Catalog.h:383
+
bool isFeed() const
Definition: Catalog.h:209
+
bool setDelete(bool value)
Definition: Catalog.h:226
+
static Library * setLibrary(const Cell *, Library *library)
Definition: Catalog.h:410
+
static bool setPhysical(const Cell *, bool value)
Definition: Catalog.h:382
-
Definition: Catalog.h:85
-
bool isPad() const
Definition: Catalog.h:211
-
A Registry to store Alliance Cell metadatas.
Definition: Catalog.h:56
-
Definition: Catalog.h:83
-
static bool setDelete(const Cell *, bool value)
Definition: Catalog.h:376
-
Wrapper to access a Hurricane::Cell Catalog::State.
Definition: Catalog.h:252
-
bool setPhysical(bool value)
Definition: Catalog.h:228
-
bool isGds() const
Definition: Catalog.h:212
-
static bool isPhysical(const Cell *)
Definition: Catalog.h:320
-
static unsigned int getDepth(const Cell *)
Definition: Catalog.h:404
-
Flags
Definition: Catalog.h:80
+
Definition: Catalog.h:83
+
bool isPad() const
Definition: Catalog.h:210
+
A Registry to store Alliance Cell metadatas.
Definition: Catalog.h:54
+
Definition: Catalog.h:81
+
static bool setDelete(const Cell *, bool value)
Definition: Catalog.h:375
+
Wrapper to access a Hurricane::Cell Catalog::State.
Definition: Catalog.h:251
+
bool setPhysical(bool value)
Definition: Catalog.h:227
+
bool isGds() const
Definition: Catalog.h:211
+
static bool isPhysical(const Cell *)
Definition: Catalog.h:319
+
static unsigned int getDepth(const Cell *)
Definition: Catalog.h:403
+
Flags
Definition: Catalog.h:78
The namespace of Coriolis Core.
Definition: Environment.h:24
-
unsigned int getDepth() const
Definition: Catalog.h:235
-
static bool setFlags(const Cell *, unsigned int mask, bool value)
Definition: Catalog.h:341
+
unsigned int getDepth() const
Definition: Catalog.h:234
+
static bool setFlags(const Cell *, unsigned int mask, bool value)
Definition: Catalog.h:340


- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/Environment_8h_source.html b/crlcore/doc/crlcore/html/Environment_8h_source.html index 58955f04..d1ec24c8 100644 --- a/crlcore/doc/crlcore/html/Environment_8h_source.html +++ b/crlcore/doc/crlcore/html/Environment_8h_source.html @@ -98,7 +98,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/GraphicToolEngine_8h_source.html b/crlcore/doc/crlcore/html/GraphicToolEngine_8h_source.html index 944aeaac..5540ffe6 100644 --- a/crlcore/doc/crlcore/html/GraphicToolEngine_8h_source.html +++ b/crlcore/doc/crlcore/html/GraphicToolEngine_8h_source.html @@ -60,7 +60,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/RoutingGauge_8h_source.html b/crlcore/doc/crlcore/html/RoutingGauge_8h_source.html index db96d034..70509aa3 100644 --- a/crlcore/doc/crlcore/html/RoutingGauge_8h_source.html +++ b/crlcore/doc/crlcore/html/RoutingGauge_8h_source.html @@ -44,22 +44,22 @@ $(function() {
RoutingGauge.h
-
1 // -*- C++ -*-
2 //
3 // This file is part of the Coriolis Software.
4 // Copyright (c) UPMC 2008-2018, All Rights Reserved
5 //
6 // +-----------------------------------------------------------------+
7 // | C O R I O L I S |
8 // | Alliance / Hurricane Interface |
9 // | |
10 // | Author : Jean-Paul CHAPUT |
11 // | E-mail : Jean-Paul.Chaput@lip6.fr |
12 // | =============================================================== |
13 // | C++ Header : "./crlcore/RoutingGauge.h" |
14 // +-----------------------------------------------------------------+
15 
16 
17 #ifndef CRL_ROUTING_GAUGE_H
18 #define CRL_ROUTING_GAUGE_H
19 
20 #include <string>
21 #include <vector>
22 #include "hurricane/Name.h"
23 #include "hurricane/Slot.h"
24 
25 namespace Hurricane {
26  class Layer;
27  class Technology;
28 }
29 
30 #include "crlcore/RoutingLayerGauge.h"
31 
32 namespace CRL {
33 
34  using std::string;
35  using std::vector;
39  using Hurricane::Name;
40  using Hurricane::Record;
41  using Hurricane::Layer;
43 
44 
45 // -------------------------------------------------------------------
46 // Class : "RoutingGauge".
47 
48  class RoutingGauge {
49 
50  public:
51  // Constants.
52  static const size_t nlayerdepth;
53  // Constructors & Destructors.
54  static RoutingGauge* create ( const char* name );
55  virtual void destroy ();
56  // Predicates.
57  inline bool isSymbolic () const;
58  inline bool isTwoMetals () const;
59  inline bool isHV () const;
60  inline bool isVH () const;
61  bool hasLayer ( const Layer* ) const;
62  // Accessors.
63  RoutingGauge* getClone () const;
64  inline const Name getName () const;
65  inline Technology* getTechnology () const;
66  inline size_t getDepth () const;
67  inline DbU::Unit getHorizontalPitch () const;
68  inline DbU::Unit getVerticalPitch () const;
69  RoutingLayerGauge* getHorizontalGauge () const;
70  RoutingLayerGauge* getVerticalGauge () const;
71  RoutingLayerGauge* getLayerGauge ( const Layer* ) const;
72  size_t getViaDepth ( const Layer* ) const;
73  size_t getLayerDepth ( const Layer* ) const;
74  unsigned int getLayerType ( const Layer* ) const;
75  unsigned int getLayerDirection ( const Layer* ) const;
76  DbU::Unit getPitch ( const Layer* ) const;
77  DbU::Unit getOffset ( const Layer* ) const;
78  DbU::Unit getWireWidth ( const Layer* ) const;
79  DbU::Unit getViaWidth ( const Layer* ) const;
80  RoutingLayerGauge* getLayerGauge ( size_t depth ) const;
81  inline unsigned int getLayerDirection ( size_t depth ) const;
82  inline unsigned int getLayerType ( size_t depth ) const;
83  inline DbU::Unit getLayerPitch ( size_t depth ) const;
84  inline DbU::Unit getLayerOffset ( size_t depth ) const;
85  inline DbU::Unit getLayerWireWidth ( size_t depth ) const;
86  inline DbU::Unit getViaWidth ( size_t depth ) const;
87  const Layer* getRoutingLayer ( size_t depth ) const;
88  Layer* getContactLayer ( size_t depth ) const;
89  const vector<RoutingLayerGauge*>&
90  getLayerGauges () const;
91  // Methods.
92  void addLayerGauge ( RoutingLayerGauge* layerGauge );
93  void checkConnexity () const;
94  inline void setSymbolic ( bool );
95  // Hurricane Managment.
96  void toJson ( JsonWriter* ) const;
97  virtual Record* _getRecord ( Record* record=NULL ) const;
98  virtual string _getString () const;
99  virtual string _getTypeName () const;
100 
101  protected:
102  // Internal - Attributes.
103  Name _name;
104  vector<RoutingLayerGauge*> _layerGauges;
105  vector<Layer*> _viaLayers;
106  Technology* _technology;
107  bool _isSymbolic;
108 
109  // Internal - Constructors & Destructors.
110  RoutingGauge ( const char* name );
111  RoutingGauge ( const RoutingGauge& );
112  virtual ~RoutingGauge ();
113  virtual void _preDestroy ();
114  RoutingGauge& operator= ( const RoutingGauge& );
115  };
116 
117 
118  inline bool RoutingGauge::isSymbolic () const { return _isSymbolic; }
119  inline bool RoutingGauge::isTwoMetals () const { return (getDepth() < 3); }
120  inline bool RoutingGauge::isHV () const { return not isTwoMetals() and (getLayerGauge(1)->isHorizontal()); }
121  inline bool RoutingGauge::isVH () const { return not isTwoMetals() and (getLayerGauge(1)->isVertical()); }
122  inline const Name RoutingGauge::getName () const { return _name; }
123  inline size_t RoutingGauge::getDepth () const { return _layerGauges.size(); }
124  inline Technology* RoutingGauge::getTechnology () const { return _technology; }
125  inline DbU::Unit RoutingGauge::getHorizontalPitch () const { return getHorizontalGauge()->getPitch(); }
126  inline DbU::Unit RoutingGauge::getVerticalPitch () const { return getVerticalGauge ()->getPitch(); }
127  inline unsigned int RoutingGauge::getLayerType ( size_t depth ) const { return getLayerGauge(depth)->getType(); }
128  inline unsigned int RoutingGauge::getLayerDirection ( size_t depth ) const { return getLayerGauge(depth)->getDirection(); }
129  inline DbU::Unit RoutingGauge::getLayerPitch ( size_t depth ) const { return getLayerGauge(depth)->getPitch(); }
130  inline DbU::Unit RoutingGauge::getLayerOffset ( size_t depth ) const { return getLayerGauge(depth)->getOffset(); }
131  inline DbU::Unit RoutingGauge::getLayerWireWidth ( size_t depth ) const { return getLayerGauge(depth)->getWireWidth(); }
132  inline DbU::Unit RoutingGauge::getViaWidth ( size_t depth ) const { return getLayerGauge(depth)->getViaWidth(); }
133  inline void RoutingGauge::setSymbolic ( bool state ) { _isSymbolic=state; }
134 
135 
136 // -------------------------------------------------------------------
137 // Class : "JsonRoutingGauge".
138 
139  class JsonRoutingGauge : public JsonObject {
140  public:
141  static void initialize ();
142  JsonRoutingGauge ( unsigned long flags );
143  virtual string getTypeName () const;
144  virtual JsonRoutingGauge* clone ( unsigned long flags ) const;
145  virtual void toData ( JsonStack& );
146  };
147 
148 
149 } // CRL namespace.
150 
151 INSPECTOR_P_SUPPORT(CRL::RoutingGauge);
152 
153 #endif
DbU::Unit getViaWidth() const
Definition: RoutingLayerGauge.h:182
-
DbU::Unit getPitch() const
Definition: RoutingLayerGauge.h:178
+
1 // -*- C++ -*-
2 //
3 // This file is part of the Coriolis Software.
4 // Copyright (c) UPMC 2008-2018, All Rights Reserved
5 //
6 // +-----------------------------------------------------------------+
7 // | C O R I O L I S |
8 // | Alliance / Hurricane Interface |
9 // | |
10 // | Author : Jean-Paul CHAPUT |
11 // | E-mail : Jean-Paul.Chaput@lip6.fr |
12 // | =============================================================== |
13 // | C++ Header : "./crlcore/RoutingGauge.h" |
14 // +-----------------------------------------------------------------+
15 
16 
17 #ifndef CRL_ROUTING_GAUGE_H
18 #define CRL_ROUTING_GAUGE_H
19 
20 #include <string>
21 #include <vector>
22 #include "hurricane/Name.h"
23 #include "hurricane/Slot.h"
24 
25 namespace Hurricane {
26  class Layer;
27  class Technology;
28 }
29 
30 #include "crlcore/RoutingLayerGauge.h"
31 
32 namespace CRL {
33 
34  using std::string;
35  using std::vector;
39  using Hurricane::Name;
40  using Hurricane::Record;
41  using Hurricane::Layer;
43 
44 
45 // -------------------------------------------------------------------
46 // Class : "RoutingGauge".
47 
48  class RoutingGauge {
49 
50  public:
51  // Constants.
52  static const size_t nlayerdepth;
53  // Constructors & Destructors.
54  static RoutingGauge* create ( const char* name );
55  virtual void destroy ();
56  // Predicates.
57  inline bool isSymbolic () const;
58  inline bool isTwoMetals () const;
59  inline bool isHV () const;
60  inline bool isVH () const;
61  inline bool hasPowerSupply () const;
62  bool hasLayer ( const Layer* ) const;
63  // Accessors.
64  RoutingGauge* getClone () const;
65  inline const Name getName () const;
66  inline Technology* getTechnology () const;
67  inline size_t getDepth () const;
68  inline DbU::Unit getHorizontalPitch () const;
69  inline DbU::Unit getVerticalPitch () const;
70  RoutingLayerGauge* getHorizontalGauge () const;
71  RoutingLayerGauge* getVerticalGauge () const;
72  RoutingLayerGauge* getPowerSupplyGauge () const;
73  RoutingLayerGauge* getLayerGauge ( const Layer* ) const;
74  size_t getViaDepth ( const Layer* ) const;
75  size_t getLayerDepth ( const Layer* ) const;
76  unsigned int getLayerType ( const Layer* ) const;
77  unsigned int getLayerDirection ( const Layer* ) const;
78  DbU::Unit getPitch ( const Layer* ) const;
79  DbU::Unit getOffset ( const Layer* ) const;
80  DbU::Unit getWireWidth ( const Layer* ) const;
81  DbU::Unit getPWireWidth ( const Layer* ) const;
82  DbU::Unit getViaWidth ( const Layer* ) const;
83  RoutingLayerGauge* getLayerGauge ( size_t depth ) const;
84  inline unsigned int getLayerDirection ( size_t depth ) const;
85  inline unsigned int getLayerType ( size_t depth ) const;
86  inline DbU::Unit getLayerPitch ( size_t depth ) const;
87  inline DbU::Unit getLayerOffset ( size_t depth ) const;
88  inline DbU::Unit getLayerWireWidth ( size_t depth ) const;
89  inline DbU::Unit getLayerPWireWidth ( size_t depth ) const;
90  inline DbU::Unit getViaWidth ( size_t depth ) const;
91  const Layer* getRoutingLayer ( size_t depth ) const;
92  Layer* getContactLayer ( size_t depth ) const;
93  const vector<RoutingLayerGauge*>&
94  getLayerGauges () const;
95  // Methods.
96  void addLayerGauge ( RoutingLayerGauge* layerGauge );
97  void checkConnexity () const;
98  inline void setSymbolic ( bool );
99  // Hurricane Managment.
100  void toJson ( JsonWriter* ) const;
101  virtual Record* _getRecord ( Record* record=NULL ) const;
102  virtual string _getString () const;
103  virtual string _getTypeName () const;
104 
105  protected:
106  // Internal - Attributes.
107  Name _name;
108  vector<RoutingLayerGauge*> _layerGauges;
109  vector<Layer*> _viaLayers;
110  Technology* _technology;
111  bool _isSymbolic;
112 
113  // Internal - Constructors & Destructors.
114  RoutingGauge ( const char* name );
115  RoutingGauge ( const RoutingGauge& );
116  virtual ~RoutingGauge ();
117  virtual void _preDestroy ();
118  RoutingGauge& operator= ( const RoutingGauge& );
119  };
120 
121 
122  inline bool RoutingGauge::isSymbolic () const { return _isSymbolic; }
123  inline bool RoutingGauge::isTwoMetals () const { return (getDepth() < 3); }
124  inline bool RoutingGauge::isHV () const { return not isTwoMetals() and (getLayerGauge(1)->isHorizontal()); }
125  inline bool RoutingGauge::isVH () const { return not isTwoMetals() and (getLayerGauge(1)->isVertical()); }
126  inline bool RoutingGauge::hasPowerSupply () const { return (getPowerSupplyGauge() != NULL); }
127  inline const Name RoutingGauge::getName () const { return _name; }
128  inline size_t RoutingGauge::getDepth () const { return _layerGauges.size(); }
129  inline Technology* RoutingGauge::getTechnology () const { return _technology; }
130  inline DbU::Unit RoutingGauge::getHorizontalPitch () const { return getHorizontalGauge()->getPitch(); }
131  inline DbU::Unit RoutingGauge::getVerticalPitch () const { return getVerticalGauge ()->getPitch(); }
132  inline unsigned int RoutingGauge::getLayerType ( size_t depth ) const { return getLayerGauge(depth)->getType(); }
133  inline unsigned int RoutingGauge::getLayerDirection ( size_t depth ) const { return getLayerGauge(depth)->getDirection(); }
134  inline DbU::Unit RoutingGauge::getLayerPitch ( size_t depth ) const { return getLayerGauge(depth)->getPitch(); }
135  inline DbU::Unit RoutingGauge::getLayerOffset ( size_t depth ) const { return getLayerGauge(depth)->getOffset(); }
136  inline DbU::Unit RoutingGauge::getLayerWireWidth ( size_t depth ) const { return getLayerGauge(depth)->getWireWidth(); }
137  inline DbU::Unit RoutingGauge::getLayerPWireWidth ( size_t depth ) const { return getLayerGauge(depth)->getPWireWidth(); }
138  inline DbU::Unit RoutingGauge::getViaWidth ( size_t depth ) const { return getLayerGauge(depth)->getViaWidth(); }
139  inline void RoutingGauge::setSymbolic ( bool state ) { _isSymbolic=state; }
140 
141 
142 // -------------------------------------------------------------------
143 // Class : "JsonRoutingGauge".
144 
145  class JsonRoutingGauge : public JsonObject {
146  public:
147  static void initialize ();
148  JsonRoutingGauge ( unsigned long flags );
149  virtual string getTypeName () const;
150  virtual JsonRoutingGauge* clone ( unsigned long flags ) const;
151  virtual void toData ( JsonStack& );
152  };
153 
154 
155 } // CRL namespace.
156 
157 INSPECTOR_P_SUPPORT(CRL::RoutingGauge);
158 
159 #endif
DbU::Unit getViaWidth() const
Definition: RoutingLayerGauge.h:188
+
DbU::Unit getPitch() const
Definition: RoutingLayerGauge.h:183
-
DbU::Unit getWireWidth() const
Definition: RoutingLayerGauge.h:180
+
DbU::Unit getWireWidth() const
Definition: RoutingLayerGauge.h:185
std::int64_t Unit
virtual void destroy()
Gauge for the detailed routing.
Definition: RoutingGauge.h:48
RoutingGauge * getClone() const
-
Constant::Direction getDirection() const
Definition: RoutingLayerGauge.h:173
-
Technology * getTechnology() const
Definition: RoutingGauge.h:124
+
Constant::Direction getDirection() const
Definition: RoutingLayerGauge.h:178
+
Technology * getTechnology() const
Definition: RoutingGauge.h:129
-
const Name getName() const
Definition: RoutingGauge.h:122
-
DbU::Unit getOffset() const
Definition: RoutingLayerGauge.h:177
-
size_t getDepth() const
Definition: RoutingGauge.h:123
-
Constant::LayerGaugeType getType() const
Definition: RoutingLayerGauge.h:174
+
const Name getName() const
Definition: RoutingGauge.h:127
+
DbU::Unit getOffset() const
Definition: RoutingLayerGauge.h:182
+
size_t getDepth() const
Definition: RoutingGauge.h:128
+
Constant::LayerGaugeType getType() const
Definition: RoutingLayerGauge.h:179
RoutingLayerGauge * getLayerGauge(const Layer *) const
void addLayerGauge(RoutingLayerGauge *layerGauge)
static RoutingGauge * create(const char *name)
@@ -71,7 +71,7 @@ $(function() {
void checkConnexity() const
size_t getLayerDepth(const Layer *) const
-
Gauge of a Layer for the detailed routing.
Definition: RoutingLayerGauge.h:77
+
Gauge of a Layer for the detailed routing.
Definition: RoutingLayerGauge.h:75
unsigned int getLayerDirection(const Layer *) const
The namespace of Coriolis Core.
Definition: Environment.h:24
@@ -80,7 +80,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/RoutingLayerGauge_8h_source.html b/crlcore/doc/crlcore/html/RoutingLayerGauge_8h_source.html index 1b2fbca3..74090284 100644 --- a/crlcore/doc/crlcore/html/RoutingLayerGauge_8h_source.html +++ b/crlcore/doc/crlcore/html/RoutingLayerGauge_8h_source.html @@ -44,56 +44,56 @@ $(function() {
RoutingLayerGauge.h
-
1 // -*- C++ -*-
2 //
3 // This file is part of the Coriolis Software.
4 // Copyright (c) UPMC 2008-2018, All Rights Reserved
5 //
6 // +-----------------------------------------------------------------+
7 // | C O R I O L I S |
8 // | C o r e L i b r a r y |
9 // | |
10 // | Author : Jean-Paul CHAPUT |
11 // | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
12 // | =============================================================== |
13 // | C++ Header : "./RoutingLayerGauge.h" |
14 // +-----------------------------------------------------------------+
15 
16 
17 #ifndef CRL_ROUTING_LAYER_GAUGE_H
18 #define CRL_ROUTING_LAYER_GAUGE_H
19 
20 
21 #include <map>
22 #include "hurricane/Commons.h"
23 #include "hurricane/Error.h"
24 #include "hurricane/DbU.h"
25 #include "hurricane/Collection.h"
26 #include "hurricane/Slot.h"
27 #include "crlcore/Utilities.h"
28 
29 namespace Hurricane {
30  class Layer;
31 }
32 
33 
34 namespace Constant {
35 
36  enum Direction { Horizontal = (1<<0)
37  , Vertical = (1<<1)
38  };
39 
40  enum LayerGaugeType { Default = (1<<0)
41  , PinOnly = (1<<1)
42  };
43 
44  enum Round { Superior = (1<<2)
45  , Inferior = (1<<3)
46  , Nearest = (1<<4)
47  , Exact = (1<<5)
48  };
49 
50  Direction perpandicular ( unsigned int );
51 
52 }
53 
54 
55 
56 namespace CRL {
57 
58  using std::map;
65  using Hurricane::Record;
66  using Hurricane::DbU;
67  using Hurricane::Layer;
68 
69 
70  class RoutingGauge;
71 
72 
73 // -------------------------------------------------------------------
74 // Class : "RoutingLayerGauge".
75 
76 
78 
79  public:
80  // Constructors & Destructors.
81  static RoutingLayerGauge* create ( const Layer* layer
82  , Constant::Direction direction
84  , unsigned int depth
85  , double density
86  , DbU::Unit offset
87  , DbU::Unit pitch
88  , DbU::Unit wireWidth
89  , DbU::Unit viaWidth
90  , DbU::Unit obsDw );
91  virtual void destroy ();
92  // Accessors.
93  inline bool isHorizontal () const;
94  inline bool isVertical () const;
95  inline const Layer* getLayer () const;
96  inline const Layer* getBlockageLayer () const;
97  inline unsigned int getDepth () const;
98  inline Constant::Direction getDirection () const;
99  inline Constant::LayerGaugeType getType () const;
100  inline double getDensity () const;
101  inline DbU::Unit getOffset () const;
102  inline DbU::Unit getPitch () const;
103  inline DbU::Unit getHalfPitch () const;
104  inline DbU::Unit getWireWidth () const;
105  inline DbU::Unit getHalfWireWidth () const;
106  inline DbU::Unit getViaWidth () const;
107  inline DbU::Unit getHalfViaWidth () const;
108  inline DbU::Unit getObstacleDw () const;
109  void divide ( DbU::Unit dividend, long& quotient, long& modulo ) const;
110  unsigned int getTrackNumber ( DbU::Unit start, DbU::Unit stop ) const;
111  long getTrackIndex ( DbU::Unit start, DbU::Unit stop, DbU::Unit position, unsigned mode ) const;
112  inline DbU::Unit getTrackPosition ( DbU::Unit start, DbU::Unit stop, DbU::Unit position, unsigned mode ) const;
113  DbU::Unit getTrackPosition ( DbU::Unit start, long index ) const;
114  // Hurricane Managment.
115  void toJson ( JsonWriter* ) const;
116  virtual string _getTypeName () const;
117  virtual string _getString () const;
118  virtual Record* _getRecord () const;
119 
120  protected:
121  // Internal - Attributes.
122  const Layer* _layer;
123  const Layer* _blockageLayer;
124  Constant::Direction _direction;
126  unsigned int _depth;
127  double _density;
128  DbU::Unit _offset;
129  DbU::Unit _pitch;
130  DbU::Unit _wireWidth;
131  DbU::Unit _viaWidth;
132  DbU::Unit _obstacleDw;
133 
134  // Internal - Constructors & Destructors.
135  RoutingLayerGauge ( const Layer* layer
136  , Constant::Direction direction
138  , unsigned int depth
139  , double density
140  , DbU::Unit offset
141  , DbU::Unit pitch
142  , DbU::Unit wireWidth
143  , DbU::Unit viaWidth
144  , DbU::Unit obsDw );
145  virtual ~RoutingLayerGauge ();
146  virtual void _preDestroy();
147  RoutingLayerGauge& operator= ( const RoutingLayerGauge& );
148 
149  // Friends.
150  friend class RoutingGauge;
151  };
152 
153 
154  // New Types.
155  typedef map<Layer*,RoutingLayerGauge*> RoutingLayerGaugeMap;
156 
157 
158 // -------------------------------------------------------------------
159 // Collection : "RoutingLayerGauges".
160 
164 
165 
166 // -------------------------------------------------------------------
167 // Inline Functions.
168 
169  inline bool RoutingLayerGauge::isHorizontal () const { return (_direction == Constant::Direction::Horizontal); }
170  inline bool RoutingLayerGauge::isVertical () const { return (_direction == Constant::Direction::Vertical); }
171  inline const Layer* RoutingLayerGauge::getLayer () const { return _layer; }
172  inline const Layer* RoutingLayerGauge::getBlockageLayer () const { return _blockageLayer; }
173  inline Constant::Direction RoutingLayerGauge::getDirection () const { return _direction; }
174  inline Constant::LayerGaugeType RoutingLayerGauge::getType () const { return _type; }
175  inline unsigned int RoutingLayerGauge::getDepth () const { return _depth; }
176  inline double RoutingLayerGauge::getDensity () const { return _density; }
177  inline DbU::Unit RoutingLayerGauge::getOffset () const { return _offset; }
178  inline DbU::Unit RoutingLayerGauge::getPitch () const { return _pitch; }
179  inline DbU::Unit RoutingLayerGauge::getHalfPitch () const { return _pitch>>1; }
180  inline DbU::Unit RoutingLayerGauge::getWireWidth () const { return _wireWidth; }
181  inline DbU::Unit RoutingLayerGauge::getHalfWireWidth () const { return _wireWidth>>1; }
182  inline DbU::Unit RoutingLayerGauge::getViaWidth () const { return _viaWidth; }
183  inline DbU::Unit RoutingLayerGauge::getHalfViaWidth () const { return _viaWidth>>1; }
184  inline DbU::Unit RoutingLayerGauge::getObstacleDw () const { return _obstacleDw; }
185  inline DbU::Unit RoutingLayerGauge::getTrackPosition ( DbU::Unit start, DbU::Unit stop, DbU::Unit position, unsigned mode ) const
186  { return getTrackPosition( start, getTrackIndex(start,stop,position,mode) ); }
187 
188 
189 // -------------------------------------------------------------------
190 // Class : "JsonRoutingLayerGauge".
191 
192  class JsonRoutingLayerGauge : public JsonObject {
193  public:
194  static void initialize ();
195  JsonRoutingLayerGauge ( unsigned long flags );
196  virtual string getTypeName () const;
197  virtual JsonRoutingLayerGauge* clone ( unsigned long flags ) const;
198  virtual void toData ( JsonStack& );
199  };
200 
201 
202 } // CRL namespace.
203 
204 
205 INSPECTOR_P_SUPPORT(CRL::RoutingLayerGauge);
206 
207 
208 // -------------------------------------------------------------------
209 // Inspector Support for : "const ::Constant::Direction*".
210 
211 
212 inline void from ( Constant::Direction& direction, const std::string& s )
213 {
214  if (s == "Vertical") direction = Constant::Vertical;
215  else {
216  if (s != "Horizontal")
217  std::cerr << Hurricane::Error( "::from(Direction&,string&): Unknown value \"%s\"."
218  , s.c_str() ) << std::endl;
219  direction = Constant::Horizontal;
220  }
221 }
222 
223 
224 template<>
225 inline std::string getString<const Constant::Direction*>
226  ( const Constant::Direction* direction )
227 {
228  switch ( *direction ) {
229  case Constant::Horizontal: return "Horizontal";
230  case Constant::Vertical: return "Vertical";
231  }
232  return "Unknown Constant::Direction";
233 }
234 
235 
236 template<>
237 inline std::string getString<Constant::Direction>
238  ( Constant::Direction direction )
239 {
240  switch ( direction ) {
241  case Constant::Horizontal: return "Horizontal";
242  case Constant::Vertical: return "Vertical";
243  }
244  return "Unknown Constant::Direction";
245 }
246 
247 
248 IOSTREAM_POINTER_SUPPORT(Constant::Direction);
249 
250 
251 // -------------------------------------------------------------------
252 // Inspector Support for : "const Constant::LayerGaugeType*".
253 
254 
255 inline void from ( Constant::LayerGaugeType& type, const std::string& s )
256 {
257  if (s == "PinOnly") type = Constant::PinOnly;
258  else {
259  if (s != "Default")
260  std::cerr << Hurricane::Error( "::from(LayerGaugeType&,string&): Unknown value \"%s\"."
261  , s.c_str() ) << std::endl;
262  type = Constant::Default;
263  }
264 }
265 
266 
267 template<>
268 inline std::string getString<const Constant::LayerGaugeType*>
269  ( const Constant::LayerGaugeType* layerGaugeType )
270 {
271  switch ( *layerGaugeType ) {
272  case Constant::Default: return "Default";
273  case Constant::PinOnly: return "PinOnly";
274  }
275  return "Unknown Constant::LayerGaugeType";
276 }
277 
278 
279 template<>
280 inline std::string getString<Constant::LayerGaugeType*>
281  ( Constant::LayerGaugeType* layerGaugeType )
282 { return getString<const Constant::LayerGaugeType*>(layerGaugeType); }
283 
284 
285 template<>
286 inline std::string getString<const Constant::LayerGaugeType>
287  ( const Constant::LayerGaugeType layerGaugeType )
288 {
289  switch ( layerGaugeType ) {
290  case Constant::Default: return "Default";
291  case Constant::PinOnly: return "PinOnly";
292  }
293  return "Unknown Constant::LayerGaugeType";
294 }
295 
296 
297 template<>
298 inline std::string getString<Constant::LayerGaugeType>
299  ( Constant::LayerGaugeType layerGaugeType )
300 { return getString<const Constant::LayerGaugeType>(layerGaugeType); }
301 
302 
303 IOSTREAM_POINTER_SUPPORT(Constant::LayerGaugeType);
304 
305 
306 #endif // CRL_ROUTING_LAYER_GAUGE_H
Store various constants.
Definition: RoutingLayerGauge.h:34
-
DbU::Unit getViaWidth() const
Definition: RoutingLayerGauge.h:182
+
1 // -*- C++ -*-
2 //
3 // This file is part of the Coriolis Software.
4 // Copyright (c) UPMC 2008-2018, All Rights Reserved
5 //
6 // +-----------------------------------------------------------------+
7 // | C O R I O L I S |
8 // | C o r e L i b r a r y |
9 // | |
10 // | Author : Jean-Paul CHAPUT |
11 // | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
12 // | =============================================================== |
13 // | C++ Header : "./RoutingLayerGauge.h" |
14 // +-----------------------------------------------------------------+
15 
16 
17 #pragma once
18 #include <map>
19 #include "hurricane/Commons.h"
20 #include "hurricane/Error.h"
21 #include "hurricane/DbU.h"
22 #include "hurricane/Collection.h"
23 #include "hurricane/Slot.h"
24 #include "crlcore/Utilities.h"
25 
26 namespace Hurricane {
27  class Layer;
28 }
29 
30 
31 namespace Constant {
32 
33  enum Direction { Horizontal = (1<<0)
34  , Vertical = (1<<1)
35  };
36 
37  enum LayerGaugeType { Default = (1<<0)
38  , PinOnly = (1<<1)
39  , PowerSupply = (1<<2)
40  };
41 
42  enum Round { Superior = (1<<2)
43  , Inferior = (1<<3)
44  , Nearest = (1<<4)
45  , Exact = (1<<5)
46  };
47 
48  Direction perpandicular ( unsigned int );
49 
50 }
51 
52 
53 
54 namespace CRL {
55 
56  using std::map;
63  using Hurricane::Record;
64  using Hurricane::DbU;
65  using Hurricane::Layer;
66 
67 
68  class RoutingGauge;
69 
70 
71 // -------------------------------------------------------------------
72 // Class : "RoutingLayerGauge".
73 
74 
76 
77  public:
78  // Constructors & Destructors.
79  static RoutingLayerGauge* create ( const Layer* layer
80  , Constant::Direction direction
82  , unsigned int depth
83  , double density
84  , DbU::Unit offset
85  , DbU::Unit pitch
86  , DbU::Unit wireWidth
87  , DbU::Unit pwireWidth
88  , DbU::Unit viaWidth
89  , DbU::Unit obsDw );
90  virtual void destroy ();
91  // Accessors.
92  inline bool isHorizontal () const;
93  inline bool isVertical () const;
94  inline const Layer* getLayer () const;
95  inline const Layer* getBlockageLayer () const;
96  inline unsigned int getDepth () const;
97  inline Constant::Direction getDirection () const;
98  inline Constant::LayerGaugeType getType () const;
99  inline double getDensity () const;
100  inline DbU::Unit getOffset () const;
101  inline DbU::Unit getPitch () const;
102  inline DbU::Unit getHalfPitch () const;
103  inline DbU::Unit getWireWidth () const;
104  inline DbU::Unit getPWireWidth () const;
105  inline DbU::Unit getHalfWireWidth () const;
106  inline DbU::Unit getViaWidth () const;
107  inline DbU::Unit getHalfViaWidth () const;
108  inline DbU::Unit getObstacleDw () const;
109  void divide ( DbU::Unit dividend, long& quotient, long& modulo ) const;
110  unsigned int getTrackNumber ( DbU::Unit start, DbU::Unit stop ) const;
111  long getTrackIndex ( DbU::Unit start, DbU::Unit stop, DbU::Unit position, unsigned mode ) const;
112  inline DbU::Unit getTrackPosition ( DbU::Unit start, DbU::Unit stop, DbU::Unit position, unsigned mode ) const;
113  DbU::Unit getTrackPosition ( DbU::Unit start, long index ) const;
114  inline void setPWireWidth ( DbU::Unit );
115  inline void setType ( uint32_t );
116  // Hurricane Managment.
117  void toJson ( JsonWriter* ) const;
118  virtual string _getTypeName () const;
119  virtual string _getString () const;
120  virtual Record* _getRecord () const;
121 
122  protected:
123  // Internal - Attributes.
124  const Layer* _layer;
125  const Layer* _blockageLayer;
126  Constant::Direction _direction;
128  unsigned int _depth;
129  double _density;
130  DbU::Unit _offset;
131  DbU::Unit _pitch;
132  DbU::Unit _wireWidth;
133  DbU::Unit _pwireWidth;
134  DbU::Unit _viaWidth;
135  DbU::Unit _obstacleDw;
136 
137  // Internal - Constructors & Destructors.
138  RoutingLayerGauge ( const Layer* layer
139  , Constant::Direction direction
141  , unsigned int depth
142  , double density
143  , DbU::Unit offset
144  , DbU::Unit pitch
145  , DbU::Unit wireWidth
146  , DbU::Unit pwireWidth
147  , DbU::Unit viaWidth
148  , DbU::Unit obsDw );
149  RoutingLayerGauge ( const RoutingLayerGauge& ) = delete;
150  virtual ~RoutingLayerGauge ();
151  virtual void _preDestroy();
152  RoutingLayerGauge& operator= ( const RoutingLayerGauge& ) = delete;
153 
154  // Friends.
155  friend class RoutingGauge;
156  };
157 
158 
159  // New Types.
160  typedef map<Layer*,RoutingLayerGauge*> RoutingLayerGaugeMap;
161 
162 
163 // -------------------------------------------------------------------
164 // Collection : "RoutingLayerGauges".
165 
169 
170 
171 // -------------------------------------------------------------------
172 // Inline Functions.
173 
174  inline bool RoutingLayerGauge::isHorizontal () const { return (_direction == Constant::Direction::Horizontal); }
175  inline bool RoutingLayerGauge::isVertical () const { return (_direction == Constant::Direction::Vertical); }
176  inline const Layer* RoutingLayerGauge::getLayer () const { return _layer; }
177  inline const Layer* RoutingLayerGauge::getBlockageLayer () const { return _blockageLayer; }
178  inline Constant::Direction RoutingLayerGauge::getDirection () const { return _direction; }
179  inline Constant::LayerGaugeType RoutingLayerGauge::getType () const { return _type; }
180  inline unsigned int RoutingLayerGauge::getDepth () const { return _depth; }
181  inline double RoutingLayerGauge::getDensity () const { return _density; }
182  inline DbU::Unit RoutingLayerGauge::getOffset () const { return _offset; }
183  inline DbU::Unit RoutingLayerGauge::getPitch () const { return _pitch; }
184  inline DbU::Unit RoutingLayerGauge::getHalfPitch () const { return _pitch>>1; }
185  inline DbU::Unit RoutingLayerGauge::getWireWidth () const { return _wireWidth; }
186  inline DbU::Unit RoutingLayerGauge::getPWireWidth () const { return (_pwireWidth) ? _pwireWidth : _wireWidth; }
187  inline DbU::Unit RoutingLayerGauge::getHalfWireWidth () const { return _wireWidth>>1; }
188  inline DbU::Unit RoutingLayerGauge::getViaWidth () const { return _viaWidth; }
189  inline DbU::Unit RoutingLayerGauge::getHalfViaWidth () const { return _viaWidth>>1; }
190  inline DbU::Unit RoutingLayerGauge::getObstacleDw () const { return _obstacleDw; }
191  inline DbU::Unit RoutingLayerGauge::getTrackPosition ( DbU::Unit start, DbU::Unit stop, DbU::Unit position, unsigned mode ) const
192  { return getTrackPosition( start, getTrackIndex(start,stop,position,mode) ); }
193  inline void RoutingLayerGauge::setPWireWidth ( DbU::Unit pwidth ) { _pwireWidth = pwidth; }
194  inline void RoutingLayerGauge::setType ( uint32_t type ) { _type = (Constant::LayerGaugeType)type; }
195 
196 
197 // -------------------------------------------------------------------
198 // Class : "JsonRoutingLayerGauge".
199 
200  class JsonRoutingLayerGauge : public JsonObject {
201  public:
202  static void initialize ();
203  JsonRoutingLayerGauge ( unsigned long flags );
204  virtual string getTypeName () const;
205  virtual JsonRoutingLayerGauge* clone ( unsigned long flags ) const;
206  virtual void toData ( JsonStack& );
207  };
208 
209 
210 } // CRL namespace.
211 
212 
213 INSPECTOR_P_SUPPORT(CRL::RoutingLayerGauge);
214 
215 
216 // -------------------------------------------------------------------
217 // Inspector Support for : "const ::Constant::Direction*".
218 
219 
220 inline void from ( Constant::Direction& direction, const std::string& s )
221 {
222  if (s == "Vertical") direction = Constant::Vertical;
223  else {
224  if (s != "Horizontal")
225  std::cerr << Hurricane::Error( "::from(Direction&,string&): Unknown value \"%s\"."
226  , s.c_str() ) << std::endl;
227  direction = Constant::Horizontal;
228  }
229 }
230 
231 
232 template<>
233 inline std::string getString<const Constant::Direction*>
234  ( const Constant::Direction* direction )
235 {
236  switch ( *direction ) {
237  case Constant::Horizontal: return "Horizontal";
238  case Constant::Vertical: return "Vertical";
239  }
240  return "Unknown Constant::Direction";
241 }
242 
243 
244 template<>
245 inline std::string getString<Constant::Direction>
246  ( Constant::Direction direction )
247 {
248  switch ( direction ) {
249  case Constant::Horizontal: return "Horizontal";
250  case Constant::Vertical: return "Vertical";
251  }
252  return "Unknown Constant::Direction";
253 }
254 
255 
256 IOSTREAM_POINTER_SUPPORT(Constant::Direction);
257 
258 
259 // -------------------------------------------------------------------
260 // Inspector Support for : "const Constant::LayerGaugeType*".
261 
262 
263 inline void from ( Constant::LayerGaugeType& type, const std::string& s )
264 {
265  if (s == "PinOnly") type = Constant::PinOnly;
266  else {
267  if (s != "Default")
268  std::cerr << Hurricane::Error( "::from(LayerGaugeType&,string&): Unknown value \"%s\"."
269  , s.c_str() ) << std::endl;
270  type = Constant::Default;
271  }
272 }
273 
274 
275 template<>
276 inline std::string getString<const Constant::LayerGaugeType*>
277  ( const Constant::LayerGaugeType* layerGaugeType )
278 {
279  switch ( *layerGaugeType ) {
280  case Constant::Default: return "Default";
281  case Constant::PinOnly: return "PinOnly";
282  case Constant::PowerSupply: return "PowerSupply";
283  }
284  return "Unknown Constant::LayerGaugeType";
285 }
286 
287 
288 template<>
289 inline std::string getString<Constant::LayerGaugeType*>
290  ( Constant::LayerGaugeType* layerGaugeType )
291 { return getString<const Constant::LayerGaugeType*>(layerGaugeType); }
292 
293 
294 template<>
295 inline std::string getString<const Constant::LayerGaugeType>
296  ( const Constant::LayerGaugeType layerGaugeType )
297 {
298  switch ( layerGaugeType ) {
299  case Constant::Default: return "Default";
300  case Constant::PinOnly: return "PinOnly";
301  case Constant::PowerSupply: return "PowerSupply";
302  }
303  return "Unknown Constant::LayerGaugeType";
304 }
305 
306 
307 template<>
308 inline std::string getString<Constant::LayerGaugeType>
309  ( Constant::LayerGaugeType layerGaugeType )
310 { return getString<const Constant::LayerGaugeType>(layerGaugeType); }
311 
312 
313 IOSTREAM_POINTER_SUPPORT(Constant::LayerGaugeType);
Store various constants.
Definition: RoutingLayerGauge.h:31
+
DbU::Unit getViaWidth() const
Definition: RoutingLayerGauge.h:188
virtual void destroy()
-
const Layer * getLayer() const
Definition: RoutingLayerGauge.h:171
-
Round
Definition: RoutingLayerGauge.h:44
-
DbU::Unit getPitch() const
Definition: RoutingLayerGauge.h:178
+
const Layer * getLayer() const
Definition: RoutingLayerGauge.h:176
+
Round
Definition: RoutingLayerGauge.h:42
+
DbU::Unit getPitch() const
Definition: RoutingLayerGauge.h:183
long getTrackIndex(DbU::Unit start, DbU::Unit stop, DbU::Unit position, unsigned mode) const
-
DbU::Unit getWireWidth() const
Definition: RoutingLayerGauge.h:180
+
DbU::Unit getWireWidth() const
Definition: RoutingLayerGauge.h:185
std::int64_t Unit
unsigned int getTrackNumber(DbU::Unit start, DbU::Unit stop) const
-
Direction
Definition: RoutingLayerGauge.h:36
+
Direction
Definition: RoutingLayerGauge.h:33
Gauge for the detailed routing.
Definition: RoutingGauge.h:48
-
Constant::Direction getDirection() const
Definition: RoutingLayerGauge.h:173
-
Definition: RoutingLayerGauge.h:41
-
Definition: RoutingLayerGauge.h:46
-
Definition: RoutingLayerGauge.h:40
-
static RoutingLayerGauge * create(const Layer *layer, Constant::Direction direction, Constant::LayerGaugeType type, unsigned int depth, double density, DbU::Unit offset, DbU::Unit pitch, DbU::Unit wireWidth, DbU::Unit viaWidth, DbU::Unit obsDw)
+
Constant::Direction getDirection() const
Definition: RoutingLayerGauge.h:178
+
Definition: RoutingLayerGauge.h:38
+
Definition: RoutingLayerGauge.h:44
+
Definition: RoutingLayerGauge.h:37
-
unsigned int getDepth() const
Definition: RoutingLayerGauge.h:175
+
unsigned int getDepth() const
Definition: RoutingLayerGauge.h:180
-
DbU::Unit getOffset() const
Definition: RoutingLayerGauge.h:177
-
Constant::LayerGaugeType getType() const
Definition: RoutingLayerGauge.h:174
-
const Layer * getBlockageLayer() const
Definition: RoutingLayerGauge.h:172
+
DbU::Unit getOffset() const
Definition: RoutingLayerGauge.h:182
+
Constant::LayerGaugeType getType() const
Definition: RoutingLayerGauge.h:179
+
const Layer * getBlockageLayer() const
Definition: RoutingLayerGauge.h:177
-
Definition: RoutingLayerGauge.h:45
-
LayerGaugeType
Definition: RoutingLayerGauge.h:40
+
Definition: RoutingLayerGauge.h:43
+
LayerGaugeType
Definition: RoutingLayerGauge.h:37
-
DbU::Unit getHalfViaWidth() const
Definition: RoutingLayerGauge.h:183
-
DbU::Unit getHalfWireWidth() const
Definition: RoutingLayerGauge.h:181
+
DbU::Unit getHalfViaWidth() const
Definition: RoutingLayerGauge.h:189
+
DbU::Unit getHalfWireWidth() const
Definition: RoutingLayerGauge.h:187
void divide(DbU::Unit dividend, long &quotient, long &modulo) const
-
double getDensity() const
Definition: RoutingLayerGauge.h:176
+
double getDensity() const
Definition: RoutingLayerGauge.h:181
-
DbU::Unit getHalfPitch() const
Definition: RoutingLayerGauge.h:179
-
Definition: RoutingLayerGauge.h:44
-
Definition: RoutingLayerGauge.h:37
-
Definition: RoutingLayerGauge.h:36
-
Gauge of a Layer for the detailed routing.
Definition: RoutingLayerGauge.h:77
+
static RoutingLayerGauge * create(const Layer *layer, Constant::Direction direction, Constant::LayerGaugeType type, unsigned int depth, double density, DbU::Unit offset, DbU::Unit pitch, DbU::Unit wireWidth, DbU::Unit pwireWidth, DbU::Unit viaWidth, DbU::Unit obsDw)
+
DbU::Unit getHalfPitch() const
Definition: RoutingLayerGauge.h:184
+
Definition: RoutingLayerGauge.h:42
+
Definition: RoutingLayerGauge.h:34
+
Definition: RoutingLayerGauge.h:33
+
Gauge of a Layer for the detailed routing.
Definition: RoutingLayerGauge.h:75
-
Definition: RoutingLayerGauge.h:47
+
Definition: RoutingLayerGauge.h:45
The namespace of Coriolis Core.
Definition: Environment.h:24


- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/SearchPath_8h_source.html b/crlcore/doc/crlcore/html/SearchPath_8h_source.html index c94f5eff..7b9a0dd6 100644 --- a/crlcore/doc/crlcore/html/SearchPath_8h_source.html +++ b/crlcore/doc/crlcore/html/SearchPath_8h_source.html @@ -68,7 +68,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/ToolEngine_8h_source.html b/crlcore/doc/crlcore/html/ToolEngine_8h_source.html index 68cf6236..bd85b548 100644 --- a/crlcore/doc/crlcore/html/ToolEngine_8h_source.html +++ b/crlcore/doc/crlcore/html/ToolEngine_8h_source.html @@ -58,7 +58,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/ToolEngines_8h_source.html b/crlcore/doc/crlcore/html/ToolEngines_8h_source.html index 1c3de58c..cd9e6f12 100644 --- a/crlcore/doc/crlcore/html/ToolEngines_8h_source.html +++ b/crlcore/doc/crlcore/html/ToolEngines_8h_source.html @@ -57,7 +57,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/annotated.html b/crlcore/doc/crlcore/html/annotated.html index aa0bf82f..57b7283c 100644 --- a/crlcore/doc/crlcore/html/annotated.html +++ b/crlcore/doc/crlcore/html/annotated.html @@ -64,7 +64,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1AcmSigda-members.html b/crlcore/doc/crlcore/html/classCRL_1_1AcmSigda-members.html index 0e62c366..3b4c67d6 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1AcmSigda-members.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1AcmSigda-members.html @@ -53,7 +53,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1AcmSigda.html b/crlcore/doc/crlcore/html/classCRL_1_1AcmSigda.html index d44a0e6c..dd960da1 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1AcmSigda.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1AcmSigda.html @@ -118,7 +118,7 @@ Static Public Member Functions
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1AllianceFramework-members.html b/crlcore/doc/crlcore/html/classCRL_1_1AllianceFramework-members.html index 388baa2b..1e5d18ba 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1AllianceFramework-members.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1AllianceFramework-members.html @@ -94,7 +94,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1AllianceFramework.html b/crlcore/doc/crlcore/html/classCRL_1_1AllianceFramework.html index ce11ee0c..c9ae276a 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1AllianceFramework.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1AllianceFramework.html @@ -905,7 +905,7 @@ Static Public Member Functions
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1AllianceLibrary-members.html b/crlcore/doc/crlcore/html/classCRL_1_1AllianceLibrary-members.html index f5c164a4..a3ca0df1 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1AllianceLibrary-members.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1AllianceLibrary-members.html @@ -56,7 +56,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1AllianceLibrary.html b/crlcore/doc/crlcore/html/classCRL_1_1AllianceLibrary.html index 1e7c6b95..a6797531 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1AllianceLibrary.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1AllianceLibrary.html @@ -175,7 +175,7 @@ Public Member Functions
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1Banner-members.html b/crlcore/doc/crlcore/html/classCRL_1_1Banner-members.html index 396c9221..8563afaf 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1Banner-members.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1Banner-members.html @@ -67,7 +67,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1Banner.html b/crlcore/doc/crlcore/html/classCRL_1_1Banner.html index c4ea84c1..54dd11e1 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1Banner.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1Banner.html @@ -495,7 +495,7 @@ Public Member Functions
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1Catalog-members.html b/crlcore/doc/crlcore/html/classCRL_1_1Catalog-members.html index 004154c5..79939076 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1Catalog-members.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1Catalog-members.html @@ -60,7 +60,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1Catalog.html b/crlcore/doc/crlcore/html/classCRL_1_1Catalog.html index 37b7fbee..c45156ca 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1Catalog.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1Catalog.html @@ -292,7 +292,7 @@ Public Member Functions
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1CatalogExtension-members.html b/crlcore/doc/crlcore/html/classCRL_1_1CatalogExtension-members.html index ea59206f..49dfdf2b 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1CatalogExtension-members.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1CatalogExtension-members.html @@ -69,7 +69,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1CatalogExtension.html b/crlcore/doc/crlcore/html/classCRL_1_1CatalogExtension.html index 6c0bb979..49c779d5 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1CatalogExtension.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1CatalogExtension.html @@ -691,7 +691,7 @@ Static Public Member Functions
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1Catalog_1_1State-members.html b/crlcore/doc/crlcore/html/classCRL_1_1Catalog_1_1State-members.html index e129d8aa..99ca3f8b 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1Catalog_1_1State-members.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1Catalog_1_1State-members.html @@ -83,7 +83,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1Catalog_1_1State.html b/crlcore/doc/crlcore/html/classCRL_1_1Catalog_1_1State.html index 05af363e..76562332 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1Catalog_1_1State.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1Catalog_1_1State.html @@ -781,7 +781,7 @@ Public Member Functions
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1Environment-members.html b/crlcore/doc/crlcore/html/classCRL_1_1Environment-members.html index c414b319..347edc59 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1Environment-members.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1Environment-members.html @@ -96,7 +96,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1Environment.html b/crlcore/doc/crlcore/html/classCRL_1_1Environment.html index 1657da55..26692d4c 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1Environment.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1Environment.html @@ -1136,7 +1136,7 @@ Public Member Functions
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1GraphicTool-members.html b/crlcore/doc/crlcore/html/classCRL_1_1GraphicTool-members.html index 0ba3caf0..4212b7da 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1GraphicTool-members.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1GraphicTool-members.html @@ -54,7 +54,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1GraphicTool.html b/crlcore/doc/crlcore/html/classCRL_1_1GraphicTool.html index 82a58bbd..252c68d5 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1GraphicTool.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1GraphicTool.html @@ -127,7 +127,7 @@ Public Member Functions
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1RoutingGauge-members.html b/crlcore/doc/crlcore/html/classCRL_1_1RoutingGauge-members.html index b9759fe8..50a8dd7c 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1RoutingGauge-members.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1RoutingGauge-members.html @@ -68,7 +68,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1RoutingGauge.html b/crlcore/doc/crlcore/html/classCRL_1_1RoutingGauge.html index 789e7f94..58c0a040 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1RoutingGauge.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1RoutingGauge.html @@ -451,7 +451,7 @@ Static Public Member Functions
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1RoutingLayerGauge-members.html b/crlcore/doc/crlcore/html/classCRL_1_1RoutingLayerGauge-members.html index 667c77b0..ae6b4d7f 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1RoutingLayerGauge-members.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1RoutingLayerGauge-members.html @@ -47,7 +47,7 @@ $(function() {

This is the complete list of members for CRL::RoutingLayerGauge, including all inherited members.

- + @@ -70,7 +70,7 @@ $(function() {
create(const Layer *layer, Constant::Direction direction, Constant::LayerGaugeType type, unsigned int depth, double density, DbU::Unit offset, DbU::Unit pitch, DbU::Unit wireWidth, DbU::Unit viaWidth, DbU::Unit obsDw)CRL::RoutingLayerGaugestatic
create(const Layer *layer, Constant::Direction direction, Constant::LayerGaugeType type, unsigned int depth, double density, DbU::Unit offset, DbU::Unit pitch, DbU::Unit wireWidth, DbU::Unit pwireWidth, DbU::Unit viaWidth, DbU::Unit obsDw)CRL::RoutingLayerGaugestatic
destroy()CRL::RoutingLayerGaugevirtual
divide(DbU::Unit dividend, long &quotient, long &modulo) constCRL::RoutingLayerGauge
getBlockageLayer() constCRL::RoutingLayerGaugeinline
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1RoutingLayerGauge.html b/crlcore/doc/crlcore/html/classCRL_1_1RoutingLayerGauge.html index 15a4e48f..a9a55e12 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1RoutingLayerGauge.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1RoutingLayerGauge.html @@ -91,14 +91,14 @@ Public Member Functions - - + +

Static Public Member Functions

static RoutingLayerGaugecreate (const Layer *layer, Constant::Direction direction, Constant::LayerGaugeType type, unsigned int depth, double density, DbU::Unit offset, DbU::Unit pitch, DbU::Unit wireWidth, DbU::Unit viaWidth, DbU::Unit obsDw)
 
static RoutingLayerGaugecreate (const Layer *layer, Constant::Direction direction, Constant::LayerGaugeType type, unsigned int depth, double density, DbU::Unit offset, DbU::Unit pitch, DbU::Unit wireWidth, DbU::Unit pwireWidth, DbU::Unit viaWidth, DbU::Unit obsDw)
 

Detailed Description

Gauge of a Layer for the detailed routing.

Member Function Documentation

- -

◆ create()

+ +

◆ create()

@@ -154,6 +154,12 @@ Static Public Member Functions DbU::Unit  wireWidth, + + + + DbU::Unit  + pwireWidth, + @@ -682,7 +688,7 @@ Static Public Member Functions
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1SearchPath-members.html b/crlcore/doc/crlcore/html/classCRL_1_1SearchPath-members.html index 1dbac10e..635d36f3 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1SearchPath-members.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1SearchPath-members.html @@ -64,7 +64,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1SearchPath.html b/crlcore/doc/crlcore/html/classCRL_1_1SearchPath.html index 81f0ca82..78c614bb 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1SearchPath.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1SearchPath.html @@ -452,7 +452,7 @@ Static Public Member Functions
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1SearchPath_1_1Element-members.html b/crlcore/doc/crlcore/html/classCRL_1_1SearchPath_1_1Element-members.html index fdc3b248..3993c61e 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1SearchPath_1_1Element-members.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1SearchPath_1_1Element-members.html @@ -56,7 +56,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1SearchPath_1_1Element.html b/crlcore/doc/crlcore/html/classCRL_1_1SearchPath_1_1Element.html index e2ef89ac..f5d699bf 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1SearchPath_1_1Element.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1SearchPath_1_1Element.html @@ -190,7 +190,7 @@ Public Member Functions
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1ToolEngine-members.html b/crlcore/doc/crlcore/html/classCRL_1_1ToolEngine-members.html index f35bca54..1c71affe 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1ToolEngine-members.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1ToolEngine-members.html @@ -64,7 +64,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classCRL_1_1ToolEngine.html b/crlcore/doc/crlcore/html/classCRL_1_1ToolEngine.html index 9efa7e69..bd9bb651 100644 --- a/crlcore/doc/crlcore/html/classCRL_1_1ToolEngine.html +++ b/crlcore/doc/crlcore/html/classCRL_1_1ToolEngine.html @@ -198,7 +198,7 @@ Static Public Member Functions
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/classes.html b/crlcore/doc/crlcore/html/classes.html index e850bc29..f89e68c0 100644 --- a/crlcore/doc/crlcore/html/classes.html +++ b/crlcore/doc/crlcore/html/classes.html @@ -73,7 +73,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/crlcore.tag b/crlcore/doc/crlcore/html/crlcore.tag index 7bfee306..f582984f 100644 --- a/crlcore/doc/crlcore/html/crlcore.tag +++ b/crlcore/doc/crlcore/html/crlcore.tag @@ -1218,8 +1218,8 @@ static RoutingLayerGauge * create classCRL_1_1RoutingLayerGauge.html - afe17db013bf6a933c2af4e847bfd7918 - (const Layer *layer, Constant::Direction direction, Constant::LayerGaugeType type, unsigned int depth, double density, DbU::Unit offset, DbU::Unit pitch, DbU::Unit wireWidth, DbU::Unit viaWidth, DbU::Unit obsDw) + afb41e7be2a6d258a691aacbe7a78154f + (const Layer *layer, Constant::Direction direction, Constant::LayerGaugeType type, unsigned int depth, double density, DbU::Unit offset, DbU::Unit pitch, DbU::Unit wireWidth, DbU::Unit pwireWidth, DbU::Unit viaWidth, DbU::Unit obsDw) diff --git a/crlcore/doc/crlcore/html/dir_1d3beb215ce2defdb52d6dee9d41bc7a.html b/crlcore/doc/crlcore/html/dir_1d3beb215ce2defdb52d6dee9d41bc7a.html index 26f3e6b1..7d5b6eba 100644 --- a/crlcore/doc/crlcore/html/dir_1d3beb215ce2defdb52d6dee9d41bc7a.html +++ b/crlcore/doc/crlcore/html/dir_1d3beb215ce2defdb52d6dee9d41bc7a.html @@ -53,7 +53,7 @@ Directories
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/crlcore/doc/crlcore/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html index fd176d64..4d2dbfb3 100644 --- a/crlcore/doc/crlcore/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ b/crlcore/doc/crlcore/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -49,7 +49,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/dir_d23e13494685c82fafa9ef5abb5746af.html b/crlcore/doc/crlcore/html/dir_d23e13494685c82fafa9ef5abb5746af.html index 851c484a..7ce94844 100644 --- a/crlcore/doc/crlcore/html/dir_d23e13494685c82fafa9ef5abb5746af.html +++ b/crlcore/doc/crlcore/html/dir_d23e13494685c82fafa9ef5abb5746af.html @@ -49,7 +49,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/files.html b/crlcore/doc/crlcore/html/files.html index a2e42eb1..a3896dc8 100644 --- a/crlcore/doc/crlcore/html/files.html +++ b/crlcore/doc/crlcore/html/files.html @@ -61,7 +61,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/functions.html b/crlcore/doc/crlcore/html/functions.html index c18d113c..cfe71a93 100644 --- a/crlcore/doc/crlcore/html/functions.html +++ b/crlcore/doc/crlcore/html/functions.html @@ -72,7 +72,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/functions_0x7e.html b/crlcore/doc/crlcore/html/functions_0x7e.html index f078a7cc..07cdfc66 100644 --- a/crlcore/doc/crlcore/html/functions_0x7e.html +++ b/crlcore/doc/crlcore/html/functions_0x7e.html @@ -54,7 +54,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/functions_b.html b/crlcore/doc/crlcore/html/functions_b.html index 2388de51..f29e2a5a 100644 --- a/crlcore/doc/crlcore/html/functions_b.html +++ b/crlcore/doc/crlcore/html/functions_b.html @@ -48,7 +48,7 @@ $(function() {
- +
Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
diff --git a/crlcore/doc/crlcore/html/functions_c.html b/crlcore/doc/crlcore/html/functions_c.html index 34168bae..331bfcbc 100644 --- a/crlcore/doc/crlcore/html/functions_c.html +++ b/crlcore/doc/crlcore/html/functions_c.html @@ -51,7 +51,7 @@ $(function() {
  • create() : CRL::AllianceFramework , CRL::RoutingGauge -, CRL::RoutingLayerGauge +, CRL::RoutingLayerGauge
  • createCell() : CRL::AllianceFramework @@ -68,7 +68,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/functions_d.html b/crlcore/doc/crlcore/html/functions_d.html index fa6bc00b..f47a61d4 100644 --- a/crlcore/doc/crlcore/html/functions_d.html +++ b/crlcore/doc/crlcore/html/functions_d.html @@ -61,7 +61,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/functions_e.html b/crlcore/doc/crlcore/html/functions_e.html index 7dd3d5f1..28d9af34 100644 --- a/crlcore/doc/crlcore/html/functions_e.html +++ b/crlcore/doc/crlcore/html/functions_e.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/functions_enum.html b/crlcore/doc/crlcore/html/functions_enum.html index ce396a57..613d7a6e 100644 --- a/crlcore/doc/crlcore/html/functions_enum.html +++ b/crlcore/doc/crlcore/html/functions_enum.html @@ -55,7 +55,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/functions_eval.html b/crlcore/doc/crlcore/html/functions_eval.html index c30c6a70..5bf738d6 100644 --- a/crlcore/doc/crlcore/html/functions_eval.html +++ b/crlcore/doc/crlcore/html/functions_eval.html @@ -88,7 +88,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/functions_f.html b/crlcore/doc/crlcore/html/functions_f.html index 5e992c02..126ee156 100644 --- a/crlcore/doc/crlcore/html/functions_f.html +++ b/crlcore/doc/crlcore/html/functions_f.html @@ -51,7 +51,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/functions_func.html b/crlcore/doc/crlcore/html/functions_func.html index cf5b7e95..2f2d2491 100644 --- a/crlcore/doc/crlcore/html/functions_func.html +++ b/crlcore/doc/crlcore/html/functions_func.html @@ -83,7 +83,7 @@ $(function() {
  • create() : CRL::AllianceFramework , CRL::RoutingGauge -, CRL::RoutingLayerGauge +, CRL::RoutingLayerGauge
  • createCell() : CRL::AllianceFramework @@ -579,7 +579,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/functions_g.html b/crlcore/doc/crlcore/html/functions_g.html index 639afa9d..76390704 100644 --- a/crlcore/doc/crlcore/html/functions_g.html +++ b/crlcore/doc/crlcore/html/functions_g.html @@ -258,7 +258,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/functions_h.html b/crlcore/doc/crlcore/html/functions_h.html index f632b3bc..5adccd24 100644 --- a/crlcore/doc/crlcore/html/functions_h.html +++ b/crlcore/doc/crlcore/html/functions_h.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/functions_i.html b/crlcore/doc/crlcore/html/functions_i.html index 28174fae..3a3a8662 100644 --- a/crlcore/doc/crlcore/html/functions_i.html +++ b/crlcore/doc/crlcore/html/functions_i.html @@ -96,7 +96,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/functions_l.html b/crlcore/doc/crlcore/html/functions_l.html index 5741e136..09e8b27a 100644 --- a/crlcore/doc/crlcore/html/functions_l.html +++ b/crlcore/doc/crlcore/html/functions_l.html @@ -63,7 +63,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/functions_m.html b/crlcore/doc/crlcore/html/functions_m.html index 50bb02e3..45efb2d8 100644 --- a/crlcore/doc/crlcore/html/functions_m.html +++ b/crlcore/doc/crlcore/html/functions_m.html @@ -51,7 +51,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/functions_o.html b/crlcore/doc/crlcore/html/functions_o.html index 23252088..f38ee2fd 100644 --- a/crlcore/doc/crlcore/html/functions_o.html +++ b/crlcore/doc/crlcore/html/functions_o.html @@ -48,7 +48,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/functions_p.html b/crlcore/doc/crlcore/html/functions_p.html index 6dd016c2..bb6bf25a 100644 --- a/crlcore/doc/crlcore/html/functions_p.html +++ b/crlcore/doc/crlcore/html/functions_p.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/functions_r.html b/crlcore/doc/crlcore/html/functions_r.html index 2955e40e..41e0dfe1 100644 --- a/crlcore/doc/crlcore/html/functions_r.html +++ b/crlcore/doc/crlcore/html/functions_r.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/functions_s.html b/crlcore/doc/crlcore/html/functions_s.html index 23beeda3..217219ef 100644 --- a/crlcore/doc/crlcore/html/functions_s.html +++ b/crlcore/doc/crlcore/html/functions_s.html @@ -150,7 +150,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/functions_v.html b/crlcore/doc/crlcore/html/functions_v.html index a24a2c94..86484be0 100644 --- a/crlcore/doc/crlcore/html/functions_v.html +++ b/crlcore/doc/crlcore/html/functions_v.html @@ -51,7 +51,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/hierarchy.html b/crlcore/doc/crlcore/html/hierarchy.html index 6023b2f3..dd75c156 100644 --- a/crlcore/doc/crlcore/html/hierarchy.html +++ b/crlcore/doc/crlcore/html/hierarchy.html @@ -64,7 +64,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/index.html b/crlcore/doc/crlcore/html/index.html index 3ac8813c..736b5e52 100644 --- a/crlcore/doc/crlcore/html/index.html +++ b/crlcore/doc/crlcore/html/index.html @@ -45,7 +45,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/namespaceCRL.html b/crlcore/doc/crlcore/html/namespaceCRL.html index e4c02ec2..bcfd0ff6 100644 --- a/crlcore/doc/crlcore/html/namespaceCRL.html +++ b/crlcore/doc/crlcore/html/namespaceCRL.html @@ -149,7 +149,7 @@ Typedefs
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/namespaceConstant.html b/crlcore/doc/crlcore/html/namespaceConstant.html index 775fe923..17b32515 100644 --- a/crlcore/doc/crlcore/html/namespaceConstant.html +++ b/crlcore/doc/crlcore/html/namespaceConstant.html @@ -149,7 +149,7 @@ Enumerations
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/namespacemembers.html b/crlcore/doc/crlcore/html/namespacemembers.html index f6ed6928..dff1eebf 100644 --- a/crlcore/doc/crlcore/html/namespacemembers.html +++ b/crlcore/doc/crlcore/html/namespacemembers.html @@ -85,7 +85,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/namespacemembers_enum.html b/crlcore/doc/crlcore/html/namespacemembers_enum.html index f8d10431..28f83268 100644 --- a/crlcore/doc/crlcore/html/namespacemembers_enum.html +++ b/crlcore/doc/crlcore/html/namespacemembers_enum.html @@ -52,7 +52,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/namespacemembers_eval.html b/crlcore/doc/crlcore/html/namespacemembers_eval.html index fd43598c..83b57559 100644 --- a/crlcore/doc/crlcore/html/namespacemembers_eval.html +++ b/crlcore/doc/crlcore/html/namespacemembers_eval.html @@ -67,7 +67,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/namespacemembers_type.html b/crlcore/doc/crlcore/html/namespacemembers_type.html index 96d35000..d7f0a280 100644 --- a/crlcore/doc/crlcore/html/namespacemembers_type.html +++ b/crlcore/doc/crlcore/html/namespacemembers_type.html @@ -52,7 +52,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/html/namespaces.html b/crlcore/doc/crlcore/html/namespaces.html index eb5af43b..152fdb8b 100644 --- a/crlcore/doc/crlcore/html/namespaces.html +++ b/crlcore/doc/crlcore/html/namespaces.html @@ -51,7 +51,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/crlcore/doc/crlcore/latex/classCRL_1_1RoutingLayerGauge.tex b/crlcore/doc/crlcore/latex/classCRL_1_1RoutingLayerGauge.tex index 4e53d24f..fc3406f6 100644 --- a/crlcore/doc/crlcore/latex/classCRL_1_1RoutingLayerGauge.tex +++ b/crlcore/doc/crlcore/latex/classCRL_1_1RoutingLayerGauge.tex @@ -45,7 +45,7 @@ long \mbox{\hyperlink{classCRL_1_1RoutingLayerGauge_ad61cdf130c8b739bb44a01cfd59 \subsection*{Static Public Member Functions} \begin{DoxyCompactItemize} \item -static \mbox{\hyperlink{classCRL_1_1RoutingLayerGauge}{Routing\+Layer\+Gauge}} $\ast$ \mbox{\hyperlink{classCRL_1_1RoutingLayerGauge_afe17db013bf6a933c2af4e847bfd7918}{create}} (const \textbf{ Layer} $\ast$layer, \mbox{\hyperlink{namespaceConstant_ac081a99f2b64361919ed5d9f37c0f9af}{Constant\+::\+Direction}} direction, \mbox{\hyperlink{namespaceConstant_ab2e46a17cc373a268c5c24fa0e2067e5}{Constant\+::\+Layer\+Gauge\+Type}} type, unsigned int depth, double density, \textbf{ Db\+U\+::\+Unit} offset, \textbf{ Db\+U\+::\+Unit} pitch, \textbf{ Db\+U\+::\+Unit} wire\+Width, \textbf{ Db\+U\+::\+Unit} via\+Width, \textbf{ Db\+U\+::\+Unit} obs\+Dw) +static \mbox{\hyperlink{classCRL_1_1RoutingLayerGauge}{Routing\+Layer\+Gauge}} $\ast$ \mbox{\hyperlink{classCRL_1_1RoutingLayerGauge_afb41e7be2a6d258a691aacbe7a78154f}{create}} (const \textbf{ Layer} $\ast$layer, \mbox{\hyperlink{namespaceConstant_ac081a99f2b64361919ed5d9f37c0f9af}{Constant\+::\+Direction}} direction, \mbox{\hyperlink{namespaceConstant_ab2e46a17cc373a268c5c24fa0e2067e5}{Constant\+::\+Layer\+Gauge\+Type}} type, unsigned int depth, double density, \textbf{ Db\+U\+::\+Unit} offset, \textbf{ Db\+U\+::\+Unit} pitch, \textbf{ Db\+U\+::\+Unit} wire\+Width, \textbf{ Db\+U\+::\+Unit} pwire\+Width, \textbf{ Db\+U\+::\+Unit} via\+Width, \textbf{ Db\+U\+::\+Unit} obs\+Dw) \end{DoxyCompactItemize} @@ -53,11 +53,11 @@ static \mbox{\hyperlink{classCRL_1_1RoutingLayerGauge}{Routing\+Layer\+Gauge}} $ Gauge of a Layer for the detailed routing. \subsection{Member Function Documentation} -\mbox{\Hypertarget{classCRL_1_1RoutingLayerGauge_afe17db013bf6a933c2af4e847bfd7918}\label{classCRL_1_1RoutingLayerGauge_afe17db013bf6a933c2af4e847bfd7918}} +\mbox{\Hypertarget{classCRL_1_1RoutingLayerGauge_afb41e7be2a6d258a691aacbe7a78154f}\label{classCRL_1_1RoutingLayerGauge_afb41e7be2a6d258a691aacbe7a78154f}} \index{C\+R\+L\+::\+Routing\+Layer\+Gauge@{C\+R\+L\+::\+Routing\+Layer\+Gauge}!create@{create}} \index{create@{create}!C\+R\+L\+::\+Routing\+Layer\+Gauge@{C\+R\+L\+::\+Routing\+Layer\+Gauge}} \subsubsection{\texorpdfstring{create()}{create()}} -{\footnotesize\ttfamily \mbox{\hyperlink{classCRL_1_1RoutingLayerGauge}{Routing\+Layer\+Gauge}} $\ast$ C\+R\+L\+::\+Routing\+Layer\+Gauge\+::create (\begin{DoxyParamCaption}\item[{const \textbf{ Layer} $\ast$}]{layer, }\item[{\mbox{\hyperlink{namespaceConstant_ac081a99f2b64361919ed5d9f37c0f9af}{Constant\+::\+Direction}}}]{direction, }\item[{\mbox{\hyperlink{namespaceConstant_ab2e46a17cc373a268c5c24fa0e2067e5}{Constant\+::\+Layer\+Gauge\+Type}}}]{type, }\item[{unsigned int}]{depth, }\item[{double}]{density, }\item[{\textbf{ Db\+U\+::\+Unit}}]{offset, }\item[{\textbf{ Db\+U\+::\+Unit}}]{pitch, }\item[{\textbf{ Db\+U\+::\+Unit}}]{wire\+Width, }\item[{\textbf{ Db\+U\+::\+Unit}}]{via\+Width, }\item[{\textbf{ Db\+U\+::\+Unit}}]{obs\+Dw }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}} +{\footnotesize\ttfamily \mbox{\hyperlink{classCRL_1_1RoutingLayerGauge}{Routing\+Layer\+Gauge}} $\ast$ C\+R\+L\+::\+Routing\+Layer\+Gauge\+::create (\begin{DoxyParamCaption}\item[{const \textbf{ Layer} $\ast$}]{layer, }\item[{\mbox{\hyperlink{namespaceConstant_ac081a99f2b64361919ed5d9f37c0f9af}{Constant\+::\+Direction}}}]{direction, }\item[{\mbox{\hyperlink{namespaceConstant_ab2e46a17cc373a268c5c24fa0e2067e5}{Constant\+::\+Layer\+Gauge\+Type}}}]{type, }\item[{unsigned int}]{depth, }\item[{double}]{density, }\item[{\textbf{ Db\+U\+::\+Unit}}]{offset, }\item[{\textbf{ Db\+U\+::\+Unit}}]{pitch, }\item[{\textbf{ Db\+U\+::\+Unit}}]{wire\+Width, }\item[{\textbf{ Db\+U\+::\+Unit}}]{pwire\+Width, }\item[{\textbf{ Db\+U\+::\+Unit}}]{via\+Width, }\item[{\textbf{ Db\+U\+::\+Unit}}]{obs\+Dw }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}} \begin{DoxyParams}{Parameters} diff --git a/crlcore/doc/crlcore/latex/refman.tex b/crlcore/doc/crlcore/latex/refman.tex index ba6eccc9..393116cc 100644 --- a/crlcore/doc/crlcore/latex/refman.tex +++ b/crlcore/doc/crlcore/latex/refman.tex @@ -34,7 +34,7 @@ \vspace*{1cm} {\large Generated by Doxygen 1.8.14}\\ \vspace*{0.5cm} - {\small Thu Nov 12 2020 13:59:16}\\ + {\small Fri Oct 1 2021 19:23:11}\\ \end{center} \end{titlepage} diff --git a/crlcore/etc/common/__init__.py b/crlcore/etc/common/__init__.py index 354e2683..dd85582b 100644 --- a/crlcore/etc/common/__init__.py +++ b/crlcore/etc/common/__init__.py @@ -54,6 +54,6 @@ def loadGdsLayers ( gdsLayersTable ): basicLayer.setGds2Layer ( gdsiiLayer ) basicLayer.setGds2Datatype( gdsiiDatatype ) - except Exception, e: + except Exception as e: helpers.io.catch( e ) return diff --git a/crlcore/etc/common/colors.py b/crlcore/etc/common/colors.py index 0f82815c..bb924420 100644 --- a/crlcore/etc/common/colors.py +++ b/crlcore/etc/common/colors.py @@ -54,7 +54,7 @@ def toRGB ( color ): , str(options[attribute])] ) # Try a predefined color lookup. - if stdColors.has_key(color): return stdColors[color] + if color in stdColors: return stdColors[color] # Try a RGB hexa: #RRGGBB. if color[0] == '#': diff --git a/crlcore/etc/common/devices.py b/crlcore/etc/common/devices.py index c185a015..990554ed 100644 --- a/crlcore/etc/common/devices.py +++ b/crlcore/etc/common/devices.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -26,23 +26,21 @@ def addDevice ( **kw ): global tech try: - if kw.has_key('name'): - devDesc = tech.addDeviceDescriptor( kw['name'] ) - - if kw.has_key('spice'): - devDesc.setSpiceFilePath( kw['spice'] ) - - if kw.has_key('connectors'): - for connector in kw['connectors']: - devDesc.addConnector( connector ) - else: - print WarningMessage( 'common.addDevice(): Missing connectors on device "%s".' % kw['name' ]) - - if kw.has_key('layouts'): - for layout in kw['layouts']: - devDesc.addLayout( layout[0], layout[1] ) - else: - print WarningMessage( 'common.addDevice(): Missing layouts on device "%s".' % kw['name' ]) - except Exception, e: - helpers.io.catch( e ) + if 'name' in kw: + devDesc = tech.addDeviceDescriptor( kw['name'] ) + if 'spice' in kw: devDesc.setSpiceFilePath( kw['spice'] ) + if 'connectors' in kw: + for connector in kw['connectors']: + devDesc.addConnector( connector ) + else: + print( WarningMessage( 'common.addDevice(): Missing connectors on device "{}".' \ + .format(kw['name']))) + if 'layouts' in kw: + for layout in kw['layouts']: + devDesc.addLayout( layout[0], layout[1] ) + else: + print( WarningMessage( 'common.addDevice(): Missing layouts on device "{}".' \ + .format( kw['name'] ))) + except Exception as e: + helpers.io.catch( e ) return diff --git a/crlcore/etc/common/display.conf b/crlcore/etc/common/display.conf index d0832f59..13946b11 100644 --- a/crlcore/etc/common/display.conf +++ b/crlcore/etc/common/display.conf @@ -96,7 +96,7 @@ stylesTable = \ , (Drawing, 'gmetalh' , { 'color':'128,255,200', 'pattern':'light_antihash0.8', 'border':1 }) , (Drawing, 'gmetalv' , { 'color':'200,200,255', 'pattern':'light_antihash1.8', 'border':1 }) , (Drawing, 'gcut' , { 'color':'255,255,190', 'border':1 }) - , (Drawing, 'Anabatic::Edge' , { 'color':'255,255,190', 'pattern':'0000000000000000', 'threshold':0.02*scale, 'border':4 }) + , (Drawing, 'Anabatic::Edge' , { 'color':'255,255,190', 'pattern':'0000000000000000', 'threshold':2.00*scale, 'border':4 }) , (Drawing, 'Anabatic::GCell', { 'color':'255,0,0' , 'pattern':'0000000000000000', 'threshold':0.02*scale, 'border':4 }) ) diff --git a/crlcore/etc/common/kite.py b/crlcore/etc/common/kite.py index c330b09a..bd9af3bd 100644 --- a/crlcore/etc/common/kite.py +++ b/crlcore/etc/common/kite.py @@ -31,10 +31,10 @@ layout.addTitle ( 'Kite', 'Kite - Detailed Router' ) layout.addParameter( 'Kite', 'kite.hTracksReservedLocal', 'Vert. Locally Reserved Tracks', 0 ) layout.addParameter( 'Kite', 'kite.vTracksReservedLocal', 'Hor. Locally Reserved Tracks' , 0 ) layout.addParameter( 'Kite', 'kite.eventsLimit' , 'Events Limit' , 0 ) -layout.addParameter( 'Kite', 'kite.ripupCost' , 'Ripup Cost' , 1, 1, Cfg.ParameterWidgetFlags.UseSpinBox ) +layout.addParameter( 'Kite', 'kite.ripupCost' , 'Ripup Cost' , 1, 1, Cfg.Parameter.Flags.UseSpinBox ) layout.addSection ( 'Kite', 'Ripup Limits', 1 ) -layout.addParameter( 'Kite', 'kite.strapRipupLimit' , 'Straps' , 1, 1, Cfg.ParameterWidgetFlags.UseSpinBox ) -layout.addParameter( 'Kite', 'kite.localRipupLimit' , 'Locals' , 1, 1, Cfg.ParameterWidgetFlags.UseSpinBox ) -layout.addParameter( 'Kite', 'kite.globalRipupLimit' , 'Globals' , 1, 1, Cfg.ParameterWidgetFlags.UseSpinBox ) -layout.addParameter( 'Kite', 'kite.longGlobalRipupLimit', 'Long Globals', 1, 1, Cfg.ParameterWidgetFlags.UseSpinBox ) +layout.addParameter( 'Kite', 'kite.strapRipupLimit' , 'Straps' , 1, 1, Cfg.Parameter.Flags.UseSpinBox ) +layout.addParameter( 'Kite', 'kite.localRipupLimit' , 'Locals' , 1, 1, Cfg.Parameter.Flags.UseSpinBox ) +layout.addParameter( 'Kite', 'kite.globalRipupLimit' , 'Globals' , 1, 1, Cfg.Parameter.Flags.UseSpinBox ) +layout.addParameter( 'Kite', 'kite.longGlobalRipupLimit', 'Long Globals', 1, 1, Cfg.Parameter.Flags.UseSpinBox ) layout.addRule ( 'Kite' ) diff --git a/crlcore/etc/common/misc.py b/crlcore/etc/common/misc.py index 5956c137..df9cbcf6 100644 --- a/crlcore/etc/common/misc.py +++ b/crlcore/etc/common/misc.py @@ -1,13 +1,13 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | # | Alliance / Hurricane Interface | # | | # | Author : Jean-Paul CHAPUT | -# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +# | E-mail : Jean-Paul.Chaput@lip6.fr | # | =============================================================== | # | Python : "./etc/common/misc.py" | # +-----------------------------------------------------------------+ @@ -32,7 +32,7 @@ param.setInt( 0 ) param.setMin( 0 ) Cfg.getParamInt( 'viewer.minimumSize' ).setInt( 500 ) -Cfg.getParamInt( 'viewer.pixelThreshold').setInt( 20 ) +Cfg.getParamInt( 'viewer.pixelThreshold').setInt( 5 ) param = Cfg.getParamInt( 'viewer.printer.DPI' ) param.setInt( 150 ) diff --git a/crlcore/etc/common/patterns.py b/crlcore/etc/common/patterns.py index a9f01cc9..64710130 100644 --- a/crlcore/etc/common/patterns.py +++ b/crlcore/etc/common/patterns.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) Sorbonne Universit 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -16,6 +16,7 @@ import sys import math import helpers +from helpers import irange from helpers.io import ErrorMessage from helpers.io import WarningMessage @@ -67,10 +68,9 @@ class Pattern ( object ): byte = byte << 1 if line[i] != ' ': byte += 1 hexasLSB += [ hex(byte)[2:] ] - # Convert in MSB mode. Invert the bytes by pairs. self._hexa = '' - for i in range(len(hexasLSB)/2): + for i in irange(len(hexasLSB)/2): self._hexa += hexasLSB[i*2+1] + hexasLSB[i*2] return self._hexa @@ -79,7 +79,7 @@ class Pattern ( object ): side = math.sqrt(4*len(self._hexa)) if pow(side,2) != 4*len(self._hexa): - print '[ERROR] The pattern is not square (%d self._bits).' % (4*len(self._hexa)) + print( '[ERROR] The pattern is not square ({} self._bits).'.format(4*len(self._hexa))) return None side /= 4 @@ -154,17 +154,17 @@ def add ( **keywords ): global LUT try: - if not keywords.has_key('name'): + if not 'name' in keywords: raise ErrorMessage(1,['patterns.add(): Malformed pattern, missing "name" argument.', str(keywords) ]) - if keywords.has_key('bits') and keywords.has_key('hexa'): + if ('bits' in keywords) and ('hexa' in keywords): w = WarningMessage( 'patterns.add(): Pattern "%s" has both bits & hexa, ignoring hexa.' % keywords['name'] ) - print w + print( w ) del keywords['hexa'] LUT[ keywords['name'] ] = Pattern( **keywords ) - except Exception, e: + except Exception as e: helpers.io.catch( e ) return @@ -173,7 +173,7 @@ def add ( **keywords ): def toHexa ( key ): global LUT - if isinstance(key,int) or isinstance(key,long) or not LUT.has_key(key): return key + if isinstance(key,int) or not (key in LUT): return key return LUT[key].hexa diff --git a/crlcore/etc/node180/scn6m_deep_09/__init__.py b/crlcore/etc/node180/scn6m_deep_09/__init__.py index 8f89f0ad..dc0af2cb 100644 --- a/crlcore/etc/node180/scn6m_deep_09/__init__.py +++ b/crlcore/etc/node180/scn6m_deep_09/__init__.py @@ -16,7 +16,7 @@ import Cfg import helpers.io helpers.io.vprint( 1, ' o Loading "node180.scn6m_deep_09" technology.' ) -helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) ) +helpers.io.vprint( 2, ' - "{}".'.format(helpers.truncPath(__file__)) ) from Hurricane import DataBase from CRL import System diff --git a/crlcore/etc/node180/scn6m_deep_09/alliance.py b/crlcore/etc/node180/scn6m_deep_09/alliance.py index aa0f81c8..b37e15f4 100644 --- a/crlcore/etc/node180/scn6m_deep_09/alliance.py +++ b/crlcore/etc/node180/scn6m_deep_09/alliance.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -14,26 +14,23 @@ import helpers.io -helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) ) +helpers.io.vprint( 2, ' - "{}".'.format(helpers.truncPath(__file__)) ) import os import os.path from CRL import Environment from CRL import AllianceFramework - allianceTop = None -if os.environ.has_key('ALLIANCE_TOP'): - allianceTop = os.environ['ALLIANCE_TOP'] - if not os.path.isdir(allianceTop): - allianceTop = None - +if 'ALLIANCE_TOP' in os.environ: + allianceTop = os.environ['ALLIANCE_TOP'] + if not os.path.isdir(allianceTop): + allianceTop = None if not allianceTop: allianceTop = '/soc/alliance' cellsTop = allianceTop+'/cells' - -af = AllianceFramework.get() -env = af.getEnvironment() +af = AllianceFramework.get() +env = af.getEnvironment() env.setSCALE_X ( 100 ) env.setCATALOG ( 'CATAL' ) diff --git a/crlcore/etc/node180/scn6m_deep_09/analog.py b/crlcore/etc/node180/scn6m_deep_09/analog.py index eb7aca9d..22a76ef7 100644 --- a/crlcore/etc/node180/scn6m_deep_09/analog.py +++ b/crlcore/etc/node180/scn6m_deep_09/analog.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -14,6 +14,6 @@ import helpers.io -helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) ) +helpers.io.vprint( 2, ' - "{}".'.format(helpers.truncPath(__file__)) ) #import common.analog diff --git a/crlcore/etc/node180/scn6m_deep_09/devices.py b/crlcore/etc/node180/scn6m_deep_09/devices.py index 03d8c2f7..3bd4e28d 100644 --- a/crlcore/etc/node180/scn6m_deep_09/devices.py +++ b/crlcore/etc/node180/scn6m_deep_09/devices.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -14,16 +14,14 @@ import helpers.io -helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) ) +helpers.io.vprint( 2, ' - "{}".'.format(helpers.truncPath(__file__)) ) import common.devices from common.devices import addDevice - chamsDir = helpers.sysConfDir + '/share/coriolis2/' spiceDir = chamsDir + 'spice/' - addDevice( name = 'DifferentialPairBulkConnected' , spice = spiceDir+'DiffPairBulkConnected.spi' , connectors = ( 'D1', 'D2', 'G1', 'G2', 'S' ) diff --git a/crlcore/etc/node180/scn6m_deep_09/display.py b/crlcore/etc/node180/scn6m_deep_09/display.py index 50e41566..a17e9dcb 100644 --- a/crlcore/etc/node180/scn6m_deep_09/display.py +++ b/crlcore/etc/node180/scn6m_deep_09/display.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -14,9 +14,8 @@ import helpers.io -helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) ) +helpers.io.vprint( 2, ' - "{}".'.format(helpers.truncPath(__file__)) ) import common.display - common.display.createStyles( scale=0.5 ) diff --git a/crlcore/etc/node180/scn6m_deep_09/dtr_scn6m_deep_09.py b/crlcore/etc/node180/scn6m_deep_09/dtr_scn6m_deep_09.py index 01ac943c..37c3d318 100644 --- a/crlcore/etc/node180/scn6m_deep_09/dtr_scn6m_deep_09.py +++ b/crlcore/etc/node180/scn6m_deep_09/dtr_scn6m_deep_09.py @@ -9,7 +9,7 @@ # Used revision 8.00 of May 11, 2009. import helpers.io -helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) ) +helpers.io.vprint( 2, ' - "{}".'.format(helpers.truncPath(__file__)) ) from Hurricane import DbU from helpers.analogtechno import Length diff --git a/crlcore/etc/node180/scn6m_deep_09/etesian.py b/crlcore/etc/node180/scn6m_deep_09/etesian.py index e438773d..b293d47f 100644 --- a/crlcore/etc/node180/scn6m_deep_09/etesian.py +++ b/crlcore/etc/node180/scn6m_deep_09/etesian.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -14,6 +14,6 @@ import helpers.io -helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) ) +helpers.io.vprint( 2, ' - "{}".'.format(helpers.truncPath(__file__)) ) import common.etesian diff --git a/crlcore/etc/node180/scn6m_deep_09/kite.py b/crlcore/etc/node180/scn6m_deep_09/kite.py index 68166f80..358f4529 100644 --- a/crlcore/etc/node180/scn6m_deep_09/kite.py +++ b/crlcore/etc/node180/scn6m_deep_09/kite.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -15,7 +15,7 @@ import Cfg import helpers.io -helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) ) +helpers.io.vprint( 2, ' - "{}".'.format(helpers.truncPath(__file__)) ) from Hurricane import DataBase from CRL import AllianceFramework @@ -85,6 +85,7 @@ rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL1') # meta , l(0) # track offset from AB. , l(10) # track pitch. , l(3) # wire width. + , l(3) # perpandicular wire width. , l(2) # VIA side (that is VIA12). , l(7) # obstacle dW. ) ) @@ -97,6 +98,7 @@ rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL2') # meta , l(0) # track offset from AB. , l(10) # track pitch. , l(3) # wire width. + , l(3) # perpandicular wire width. , l(2) # VIA side (that is VIA23). , l(8) # obstacle dW. ) ) @@ -109,6 +111,7 @@ rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL3') # meta , l(0) # track offset from AB. , l(10) # track pitch. , l(3) # wire width. + , l(3) # perpandicular wire width. , l(2) # VIA side (that is VIA34). , l(8) # obstacle dW. ) ) @@ -121,6 +124,7 @@ rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL4') # meta , l(0) # track offset from AB. , l(15) # track pitch. , l(6) # wire width. + , l(6) # perpandicular wire width. , l(4) # VIA side (that is VIA23). , l(8) # obstacle dW. ) ) @@ -133,6 +137,7 @@ rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL5') # meta , l(0) # track offset from AB. , l(15) # track pitch. , l(6) # wire width. + , l(6) # perpandicular wire width. , l(4) # VIA side (that is VIA23). , l(8) # obstacle dW. ) ) @@ -145,6 +150,7 @@ rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL6') # meta , l(0) # track offset from AB. , l(15) # track pitch. , l(6) # wire width. + , l(6) # perpandicular wire width. , l(4) # VIA side (that is VIA23). , l(8) # obstacle dW. ) ) @@ -161,6 +167,7 @@ rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL1') # meta , l(0) # track offset from AB. , l(10) # track pitch. , l(3) # wire width. + , l(3) # perpandicular wire width. , l(2) # VIA side (that is VIA12). , l(7) # obstacle dW. ) ) @@ -173,6 +180,7 @@ rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL2') # meta , l(0) # track offset from AB. , l(10) # track pitch. , l(3) # wire width. + , l(3) # perpandicular wire width. , l(2) # VIA side (that is VIA23). , l(8) # obstacle dW. ) ) @@ -185,6 +193,7 @@ rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL3') # meta , l(0) # track offset from AB. , l(8) # track pitch. , l(3) # wire width. + , l(3) # perpandicular wire width. , l(2) # VIA side (that is VIA12). , l(8) # obstacle dW. ) ) @@ -197,6 +206,7 @@ rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL4') # meta , l(0) # track offset from AB. , l(10) # track pitch. , l(3) # wire width. + , l(3) # perpandiuclar wire width. , l(2) # VIA side (that is VIA23). , l(8) # obstacle dW. ) ) @@ -213,6 +223,7 @@ rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL1') # meta , l(0) # track offset from AB. , l(10) # track pitch. , l(3) # wire width. + , l(3) # perpandicular wire width. , l(3) # VIA side (that is VIA12). , l(7) # obstacle dW. ) ) @@ -225,6 +236,7 @@ rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL2') # meta , l(0) # track offset from AB. , l(10) # track pitch. , l(3) # wire width. + , l(3) # perpandicular wire width. , l(3) # VIA side (that is VIA23). , l(8) # obstacle dW. ) ) diff --git a/crlcore/etc/node180/scn6m_deep_09/misc.py b/crlcore/etc/node180/scn6m_deep_09/misc.py index 64235013..e283a180 100644 --- a/crlcore/etc/node180/scn6m_deep_09/misc.py +++ b/crlcore/etc/node180/scn6m_deep_09/misc.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -14,6 +14,6 @@ import helpers.io -helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) ) +helpers.io.vprint( 2, ' - "{}".'.format(helpers.truncPath(__file__)) ) import common.misc diff --git a/crlcore/etc/node180/scn6m_deep_09/patterns.py b/crlcore/etc/node180/scn6m_deep_09/patterns.py index 931bf619..55de360c 100644 --- a/crlcore/etc/node180/scn6m_deep_09/patterns.py +++ b/crlcore/etc/node180/scn6m_deep_09/patterns.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -14,6 +14,6 @@ import helpers.io -helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) ) +helpers.io.vprint( 2, ' - "{}".'.format(helpers.truncPath(__file__)) ) import common.patterns diff --git a/crlcore/etc/node180/scn6m_deep_09/plugins.py b/crlcore/etc/node180/scn6m_deep_09/plugins.py index 9411a1f0..e1f04729 100644 --- a/crlcore/etc/node180/scn6m_deep_09/plugins.py +++ b/crlcore/etc/node180/scn6m_deep_09/plugins.py @@ -15,7 +15,7 @@ import Cfg import helpers.io -helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) ) +helpers.io.vprint( 2, ' - "{}".'.format(helpers.truncPath(__file__)) ) from helpers import l, u, n diff --git a/crlcore/etc/node180/scn6m_deep_09/stratus1.py b/crlcore/etc/node180/scn6m_deep_09/stratus1.py index b68cc742..fec2ddba 100644 --- a/crlcore/etc/node180/scn6m_deep_09/stratus1.py +++ b/crlcore/etc/node180/scn6m_deep_09/stratus1.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) Sorbonne Universié 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -15,10 +15,9 @@ import Cfg import helpers.io -helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) ) +helpers.io.vprint( 2, ' - "{}".'.format(helpers.truncPath(__file__)) ) import common.stratus1 - Cfg.getParamString( "stratus1.format" ).setString( "vst" ) Cfg.getParamString( "stratus1.simulator" ).setString( "asimut" ) diff --git a/crlcore/etc/node180/scn6m_deep_09/technology.py b/crlcore/etc/node180/scn6m_deep_09/technology.py index be133a4e..4bce45ef 100644 --- a/crlcore/etc/node180/scn6m_deep_09/technology.py +++ b/crlcore/etc/node180/scn6m_deep_09/technology.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -14,19 +14,17 @@ import helpers.io -helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) ) - -from helpers import l, u, n -from Hurricane import DbU -from Hurricane import DataBase -from Hurricane import Technology - +helpers.io.vprint( 2, ' - "{}".'.format(helpers.truncPath(__file__)) ) +from helpers import l, u, n +from Hurricane import DbU +from Hurricane import DataBase +from Hurricane import Technology tech = DataBase.getDB().getTechnology() if tech: - print WarningMessage( 'cmos.technology: Technology already exists, "%s"' % tech.getName() ) + print( WarningMessage( 'cmos.technology: Technology already exists, "{}"'.format(tech.getName()) )) else: - tech = Technology.create( DataBase.getDB(), 'scn6m_deep_09' ) + tech = Technology.create( DataBase.getDB(), 'scn6m_deep_09' ) DbU.setPrecision ( 2 ) DbU.setPhysicalsPerGrid ( 0.005, DbU.UnitPowerMicro ) @@ -34,7 +32,6 @@ DbU.setGridsPerLambda ( 18 ) DbU.setSymbolicSnapGridStep( DbU.fromLambda( 1.0) ) DbU.setPolygonStep ( DbU.fromGrid ( 9.0) ) - import common from common.technology import * diff --git a/crlcore/etc/node45/freepdk45/alliance.py b/crlcore/etc/node45/freepdk45/alliance.py index 4f0a978a..96823b0b 100644 --- a/crlcore/etc/node45/freepdk45/alliance.py +++ b/crlcore/etc/node45/freepdk45/alliance.py @@ -23,7 +23,7 @@ from CRL import AllianceFramework allianceTop = None -if os.environ.has_key('ALLIANCE_TOP'): +if 'ALLIANCE_TOP' in os.environ: allianceTop = os.environ['ALLIANCE_TOP'] if not os.path.isdir(allianceTop): allianceTop = None diff --git a/crlcore/etc/node45/freepdk45/technology.py b/crlcore/etc/node45/freepdk45/technology.py index 2e9bf3c0..549cd7ef 100644 --- a/crlcore/etc/node45/freepdk45/technology.py +++ b/crlcore/etc/node45/freepdk45/technology.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -14,7 +14,7 @@ import helpers.io -helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) ) +helpers.io.vprint( 2, ' - "{}".'.format(helpers.truncPath(__file__)) ) from helpers import l, u, n from Hurricane import DbU @@ -36,7 +36,7 @@ def setEnclosures ( layer, subLayer, enclosures ): tech = DataBase.getDB().getTechnology() if tech: - print WarningMessage( 'cmos.technology: Technology already exists, "%s"' % tech.getName() ) + print( WarningMessage( 'cmos.technology: Technology already exists, "{}"'.format(tech.getName()) )) else: tech = Technology.create( DataBase.getDB(), 'freepdk45' ) diff --git a/crlcore/etc/node600/phenitec/alliance.py b/crlcore/etc/node600/phenitec/alliance.py index 1989a623..56742d99 100644 --- a/crlcore/etc/node600/phenitec/alliance.py +++ b/crlcore/etc/node600/phenitec/alliance.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -14,7 +14,7 @@ import helpers.io -helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) ) +helpers.io.vprint( 2, ' - "{}".'.format(helpers.truncPath(__file__)) ) import os import os.path @@ -23,21 +23,19 @@ from CRL import AllianceFramework allianceTop = None -if os.environ.has_key('ALLIANCE_TOP'): - allianceTop = os.environ['ALLIANCE_TOP'] - if not os.path.isdir(allianceTop): - allianceTop = None - +if 'ALLIANCE_TOP' in os.environ: + allianceTop = os.environ['ALLIANCE_TOP'] + if not os.path.isdir(allianceTop): + allianceTop = None if not allianceTop: allianceTop = '/soc/alliance' cellsTop = None -if os.environ.has_key('CELLS_TOP'): - cellsTop = os.environ['CELLS_TOP'] - if not os.path.isdir(cellsTop): - cellsTop = None - +if 'CELLS_TOP' in os.environ: + cellsTop = os.environ['CELLS_TOP'] + if not os.path.isdir(cellsTop): + cellsTop = None if not cellsTop: - cellsTop = allianceTop+'/cells' + cellsTop = allianceTop+'/cells' af = AllianceFramework.get() env = af.getEnvironment() diff --git a/crlcore/etc/node600/phenitec/technology.py b/crlcore/etc/node600/phenitec/technology.py index fc40f049..8a3bbb54 100644 --- a/crlcore/etc/node600/phenitec/technology.py +++ b/crlcore/etc/node600/phenitec/technology.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -14,19 +14,19 @@ import helpers.io -helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) ) +helpers.io.vprint( 2, ' - "{}".'.format(helpers.truncPath(__file__)) ) -from helpers import l, u, n -from Hurricane import DbU -from Hurricane import DataBase -from Hurricane import Technology +from helpers import l, u, n +from Hurricane import DbU +from Hurricane import DataBase +from Hurricane import Technology tech = DataBase.getDB().getTechnology() if tech: - print WarningMessage( 'cmos.technology: Technology already exists, "%s"' % tech.getName() ) + print( WarningMessage( 'cmos.technology: Technology already exists, "{}"'format(tech.getName()) )) else: - tech = Technology.create( DataBase.getDB(), 'phenitec06' ) + tech = Technology.create( DataBase.getDB(), 'phenitec06' ) DbU.setPrecision ( 2 ) DbU.setPhysicalsPerGrid ( 0.002, DbU.UnitPowerMicro ) diff --git a/crlcore/etc/symbolic/cmos/alliance.py b/crlcore/etc/symbolic/cmos/alliance.py index 368ea61f..1024ab15 100644 --- a/crlcore/etc/symbolic/cmos/alliance.py +++ b/crlcore/etc/symbolic/cmos/alliance.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -16,23 +16,21 @@ import os import os.path import helpers.io -helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) ) +helpers.io.vprint( 2, ' - "{}".'.format(helpers.truncPath(__file__)) ) from CRL import Environment from CRL import AllianceFramework allianceTop = None -if os.environ.has_key('ALLIANCE_TOP'): - allianceTop = os.environ['ALLIANCE_TOP'] - if not os.path.isdir(allianceTop): - allianceTop = None - +if 'ALLIANCE_TOP' in os.environ: + allianceTop = os.environ['ALLIANCE_TOP'] + if not os.path.isdir(allianceTop): + allianceTop = None if not allianceTop: allianceTop = '/soc/alliance' cellsTop = allianceTop+'/cells' - -af = AllianceFramework.get() -env = af.getEnvironment() +af = AllianceFramework.get() +env = af.getEnvironment() env.setSCALE_X ( 100 ) env.setCATALOG ( 'CATAL' ) diff --git a/crlcore/etc/symbolic/cmos/technology.py b/crlcore/etc/symbolic/cmos/technology.py index d09b4fb8..93160fde 100644 --- a/crlcore/etc/symbolic/cmos/technology.py +++ b/crlcore/etc/symbolic/cmos/technology.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -16,7 +16,7 @@ from helpers import l, u, n from helpers.io import WarningMessage import helpers.io -helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) ) +helpers.io.vprint( 2, ' - "{}".'.format(helpers.truncPath(__file__)) ) from Hurricane import DbU from Hurricane import DataBase @@ -25,9 +25,9 @@ from Hurricane import Technology tech = DataBase.getDB().getTechnology() if tech: - print WarningMessage( 'cmos.technology: Technology already exists, "%s"' % tech.getName() ) + print( WarningMessage( 'cmos.technology: Technology already exists, "{}"'.format(tech.getName()) )) else: - tech = Technology.create( DataBase.getDB(), 'cmos' ) + tech = Technology.create( DataBase.getDB(), 'cmos' ) DbU.setPrecision ( 2 ) DbU.setPhysicalsPerGrid ( 0.5, DbU.UnitPowerMicro ) diff --git a/crlcore/etc/symbolic/cmos45/alliance.py b/crlcore/etc/symbolic/cmos45/alliance.py index d8a1201e..5f89e95a 100644 --- a/crlcore/etc/symbolic/cmos45/alliance.py +++ b/crlcore/etc/symbolic/cmos45/alliance.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) orbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -16,24 +16,21 @@ import os import os.path import helpers.io -helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) ) - -from CRL import Environment -from CRL import AllianceFramework +helpers.io.vprint( 2, ' - "{}".'.format(helpers.truncPath(__file__)) ) +from CRL import Environment +from CRL import AllianceFramework allianceTop = None -if os.environ.has_key('ALLIANCE_TOP'): - allianceTop = os.environ['ALLIANCE_TOP'] - if not os.path.isdir(allianceTop): - allianceTop = None - +if 'ALLIANCE_TOP' in os.environ: + allianceTop = os.environ['ALLIANCE_TOP'] + if not os.path.isdir(allianceTop): + allianceTop = None if not allianceTop: allianceTop = '/soc/alliance' cellsTop = allianceTop+'/cells' - -af = AllianceFramework.get() -env = af.getEnvironment() +af = AllianceFramework.get() +env = af.getEnvironment() env.setSCALE_X ( 100 ) env.setCATALOG ( 'CATAL' ) diff --git a/crlcore/etc/symbolic/cmos45/kite.py b/crlcore/etc/symbolic/cmos45/kite.py index f1f1c6e9..b7ff6d45 100644 --- a/crlcore/etc/symbolic/cmos45/kite.py +++ b/crlcore/etc/symbolic/cmos45/kite.py @@ -45,7 +45,7 @@ p = Cfg.getParamInt( "kite.globalRipupLimit" ); p.setInt( 5 ); p.setMi p = Cfg.getParamInt( "kite.longGlobalRipupLimit" ); p.setInt( 5 ); p.setMin( 1 ) # Anabatic & Katana parameters are temporarily hosted here. -p = Cfg.getParamString ( 'anabatic.routingGauge' ); p.setString ( 'msxlib' ) +p = Cfg.getParamString ( 'anabatic.routingGauge' ); p.setString ( 'msxlib_uniform' ) p = Cfg.getParamInt ( "anabatic.globalLengthThreshold" ); p.setInt ( 1450 ) p = Cfg.getParamPercentage( "anabatic.saturateRatio" ); p.setPercentage( 80 ) p = Cfg.getParamInt ( "anabatic.saturateRp" ); p.setInt ( 8 ) @@ -150,7 +150,7 @@ rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL5') # meta rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL6') # metal. , RoutingLayerGauge.Horizontal # preferred routing direction. - , RoutingLayerGauge.Default # layer usage. + , RoutingLayerGauge.PowerSupply # layer usage. , 5 # depth. , 0.0 # density (deprecated). , l(0) # track offset from AB. @@ -231,7 +231,7 @@ rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL5') # meta rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL6') # metal. , RoutingLayerGauge.Horizontal # preferred routing direction. - , RoutingLayerGauge.Default # layer usage. + , RoutingLayerGauge.PowerSupply # layer usage. , 5 # depth. , 0.0 # density (deprecated). , l(0) # track offset from AB. @@ -330,7 +330,7 @@ rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL2') # meta af.addRoutingGauge( rg ) -af.setRoutingGauge( 'msxlib' ) +af.setRoutingGauge( 'msxlib_uniform' ) # Gauge for standard cells. cg = CellGauge.create( 'msxlib_uniform' diff --git a/crlcore/etc/symbolic/cmos45/technology.py b/crlcore/etc/symbolic/cmos45/technology.py index 738ee7d4..26c589e6 100644 --- a/crlcore/etc/symbolic/cmos45/technology.py +++ b/crlcore/etc/symbolic/cmos45/technology.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -14,7 +14,7 @@ import helpers.io -helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) ) +helpers.io.vprint( 2, ' - "{}".'.format(helpers.truncPath(__file__)) ) from helpers import l, u, n from Hurricane import DbU @@ -24,9 +24,9 @@ from Hurricane import Technology tech = DataBase.getDB().getTechnology() if tech: - print WarningMessage( 'cmos.technology: Technology already exists, "%s"' % tech.getName() ) + print( WarningMessage( 'cmos.technology: Technology already exists, "{}"'.format(tech.getName()) )) else: - tech = Technology.create( DataBase.getDB(), 'cmos45' ) + tech = Technology.create( DataBase.getDB(), 'cmos45' ) DbU.setPrecision ( 2 ) DbU.setPhysicalsPerGrid ( 0.0025, DbU.UnitPowerMicro ) diff --git a/crlcore/python/CMakeLists.txt b/crlcore/python/CMakeLists.txt index a4735263..5a4697a2 100644 --- a/crlcore/python/CMakeLists.txt +++ b/crlcore/python/CMakeLists.txt @@ -1,7 +1,7 @@ - install( FILES helpers/__init__.py DESTINATION ${PYTHON_SITE_PACKAGES}/crlcore/helpers ) - install( FILES helpers/io.py DESTINATION ${PYTHON_SITE_PACKAGES}/crlcore/helpers ) - install( FILES helpers/utils.py DESTINATION ${PYTHON_SITE_PACKAGES}/crlcore/helpers ) - install( FILES helpers/overlay.py DESTINATION ${PYTHON_SITE_PACKAGES}/crlcore/helpers ) - install( FILES helpers/analogtechno.py DESTINATION ${PYTHON_SITE_PACKAGES}/crlcore/helpers ) - install( FILES helpers/technology.py DESTINATION ${PYTHON_SITE_PACKAGES}/crlcore/helpers ) + install( FILES helpers/__init__.py DESTINATION ${Python_CORIOLISLIB}/crlcore/helpers ) + install( FILES helpers/io.py DESTINATION ${Python_CORIOLISLIB}/crlcore/helpers ) + install( FILES helpers/utils.py DESTINATION ${Python_CORIOLISLIB}/crlcore/helpers ) + install( FILES helpers/overlay.py DESTINATION ${Python_CORIOLISLIB}/crlcore/helpers ) + install( FILES helpers/analogtechno.py DESTINATION ${Python_CORIOLISLIB}/crlcore/helpers ) + install( FILES helpers/technology.py DESTINATION ${Python_CORIOLISLIB}/crlcore/helpers ) diff --git a/crlcore/python/helpers/__init__.py b/crlcore/python/helpers/__init__.py index 1f6b0f62..fe1ba5ea 100644 --- a/crlcore/python/helpers/__init__.py +++ b/crlcore/python/helpers/__init__.py @@ -1,7 +1,8 @@ + # -*- mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) SU 2012-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -17,12 +18,11 @@ # rather than an ordinary directory, thus enabling the uses of the # 'dot' notation in import. -#print 'helpers.__init__()' - import sys import os import os.path import re +import math import traceback quiet = False @@ -46,13 +46,23 @@ import helpers.io from helpers.io import ErrorMessage +def irange ( value ): + if isinstance(value,int): return range(value) + if isinstance(value,float): + r,i = math.modf( value ) + if r != 0.0: + print( '[WARNING] helpers.irange(): value={} is not an integer (truncated).'\ + .format(value) ) + return range(int( value )) + + def stype ( o ): return str(type(o)).split("'")[1] def isderived ( derived, base ): btype = base.mro()[0] for dtype in derived.mro(): - if dtype == btype: return True + if dtype == btype: return True return False @@ -61,20 +71,15 @@ def truncPath ( path, maxlength=80 ): components = path.split(os.sep) trunc = '' for i in range(-1,-len(components),-1): - if len(trunc)+len(components[i]) >= maxlength: break - if not len(trunc): trunc = components[i] - else: trunc = os.path.join( components[i], trunc ) - + if len(trunc)+len(components[i]) >= maxlength: break + if not len(trunc): trunc = components[i] + else: trunc = os.path.join( components[i], trunc ) return '...' + os.sep + trunc def textStackTrace ( trace, showIndent=True, scriptPath=None ): - #for entry in traceback.format_list( trace ): - # print entry, - indent = '' if showIndent: indent = ' ' - s = '' if scriptPath: if len(scriptPath) > 100: @@ -83,7 +88,7 @@ def textStackTrace ( trace, showIndent=True, scriptPath=None ): if showIndent: s += '[ERROR] ' s += 'An exception occured while loading the Python script module:\n' - s += indent + '\"%s\"\n' % (filename) + s += indent + '\"{}\"\n' % (filename) s += indent + 'You should check for simple python errors in this module.\n\n' s += indent + 'Python stack trace:\n' @@ -93,13 +98,13 @@ def textStackTrace ( trace, showIndent=True, scriptPath=None ): if len(filename) > 58: filename = filename[-58:] filename = '.../' + filename[ filename.find('/')+1 : ] - #s += indent + '[%02d] %45s:%-5d in \"%s()\"' % ( maxdepth-depth-1, filename, line, function ) - s += indent + '#%d in %25s() at %s:%d\n' % ( depth, function, filename, line ) + #s += indent + '[%02d] %45s:%-5d in \"{}()\"' % ( maxdepth-depth-1, filename, line, function ) + s += indent + '#{} in {:>25}() at {}:{}\n'.format( depth, function, filename, line ) return s def showStackTrace ( trace ): - print textStackTrace( trace, True ) + print( textStackTrace( trace, True )) return @@ -112,24 +117,24 @@ def textPythonTrace ( scriptPath=None, e=None, tryContinue=True ): else: filename = scriptPath s += '[ERROR] An exception occured while loading the Python script module:\n' - s += ' \"%s\"\n' % (filename) + s += ' \"{}\"\n'.format(filename) s += ' You should check for simple python errors in this module.\n' - - if isinstance(e,helpers.io.ErrorMessage): trace = e.trace - else: trace = traceback.extract_tb( sys.exc_info()[2] ) - s += textStackTrace( trace ) - - if e: - s += ' Error was:\n' - s += ' %s\n' % e - + if isinstance(e,helpers.io.ErrorMessage): + trace = e.trace + s += textStackTrace( trace ) + if e: + s += ' Error was:\n' + s += ' {}\n'.format(e) + else: + #trace = traceback.extract_tb( sys.exc_info()[2] ) + print( traceback.format_exc() ) if tryContinue: s += ' Trying to continue anyway...' return s def showPythonTrace ( scriptPath=None, e=None, tryContinue=True ): - print textPythonTrace( scriptPath, e, tryContinue ) + print( textPythonTrace( scriptPath, e, tryContinue )) return @@ -146,7 +151,7 @@ class Dots ( object ): sys.stdout.write(self._header) else: if not (self._count % self._width): - sys.stdout.write("\n%s"%self._header) + sys.stdout.write("\n{}".format(self._header)) sys.stdout.write(".") sys.stdout.flush() @@ -217,10 +222,10 @@ class Trace ( object ): sys.stderr.write( message[1:] ) else: sys.stderr.write( message ) - sys.stderr.flush() for f in sflags[1]: if f == '+': self._tab.inc() if f == '-': self._tab.dec() + sys.stderr.flush() return @@ -245,16 +250,13 @@ def dots ( ttyWidth, leftText, rightText ): def overload ( defaultParameters, parameters ): overloads = {} overloadParameters = [] - for parameter in parameters: overloads[ parameter[0] ] = parameter - for parameter in defaultParameters: - if overloads.has_key(parameter[0]): + if parameter[0] in overloads: overloadParameters.append( overloads[parameter[0]] ) else: overloadParameters.append( parameter ) - return tuple(overloadParameters) @@ -277,32 +279,28 @@ def initTechno ( argQuiet ): global technoDir global techno - quiet = argQuiet - + quiet = argQuiet technoFiles = [ sysConfDir+'/techno.conf' ] if os.getenv('HOME'): technoFiles += [ os.getenv('HOME')+'/.coriolis2/techno.py' ] technoFiles += [ os.getcwd()+'/.coriolis2/techno.py' ] - technoFiles.reverse() for technoFile in technoFiles: if os.path.isfile(technoFile): - if not quiet: print ' - Loading \"%s\".' % truncPath(technoFile) - execfile(technoFile,moduleGlobals) + if not quiet: print( ' - Loading "{}".'.format( truncPath(technoFile) )) + exec(open( technoFile ).read()) # moduleGlobals break - if moduleGlobals.has_key('technology'): + if 'technology' in moduleGlobals: techno = technology else: - print '[WARNING] The technology is not set. Using <%s>.' % techno - - if moduleGlobals.has_key('NdaDirectory'): + print( '[WARNING] The technology is not set. Using "{}".'.format( techno )) + if 'NdaDirectory' in moduleGlobals: ndaDir = NdaDirectory ndaConfDir = os.path.join( NdaDirectory, 'etc/coriolis2' ) else: ndaConfDir = sysConfDir - technoDir = os.path.join( ndaConfDir, techno ) - if not quiet: print ' - Technology: %s.' % techno + if not quiet: print( ' - Technology: {}.'.format( techno )) unitsLambda = True @@ -315,7 +313,7 @@ def setNdaTopDir ( ndaTopDirArg ): global ndaTopDir if not os.path.isdir(ndaTopDirArg): - print helpers.io.WarningMessage( 'helpers.setNdaTopDir(): Directory "%s" does not exists.' % ndaTopDirArg ) + print( helpers.io.WarningMessage( 'helpers.setNdaTopDir(): Directory "{}" does not exists.'.format( ndaTopDirArg ))) else: ndaTopDir = ndaTopDirArg sys.path.append( os.path.join(ndaTopDir,'etc/coriolis2') ) @@ -332,18 +330,14 @@ def staticInitialization ( quiet=False ): global unitsLambda if sysConfDir != None: - #if not quiet: print ' o helpers.staticInitialization() Already run, exit.' return - reSysConfDir = re.compile(r'.*etc\/coriolis2') - if not quiet: print ' o Locating configuration directory:' - + if not quiet: print( ' o Locating configuration directory:' ) for path in sys.path: if reSysConfDir.match(path): sysConfDir = path - if not quiet: print ' - "%s"' % sysConfDir + if not quiet: print( ' - "{}"'.format( sysConfDir )) break - if not sysConfDir: coriolisTop = os.getenv('CORIOLIS_TOP') if coriolisTop == '/usr': @@ -353,8 +347,7 @@ def staticInitialization ( quiet=False ): else: raise ErrorMessage( 1, [ 'Cannot locate the directoty holding the configuration files.' , 'The path is something ending by <.../etc/coriolis2>.'] ) - - if not quiet: print ' - "%s"' % sysConfDir + if not quiet: print( ' - "{}"'.format( sysConfDir )) initTechno( quiet ) return @@ -363,18 +356,14 @@ def setSysConfDir ( quiet=False ): global sysConfDir if sysConfDir != None: - #if not quiet: print ' o helpers.staticInitialization() Already run, exit.' return - reSysConfDir = re.compile(r'.*etc\/coriolis2') - if not quiet: print ' o Locating configuration directory:' - + if not quiet: print( ' o Locating configuration directory:' ) for path in sys.path: if reSysConfDir.match(path): sysConfDir = path - if not quiet: print ' - "%s"' % sysConfDir + if not quiet: print( ' - "{}"'.format( sysConfDir )) break - if not sysConfDir: coriolisTop = os.getenv('CORIOLIS_TOP') if coriolisTop == '/usr': @@ -384,8 +373,7 @@ def setSysConfDir ( quiet=False ): else: raise ErrorMessage( 1, [ 'Cannot locate the directoty holding the configuration files.' , 'The path is something ending by <.../etc/coriolis2>.'] ) - - if not quiet: print ' - "%s"' % sysConfDir + if not quiet: print( ' - "{}"'.format( sysConfDir )) sys.path.append( sysConfDir ) return @@ -416,40 +404,37 @@ setSysConfDir( False ) def unloadUserSettings (): global confModules - print ' o Unloading Python user\'s modules.' + print( ' o Unloading Python user\'s modules.' ) for moduleName in confModules: - refcount = sys.getrefcount( sys.modules[moduleName] ) - warning = '' - if refcount > 3: - warning = '(NOTE: More than 3 refcount %d)' % refcount - #print helpers.io.WarningMessage( [ 'Configuration module "%s" has more than 3 references (%d)".' \ - # % (moduleName,refcount) - # , 'May be unable to unload it from the Python process.' - # ] ) - print ' - %-34s %-35s' % ('"%s".'%moduleName, warning) - del sys.modules[ moduleName ] + refcount = sys.getrefcount( sys.modules[moduleName] ) + warning = '' + if refcount > 3: + warning = '(NOTE: More than 3 refcount %d)' % refcount + #print( helpers.io.WarningMessage( [ 'Configuration module "{}" has more than 3 references ({})".' \ + # .format(moduleName,refcount) + # , 'May be unable to unload it from the Python process.' + # ] )) + print( ' - {:-34} {:-35}'.format( '"{}".'.format(moduleName), warning )) + del sys.modules[ moduleName ] confModules = set() return def loadUserSettings (): rvalue = False - if os.path.isfile('./coriolis2/settings.py'): if os.path.isfile('./coriolis2/__init__.py'): sys.path.insert( 0, os.getcwd() ) import coriolis2.settings rvalue = True else: - print helpers.io.WarningMessage( [ 'User\'s settings directory "%s" exists, but do not contains "__init__.py".' % './coriolis2/' - , '(path:"%s")' % os.path.abspath(os.getcwd()) - ] ) + print( helpers.io.WarningMessage( [ 'User\'s settings directory "{}" exists, but do not contains "__init__.py".'.format( './coriolis2/' ) + , '(path:"{}")'.format( os.path.abspath(os.getcwd()) ) + ] )) else: import symbolic.cmos - tagConfModules() - return rvalue @@ -462,13 +447,9 @@ def tagConfModules (): if not (moduleName in sysModules): confModules.add( moduleName ) - #print 'Configuration modules:' - #for moduleName in confModules: - # print '-', moduleName - def resetCoriolis (): - print ' o Full reset of Coriolis/Hurricane databases.' + print( ' o Full reset of Coriolis/Hurricane databases.' ) CRL.AllianceFramework.get().destroy() Viewer.Graphics.get().clear() Hurricane.DataBase.getDB().destroy() diff --git a/crlcore/python/helpers/analogtechno.py b/crlcore/python/helpers/analogtechno.py index 0bb6b4fb..a7f0207f 100644 --- a/crlcore/python/helpers/analogtechno.py +++ b/crlcore/python/helpers/analogtechno.py @@ -1,7 +1,8 @@ + # -*- Mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) SU 2015-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2015-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -14,7 +15,6 @@ # +-----------------------------------------------------------------+ -from __future__ import print_function import os import os.path import sys @@ -126,7 +126,7 @@ def _loadAnalogTechno ( techno, ruleTable ): , 0 ) else: rule.addValue( valueToDbU(entry[3], unit, entry[4]), 0 ) - except Exception, e: + except Exception as e: e = ErrorMessage( 1, e ) e.addMessage( 'In {}: at index {}.'.format(technoFile,entryNo) ) print( str(e) ) diff --git a/crlcore/python/helpers/io.py b/crlcore/python/helpers/io.py index e08251b6..f9a7d8ef 100644 --- a/crlcore/python/helpers/io.py +++ b/crlcore/python/helpers/io.py @@ -1,7 +1,8 @@ + # -*- mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) SU 2012-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -13,7 +14,6 @@ # | Python : "./crlcore/helpers/io.py" | # +-----------------------------------------------------------------+ -from __future__ import print_function import sys import os import os.path @@ -37,7 +37,7 @@ try: from PyQt4.QtGui import QHBoxLayout from PyQt4.QtGui import QAction from PyQt4.QtGui import QKeySequence -except Exception, e: +except Exception as e: try: from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QSizePolicy @@ -56,7 +56,7 @@ except Exception, e: from PyQt5.QtWidgets import QHBoxLayout from PyQt5.QtWidgets import QAction from PyQt5.QtGui import QKeySequence - except e: + except Exception: print( '[ERROR] helpers.io, neither PyQt4 nor PyQt5 is available.' ) sys.exit( 1 ) import Cfg @@ -183,10 +183,9 @@ class ErrorMessage ( Exception ): elif len(arguments) > 1: sys.stdout.flush() text = list(arguments) - if text: self.errors = [] - while len(text[0]) == 0: del text[0] + while len(text) == 0: del text[0] lstrip = 0 if text[0].startswith('[ERROR]'): lstrip = 8 @@ -203,7 +202,6 @@ class ErrorMessage ( Exception ): def __str__ ( self ): if not isinstance(self.errors,list): return "[ERROR] %s" % self.errors - formatted = "\n" for i in range(len(self.errors)): if i == 0: formatted += "[ERROR] %s" % self.errors[i] @@ -213,7 +211,6 @@ class ErrorMessage ( Exception ): def getLinesAsString ( self ): if not isinstance(self.errors,list): return self.errors - lines = '' for line in self.errors: lines += line + '\n' return lines @@ -256,13 +253,10 @@ def catch ( errorObject ): em = ErrorMessage( 2, errorObject ) em.trace = traceback.extract_tb( sys.exc_info()[2] ) #em.scriptPath = __file__ - print( em ) print( helpers.textStackTrace( em.trace, True, em.scriptPath ) ) - if Viewer.Graphics.get().isEnabled(): tryCont = ErrorWidget( em ).exec_() - if UpdateSession.getStackSize() > 0: UpdateSession.close() return diff --git a/crlcore/python/helpers/overlay.py b/crlcore/python/helpers/overlay.py index 6428bfef..1161f14c 100644 --- a/crlcore/python/helpers/overlay.py +++ b/crlcore/python/helpers/overlay.py @@ -1,7 +1,7 @@ # -*- mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) SU 2012-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -25,7 +25,6 @@ Contains: * ``overlay.CfgCache`` : A cache for Cfg parameters. """ -from __future__ import print_function import Cfg import Hurricane @@ -80,9 +79,6 @@ class Configuration: Cfg.getParamEnumerate(attr).setInt( val ) else: Cfg.getParamInt(attr).setInt( val ) - elif isinstance(val, long): - p = Cfg.getParamInt( attr ) # all params have a type - p.setInt( val ) elif isinstance(val, float): p = Cfg.getParamDouble( attr ).setDouble( val ) elif '%' in val: @@ -138,7 +134,6 @@ class CachedParameter ( object ): if len(self.vEnum): p = Cfg.getParamEnumerate( self.path ) elif isinstance(self.v,bool ): p = Cfg.getParamBool ( self.path ) elif isinstance(self.v,int ): p = Cfg.getParamInt ( self.path ) - elif isinstance(self.v,long ): p = Cfg.getParamInt ( self.path ) elif isinstance(self.v,float): p = Cfg.getParamDouble ( self.path ) else: p = Cfg.getParamString ( self.path ) if p.type == Cfg.Parameter.Type.Enumerate: p.setInt ( self.v ) @@ -281,7 +276,7 @@ class CfgCache ( object ): vEnum = None if isinstance(v,list ): vRange = v; v = None if isinstance(v,tuple): vEnum = v; v = None - if not self._rattr.has_key(attr): + if not attr in self._rattr: self._rattr[ attr ] = CachedParameter( self._path+'.'+attr, v ) if vRange is not None: self._rattr[ attr ].vRange = vRange elif vEnum is not None: self._rattr[ attr ].vEnum = vEnum @@ -292,7 +287,7 @@ class CfgCache ( object ): Get an attribute, if it doesn't exists, then we are in an intermediate level like ``katana``, so create a new sub CfgCache for that attribute. """ - if not self._rattr.has_key(attr): + if not attr in self._rattr: path = self._path+'.'+attr if len(self._path) else attr self._rattr[attr] = CfgCache( path, self._priority ) if isinstance(self._rattr[attr],CachedParameter): @@ -300,7 +295,7 @@ class CfgCache ( object ): return self._rattr[attr] def _hasCachedParam ( self, elements ): - if not self._rattr.has_key(elements[0]): + if not elements[0] in self._rattr: return False if len(elements) == 1: return True diff --git a/crlcore/python/helpers/technology.py b/crlcore/python/helpers/technology.py index ee6f1ed5..4150b643 100644 --- a/crlcore/python/helpers/technology.py +++ b/crlcore/python/helpers/technology.py @@ -1,7 +1,7 @@ # -*- mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) SU 2020-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -17,7 +17,6 @@ Some helpers to create or load a technology and it's libraries. """ -from __future__ import print_function from Hurricane import DataBase, Library, BasicLayer, Layer, ViaLayer diff --git a/crlcore/python/helpers/utils.py b/crlcore/python/helpers/utils.py index ac1f48c3..19ea36e6 100644 --- a/crlcore/python/helpers/utils.py +++ b/crlcore/python/helpers/utils.py @@ -1,7 +1,7 @@ # -*- mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) SU 2020-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -21,7 +21,6 @@ Miscellaeous utilities. Contains: and methods. """ -from __future__ import print_function import types import inspect import functools @@ -82,15 +81,15 @@ def classdecorator ( cls ): def isprop ( attr ): return isinstance( attr, property ) def wrappedSetattr ( self, attr, v ): - if attr != '_baseClass' and self._baseClass.__dict__.has_key(attr): + if attr != '_baseClass' and (attr in self._baseClass.__dict__): self._baseClass.__setattr__( attr, v ) object.__setattr__( self, attr, v ) def wrappedGetattr ( self, attr ): if attr == '_baseClass': return self.__dict__['_baseClass'] - if self.__dict__.has_key(attr): return self.__dict__[attr] + if attr in self.__dict__: return self.__dict__[attr] selfClass = type( self ) - if selfClass.__dict__.has_key(attr): + if attr in selfClass.__dict__: prop = selfClass.__dict__[attr] if isprop(prop): return prop.__get__(self) diff --git a/crlcore/src/LibraryManager/CellsModel.cpp b/crlcore/src/LibraryManager/CellsModel.cpp index 96ae2693..3113ebc0 100644 --- a/crlcore/src/LibraryManager/CellsModel.cpp +++ b/crlcore/src/LibraryManager/CellsModel.cpp @@ -1,7 +1,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC 2015-2018, All Rights Reserved +// Copyright (c) Sorbonne Université 2015-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -18,7 +18,7 @@ #include #include #include -#include "vlsisapd/utilities/Path.h" +#include "hurricane/utilities/Path.h" #include "hurricane/Error.h" #include "hurricane/Cells.h" #include "hurricane/Library.h" @@ -26,7 +26,7 @@ #include "crlcore/AllianceFramework.h" #include "crlcore/Catalog.h" #include "crlcore/AcmSigda.h" -#include "crlcore/Ispd05Bookshelf.h" +//#include "crlcore/Ispd05Bookshelf.h" #include "crlcore/Blif.h" #include "crlcore/Iccad04Lefdef.h" #include "crlcore/CellsModel.h" @@ -94,11 +94,11 @@ namespace CRL { , CellLoader::Importer , Catalog::State::Logical , std::bind( &AcmSigda::load, placeholders::_1 ) ) ); - loaders->addLoader( new CellLoader("aux" - , "ISPD'05 (Bookshelf)" - , CellLoader::Importer - , Catalog::State::Logical|Catalog::State::Physical - , std::bind( &Ispd05::load, placeholders::_1 ) ) ); +// loaders->addLoader( new CellLoader("aux" +// , "ISPD'05 (Bookshelf)" +// , CellLoader::Importer +// , Catalog::State::Logical|Catalog::State::Physical +// , std::bind( &Ispd05::load, placeholders::_1 ) ) ); loaders->addLoader( new CellLoader("blif" , "BLIF (Yosys/ABC)" , CellLoader::Importer|CellLoader::MultiCell diff --git a/crlcore/src/LibraryManager/crlcore/CellDatas.h b/crlcore/src/LibraryManager/crlcore/CellDatas.h index 7e1af455..1466712c 100644 --- a/crlcore/src/LibraryManager/crlcore/CellDatas.h +++ b/crlcore/src/LibraryManager/crlcore/CellDatas.h @@ -1,7 +1,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC 2015-2018, All Rights Reserved +// Copyright (c) Sorbonne Université 2015-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -14,12 +14,10 @@ // +-----------------------------------------------------------------+ -#ifndef CRL_CELL_DATAS_H -#define CRL_CELL_DATAS_H - +#pragma once #include #include -#include "vlsisapd/utilities/Path.h" +#include "hurricane/utilities/Path.h" #include "crlcore/Catalog.h" namespace Hurricane { class Cell; @@ -187,5 +185,3 @@ namespace CRL { } - -#endif // CRL_CELL_DATAS_H diff --git a/crlcore/src/ccore/AllianceFramework.cpp b/crlcore/src/ccore/AllianceFramework.cpp index 6465b77a..cef022c0 100644 --- a/crlcore/src/ccore/AllianceFramework.cpp +++ b/crlcore/src/ccore/AllianceFramework.cpp @@ -14,7 +14,7 @@ // +-----------------------------------------------------------------+ #include -#include "vlsisapd/utilities/Path.h" +#include "hurricane/utilities/Path.h" #include "hurricane/Initializer.h" #include "hurricane/Warning.h" #include "hurricane/DataBase.h" @@ -374,7 +374,7 @@ namespace CRL { if (state->getFlags(loadMode) != 0) continue; // Transmit all flags except thoses related to views. - loadMode |= (mode & (!Catalog::State::Views)); + loadMode |= (mode & (~Catalog::State::Views)); parser = & (_parsers.getParserSlot( name, loadMode, _environment )); // Try to open cell file (file extention is supplied by the parser). @@ -864,7 +864,7 @@ namespace CRL { if ( catalogProperty != NULL ) { Catalog::State* state = catalogProperty->getState (); - if ( (flags and IgnoreFeeds) and state->isFeed() ) continue; + if ( (flags & IgnoreFeeds) and state->isFeed() ) continue; } ++gates; diff --git a/crlcore/src/ccore/CMakeLists.txt b/crlcore/src/ccore/CMakeLists.txt index 42d6f7d6..c14d4c0e 100644 --- a/crlcore/src/ccore/CMakeLists.txt +++ b/crlcore/src/ccore/CMakeLists.txt @@ -29,16 +29,14 @@ ${CRLCORE_SOURCE_DIR}/src/ccore/liberty ${CRLCORE_SOURCE_DIR}/src/ccore/toolbox ${HURRICANE_INCLUDE_DIR} - ${CIF_INCLUDE_DIR} - ${CONFIGURATION_INCLUDE_DIR} - ${PYTHON_INCLUDE_PATH} + ${Python_INCLUDE_DIRS} ${Boost_INCLUDE_DIR} ${QtX_INCLUDE_DIR} ) add_definitions ( -DCORIOLIS_TOP="${CORIOLIS_TOP}" -DSYS_CONF_DIR="${SYS_CONF_DIR}" - -DPYTHON_SITE_PACKAGES="${PYTHON_SITE_PACKAGES}" + -DPYTHON_SITE_PACKAGES="${Python_CORIOLISLIB}" ) set ( includes crlcore/Utilities.h @@ -49,7 +47,6 @@ crlcore/GdsDriver.h crlcore/OAParser.h crlcore/OADriver.h - crlcore/CifDriver.h crlcore/SearchPath.h crlcore/Environment.h crlcore/Catalog.h @@ -64,8 +61,8 @@ crlcore/Blif.h crlcore/AcmSigda.h crlcore/Iccad04Lefdef.h - crlcore/Ispd04Bookshelf.h - crlcore/Ispd05Bookshelf.h +# crlcore/Ispd04Bookshelf.h +# crlcore/Ispd05Bookshelf.h crlcore/Ioc.h crlcore/VhdlBit.h crlcore/VhdlSignal.h @@ -92,7 +89,6 @@ COptions.cpp Histogram.cpp OAParserDriver.cpp - CifDriver.cpp SearchPath.cpp Environment.cpp Catalog.cpp @@ -119,8 +115,6 @@ set ( gds_cpps gds/GdsDriver.cpp gds/GdsParser.cpp ) - set ( cif_cpps cif/CifDriver.cpp - ) set ( toolbox_cpps toolbox/HyperNetPortOccurrences.cpp toolbox/ToolBox.cpp toolbox/UniqueCellOccurrences.cpp @@ -155,8 +149,8 @@ lefdef/LefDefExtension.cpp ) set ( iccad04_cpps iccad04/Iccad04Lefdef.cpp ) - set ( ispd04_cpps ispd04/Ispd04Bookshelf.cpp ) - set ( ispd05_cpps ispd05/Ispd05Bookshelf.cpp ) +# set ( ispd04_cpps ispd04/Ispd04Bookshelf.cpp ) +# set ( ispd05_cpps ispd05/Ispd05Bookshelf.cpp ) set ( blif_cpps blif/BlifParser.cpp ) if ( LEFDEF_FOUND ) include_directories ( ${LEFDEF_INCLUDE_DIR} ) @@ -302,14 +296,11 @@ ${openaccess_cpps} ) set_target_properties ( crlcore PROPERTIES VERSION 1.0 SOVERSION 1 ) - target_link_libraries ( crlcore ${HURRICANE_PYTHON_LIBRARIES} + target_link_libraries ( crlcore ${HURRICANE_PYTHON_NEW_LIBRARIES} + ${HURRICANE_PYTHON_LIBRARIES} ${HURRICANE_GRAPHICAL_LIBRARIES} ${HURRICANE_LIBRARIES} ${BOOKSHELF_LIBRARY} - ${CONFIGURATION_LIBRARY} - ${CIF_LIBRARY} - ${AGDS_LIBRARY} - ${UTILITIES_LIBRARY} ${LEFDEF_LIBRARIES} ${OA_LIBRARIES} ${QtX_LIBRARIES} diff --git a/crlcore/src/ccore/Histogram.cpp b/crlcore/src/ccore/Histogram.cpp index f71144ce..a0f60e71 100644 --- a/crlcore/src/ccore/Histogram.cpp +++ b/crlcore/src/ccore/Histogram.cpp @@ -1,7 +1,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) Sorbonne Universite 2008-2019, All Rights Reserved +// Copyright (c) Sorbonne Universite 2008-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -18,7 +18,7 @@ #include #include #include -#include "vlsisapd/utilities/Path.h" +#include "hurricane/utilities/Path.h" #include "crlcore/Histogram.h" diff --git a/crlcore/src/ccore/Utilities.cpp b/crlcore/src/ccore/Utilities.cpp index 473491ea..c9c5d74c 100644 --- a/crlcore/src/ccore/Utilities.cpp +++ b/crlcore/src/ccore/Utilities.cpp @@ -1,14 +1,14 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC 2008-2018, All Rights Reserved +// Copyright (c) Sorbonne Université 2008-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | // | Alliance / Hurricane Interface | // | | // | Author : Jean-Paul CHAPUT | -// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +// | E-mail : Jean-Paul.Chaput@lip6.fr | // | =============================================================== | // | C++ Module : "./Utilities.cpp" | // +-----------------------------------------------------------------+ @@ -23,8 +23,8 @@ #include namespace boptions = boost::program_options; -#include "vlsisapd/utilities/Path.h" -#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/utilities/Path.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/Backtrace.h" #include "hurricane/Warning.h" #include "hurricane/viewer/Script.h" diff --git a/crlcore/src/ccore/acmsigda/CMakeLists.txt b/crlcore/src/ccore/acmsigda/CMakeLists.txt new file mode 100644 index 00000000..e69de29b diff --git a/crlcore/src/ccore/alliance/vst/CMakeLists.txt b/crlcore/src/ccore/alliance/vst/CMakeLists.txt new file mode 100644 index 00000000..e69de29b diff --git a/crlcore/src/ccore/alliance/vst/VhdlBit.cpp b/crlcore/src/ccore/alliance/vst/VhdlBit.cpp index 9131d351..09b9e3ea 100644 --- a/crlcore/src/ccore/alliance/vst/VhdlBit.cpp +++ b/crlcore/src/ccore/alliance/vst/VhdlBit.cpp @@ -17,6 +17,7 @@ #include "crlcore/VhdlBit.h" #include "crlcore/VhdlSignal.h" +#include namespace Vhdl { diff --git a/crlcore/src/ccore/alliance/vst/VhdlEntity.cpp b/crlcore/src/ccore/alliance/vst/VhdlEntity.cpp index c949e50e..7f202229 100644 --- a/crlcore/src/ccore/alliance/vst/VhdlEntity.cpp +++ b/crlcore/src/ccore/alliance/vst/VhdlEntity.cpp @@ -187,24 +187,28 @@ namespace Vhdl { else if (rightpar + 1 != name.size()) error = "malformed net name, right parenthesis is *not* the last character"; else { - size_t endindex = 0; - int value = stoi( name.substr(leftpar+1), &endindex ); - - if (endindex != rightpar-leftpar-1) - error = "unable to convert index (not a number)"; - else if (value < 0) - error = "negative index"; - else { - stem = name.substr( 0, leftpar ); - index = (size_t)value; - return true; + try { + size_t endindex = 0; + int value = stoi( name.substr(leftpar+1), &endindex ); + + if (endindex != rightpar-leftpar-1) + error = "unable to convert index (not a number)"; + else if (value < 0) + error = "negative index"; + else { + stem = name.substr( 0, leftpar ); + index = (size_t)value; + return true; + } + } catch ( exception& e ) { + error = e.what(); } } } if (not error.empty()) { cerr << Warning( "Entity::parseVector() Net has not a valid VHDL name, %s.\n" - " %s\n" + " \"%s\"\n" , error.c_str() , getString(net->getName()).c_str() ) << endl; diff --git a/crlcore/src/ccore/blif/BlifParser.cpp b/crlcore/src/ccore/blif/BlifParser.cpp index 441f200e..df9e5cff 100644 --- a/crlcore/src/ccore/blif/BlifParser.cpp +++ b/crlcore/src/ccore/blif/BlifParser.cpp @@ -24,7 +24,7 @@ #include using namespace std; -#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/Warning.h" #include "hurricane/Plug.h" #include "hurricane/Net.h" diff --git a/crlcore/src/ccore/crlcore/Utilities.h b/crlcore/src/ccore/crlcore/Utilities.h index bc869f98..7a15d4b5 100644 --- a/crlcore/src/ccore/crlcore/Utilities.h +++ b/crlcore/src/ccore/crlcore/Utilities.h @@ -1,28 +1,26 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC 2008-2018, All Rights Reserved +// Copyright (c) Sorbonne Université 2008-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | // | Alliance / Hurricane Interface | // | | // | Author : Jean-Paul CHAPUT | -// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +// | E-mail : Jean-Paul.Chaput@lip6.fr | // | =============================================================== | // | C++ Header : "./crlcore/Utilities.h" | // +-----------------------------------------------------------------+ -#ifndef CRL_UTILITIES_H -#define CRL_UTILITIES_H - +#pragma once #include #include #include #include #include -#include "vlsisapd/utilities/Path.h" +#include "hurricane/utilities/Path.h" #include "hurricane/Commons.h" #include "hurricane/Error.h" #include "hurricane/Slot.h" @@ -464,6 +462,3 @@ class Dots { const std::string _left; const std::string _right; }; - - -#endif // CRL_UTILITIES diff --git a/crlcore/src/ccore/gds/GdsDriver.cpp b/crlcore/src/ccore/gds/GdsDriver.cpp index 93a20bb4..7c7434a3 100644 --- a/crlcore/src/ccore/gds/GdsDriver.cpp +++ b/crlcore/src/ccore/gds/GdsDriver.cpp @@ -1,7 +1,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC 2018-2018, All Rights Reserved +// Copyright (c) Sorbonne Université 2018-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -27,7 +27,7 @@ #include using namespace std; -#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/Warning.h" #include "hurricane/DataBase.h" #include "hurricane/BasicLayer.h" @@ -821,7 +821,7 @@ namespace { const BasicLayer* exportLayer = layer; if (NetExternalComponents::isExternal(component)) { string layerName = getString( layer->getName() ); - if (layerName.substr(layerName.size()-4) != ".pin") { + if ((layerName.size() > 4) and (layerName.substr(layerName.size()-4) != ".pin")) { exportLayer = tech->getBasicLayer( layerName+".pin" ); if (not exportLayer) exportLayer = layer; } diff --git a/crlcore/src/ccore/gds/GdsParser.cpp b/crlcore/src/ccore/gds/GdsParser.cpp index 9ea0a36f..8a7a9f3a 100644 --- a/crlcore/src/ccore/gds/GdsParser.cpp +++ b/crlcore/src/ccore/gds/GdsParser.cpp @@ -1,14 +1,14 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC 2018-2018, All Rights Reserved +// Copyright (c) Sorbonne Université 2018-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | // | G D S I I / Hurricane Interface | // | | // | Author : Jean-Paul CHAPUT | -// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +// | E-mail : Jean-Paul.Chaput@lip6.fr | // | =============================================================== | // | C++ Module : "./gds/GdsParser.cpp" | // +-----------------------------------------------------------------+ @@ -26,7 +26,7 @@ #include using namespace std; -#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/DebugSession.h" #include "hurricane/Warning.h" #include "hurricane/DataBase.h" diff --git a/crlcore/src/ccore/ioc/CMakeLists.txt b/crlcore/src/ccore/ioc/CMakeLists.txt new file mode 100644 index 00000000..e69de29b diff --git a/crlcore/src/ccore/lefdef/LefImport.cpp b/crlcore/src/ccore/lefdef/LefImport.cpp index 37cb35f4..74912ae8 100644 --- a/crlcore/src/ccore/lefdef/LefImport.cpp +++ b/crlcore/src/ccore/lefdef/LefImport.cpp @@ -22,7 +22,7 @@ #if defined(HAVE_LEFDEF) # include "lefrReader.hpp" #endif -#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/Error.h" #include "hurricane/Warning.h" #include "hurricane/DataBase.h" @@ -446,7 +446,7 @@ namespace { , parser->fromUnitsMicrons( r->yh ) ); } - //cerr << " | " << segment << endl; + cdebug_log(100,0) << "| " << segment << endl; } } diff --git a/crlcore/src/ccore/spice/SpiceBit.cpp b/crlcore/src/ccore/spice/SpiceBit.cpp index 128198dd..1529251a 100644 --- a/crlcore/src/ccore/spice/SpiceBit.cpp +++ b/crlcore/src/ccore/spice/SpiceBit.cpp @@ -16,6 +16,7 @@ #include "crlcore/SpiceBit.h" +#include namespace Spice { diff --git a/crlcore/src/ccore/spice/SpiceDriver.cpp b/crlcore/src/ccore/spice/SpiceDriver.cpp index c123a92c..ca9c27b3 100644 --- a/crlcore/src/ccore/spice/SpiceDriver.cpp +++ b/crlcore/src/ccore/spice/SpiceDriver.cpp @@ -28,7 +28,7 @@ #include using namespace std; -#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/Warning.h" #include "hurricane/DataBase.h" #include "hurricane/BasicLayer.h" diff --git a/crlcore/src/ccore/spice/SpiceParser.cpp b/crlcore/src/ccore/spice/SpiceParser.cpp index e82b8116..ccc0bd2f 100644 --- a/crlcore/src/ccore/spice/SpiceParser.cpp +++ b/crlcore/src/ccore/spice/SpiceParser.cpp @@ -26,7 +26,7 @@ #include using namespace std; -#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/DebugSession.h" #include "hurricane/UpdateSession.h" #include "hurricane/Warning.h" diff --git a/crlcore/src/ccore/toolbox/HyperNetPortOccurrences.cpp b/crlcore/src/ccore/toolbox/HyperNetPortOccurrences.cpp index a780d8e7..d420605d 100644 --- a/crlcore/src/ccore/toolbox/HyperNetPortOccurrences.cpp +++ b/crlcore/src/ccore/toolbox/HyperNetPortOccurrences.cpp @@ -515,7 +515,7 @@ Occurrence CHyperNetReceiverPortOccurrences::Locator::getElement() const { if (_pinLocator.isValid()) return _pinLocator.getElement(); - return _plugOccurrenceLocator.getElement(); + return _plugOccurrenceLocator.getElement(); } Locator* CHyperNetReceiverPortOccurrences::Locator::getClone() const diff --git a/crlcore/src/ccore/toolbox/ToolBox.cpp b/crlcore/src/ccore/toolbox/ToolBox.cpp index 50946850..865ddf2b 100644 --- a/crlcore/src/ccore/toolbox/ToolBox.cpp +++ b/crlcore/src/ccore/toolbox/ToolBox.cpp @@ -401,7 +401,7 @@ static void AttachContacts(Net* net) { if (contact->getBodyHook()->isAttached()) throw Error("Cannot create contacts ring: A bodyHook is attached"); - componentsToAttachList.push_back(contact); + componentsToAttachList.push_back(contact); end_for; } list::iterator lcit = componentsToAttachList.begin(); @@ -779,7 +779,7 @@ void ConnectPlugHooks(Cell* cell) try { _index = std::stoi( sindex ); } - catch ( std::invalid_argument e ) { + catch ( std::invalid_argument& e ) { cerr << Error( "SubNetNames::match(): std::stoi() catched an exception on \"%s\"." , sindex.c_str() ) << endl; } @@ -788,7 +788,7 @@ void ConnectPlugHooks(Cell* cell) if (code == REG_NOMATCH) { size_t pos = s.find( '(' ); if (pos != string::npos) { - cerr << Error( "SubNetNames::match(): Strange CHDL signal name \"%s\"." + cerr << Error( "SubNetNames::match(): Strange VHDL signal name \"%s\"." , s.c_str() ) << endl; } } else { diff --git a/crlcore/src/cyclop/CMakeLists.txt b/crlcore/src/cyclop/CMakeLists.txt index 0b1ca214..585dab8a 100644 --- a/crlcore/src/cyclop/CMakeLists.txt +++ b/crlcore/src/cyclop/CMakeLists.txt @@ -22,19 +22,16 @@ add_executable ( cyclop ${cpps} ${moccpps} ) target_link_libraries ( cyclop crlcore + ${HURRICANE_PYTHON_NEW_LIBRARIES} ${HURRICANE_PYTHON_LIBRARIES} ${HURRICANE_GRAPHICAL_LIBRARIES} ${HURRICANE_LIBRARIES} ${BOOKSHELF_LIBRARY} - ${AGDS_LIBRARY} - ${CIF_LIBRARY} - ${CONFIGURATION_LIBRARY} - ${UTILITIES_LIBRARY} ${LEFDEF_LIBRARIES} ${OA_LIBRARIES} ${QtX_LIBRARIES} ${Boost_LIBRARIES} - ${PYTHON_LIBRARIES} + ${Python_LIBRARIES} -lutil ${LIBXML2_LIBRARIES} ${LIBEXECINFO_LIBRARIES} diff --git a/crlcore/src/cyclop/CyclopMain.cpp b/crlcore/src/cyclop/CyclopMain.cpp index ec4bc657..2fa002f6 100644 --- a/crlcore/src/cyclop/CyclopMain.cpp +++ b/crlcore/src/cyclop/CyclopMain.cpp @@ -29,7 +29,7 @@ namespace boptions = boost::program_options; # include #endif -#include "vlsisapd/utilities/Path.h" +#include "hurricane/utilities/Path.h" #include "hurricane/DataBase.h" #include "hurricane/Technology.h" #include "hurricane/Layer.h" diff --git a/crlcore/src/pyCRL/CMakeLists.txt b/crlcore/src/pyCRL/CMakeLists.txt index a19f6adc..ca1585ee 100644 --- a/crlcore/src/pyCRL/CMakeLists.txt +++ b/crlcore/src/pyCRL/CMakeLists.txt @@ -17,7 +17,7 @@ ${HURRICANE_INCLUDE_DIR} ${CIF_INCLUDE_DIR} ${CONFIGURATION_INCLUDE_DIR} - ${PYTHON_INCLUDE_PATH} + ${Python_INCLUDE_DIRS} ${Boost_INCLUDE_DIR} ) @@ -43,7 +43,7 @@ PyToolEngineCollection.cpp PyGraphicToolEngine.cpp PyAcmSigda.cpp - PyIspd05.cpp + #PyIspd05.cpp PySpice.cpp PyBlif.cpp PyGds.cpp @@ -65,7 +65,7 @@ crlcore/PyToolEngineCollection.h crlcore/PyGraphicToolEngine.h crlcore/PyAcmSigda.h - crlcore/PyIspd05.h + #crlcore/PyIspd05.h crlcore/PySpice.h crlcore/PyBlif.h crlcore/PyGds.h diff --git a/crlcore/src/pyCRL/PyAllianceFramework.cpp b/crlcore/src/pyCRL/PyAllianceFramework.cpp index b017ecf7..f83cacee 100644 --- a/crlcore/src/pyCRL/PyAllianceFramework.cpp +++ b/crlcore/src/pyCRL/PyAllianceFramework.cpp @@ -77,7 +77,7 @@ extern "C" { HTRY PyObject* arg0; if (ParseOneArg("AllianceFramework.create()", args, INT_ARG, &arg0)) { - flags = PyInt_AsUnsignedLongMask(arg0); + flags = PyLong_AsUnsignedLongMask(arg0); } af = AllianceFramework::create( flags ); HCATCH @@ -230,6 +230,8 @@ extern "C" { if ( not ParseTwoArg ( "AllianceFramework.saveCell", args, CELL_INT_ARG, &arg0, &arg1) ) return NULL; + //if (PyAny_AsLong(arg1) & CRL::Catalog::State::Logical) + // cerr << "saveSell() " << PYCELL_O(arg0) << " Logical set" << endl; af->saveCell ( PYCELL_O(arg0),PyAny_AsLong(arg1) ); HCATCH diff --git a/crlcore/src/pyCRL/PyCRL.cpp b/crlcore/src/pyCRL/PyCRL.cpp index 889ce1ac..673f7676 100644 --- a/crlcore/src/pyCRL/PyCRL.cpp +++ b/crlcore/src/pyCRL/PyCRL.cpp @@ -31,7 +31,7 @@ #include "crlcore/PyToolEngine.h" #include "crlcore/PyToolEngineCollection.h" #include "crlcore/PyAcmSigda.h" -#include "crlcore/PyIspd05.h" +// #include "crlcore/PyIspd05.h" #include "crlcore/PySpice.h" #include "crlcore/PyBlif.h" #include "crlcore/PyGds.h" @@ -103,13 +103,28 @@ extern "C" { }; + static PyModuleDef PyCRL_ModuleDef = + { PyModuleDef_HEAD_INIT + , "CRL" /* m_name */ + , "Coriolis Core I/O framework" + /* m_doc */ + , -1 /* m_size */ + , PyCRL_Methods /* m_methods */ + , NULL /* m_reload */ + , NULL /* m_traverse */ + , NULL /* m_clear */ + , NULL /* m_free */ + }; + + // --------------------------------------------------------------- // Module Initialization : "initCRL ()" - DL_EXPORT(void) initCRL () { - cdebug_log(30,0) << "initCRL()" << endl; + PyMODINIT_FUNC PyInit_CRL ( void ) + { + cdebug_log(30,0) << "PyInit_CRL()" << endl; PySystem_LinkPyType (); PyBanner_LinkPyType (); @@ -125,7 +140,7 @@ extern "C" { PyToolEngine_LinkPyType (); PyToolEngineCollection_LinkPyType (); PyAcmSigda_LinkPyType (); - PyIspd05_LinkPyType (); + // PyIspd05_LinkPyType (); PySpice_LinkPyType (); PyBlif_LinkPyType (); PyGds_LinkPyType (); @@ -148,7 +163,7 @@ extern "C" { PYTYPE_READY ( ToolEngineCollection ); PYTYPE_READY ( ToolEngineCollectionLocator ); PYTYPE_READY ( AcmSigda ); - PYTYPE_READY ( Ispd05 ); + // PYTYPE_READY ( Ispd05 ); PYTYPE_READY ( Spice ); PYTYPE_READY ( Blif ); PYTYPE_READY ( Gds ); @@ -165,11 +180,11 @@ extern "C" { __cs.addType ( "alcCatalog" , &PyTypeCatalog , "" , false ); __cs.addType ( "alcCatStat" , &PyTypeCatalogState , "" , false ); - PyObject* module = Py_InitModule ( "CRL", PyCRL_Methods ); - if ( module == NULL ) { + PyObject* module = PyModule_Create( &PyCRL_ModuleDef ); + if (module == NULL) { cerr << "[ERROR]\n" << " Failed to initialize CRL module." << endl; - return; + return NULL; } Py_INCREF ( &PyTypeSystem ); @@ -202,8 +217,8 @@ extern "C" { PyModule_AddObject ( module, "ToolEngineCollectionLocator", (PyObject*)&PyTypeToolEngineCollectionLocator ); Py_INCREF ( &PyTypeAcmSigda ); PyModule_AddObject ( module, "AcmSigda", (PyObject*)&PyTypeAcmSigda ); - Py_INCREF ( &PyTypeIspd05 ); - PyModule_AddObject ( module, "Ispd05", (PyObject*)&PyTypeIspd05 ); + // Py_INCREF ( &PyTypeIspd05 ); + // PyModule_AddObject ( module, "Ispd05", (PyObject*)&PyTypeIspd05 ); Py_INCREF ( &PyTypeSpice ); PyModule_AddObject ( module, "Spice", (PyObject*)&PyTypeSpice ); Py_INCREF ( &PyTypeBlif ); @@ -226,6 +241,7 @@ extern "C" { //DbULoadConstants ( dictionnary ); cdebug_log(30,0) << "CRL.so loaded " << (void*)&typeid(string) << endl; + return module; } diff --git a/crlcore/src/pyCRL/PyCatalogState.cpp b/crlcore/src/pyCRL/PyCatalogState.cpp index be338d55..d73b4de2 100644 --- a/crlcore/src/pyCRL/PyCatalogState.cpp +++ b/crlcore/src/pyCRL/PyCatalogState.cpp @@ -147,12 +147,12 @@ extern "C" { extern void PyCatalogState_LinkPyType() { cdebug_log(30,0) << "PyCatalogState_LinkType()" << endl; - PyTypeCatalogState.tp_dealloc = (destructor) PyCatalogState_DeAlloc; - PyTypeCatalogState.tp_compare = (cmpfunc) PyCatalogState_Cmp; - PyTypeCatalogState.tp_repr = (reprfunc) PyCatalogState_Repr; - PyTypeCatalogState.tp_str = (reprfunc) PyCatalogState_Str; - PyTypeCatalogState.tp_hash = (hashfunc) PyCatalogState_Hash; - PyTypeCatalogState.tp_methods = PyCatalogState_Methods; + PyTypeCatalogState.tp_dealloc = (destructor) PyCatalogState_DeAlloc; + PyTypeCatalogState.tp_richcompare = (richcmpfunc)PyCatalogState_Cmp; + PyTypeCatalogState.tp_repr = (reprfunc) PyCatalogState_Repr; + PyTypeCatalogState.tp_str = (reprfunc) PyCatalogState_Str; + PyTypeCatalogState.tp_hash = (hashfunc) PyCatalogState_Hash; + PyTypeCatalogState.tp_methods = PyCatalogState_Methods; } diff --git a/crlcore/src/pyCRL/PyConstant.cpp b/crlcore/src/pyCRL/PyConstant.cpp index a6559536..100eb450 100644 --- a/crlcore/src/pyCRL/PyConstant.cpp +++ b/crlcore/src/pyCRL/PyConstant.cpp @@ -74,20 +74,36 @@ extern "C" { }; - DL_EXPORT(void) initConstant () { - cdebug_log(30,0) << "initConstant()" << endl; + static PyModuleDef PyConstant_ModuleDef = + { PyModuleDef_HEAD_INIT + , "Constant" /* m_name */ + , "Constants values used througout Coriolis." + /* m_doc */ + , -1 /* m_size */ + , PyConstant_Methods /* m_methods */ + , NULL /* m_reload */ + , NULL /* m_traverse */ + , NULL /* m_clear */ + , NULL /* m_free */ + }; - PyObject* module = Py_InitModule( "Constant", PyConstant_Methods ); + + PyMODINIT_FUNC PyInit_Constant ( void ) + { + cdebug_log(30,0) << "PyInit_Constant()" << endl; + + PyObject* module = PyModule_Create( &PyConstant_ModuleDef ); if (module == NULL) { cerr << "[ERROR]\n" << " Failed to initialize Constant module." << endl; - return; + return NULL; } PyObject* dictionnary = PyModule_GetDict( module ); LoadConstants( dictionnary ); cdebug_log(30,0) << "Constant.so loaded " << (void*)&typeid(string) << endl; + return module; } diff --git a/crlcore/src/pyCRL/PyRoutingGauge.cpp b/crlcore/src/pyCRL/PyRoutingGauge.cpp index b31b5d8f..5ccd1ad9 100644 --- a/crlcore/src/pyCRL/PyRoutingGauge.cpp +++ b/crlcore/src/pyCRL/PyRoutingGauge.cpp @@ -544,6 +544,8 @@ extern "C" { , "Return the default wire width of the given layer." } , { "getViaWidth" , (PyCFunction)PyRoutingGauge_getViaWidth , METH_VARARGS , "Return the default via width of the given layer." } + , { "getPWireWidth" , (PyCFunction)PyRoutingGauge_getPWireWidth , METH_VARARGS + , "Return the default perpandicular wire width of the given layer." } , { "getPowerSupplyGauge" , (PyCFunction)PyRoutingGauge_getPowerSupplyGauge, METH_NOARGS , "Return the power supply gauge (None if there isn't)." } , { "getLayerGauge" , (PyCFunction)PyRoutingGauge_getLayerGauge , METH_VARARGS diff --git a/crlcore/src/x2y/CMakeLists.txt b/crlcore/src/x2y/CMakeLists.txt index 7f48b108..dd997f0b 100644 --- a/crlcore/src/x2y/CMakeLists.txt +++ b/crlcore/src/x2y/CMakeLists.txt @@ -13,6 +13,7 @@ add_executable ( cx2y ${cpps} ) target_link_libraries ( cx2y crlcore ${UTILITIES_LIBRARY} + ${Python_LIBRARIES} ${LIBEXECINFO_LIBRARIES} ${LIBBFD_LIBRARIES} ) diff --git a/cumulus/CMakeLists.txt b/cumulus/CMakeLists.txt index d2e192d7..88663684 100644 --- a/cumulus/CMakeLists.txt +++ b/cumulus/CMakeLists.txt @@ -3,9 +3,10 @@ set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(CUMULUS) - cmake_minimum_required(VERSION 2.4.0) + cmake_minimum_required(VERSION 2.8.0) set(ignoreVariables "${BUILD_DOC}" "${CMAKE_INSTALL_DIR}") + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) @@ -14,9 +15,8 @@ set_cmake_policies() setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") - find_package(PythonLibs 2 REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) - find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/cumulus/src/Alliance.py b/cumulus/src/Alliance.py index 100444c5..6b0c2b76 100644 --- a/cumulus/src/Alliance.py +++ b/cumulus/src/Alliance.py @@ -360,7 +360,7 @@ def staticInitialization (): try: print ' o Running configuration hook: Alliance.staticInitialization().' print ' - Loading \"%s\".' % helpers.truncPath(confFile) - execfile( confFile, moduleGlobals ) + exec( open(confFile).read() ) #, moduleGlobals ) except Exception, e: print '[ERROR] An exception occured while loading the configuration file:' print ' <%s>\n' % (confFile) diff --git a/cumulus/src/CMakeLists.txt b/cumulus/src/CMakeLists.txt index ffef310b..8e585130 100644 --- a/cumulus/src/CMakeLists.txt +++ b/cumulus/src/CMakeLists.txt @@ -80,14 +80,14 @@ ${CMAKE_CURRENT_SOURCE_DIR}/plugins/alpha/macro/macro.py ) - install ( FILES ${pySources} DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus ) - install ( FILES ${pyPlugins} DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins ) - install ( FILES ${pyPluginCTS} DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/cts ) - install ( FILES ${pyPluginC2C} DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/core2chip ) - install ( FILES ${pyPluginChip} DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/chip ) - install ( FILES ${pyPluginAlpha} DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/alpha ) - install ( FILES ${pyPluginAlphaBlock} DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/alpha/block ) - install ( FILES ${pyPluginAlphaC2C} DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/alpha/core2chip ) - install ( FILES ${pyPluginAlphaChip} DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/alpha/chip ) - install ( FILES ${pyPluginAlphaMacro} DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/alpha/macro ) + install ( FILES ${pySources} DESTINATION ${Python_CORIOLISLIB}/cumulus ) + install ( FILES ${pyPlugins} DESTINATION ${Python_CORIOLISLIB}/cumulus/plugins ) + install ( FILES ${pyPluginCTS} DESTINATION ${Python_CORIOLISLIB}/cumulus/plugins/cts ) + install ( FILES ${pyPluginC2C} DESTINATION ${Python_CORIOLISLIB}/cumulus/plugins/core2chip ) + install ( FILES ${pyPluginChip} DESTINATION ${Python_CORIOLISLIB}/cumulus/plugins/chip ) + install ( FILES ${pyPluginAlpha} DESTINATION ${Python_CORIOLISLIB}/cumulus/plugins/alpha ) + install ( FILES ${pyPluginAlphaBlock} DESTINATION ${Python_CORIOLISLIB}/cumulus/plugins/alpha/block ) + install ( FILES ${pyPluginAlphaC2C} DESTINATION ${Python_CORIOLISLIB}/cumulus/plugins/alpha/core2chip ) + install ( FILES ${pyPluginAlphaChip} DESTINATION ${Python_CORIOLISLIB}/cumulus/plugins/alpha/chip ) + install ( FILES ${pyPluginAlphaMacro} DESTINATION ${Python_CORIOLISLIB}/cumulus/plugins/alpha/macro ) install ( PROGRAMS ${pyTools} DESTINATION bin ) diff --git a/cumulus/src/placeandroute.py b/cumulus/src/placeandroute.py index 0a6c0beb..94b0cf58 100644 --- a/cumulus/src/placeandroute.py +++ b/cumulus/src/placeandroute.py @@ -186,7 +186,7 @@ def pyAlimVerticalRail ( cell, xcoord ) : # Check the value of x nb_col = cell.getAbutmentBox().getWidth() / DbU_lambda(PITCH) if ( xcoord >= nb_col ) or ( xcoord < 0 ) : - print 'This is it' + print( 'This is it' ) message = "AlimVerticalRail : Illegal argument x , x must be between %d and %d\n" % ( 0, nb_col ) raise ErrorMessage(2,message) @@ -926,7 +926,7 @@ def pyPowerRing ( cell, core, n ) : topRoutingLayer = db.getTechnology().getLayer( topRoutingLayerName ) allowedDepth = CRL.AllianceFramework.get().getRoutingGauge().getLayerDepth( topRoutingLayer ) - print 'topRoutingLayer: <%s> depth:%d' % (topRoutingLayer.getName(), allowedDepth) + print( 'topRoutingLayer: <%s> depth:%d' % (topRoutingLayer.getName(), allowedDepth) ) UpdateSession.open() @@ -1576,7 +1576,7 @@ def pyPowerRing ( cell, core, n ) : # end of while # end of while - #print "\n\n\n\npoints_0 : ", points_0 , "\n\npoints_1 : " ,points_1 , "\n\npoints_2 : " ,points_2 , "\n\npoints_3 : " , points_3 , "\n\n\n\n" + #print( "\n\n\n\npoints_0 : ", points_0 , "\n\npoints_1 : " ,points_1 , "\n\npoints_2 : " ,points_2 , "\n\npoints_3 : " , points_3 , "\n\n\n\n" ) # Placer au cote du nord for ins_pad in pad_north : @@ -1976,16 +1976,16 @@ def isExternalClockPad ( ins ) : def affichePad ( cell ) : global pad_north, pad_south, pad_east, pad_west - print "Pads in the north are :" + print( "Pads in the north are :" ) for pad in pad_north : print cell.getInstance ( pad.getName() ).getMasterCell().getName() - print "Pads in the south are :" + print( "Pads in the south are :" ) for pad in pad_south : print cell.getInstance ( pad.getName() ).getMasterCell().getName() - print "Pads in the east are :" + print( "Pads in the east are :" ) for pad in pad_east : print cell.getInstance ( pad.getName() ).getMasterCell().getName() - print "Pads in the west are :" + print( "Pads in the west are :" ) for pad in pad_west : print cell.getInstance ( pad.getName() ).getMasterCell().getName() ############ diff --git a/cumulus/src/plugins/__init__.py b/cumulus/src/plugins/__init__.py index 082fd1a5..42bd0d8d 100644 --- a/cumulus/src/plugins/__init__.py +++ b/cumulus/src/plugins/__init__.py @@ -1,7 +1,6 @@ -# -*- explicit-buffer-name: "__init__.py" -*- -# + # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2014-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -16,6 +15,7 @@ import os import sys +import traceback import Cfg import helpers from helpers.io import vprint @@ -30,26 +30,22 @@ import CRL from CRL import RoutingLayerGauge -NoFlags = 0000 -ShowWarnings = 0001 -WarningsAreErrors = 0002 +NoFlags = 0 +ShowWarnings = 1 +WarningsAreErrors = 2 loaded = False - -def kwParseMain ( **kw ): +def kwParseMain ( **kw ): cell = None - if kw.has_key('cell') and kw['cell']: + if ('cell' in kw) and kw['cell']: cell = kw['cell'] - editor = None - if kw.has_key('editor') and kw['editor']: + if ('editor' in kw) and kw['editor']: editor = kw['editor'] if cell == None: cell = editor.getCell() - #if cell == None: # raise ErrorMessage( 3, 'Chip: No cell loaded yet.' ) - return cell, editor @@ -66,8 +62,7 @@ def kwUnicornHook ( menuPath, menuName, menuTip, moduleFile, **kw ): editor = kw['editor'] if moduleFile.endswith('.pyc') or moduleFile.endswith('.pyo'): moduleFile = moduleFile[:-1] - - if kw.has_key('beforeAction'): + if 'beforeAction' in kw: editor.addToMenu( menuPath, menuName, menuTip, moduleFile, kw['beforeAction'] ) else: editor.addToMenu( menuPath, menuName, menuTip, moduleFile ) @@ -110,7 +105,7 @@ class CheckUnplaced ( object ): error = ErrorMessage( 3, message ) if self.flags & WarningsAreErrors: raise error - else: print error + else: print( error ) return self.unplaceds @@ -137,7 +132,7 @@ class StackedVia ( object ): def mergeDepth ( self, depth ): if self._hasLayout: - print WarningMessage( 'StackedVia.mergeDepth(): Cannot be called *after* StackVia.doLayout()' ) + print( WarningMessage( 'StackedVia.mergeDepth(): Cannot be called *after* StackVia.doLayout()' )) return if depth < self._bottomDepth: self._bottomDepth = depth if depth > self._topDepth: self._topDepth = depth @@ -187,17 +182,32 @@ class StackedVia ( object ): , 0 , 0 , self._width, self._height ) ) - #print ' Sub-via: ', self._vias[-1] + #print( ' Sub-via: ', self._vias[-1] ) return def loadPlugins ( pluginsDir ): + """ + Forced import of all the modules that resides in the directory ``pluginsDir``. + Works in three stages: + + 1. Build a list of all the ``.py`` files in the ``pluginsDir``, in case of + directories, import the whole package (it is assumed it *is* a Python + package directory). + + 2. Sort the list of modules to be loaded (alphabetical order). + This is an attempt to get the initialization done in deterministic order. + + 3. Import each module in order. + + .. note:: Those modules will be searched later (in ``unicornInit.py``) for any + potential ``unicornHook()`` function. + """ sys.path.append( pluginsDir ) sys.modules['plugins'].__path__.append( pluginsDir ) - if not os.path.isdir(pluginsDir): - print ErrorMessage( 3, 'cumulus.__init__.py: Cannot find directory:' \ - , '<%s>' % pluginsDir ) + print( ErrorMessage( 3, 'cumulus.__init__.py: Cannot find directory:' \ + , '"{}"'.format(pluginsDir) )) return moduleNames = [] @@ -207,26 +217,24 @@ def loadPlugins ( pluginsDir ): path = os.path.join(pluginsDir,entry) if os.path.isdir(path): packageName = "plugins." + entry - if not sys.modules.has_key(packageName): + if not packageName in sys.modules: module = __import__( packageName, globals(), locals() ) else: module = sys.modules[packageName] - module.__path__.append( path ) continue moduleNames.append( entry[:-3] ) moduleNames.sort() - for moduleName in moduleNames: try: - vprint( 2, ' - "%s"' % moduleName ) + vprint( 2, ' - "{}"'.format(moduleName) ) module = __import__( moduleName, globals(), locals() ) - except ErrorMessage, e: - print e + except ErrorMessage as e: + print( e ) helpers.showStackTrace( e.trace ) - except Exception, e: - print e + except Exception as e: + print( e ) helpers.showPythonTrace( __file__, e ) return @@ -235,7 +243,6 @@ def loadPlugins ( pluginsDir ): def staticInitialization (): global loaded if loaded: return - try: vprint( 1, ' o Preload standard plugins.' ) pluginsDir = os.path.dirname(__file__) @@ -243,13 +250,14 @@ def staticInitialization (): if helpers.ndaTopDir: vprint( 1, ' o Preload NDA protected plugins.' ) - pluginsDir = os.path.join( helpers.ndaTopDir, 'python2.7/site-packages/cumulus/plugins' ) + pluginsDir = os.path.join( helpers.ndaTopDir, 'python{}.{}/site-packages/cumulus/plugins' \ + .format( sys.version_info.major + , sys.version_info.minor )) loadPlugins( pluginsDir ) else: vprint( 1, ' o No NDA protected plugins.' ) - except Exception, e: + except Exception as e: helpers.showPythonTrace( __file__, e ) - loaded = True return diff --git a/cumulus/src/plugins/aboutwindow.py b/cumulus/src/plugins/aboutwindow.py index b64e3670..cf44f450 100644 --- a/cumulus/src/plugins/aboutwindow.py +++ b/cumulus/src/plugins/aboutwindow.py @@ -1,7 +1,6 @@ -#!/usr/bin/env python -# + # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2014-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -14,7 +13,6 @@ # +-----------------------------------------------------------------+ - try: import sys import traceback @@ -48,14 +46,14 @@ try: from PyQt5.QtGui import QKeySequence from PyQt5.QtWidgets import QApplication except: - print '[ERROR] AboutWindow: Neither PyQt4 nor PyQt5 is available.' + print( '[ERROR] AboutWindow: Neither PyQt4 nor PyQt5 is available.' ) sys.exit( 1 ) import Viewer import helpers from helpers.io import ErrorMessage from helpers.io import WarningMessage import plugins -except Exception, e: +except Exception as e: helpers.io.catch( e ) sys.exit(2) @@ -154,16 +152,12 @@ def scriptMain ( **kw ): rvalue = True try: #helpers.setTraceLevel( 550 ) - aboutWidget = AboutWidget() answer = aboutWidget.exec_() - print 'answer:', answer + print( 'answer:', answer ) if not answer: return True - - except Exception, e: + except Exception as e: helpers.io.catch( e ) - sys.stdout.flush() sys.stderr.flush() - return rvalue diff --git a/cumulus/src/plugins/alpha/block/bigvia.py b/cumulus/src/plugins/alpha/block/bigvia.py index 6a47b8b9..da479f71 100644 --- a/cumulus/src/plugins/alpha/block/bigvia.py +++ b/cumulus/src/plugins/alpha/block/bigvia.py @@ -1,6 +1,6 @@ -# + # This file is part of the Coriolis Software. -# Copyright (c) SU 2020-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -13,7 +13,6 @@ # +-----------------------------------------------------------------+ -from __future__ import print_function import sys import os.path import Cfg @@ -182,11 +181,11 @@ class BigVia ( object ): trace( 550, '\t| botEnclosure[{}]: {}\n'.format(depth,DbU.getValueString(botEnclosure)) ) trace( 550, '\t| enclosure [{}]: {}\n'.format(depth,DbU.getValueString(enclosure)) ) cutArea = self.plates[ depth ].getBoundingBox() - hEnclosure = enclosure + cutSide/2 + hEnclosure = enclosure + cutSide//2 vEnclosure = hEnclosure if hEnclosure*2 > cutArea.getWidth(): if self.flags & BigVia.AllowHorizontalExpand: - hEnclosure = cutArea.getWidth()/2 + hEnclosure = cutArea.getWidth()//2 else: raise ErrorMessage( 1, [ 'BigVia._doCutMatrix(): Cannot create cut of {} in {}.' \ .format( cutLayer.getName(), self ) @@ -194,15 +193,15 @@ class BigVia ( object ): ] ) if vEnclosure*2 > cutArea.getHeight(): if self.flags & BigVia.AllowVerticalExpand: - vEnclosure = cutArea.getHeight()/2 + vEnclosure = cutArea.getHeight()//2 else: raise ErrorMessage( 1, [ 'BigVia._doCutMatrix(): Cannot create cut of {} in {}.' \ .format( cutLayer.getName(), self ) , 'Height is too small to fit a single VIA cut.' ] ) cutArea.inflate( -hEnclosure, -vEnclosure ) - xoffset = (cutArea.getWidth () % (cutSide+cutSpacing)) / 2 - yoffset = (cutArea.getHeight() % (cutSide+cutSpacing)) / 2 + xoffset = (cutArea.getWidth () % (cutSide+cutSpacing)) // 2 + yoffset = (cutArea.getHeight() % (cutSide+cutSpacing)) // 2 cutArea.translate( xoffset, yoffset ) self.vias[ depth ] = [] y = cutArea.getYMin() diff --git a/cumulus/src/plugins/alpha/block/block.py b/cumulus/src/plugins/alpha/block/block.py index e7c13cb6..5f099bc2 100644 --- a/cumulus/src/plugins/alpha/block/block.py +++ b/cumulus/src/plugins/alpha/block/block.py @@ -1,6 +1,6 @@ # # This file is part of the Coriolis Software. -# Copyright (c) SU 2020-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -13,7 +13,6 @@ # +-----------------------------------------------------------------+ -from __future__ import print_function import sys import os.path from copy import deepcopy @@ -122,12 +121,12 @@ class Side ( object ): if flags & IoPin.A_BEGIN: self.ubegin += ustep pinOffset = self.ubegin - if not self.pins.has_key(self.ubegin): + if not self.ubegin in self.pins: break else: self.uend -= ustep pinOffset = self.uend - if not self.pins.has_key(self.uend): + if not self.uend in self.pins: break else: pinOffset = upos @@ -148,7 +147,7 @@ class Side ( object ): upos = pin.getY() else: upos = pin.getX() - if not self.pins.has_key(upos): + if not upos in self.pins: self.pins[upos] = [ pin ] else: self.pins[upos].append( pin ) @@ -194,7 +193,7 @@ class Side ( object ): , pinPos.getX() , pinPos.getY() , gauge.getWireWidth() - , gauge.getWireWidth() / 2 + , gauge.getWireWidth() # // 2 ) NetExternalComponents.setExternal( pin ) self.append( pin ) @@ -227,7 +226,7 @@ class Side ( object ): , gauge.getLayer() , pinPos.getX() , pinPos.getY() - , gauge.getWireWidth() / 2 + , gauge.getWireWidth() // 2 , gauge.getWireWidth() ) NetExternalComponents.setExternal( pin ) @@ -291,7 +290,7 @@ class Block ( object ): @staticmethod def lookup ( cell ): - if Block.LUT.has_key(cell): return Block.LUT[cell] + if cell in Block.LUT: return Block.LUT[cell] return None def __init__ ( self, conf ): @@ -827,6 +826,7 @@ class Block ( object ): iteration += 1 if iteration > 0: break self.setupAb() + if editor: editor.fit() if not self.conf.isCoreBlock: self.placeIoPins() self.checkIoPins() @@ -834,8 +834,9 @@ class Block ( object ): #if self.conf.useHFNS: self.findHfnTrees4() self.initEtesian() self.addHTrees() + sys.stdout.flush() + sys.stderr.flush() #if self.conf.useHFNS: self.addHfnBuffers() - #if editor: editor.fit() #Breakpoint.stop( 0, 'Clock tree(s) done.' ) self.place() #if self.conf.useHFNS: self.findHfnTrees() diff --git a/cumulus/src/plugins/alpha/block/configuration.py b/cumulus/src/plugins/alpha/block/configuration.py index 27bb23f2..006b07f3 100644 --- a/cumulus/src/plugins/alpha/block/configuration.py +++ b/cumulus/src/plugins/alpha/block/configuration.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) SU 2020-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -12,7 +12,6 @@ # | Python : "./plugins/block/configuration.py" | # +-----------------------------------------------------------------+ -from __future__ import print_function import sys import re import os.path @@ -288,7 +287,7 @@ class GaugeConf ( object ): trace( 550, ',+', '\tGaugeConf.rpAccess() {}\n'.format(rp) ) startDepth = self.routingGauge.getLayerDepth( rp.getOccurrence().getEntity().getLayer() ) trace( 550, '\tlayer:{} startDepth:{}\n'.format(rp.getOccurrence().getEntity().getLayer(),startDepth) ) - if self._rpToAccess.has_key(rp): + if rp in self._rpToAccess: trace( 550, '-' ) return self._rpToAccess[rp] if flags & GaugeConf.DeepDepth: @@ -302,7 +301,7 @@ class GaugeConf ( object ): #hoffset = self._routingGauge.getLayerGauge(hdepth).getOffset() #contact1 = Contact.create( rp, self._routingGauge.getContactLayer(0), 0, 0 ) #midSliceY = contact1.getY() - (contact1.getY() % self._cellGauge.getSliceHeight()) \ - # + self._cellGauge.getSliceHeight() / 2 + # + self._cellGauge.getSliceHeight() // 2 #midTrackY = midSliceY - ((midSliceY - hoffset) % hpitch) #dy = midSliceY - contact1.getY() # @@ -377,7 +376,7 @@ class GaugeConf ( object ): def rpByOccurrence ( self, occurrence, net ): plug = occurrence.getEntity() - if self._plugToRp.has_key(plug): + if plug in self._plugToRp: rp = self._plugToRp[plug] else: rp = RoutingPad.create( net, occurrence, RoutingPad.BiggestArea ) @@ -386,7 +385,7 @@ class GaugeConf ( object ): def rpAccessByOccurrence ( self, occurrence, net, flags ): plug = occurrence.getEntity() - if self._plugToRp.has_key(plug): + if plug in self._plugToRp: rp = self._plugToRp[plug] else: rp = RoutingPad.create( net, occurrence, RoutingPad.BiggestArea ) @@ -394,7 +393,7 @@ class GaugeConf ( object ): return self.rpAccess( self.rpByOccurrence(occurrence,net), flags ) def rpByPlug ( self, plug, net ): - if self._plugToRp.has_key(plug): + if plug in self._plugToRp: rp = self._plugToRp[plug] else: occurrence = Occurrence( plug, Path(net.getCell(),'') ) @@ -477,11 +476,13 @@ class GaugeConf ( object ): , DbU.UnitPowerMicro ) minLength = toFoundryGrid( minLength, DbU.SnapModeSuperior ); if isinstance(segment,Horizontal): + trace( 550, '\tminLength={}\n'.format(DbU.getValueString(minLength)) ) uMin = segment.getSource().getX() uMax = segment.getTarget().getX() segLength = abs( uMax - uMin ) if segLength < minLength: - extension = toFoundryGrid( (minLength - segLength)/2, DbU.SnapModeSuperior ) + trace( 550, '\texpand\n' ) + extension = toFoundryGrid( (minLength - segLength)//2, DbU.SnapModeSuperior ) if uMin > uMax: extension = - extension segment.setDxSource( -extension ) @@ -491,7 +492,7 @@ class GaugeConf ( object ): uMax = segment.getTarget().getY() segLength = abs( uMax - uMin ) if segLength < minLength: - extension = toFoundryGrid( (minLength - segLength)/2, DbU.SnapModeSuperior ) + extension = toFoundryGrid( (minLength - segLength)//2, DbU.SnapModeSuperior ) if uMin > uMax: extension = - extension segment.setDySource( -extension ) @@ -1033,7 +1034,7 @@ class IoPin ( object ): # , pinPos.getX() # , pinPos.getY() # , gauge.getWireWidth() -# , gauge.getWireWidth() / 2 +# , gauge.getWireWidth() // 2 # ) # NetExternalComponents.setExternal( pin ) # side.append( self.flags, pin ) @@ -1061,7 +1062,7 @@ class IoPin ( object ): # , gauge.getLayer() # , pinPos.getX() # , pinPos.getY() -# , gauge.getWireWidth() / 2 +# , gauge.getWireWidth() // 2 # , gauge.getWireWidth() # ) # NetExternalComponents.setExternal( pin ) @@ -1200,12 +1201,12 @@ class BlockConf ( GaugeConf ): self.deltaAb = [ dx1, dy1, dx2, dy2 ] def incIoPinsCounts ( self, net ): - if not self.ioPinsCounts.has_key(net): + if not net in self.ioPinsCounts: self.ioPinsCounts[net] = 0 self.ioPinsCounts[net] += 1 def getIoPinsCounts ( self, net ): - if not self.ioPinsCounts.has_key(net): return 0 + if not net in self.ioPinsCounts: return 0 return self.ioPinsCounts[net] def resetBufferCount ( self ): diff --git a/cumulus/src/plugins/alpha/block/hfns1.py b/cumulus/src/plugins/alpha/block/hfns1.py index b0618ad0..c60ebf8e 100644 --- a/cumulus/src/plugins/alpha/block/hfns1.py +++ b/cumulus/src/plugins/alpha/block/hfns1.py @@ -1,6 +1,6 @@ -# + # This file is part of the Coriolis Software. -# Copyright (c) SU 2020-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -16,7 +16,6 @@ Manage High Fanout Net Synthesis (HFNS). """ -from __future__ import print_function import sys import os.path import re @@ -121,11 +120,11 @@ class SlicedArea ( object ): transf = instance.getTransformation() occurrence.getPath().getTransformation().applyOn( transf ) transf.applyOn( ab ) - y = (ab.getYMin() - cellAb.getYMin()) / sliceHeight + y = (ab.getYMin() - cellAb.getYMin()) // sliceHeight if (ab.getYMin() - cellAb.getYMin()) % sliceHeight: print( ErrorMessage( 1, 'SlicedArea.__init__(): Misaligned {}.'.format(occurrence) )) continue - if not self.rows.has_key(y): + if not y in self.rows: self.rows[y] = [] row = self.rows[ y ] row.append( (occurrence,ab) ) @@ -584,7 +583,7 @@ class BufferTree ( object ): maxWL = timing.tech.getWlEstimate( self.bufName, clusterA.size+clusterB.size ) area = Box( clusterA.area ) area.merge( clusterB.area ) - hpWL = (area.getWidth() + area.getHeight()) / 2 + hpWL = (area.getWidth() + area.getHeight()) // 2 if hpWL >= maxWL: return True trace( 550, '\t> Reject merge: hpWL >= maxWL ({} >= {}).\n' \ @@ -596,7 +595,7 @@ class BufferTree ( object ): return False area = Box( clusterA.area ) area.merge( clusterB.area ) - hpwl = (area.getWidth() + area.getHeight()) / 2 + hpwl = (area.getWidth() + area.getHeight()) // 2 if hpwl > 2*self.edgeLimit: trace( 550, '\t> Reject merge, over HPWL threshold of 2*{}.\n' \ .format(DbU.getValueString(self.edgeLimit))) diff --git a/cumulus/src/plugins/alpha/block/hfns2.py b/cumulus/src/plugins/alpha/block/hfns2.py index 97db35d3..c369aecb 100644 --- a/cumulus/src/plugins/alpha/block/hfns2.py +++ b/cumulus/src/plugins/alpha/block/hfns2.py @@ -1,6 +1,6 @@ -# + # This file is part of the Coriolis Software. -# Copyright (c) SU 2020-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -16,7 +16,6 @@ Manage High Fanout Net Synthesis (HFNS). """ -from __future__ import print_function import sys import os.path import re diff --git a/cumulus/src/plugins/alpha/block/hfns3.py b/cumulus/src/plugins/alpha/block/hfns3.py index 10ba4a06..28c7d5bc 100644 --- a/cumulus/src/plugins/alpha/block/hfns3.py +++ b/cumulus/src/plugins/alpha/block/hfns3.py @@ -1,6 +1,6 @@ -# + # This file is part of the Coriolis Software. -# Copyright (c) SU 2020-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -16,7 +16,6 @@ Manage High Fanout Net Synthesis (HFNS). """ -from __future__ import print_function import sys import os.path import re @@ -328,14 +327,14 @@ class Cluster ( object ): graph.addNode( self , driverCenter.getX() , self.bufferTree.spares.toYGCellGrid(driverCenter.getY()) - + self.bufferTree.spares.conf.sliceHeight / 2 + + self.bufferTree.spares.conf.sliceHeight // 2 , rsmt.Node.Driver ) for anchor in self.mergedAnchors: sinkCenter = anchor.bInputRp.getPosition() graph.addNode( anchor , sinkCenter.getX() , self.bufferTree.spares.toYGCellGrid(sinkCenter.getY()) - + self.bufferTree.spares.conf.sliceHeight / 2 ) + + self.bufferTree.spares.conf.sliceHeight // 2 ) #graph.doIteratedOneSteiner() graph.doFlute() graph.createGRSegments() @@ -479,7 +478,7 @@ class BufferTree ( object ): maxWL = timing.tech.getWlEstimate( self.bufName, clusterA.size+clusterB.size ) area = Box( clusterA.area ) area.merge( clusterB.area ) - hpWL = (area.getWidth() + area.getHeight()) / 2 + hpWL = (area.getWidth() + area.getHeight()) // 2 trace( 550, '\t> BufferTree.canMerge(): estimatedWL >= maxWL ({} >= {}).\n' \ .format(DbU.getValueString(estimatedWL),DbU.getValueString(maxWL)) ) if estimatedWL >= maxWL: @@ -493,7 +492,7 @@ class BufferTree ( object ): return False area = Box( clusterA.area ) area.merge( clusterB.area ) - hpwl = (area.getWidth() + area.getHeight()) / 2 + hpwl = (area.getWidth() + area.getHeight()) // 2 if hpwl > 2*self.edgeLimit: trace( 550, '\t> Reject merge, over HPWL threshold of 2*{}.\n' \ .format(DbU.getValueString(self.edgeLimit))) diff --git a/cumulus/src/plugins/alpha/block/hfns4.py b/cumulus/src/plugins/alpha/block/hfns4.py index fbffc5b8..3aed3ed0 100644 --- a/cumulus/src/plugins/alpha/block/hfns4.py +++ b/cumulus/src/plugins/alpha/block/hfns4.py @@ -1,6 +1,6 @@ -# + # This file is part of the Coriolis Software. -# Copyright (c) SU 2020-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -20,7 +20,6 @@ so each of them is under the fanout threshold. Basic method, do not take into account the placement or the global wirelength. """ -from __future__ import print_function import sys import os.path import re diff --git a/cumulus/src/plugins/alpha/block/htree.py b/cumulus/src/plugins/alpha/block/htree.py index 4f2063cf..0ed4422a 100644 --- a/cumulus/src/plugins/alpha/block/htree.py +++ b/cumulus/src/plugins/alpha/block/htree.py @@ -1,6 +1,6 @@ -# + # This file is part of the Coriolis Software. -# Copyright (c) SU 2020-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -13,7 +13,6 @@ # +-----------------------------------------------------------------+ -from __future__ import print_function import sys import os.path import Cfg @@ -248,11 +247,11 @@ class HTree ( object ): else: driverPlugs.append( plugOcc ) quadTree.rsplitNetlist() - if self.spares.conf.isCoreBlock: - plug = utils.getPlugByName( quadTree.buffers[0], bufferConf.input ) - plug.setNet( self.treeNet ) - trace( 550, '\tCore mode, setting only root plug "{}"\n'.format(self.treeNet.getName()) ) - trace( 550, '\tPlug of "{}" (Cell:{})\n'.format(self.treeNet.getName() - ,self.treeNet.getCell()) ) - for plug in self.treeNet.getPlugs(): - trace( 550, '\t| {}\n'.format(plug) ) + #if self.spares.conf.isCoreBlock: + plug = utils.getPlugByName( quadTree.buffers[0], bufferConf.input ) + plug.setNet( self.treeNet ) + trace( 550, '\tCore mode, setting only root plug "{}"\n'.format(self.treeNet.getName()) ) + trace( 550, '\tPlug of "{}" (Cell:{})\n'.format(self.treeNet.getName() + ,self.treeNet.getCell()) ) + for plug in self.treeNet.getPlugs(): + trace( 550, '\t| {}\n'.format(plug) ) diff --git a/cumulus/src/plugins/alpha/block/iospecs.py b/cumulus/src/plugins/alpha/block/iospecs.py index c0043cc5..0f12aee7 100644 --- a/cumulus/src/plugins/alpha/block/iospecs.py +++ b/cumulus/src/plugins/alpha/block/iospecs.py @@ -1,6 +1,6 @@ -# + # This file is part of the Coriolis Software. -# Copyright (c) SU 2020-2020, All Rights Reserved +# Copyright (c) Sorbonne University 2020-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -12,7 +12,6 @@ # | Python : "./plugins/block/iospecs.py" | # +-----------------------------------------------------------------+ -from __future__ import print_function import sys import re import os.path @@ -99,7 +98,7 @@ class IoSpecs ( object ): self._ioPadsSpec = [] def addIoPadSpec ( self, instance, side ): - if self._ioPadsLUT.has_key(instance): + if instance in self._ioPadsLUT: print( ErrorMessage( 2, 'IoSpecs.addIoPadSpec(): Duplicate pad specification for "{}" (ignored).' \ .format(instance) ) ) return self._ioPadsLUT[ instance ] @@ -131,8 +130,9 @@ class IoSpecs ( object ): 'JSON pinmux file not found.' , '("{}")'.format(fileName) ] ) with open(fileName) as fd: - datas = utf8toStr( json.loads( fd.read(), object_hook=utf8toStr ) - , ignoreDicts=True ) + #datas = utf8toStr( json.loads( fd.read(), object_hook=utf8toStr ) + # , ignoreDicts=True ) + datas = json.loads( fd.read() ) self.addIoPadSpecs(datas['pads.east' ], IoPin.EAST ) self.addIoPadSpecs(datas['pads.west' ], IoPin.WEST ) self.addIoPadSpecs(datas['pads.north'], IoPin.NORTH ) @@ -140,7 +140,7 @@ class IoSpecs ( object ): for padDatas in datas['pads.instances']: padName = padDatas[0] - if not self._ioPadsLUT.has_key(padName): + if not padName in self._ioPadsLUT: print( WarningMessage('IoSpecs.loadFromPinmux(): ' \ 'Pad "{}" is not on any side, ignored.' \ .format(padName) )) diff --git a/cumulus/src/plugins/alpha/block/matrix.py b/cumulus/src/plugins/alpha/block/matrix.py index 1eb537ca..82a36e8d 100644 --- a/cumulus/src/plugins/alpha/block/matrix.py +++ b/cumulus/src/plugins/alpha/block/matrix.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) SU 2021-2021, All Rights Reserved +# Copyright (c) Sorbonne Université 2021-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -127,7 +127,7 @@ class RegisterMatrix ( object ): sliceHeight = self.conf.sliceHeight x = self.toXPitch( originX ) y = self.toYSlice( originY ) - slice = (y - yoffset) / sliceHeight + slice = (y - yoffset) // sliceHeight orientation = Transformation.Orientation.ID y = slice * sliceHeight + yoffset if slice % 2: diff --git a/cumulus/src/plugins/alpha/block/rsmt.py b/cumulus/src/plugins/alpha/block/rsmt.py index 370a4cac..e623bdb6 100644 --- a/cumulus/src/plugins/alpha/block/rsmt.py +++ b/cumulus/src/plugins/alpha/block/rsmt.py @@ -1,6 +1,6 @@ -# + # This file is part of the Coriolis Software. -# Copyright (c) SU 2014-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -292,7 +292,7 @@ class Graph ( object ): def lookupNode ( self, x, y ): geoKey = GeoKey( x, y ) - if self.nodesLUT.has_key(geoKey): + if geoKey in self.nodesLUT: return self.nodesLUT[geoKey] return None diff --git a/cumulus/src/plugins/alpha/block/spares.py b/cumulus/src/plugins/alpha/block/spares.py index 6fe69135..d510159f 100644 --- a/cumulus/src/plugins/alpha/block/spares.py +++ b/cumulus/src/plugins/alpha/block/spares.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) SU 2020-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -70,7 +70,7 @@ class BufferPool ( object ): def toIndex ( self, column, row ): return column + row*self.columns - def fromIndex ( self, index ): return (index%self.columns, index/self.columns) + def fromIndex ( self, index ): return (index%self.columns, index//self.columns) def unselect ( self ): self.selectedIndexes = [] @@ -145,11 +145,11 @@ class BufferPool ( object ): yoffset = self.quadTree.spares.conf.icore.getTransformation().getTy() conf = self.quadTree.spares.conf sliceHeight = conf.sliceHeight - poolHalfWidth = (conf.bufferConf.width * self.columns)/2 + conf.feedsConf.tieWidth() - poolHalfHeight = (conf.bufferConf.height * self.rows)/2 + poolHalfWidth = (conf.bufferConf.width * self.columns)//2 + conf.feedsConf.tieWidth() + poolHalfHeight = (conf.bufferConf.height * self.rows)//2 x = self.quadTree.spares.toXPitch( self.quadTree.area.getXCenter() - poolHalfWidth ) y = self.quadTree.spares.toYSlice( self.quadTree.area.getYCenter() - poolHalfHeight ) - slice = (y - yoffset) / sliceHeight + slice = (y - yoffset) // sliceHeight trace( 540, '\tSlice height: {}\n'.format(DbU.getValueString(sliceHeight)) ) trace( 540, '\tSlice #{} (y:{})\n'.format(slice,DbU.getValueString(y)) ) for row in range(self.rows): @@ -181,9 +181,9 @@ class BufferPool ( object ): trace( 540, ',+', '\tQuadTree._createTies()\n' ) conf = self.quadTree.spares.conf sliceHeight = conf.sliceHeight - columns = self.quadTree.area.getWidth() / u(60.0) + columns = self.quadTree.area.getWidth() // u(60.0) if columns % 2: columns += 1 - stepX = self.quadTree.area.getWidth() / columns + stepX = self.quadTree.area.getWidth() // columns trace( 540, '\tcolumns:{}, stepX:{}\n' \ .format( columns, DbU.getValueString(stepX) )) y = self.quadTree.area.getYMin() @@ -191,7 +191,7 @@ class BufferPool ( object ): for column in range(columns): feed = conf.feedsConf.createFeed( conf.corona ) transf = self._getTransformation \ - ( self.quadTree.area.getXMin() + stepX/2 + column*stepX, y ) + ( self.quadTree.area.getXMin() + stepX//2 + column*stepX, y ) feed.setTransformation( transf ) feed.setPlacementStatus( Instance.PlacementStatus.FIXED ) trace( 540, '\tBulk tie: {}\n'.format(feed) ) @@ -548,7 +548,7 @@ class QuadTree ( object ): return False if aspectRatio < 0.5: - self.ycut = self.spares.toYSlice( self.area.getYMin() + self.area.getHeight()/2 ) + self.ycut = self.spares.toYSlice( self.area.getYMin() + self.area.getHeight()//2 ) self.bl = QuadTree._create( self.spares , self , Box( self.area.getXMin() @@ -567,7 +567,7 @@ class QuadTree ( object ): trace( 540, '-' ) return True elif aspectRatio > 2.0: - self.xcut = self.spares.toXPitch( self.area.getXMin() + self.area.getWidth()/2 ) + self.xcut = self.spares.toXPitch( self.area.getXMin() + self.area.getWidth()//2 ) self.bl = QuadTree._create( self.spares , self , Box( self.area.getXMin() @@ -586,8 +586,8 @@ class QuadTree ( object ): trace( 540, '-' ) return True - self.ycut = self.spares.toYSlice( self.area.getYMin() + self.area.getHeight()/2 ) - self.xcut = self.spares.toXPitch( self.area.getXMin() + self.area.getWidth ()/2 ) + self.ycut = self.spares.toYSlice( self.area.getYMin() + self.area.getHeight()//2 ) + self.xcut = self.spares.toXPitch( self.area.getXMin() + self.area.getWidth ()//2 ) self.bl = QuadTree._create( self.spares , self , Box( self.area.getXMin() @@ -829,7 +829,7 @@ class QuadTree ( object ): plugOccsByAngle.sort( key=itemgetter(0) ) splitIndexes = [] if (len(plugOccsByAngle) > maxSinks) and (len(self.buffers) > 1): - partSize = len(plugOccsByAngle) / len(self.buffers) + partSize = len(plugOccsByAngle) // len(self.buffers) trace( 540, '\tpartSize: {}\n'.format(partSize) ) for isplit in range(1,len(self.buffers)): maxdAngle = 0 @@ -931,7 +931,7 @@ class Spares ( object ): if not spareSide: raise ErrorMessage( 3, 'Spares.getSpareSpaceMargin(): "block.spareSide" parameter is zero ({}).' \ .format(spareSide) ) - areaLength = spareSide * spareSide / self.conf.sliceHeight + areaLength = spareSide * spareSide // self.conf.sliceHeight bufferLength = self.conf.bufferConf.width * self.conf.bColumns * self.conf.bRows if not areaLength: raise ErrorMessage( 3, 'Spares.getSpareSpaceMargin(): Spare leaf area is zero.' ) @@ -972,7 +972,7 @@ class Spares ( object ): sliceHeight = self.conf.sliceHeight x = self.toXPitch( spareX ) y = self.toYSlice( spareY ) - slice = (y - yoffset) / sliceHeight + slice = (y - yoffset) // sliceHeight orientation = Transformation.Orientation.ID y = slice * sliceHeight + yoffset if slice % 2: @@ -1032,7 +1032,7 @@ class Spares ( object ): sliceHeight = self.conf.sliceHeight x = self.quadTree.toXPitch( position.getX() ) y = self.quadTree.toYSlice( position.getY() ) - slice = y / sliceHeight + slice = y // sliceHeight orientation = Transformation.Orientation.ID y = slice * sliceHeight if slice % 2: diff --git a/cumulus/src/plugins/alpha/block/timing.py b/cumulus/src/plugins/alpha/block/timing.py index 2fe35933..4a30039a 100644 --- a/cumulus/src/plugins/alpha/block/timing.py +++ b/cumulus/src/plugins/alpha/block/timing.py @@ -1,6 +1,6 @@ -# + # This file is part of the Coriolis Software. -# Copyright (c) SU 2020-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -81,7 +81,7 @@ class TechTimings ( object ): self.capaPerLambda = 0.0 def addCell ( self, cellTiming ): - if self.cells.has_key(cellTiming.name): + if cellTiming.name in self.cells: print( ErrorMessage( 1, 'TechTimings.addCell(): Redefinition of timings for "{}"' \ .format(cellTiming.name) )) self.cells[ cellTiming.name ] = cellTiming @@ -92,12 +92,12 @@ class TechTimings ( object ): def getWlEstimate ( self, cellName, sinks ): drivingCapa = self.getDrivingCapa( cellName ) #print( 'sinks:{}, dC:{}, avgFanin:{}, CpL:{}'.format(sinks,drivingCapa,self.capaAvgFanin,self.capaPerLambda) ) - #print( '{}'.format((drivingCapa - self.capaAvgFanin*sinks) / self.capaPerLambda) ) - return DbU.fromLambda( (drivingCapa - self.capaAvgFanin*sinks) / self.capaPerLambda ) + #print( '{}'.format((drivingCapa - self.capaAvgFanin*sinks) // self.capaPerLambda) ) + return DbU.fromLambda( (drivingCapa - self.capaAvgFanin*sinks) // self.capaPerLambda ) def getOneSinkEqWL ( self ): """Return the equivalent wirelength of the sink average capacity.""" - return DbU.fromLambda(self.capaAvgFanin / self.capaPerLambda) + return DbU.fromLambda(self.capaAvgFanin // self.capaPerLambda) def getSinksEstimate ( self, cellName ): """ @@ -105,10 +105,10 @@ class TechTimings ( object ): wire to connect to each sink. """ drivingCapa = self.getDrivingCapa( cellName ) - return drivingCapa / (self.capaAvgFanin + 100.0*self.capaPerLambda) + return int(drivingCapa / (self.capaAvgFanin + 100.0*self.capaPerLambda)) def getDrivingCapa ( self, name ): - if not self.cells.has_key(name): + if not name in self.cells: print( ErrorMessage( 1, 'TechTimings.getDrivingCapa(): No timings for "{}"' \ .format(name) )) return 0.0 diff --git a/cumulus/src/plugins/alpha/chip/__init__.py b/cumulus/src/plugins/alpha/chip/__init__.py index 81d5cdf1..863a11fb 100644 --- a/cumulus/src/plugins/alpha/chip/__init__.py +++ b/cumulus/src/plugins/alpha/chip/__init__.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2014-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -23,7 +23,6 @@ dictionnary of other modules. OnHorizontalPitch & OnVerticalPitch. """ -from __future__ import print_function from helpers.io import WarningMessage North = 0x0001 @@ -53,6 +52,6 @@ def importConstants ( symbols ): print( WarningMessage( 'plugins.chip.__init__.importConstants(), argument is not a symbol table.' )) return for symbol in globals().items(): - if isinstance(symbol[1],int) or isinstance(symbol[1],long): - if not symbols.has_key(symbol[0]): + if isinstance(symbol[1],int): + if not symbol[0] in symbols: symbols[ symbol[0] ] = symbol[1] diff --git a/cumulus/src/plugins/alpha/chip/chip.py b/cumulus/src/plugins/alpha/chip/chip.py index 6217296b..1724e9c9 100644 --- a/cumulus/src/plugins/alpha/chip/chip.py +++ b/cumulus/src/plugins/alpha/chip/chip.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) SU 2014-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -13,7 +13,6 @@ # +-----------------------------------------------------------------+ -from __future__ import print_function, absolute_import import sys import traceback import os.path @@ -103,8 +102,8 @@ class Chip ( Block ): , DbU.getValueString(coronaAb.getHeight()) ) ) with UpdateSession(): self.conf.core.setAbutmentBox( self.conf.coreAb ) - x = (coronaAb.getWidth () - self.conf.coreAb.getWidth ()) / 2 - y = (coronaAb.getHeight() - self.conf.coreAb.getHeight()) / 2 + x = (coronaAb.getWidth () - self.conf.coreAb.getWidth ()) // 2 + y = (coronaAb.getHeight() - self.conf.coreAb.getHeight()) // 2 trace( 550, '\tCore X, {} '.format(DbU.getValueString(x)) ) x = x - (x % self.conf.sliceHeight) trace( 550, ' adjusted on {}, {}\n'.format( DbU.getValueString(self.conf.sliceHeight) diff --git a/cumulus/src/plugins/alpha/chip/configuration.py b/cumulus/src/plugins/alpha/chip/configuration.py index 3bc00c96..fcb1f0f6 100644 --- a/cumulus/src/plugins/alpha/chip/configuration.py +++ b/cumulus/src/plugins/alpha/chip/configuration.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) SU 2014-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -12,7 +12,6 @@ # | Python : "./plugins/chip/configuration.py" | # +-----------------------------------------------------------------+ -from __future__ import print_function import sys import os.path import Cfg @@ -69,7 +68,7 @@ class ChipConf ( BlockConf ): * Outwards: the pitched box will fully enclose the original box. """ - if isinstance(v,long): return ChipConf._toSymbolic( v, rounding ) + if isinstance(v,int): return ChipConf._toSymbolic( v, rounding ) if isinstance(v,Box): if rounding & Inwards: roundings = [ Superior @@ -206,12 +205,12 @@ class ChipConf ( BlockConf ): , self.coreSize[1] - self.coreSize[1] % self.sliceHeight ) self.core.setAbutmentBox( Box( 0, 0, self.coreAb.getWidth(), self.coreAb.getHeight() ) ) trace( 550, '\tCORE ab:{}\n'.format(self.coreAb) ) - coreX = (self.coronaAb.getWidth () - self.coreAb.getWidth ()) / 2 + coreX = (self.coronaAb.getWidth () - self.coreAb.getWidth ()) // 2 trace( 550, '\tCore X, {} '.format(DbU.getValueString(coreX)) ) coreX = coreX - (coreX % self.sliceHeight) trace( 550, ' adjusted on {}, {}\n'.format( DbU.getValueString(self.sliceHeight) , DbU.getValueString(coreX)) ) - coreY = (self.coronaAb.getHeight() - self.coreAb.getHeight()) / 2 + coreY = (self.coronaAb.getHeight() - self.coreAb.getHeight()) // 2 coreY = coreY - (coreY % self.sliceHeight) self.icore.setTransformation( Transformation( coreX, coreY, Transformation.Orientation.ID ) ) self.icore.setPlacementStatus( Instance.PlacementStatus.FIXED ) @@ -255,13 +254,13 @@ class ChipConf ( BlockConf ): if iTrackMax < iTrackMin: iTrackMax = iTrackMin uTrackMin = lg.getTrackPosition( abMin, iTrackMin ) uTrackMax = lg.getTrackPosition( abMin, iTrackMax ) - axis = (uTrackMax + uTrackMin) / 2 + axis = (uTrackMax + uTrackMin) // 2 width = (iTrackMax - iTrackMin) * lg.getPitch() + lg.getWireWidth() if self.routingGauge.isSymbolic(): trace( 550, '\tRoutingGauge is symbolic, adjust on lambda.\n' ) oneLambda = DbU.fromLambda( 1.0 ) if axis % oneLambda: - axis -= oneLambda / 2 + axis -= oneLambda // 2 width -= oneLambda trace( 550, '\t[{} {}] -> [{} {}]\n'.format( iTrackMin , iTrackMax @@ -270,7 +269,7 @@ class ChipConf ( BlockConf ): trace( 550, '\taxis: {:.1f}L {}\n'.format(DbU.toLambda(axis ), DbU.getValueString(axis )) ) trace( 550, '\twidth: {:.1f}L {}\n'.format(DbU.toLambda(width), DbU.getValueString(width)) ) else: - axis = (uMax + uMin) / 2 + axis = (uMax + uMin) // 2 width = (uMax - uMin) trace( 550, '-' ) return axis, width @@ -323,7 +322,7 @@ class ChipConf ( BlockConf ): .format( DbU.getValueString(chipXMin - coronaAb.getXMin()) , DbU.toLambda(chipXMin - coronaAb.getXMin()) ) ) trace( 550, '\t| dxMax:{}\n'.format(DbU.getValueString(chipXMax - coronaAb.getXMin())) ) - coronaY, width = self.toRoutingGauge( coronaY - width/2, coronaY + width/2, layer ) + coronaY, width = self.toRoutingGauge( coronaY - width//2, coronaY + width//2, layer ) trace( 550, '\t| On Grid\n' ) trace( 550, '\t| axis: {:.1f}L or {}\n'.format(DbU.toLambda(coronaY), DbU.getValueString(coronaY)) ) trace( 550, '\t| width:{:.1f}L or {}\n'.format(DbU.toLambda(width) , DbU.getValueString(width)) ) @@ -346,7 +345,7 @@ class ChipConf ( BlockConf ): trace( 550, '\t| Real\n' ) trace( 550, '\t| axis: {}\n'.format(DbU.getValueString(coronaX)) ) trace( 550, '\t| width:{}\n'.format(DbU.getValueString(width)) ) - coronaX, width = self.toRoutingGauge( coronaX - width/2, coronaX + width/2, layer ) + coronaX, width = self.toRoutingGauge( coronaX - width//2, coronaX + width//2, layer ) trace( 550, '\t| On Grid\n' ) trace( 550, '\t| axis: {:.1f}L or {}\n'.format(DbU.toLambda(coronaX), DbU.getValueString(coronaX)) ) trace( 550, '\t| width:{:.1f}L or {}\n'.format(DbU.toLambda(width) , DbU.getValueString(width)) ) @@ -369,11 +368,11 @@ class ChipConf ( BlockConf ): topLayer = layer.getTop() botLayer = layer.getBottom() if self.isHorizontal(topLayer): - coronaX, width = self.toRoutingGauge( coronaX - width /2, coronaX + width /2, botLayer ) - coronaY, height = self.toRoutingGauge( coronaY - height/2, coronaY + height/2, topLayer ) + coronaX, width = self.toRoutingGauge( coronaX - width //2, coronaX + width //2, botLayer ) + coronaY, height = self.toRoutingGauge( coronaY - height//2, coronaY + height//2, topLayer ) else: - coronaX, width = self.toRoutingGauge( coronaX - width /2, coronaX + width /2, topLayer ) - coronaY, height = self.toRoutingGauge( coronaY - height/2, coronaY + height/2, botLayer ) + coronaX, width = self.toRoutingGauge( coronaX - width //2, coronaX + width //2, topLayer ) + coronaY, height = self.toRoutingGauge( coronaY - height//2, coronaY + height//2, botLayer ) if not (flags & OnHorizontalPitch): trace( 550, '\tNot on horizontal routing pitch, Y on lambda only.\n' ) coronaY = self.toSymbolic( chipY - coronaAb.getYMin(), Superior ) @@ -437,8 +436,8 @@ class ChipConf ( BlockConf ): trace( 550, '\tNot on vertical routing pitch, X on lambda only.\n' ) coronaX = self.toSymbolic( chipX - coronaAb.getXMin(), Superior ) contacts = [] - xContact = coronaX - viaPitch * (array[0]-1)/2 - yContact = coronaY - viaPitch * (array[1]-1)/2 + xContact = coronaX - viaPitch * (array[0]-1)//2 + yContact = coronaY - viaPitch * (array[1]-1)//2 contactSize = layer.getMinimalSize() trace( 550, '\txContact:{} yContact:{}\n'.format(DbU.getValueString(xContact),DbU.getValueString(yContact)) ) for i in range(array[0]): @@ -468,11 +467,11 @@ class ChipConf ( BlockConf ): trace( 550, '\t| WxH: {} {}\n'.format(DbU.getValueString(width ), DbU.getValueString(height )) ) topLayer = layer.getTop() if self.isHorizontal(topLayer): - coronaX, width = self.toRoutingGauge( coronaX - width /2, coronaX + width /2, layer.getBottom() ) - coronaY, height = self.toRoutingGauge( coronaY - height/2, coronaY + height/2, topLayer ) + coronaX, width = self.toRoutingGauge( coronaX - width //2, coronaX + width //2, layer.getBottom() ) + coronaY, height = self.toRoutingGauge( coronaY - height//2, coronaY + height//2, topLayer ) else: - coronaX, width = self.toRoutingGauge( coronaX - width /2, coronaX + width /2, topLayer ) - coronaY, height = self.toRoutingGauge( coronaY - height/2, coronaY + height/2, layer.getBottom() ) + coronaX, width = self.toRoutingGauge( coronaX - width //2, coronaX + width //2, topLayer ) + coronaY, height = self.toRoutingGauge( coronaY - height//2, coronaY + height//2, layer.getBottom() ) if direction == Pin.Direction.NORTH or direction == Pin.Direction.SOUTH: trace( 550, '\tEast/West not on horizontal routing pitch, Y on lambda only.\n' ) coronaY = self.toSymbolic( chipY - coronaAb.getYMin(), Superior ) @@ -648,7 +647,7 @@ class ChipConf ( BlockConf ): if not padNet and coronaNet.isGlobal(): padNet = self.chip.getNet( coronaNet.getName() ) if padNet: - if not netPads.has_key(padNet): + if not padNet in netPads: trace( 550, '\t{:>20} <-> {:<20}\n'.format(padNet.getName(),coronaNet.getName()) ) netPads[ padNet ] = coronaNet else: diff --git a/cumulus/src/plugins/alpha/chip/corona.py b/cumulus/src/plugins/alpha/chip/corona.py index 081780dc..1ca8cb0d 100644 --- a/cumulus/src/plugins/alpha/chip/corona.py +++ b/cumulus/src/plugins/alpha/chip/corona.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) SU 2014-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -13,7 +13,6 @@ # +-----------------------------------------------------------------+ -from __future__ import print_function import bisect from operator import methodcaller import Cfg @@ -114,9 +113,9 @@ class HorizontalRail ( Rail ): print (ErrorMessage( 1, [ '{} is outside rail/corona X range,'.format(contact) , 'power pad is likely to be to far off west or east.' , '(core:{})'.format(self.side.innerBb) ] ) ) - if self.vias.has_key(contact.getX()): return False + if contact.getX() in self.vias: return False trace( 550, '\tvias:{}\n'.format(self.vias) ) - keys = self.vias.keys() + keys = list( self.vias.keys() ) keys.sort() insertIndex = bisect.bisect_left( keys, contact.getX() ) if len(keys) > 0: @@ -228,10 +227,10 @@ class VerticalRail ( Rail ): print (ErrorMessage( 1, [ '{} is outside rail/corona Y range'.format(contact) , 'power pad is likely to be to far off north or south.' , '(core:{})'.format(self.side.innerBb) ] ) ) - if self.vias.has_key(contact.getY()): return False + if contact.getY() in self.vias: return False trace( 550, ',+', '\tVerticalRail.connect() [{}] @{}\n'.format(self.order,DbU.getValueString(self.axis)) ) trace( 550, '\t{}\n'.format(contact) ) - keys = self.vias.keys() + keys = list( self.vias.keys() ) keys.sort() insertIndex = bisect.bisect_left( keys, contact.getY() ) trace( 550, ',+', '\tkeys:' ) @@ -362,7 +361,7 @@ class Side ( object ): if self.horizontalDepth > self.verticalDepth: return range( len(self.coronaCks), len(self.rails) ) trace( 550, '\tUsing half rails only.\n' ) - return range( len(self.coronaCks) + len(self.rails)/2 - 2, len(self.rails) ) + return range( len(self.coronaCks) + len(self.rails)//2 - 2, len(self.rails) ) def connectPads ( self, padSide ): #for contact in padSide.pins: @@ -412,8 +411,8 @@ class SouthSide ( HorizontalSide ): def side ( self ): return South def getRailAxis ( self, i ): - return self.innerBb.getYMin() - self.hRailWidth/2 - self.hRailSpace \ - - i*(self.hRailWidth + self.hRailSpace) + return self.innerBb.getYMin() - self.hRailWidth//2 - self.hRailSpace \ + - i*(self.hRailWidth + self.hRailSpace) def corner0 ( self, i ): return self.corners[SouthWest][i] def corner1 ( self, i ): return self.corners[SouthEast][i] @@ -432,8 +431,8 @@ class NorthSide ( HorizontalSide ): def side ( self ): return North def getRailAxis ( self, i ): - return self.innerBb.getYMax() + self.hRailWidth/2 + self.hRailSpace \ - + i*(self.hRailWidth + self.hRailSpace) + return self.innerBb.getYMax() + self.hRailWidth//2 + self.hRailSpace \ + + i*(self.hRailWidth + self.hRailSpace) def corner0 ( self, i ): return self.corners[NorthWest][i] def corner1 ( self, i ): return self.corners[NorthEast][i] @@ -457,16 +456,16 @@ class VerticalSide ( Side ): for rail in self.rails: for via in rail.vias.values(): if via[1].getNet() != via[2].getNet(): continue - spans.merge( via[1].y - via[1].height/2, via[1].y + via[1].height/2 ) + spans.merge( via[1].y - via[1].height//2, via[1].y + via[1].height//2 ) routingGauge = self.corona.routingGauge - for depth in range(self.getOuterRail(0).vias.values()[0][1].bottomDepth - ,self.getOuterRail(0).vias.values()[0][1].topDepth ): + for depth in range(next(iter(self.getOuterRail(0).vias.values()))[1].bottomDepth + ,next(iter(self.getOuterRail(0).vias.values()))[1].topDepth ): blockageLayer = routingGauge.getRoutingLayer(depth).getBlockageLayer() pitch = routingGauge.getLayerPitch(depth) for chunk in spans.chunks: Horizontal.create( self.blockageNet , blockageLayer - , (chunk.getVMax() + chunk.getVMin())/2 + , (chunk.getVMax() + chunk.getVMin())//2 , chunk.getVMax() - chunk.getVMin() + pitch*2 , sideXMin , sideXMax @@ -478,7 +477,7 @@ class VerticalSide ( Side ): for chunk in spans.chunks: Horizontal.create( self.blockageNet , blockageLayer - , (chunk.getVMax() + chunk.getVMin())/2 + , (chunk.getVMax() + chunk.getVMin())//2 , chunk.getVMax() - chunk.getVMin() + pitch*2 , sideXMin , sideXMax @@ -497,8 +496,8 @@ class WestSide ( VerticalSide ): def side ( self ): return West def getRailAxis ( self, i ): - return self.innerBb.getXMin() - self.vRailWidth/2 - self.vRailSpace \ - - i*(self.vRailWidth + self.vRailSpace) + return self.innerBb.getXMin() - self.vRailWidth//2 - self.vRailSpace \ + - i*(self.vRailWidth + self.vRailSpace) def corner0 ( self, i ): return self.corners[SouthWest][i] def corner1 ( self, i ): return self.corners[NorthWest][i] @@ -521,8 +520,8 @@ class EastSide ( VerticalSide ): def side ( self ): return East def getRailAxis ( self, i ): - return self.innerBb.getXMax() + self.vRailWidth/2 + self.vRailSpace \ - + i*(self.vRailWidth + self.vRailSpace) + return self.innerBb.getXMax() + self.vRailWidth//2 + self.vRailSpace \ + + i*(self.vRailWidth + self.vRailSpace) def corner0 ( self, i ): return self.corners[SouthEast][i] def corner1 ( self, i ): return self.corners[NorthEast][i] @@ -542,7 +541,7 @@ class Builder ( object ): self.block = block self.innerBb = self.block.icoreAb self.block.path.getTransformation().applyOn( self.innerBb ) - self.innerBb.inflate( self.hRailSpace/2, self.vRailSpace/2 ) + self.innerBb.inflate( self.hRailSpace//2, self.vRailSpace//2 ) self.southSide = SouthSide( self ) self.northSide = NorthSide( self ) self.westSide = WestSide ( self ) diff --git a/cumulus/src/plugins/alpha/chip/pads.py b/cumulus/src/plugins/alpha/chip/pads.py index f2640d52..f4851394 100644 --- a/cumulus/src/plugins/alpha/chip/pads.py +++ b/cumulus/src/plugins/alpha/chip/pads.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) SU 2014-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -13,7 +13,6 @@ # +-----------------------------------------------------------------+ -from __future__ import print_function import sys import re import copy @@ -65,28 +64,28 @@ class Corner ( object ): yCorner = self.conf.chipAb.getYMin() + axis xBb = self.conf.chipAb.getXMin() + self.conf.ioPadHeight yBb = self.conf.chipAb.getYMin() + self.conf.ioPadHeight - xExtend = - onFGrid( long( 0.5 * float(self.conf.ioPadHeight - axis) ) ) + xExtend = - onFGrid( int( 0.5 * float(self.conf.ioPadHeight - axis) ) ) yExtend = xExtend elif self.type == SouthEast: xCorner = self.conf.chipAb.getXMax() - axis yCorner = self.conf.chipAb.getYMin() + axis xBb = self.conf.chipAb.getXMax() - self.conf.ioPadHeight yBb = self.conf.chipAb.getYMin() + self.conf.ioPadHeight - xExtend = onFGrid( long( 0.5 * float(self.conf.ioPadHeight - axis) ) ) + xExtend = onFGrid( int( 0.5 * float(self.conf.ioPadHeight - axis) ) ) yExtend = - xExtend elif self.type == NorthEast: xCorner = self.conf.chipAb.getXMax() - axis yCorner = self.conf.chipAb.getYMax() - axis xBb = self.conf.chipAb.getXMax() - self.conf.ioPadHeight yBb = self.conf.chipAb.getYMax() - self.conf.ioPadHeight - xExtend = onFGrid( long( 0.5 * float(self.conf.ioPadHeight - axis) ) ) + xExtend = onFGrid( int( 0.5 * float(self.conf.ioPadHeight - axis) ) ) yExtend = xExtend elif self.type == NorthWest: xCorner = self.conf.chipAb.getXMin() + axis yCorner = self.conf.chipAb.getYMax() - axis xBb = self.conf.chipAb.getXMin() + self.conf.ioPadHeight yBb = self.conf.chipAb.getYMax() - self.conf.ioPadHeight - xExtend = - onFGrid( long( 0.5 * float(self.conf.ioPadHeight - axis) ) ) + xExtend = - onFGrid( int( 0.5 * float(self.conf.ioPadHeight - axis) ) ) yExtend = - xExtend return xCorner, yCorner, xBb, yBb, xExtend, yExtend @@ -370,7 +369,7 @@ class Side ( object ): def _placePads ( self ): padLength = 0 for pad in self.pads: padLength += pad[1].getMasterCell().getAbutmentBox().getWidth() - padSpacing = (self.sideLength - 2*self.conf.ioPadHeight - padLength) / (len(self.pads) + 1) + padSpacing = (self.sideLength - 2*self.conf.ioPadHeight - padLength) // (len(self.pads) + 1) if self.conf.padsHavePosition: position = self.u for pad in self.pads: @@ -414,8 +413,8 @@ class Side ( object ): uMin -= DbU.fromLambda(5.0) uMax += DbU.fromLambda(5.0) else: - uMin -= width/2 - uMax += width/2 + uMin -= width//2 + uMax += width//2 if self.type == North or self.type == South: if self.type == North: axis = self.conf.chipAb.getYMax() - axis @@ -583,7 +582,7 @@ class CoreWire ( object ): , Layer.EnclosureH|Layer.EnclosureV ) \ + self.symContactLayer.getMinimalSize() arrayWidth = self.symContactSize[0] - arrayCount = (arrayWidth - contactMinSize) / self.viaPitch + arrayCount = (arrayWidth - contactMinSize) // self.viaPitch trace( 550, '\tcontactMinSize: {}, arrayWidth: {}, arrayCount: {}\n' \ .format(DbU.getValueString(contactMinSize),DbU.getValueString(arrayWidth),arrayCount) ) if arrayCount < 0: arrayCount = 0 @@ -624,7 +623,7 @@ class CoreWire ( object ): xPadMax = xContact xCore = coronaAb.getXMin() if not self.preferredDir: - #xPadMax += self.bbSegment.getHeight()/2 + #xPadMax += self.bbSegment.getHeight()//2 xPadMin += 3*vPitch else: accessDirection = Pin.Direction.EAST @@ -633,7 +632,7 @@ class CoreWire ( object ): xPadMin = xContact xCore = coronaAb.getXMax() if not self.preferredDir: - #xPadMin -= self.bbSegment.getHeight()/2 + #xPadMin -= self.bbSegment.getHeight()//2 xPadMin -= 3*vPitch if self.addJumper: rg = self.conf.routingGauge @@ -644,8 +643,8 @@ class CoreWire ( object ): gapCenter = xPadMin + 5*gaugeM5.getPitch() else: gapCenter = xPadMax - 5*gaugeM5.getPitch() - xJumpMin = gapCenter - jumperGap/2 - xJumpMax = gapCenter + jumperGap/2 + xJumpMin = gapCenter - jumperGap//2 + xJumpMax = gapCenter + jumperGap//2 hReal1 = Horizontal.create( self.chipNet , self.padSegment.getLayer() , self.bbSegment.getCenter().getY() @@ -771,7 +770,7 @@ class CoreWire ( object ): yContact = yPadMax yCore = coronaAb.getYMin() #if not self.preferredDir: - # yPadMax += self.bbSegment.getWidth()/2 + # yPadMax += self.bbSegment.getWidth()//2 # yPadMin += 3*hPitch else: accessDirection = Pin.Direction.NORTH @@ -780,7 +779,7 @@ class CoreWire ( object ): yContact = yPadMin yCore = coronaAb.getYMax() #if not self.preferredDir: - # yPadMin -= self.bbSegment.getWidth()/2 + # yPadMin -= self.bbSegment.getWidth()//2 # yPadMin -= 3*hPitch vReal = Vertical.create( self.chipNet , self.padSegment.getLayer() @@ -987,7 +986,7 @@ class Corona ( object ): if plug.getMasterNet().isClock(): hspan.inflate( DbU.fromLambda(5.0) ) else: - hspan.inflate( component.getWidth() / 2 ) + hspan.inflate( component.getWidth() // 2 ) if hspan.contains( ab.getXMin() ) or hspan.contains( ab.getXMax() ): duplicate = False if self.padOrient == Transformation.Orientation.ID: @@ -1056,21 +1055,21 @@ class Corona ( object ): if side.type == North or side.type == South: #bb.inflate( -u(0.6), 0 ) if bb.getWidth() > u(35.0): - bb.inflate( (u(34.0) - bb.getWidth()) / 2, 0 ) + bb.inflate( (u(34.0) - bb.getWidth()) // 2, 0 ) else: #bb.inflate( 0, -u(0.6) ) if bb.getHeight() > u(35.0): - bb.inflate( 0, (u(34.0) - bb.getHeight()) / 2 ) + bb.inflate( 0, (u(34.0) - bb.getHeight()) // 2 ) if bb.intersect(innerBb): trace( 550, '\t| Accepted.\n' ) lg = rg.getLayerGauge( component.getLayer() ) depth = lg.getDepth() if depth > self.conf.topLayerDepth: continue if lg.getDirection() == RoutingLayerGauge.Vertical: - if not vsegments.has_key(depth): vsegments[ depth ] = [] + if not depth in vsegments: vsegments[ depth ] = [] vsegments[ depth ].append( (component,bb) ) else: - if not hsegments.has_key(depth): hsegments[ depth ] = [] + if not depth in hsegments: hsegments[ depth ] = [] hsegments[ depth ].append( (component,bb) ) gapWidth = 0 segments = None @@ -1152,10 +1151,10 @@ class Corona ( object ): .format(chipIntNet.getName()) ) self.conf.setupCorona( self.westSide.gap, self.southSide.gap, self.eastSide.gap, self.northSide.gap ) self.coreSymBb = self.conf.getInstanceAb( self.conf.icorona ) - self.coreSymBb.inflate( self.conf.toSymbolic( self.westSide.gap /2, Superior ) - , self.conf.toSymbolic( self.southSide.gap/2, Superior ) - , self.conf.toSymbolic( self.eastSide.gap /2, Inferior ) - , self.conf.toSymbolic( self.northSide.gap/2, Inferior ) ) + self.coreSymBb.inflate( self.conf.toSymbolic( self.westSide.gap //2, Superior ) + , self.conf.toSymbolic( self.southSide.gap//2, Superior ) + , self.conf.toSymbolic( self.eastSide.gap //2, Inferior ) + , self.conf.toSymbolic( self.northSide.gap//2, Inferior ) ) self.southSide.drawCoreWires() self.northSide.drawCoreWires() self.eastSide .drawCoreWires() @@ -1349,13 +1348,13 @@ class Corona ( object ): xcore = icore.getTransformation().getTx() stripeSpecs = [] stripesNb = int( (coreAb.getWidth() - 8*capViaWidth + self.supplyRailWidth) \ - / self.supplyRailPitch - 1 ) - offset = (coreAb.getWidth() - self.supplyRailPitch*(stripesNb-1)) / 2 - stripeSpecs.append( [ xcore + capViaWidth/2 , capViaWidth ] ) - stripeSpecs.append( [ xcore + 2*capViaWidth + capViaWidth/2 , capViaWidth ] ) + // self.supplyRailPitch - 1 ) + offset = (coreAb.getWidth() - self.supplyRailPitch*(stripesNb-1)) // 2 + stripeSpecs.append( [ xcore + capViaWidth//2 , capViaWidth ] ) + stripeSpecs.append( [ xcore + 2*capViaWidth + capViaWidth//2 , capViaWidth ] ) if self.chip.spares and len(self.chip.spares.rleafX) > 1: rleafX = self.chip.spares.rleafX - spacing = (rleafX[1] - rleafX[0]) / 2 + spacing = (rleafX[1] - rleafX[0]) // 2 stepOffset = 0 step = 1 trace( 550, '\trleafX\n' ) @@ -1364,7 +1363,7 @@ class Corona ( object ): if spacing < self.supplyRailPitch: stepOffset = 1 step = 2 - spacing = (rleafX[2] - rleafX[0]) / 2 + spacing = (rleafX[2] - rleafX[0]) // 2 if step == 1: stripeSpecs.append( [ rleafX[0] - spacing, self.supplyRailWidth ] ) trace( 550, '\tstripe[N/A] @{}\n'.format(DbU.getValueString(stripeSpecs[-1][0]))) @@ -1382,8 +1381,8 @@ class Corona ( object ): stripeSpecs.append( [ xcore + offset + i*self.supplyRailPitch , self.supplyRailWidth ] ) - stripeSpecs.append( [ xcore + coreAb.getWidth() - 2*capViaWidth - capViaWidth/2 , capViaWidth ] ) - stripeSpecs.append( [ xcore + coreAb.getWidth() - capViaWidth/2 , capViaWidth ] ) + stripeSpecs.append( [ xcore + coreAb.getWidth() - 2*capViaWidth - capViaWidth//2 , capViaWidth ] ) + stripeSpecs.append( [ xcore + coreAb.getWidth() - capViaWidth//2 , capViaWidth ] ) trace( 550, '\ticoreAb={}\n'.format(icore.getAbutmentBox()) ) trace( 550, '\tcapViaWidth={}\n'.format(DbU.getValueString(capViaWidth))) diff --git a/cumulus/src/plugins/alpha/chip/power.py b/cumulus/src/plugins/alpha/chip/power.py index ca66dd41..e32a8563 100644 --- a/cumulus/src/plugins/alpha/chip/power.py +++ b/cumulus/src/plugins/alpha/chip/power.py @@ -1,7 +1,6 @@ -#!/usr/bin/env python -# + # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2014-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -45,7 +44,7 @@ class Side ( object ): self.terminals = [] def addTerminal ( self, position, width ): - toMerge = Interval( position-width/2, position+width/2 ) + toMerge = Interval( position-width//2, position+width//2 ) length = len(self.terminals) imerge = length ichunk = 0 @@ -104,8 +103,8 @@ class Side ( object ): class Plane ( object ): - Horizontal = 0001 - Vertical = 0002 + Horizontal = 1 + Vertical = 2 def __init__ ( self, builder, metal ): self.builder = builder @@ -113,7 +112,7 @@ class Plane ( object ): self.sides = {} def addTerminal ( self, net, direction, bb ): - if not self.sides.has_key(net): + if not net in self.sides: self.sides[ net ] = { North : Side(self.builder,North,net,self.metal) , South : Side(self.builder,South,net,self.metal) , East : Side(self.builder,East ,net,self.metal) @@ -135,6 +134,7 @@ class Plane ( object ): sides[South].addTerminal( bb.getCenter().getX(), bb.getWidth() ) if bb.getYMax() >= self.builder.icoreAb.getYMax(): sides[North].addTerminal( bb.getCenter().getX(), bb.getWidth() ) + trace( 550, '\tTerminal added\n' ) def doLayout ( self ): for sidesOfNet in self.sides.values(): @@ -157,8 +157,8 @@ class GoCb ( object ): if not direction: return trace( 550, '\t| go={}\n'.format( go )) rootNet = None - if go.getNet().getType() == long(Net.Type.POWER): rootNet = self.builder.conf.coronaVdd - if go.getNet().getType() == long(Net.Type.GROUND): rootNet = self.builder.conf.coronaVss + if go.getNet().getType() == int(Net.Type.POWER): rootNet = self.builder.conf.coronaVdd + if go.getNet().getType() == int(Net.Type.GROUND): rootNet = self.builder.conf.coronaVss if not rootNet: return if self.builder.activePlane: layer = self.builder.activePlane.metal @@ -170,7 +170,7 @@ class GoCb ( object ): query.getPath().getTransformation().applyOn( bb ) self.builder.activePlane.addTerminal( rootNet, direction, bb ) else: - print WarningMessage( 'BlockPower.GoCb() callback called without an active plane.' ) + print( WarningMessage( 'BlockPower.GoCb() callback called without an active plane.' )) return @@ -254,7 +254,7 @@ class Builder ( object ): def connectClocks ( self ): if not self.conf.useClockTree: - print WarningMessage( "Clock tree generation has been disabled ('chip.clockTree':False)." ) + print( WarningMessage( "Clock tree generation has been disabled ('chip.clockTree':False)." )) return if len(self.conf.coronaCks) == 0: raise ErrorMessage( 1, 'Cannot build clock terminal as no clock is not known.' ) diff --git a/cumulus/src/plugins/alpha/chip/powerplane.py b/cumulus/src/plugins/alpha/chip/powerplane.py index b85feff7..a7ce2b5b 100644 --- a/cumulus/src/plugins/alpha/chip/powerplane.py +++ b/cumulus/src/plugins/alpha/chip/powerplane.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2021-2021, All Rights Reserved +# Copyright (c) Sorbonne Université 2021-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -13,7 +13,6 @@ # +-----------------------------------------------------------------+ -from __future__ import print_function import sys from Hurricane import DbU, Point, Transformation, Box, Interval, \ Path, Occurrence, UpdateSession, Net, \ @@ -136,16 +135,16 @@ class HorizontalRail ( Rail ): trace( 550, '\t| Chunk=[{} {}]\n'.format( DbU.getValueString(chunk.getVMin()) , DbU.getValueString(chunk.getVMax()) )) chunkBb = Box( chunk.getVMin() - , self.axis - self.width/2 + , self.axis - self.width//2 , chunk.getVMax() - , self.axis + self.width/2 ) + , self.axis + self.width//2 ) overlap = stripeBb.getIntersection( chunkBb ) if overlap.isEmpty(): continue - if overlap.getWidth() > 5*viaWidth: + if overlap.getWidth() > 2*viaWidth: trace( 550, '\t| Large overlap={}\n'.format(overlap) ) via = BigVia( stripe.getNet() , plane.getLayerDepth(stripe.getLayer()) - , overlap.getXMin() + viaWidth/2 + , overlap.getXMin() + viaWidth//2 , overlap.getYCenter() , viaWidth , overlap.getHeight() @@ -155,7 +154,7 @@ class HorizontalRail ( Rail ): via.doLayout() via = BigVia( stripe.getNet() , plane.getLayerDepth(stripe.getLayer()) - , overlap.getXMax() - viaWidth/2 + , overlap.getXMax() - viaWidth//2 , overlap.getYCenter() , viaWidth , overlap.getHeight() @@ -217,9 +216,9 @@ class Rails ( object ): else: axis = bb.getXCenter() width = bb.getWidth() - if not self.axisLut.has_key(axis): + if not axis in self.axisLut: self.axisLut[ axis ] = {} - if not self.axisLut[axis].has_key(width): + if not width in self.axisLut[axis]: if self.isHorizontal: self.axisLut[ axis ][ width ] = HorizontalRail( bb ) else: @@ -259,8 +258,8 @@ class VerticalRails ( Rails ): class Plane ( object ): - Horizontal = 0001 - Vertical = 0002 + Horizontal = 1 + Vertical = 2 def __init__ ( self, builder, metal ): self.builder = builder @@ -358,20 +357,20 @@ class Stripes ( object ): if pin.getLayer() != self.supplyLayer: continue key = pin.getX() if pin.getAccessDirection() == Pin.Direction.SOUTH: - if not self.powers.has_key(key): self.powers[ key ] = Stripe( self, pin, None ) - else: self.powers[ key ].southPin = pin + if not key in self.powers: self.powers[ key ] = Stripe( self, pin, None ) + else: self.powers[ key ].southPin = pin elif pin.getAccessDirection() == Pin.Direction.NORTH: - if not self.powers.has_key(key): self.powers[ key ] = Stripe( self, None, pin ) - else: self.powers[ key ].northPin = pin + if not key in self.powers: self.powers[ key ] = Stripe( self, None, pin ) + else: self.powers[ key ].northPin = pin for pin in self.conf.coronaVss.getPins(): if pin.getLayer() != self.supplyLayer: continue key = pin.getX() if pin.getAccessDirection() == Pin.Direction.SOUTH: - if not self.grounds.has_key(key): self.grounds[ key ] = Stripe( self, pin, None ) - else: self.grounds[ key ].southPin = pin + if not key in self.grounds: self.grounds[ key ] = Stripe( self, pin, None ) + else: self.grounds[ key ].southPin = pin elif pin.getAccessDirection() == Pin.Direction.NORTH: - if not self.grounds.has_key(key): self.grounds[ key ] = Stripe( self, None, pin ) - else: self.grounds[ key ].northPin = pin + if not key in self.grounds: self.grounds[ key ] = Stripe( self, None, pin ) + else: self.grounds[ key ].northPin = pin @property def conf ( self ): return self.builder.conf @@ -401,8 +400,8 @@ class GoCb ( object ): elif isinstance(go,Vertical): managed = True if not managed: return rootNet = None - if go.getNet().getType() == long(Net.Type.POWER): rootNet = self.builder.conf.coronaVdd - if go.getNet().getType() == long(Net.Type.GROUND): rootNet = self.builder.conf.coronaVss + if go.getNet().getType() == int(Net.Type.POWER): rootNet = self.builder.conf.coronaVdd + if go.getNet().getType() == int(Net.Type.GROUND): rootNet = self.builder.conf.coronaVss if not rootNet: return if not NetExternalComponents.isExternal(go): return if self.builder.activePlane: diff --git a/cumulus/src/plugins/alpha/core2chip/cmos.py b/cumulus/src/plugins/alpha/core2chip/cmos.py index 85276401..576183f6 100644 --- a/cumulus/src/plugins/alpha/core2chip/cmos.py +++ b/cumulus/src/plugins/alpha/core2chip/cmos.py @@ -1,7 +1,8 @@ + # -*- coding: utf-8 -*- # # This file is part of the Coriolis Software. -# Copyright (c) SU 2019-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -18,7 +19,6 @@ Core2Chip configuration for the SxLib/PxLib Alliance historical standard cell library. """ -from __future__ import print_function import sys import re from Hurricane import DbU diff --git a/cumulus/src/plugins/alpha/core2chip/core2chip.py b/cumulus/src/plugins/alpha/core2chip/core2chip.py index 5c1e8ee8..12008cc4 100644 --- a/cumulus/src/plugins/alpha/core2chip/core2chip.py +++ b/cumulus/src/plugins/alpha/core2chip/core2chip.py @@ -1,7 +1,8 @@ + # -*- coding: utf-8 -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -43,8 +44,7 @@ The double level chip+corona serves two purpose: small dogleg instead of a straight wire. """ -from __future__ import print_function -from exceptions import NotImplementedError +#from exceptions import NotImplementedError import re from Hurricane import UpdateSession, Net, Instance from CRL import Catalog, AllianceFramework, Spice @@ -523,7 +523,7 @@ class CoreToChip ( object ): """ Look for an IoNet associated to *core* net ``netName``. """ - if self._ioNets.has_key(netName): return True + if netName in self._ioNets: return True return False def newDummyNet ( self ): @@ -560,9 +560,9 @@ class CoreToChip ( object ): or the net object itself. """ if isinstance(coreNet,str): - if self._ioNets.has_key(coreNet): return self._ioNet[ coreNet ] + if coreNet in self._ioNets: return self._ioNet[ coreNet ] raise ErrorMessage( 1, 'CoreToChip.getIoNet(): Cannot lookup net "%s" by name.' % coreNet ) - if not self._ioNets.has_key(coreNet.getName()): + if not coreNet.getName() in self._ioNets: self._ioNets[ coreNet.getName() ] = IoNet( self, coreNet ) return self._ioNets[ coreNet.getName() ] diff --git a/cumulus/src/plugins/alpha/core2chip/libresocio.py b/cumulus/src/plugins/alpha/core2chip/libresocio.py index 97e92443..ae9bfc1a 100644 --- a/cumulus/src/plugins/alpha/core2chip/libresocio.py +++ b/cumulus/src/plugins/alpha/core2chip/libresocio.py @@ -1,7 +1,8 @@ + # -*- coding: utf-8 -*- # # This file is part of the Coriolis Software. -# Copyright (c) SU 2020-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -23,7 +24,6 @@ in upppercase. We can use them because, in real mode, we are less dependent from the Alliance design flow. """ -from __future__ import print_function import sys import re from Hurricane import DbU, DataBase, UpdateSession, Breakpoint, \ diff --git a/cumulus/src/plugins/alpha/core2chip/niolib.py b/cumulus/src/plugins/alpha/core2chip/niolib.py index 11b445c6..3694b11c 100644 --- a/cumulus/src/plugins/alpha/core2chip/niolib.py +++ b/cumulus/src/plugins/alpha/core2chip/niolib.py @@ -1,7 +1,8 @@ + # -*- coding: utf-8 -*- # # This file is part of the Coriolis Software. -# Copyright (c) SU 2019-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -17,7 +18,6 @@ Core2Chip configuration for the FlexLib I/O pad library ("niolib"). """ -from __future__ import print_function import sys import re from Hurricane import DbU, DataBase, UpdateSession, Breakpoint, \ diff --git a/cumulus/src/plugins/alpha/core2chip/phlib.py b/cumulus/src/plugins/alpha/core2chip/phlib.py index 18ae614c..62cb8a6b 100644 --- a/cumulus/src/plugins/alpha/core2chip/phlib.py +++ b/cumulus/src/plugins/alpha/core2chip/phlib.py @@ -1,8 +1,8 @@ -#!/usr/bin/env python + # -*- coding: utf-8 -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2018-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | diff --git a/cumulus/src/plugins/alpha/core2chip/phlib80.py b/cumulus/src/plugins/alpha/core2chip/phlib80.py index bbb37190..2372a9d1 100644 --- a/cumulus/src/plugins/alpha/core2chip/phlib80.py +++ b/cumulus/src/plugins/alpha/core2chip/phlib80.py @@ -1,8 +1,8 @@ -#!/usr/bin/env python + # -*- coding: utf-8 -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2018-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | diff --git a/cumulus/src/plugins/alpha/macro/macro.py b/cumulus/src/plugins/alpha/macro/macro.py index 09f96286..7b79d46a 100644 --- a/cumulus/src/plugins/alpha/macro/macro.py +++ b/cumulus/src/plugins/alpha/macro/macro.py @@ -1,6 +1,6 @@ # This file is part of the Coriolis Software. -# Copyright (c) SU 2021-2021, All Rights Reserved +# Copyright (c) Sorbonne Université 2021-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -13,7 +13,6 @@ # +-----------------------------------------------------------------+ -from __future__ import print_function import sys import os.path from operator import itemgetter, attrgetter, methodcaller @@ -47,7 +46,7 @@ class Macro ( object ): @staticmethod def lookup ( macroCell ): trace( 550, '\tMacro.lookup() on {}\n'.format(macroCell) ) - if Macro.LUT.has_key(macroCell): return Macro.LUT[ macroCell ] + if macroCell in Macro.LUT: return Macro.LUT[ macroCell ] return None @staticmethod @@ -179,9 +178,9 @@ class Macro ( object ): , bb.getXMax() ) elif isinstance(component,Rectilinear) and component.getLayer() == blockageMetal3: bb = Box( component.getBoundingBox() ) - deltaAbXMin = bb.getXMin() + minSpacingMetal3/2 - ab.getXMin() + deltaAbXMin = bb.getXMin() + minSpacingMetal3//2 - ab.getXMin() bb.inflate( pitchMetal3 + deltaAbXMin - , minSpacingMetal3/2 + , minSpacingMetal3//2 , pitchMetal3 , pitchMetal3 ) @@ -238,11 +237,11 @@ class Macro ( object ): ppYOngrid = yOngrid if not self.rg.isSymbolic(): if ppYAxis < ppYOngrid: - ppYAxis -= width/2 - ppYOngrid += wwidth/2 + ppYAxis -= width//2 + ppYOngrid += wwidth//2 else: - ppYAxis += width/2 - ppYOngrid -= wwidth/2 + ppYAxis += width//2 + ppYOngrid -= wwidth//2 if useJumper: jpitch = self.rg.getPitch ( gaugeMetal5.getLayer() ) jwwidth = self.rg.getWireWidth( gaugeMetal5.getLayer() ) @@ -283,7 +282,7 @@ class Macro ( object ): , yOngrid , wwidth , xMin - , xMin + ppitch + ppitch/2 + , xMin + ppitch + ppitch//2 ) blockageNet = self.cell.getNet( '*' ) for gauge in [ gaugeMetal3, gaugeMetal3, gaugeMetal4, gaugeMetal5 ]: @@ -313,7 +312,7 @@ class Macro ( object ): , yOngrid , wwidth , xMin - , xMin + ppitch + ppitch/2 + , xMin + ppitch + ppitch//2 ) NetExternalComponents.setExternal( horizontal ) for component in eastPins: @@ -335,11 +334,11 @@ class Macro ( object ): ppYOngrid = yOngrid if not self.rg.isSymbolic(): if ppYAxis < ppYOngrid: - ppYAxis -= width/2 - ppYOngrid += wwidth/2 + ppYAxis -= width//2 + ppYOngrid += wwidth//2 else: - ppYAxis += width/2 - ppYOngrid -= wwidth/2 + ppYAxis += width//2 + ppYOngrid -= wwidth//2 vertical = Vertical.create( component.getNet() , component.getLayer() , bb.getXMax() @@ -377,11 +376,11 @@ class Macro ( object ): ppXOngrid = xOngrid if not self.rg.isSymbolic(): if ppXAxis < ppXOngrid: - ppXAxis -= width/2 - ppXOngrid += wwidth/2 + ppXAxis -= width//2 + ppXOngrid += wwidth//2 else: - ppXAxis += width/2 - ppXOngrid -= wwidth/2 + ppXAxis += width//2 + ppXOngrid -= wwidth//2 horizontal = Horizontal.create( component.getNet() , component.getLayer() , bb.getYMin() @@ -423,11 +422,11 @@ class Macro ( object ): ppXOngrid = xOngrid if not self.rg.isSymbolic(): if ppXAxis < ppXOngrid: - ppXAxis -= width/2 - ppXOngrid += wwidth/2 + ppXAxis -= width//2 + ppXOngrid += wwidth//2 else: - ppXAxis += width/2 - ppXOngrid -= wwidth/2 + ppXAxis += width//2 + ppXOngrid -= wwidth//2 if useBigVia: bvia = BigVia( component.getNet() , self.getLayerDepth(component.getLayer()) diff --git a/cumulus/src/plugins/alpha/utils.py b/cumulus/src/plugins/alpha/utils.py index 79ab4fda..f58bdbc8 100644 --- a/cumulus/src/plugins/alpha/utils.py +++ b/cumulus/src/plugins/alpha/utils.py @@ -1,6 +1,6 @@ -# + # This file is part of the Coriolis Software. -# Copyright (c) SU 2020-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -13,7 +13,6 @@ # +-----------------------------------------------------------------+ -from __future__ import print_function from Hurricane import Breakpoint from Hurricane import Box from Hurricane import Vertical diff --git a/cumulus/src/plugins/block.py b/cumulus/src/plugins/block.py index 72934e30..8e04ba1a 100644 --- a/cumulus/src/plugins/block.py +++ b/cumulus/src/plugins/block.py @@ -1,6 +1,6 @@ -# + # This file is part of the Coriolis Software. -# Copyright (c) SU 2020-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -16,7 +16,6 @@ This script hook the Block plugin inside GCT/Unicorn. """ -from __future__ import print_function import sys import traceback import helpers @@ -40,7 +39,6 @@ from plugins.alpha.block.block import Block def unicornHook ( **kw ): kw['beforeAction'] = 'misc.alpha' - plugins.kwUnicornHook( 'misc.alpha.block' , 'Block P&&R' , 'Perform block-level placement' @@ -56,15 +54,12 @@ def scriptMain ( **kw ): try: helpers.setTraceLevel( 550 ) cell, editor = plugins.kwParseMain( **kw ) - block = Block.create( cell ) if editor: block.setEditor( editor ) rvalue = block.build() - except Exception, e: + except Exception as e: helpers.io.catch( e ) rvalue = False - sys.stdout.flush() sys.stderr.flush() - return rvalue diff --git a/cumulus/src/plugins/block/vchannels.py b/cumulus/src/plugins/block/vchannels.py index f9ee9d4b..5ebc3394 100644 --- a/cumulus/src/plugins/block/vchannels.py +++ b/cumulus/src/plugins/block/vchannels.py @@ -1,7 +1,6 @@ -#!/usr/bin/env python -# + # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2014-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -66,15 +65,16 @@ class VChannels ( object ): xMin = self.cell.getAbutmentBox().getXMin() xMax = self.cell.getAbutmentBox().getXMax() if x < xMin or x >= xMax: - print ErrorMessage( 1, [ 'VChannels.addChannelAt(): Attempt to add a channel outside abutment box, ignored.' - , '(%s must be included in [%s..%s]' % ( DbU.getValueString(x) - , DbU.getValueString(xMin) - , DbU.getValueString(xMax) ) ] ), + print( ErrorMessage( 1, [ 'VChannels.addChannelAt(): Attempt to add a channel outside abutment box, ignored.' + , '({} must be included in [{}..{}]'.format( DbU.getValueString(x) + , DbU.getValueString(xMin) + , DbU.getValueString(xMax) ) ] )) return False for i in range(len(self.vchannels)): if self.vchannels[i][0] == x: - print ErrorMessage( 1, 'VChannels.addChannelAt(): Attempt to add a channel twice at position %s, ignored.' % DbU.getValueString(x) ), + print( ErrorMessage( 1, 'VChannels.addChannelAt(): Attempt to add a channel twice at position {}, ignored.' \ + .format(DbU.getValueString(x)) )) return False if self.vchannels[i][0] > x: self.vchannels.insert( i, (x,width) ) @@ -126,5 +126,5 @@ class VChannels ( object ): UpdateSession.close() spaceMargin = (float(dw) * 100.0) / float(ab.getWidth()) - vprint( 1, ' - V-Channels space margin: %d%%.' % spaceMargin ) + vprint( 1, ' - V-Channels space margin: {}%%.'.format(spaceMargin) ) return diff --git a/cumulus/src/plugins/checks.py b/cumulus/src/plugins/checks.py index 8bc6ab16..9f53d26b 100644 --- a/cumulus/src/plugins/checks.py +++ b/cumulus/src/plugins/checks.py @@ -1,7 +1,6 @@ -#!/usr/bin/env python -# + # This file is part of the Coriolis Software. -# Copyright (c) SU 2021-2021, All Rights Reserved +# Copyright (c) Sorbonne Université 2021-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -14,7 +13,6 @@ # +-----------------------------------------------------------------+ -from __future__ import print_function import sys import traceback import os.path @@ -27,7 +25,7 @@ try: from helpers.io import WarningMessage import plugins from Hurricane import Net, Plug -except Exception, e: +except Exception as e: helpers.io.catch( e ) sys.exit(2) @@ -92,7 +90,7 @@ def scriptMain ( **kw ): print( WarningMessage( 'No Cell loaded in the editor (yet), nothing done.' ) ) return 0 oneDriver( cell ) - except Exception, e: + except Exception as e: helpers.io.catch( e ) sys.stdout.flush() sys.stderr.flush() diff --git a/cumulus/src/plugins/chip/__init__.py b/cumulus/src/plugins/chip/__init__.py index 5b897ab8..f94ebb8b 100644 --- a/cumulus/src/plugins/chip/__init__.py +++ b/cumulus/src/plugins/chip/__init__.py @@ -1,7 +1,6 @@ -# -*- explicit-buffer-name: "__init__.py" -*- -# + # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2014-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -41,12 +40,12 @@ OnVerticalPitch = 0x0100 def importConstants ( symbols ): if not isinstance(symbols,dict): - print WarningMessage( 'plugins.chip.__init__.importConstants(), argument is not a symbol table.' ) + print( WarningMessage( 'plugins.chip.__init__.importConstants(), argument is not a symbol table.' )) return for symbol in globals().items(): - if isinstance(symbol[1],int) or isinstance(symbol[1],long): - if not symbols.has_key(symbol[0]): + if isinstance(symbol[1],int): + if not symbol[0] in symbols: symbols[ symbol[0] ] = symbol[1] return diff --git a/cumulus/src/plugins/chip/blockcorona.py b/cumulus/src/plugins/chip/blockcorona.py index f0b52813..535b9b89 100644 --- a/cumulus/src/plugins/chip/blockcorona.py +++ b/cumulus/src/plugins/chip/blockcorona.py @@ -1,7 +1,6 @@ -#!/usr/bin/env python -# + # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2014-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -107,11 +106,11 @@ class HorizontalRail ( Rail ): , 'power pad is likely to be to far off west or east.' , '(core:%s)' % str(self.side.innerBb) ] ) - #print ' HorizontalRail.connect() net:%s contact:%s' % (self.net.getName(),str(contact)) + #print( ' HorizontalRail.connect() net:{} contact:{}'.format(self.net.getName(),contact) ) #if self.net != contact.getNet(): return False - if self.vias.has_key(contact.getX()): return False + if contact.getX() in self.vias: return False - keys = self.vias.keys() + keys = list( self.vias.keys() ) keys.sort() insertIndex = bisect.bisect_left( keys, contact.getX() ) @@ -119,11 +118,11 @@ class HorizontalRail ( Rail ): if insertIndex < len(keys): insertPosition = keys[ insertIndex ] if contactBb.getXMax() >= self.vias[insertPosition][2].getBoundingBox().getXMin(): - #print 'Reject contact %s intersect NEXT' % str(contact) + #print( 'Reject contact {} intersect NEXT'.format(contact) ) return False if insertIndex > 0: if self.vias[keys[insertIndex-1]][2].getBoundingBox().getXMax() >= contactBb.getXMin(): - #print 'Reject contact %s intersect PREVIOUS' % str(contact) + #print( 'Reject contact {} intersect PREVIOUS'.format(contact) ) return False self.vias[ contact.getX() ] = [ contact.getX() @@ -144,7 +143,7 @@ class HorizontalRail ( Rail ): return True def doLayout ( self ): - #print 'HorizontalRail[%s] @%d' % (self.order,DbU.toLambda(self.axis)) + #print( 'HorizontalRail[{}] @{}'.format(self.order,DbU.toLambda(self.axis)) ) railVias = [ self.side.corner0(self.order) , self.side.corner1(self.order) ] @@ -154,15 +153,15 @@ class HorizontalRail ( Rail ): via[1].mergeDepth( self.side.getLayerDepth(self.side.getVLayer()) ) via[1].doLayout() - #print ' Connect:', via[2], via[1].getVia( via[2].getLayer() ) + #print( ' Connect:', via[2], via[1].getVia( via[2].getLayer() )) Vertical.create( via[1].getVia( via[2].getLayer() ) , via[2] , via[2].getLayer() , via[2].getX() , via[2].getWidth() ) - #print via[1]._vias, '[%d %d]' % (via[1]._bottomDepth,via[1]._topDepth) - #print via[1], self.side.getVLayer(), via[1].getVia( self.side.getVLayer() ) + #print( via[1]._vias, '[{} {}]' % ( via[1]._bottomDepth, via[1]._topDepth )) + #print( via[1], self.side.getVLayer(), via[1].getVia( self.side.getVLayer() )) railVias.append( via[1].getVia( self.side.getVLayer()) ) for i in range(1,len(railVias)): @@ -182,7 +181,7 @@ class VerticalRail ( Rail ): return def doLayout ( self ): - #print 'VerticalRail[%s] @%d' % (self.order,DbU.toLambda(self.axis)) + #print( 'VerticalRail[{}] @{}'.format(self.order,DbU.toLambda(self.axis))) railVias = [ self.side.corner0(self.order) , self.side.corner1(self.order) ] @@ -234,12 +233,12 @@ class VerticalRail ( Rail ): , '(core:%s)' % str(self.side.innerBb) ] ) #if self.net != contact.getNet(): return False - if self.vias.has_key(contact.getY()): return False + if contact.getY() in self.vias: return False trace( 550, ',+', '\tVerticalRail.connect() [%s] @%d\n' % (self.order,DbU.toLambda(self.axis)) ) trace( 550, contact ) - keys = self.vias.keys() + keys = list( self.vias.keys() ) keys.sort() insertIndex = bisect.bisect_left( keys, contact.getY() ) trace( 550, ',+', '\tkeys:' ) @@ -334,10 +333,10 @@ class Side ( object ): def connectPads ( self, padSide ): for contact in padSide.pins: if not contact.getNet().isSupply() and not contact.getNet().isClock(): continue - #print ' Connect to [-%i] @%d' % (0, DbU.toLambda(self.getOuterRail(0).axis)) + #print( ' Connect to [-{}] @{}'.format(0, DbU.toLambda(self.getOuterRail(0).axis))) self.getOuterRail( 0 ).connect( contact ) - halfRails = (len(self.rails)-1)/2 + halfRails = (len(self.rails)-1)//2 trace( 550, 'halfRails:%i' % halfRails ) for contact in padSide.pins: if not contact.getNet().isSupply() and not contact.getNet().isClock(): continue @@ -361,7 +360,7 @@ class HorizontalSide ( Side ): self.rails = [] for i in range(self.railsNb): self.rails.append( HorizontalRail(self,i,self.getRailAxis(i)) ) - #print ' Rail [%i] @%d' % (i,DbU.toLambda(self._rails[-1].axis)) + #print( ' Rail [{}] @{}'.format(i,DbU.toLambda(self._rails[-1].axis))) return @@ -372,8 +371,8 @@ class SouthSide ( HorizontalSide ): return def getRailAxis ( self, i ): - return self.innerBb.getYMin() - self.hRailWidth/2 - self.hRailSpace \ - - i*(self.hRailWidth + self.hRailSpace) + return self.innerBb.getYMin() - self.hRailWidth//2 - self.hRailSpace \ + - i*(self.hRailWidth + self.hRailSpace) def corner0 ( self, i ): return self.corners[SouthWest][i] def corner1 ( self, i ): return self.corners[SouthEast][i] @@ -386,8 +385,8 @@ class NorthSide ( HorizontalSide ): return def getRailAxis ( self, i ): - return self.innerBb.getYMax() + self.hRailWidth/2 + self.hRailSpace \ - + i*(self.hRailWidth + self.hRailSpace) + return self.innerBb.getYMax() + self.hRailWidth//2 + self.hRailSpace \ + + i*(self.hRailWidth + self.hRailSpace) def corner0 ( self, i ): return self.corners[NorthWest][i] def corner1 ( self, i ): return self.corners[NorthEast][i] @@ -409,36 +408,37 @@ class VerticalSide ( Side ): for via in rail.vias.values(): if via[1].getNet() != via[2].getNet(): continue - spans.merge( via[1]._y - via[1]._height/2, via[1]._y + via[1]._height/2 ) + spans.merge( via[1]._y - via[1]._height//2, via[1]._y + via[1]._height//2 ) routingGauge = self.corona.routingGauge - for depth in range(self.getInnerRail(0).vias.values()[0][1].bottomDepth - ,self.getInnerRail(0).vias.values()[0][1].topDepth ): - blockageLayer = routingGauge.getRoutingLayer(depth).getBlockageLayer() - pitch = routingGauge.getLayerPitch(depth) - - for chunk in spans.chunks: - Horizontal.create( self.blockageNet - , blockageLayer - , (chunk.getVMax() + chunk.getVMin())/2 - , chunk.getVMax() - chunk.getVMin() + pitch*2 - , sideXMin - , sideXMax - ) - - depth -= 2 - if depth > 0: - blockageLayer = routingGauge.getRoutingLayer(depth).getBlockageLayer() - pitch = routingGauge.getLayerPitch(depth) - - for chunk in spans.chunks: - Horizontal.create( self.blockageNet - , blockageLayer - , (chunk.getVMax() + chunk.getVMin())/2 - , chunk.getVMax() - chunk.getVMin() + pitch*2 - , sideXMin - , sideXMax - ) + if len(self.getInnerRail(0).vias): + for depth in range(next(iter(self.getInnerRail(0).vias.values()))[1].bottomDepth + ,next(iter(self.getInnerRail(0).vias.values()))[1].topDepth ): + blockageLayer = routingGauge.getRoutingLayer(depth).getBlockageLayer() + pitch = routingGauge.getLayerPitch(depth) + + for chunk in spans.chunks: + Horizontal.create( self.blockageNet + , blockageLayer + , (chunk.getVMax() + chunk.getVMin())//2 + , chunk.getVMax() - chunk.getVMin() + pitch*2 + , sideXMin + , sideXMax + ) + + depth -= 2 + if depth > 0: + blockageLayer = routingGauge.getRoutingLayer(depth).getBlockageLayer() + pitch = routingGauge.getLayerPitch(depth) + + for chunk in spans.chunks: + Horizontal.create( self.blockageNet + , blockageLayer + , (chunk.getVMax() + chunk.getVMin())//2 + , chunk.getVMax() - chunk.getVMin() + pitch*2 + , sideXMin + , sideXMax + ) return @@ -449,8 +449,8 @@ class WestSide ( VerticalSide ): return def getRailAxis ( self, i ): - return self.innerBb.getXMin() - self.vRailWidth/2 - self.vRailSpace \ - - i*(self.vRailWidth + self.vRailSpace) + return self.innerBb.getXMin() - self.vRailWidth//2 - self.vRailSpace \ + - i*(self.vRailWidth + self.vRailSpace) def corner0 ( self, i ): return self.corners[SouthWest][i] def corner1 ( self, i ): return self.corners[NorthWest ][i] @@ -469,8 +469,8 @@ class EastSide ( VerticalSide ): return def getRailAxis ( self, i ): - return self.innerBb.getXMax() + self.vRailWidth/2 + self.vRailSpace \ - + i*(self.vRailWidth + self.vRailSpace) + return self.innerBb.getXMax() + self.vRailWidth//2 + self.vRailSpace \ + + i*(self.vRailWidth + self.vRailSpace) def corner0 ( self, i ): return self.corners[SouthEast][i] def corner1 ( self, i ): return self.corners[NorthEast ][i] @@ -494,7 +494,7 @@ class Corona ( object ): self.innerBb = self.block.bb self.block.path.getTransformation().applyOn( self.innerBb ) - self.innerBb.inflate( self.hRailSpace/2, self.vRailSpace/2 ) + self.innerBb.inflate( self.hRailSpace//2, self.vRailSpace//2 ) if not self.conf.useClockTree: self.railsNb -= 1 diff --git a/cumulus/src/plugins/chip/blockpower.py b/cumulus/src/plugins/chip/blockpower.py index 76135ebe..3b82e327 100644 --- a/cumulus/src/plugins/chip/blockpower.py +++ b/cumulus/src/plugins/chip/blockpower.py @@ -1,7 +1,6 @@ -#!/usr/bin/env python -# + # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2014-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -40,7 +39,7 @@ class Side ( object ): return def addTerminal ( self, position, width ): - toMerge = Interval( position-width/2, position+width/2 ) + toMerge = Interval( position-width//2, position+width//2 ) length = len(self.terminals) imerge = length @@ -106,8 +105,8 @@ class Side ( object ): class Plane ( object ): - Horizontal = 0001 - Vertical = 0002 + Horizontal = 1 + Vertical = 2 def __init__ ( self, block, metal ): self.block = block @@ -116,7 +115,7 @@ class Plane ( object ): return def addTerminal ( self, net, direction, bb ): - if not self.sides.has_key(net): + if not net in self.sides: self.sides[ net ] = { North : Side(self.block,North,net,self.metal) , South : Side(self.block,South,net,self.metal) , East : Side(self.block,East ,net,self.metal) @@ -160,8 +159,8 @@ class GoCb ( object ): if not direction: return rootNet = None - if go.getNet().getType() == long(Net.Type.POWER): rootNet = self.block.conf.coronaVdd - if go.getNet().getType() == long(Net.Type.GROUND): rootNet = self.block.conf.coronaVss + if go.getNet().getType() == int(Net.Type.POWER): rootNet = self.block.conf.coronaVdd + if go.getNet().getType() == int(Net.Type.GROUND): rootNet = self.block.conf.coronaVss if not rootNet: return if self.block.activePlane: @@ -169,7 +168,7 @@ class GoCb ( object ): query.getPath().getTransformation().applyOn( bb ) self.block.activePlane.addTerminal( rootNet, direction, bb ) else: - print WarningMessage( 'BlockPower.GoCb() callback called without an active plane.' ) + print( WarningMessage( 'BlockPower.GoCb() callback called without an active plane.' )) return @@ -211,7 +210,7 @@ class Block ( object ): def connectClock ( self ): if not self.conf.useClockTree: - print WarningMessage( "Clock tree generation has been disabled ('chip.clockTree':False)." ) + print( WarningMessage( "Clock tree generation has been disabled ('chip.clockTree':False)." )) return if not self.conf.coronaCk: diff --git a/cumulus/src/plugins/chip/chip.py b/cumulus/src/plugins/chip/chip.py index 6815767f..c1f68bfb 100644 --- a/cumulus/src/plugins/chip/chip.py +++ b/cumulus/src/plugins/chip/chip.py @@ -1,7 +1,6 @@ -#!/usr/bin/env python -# + # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2014-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -124,8 +123,8 @@ class PlaceRoute ( object ): UpdateSession.open() self.conf.core.setAbutmentBox( self.conf.coreSize ) - x = (coronaAb.getWidth () - self.conf.coreSize.getWidth ()) / 2 - y = (coronaAb.getHeight() - self.conf.coreSize.getHeight()) / 2 + x = (coronaAb.getWidth () - self.conf.coreSize.getWidth ()) // 2 + y = (coronaAb.getHeight() - self.conf.coreSize.getHeight()) // 2 x = x - (x % self.conf.getSliceHeight()) y = y - (y % self.conf.getSliceHeight()) self.conf.icore.setTransformation ( Transformation(x,y,Transformation.Orientation.ID) ) @@ -150,7 +149,7 @@ class PlaceRoute ( object ): if plug.getInstance() == self.conf.icore: coreCk = plug.getMasterNet() if not coreCk: - print WarningMessage( 'Core <%s> is not connected to chip clock.' % self.conf.icore.getName() ) + print( WarningMessage( 'Core "{}" is not connected to chip clock.'.format(self.conf.icore.getName()) )) if self.conf.useClockTree and coreCk: ht = plugins.cts.clocktree.HTree.create( self.conf, coreCell, coreCk, coreCell.getAbutmentBox() ) @@ -160,6 +159,8 @@ class PlaceRoute ( object ): etesian.setBlock( self.conf.icore ) etesian.setViewer( self.conf.viewer ) etesian.place() + etesian.toHurricane() + etesian.flattenPower() etesian.destroy() ht.connectLeaf() @@ -169,6 +170,8 @@ class PlaceRoute ( object ): etesian = Etesian.EtesianEngine.create( self.conf.corona ) etesian.setBlock( self.conf.icore ) etesian.place() + etesian.toHurricane() + etesian.flattenPower() etesian.destroy() return diff --git a/cumulus/src/plugins/chip/configuration.py b/cumulus/src/plugins/chip/configuration.py index 10f3ece1..851f12a0 100644 --- a/cumulus/src/plugins/chip/configuration.py +++ b/cumulus/src/plugins/chip/configuration.py @@ -1,7 +1,6 @@ -# -*- explicit-buffer-name: "configuration.py" -*- -# + # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2014-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -83,12 +82,12 @@ def getRpBb ( instance, netName ): def showNet ( cell, netName ): net = cell.getNet(netName) if not net: - print ErrorMessage( 3, 'Cell %s doesn\'t have net %s' % (cell.getName(),netName) ) + print( ErrorMessage( 3, 'Cell {} doesn\'t have net {}'.format(cell.getName(),netName) )) return - print 'Components of', netName + print( 'Components of', netName ) for component in net.getComponents(): - print '| ', component, component.getBoundingBox() + print( '| ', component, component.getBoundingBox() ) return @@ -240,8 +239,8 @@ class GaugeConf ( object ): self.topLayerDepth = layerGauge.getDepth() break if not self.topLayerDepth: - print WarningMessage( 'Gauge top layer not defined, using top of gauge (%d).' \ - % self.routingGauge.getDepth() ) + print( WarningMessage( 'Gauge top layer not defined, using top of gauge ({}).' \ + .format(self.routingGauge.getDepth()) )) self.topLayerDepth = self.routingGauge.getDepth() - 1 self.horizontalDepth = -1 @@ -271,7 +270,7 @@ class GaugeConf ( object ): def _loadIoPadGauge ( self, ioPadGaugeName ): self.ioPadGauge = CRL.AllianceFramework.get().getCellGauge( ioPadGaugeName ) if not self.ioPadGauge: - print WarningMessage( 'IO pad gauge "%s" not found.' % ioPadGaugeName ) + print( WarningMessage( 'IO pad gauge "{}" not found.'.format(ioPadGaugeName) )) return def isHorizontal ( self, layer ): @@ -281,8 +280,8 @@ class GaugeConf ( object ): if lg.getDirection() == RoutingLayerGauge.Horizontal: return True return False - print ErrorMessage( 1, 'GaugeConf.isHorizontal(): Layer "%s" is not part of gauge "%s", cannot know preferred direction.' \ - % (layer.getName(), self.routingGauge.getName()) ) + print( ErrorMessage( 1, 'GaugeConf.isHorizontal(): Layer "{}" is not part of gauge "{}", cannot know preferred direction.' \ + .format(layer.getName(), self.routingGauge.getName()) )) return False def isVertical ( self, layer ): return not self.isHorizontal( layer ) @@ -347,7 +346,7 @@ class GaugeConf ( object ): def _rpAccess ( self, rp, flags ): trace( 550, ',+', '\t_rpAccess() %s\n' % str(rp) ) - if self._rpToAccess.has_key(rp): + if rp in self._rpToAccess: trace( 550, '-' ) return self._rpToAccess[rp] @@ -362,7 +361,7 @@ class GaugeConf ( object ): hoffset = self.routingGauge.getLayerGauge(hdepth).getOffset() contact1 = Contact.create( rp, self.routingGauge.getContactLayer(0), 0, 0 ) midSliceY = contact1.getY() - (contact1.getY() % self.cellGauge.getSliceHeight()) \ - + self.cellGauge.getSliceHeight() / 2 + + self.cellGauge.getSliceHeight() // 2 midTrackY = midSliceY - ((midSliceY - hoffset) % hpitch) dy = midSliceY - contact1.getY() @@ -413,7 +412,7 @@ class GaugeConf ( object ): def _rpByOccurrence ( self, occurrence, net ): plug = occurrence.getEntity() - if self._plugToRp.has_key(plug): + if plug in self._plugToRp: rp = self._plugToRp[plug] else: rp = RoutingPad.create( net, occurrence, RoutingPad.BiggestArea ) @@ -423,7 +422,7 @@ class GaugeConf ( object ): def _rpAccessByOccurrence ( self, occurrence, net, flags ): plug = occurrence.getEntity() - if self._plugToRp.has_key(plug): + if plug in self._plugToRp: rp = self._plugToRp[plug] else: rp = RoutingPad.create( net, occurrence, RoutingPad.BiggestArea ) @@ -432,7 +431,7 @@ class GaugeConf ( object ): return self._rpAccess( self._rpByOccurrence(occurrence,net), flags ) def _rpByPlug ( self, plug, net ): - if self._plugToRp.has_key(plug): + if plug in self._plugToRp: rp = self._plugToRp[plug] else: occurrence = Occurrence( plug, Path(net.getCell(),'') ) @@ -488,7 +487,7 @@ class ChipConf ( object ): @staticmethod def toSymbolic ( v, rounding ): - if isinstance(v,long): return ChipConf._toSymbolic( v, rounding ) + if isinstance(v,int): return ChipConf._toSymbolic( v, rounding ) if isinstance(v,Box): if rounding & Inwards: roundings = [ Superior @@ -510,28 +509,28 @@ class ChipConf ( object ): @staticmethod def _readChipSize( chipConfigDict ): - if not chipConfigDict.has_key('chip.size'): return Box() + if not 'chip.size' in chipConfigDict: return Box() chipSize = chipConfigDict['chip.size'] if not isinstance(chipSize,tuple): - print ErrorMessage( 1, 'The Chip size parameter is *not* a tuple.' ) + print( ErrorMessage( 1, 'The Chip size parameter is *not* a tuple.' )) return Box() if len(chipSize) != 2: - print ErrorMessage( 1, 'The Chip size parameter is *not* a tuple of exactly two items.' ) + print( ErrorMessage( 1, 'The Chip size parameter is *not* a tuple of exactly two items.' )) return Box() return Box( 0, 0, chipSize[0], chipSize[1] ) @staticmethod def _readCoreSize( chipConfigDict ): - if not chipConfigDict.has_key('core.size'): - print ErrorMessage( 1, 'The Core size parameter is missing.' ) + if not 'core.size' in chipConfigDict: + print( ErrorMessage( 1, 'The Core size parameter is missing.' )) return Box() coreSize = chipConfigDict['core.size'] if not isinstance(coreSize,tuple): - print ErrorMessage( 1, 'The Core size parameter is *not* a tuple.' ) + print( ErrorMessage( 1, 'The Core size parameter is *not* a tuple.' )) return Box() if len(coreSize) != 2: - print ErrorMessage( 1, 'The Core size parameter is *not* a tuple of exactly two items.' ) + print( ErrorMessage( 1, 'The Core size parameter is *not* a tuple of exactly two items.' )) return Box() return Box( 0, 0, coreSize[0], coreSize[1] ) @@ -539,7 +538,7 @@ class ChipConf ( object ): @staticmethod def _readClockTree( chipConfigDict ): useClockTree = False - if chipConfigDict.has_key('chip.clockTree'): + if 'chip.clockTree' in chipConfigDict: if chipConfigDict['chip.clockTree']: useClockTree = True return useClockTree @@ -547,12 +546,12 @@ class ChipConf ( object ): @staticmethod def _readChipName( chipConfigDict ): - if chipConfigDict.has_key('chip.name'): return chipConfigDict['chip.name'] + if 'chip.name' in chipConfigDict: return chipConfigDict['chip.name'] return 'chip' def _loadIoPadGauge ( self, chipConfigDict ): - if not chipConfigDict.has_key('pads.ioPadGauge'): + if not 'pads.ioPadGauge' in chipConfigDict: #raise ErrorMessage( 1, 'The IO pad gauge configuration parameter "pads.ioPadGauge" is missing.' ) return self.gaugeConf._loadIoPadGauge( chipConfigDict['pads.ioPadGauge'] ) @@ -560,7 +559,7 @@ class ChipConf ( object ): def _readPads ( self, chipConfigDict, keyword ): - if not chipConfigDict.has_key(keyword): return [] + if not keyword in chipConfigDict: return [] padConfList = chipConfigDict[keyword] if not isinstance(padConfList,list): raise ErrorMessage( 1, 'The "%s" entry is not a list.' ) @@ -575,7 +574,7 @@ class ChipConf ( object ): instanceName = padConfList[i] elif isinstance(padConfList[i],list): self.padsHavePosition = True - if isinstance(padConfList[i][0],long) and isinstance(padConfList[i][1],str): + if isinstance(padConfList[i][0],int) and isinstance(padConfList[i][1],str): position = padConfList[i][0] instanceName = padConfList[i][1] @@ -590,7 +589,7 @@ class ChipConf ( object ): def _readPadInstances ( self, chipConfigDict ): - if not chipConfigDict.has_key('pads.instances'): return [ ] + if not 'pads.instances' in chipConfigDict: return [ ] padInstancesConf = chipConfigDict['pads.instances'] if not isinstance(padInstancesConf,list): @@ -734,20 +733,20 @@ class ChipConf ( object ): uTrackMin = lg.getTrackPosition( abMin, iTrackMin ) uTrackMax = lg.getTrackPosition( abMin, iTrackMax ) - axis = (uTrackMax + uTrackMin) / 2 + axis = (uTrackMax + uTrackMin) // 2 width = (iTrackMax - iTrackMin) * lg.getPitch() + lg.getWireWidth() if self.gaugeConf.routingGauge.isSymbolic(): oneLambda = DbU.fromLambda( 1.0 ) if axis % oneLambda: - axis -= oneLambda / 2 + axis -= oneLambda // 2 width -= oneLambda trace( 550, '\t[%i %i]\n' % (iTrackMin, iTrackMax) ) trace( 550, '\taxis: %sl %s\n' % (DbU.toLambda(axis ), DbU.getValueString(axis )) ) trace( 550, '\twidth: %sl %s\n' % (DbU.toLambda(width), DbU.getValueString(width)) ) else: - axis = (uMax + uMin) / 2 + axis = (uMax + uMin) // 2 width = (uMax - uMin) trace( 550, '-' ) @@ -812,7 +811,7 @@ class ChipConf ( object ): % (DbU.getValueString(chipXMin - coronaAb.getXMin()), DbU.toLambda(chipXMin - coronaAb.getXMin()) ) ) trace( 550, '\t| dxMax:%10s\n' % DbU.getValueString(chipXMax - coronaAb.getXMin()) ) - coronaY, width = self.toRoutingGauge( coronaY - width/2, coronaY + width/2, layer ) + coronaY, width = self.toRoutingGauge( coronaY - width//2, coronaY + width//2, layer ) trace( 550, '\t| On Grid\n' ) trace( 550, '\t| axis: %10sl or %10s\n' % (DbU.toLambda(coronaY), DbU.getValueString(coronaY)) ) @@ -843,7 +842,7 @@ class ChipConf ( object ): trace( 550, '\t| axis: %s\n' % DbU.getValueString(coronaX) ) trace( 550, '\t| width:%s\n' % DbU.getValueString(width) ) - coronaX, width = self.toRoutingGauge( coronaX - width/2, coronaX + width/2, layer ) + coronaX, width = self.toRoutingGauge( coronaX - width//2, coronaX + width//2, layer ) trace( 550, '\t| On Grid\n' ) trace( 550, '\t| axis: %s or %s\n' % (DbU.toLambda(coronaX), DbU.getValueString(coronaX)) ) @@ -873,11 +872,11 @@ class ChipConf ( object ): topLayer = layer.getTop() if self.gaugeConf.isHorizontal(topLayer): - coronaX, width = self.toRoutingGauge( coronaX - width /2, coronaX + width /2, layer.getBottom() ) - coronaY, height = self.toRoutingGauge( coronaY - height/2, coronaY + height/2, topLayer ) + coronaX, width = self.toRoutingGauge( coronaX - width //2, coronaX + width //2, layer.getBottom() ) + coronaY, height = self.toRoutingGauge( coronaY - height//2, coronaY + height//2, topLayer ) else: - coronaX, width = self.toRoutingGauge( coronaX - width /2, coronaX + width /2, topLayer ) - coronaY, height = self.toRoutingGauge( coronaY - height/2, coronaY + height/2, layer.getBottom() ) + coronaX, width = self.toRoutingGauge( coronaX - width //2, coronaX + width //2, topLayer ) + coronaY, height = self.toRoutingGauge( coronaY - height//2, coronaY + height//2, layer.getBottom() ) if not (flags & OnHorizontalPitch): trace( 550, '\tNot on horizontal routing pitch, Y on lambda only.\n' ) @@ -934,8 +933,8 @@ class ChipConf ( object ): coronaX = self.toSymbolic( chipX - coronaAb.getXMin(), Superior ) contacts = [] - xContact = coronaX - viaPitch * (array[0]-1)/2 - yContact = coronaY - viaPitch * (array[1]-1)/2 + xContact = coronaX - viaPitch * (array[0]-1)//2 + yContact = coronaY - viaPitch * (array[1]-1)//2 contactSize = layer.getMinimalSize() trace( 550, '\txContact:%sl yContact:%sl\n' % (DbU.toLambda(xContact),DbU.toLambda(yContact)) ) @@ -973,11 +972,11 @@ class ChipConf ( object ): topLayer = layer.getTop() if self.gaugeConf.isHorizontal(topLayer): - coronaX, width = self.toRoutingGauge( coronaX - width /2, coronaX + width /2, layer.getBottom() ) - coronaY, height = self.toRoutingGauge( coronaY - height/2, coronaY + height/2, topLayer ) + coronaX, width = self.toRoutingGauge( coronaX - width //2, coronaX + width //2, layer.getBottom() ) + coronaY, height = self.toRoutingGauge( coronaY - height//2, coronaY + height//2, topLayer ) else: - coronaX, width = self.toRoutingGauge( coronaX - width /2, coronaX + width /2, topLayer ) - coronaY, height = self.toRoutingGauge( coronaY - height/2, coronaY + height/2, layer.getBottom() ) + coronaX, width = self.toRoutingGauge( coronaX - width //2, coronaX + width //2, topLayer ) + coronaY, height = self.toRoutingGauge( coronaY - height//2, coronaY + height//2, layer.getBottom() ) if direction == Pin.Direction.NORTH or direction == Pin.Direction.SOUTH: trace( 550, '\tEast/West not on horizontal routing pitch, Y on lambda only.\n' ) @@ -1023,8 +1022,8 @@ class ChipConf ( object ): def checkNotFounds ( padList, side ): for i in range(len(padList)): if not isinstance(padList[i][1],Instance): - print ErrorMessage( 1, 'The pad [%d] (%s) of list %s do not exists in netlist (skipped).' - % (i,padList[i][1],side) ) + print( ErrorMessage( 1, 'The pad [{}] ({}) of list %s do not exists in netlist (skipped).' \ + .format(i,padList[i][1],side) )) return @@ -1158,7 +1157,7 @@ class ChipConf ( object ): padNet = self.cell.getNet( coronaNet.getName() ) if padNet: - if not netPads.has_key(padNet): + if not padNet in netPads: trace( 550, '\t%20s <-> %-20s\n' % (padNet.getName(),coronaNet.getName()) ) netPads[ padNet ] = coronaNet else: @@ -1298,7 +1297,7 @@ def loadConfiguration ( cell, viewer=None ): raise ErrorMessage( 1, 'ChipPlugin, configuration directory "./coriolis2/" is missing "__init__.py".' ) from coriolis2.ioring import chip - except Exception, e: + except Exception as e: catch( e ) return ChipConf( chip, cell, viewer ) diff --git a/cumulus/src/plugins/chip/padscorona.py b/cumulus/src/plugins/chip/padscorona.py index 0d861172..e98318c0 100644 --- a/cumulus/src/plugins/chip/padscorona.py +++ b/cumulus/src/plugins/chip/padscorona.py @@ -1,7 +1,6 @@ -#!/usr/bin/env python -# + # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2014-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -454,7 +453,7 @@ class Side ( object ): if m: padName = m.group( 'power' ) padNet = padInstance.getMasterCell().getNet( padName ) - #print 'padName:', padName, 'padNet:', padNet + #print( 'padName:', padName, 'padNet:', padNet ) if padNet: plug = padInstance.getPlug( padNet ) chipNet = plug.getNet() @@ -470,7 +469,7 @@ class Side ( object ): def _placePads ( self ): padLength = 0 for pad in self.pads: padLength += pad[1].getMasterCell().getAbutmentBox().getWidth() - padSpacing = (self.sideLength - 2*self.conf.getIoPadHeight() - padLength) / (len(self.pads) + 1) + padSpacing = (self.sideLength - 2*self.conf.getIoPadHeight() - padLength) // (len(self.pads) + 1) if self.conf.padsHavePosition: for i in range(len(self.pads)): @@ -510,8 +509,8 @@ class Side ( object ): uMin -= DbU.fromLambda(5.0) uMax += DbU.fromLambda(5.0) else: - uMin -= width/2 - uMax += width/2 + uMin -= width//2 + uMax += width//2 if self.type == North or self.type == South: if self.type == North: @@ -706,7 +705,7 @@ class CoreWire ( object ): + self.symContactLayer.getMinimalSize() arrayWidth = self.symContactSize[0] - arrayCount = (arrayWidth - contactMinSize) / CoreWire.viaPitch + arrayCount = (arrayWidth - contactMinSize) // CoreWire.viaPitch trace( 550, '\tCoreWire.viaPitch: %sl\n' % (DbU.toLambda(CoreWire.viaPitch)) ) trace( 550, '\tcontactMinSize: %sl, arrayWidth: %sl, arrayCount: %d\n' % (DbU.toLambda(contactMinSize),DbU.toLambda(arrayWidth),arrayCount) ) @@ -758,7 +757,7 @@ class CoreWire ( object ): xPadMax = xContact xCore = coronaAb.getXMin() if not self.preferredDir: - xPadMax += self.bbSegment.getHeight()/2 + xPadMax += self.bbSegment.getHeight()//2 else: accessDirection = Pin.Direction.EAST xPadMax = self.bbSegment.getXMax() @@ -766,7 +765,7 @@ class CoreWire ( object ): xPadMin = xContact xCore = coronaAb.getXMax() if not self.preferredDir: - xPadMin -= self.bbSegment.getHeight()/2 + xPadMin -= self.bbSegment.getHeight()//2 hReal = Horizontal.create( self.chipNet , self.padSegment.getLayer() @@ -856,7 +855,7 @@ class CoreWire ( object ): yContact = yPadMax yCore = coronaAb.getYMin() if not self.preferredDir: - yPadMax += self.bbSegment.getWidth()/2 + yPadMax += self.bbSegment.getWidth()//2 else: accessDirection = Pin.Direction.NORTH yPadMax = self.bbSegment.getYMax() @@ -864,7 +863,7 @@ class CoreWire ( object ): yContact = yPadMin yCore = coronaAb.getYMax() if not self.preferredDir: - yPadMin -= self.bbSegment.getWidth()/2 + yPadMin -= self.bbSegment.getWidth()//2 vReal = Vertical.create( self.chipNet , self.padSegment.getLayer() @@ -1054,7 +1053,7 @@ class Corona ( object ): if plug.getMasterNet().isClock(): hspan.inflate( DbU.fromLambda(5.0) ) else: - hspan.inflate( component.getWidth() / 2 ) + hspan.inflate( component.getWidth() // 2 ) if hspan.contains( ab.getXMin() ) or hspan.contains( ab.getXMax() ): duplicate = False @@ -1116,10 +1115,10 @@ class Corona ( object ): if depth > self.conf.gaugeConf.topLayerDepth: continue if lg.getDirection() == RoutingLayerGauge.Vertical: - if not vsegments.has_key(depth): vsegments[ depth ] = [] + if not depth in vsegments: vsegments[ depth ] = [] vsegments[ depth ].append( (component,bb) ) else: - if not hsegments.has_key(depth): hsegments[ depth ] = [] + if not depth in hsegments: hsegments[ depth ] = [] hsegments[ depth ].append( (component,bb) ) #if len(vsegments) + len(hsegments) == 0: @@ -1215,10 +1214,10 @@ class Corona ( object ): self.conf.setupCorona( self.westSide.gap, self.southSide.gap, self.eastSide.gap, self.northSide.gap ) self.coreSymBb = self.conf.getInstanceAb( self.conf.icorona ) - self.coreSymBb.inflate( self.conf.toSymbolic( self.westSide.gap /2, Superior ) - , self.conf.toSymbolic( self.southSide.gap/2, Superior ) - , self.conf.toSymbolic( self.eastSide.gap /2, Inferior ) - , self.conf.toSymbolic( self.northSide.gap/2, Inferior ) ) + self.coreSymBb.inflate( self.conf.toSymbolic( self.westSide.gap //2, Superior ) + , self.conf.toSymbolic( self.southSide.gap//2, Superior ) + , self.conf.toSymbolic( self.eastSide.gap //2, Inferior ) + , self.conf.toSymbolic( self.northSide.gap//2, Inferior ) ) self.southSide.drawCoreWires() self.northSide.drawCoreWires() @@ -1229,45 +1228,44 @@ class Corona ( object ): and len(self.westSide .coreWires) \ and not self.southSide.coreWires[0].inCoronaRange \ and not self.westSide .coreWires[0].inCoronaRange: - print ErrorMessage( 1, [ 'Corona._placeInnerCorona(): Both pads on south-east corner are outside corona range.' - , 'This will generate a short-circuit between S:"%s" and W:"%s".' % \ - ( self.southSide.coreWires[0].chipNet.getName() - , self.westSide .coreWires[0].chipNet.getName()) ] ) + print( ErrorMessage( 1, [ 'Corona._placeInnerCorona(): Both pads on south-east corner are outside corona range.' + , 'This will generate a short-circuit between S:"{}" and W:"{}".' \ + .format( self.southSide.coreWires[0].chipNet.getName() + , self.westSide .coreWires[0].chipNet.getName()) ] )) if len(self.southSide.coreWires) \ and len(self.eastSide .coreWires) \ and not self.southSide.coreWires[-1].inCoronaRange \ and not self.eastSide .coreWires[ 0].inCoronaRange: - print ErrorMessage( 1, [ 'Corona._placeInnerCorona(): Both pads on south-west corner are outside corona range.' - , 'This will generate a short-circuit between S:"%s" and E:"%s.' % \ - ( self.southSide.coreWires[-1].chipNet.getName() - , self.eastSide .coreWires[ 0].chipNet.getName()) ] ) + print( ErrorMessage( 1, [ 'Corona._placeInnerCorona(): Both pads on south-west corner are outside corona range.' + , 'This will generate a short-circuit between S:"{}" and E:"{}".' \ + .format( self.southSide.coreWires[-1].chipNet.getName() + , self.eastSide .coreWires[ 0].chipNet.getName()) ] )) if len(self.northSide.coreWires) \ and len(self.westSide .coreWires) \ and not self.northSide.coreWires[ 0].inCoronaRange \ and not self.westSide .coreWires[-1].inCoronaRange: - print ErrorMessage( 1, [ 'Corona._placeInnerCorona(): Both pads on north-east corner are outside corona range.' - , 'This will generate a short-circuit between N:"%s" and W:"%s".' % \ - ( self.northSide.coreWires[ 0].chipNet.getName() - , self.westSide .coreWires[-1].chipNet.getName()) ] ) + print( ErrorMessage( 1, [ 'Corona._placeInnerCorona(): Both pads on north-east corner are outside corona range.' + , 'This will generate a short-circuit between N:"{}" and W:"{}".' \ + .format( self.northSide.coreWires[ 0].chipNet.getName() + , self.westSide .coreWires[-1].chipNet.getName()) ] )) if len(self.northSide.coreWires) \ and len(self.eastSide .coreWires) \ and not self.northSide.coreWires[-1].inCoronaRange \ and not self.eastSide .coreWires[-1].inCoronaRange: - print ErrorMessage( 1, [ 'Corona._placeInnerCorona(): Both pads on north-west corner are outside corona range.' - , 'This will generate a short-circuit between N:"%s" and E:"%s.' % \ - ( self.northSide.coreWires[-1].chipNet.getName() - , self.eastSide .coreWires[-1].chipNet.getName()) ] ) - + print( ErrorMessage( 1, [ 'Corona._placeInnerCorona(): Both pads on north-west corner are outside corona range.' + , 'This will generate a short-circuit between N:"{}" and E:"{}".' \ + .format( self.northSide.coreWires[-1].chipNet.getName() + , self.eastSide .coreWires[-1].chipNet.getName()) ] )) return # def _locatePadRails ( self ): # if not self.clockPad: -# print ErrorMessage( 1, 'There must be at least one pad of model "%s" to guess the pad rails.' \ -# % self.pckName ) +# print( ErrorMessage( 1, 'There must be at least one pad of model "%s" to guess the pad rails.' \ +# .format(self.pckName) )) # return False # # for plug in self.clockPad.getPlugs(): diff --git a/cumulus/src/plugins/chipplace.py b/cumulus/src/plugins/chipplace.py index 5d28edc8..68153d2b 100644 --- a/cumulus/src/plugins/chipplace.py +++ b/cumulus/src/plugins/chipplace.py @@ -1,7 +1,6 @@ -#!/usr/bin/env python -# + # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2014-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -29,7 +28,6 @@ import plugins.chip.chip def unicornHook ( **kw ): kw['beforeAction'] = 'placeAndRoute.stepByStep' #kw['beforeAction'] = 'placeAndRoute.clockTree' - plugins.kwAddMenu ( 'placeAndRoute', 'P&&R', **kw ) plugins.kwUnicornHook( 'placeAndRoute.placeChip' , 'PLace Chip' @@ -45,19 +43,15 @@ def scriptMain ( **kw ): try: #helpers.setTraceLevel( 550 ) cell, editor = plugins.kwParseMain( **kw ) - conf = plugins.chip.configuration.loadConfiguration( cell, editor ) conf.chipValidate() if not conf.validated: return False - placeChip = plugins.chip.chip.PlaceRoute( conf ) placeChip.doChipPlacement() return placeChip.validated - except Exception, e: + except Exception as e: helpers.io.catch( e ) rvalue = False - sys.stdout.flush() sys.stderr.flush() - return rvalue diff --git a/cumulus/src/plugins/chiproute.py b/cumulus/src/plugins/chiproute.py index 0ce911d0..603c11ef 100644 --- a/cumulus/src/plugins/chiproute.py +++ b/cumulus/src/plugins/chiproute.py @@ -1,7 +1,6 @@ -#!/usr/bin/env python -# + # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2014-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -22,6 +21,7 @@ from helpers.io import ErrorMessage from helpers.io import WarningMessage import plugins import plugins.chip.chip +from Hurricane import Breakpoint # -------------------------------------------------------------------- @@ -44,24 +44,21 @@ def unicornHook ( **kw ): def scriptMain ( **kw ): rvalue = True try: - #helpers.setTraceLevel( 550 ) - + Breakpoint.setStopLevel( 99 ) + helpers.setTraceLevel( 550 ) cell, editor = plugins.kwParseMain( **kw ) conf = plugins.chip.configuration.loadConfiguration( cell, editor ) conf.chipValidate() if not conf.validated: return False - prChip = plugins.chip.chip.PlaceRoute( conf ) prChip.validate() prChip.doChipPlacement() prChip.doChipRouting() prChip.save() return prChip.validated - except Exception, e: + except Exception as e: helpers.io.catch( e ) rvalue = False - sys.stdout.flush() sys.stderr.flush() - return rvalue diff --git a/cumulus/src/plugins/clocktree.py b/cumulus/src/plugins/clocktree.py index 3e575509..cee90872 100644 --- a/cumulus/src/plugins/clocktree.py +++ b/cumulus/src/plugins/clocktree.py @@ -1,7 +1,6 @@ -#!/usr/bin/env python -# + # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2014-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -40,7 +39,6 @@ from plugins.chip.configuration import ChipConf def unicornHook ( **kw ): kw['beforeAction'] = 'placeAndRoute.placeChip' - plugins.kwAddMenu ( 'placeAndRoute', 'P&&R', **kw ) plugins.kwUnicornHook( 'placeAndRoute.clockTree' , 'Place Block && Clock Tree' @@ -55,34 +53,27 @@ def scriptMain ( **kw ): try: #helpers.setTraceLevel( 550 ) errorCode = 0 - - print ' o Cleaning up any previous run.' + print( ' o Cleaning up any previous run.' ) for fileName in os.listdir('.'): if fileName.endswith('.ap'): - print ' - <%s>' % fileName + print( ' - "{}"'.format(fileName) ) os.unlink(fileName) - cell = None - if kw.has_key('cell') and kw['cell']: + if ('cell' in kw) and kw['cell']: cell = kw['cell'] - editor = None - if kw.has_key('editor') and kw['editor']: + if ('editor' in kw) and kw['editor']: editor = kw['editor'] - print ' o Editor detected, running in graphic mode.' + print( ' o Editor detected, running in graphic mode.' ) if cell == None: cell = editor.getCell() - if cell == None: raise ErrorMessage( 3, 'ClockTree: No cell loaded yet.' ) - conf = ChipConf( {}, cell, editor ) - if cell.getAbutmentBox().isEmpty(): spaceMargin = Cfg.getParamPercentage('etesian.spaceMargin').asPercentage() / 100.0 + 0.01 aspectRatio = Cfg.getParamPercentage('etesian.aspectRatio').asPercentage() / 100.0 computeAbutmentBox( cell, spaceMargin, aspectRatio, conf.cellGauge ) if editor: editor.fit() - ht = HTree.create( conf, cell, None, cell.getAbutmentBox() ) if editor: editor.refresh() etesian = Etesian.EtesianEngine.create( cell ) @@ -91,9 +82,9 @@ def scriptMain ( **kw ): #ht.prune() ht.route() etesian.toHurricane() + etesian.flattenPower() etesian.destroy() ht.save( cell ) - except Exception, e: + except Exception as e: helpers.io.catch( e ) - return 0 diff --git a/cumulus/src/plugins/conductor.py b/cumulus/src/plugins/conductor.py index c95a4c79..7350a751 100644 --- a/cumulus/src/plugins/conductor.py +++ b/cumulus/src/plugins/conductor.py @@ -1,7 +1,6 @@ -#!/usr/bin/env python -# + # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -14,7 +13,6 @@ # +-----------------------------------------------------------------+ -from __future__ import print_function import sys import traceback import os.path @@ -37,7 +35,7 @@ try: import Katana import Unicorn import plugins -except Exception, e: +except Exception as e: catch( e ) sys.exit(2) @@ -88,11 +86,11 @@ def scriptMain ( **kw ): useFixedAbHeight = Cfg.getParamBool('conductor.useFixedAbHeight').asBool() cell = None - if kw.has_key('cell') and kw['cell']: + if ('cell' in kw) and kw['cell']: cell = kw['cell'] editor = None - if kw.has_key('editor') and kw['editor']: + if ('editor' in kw) and kw['editor']: editor = kw['editor'] print( ' o Editor found, running in graphic mode.' ) editor.setLayerVisible( 'rubber', False ) @@ -168,7 +166,7 @@ def scriptMain ( **kw ): Cfg.Configuration.popDefaultPriority() - except Exception, e: + except Exception as e: catch( e ) return 0 diff --git a/cumulus/src/plugins/core2chip/cmos.py b/cumulus/src/plugins/core2chip/cmos.py index cb8b7b8c..847dc379 100644 --- a/cumulus/src/plugins/core2chip/cmos.py +++ b/cumulus/src/plugins/core2chip/cmos.py @@ -1,8 +1,8 @@ -#!/usr/bin/env python + # -*- coding: utf-8 -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | diff --git a/cumulus/src/plugins/core2chip/core2chip.py b/cumulus/src/plugins/core2chip/core2chip.py index f076b885..267a2abc 100644 --- a/cumulus/src/plugins/core2chip/core2chip.py +++ b/cumulus/src/plugins/core2chip/core2chip.py @@ -1,8 +1,8 @@ -#!/usr/bin/env python + # -*- coding: utf-8 -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2018, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -238,7 +238,7 @@ class IoPad ( object ): ioNet.buildNets( context ) - if not self.coreToChip.ioPadInfos.has_key(self.direction): + if not self.direction in self.coreToChip.ioPadInfos: raise ErrorMessage( 1, 'IoPad.createPad(): Unsupported direction %d (%s) for pad "%s".' \ % (self.direction ,IoPad.directionToStr(self.direction) @@ -315,16 +315,16 @@ class CoreToChip ( object ): def hasIoNet ( self, netName ): - if self._ioNets.has_key(netName): return True + if netName in self._ioNets: return True return False def getIoNet ( self, coreNet ): if isinstance(coreNet,str): - if self._ioNets.has_key(coreNet): return self._ioNet[ coreNet ] + if coreNet in self._ioNets: return self._ioNet[ coreNet ] raise ErrorMessage( 1, 'CoreToChip.getIoNet(): Cannot lookup net "%s" by name.' % coreNet ) - if not self._ioNets.has_key(coreNet.getName()): + if not coreNet.getName() in self._ioNets: self._ioNets[ coreNet.getName() ] = IoNet( self, coreNet ) return self._ioNets[ coreNet.getName() ] @@ -350,7 +350,7 @@ class CoreToChip ( object ): return def _buildStandardPad ( self, ioNet ): - if not self.ioPadInfos.has_key(ioNet.coreNet.getDirection()): + if not ioNet.coreNet.getDirection() in self.ioPadInfos: raise ErrorMessage( 1, 'CoreToChip._buildStandardPad(): Unsupported direction %d (%s) for core net "%s".' \ % (ioNet.coreNet.getDirection() ,netDirectionToStr(ioNet.coreNet.getDirection()) diff --git a/cumulus/src/plugins/core2chip/phlib.py b/cumulus/src/plugins/core2chip/phlib.py index 18ae614c..64d6498a 100644 --- a/cumulus/src/plugins/core2chip/phlib.py +++ b/cumulus/src/plugins/core2chip/phlib.py @@ -1,8 +1,8 @@ -#!/usr/bin/env python + # -*- coding: utf-8 -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | diff --git a/cumulus/src/plugins/core2chip/phlib80.py b/cumulus/src/plugins/core2chip/phlib80.py index bbb37190..dec539b1 100644 --- a/cumulus/src/plugins/core2chip/phlib80.py +++ b/cumulus/src/plugins/core2chip/phlib80.py @@ -1,8 +1,8 @@ -#!/usr/bin/env python + # -*- coding: utf-8 -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | diff --git a/cumulus/src/plugins/core2chip_cmos.py b/cumulus/src/plugins/core2chip_cmos.py index e4f73d87..963c7734 100644 --- a/cumulus/src/plugins/core2chip_cmos.py +++ b/cumulus/src/plugins/core2chip_cmos.py @@ -1,8 +1,8 @@ -#!/usr/bin/env python + # -*- coding: utf-8 -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -28,7 +28,6 @@ import plugins.core2chip.cmos def unicornHook ( **kw ): kw['beforeAction'] = 'placeAndRoute.stepByStep' #kw['beforeAction'] = 'placeAndRoute.clockTree' - plugins.kwAddMenu ( 'placeAndRoute' , 'P&&R', **kw ) plugins.kwAddMenu ( 'placeAndRoute.core2chip', 'Core To Chip', **kw ) plugins.kwUnicornHook( 'placeAndRoute.core2chip.cmos' @@ -41,24 +40,18 @@ def unicornHook ( **kw ): def scriptMain ( **kw ): - rvalue = True - try: - #helpers.setTraceLevel( 550 ) - - cell, editor = plugins.kwParseMain( **kw ) - if not cell: - raise ErrorMessage( 1, 'CoreToChip_cmos.scriptMain(): No cell (core) loaded in the editor yet.' ) - - chip_cmos = plugins.core2chip.cmos.cmos( cell ) - chip_cmos.buildChip() - - if editor: editor.setCell( chip_cmos.chip ) - - except Exception, e: - helpers.io.catch( e ) - rvalue = False - - sys.stdout.flush() - sys.stderr.flush() - - return rvalue + rvalue = True + try: + #helpers.setTraceLevel( 550 ) + cell, editor = plugins.kwParseMain( **kw ) + if not cell: + raise ErrorMessage( 1, 'CoreToChip_cmos.scriptMain(): No cell (core) loaded in the editor yet.' ) + chip_cmos = plugins.core2chip.cmos.cmos( cell ) + chip_cmos.buildChip() + if editor: editor.setCell( chip_cmos.chip ) + except Exception as e: + helpers.io.catch( e ) + rvalue = False + sys.stdout.flush() + sys.stderr.flush() + return rvalue diff --git a/cumulus/src/plugins/core2chip_phlib80.py b/cumulus/src/plugins/core2chip_phlib80.py index defd17fa..da7459d8 100644 --- a/cumulus/src/plugins/core2chip_phlib80.py +++ b/cumulus/src/plugins/core2chip_phlib80.py @@ -1,8 +1,8 @@ -#!/usr/bin/env python + # -*- coding: utf-8 -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -28,7 +28,6 @@ import core2chip.phlib80 def unicornHook ( **kw ): kw['beforeAction'] = 'placeAndRoute.stepByStep' #kw['beforeAction'] = 'placeAndRoute.clockTree' - plugins.kwAddMenu ( 'placeAndRoute' , 'P&&R', **kw ) plugins.kwAddMenu ( 'placeAndRoute.core2chip', 'Core To Chip', **kw ) plugins.kwUnicornHook( 'placeAndRoute.core2chip.phlib80' @@ -41,24 +40,18 @@ def unicornHook ( **kw ): def scriptMain ( **kw ): - rvalue = True - try: - #helpers.setTraceLevel( 550 ) - - cell, editor = plugins.kwParseMain( **kw ) - if not cell: - raise ErrorMessage( 1, 'CoreToChip_phlib80.scriptMain(): No cell (core) loaded in the editor yet.' ) - - chip_phlib80 = core2chip.phlib80.phlib80( cell ) - chip_phlib80.buildChip() - - if editor: editor.setCell( chip_phlib80.chip ) - - except Exception, e: - helpers.io.catch( e ) - rvalue = False - - sys.stdout.flush() - sys.stderr.flush() - - return rvalue + rvalue = True + try: + #helpers.setTraceLevel( 550 ) + cell, editor = plugins.kwParseMain( **kw ) + if not cell: + raise ErrorMessage( 1, 'CoreToChip_phlib80.scriptMain(): No cell (core) loaded in the editor yet.' ) + chip_phlib80 = core2chip.phlib80.phlib80( cell ) + chip_phlib80.buildChip() + if editor: editor.setCell( chip_phlib80.chip ) + except Exception as e: + helpers.io.catch( e ) + rvalue = False + sys.stdout.flush() + sys.stderr.flush() + return rvalue diff --git a/cumulus/src/plugins/cts/clocktree.py b/cumulus/src/plugins/cts/clocktree.py index 1d576fdc..fc74f03b 100755 --- a/cumulus/src/plugins/cts/clocktree.py +++ b/cumulus/src/plugins/cts/clocktree.py @@ -1,7 +1,6 @@ -#!/usr/bin/env python -# + # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2014-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -64,14 +63,14 @@ class HTree ( object ): % aspectRatio ) ht = HTree( conf, cell, clockNet, clockBox ) - print ' o Creating clock H-Tree for "%s".' % cell.getName() - print ' - Clock is "%s"' % ht.masterClock.getName() + print( ' o Creating clock H-Tree for "{}".'.format(cell.getName()) ) + print( ' - Clock is "{}"'.format(ht.masterClock.getName()) ) ht.build() trace( 550, '\tht.build() OK\n' ) ht.place() trace( 550, '\tht.place() OK\n' ) #ht.route() - print ' - H-Tree depth: %d' % ht.getTreeDepth() + print( ' - H-Tree depth: {}'.format(ht.getTreeDepth()) ) trace( 550, '\tusedVTracks: %s\n' % str(ht.usedVTracks) ) return ht @@ -82,7 +81,7 @@ class HTree ( object ): if self.minSide < DbU.fromLambda(100.0): raise ErrorMessage( 3, 'ClockTree: clockTree.minimumSide (%g) is less than 100 lambda.' \ % DbU.toLambda(self.minSide) ) - print ' - Minimum side for clock area: %sl' % DbU.toLambda(self.minSide) + print( ' - Minimum side for clock area: {}'.format(DbU.toLambda(self.minSide)) ) UpdateSession.open() self.framework = CRL.AllianceFramework.get() @@ -150,7 +149,7 @@ class HTree ( object ): yslice = self.toYCellGrid(y) transformation = Transformation.Orientation.ID - if ((yslice-self.area.getYMin()) / self.conf.cellGauge.getSliceHeight()) % 2 != 0: + if ((yslice-self.area.getYMin()) // self.conf.cellGauge.getSliceHeight()) % 2 != 0: transformation = Transformation.Orientation.MY yslice += self.conf.cellGauge.getSliceHeight() @@ -165,7 +164,7 @@ class HTree ( object ): instance.destroy() x = transformation.getTx() - for i in range(instanceWidth/tieWidth): + for i in range(instanceWidth//tieWidth): feed = Instance.create( self.cell , 'htree_feed_%i' % self.feedCounter() , self.tieCell @@ -248,7 +247,7 @@ class HTree ( object ): # This is a Steiner point. node.component = self.conf.createContact( net , x - , node.y + self.conf.cellGauge.getSliceHeight()/2 - self.conf.routingGauge.getLayerGauge(self.horizontalDeepDepth).getPitch() + , node.y + self.conf.cellGauge.getSliceHeight()//2 - self.conf.routingGauge.getLayerGauge(self.horizontalDeepDepth).getPitch() , GaugeConf.DeepDepth ) trace( 550, '\tCreate (Steiner) node.component: @Y%d (y:%d - %d) %s\n' \ % (DbU.toLambda(node.realY) @@ -478,8 +477,8 @@ class HTreeNode ( object ): def place ( self ): trace( 550, '\rplace HTreeNode %s\n' % self.ckNet.getName() ) - x = self.area.getXMin() + self.area.getWidth ()/4 - y = self.area.getYMin() + self.area.getHeight()/4 + x = self.area.getXMin() + self.area.getWidth ()//4 + y = self.area.getYMin() + self.area.getHeight()//4 halfWidth = self.area.getHalfWidth () halfHeight = self.area.getHalfHeight() @@ -578,18 +577,18 @@ def computeAbutmentBox ( cell, spaceMargin, aspectRatio, cellGauge ): # instancesNb += 1 # cellLength += int( DbU.toLambda(instance.getMasterCell().getAbutmentBox().getWidth()) ) # - # # ar = x/y S = x*y = spaceMargin*SH x=S/y ar = S/y^2 - # # y = sqrt(S/AR) - # gcellLength = float(cellLength)*(1+spaceMargin) / sliceHeight - # rows = math.sqrt( gcellLength/aspectRatio ) + # # ar = x//y S = x*y = spaceMargin*SH x=S//y ar = S//y^2 + # # y = sqrt(S//AR) + # gcellLength = float(cellLength)*(1+spaceMargin) // sliceHeight + # rows = math.sqrt( gcellLength//aspectRatio ) # if math.trunc(rows) != rows: rows = math.trunc(rows) + 1 # else: rows = math.trunc(rows) - # columns = gcellLength / rows + # columns = gcellLength // rows # if math.trunc(columns) != columns: columns = math.trunc(columns) + 1 # else: columns = math.trunc(columns) # # print ' o Creating abutment box (margin:%.1f%%, aspect ratio:%.1f%%, g-length:%.1fl)' \ - # % (spaceMargin*100.0,aspectRatio*100.0,(cellLength/sliceHeight)) + # % (spaceMargin*100.0,aspectRatio*100.0,(cellLength//sliceHeight)) # print ' - GCell grid: [%dx%d]' % (columns,rows) UpdateSession.open() diff --git a/cumulus/src/plugins/cts/rsmt.py b/cumulus/src/plugins/cts/rsmt.py index 8851871b..d33a66ec 100644 --- a/cumulus/src/plugins/cts/rsmt.py +++ b/cumulus/src/plugins/cts/rsmt.py @@ -1,7 +1,6 @@ -#!/usr/bin/env python -# + # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2014-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | diff --git a/cumulus/src/plugins/matrixplacer.py b/cumulus/src/plugins/matrixplacer.py index f628b4f9..a0fdd6c6 100644 --- a/cumulus/src/plugins/matrixplacer.py +++ b/cumulus/src/plugins/matrixplacer.py @@ -1,7 +1,6 @@ -#!/usr/bin/env python -# + # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2020-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -14,7 +13,6 @@ # +-----------------------------------------------------------------+ -from __future__ import print_function import sys import traceback import helpers @@ -162,8 +160,8 @@ class NetDatas ( object ): tags[tag] = 1 else: tags = self._dtags if direction & DIRECT else self._rtags - if tags.has_key(tag): tags[tag] += 1 - else: tags[tag] = 1 + if tag in tags: tags[tag] += 1 + else: tags[tag] = 1 return def mergeTags ( self, tags, direction ): @@ -277,8 +275,8 @@ class InstanceDatas ( object ): tags[tag] = 1 else: tags = self._dtags if direction & DIRECT else self._rtags - if tags.has_key(tag): tags[tag] += 1 - else: tags[tag] = 1 + if tag in tags: tags[tag] += 1 + else: tags[tag] = 1 return def mergeTags ( self, tags, direction ): @@ -321,8 +319,8 @@ class MatchSet ( object ): for instanceDatas in cellDag.directOrdereds: matched = True for tag in self.tags: - if not instanceDatas.dtags.has_key(tag) \ - and not instanceDatas.rtags.has_key(tag): + if not tag in instanceDatas.dtags \ + and not tag in instanceDatas.rtags: matched = False break if matched: @@ -469,11 +467,11 @@ class CellDag ( object ): def lookup ( self, element ): if isinstance(element,Net): - if self.netsDatas.has_key(element.getId()): + if element.getId() in self.netsDatas: return self.netsDatas[element.getId()] raise ErrorMessage( 1, 'CellDag.lookup(): Missing NetDatas for {}.'.format(element) ) if isinstance(element,Instance): - if self.instancesDatas.has_key(element.getId()): + if element.getId() in self.instancesDatas: return self.instancesDatas[element.getId()] raise ErrorMessage( 1, 'CellDag.lookup(): Missing InstanceDatas for {}.'.format(element) ) raise ErrorMessage( 1, 'CellDag.lookup(): {} has not Datas support.'.format(element) ) @@ -644,7 +642,7 @@ class CellDag ( object ): histogram = {} for netDatas in self.netsDatas.values(): print( 'netDatas:{}'.format(netDatas) ) - if histogram.has_key(netDatas.plugCount): + if netDatas.plugCount in histogram: histogram[netDatas.plugCount] += 1 else: histogram[netDatas.plugCount] = 1 @@ -1034,14 +1032,14 @@ class MatrixPlacer ( object ): self.finalizeBottom() def tagRow ( self, row, nets ): - if not self.tagRows.has_key(row): + if not row in self.tagRows: self.tagRows[row] = [] self.tagRows[row] += nets for net in nets: self.dag.addNetTag( net, 'h{}'.format(row) ) def tagColumn ( self, column, nets ): - if not self.tagColumns.has_key(column): + if not column in self.tagColumns: self.tagColumns[column] = [] self.tagColumns[column] += nets for net in nets: @@ -1151,7 +1149,7 @@ def scriptMain ( **kw ): matrix.dag.showReverseCone( 'subckt_5_dm13_subckt_332_src3_c_63_subckt_112_sff1_x4', 10 ) return True - except Exception, e: + except Exception as e: helpers.io.catch( e ) rvalue = False diff --git a/cumulus/src/plugins/rsave.py b/cumulus/src/plugins/rsave.py index d0295aa5..a4c1b5a2 100644 --- a/cumulus/src/plugins/rsave.py +++ b/cumulus/src/plugins/rsave.py @@ -1,7 +1,6 @@ -#!/usr/bin/env python -# + # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2014-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -14,7 +13,6 @@ # +-----------------------------------------------------------------+ -from __future__ import print_function import sys import traceback import os.path @@ -26,7 +24,7 @@ try: from helpers.io import ErrorMessage from helpers.io import WarningMessage import plugins -except Exception, e: +except Exception as e: helpers.io.catch( e ) sys.exit(2) @@ -43,6 +41,9 @@ def rsave ( cell, views=CRL.Catalog.State.Physical, depth=0, enableSpice=False ) """ framework = CRL.AllianceFramework.get() if depth == 0: print( ' o Recursive Save-Cell.' ) + if cell.isUniquified(): views |= CRL.Catalog.State.Logical + if cell.getName().endswith('_cts'): views |= CRL.Catalog.State.Logical + if cell.getName().endswith('_r' ): views |= CRL.Catalog.State.Logical sviews = '' if views & CRL.Catalog.State.Logical: sviews += 'netlist' @@ -65,9 +66,6 @@ def rsave ( cell, views=CRL.Catalog.State.Physical, depth=0, enableSpice=False ) if sviews: sviews += ',' sviews += 'layout' print( ' {}+ {} ({}).'.format(' '*(depth*2), cell.getName(), sviews) ) - if cell.isUniquified(): views |= CRL.Catalog.State.Logical - if cell.getName().endswith('_cts'): views |= CRL.Catalog.State.Logical - if cell.getName().endswith('_r' ): views |= CRL.Catalog.State.Logical framework.saveCell( cell, views ) spiceFlags = CRL.Spice.TopCell if depth == 0 else 0 CRL.Spice.save( cell, spiceFlags ) @@ -101,13 +99,13 @@ def scriptMain ( **kw ): #helpers.setTraceLevel( 550 ) cell, editor = plugins.kwParseMain( **kw ) views = CRL.Catalog.State.Physical - if kw.has_key('views'): views = kw['views'] + if 'views' in kw: views = kw['views'] if not cell: print( WarningMessage( 'No Cell loaded in the editor (yet), nothing done.' ) ) return 0 rsave( cell, views ) CRL.destroyAllVHDL() - except Exception, e: + except Exception as e: helpers.io.catch( e ) sys.stdout.flush() sys.stderr.flush() diff --git a/cumulus/src/plugins/rsaveall.py b/cumulus/src/plugins/rsaveall.py index 3febf9e3..7a5a6f67 100644 --- a/cumulus/src/plugins/rsaveall.py +++ b/cumulus/src/plugins/rsaveall.py @@ -1,7 +1,6 @@ -#!/usr/bin/env python -# + # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2015-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2015-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -24,7 +23,7 @@ try: from helpers.io import ErrorMessage from helpers.io import WarningMessage import plugins -except Exception, e: +except Exception as e: helpers.io.catch( e ) sys.exit(2) @@ -36,23 +35,19 @@ except Exception, e: # standard cell (mainly the feed-through). def rsave ( cell, depth=0 ): - if cell.isTerminal(): return - - framework = CRL.AllianceFramework.get() - if depth == 0: print ' o Recursive Save-Cell.' - - print ' %s+ %s (netlist+layout).' % ( ' '*(depth*2), cell.getName() ) - flags = CRL.Catalog.State.Logical - if not cell.getAbutmentBox().isEmpty(): - flags |= CRL.Catalog.State.Physical - - framework.saveCell( cell, flags ) - - for instance in cell.getInstances(): - masterCell = instance.getMasterCell() - if not masterCell.isTerminal(): - rsave( masterCell, depth+1 ) - return + if cell.isTerminal(): return + framework = CRL.AllianceFramework.get() + if depth == 0: print( ' o Recursive Save-Cell.' ) + print( ' {}+ {} (netlist+layout).'.format( ' '*(depth*2), cell.getName() )) + flags = CRL.Catalog.State.Logical + if not cell.getAbutmentBox().isEmpty(): + flags |= CRL.Catalog.State.Physical + framework.saveCell( cell, flags ) + for instance in cell.getInstances(): + masterCell = instance.getMasterCell() + if not masterCell.isTerminal(): + rsave( masterCell, depth+1 ) + return # -------------------------------------------------------------------- @@ -69,22 +64,16 @@ def unicornHook ( **kw ): def scriptMain ( **kw ): - try: - #helpers.setTraceLevel( 550 ) - - cell, editor = plugins.kwParseMain( **kw ) - - if not cell: - print WarningMessage( 'No Cell loaded in the editor (yet), nothing done.' ) - return 0 - - rsave( cell ) - CRL.destroyAllVHDL() - - except Exception, e: - helpers.io.catch( e ) - - sys.stdout.flush() - sys.stderr.flush() - - return 0 + try: + #helpers.setTraceLevel( 550 ) + cell, editor = plugins.kwParseMain( **kw ) + if not cell: + print( WarningMessage( 'No Cell loaded in the editor (yet), nothing done.' )) + return 0 + rsave( cell ) + CRL.destroyAllVHDL() + except Exception as e: + helpers.io.catch( e ) + sys.stdout.flush() + sys.stderr.flush() + return 0 diff --git a/cumulus/src/plugins/s2r.py b/cumulus/src/plugins/s2r.py index 65ef5d19..b3289356 100644 --- a/cumulus/src/plugins/s2r.py +++ b/cumulus/src/plugins/s2r.py @@ -1,7 +1,6 @@ -#!/usr/bin/env python -# + # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2014-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -27,7 +26,7 @@ try: from Hurricane import Library from CRL import Gds import plugins -except Exception, e: +except Exception as e: helpers.io.catch( e ) sys.exit(2) @@ -39,21 +38,18 @@ class S2R ( object ): def __init__ ( self ): self.s2r = None - pathes = os.environ[ "PATH" ] for path in pathes.split(':'): - binary = os.path.join( path, 's2r' ) - if os.path.exists(binary): - self.s2r = binary - break + binary = os.path.join( path, 's2r' ) + if os.path.exists(binary): + self.s2r = binary + break if not self.s2r: - print ErrorMessage( 1, 'S2R.__init__(): No s2r binary found in PATH, please setup Alliance environement.' ) + print( ErrorMessage( 1, 'S2R.__init__(): No s2r binary found in PATH, please setup Alliance environement.' )) return - def convert ( self, cell ): if not self.s2r: return - os.environ[ 'RDS_IN' ] = 'gds' os.environ[ 'RDS_OUT' ] = 'gds' process = subprocess.Popen( [ self.s2r, cell.getName() ] @@ -62,14 +58,12 @@ class S2R ( object ): , shell =False ) for line in process.stdout.readlines(): - print 's2r | %s' % line[:-1] - + print( 's2r | {}'.format(line[:-1] )) gdsFile = os.path.join( os.environ['MBK_WORK_LIB'], cell.getName()+'.gds' ) - rootLibrary = DataBase.getDB().getRootLibrary() gdsLibrary = rootLibrary.getLibrary( 'gds' ) if not gdsLibrary: - gdsLibrary = Library.create( rootLibrary, 'GDS' ) + gdsLibrary = Library.create( rootLibrary, 'GDS' ) Gds.load( gdsLibrary, gdsFile ) return gdsLibrary.getCell( cell.getName() ) @@ -88,23 +82,20 @@ def unicornHook ( **kw ): def scriptMain ( **kw ): - rvalue = True - try: - #helpers.setTraceLevel( 550 ) - - cell, editor = plugins.kwParseMain( **kw ) - s2r = S2R() - gdsCell = s2r.convert( cell ) - print gdsCell - if editor: editor.setCell( gdsCell ) - - except Exception, e: - helpers.io.catch( e ) - if locals().has_key('editor') and editor \ - and locals().has_key('cell' ) and cell: editor.fit() - rvalue = False - - sys.stdout.flush() - sys.stderr.flush() - - return rvalue + rvalue = True + try: + #helpers.setTraceLevel( 550 ) + cell, editor = plugins.kwParseMain( **kw ) + s2r = S2R() + gdsCell = s2r.convert( cell ) + print( gdsCell ) + if editor: editor.setCell( gdsCell ) + except Exception as e: + helpers.io.catch( e ) + if 'editor' in locals() and editor \ + and 'cell' in locals() and cell: + editor.fit() + rvalue = False + sys.stdout.flush() + sys.stderr.flush() + return rvalue diff --git a/cumulus/src/plugins/stats.py b/cumulus/src/plugins/stats.py index 4aac5023..7726530a 100644 --- a/cumulus/src/plugins/stats.py +++ b/cumulus/src/plugins/stats.py @@ -1,6 +1,6 @@ -# + # This file is part of the Coriolis Software. -# Copyright (c) SU 2020-2020, All Rights Reserved +# Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -18,7 +18,6 @@ This script hook the Stats plugin inside GCT/Unicorn. Compute some statistics on a hierarchical block. """ -from __future__ import print_function import sys import traceback import helpers @@ -44,7 +43,7 @@ class Stats ( object ): def lookup ( p ): if isinstance(p,Cell): cell = p else: cell = p.getMasterCell() - if Stats.LUT.has_key(cell): return Stats.LUT[ cell ] + if cell in Stats.LUT: return Stats.LUT[ cell ] return None @staticmethod @@ -59,7 +58,7 @@ class Stats ( object ): def consolidate (): ordereds = {} for item in Stats.LUT.values(): - if not ordereds.has_key(item.depth): + if not item.depth in ordereds: ordereds[item.depth] = [] ordereds[item.depth].append( item ) rkeys = ordereds.keys() @@ -150,7 +149,7 @@ def scriptMain ( **kw ): stats = Stats( cell, 0 ) stats.display() - except Exception, e: + except Exception as e: helpers.io.catch( e ) rvalue = False diff --git a/cumulus/src/plugins/vchannels.py b/cumulus/src/plugins/vchannels.py index b11e8bb3..b23dd8a5 100644 --- a/cumulus/src/plugins/vchannels.py +++ b/cumulus/src/plugins/vchannels.py @@ -1,7 +1,6 @@ -#!/usr/bin/env python -# + # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2019-2019, All Rights Reserved +# Copyright (c) Sorbonne Université 2019-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -14,28 +13,28 @@ # +-----------------------------------------------------------------+ try: - import sys - import traceback - import os.path - import math - import Cfg - import Hurricane - from Hurricane import Breakpoint - from Hurricane import UpdateSession - import Viewer - import CRL - from CRL import RoutingLayerGauge - import helpers - from helpers import trace - from helpers.io import ErrorMessage, catch - from helpers import l, u, n - import Etesian - import Unicorn - import plugins - import block.vchannels -except Exception, e: - catch( e ) - sys.exit(2) + import sys + import traceback + import os.path + import math + import Cfg + import Hurricane + from Hurricane import Breakpoint + from Hurricane import UpdateSession + import Viewer + import CRL + from CRL import RoutingLayerGauge + import helpers + from helpers import trace + from helpers.io import ErrorMessage, catch + from helpers import l, u, n + import Etesian + import Unicorn + import plugins + import block.vchannels +except Exception as e: + catch( e ) + sys.exit(2) # -------------------------------------------------------------------- @@ -43,7 +42,6 @@ except Exception, e: def unicornHook ( **kw ): kw['beforeAction'] = 'placeAndRoute.placeChip' - plugins.kwAddMenu ( 'placeAndRoute', 'P&&R', **kw ) plugins.kwUnicornHook( 'placeAndRoute.vchannels' , 'Add vertical routing channels' @@ -55,34 +53,26 @@ def unicornHook ( **kw ): def scriptMain ( **kw ): - try: - #helpers.setTraceLevel( 550 ) - - errorCode = 0 - - cell = None - if kw.has_key('cell') and kw['cell']: - cell = kw['cell'] - - editor = None - if kw.has_key('editor') and kw['editor']: - editor = kw['editor'] - print ' o Editor found, running in graphic mode.' - if cell == None: cell = editor.getCell() - - if cell == None: - raise ErrorMessage( 3, 'VChannels: No cell loaded yet.' ) - - if cell.getAbutmentBox().isEmpty(): - raise ErrorMessage( 3, 'VChannels: cell "%s" is not placed yet.' % cell.getName() ) - - vchannels = block.VChannels.VChannels( cell ) - for i in range(48): - vchannels.addChannelAt( l(250.0*(i+1)), l(190.0) ) - vchannels.expandChannels() - if editor: editor.refresh() - - except Exception, e: - catch( e ) - - return 0 + try: + #helpers.setTraceLevel( 550 ) + errorCode = 0 + cell = None + if 'cell' in kw and kw['cell']: + cell = kw['cell'] + editor = None + if 'editor' in kw and kw['editor']: + editor = kw['editor'] + print( ' o Editor found, running in graphic mode.' ) + if cell == None: cell = editor.getCell() + if cell == None: + raise ErrorMessage( 3, 'VChannels: No cell loaded yet.' ) + if cell.getAbutmentBox().isEmpty(): + raise ErrorMessage( 3, 'VChannels: cell "%s" is not placed yet.' % cell.getName() ) + vchannels = block.VChannels.VChannels( cell ) + for i in range(48): + vchannels.addChannelAt( l(250.0*(i+1)), l(190.0) ) + vchannels.expandChannels() + if editor: editor.refresh() + except Exception as e: + catch( e ) + return 0 diff --git a/cumulus/src/tools/blif2vst.py b/cumulus/src/tools/blif2vst.py index 41dd9c69..29ee9434 100755 --- a/cumulus/src/tools/blif2vst.py +++ b/cumulus/src/tools/blif2vst.py @@ -1,6 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 -from __future__ import print_function import sys import traceback import os.path diff --git a/cumulus/src/tools/px2mpx.py b/cumulus/src/tools/px2mpx.py index b5825273..29bfd9a6 100755 --- a/cumulus/src/tools/px2mpx.py +++ b/cumulus/src/tools/px2mpx.py @@ -1,291 +1,286 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 try: - import sys - import traceback - import os.path - import optparse - import math - import Cfg - import Hurricane - from Hurricane import DataBase - from Hurricane import DbU - from Hurricane import Transformation - from Hurricane import Box - from Hurricane import UpdateSession - from Hurricane import Breakpoint - from Hurricane import Net - from Hurricane import NetExternalComponents - from Hurricane import BasicLayer - from Hurricane import ContactLayer - from Hurricane import ViaLayer - from Hurricane import RegularLayer - from Hurricane import TransistorLayer - from Hurricane import DiffusionLayer - from Hurricane import Cell - from Hurricane import Instance - from Hurricane import Net - from Hurricane import Contact - from Hurricane import Horizontal - from Hurricane import Vertical - import Viewer - import CRL - from CRL import RoutingLayerGauge - import helpers - from helpers import trace - from helpers.io import ErrorMessage + import sys + import traceback + import os.path + import optparse + import math + import Cfg + import Hurricane + from Hurricane import DataBase + from Hurricane import DbU + from Hurricane import Transformation + from Hurricane import Box + from Hurricane import UpdateSession + from Hurricane import Breakpoint + from Hurricane import Net + from Hurricane import NetExternalComponents + from Hurricane import BasicLayer + from Hurricane import ContactLayer + from Hurricane import ViaLayer + from Hurricane import RegularLayer + from Hurricane import TransistorLayer + from Hurricane import DiffusionLayer + from Hurricane import Cell + from Hurricane import Instance + from Hurricane import Net + from Hurricane import Contact + from Hurricane import Horizontal + from Hurricane import Vertical + import Viewer + import CRL + from CRL import RoutingLayerGauge + import helpers + from helpers import trace + from helpers.io import ErrorMessage except ImportError, e: - serror = str(e) - if serror.startswith('No module named'): - module = serror.split()[-1] - print '[ERROR] The <%s> python module or symbol cannot be loaded.' % module - print ' Please check the integrity of the package.' - if str(e).find('cannot open shared object file'): - library = serror.split(':')[0] - print '[ERROR] The <%s> shared library cannot be loaded.' % library - print ' Under RHEL 6, you must be under devtoolset-2.' - print ' (scl enable devtoolset-2 bash)' - sys.exit(1) + serror = str(e) + if serror.startswith('No module named'): + module = serror.split()[-1] + print( '[ERROR] The "{}" python module or symbol cannot be loaded.'.format(module) ) + print( ' Please check the integrity of the "coriolis" package.' ) + if str(e).find('cannot open shared object file'): + library = serror.split(':')[0] + print( '[ERROR] The "{}" shared library cannot be loaded.'.format(library) ) + print( ' Under RHEL 6, you must be under devtoolset-2.' ) + print( ' (scl enable devtoolset-2 bash)' ) + sys.exit(1) except Exception, e: - print '[ERROR] A strange exception occurred while loading the basic Coriolis/Python' - print ' modules. Something may be wrong at Python/C API level.\n' - print ' %s' % e - sys.exit(2) + print( '[ERROR] A strange exception occurred while loading the basic Coriolis/Python' ) + print( ' modules. Something may be wrong at Python/C API level.\n' ) + print( ' {}'.format(e) ) + sys.exit(2) -framework = CRL.AllianceFramework.get() +framework = CRL.AllianceFramework.get() def getDeltas ( layer ): - #deltas = { 'L_METAL1' : DbU.fromLambda( -1.0 ) - # , 'L_METAL2' : DbU.fromLambda( 3.0 ) - # , 'L_blockage2': DbU.fromLambda( -1.0 ) - # , 'L_blockage4': DbU.fromLambda( -1.0 ) - # , 'L_xWell' : DbU.fromLambda( 6.0 ) - # , 'L_Trans' : DbU.fromLambda( -3.0 ) - # , 'L_Diff' : DbU.fromLambda( -1.0 ) - # , 'L_Tie' : DbU.fromLambda( 1.2 ) - # , 'W_Diff' : DbU.fromLambda( 0.2 ) - # , 'W_xWell' : DbU.fromLambda( 12.0 ) - # , 'mW_METAL1' : DbU.fromLambda( 4.0 ) - # , 'mW_METAL2' : DbU.fromLambda( 4.0 ) - # } - deltas = { 'L_METAL1' : DbU.fromLambda( -1.0 ) - , 'L_METAL2' : DbU.fromLambda( 1.5 ) - , 'L_blockage2': DbU.fromLambda( -0.5 ) - , 'L_blockage4': DbU.fromLambda( -0.5 ) - , 'L_xWell' : DbU.fromLambda( 6.0 ) - , 'L_Trans' : DbU.fromLambda( -3.0 ) - , 'L_Diff' : DbU.fromLambda( -1.0 ) - , 'L_Tie' : DbU.fromLambda( 1.2 ) - , 'W_Diff' : DbU.fromLambda( 0.2 ) - , 'W_xWell' : DbU.fromLambda( 12.0 ) - , 'W_blockage2': DbU.fromLambda( -1.0 ) - , 'mW_METAL1' : DbU.fromLambda( 4.0 ) - , 'mW_METAL2' : DbU.fromLambda( 6.0 ) - } - - dL = 0 - dW = 0 - mW = 0 - - if isinstance(layer,TransistorLayer): - dL = deltas[ 'L_Trans' ] - elif isinstance(layer,RegularLayer): - if layer.getName() == 'METAL1': - dL = deltas[ 'L_METAL1' ] - mW = deltas[ 'mW_METAL1' ] - elif layer.getName() == 'METAL2' or layer.getName() == 'METAL3': - dL = deltas[ 'L_METAL2' ] - mW = deltas[ 'mW_METAL2' ] - elif layer.getName() == 'BLOCKAGE2': - dL = deltas[ 'L_blockage2' ] - elif layer.getName() == 'BLOCKAGE4': - dL = deltas[ 'L_blockage4' ] - elif layer.getName().endswith('WELL'): - dL = deltas[ 'L_xWell' ] - dW = deltas[ 'W_xWell' ] - elif isinstance(layer,DiffusionLayer): - if layer.getName().endswith('DIF'): - dL = deltas[ 'L_Diff' ] - dW = deltas[ 'W_Diff' ] - elif layer.getName().endswith('TIE'): - dL = deltas[ 'L_Tie' ] - return dL, dW, mW + #deltas = { 'L_METAL1' : DbU.fromLambda( -1.0 ) + # , 'L_METAL2' : DbU.fromLambda( 3.0 ) + # , 'L_blockage2': DbU.fromLambda( -1.0 ) + # , 'L_blockage4': DbU.fromLambda( -1.0 ) + # , 'L_xWell' : DbU.fromLambda( 6.0 ) + # , 'L_Trans' : DbU.fromLambda( -3.0 ) + # , 'L_Diff' : DbU.fromLambda( -1.0 ) + # , 'L_Tie' : DbU.fromLambda( 1.2 ) + # , 'W_Diff' : DbU.fromLambda( 0.2 ) + # , 'W_xWell' : DbU.fromLambda( 12.0 ) + # , 'mW_METAL1' : DbU.fromLambda( 4.0 ) + # , 'mW_METAL2' : DbU.fromLambda( 4.0 ) + # } + deltas = { 'L_METAL1' : DbU.fromLambda( -1.0 ) + , 'L_METAL2' : DbU.fromLambda( 1.5 ) + , 'L_blockage2': DbU.fromLambda( -0.5 ) + , 'L_blockage4': DbU.fromLambda( -0.5 ) + , 'L_xWell' : DbU.fromLambda( 6.0 ) + , 'L_Trans' : DbU.fromLambda( -3.0 ) + , 'L_Diff' : DbU.fromLambda( -1.0 ) + , 'L_Tie' : DbU.fromLambda( 1.2 ) + , 'W_Diff' : DbU.fromLambda( 0.2 ) + , 'W_xWell' : DbU.fromLambda( 12.0 ) + , 'W_blockage2': DbU.fromLambda( -1.0 ) + , 'mW_METAL1' : DbU.fromLambda( 4.0 ) + , 'mW_METAL2' : DbU.fromLambda( 6.0 ) + } + + dL = 0 + dW = 0 + mW = 0 + + if isinstance(layer,TransistorLayer): + dL = deltas[ 'L_Trans' ] + elif isinstance(layer,RegularLayer): + if layer.getName() == 'METAL1': + dL = deltas[ 'L_METAL1' ] + mW = deltas[ 'mW_METAL1' ] + elif layer.getName() == 'METAL2' or layer.getName() == 'METAL3': + dL = deltas[ 'L_METAL2' ] + mW = deltas[ 'mW_METAL2' ] + elif layer.getName() == 'BLOCKAGE2': + dL = deltas[ 'L_blockage2' ] + elif layer.getName() == 'BLOCKAGE4': + dL = deltas[ 'L_blockage4' ] + elif layer.getName().endswith('WELL'): + dL = deltas[ 'L_xWell' ] + dW = deltas[ 'W_xWell' ] + elif isinstance(layer,DiffusionLayer): + if layer.getName().endswith('DIF'): + dL = deltas[ 'L_Diff' ] + dW = deltas[ 'W_Diff' ] + elif layer.getName().endswith('TIE'): + dL = deltas[ 'L_Tie' ] + return dL, dW, mW def px2mpx ( editor, pxCell ): - global framework - - if pxCell == None: - raise ErrorMessage( 3, 'px2mpx.px2mpx(): Mandatory pxCell argument is None.' ) - mpxCell = None - - print '\nProcessing', pxCell - - UpdateSession.open() - try: - if pxCell.getName() != 'padreal': - mpxCellName = pxCell.getName()[:-2]+'mpx' - else: - mpxCellName = pxCell.getName()+'_mpx' - mpxCell = framework.createCell( mpxCellName ) - - if editor: - editor.setCell( mpxCell ) - - Left = 0x0001 - Right = 0x0002 - Middle = 0x0000 - AllSpan = Left|Right - - ab = pxCell.getAbutmentBox() - mpxCell.setAbutmentBox( Box( ab.getXMin()*2, ab.getYMin()*2, ab.getXMax()*2, ab.getYMax()*2 ) ) - - for instance in pxCell.getInstances(): - masterCell = instance.getMasterCell() - if masterCell.getName() == 'padreal': - masterCell = framework.getCell( 'padreal_mpx', CRL.Catalog.State.Physical ) - - originTransf = instance.getTransformation() - mpxInstance = Instance.create( mpxCell - , instance.getName() - , masterCell - , Transformation( originTransf.getTx()*2 - , originTransf.getTy()*2 - , originTransf.getOrientation() ) - ) - mpxInstance.setPlacementStatus( Instance.PlacementStatus.PLACED ) - - for net in pxCell.getNets(): - mpxNet = Net.create( mpxCell, net.getName() ) - if net.isExternal(): mpxNet.setExternal( True ) - if net.isGlobal (): mpxNet.setGlobal( True ) - mpxNet.setType ( net.getType () ) - mpxNet.setDirection( net.getDirection() ) - - for component in net.getComponents(): - layer = component.getLayer() - dupComponent = None - - print ' Processing', component - - if isinstance(component,Contact): - dupComponent = Contact.create( mpxNet - , layer - , component.getX ()*2 - , component.getY ()*2 - , component.getWidth ()*2 - , component.getHeight()*2 - ) - elif isinstance(component,Horizontal): - dL, dW, mW = getDeltas( layer ) - dLLeft = dL - dLRight = dL - skipComponent = False - - bb = component.getBoundingBox() - if component.getSourceX() > component.getTargetX(): component.invert() - if isinstance(layer,RegularLayer): - if layer.getBasicLayer().getMaterial().getCode() == BasicLayer.Material.blockage: - print ' Blockage BB:%s vs. AB:%s' % (bb, ab) - if layer.getName()[-1] == '2' or layer.getName()[-1] == '4': - state = 0 - if bb.getXMin() <= ab.getXMin(): state |= Left - if bb.getXMax() >= ab.getXMax(): state |= Right - - if not (state&Left): - print ' Shrink left.' - dLLeft = dL - DbU.fromLambda( 1.5 ) - if not(state&Right): - print ' Shrink right.' - dLRight = dL - DbU.fromLambda( 1.5 ) - - if layer.getName()[-1] == '4' and state == AllSpan: - print ' Skipping component.' - skipComponent = True - - width = mW - if component.getWidth() > mW: - width = component.getWidth()*2 + dW - - #print DbU.toLambda(bb.getWidth()), DbU.toLambda( dLLeft-dLRight) - if bb.getWidth()*2 > abs(dLLeft+dLRight) and not skipComponent: - dupComponent = Horizontal.create( mpxNet - , layer - , component.getY ()*2 - , width - , component.getDxSource()*2 - dLLeft - , component.getDxTarget()*2 + dLRight - ) - print ' Copy:', dupComponent - else: - print ' Horizontal component too small *or* skipped, not converted' - - elif isinstance(component,Vertical): - dL, dW, mW = getDeltas( component.getLayer() ) - dLTop = dL - dLBottom = dL - dX = 0 - skipComponent = False - - if component.getSourceY() > component.getTargetY(): component.invert() - if isinstance(layer,RegularLayer): - if layer.getBasicLayer().getMaterial().getCode() == BasicLayer.Material.blockage: - if layer.getName()[-1] == '3' or layer.getName()[-1] == '5': - state = 0 - bb = component.getBoundingBox() - if bb.getXMin() <= ab.getXMin(): state |= Left - if bb.getXMax() >= ab.getXMax(): state |= Right - - if state == Left: - dX = DbU.fromLambda( -2.0 ) - dW += DbU.fromLambda( -2.0 ) - elif state == Right: - dX = DbU.fromLambda( 2.0 ) - dW += DbU.fromLambda( -2.0 ) - elif state == 0: - dX = 0 - dW += DbU.fromLambda( -4.0 ) - - if layer.getName()[-1] == '5': - if state == AllSpan: - print ' Skipping component.' - skipComponent = True - else: - dLTop = DbU.fromLambda(120.0) - component.getDyTarget()*2 - - if dW < component.getWidth() and not skipComponent: - width = mW - if component.getWidth() > mW: - width = component.getWidth()*2 + dW + global framework - dupComponent = Vertical.create( mpxNet - , layer - , component.getX ()*2 + dX - , width - , component.getDySource()*2 - dLBottom - , component.getDyTarget()*2 + dLTop - ) - else: - print ' Vertical component too small *or* skipped, not converted' - + if pxCell == None: + raise ErrorMessage( 3, 'px2mpx.px2mpx(): Mandatory pxCell argument is None.' ) + mpxCell = None + print '\nProcessing', pxCell + + UpdateSession.open() + try: + if pxCell.getName() != 'padreal': + mpxCellName = pxCell.getName()[:-2]+'mpx' else: - print '[WARNING] Unchanged component:', component + mpxCellName = pxCell.getName()+'_mpx' + mpxCell = framework.createCell( mpxCellName ) + if editor: + editor.setCell( mpxCell ) + Left = 0x0001 + Right = 0x0002 + Middle = 0x0000 + AllSpan = Left|Right + ab = pxCell.getAbutmentBox() + mpxCell.setAbutmentBox( Box( ab.getXMin()*2, ab.getYMin()*2, ab.getXMax()*2, ab.getYMax()*2 ) ) - if dupComponent and NetExternalComponents.isExternal( component ): - NetExternalComponents.setExternal( dupComponent ) + for instance in pxCell.getInstances(): + masterCell = instance.getMasterCell() + if masterCell.getName() == 'padreal': + masterCell = framework.getCell( 'padreal_mpx', CRL.Catalog.State.Physical ) + originTransf = instance.getTransformation() + mpxInstance = Instance.create( mpxCell + , instance.getName() + , masterCell + , Transformation( originTransf.getTx()*2 + , originTransf.getTy()*2 + , originTransf.getOrientation() ) + ) + mpxInstance.setPlacementStatus( Instance.PlacementStatus.PLACED ) + + for net in pxCell.getNets(): + mpxNet = Net.create( mpxCell, net.getName() ) + if net.isExternal(): mpxNet.setExternal( True ) + if net.isGlobal (): mpxNet.setGlobal( True ) + mpxNet.setType ( net.getType () ) + mpxNet.setDirection( net.getDirection() ) + + for component in net.getComponents(): + layer = component.getLayer() + dupComponent = None + + print ' Processing', component + + if isinstance(component,Contact): + dupComponent = Contact.create( mpxNet + , layer + , component.getX ()*2 + , component.getY ()*2 + , component.getWidth ()*2 + , component.getHeight()*2 + ) + elif isinstance(component,Horizontal): + dL, dW, mW = getDeltas( layer ) + dLLeft = dL + dLRight = dL + skipComponent = False + + bb = component.getBoundingBox() + if component.getSourceX() > component.getTargetX(): component.invert() + if isinstance(layer,RegularLayer): + if layer.getBasicLayer().getMaterial().getCode() == BasicLayer.Material.blockage: + print ' Blockage BB:%s vs. AB:%s' % (bb, ab) + if layer.getName()[-1] == '2' or layer.getName()[-1] == '4': + state = 0 + if bb.getXMin() <= ab.getXMin(): state |= Left + if bb.getXMax() >= ab.getXMax(): state |= Right + + if not (state&Left): + print ' Shrink left.' + dLLeft = dL - DbU.fromLambda( 1.5 ) + if not(state&Right): + print ' Shrink right.' + dLRight = dL - DbU.fromLambda( 1.5 ) + + if layer.getName()[-1] == '4' and state == AllSpan: + print ' Skipping component.' + skipComponent = True + + width = mW + if component.getWidth() > mW: + width = component.getWidth()*2 + dW + + #print DbU.toLambda(bb.getWidth()), DbU.toLambda( dLLeft-dLRight) + if bb.getWidth()*2 > abs(dLLeft+dLRight) and not skipComponent: + dupComponent = Horizontal.create( mpxNet + , layer + , component.getY ()*2 + , width + , component.getDxSource()*2 - dLLeft + , component.getDxTarget()*2 + dLRight + ) + print ' Copy:', dupComponent + else: + print ' Horizontal component too small *or* skipped, not converted' + + elif isinstance(component,Vertical): + dL, dW, mW = getDeltas( component.getLayer() ) + dLTop = dL + dLBottom = dL + dX = 0 + skipComponent = False + + if component.getSourceY() > component.getTargetY(): component.invert() + if isinstance(layer,RegularLayer): + if layer.getBasicLayer().getMaterial().getCode() == BasicLayer.Material.blockage: + if layer.getName()[-1] == '3' or layer.getName()[-1] == '5': + state = 0 + bb = component.getBoundingBox() + if bb.getXMin() <= ab.getXMin(): state |= Left + if bb.getXMax() >= ab.getXMax(): state |= Right + + if state == Left: + dX = DbU.fromLambda( -2.0 ) + dW += DbU.fromLambda( -2.0 ) + elif state == Right: + dX = DbU.fromLambda( 2.0 ) + dW += DbU.fromLambda( -2.0 ) + elif state == 0: + dX = 0 + dW += DbU.fromLambda( -4.0 ) + + if layer.getName()[-1] == '5': + if state == AllSpan: + print ' Skipping component.' + skipComponent = True + else: + dLTop = DbU.fromLambda(120.0) - component.getDyTarget()*2 + + if dW < component.getWidth() and not skipComponent: + width = mW + if component.getWidth() > mW: + width = component.getWidth()*2 + dW - if editor: editor.fit() - - except ErrorMessage, e: - print e; errorCode = e.code - except Exception, e: - print '\n\n', e; errorCode = 1 - traceback.print_tb(sys.exc_info()[2]) - - UpdateSession.close() - return mpxCell + dupComponent = Vertical.create( mpxNet + , layer + , component.getX ()*2 + dX + , width + , component.getDySource()*2 - dLBottom + , component.getDyTarget()*2 + dLTop + ) + else: + print ' Vertical component too small *or* skipped, not converted' + + else: + print '[WARNING] Unchanged component:', component + + if dupComponent and NetExternalComponents.isExternal( component ): + NetExternalComponents.setExternal( dupComponent ) + + if editor: editor.fit() + + except ErrorMessage, e: + print e; errorCode = e.code + except Exception, e: + print '\n\n', e; errorCode = 1 + traceback.print_tb(sys.exc_info()[2]) + + UpdateSession.close() + return mpxCell def scriptMain ( **kw ): diff --git a/cumulus/src/tools/yosys.py b/cumulus/src/tools/yosys.py index 3c7c00ff..74ecb90b 100755 --- a/cumulus/src/tools/yosys.py +++ b/cumulus/src/tools/yosys.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import sys import os diff --git a/documentation/CMakeLists.txt b/documentation/CMakeLists.txt index 4661bb16..5a63bea3 100644 --- a/documentation/CMakeLists.txt +++ b/documentation/CMakeLists.txt @@ -7,7 +7,8 @@ set(ignoreVariables "${LIB_SUFFIX} ${CMAKE_INSTALL_DIR}") - option(BUILD_DOC "Build the documentation (html+pdf)" OFF) + option(BUILD_DOC "Build the documentation (html+pdf)" OFF) + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) diff --git a/documentation/content/pages/documentation.rst b/documentation/content/pages/documentation.rst index 7c6d80a8..16fb4563 100644 --- a/documentation/content/pages/documentation.rst +++ b/documentation/content/pages/documentation.rst @@ -55,7 +55,10 @@ Coriolis Documentation A Tutorial to use Coriolis through Python `Python/C++ Tutorial <{filename}/pages/python-cpp/PythonCpp_HTML.rst>`_ |br| - A Tutorial to the Python/C++ interface |API| + A Tutorial to the Python/C++ interface |API| (C-macros version) + + `Python/C++ Tutorial (template) <{filename}/pages/python-cpp-new/PythonCppNew_HTML.rst>`_ |br| + A Tutorial to the Python/C++ interface |API| (C++ template version) `Stratus Language <{filename}/pages/stratus/Stratus_HTML.rst>`_ |br| A Netlist Capture Language (on top of Python) diff --git a/documentation/content/pages/python-cpp-new/Implementation.rst b/documentation/content/pages/python-cpp-new/Implementation.rst new file mode 100644 index 00000000..e76319fa --- /dev/null +++ b/documentation/content/pages/python-cpp-new/Implementation.rst @@ -0,0 +1,652 @@ +.. -*- Mode: rst -*- + + +2. Implementation +================= + +We do not try to provides an iterface as sleek as ``pybind11`` that completely +hides the Python/C API. Instead we keep mostly visible the classic structure of +the Python/C API but we provides templates to automate as much as possible the +boring tasks (and code duplication). This way, if we need a very specific +feature at some point, we can still revert back to the pure Python/C API. + +The wrapper basically provides support for three kind of operations: + +1. Encapsulate C++ object *in* Python ones, done by ``cToPy<>()`` template. + Template specializations are defined for the ``POD`` and basic ``STL`` + types like ``std::string``. + + To add more easily new specializations, they resides in the top level + scope (**not** inside ``Isobar``). + +2. Decapsulate a C++ object *from* a Python one, done by ``pyToC()``. + It's implementation is slightly different from the one of ``cToPy<>()`` + in the sense that it is a mix of normal C++ functions and template + functions. I was having trouble inside the ``callMethod()`` to access + to templates specialization defined *after* that point, so function be + it. + + There are two mutually exclusives versions of the ``pyToC<>()`` for + objects managed through the type manager. One is for value types and + the other for pointer types. + +3. Wrap C/C++ functions & methods inside C-linkage ``PyCFunction``, that is + ``PyOject* (*)(PyObject*, PyObject*)``. This is done respectively through + ``callFunction<>()`` and ``callMethod<>()``. ``callMethod<>()`` having + two variants, one for directly calling the function member, if there is + no overload and one for calling one given flavor of the overloaded + function member. + + In addition we provides special variants for Python unary, binary and + operator functions. + +In addition to those user exposed features, we have: + +* The ``PyTypeManager`` and it's derived classes to store and share informations + about all our newly defined ``PyTypeObjects``. + +* Various wrapper *classes* to wrap functions & methods. They are not directly + exposed because the template class intanciation needs the template parameters + to be explicitely given, wich is tedious. Instead we create them *through* + a function template call, which will perform for us the template type + deduction. + +We creates only two kind of ``PyObject`` (but many ``PyTypeObject``): + +* ``PyOneVoid`` which encapsulate one void pointer to the C++ associated + object. + + .. code-block:: Python + + extern "C" { + typedef struct PyOneVoid { + PyObject_HEAD + void* _object1; + }; + } + +* ``PyTwoVoid`` which encapsulate one void pointer to the C++ associated + object (an iterator) and one another to the ``PyObject`` of the container. + + .. code-block:: Python + + extern "C" { + typedef struct PyTwoVoid { + PyObject_HEAD + void* _object1; // C++ iterator. + PyObject* _object2; // Python wrapped container. + }; + } + + +.. note:: A ``PyTwoVoid`` can be casted/accessed as a ``PyOneVoid``. + + +2.1 PyTypeManager +~~~~~~~~~~~~~~~~~ + +``PyTypeManager`` has two usage: + +* Act as a registry of all the created ``PyTypeObject``, and serve as a + dispatcher for the ``PyTypeObject`` *tp* like methods. + +* Provide a non-template abstract base class for all the derived ``PyTypeObject``. + As said, it is not a template class but it supplies function member + template. Derived classes are provided to manage different kind of C++ + classes. + + * :cb:`PyTypeManagerVTrunk` + Is an intermediate between the non-template base class and all the + templatized others (do **not** use it directly). + + * :cb:`PyTypeManagerNonDBo` + Template for standalone C++ classes that are not derived from ``DBo``. + For example ``Box`` or ``Parameter``. + + * :cb:`PyTypeManagerDBo` + Template for C++ classes that *are* not derived from ``DBo``. + For example ``Cell`` or ``Instance``. + + * :cb:`PyTypeManagerDerivedDBo` + Template for a ``CppT`` class derived derived from a ``BaseT`` class. + ``CppT`` doesn'y need to be a direct derived of ``BaseT``. ``BaseT`` + needs to derive from ``DBo`` + + * :cb:`PyTypeManagerVector`, template for C++ ``std::vector``. + + * :cb:`PyTypeManagerVectorIterator` + Template for C++ ``std::vector::iterator``, automatically created + from the vector registration. + + * :cb:`PyTypeManagerMap`, template for C++ ``std::map``. + + * :cb:`PyTypeManagerMapIterator` + Template for C++ ``std::vector::iterator``, automatically created + from the map registration. + + * :cb:`PyTypeManagerCollection<,CppT>`, template for C++ ``Hurricane::Collection``. + + * :cb:`PyTypeManagerCollectionIterator<,CppT>` + Template for C++ ``Hurricane::Locator``, automatically created from + the collection registration. + + +2.2 Highjacking the *tp* methods +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Functions of a ``PyTypeObject`` like the *tp* methods (``tp_alloc``, ``tp_print``, +``tp_hash``, ...) must have a C-linkage. So we create *one* function per slot that +we want to use, set that *same* function for all the created ``PyTypeObject``, and +perform a dispacth in it. The drawback is that for each access we have to perform +a map lookup. Hope it is fast. + +Excerpt from the code: + +.. code-block:: C++ + + namespace Isobar3 { + + extern "C" { + + // Here we have C-linkage. + extern long _tpHash ( PyObject* self ) + { + // Dispatch towards the relevant class, based on ob_type pointer. + return PyTypeManager::get( Py_TYPE(self)->_getTpHash( self ); + } + + } + + class PyTypeManager { + public: + void PyTypeManager::_setupPyType () + // Derived classes must implement it as they see fit. + virtual long _getTpHash ( PyObject* ) = 0; + template + static PyTypeManager* _get(); + private: + PyTypeObject _typeObject; + }; + + void PyTypeManager::_setupPyType () + { + PyTypeObject* ob_type = _getTypeObject(); + ob_type->tp_name = _getPyTypeName().c_str(); + ob_type->tp_dealloc = (destructor)&::Isobar3::_tpDeAlloc; + ob_type->tp_str = (reprfunc) &::Isobar3::_tpStr; + // All Python Type will call the same _tpHash(). + ob_type->tp_hash = (hashfunc) &::Isobar3::_tpHash; + ob_type->tp_compare = (cmpfunc) &::Isobar3::_getTpCompare; + ob_type->tp_methods = _getMethods(); + ob_type->tp_getset = _getGetsets(); + } + + } // Isobar3 namespace. + + +2.3 Going From Python to C++ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To convert a C++ object (pointer) into a Python object, a mix of +:cb:`pyToC<>()` templates functions and real functions are supplieds. + +Templates functions are used for all types/classes managed through +the ``PyTypeManger``. They come in two flavors: + +2. **Value as pointer version** (C++ argment type is ``T*``): + The encapsulated C++ object is still a pointer, + but to a *stand-alone* one which has been created for the sole + purpose of this ``PyObject``. Typical example is the ``Box``. + Then, we *copy by value* the contents of the pointed object into + the contents of the pointer argument that we where given. + +3. **Pointer version** (C++ argument type is ``T**``): + The encapsulated C++ object is truly a pointer + to an element of the data-structure, then we just extract the + C++ pointer value. + +Normal function overload are used for ``POD`` types (``bool``, ``int``, +``long``, ``double``, ...) and basic ``STL`` types (``std::string``, ...). + +Specialization for all POD type that can be directly translated into +Python types must be provideds (``bool``, ``int``, ``long``, ``double``, +``std::string``, ...). + +Those templates/functions are the ones the ``Isobar::parse_objects()`` recursive +template function call in turn for each ``PyObject*`` argument. + +.. note:: ``Hurricane::Name`` are *not* exposed to the Python interface, they + must be treated as ``std::string``. + +.. code-block:: C++ + + // Template/Pointer to a value flavor. + template< typename T + , typename std::enable_if< !std::is_pointer::value, bool >::type = true > + inline bool pyToC ( PyObject* pyArg, T* arg ) + { + typedef typename std::remove_cv::type NonConstT; + Isobar3::PyTypeManager* manager = Isobar3::PyTypeManager::_get(); + if (not manager) { + std::cerr << "Isobar3::pyToC<>(const T*): Unsupported type." << std::endl; + return false; + } + if (Py_TYPE(pyArg) != manager->_getTypeObject()) return false; + *(const_cast< NonConstT* >(arg)) = *(( T* )( Isobar3::object1( pyArg ))); + return true; + } + + // Template/Pointer to a pointer flavor. + template + inline bool pyToC ( PyObject* pyArg, T** arg ) + { + Isobar3::PyTypeManager* manager = Isobar3::PyTypeManager::_get(); + if (not manager) { + std::cerr << "Isobar3::pyToC(T*&): Unsupported type \"" << typeid(T).name() << "\"" << std::endl; + return false; + } + *arg = (T*)( Isobar3::object1( pyArg )); + return true; + } + + // True function overload for std::string. + inline bool pyToC ( PyObject* pyArg, std::string* arg ) + { + if (not PyUnicode_Check(pyArg)) return false; + PyObject* pyBytes = PyUnicode_AsASCIIString( pyArg ); + *arg = PyBytes_AsString( pyBytes ); + Py_DECREF( pyBytes ); + return true; + } + + // True function overload for bool. + inline bool pyToC ( PyObject* pyArg, bool* arg ) + { + if (not PyBool_Check(pyArg)) return false; + *arg = (pyArg == Py_True); + return true; + } + + // True function overload for int. + inline bool pyToC ( PyObject* pyArg, int* arg ) + { + if (PyLong_Check(pyArg)) { *arg = PyLong_AsLong( pyArg ); } + else return false; + return true; + } + + + +2.4 Going From C++ to Python +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To convert a Python object into a C++ object, a set of +:cb:`cToPy<>` templates functions are supplieds. + +We completely disable the partially specialized templates for +objects that are non-POD as the compiler seems to be unable to +choose the fully specialized template in this case (or I still +misunderstood the template resolution mechanism). + +In the case of object registered in ``PyTypeManager``, we delegate +the ``PyObject`` creation to the ``PyTypeManager::link()`` template +function, which in turn, can call the right ``PyTypeManagerVTrunk::_link()`` +method. + +.. note:: The ``PyTypeManagerVTrunk::_link()`` method is the reason + **why** we need the intermediate ``PyTypeManagerVTrunk`` + template class. + +.. note:: **Different C++ templates.** You may notice that the two following templates + may look like specializations of the same one: + + * ``template PyObject* cToPy ( CppT object )`` + * ``template PyObject* cToPy ( CppT* object )`` + + Which would be illegal (function templates are not allowed to have *partial* + specialization), but they are *not*. The two pairs + ``(template parameter,function parameter)``, that is ``(CppT,CppT)`` and + ``(CppT,CppT*)`` cannot be made to be a specialization of each other. + + +.. code-block:: C++ + + // Generic template for values. + template< typename CppT > + inline PyObject* cToPy ( CppT object ) + { + if (not Isobar3::PyTypeManager::hasType()) { + std::string message = "Overload for Isobar3::cToPy< " + + Hurricane::demangle(typeid(CppT).name()) + " >() Type not registered in the manager."; + PyErr_SetString( Isobar3::HurricaneError, message.c_str() ); + return NULL; + } + return Isobar3::PyTypeManager::link( new CppT (object) ); + } + + // Disabled for POD & STL types, pointer flavor. + template< typename CppT + , typename std::enable_if< !std::is_same::value + && !std::is_same::value + && !std::is_same::value + && !std::is_same::value,bool>::type = true > + inline PyObject* cToPy ( CppT* object ) + { return Isobar3::PyTypeManager::link( object ); } + + // Disabled for POD & STL types, const pointer flavor. + template< typename CppT + , typename std::enable_if< !std::is_same::value + && !std::is_same::value + && !std::is_same::value + && !std::is_same::value,bool>::type = true > + inline PyObject* cToPy ( const CppT* object ) + { return Isobar3::PyTypeManager::link( const_cast( object )); } + + // Specialization for booleans. + template<> + inline PyObject* cToPy ( bool b ) + { if (b) Py_RETURN_TRUE; Py_RETURN_FALSE; } + + // Specialization for STL std::string. + template<> inline PyObject* cToPy< std::string> ( std::string s ) { return PyUnicode_FromString( s.c_str() ); } + template<> inline PyObject* cToPy ( const std::string s ) { return PyUnicode_FromString( s.c_str() ); } + template<> inline PyObject* cToPy ( const std::string* s ) { return PyUnicode_FromString( s->c_str() ); } + + // Specialization for POD int. + template<> inline PyObject* cToPy< int > ( int i ) { return PyLong_FromLong( i ); } + template<> inline PyObject* cToPy ( const int i ) { return PyLong_FromLong( i ); } + template<> inline PyObject* cToPy ( const int* i ) { return PyLong_FromLong( *i ); } + + +2.5 Object Methods Wrappers +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +One of the more tedious task in exporting a C++ interface towards Python is +to have wrap the C++ functions/methods into C-linkage functions that can be +put into the ``PyMethodDef`` table. + +Basically, we want to fit: + +* A C++ function or method with a variable number of arguments, each argument + having it's own type. + + .. code-block:: C++ + + class Parameter { + // ... + public: + void addValue ( std::string s, int v ); + // ... + }; + +* Into a ``PyCFunction`` prototype. + + .. code-block:: C++ + + extern "C" { + typedef PyObject* ( *PyCFunction )( PyObject* self, PyObject* args ); + } + + Here, the C++ object is provided through the first argument and the + functions arguments through a *tuple* in second argument. In Python + wrappers, the tuple doesn't have any complex structure, it boils down + to a sequence of ``PyObject*`` (that must match the number of arguments + of it's C++ function conterpart). + +So, the problem is to change a Python tuple which size is only kown at +*runtime* into a list of C/C++ parameters known at *compile time*. + +I am not such an expert in template programming so I can find a *generic* +solution able to handle any number of parameters. Instead I did write +a set of templates managing the translation from zero to ten parameters. +I did delay that translation as much as possible so it happens very close +to the C++ function call and the duplicated code needed for each template +is kept to a minimum. + +To translate the Python tuple into an ordered list (vector like) of C++ +object *of different types*, the obvious choice should have been ``std::tuple<>``, +but I did encouter problems when the functions signature did contains +references. So to manage that I did implement: + +* A ``BaseArg`` class and it's template derived ``Arg`` to hold + one value of a type (more or less like ``std::any<>``). + The type of the value attribute of ``Arg`` is ``T`` *stripped* + from reference and constness. This internal type is accessible + through ``Arg::ValueT``. + +* A template list of arguments ``Args`` analogous to + ``std::tuple<>`` which holds a table of ``BaseArg`` to convert all the + arguments. + +* A recursive template converter function ``parse_pyobjects<>``, which is + called through the ``Args<>::parse()`` function. + +Another challenge is the return type. I distinguish three flavor of +return type: + +* Function returning nothing (``void``). +* Function returning a value. +* Function returning a reference to a value. +* Function returning a pointer. + +To uniformize the return type we create four templates ``_callMethodReturn<>()`` +that takes whatever the C++ return type is, and turn it into a ``PyObject*``. +Except for the functions returning ``void``, we call ``cToPy<>()`` to +wrap the value. Given the return type of the method, only one template +will match. But as functions template do not allow partial specialization, +only one must be defined for that method (the one *matching* it's +return type), so we make the template mutually exclusives based on +the ``TR`` type (with the ``std::enable_if<>`` clause). + + +.. note:: In the various ``_callMethodReturn<>`` we have *two* sets for the + method parameters types : ``TArgsF...`` and ``TArgsW...``. This is to + allow a wider range of matching in the template as the type of the + arguments of the method (``TArgsF...``) may not *exactly* matches the + one passed by the wrapper (``TArgsW...``), typically the method has + a ``const`` parameter which is non-``const`` in the wrapper. + +Here is an excerpt of the code: + +.. code-block:: C++ + + // Flavor for "return by value" (seems to match std::is_object<>) + template< typename TC, typename TR, typename... TArgsF, typename... TArgsW + , typename std::enable_if< !std::is_reference::value + && !std::is_pointer ::value + && !std::is_void ::value,bool>::type = true > + inline PyObject* _callMethodReturn ( TR(TC::* method)(TArgsF...), TC* cppObject, TArgsW... args ) + { + TR value = (cppObject->*method)( args... ); + return cToPy( value ); + } + + // Flavor for "return by reference" + template< typename TC, typename TR, typename... TArgsF, typename... TArgsW + , typename std::enable_if< std::is_reference::value + && !std::is_pointer ::value + && !std::is_void ::value,bool>::type = true > + inline PyObject* _callMethodReturn ( TR(TC::* method)(TArgsF...), TC* cppObject, TArgsW... args ) + { + TR rvalue = (cppObject->*method)( args... ); + return cToPy( rvalue ); + } + + // Flavor for "return by pointer". + template< typename TC, typename TR, typename... TArgsF, typename... TArgsW + , typename std::enable_if::value,bool>::type = true > + inline PyObject* _callMethodReturn ( TR(TC::* method)(TArgsF...), TC* cppObject, TArgsW... args ) + { + TR pvalue = (cppObject->*method)( args... ); + return cToPy( pvalue ); + } + + // Flavor for "return void". + template< typename TC, typename TR, typename... TArgsF, typename... TArgsW + , typename std::enable_if::value,bool>::type = true > + inline PyObject* _callMethodReturn ( TR(TC::* method)(TArgsF...), TC* cppObject, TArgsW... args ) + { + (cppObject->*method)( args... ); + Py_RETURN_NONE; + } + + // Make the translation call for a method without arguments. + template< typename TC, typename TR > + inline PyObject* _callMethod ( TR(TC::* method)(), TC* cppObject, Args<>& ) + { return _callMethodReturn( method, cppObject ); } + + // Make the translation call for a method one argument. + template< typename TC, typename TR, typename TA0 > + inline PyObject* _callMethod ( TR(TC::* method)(TA0), TC* cppObject, Args& args ) + { return _callMethodReturn( method, cppObject, as( args[0] ) ); } + + // Make the translation call for a method two argument. + template< typename TC, typename TR, typename TA0, typename TA1 > + PyObject* _callMethod ( TR(TC::* method)(TA0,TA1), TC* cppObject, Args& args ) + { return _callMethodReturn( method, cppObject, as( args[0] ), as( args[1] ) ); } + + +The complete work of translating the Python tuple into a ``Args<>`` is done inside +a dedicated template class ``PyWrapper`` and it's ``call()`` method. +C++ exceptions are catched and translated into Python ones. + +* ``PyWrapper`` the base class wich handle both C++ and Python exceptions. + Provides the ``call()`` function which in turn wraps the ``_call()`` that + must be overloaded in derived classes. + +* ``PyFunctionWrapper<>``, template derived class for C/C++ normal functions. + +* ``PyMethodWrapper<>``, template derived class for C++ class methods. + Two flavors are supported, the real method and a function build upon a + method (first argument beaing the object itself). The later is used when + we need to desambiguate overloaded functions, we must create one *function* + per overload. + +As a class template cannot guess the template parameters, we wrap them into a +function template which can perform the guess. The ``callMethod<>`` template function. + +In the end, what the user can write is simply: + +.. code-block:: C++ + + static PyObject* PyParameter_addValue ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.addValue",&Parameter::addValue,self,args); } + + PyMethodDef PyParameter_Methods[] = + { { "isFile" , (PyCFunction)PyParameter_isFile , METH_NOARGS + , "Tells if this parameter (string) holds a file name." } + , { "addValue", (PyCFunction)PyParameter_addValue, METH_VARARGS + , "Add a new value to parameter of enumerated type." } + // ... + , {NULL, NULL, 0, NULL} /* sentinel */ + }; + + +2.6 Case of C++ overloaded functions +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This apply to both overloaded functions and functions with default arguments values. + +In that case, the only solution is to create a set of different functions +with differents arguments to expose all the various signature of the function. +We then create a function wrapper that calls them in decreasing number of +parameters order. + +.. note:: + + If something goes wrong in a ``callMethod()``, it returns ``NULL`` and + sets an error exception. If, say, the ``setString3()`` variant fails, + but ``setString2()`` succeed, it will clear the error and sets ``rvalue`` + to something non-``NULL``. + +You may also notice that the signature of an un-overloaded function is that +of a normal function, not a class method, with the object (aka C++ ``this`` +passed as the first argument). So ``callMethod()`` and ``PyMethodWrapper`` +support both case (through different constructors). + +.. code-block:: C++ + + static bool setString1 ( Parameter* self, std::string value ) + { return self->setString(value); } + + static bool setString2 ( Parameter* self, std::string value, unsigned int flags ) + { return self->setString(value,Configuration::getDefaultPriority(),flags); } + + static bool setString3 ( Parameter* self + , std::string value + , unsigned int flags + , Parameter::Priority pri ) + { return self->setString(value,pri,flags); } + + static PyObject* PyParameter_setString ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Parameter.setString",&setString3,self,args); + if (not rvalue) rvalue = callMethod("Parameter.setString",&setString2,self,args); + if (not rvalue) rvalue = callMethod("Parameter.setString",&setString1,self,args); + return rvalue; + } + + PyMethodDef PyParameter_Methods[] = + { { "isFile" , (PyCFunction)PyParameter_isFile , METH_NOARGS + , "Tells if this parameter (string) holds a file name." } + , { "setString", (PyCFunction)PyParameter_setString, METH_VARARGS + , "Set the parameter value as a string." } + // ... + , {NULL, NULL, 0, NULL} /* sentinel */ + }; + + +2.7 Wrapper for ordinary functions +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The same mechanic as for the object methods has been built for ordinary +functions. The top level wrapper beeing ``callFunction<>()`` ... + +.. code-block:: C++ + + static PyObject* PyCfg_hasParameter ( PyObject* module, PyObject* args ) + { return callFunction("hasParameter",&hasParameter,args); } + + static PyMethodDef PyCfg_Methods[] = + { { "hasParameter", (PyCFunction)PyCfg_hasParameter, METH_VARARGS + , "Tells if a parameter exists already in the DB." } + // ... + , {NULL, NULL, 0, NULL} /* sentinel */ + }; + + +2.8 Object post-create hook +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +By defining specialization of the ``pyTypePostModuleinit<>()`` function template, +you can add any post-treatment to a Python type object. Like adding sub-classes +or constants values. + +In the following code, we add ``Priority`` as a sub-object of ``Parameter`` then +set some constant values in ``Priority``. This was we emulate the behavior of +the ``Priority`` ``enum``. + +.. code-block:: C++ + + template<> + inline void pyTypePostInit ( PyTypeObject* typeObject ) + { + PyTypeManagerNonDBo::create( (PyObject*)typeObject + , Cfg::PyParameterPriority_Methods + , NULL + , PyTypeManager::NoCppDelete ); + } + + template<> + inline void pyTypePostInit ( PyTypeObject* typeObject ) + { + // Parameter::Priority enum. + addConstant( typeObject, "UseDefault" , Cfg::Parameter::UseDefault ); + addConstant( typeObject, "ApplicationBuiltin", Cfg::Parameter::ApplicationBuiltin ); + addConstant( typeObject, "ConfigurationFile" , Cfg::Parameter::ConfigurationFile ); + addConstant( typeObject, "UserFile" , Cfg::Parameter::UserFile ); + addConstant( typeObject, "CommandLine" , Cfg::Parameter::CommandLine ); + addConstant( typeObject, "Interactive" , Cfg::Parameter::Interactive ); + } + + diff --git a/documentation/content/pages/python-cpp-new/Introduction.rst b/documentation/content/pages/python-cpp-new/Introduction.rst new file mode 100644 index 00000000..10551fc0 --- /dev/null +++ b/documentation/content/pages/python-cpp-new/Introduction.rst @@ -0,0 +1,76 @@ +.. -*- Mode: rst -*- + + +1. Introduction +=============== + +* This document is written for people already familiar with the + `Python/C API Reference Manual`_. + +* The macros provided by the Hurricane Python/C API are written using + the standard Python C/API. That is, you may not use them and write + directly your functions with the original API or any mix between. + You only have to respect some naming convention. + +* Coriolis is build against Python 3.6. + + +1.1 About Technical Choices +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Some would say, why not use *off the shelf* wrappers like ``swig``, +``boost::python`` or ``pybind11``, here are some clues. + +#. **Partial exposure of the C++ class tree.** We expose at Python level + C++ base classes, only if they provides common methods that we want + to see. Otherwise, we just show them as base classes under Python. + For instance ``Library`` is derived from ``DBo``, but we won't see + it under Python. + +#. **Bi-directional communication.** When a Python object is deleted, the + wrapper obviously has a pointer toward the underlying C++ object and + is able to delete it. But, the reverse case can occurs, meaning that + you have a C++ object wrapped in Python and the database delete the + underlying object. The wrapped Python object *must* be informed that + it no longer refer a valid C++ one. Moreover, as we do not control + when Python objects gets deleteds (that is, when their reference count + reaches zero), we can have valid Python object with a dangling + C++ pointer. So our Python objects can be warned by the C++ objects + that they are no longer valid and any other operation than the + deletion should result in a severe non-blocking error. + + To be precise, this apply to persistent object in the C++ database, + like ``Cell``, ``Net``, ``Instance`` or ``Component``. Short lived + objects like ``Box`` or ``Point`` retains the classic Python behavior. + + Another aspect is that, for all derived ``DBo`` objects, one and only + one Python object is associated. For one given ``Instance`` object we + will always return the *same* ``PyInstance`` object, thanks to the + bi-directional link. Obviously, the *reference count* of the + ``PyInstance`` is managed accordingly. This mechanism is implemented + by the ``PyTypeManager::_link()`` method. + +#. **Linking accross modules.** As far as I understand, the wrappers + are for monolithic libraries. That is, you wrap the entire library + in one go. But Coriolis has a modular design, the core database + then various tools. We do not, and cannot, have one gigantic wrapper + that would encompass all the libraries in one go. We do one Python + module for each C++ library. + + This brings another issue, at Python level this time. The Python + modules for the libraries have to share some functions. Python + provides a mechanism to pass C function pointers accross modules, + (``Capsule``) but I did not fully understand it. + + Instead, we register all the newly defined Python type object + in the ``PyTypeManager`` and we link the associated C++ library + into all Python modules. So all types and ancillary functions can + easily be seen accross modules. + + This way, we do not rely upon a pointer transmission through Python + modules, but directly uses linker capabilities. + + **The PyTypeManager** approach also suppress the need to *split* into + two libraries the Python modules like in the C-Macros implementation, + and the double compilation pass. + diff --git a/documentation/content/pages/python-cpp-new/PythonCppNew_HTML.rst b/documentation/content/pages/python-cpp-new/PythonCppNew_HTML.rst new file mode 100644 index 00000000..dab81f06 --- /dev/null +++ b/documentation/content/pages/python-cpp-new/PythonCppNew_HTML.rst @@ -0,0 +1,29 @@ +.. -*- mode: rst; explicit-buffer-name: "PythonCppNew_HTML.rst" -*- + + +============================================ +Hurricane Python/C++ API Tutorial (template) +============================================ + + +:slug: python-cpp-new +:date: 2020-01-02 16:00 +:Authors: Jean-Paul Chaput +:Contact: +:Version: June 4, 2019 (jpc) +:status: hidden + + +.. include:: ../../../etc/definitions.rst + + +Printable version of this Document +================================== + + +.. contents:: + :depth: 2 + +.. include:: Introduction.rst +.. include:: Implementation.rst + diff --git a/documentation/content/pdfs/CheckToolkit.pdf b/documentation/content/pdfs/CheckToolkit.pdf index 46216962..a8a5ad4a 100644 Binary files a/documentation/content/pdfs/CheckToolkit.pdf and b/documentation/content/pdfs/CheckToolkit.pdf differ diff --git a/documentation/content/pdfs/PythonCpp.pdf b/documentation/content/pdfs/PythonCpp.pdf index 5c4dbcfb..5c55a4a4 100644 Binary files a/documentation/content/pdfs/PythonCpp.pdf and b/documentation/content/pdfs/PythonCpp.pdf differ diff --git a/documentation/content/pdfs/PythonTutorial.pdf b/documentation/content/pdfs/PythonTutorial.pdf index 74465d57..71e655b1 100644 Binary files a/documentation/content/pdfs/PythonTutorial.pdf and b/documentation/content/pdfs/PythonTutorial.pdf differ diff --git a/documentation/content/pdfs/RDS.pdf b/documentation/content/pdfs/RDS.pdf index 9170d8fe..6782502d 100644 Binary files a/documentation/content/pdfs/RDS.pdf and b/documentation/content/pdfs/RDS.pdf differ diff --git a/documentation/content/pdfs/Stratus.pdf b/documentation/content/pdfs/Stratus.pdf index c80ec59d..b68bb199 100644 Binary files a/documentation/content/pdfs/Stratus.pdf and b/documentation/content/pdfs/Stratus.pdf differ diff --git a/documentation/content/pdfs/UsersGuide.pdf b/documentation/content/pdfs/UsersGuide.pdf index aefbd7be..0a23e91f 100644 Binary files a/documentation/content/pdfs/UsersGuide.pdf and b/documentation/content/pdfs/UsersGuide.pdf differ diff --git a/documentation/examples/code/engine/smurf/CMakeLists.txt b/documentation/examples/code/engine/smurf/CMakeLists.txt index ed1548ec..295f9bea 100644 --- a/documentation/examples/code/engine/smurf/CMakeLists.txt +++ b/documentation/examples/code/engine/smurf/CMakeLists.txt @@ -11,7 +11,7 @@ setup_project_paths(CORIOLIS) set_cmake_policies() - setup_boost(program_options python regex) + setup_boost(program_options python) setup_qt() find_package(LibXml2 REQUIRED) diff --git a/documentation/output/pages/documentation.html b/documentation/output/pages/documentation.html index 0b4b8f2a..ad8c67b0 100644 --- a/documentation/output/pages/documentation.html +++ b/documentation/output/pages/documentation.html @@ -141,7 +141,9 @@ Using the software

    Python Tutorial
    A Tutorial to use Coriolis through Python

    Python/C++ Tutorial
    -A Tutorial to the Python/C++ interface api

    +A Tutorial to the Python/C++ interface api (C-macros version)

    +

    Python/C++ Tutorial (template)
    +A Tutorial to the Python/C++ interface api (C++ template version)

    Stratus Language
    A Netlist Capture Language (on top of Python)

    DpGen Extension (Stratus)
    diff --git a/documentation/output/pages/python-cpp-new.html b/documentation/output/pages/python-cpp-new.html new file mode 100644 index 00000000..06c32538 --- /dev/null +++ b/documentation/output/pages/python-cpp-new.html @@ -0,0 +1,831 @@ + + + + + + + + + + + Hurricane Python/C++ API Tutorial (template) - Coriolis VLSI CAD Tools [offline] + + + + + + + + + + + + + + + + + + + + + + + + +

    + + + + --> + + + + + + +
    +
    +
    +
    + LIP6 + Sorbonne Universite + CNRS +

    Hurricane Python/C++ API Tutorial (template)

    +
    +
    +
    +
    +
    + + +
    + + + + +
    + + + + + + + + + +
    +

    1. Introduction

    +
      +
    • This document is written for people already familiar with the +Python/C API Reference Manual.
    • +
    • The macros provided by the Hurricane Python/C API are written using +the standard Python C/API. That is, you may not use them and write +directly your functions with the original API or any mix between. +You only have to respect some naming convention.
    • +
    • Coriolis is build against Python 3.6.
    • +
    +
    +

    1.1 About Technical Choices

    +

    Some would say, why not use off the shelf wrappers like swig, +boost::python or pybind11, here are some clues.

    +
      +
    1. Partial exposure of the C++ class tree. We expose at Python level +C++ base classes, only if they provides common methods that we want +to see. Otherwise, we just show them as base classes under Python. +For instance Library is derived from DBo, but we won't see +it under Python.

      +
    2. +
    3. Bi-directional communication. When a Python object is deleted, the +wrapper obviously has a pointer toward the underlying C++ object and +is able to delete it. But, the reverse case can occurs, meaning that +you have a C++ object wrapped in Python and the database delete the +underlying object. The wrapped Python object must be informed that +it no longer refer a valid C++ one. Moreover, as we do not control +when Python objects gets deleteds (that is, when their reference count +reaches zero), we can have valid Python object with a dangling +C++ pointer. So our Python objects can be warned by the C++ objects +that they are no longer valid and any other operation than the +deletion should result in a severe non-blocking error.

      +

      To be precise, this apply to persistent object in the C++ database, +like Cell, Net, Instance or Component. Short lived +objects like Box or Point retains the classic Python behavior.

      +

      Another aspect is that, for all derived DBo objects, one and only +one Python object is associated. For one given Instance object we +will always return the same PyInstance object, thanks to the +bi-directional link. Obviously, the reference count of the +PyInstance is managed accordingly. This mechanism is implemented +by the PyTypeManager::_link() method.

      +
    4. +
    5. Linking accross modules. As far as I understand, the wrappers +are for monolithic libraries. That is, you wrap the entire library +in one go. But Coriolis has a modular design, the core database +then various tools. We do not, and cannot, have one gigantic wrapper +that would encompass all the libraries in one go. We do one Python +module for each C++ library.

      +

      This brings another issue, at Python level this time. The Python +modules for the libraries have to share some functions. Python +provides a mechanism to pass C function pointers accross modules, +(Capsule) but I did not fully understand it.

      +

      Instead, we register all the newly defined Python type object +in the PyTypeManager and we link the associated C++ library +into all Python modules. So all types and ancillary functions can +easily be seen accross modules.

      +

      This way, we do not rely upon a pointer transmission through Python +modules, but directly uses linker capabilities.

      +

      The PyTypeManager approach also suppress the need to split into +two libraries the Python modules like in the C-Macros implementation, +and the double compilation pass.

      +
    6. +
    + +
    +
    +
    +

    2. Implementation

    +

    We do not try to provides an iterface as sleek as pybind11 that completely +hides the Python/C API. Instead we keep mostly visible the classic structure of +the Python/C API but we provides templates to automate as much as possible the +boring tasks (and code duplication). This way, if we need a very specific +feature at some point, we can still revert back to the pure Python/C API.

    +

    The wrapper basically provides support for three kind of operations:

    +
      +
    1. Encapsulate C++ object in Python ones, done by cToPy<>() template. +Template specializations are defined for the POD and basic STL +types like std::string.

      +

      To add more easily new specializations, they resides in the top level +scope (not inside Isobar).

      +
    2. +
    3. Decapsulate a C++ object from a Python one, done by pyToC(). +It's implementation is slightly different from the one of cToPy<>() +in the sense that it is a mix of normal C++ functions and template +functions. I was having trouble inside the callMethod() to access +to templates specialization defined after that point, so function be +it.

      +

      There are two mutually exclusives versions of the pyToC<>() for +objects managed through the type manager. One is for value types and +the other for pointer types.

      +
    4. +
    5. Wrap C/C++ functions & methods inside C-linkage PyCFunction, that is +PyOject* (*)(PyObject*, PyObject*). This is done respectively through +callFunction<>() and callMethod<>(). callMethod<>() having +two variants, one for directly calling the function member, if there is +no overload and one for calling one given flavor of the overloaded +function member.

      +

      In addition we provides special variants for Python unary, binary and +operator functions.

      +
    6. +
    +

    In addition to those user exposed features, we have:

    +
      +
    • The PyTypeManager and it's derived classes to store and share informations +about all our newly defined PyTypeObjects.
    • +
    • Various wrapper classes to wrap functions & methods. They are not directly +exposed because the template class intanciation needs the template parameters +to be explicitely given, wich is tedious. Instead we create them through +a function template call, which will perform for us the template type +deduction.
    • +
    +

    We creates only two kind of PyObject (but many PyTypeObject):

    +
      +
    • PyOneVoid which encapsulate one void pointer to the C++ associated +object.

      +
      extern "C" {
      +  typedef struct PyOneVoid {
      +    PyObject_HEAD
      +    void* _object1;
      +  };
      +}
      +
      +
    • +
    • PyTwoVoid which encapsulate one void pointer to the C++ associated +object (an iterator) and one another to the PyObject of the container.

      +
      extern "C" {
      +  typedef struct PyTwoVoid {
      +    PyObject_HEAD
      +    void*     _object1;  // C++ iterator.
      +    PyObject* _object2;  // Python wrapped container.
      +  };
      +}
      +
      +
    • +
    +
    +

    Note

    +

    A PyTwoVoid can be casted/accessed as a PyOneVoid.

    +
    +
    +

    2.1 PyTypeManager

    +

    PyTypeManager has two usage:

    +
      +
    • Act as a registry of all the created PyTypeObject, and serve as a +dispatcher for the PyTypeObject tp like methods.
    • +
    • Provide a non-template abstract base class for all the derived PyTypeObject. +As said, it is not a template class but it supplies function member +template. Derived classes are provided to manage different kind of C++ +classes.
        +
      • PyTypeManagerVTrunk<CppT> +Is an intermediate between the non-template base class and all the +templatized others (do not use it directly).
      • +
      • PyTypeManagerNonDBo<CppT> +Template for standalone C++ classes that are not derived from DBo. +For example Box or Parameter.
      • +
      • PyTypeManagerDBo<CppT> +Template for C++ classes that are not derived from DBo. +For example Cell or Instance.
      • +
      • PyTypeManagerDerivedDBo<CppT,BaseT> +Template for a CppT class derived derived from a BaseT class. +CppT doesn'y need to be a direct derived of BaseT. BaseT +needs to derive from DBo
      • +
      • PyTypeManagerVector<CppT>, template for C++ std::vector<CppT*>.
      • +
      • PyTypeManagerVectorIterator<CppT> +Template for C++ std::vector<CppT*>::iterator, automatically created +from the vector registration.
      • +
      • PyTypeManagerMap<CppK,CppT>, template for C++ std::map<CppK*,CppT*>.
      • +
      • PyTypeManagerMapIterator<CppK,CppT> +Template for C++ std::vector<CppK*,CppT*>::iterator, automatically created +from the map registration.
      • +
      • PyTypeManagerCollection<,CppT>, template for C++ Hurricane::Collection<CppT*>.
      • +
      • PyTypeManagerCollectionIterator<,CppT> +Template for C++ Hurricane::Locator<CppT*>, automatically created from +the collection registration.
      • +
      +
    • +
    +
    +
    +

    2.2 Highjacking the tp methods

    +

    Functions of a PyTypeObject like the tp methods (tp_alloc, tp_print, +tp_hash, ...) must have a C-linkage. So we create one function per slot that +we want to use, set that same function for all the created PyTypeObject, and +perform a dispacth in it. The drawback is that for each access we have to perform +a map lookup. Hope it is fast.

    +

    Excerpt from the code:

    +
    namespace Isobar3 {
    +
    +  extern "C" {
    +
    +    // Here we have C-linkage.
    +    extern long  _tpHash ( PyObject* self )
    +    {
    +    // Dispatch towards the relevant class, based on ob_type pointer.
    +      return PyTypeManager::get( Py_TYPE(self)->_getTpHash( self );
    +    }
    +
    +  }
    +
    +  class PyTypeManager {
    +    public:
    +              void           PyTypeManager::_setupPyType ()
    +      // Derived classes must implement it as they see fit.
    +      virtual long           _getTpHash                  ( PyObject* ) = 0;
    +      template<typename CppT>
    +      static  PyTypeManager* _get();
    +    private:
    +      PyTypeObject  _typeObject;
    +  };
    +
    +  void  PyTypeManager::_setupPyType ()
    +  {
    +    PyTypeObject* ob_type = _getTypeObject();
    +    ob_type->tp_name    = _getPyTypeName().c_str();
    +    ob_type->tp_dealloc = (destructor)&::Isobar3::_tpDeAlloc;
    +    ob_type->tp_str     = (reprfunc)  &::Isobar3::_tpStr;
    +    // All Python Type will call the same _tpHash().
    +    ob_type->tp_hash    = (hashfunc)  &::Isobar3::_tpHash;
    +    ob_type->tp_compare = (cmpfunc)   &::Isobar3::_getTpCompare;
    +    ob_type->tp_methods = _getMethods();
    +    ob_type->tp_getset  = _getGetsets();
    +  }
    +
    +}  // Isobar3 namespace.
    +
    +
    +
    +

    2.3 Going From Python to C++

    +

    To convert a C++ object (pointer) into a Python object, a mix of +pyToC<>() templates functions and real functions are supplieds.

    +

    Templates functions are used for all types/classes managed through +the PyTypeManger. They come in two flavors:

    +
      +
    1. Value as pointer version (C++ argment type is T*): +The encapsulated C++ object is still a pointer, +but to a stand-alone one which has been created for the sole +purpose of this PyObject. Typical example is the Box. +Then, we copy by value the contents of the pointed object into +the contents of the pointer argument that we where given.
    2. +
    3. Pointer version (C++ argument type is T**): +The encapsulated C++ object is truly a pointer +to an element of the data-structure, then we just extract the +C++ pointer value.
    4. +
    +

    Normal function overload are used for POD types (bool, int, +long, double, ...) and basic STL types (std::string, ...).

    +

    Specialization for all POD type that can be directly translated into +Python types must be provideds (bool, int, long, double, +std::string, ...).

    +

    Those templates/functions are the ones the Isobar::parse_objects() recursive +template function call in turn for each PyObject* argument.

    +
    +

    Note

    +

    Hurricane::Name are not exposed to the Python interface, they +must be treated as std::string.

    +
    +
    // Template/Pointer to a value flavor.
    +template< typename T
    +        , typename std::enable_if< !std::is_pointer<T>::value, bool >::type = true >
    +inline bool  pyToC ( PyObject* pyArg, T* arg )
    +{
    +  typedef typename std::remove_cv<T>::type  NonConstT;
    +  Isobar3::PyTypeManager* manager = Isobar3::PyTypeManager::_get<T>();
    +  if (not manager) {
    +    std::cerr << "Isobar3::pyToC<>(const T*): Unsupported type." << std::endl;
    +    return false;
    +  }
    +  if (Py_TYPE(pyArg) != manager->_getTypeObject()) return false;
    +  *(const_cast< NonConstT* >(arg)) = *(( T* )( Isobar3::object1( pyArg )));
    +  return true;
    +}
    +
    +// Template/Pointer to a pointer flavor.
    +template<typename T>
    +inline bool  pyToC ( PyObject* pyArg, T** arg )
    +{
    +  Isobar3::PyTypeManager* manager = Isobar3::PyTypeManager::_get<T>();
    +  if (not manager) {
    +    std::cerr << "Isobar3::pyToC<T>(T*&): Unsupported type \"" << typeid(T).name() << "\"" << std::endl;
    +    return false;
    +  }
    +  *arg = (T*)( Isobar3::object1( pyArg ));
    +  return true;
    +}
    +
    +// True function overload for std::string.
    +inline bool  pyToC ( PyObject* pyArg, std::string* arg )
    +{
    +  if (not PyUnicode_Check(pyArg)) return false;
    +  PyObject* pyBytes = PyUnicode_AsASCIIString( pyArg );
    +  *arg = PyBytes_AsString( pyBytes );
    +  Py_DECREF( pyBytes );
    +  return true;
    +}
    +
    +// True function overload for bool.
    +inline bool  pyToC ( PyObject* pyArg, bool* arg )
    +{
    +  if (not PyBool_Check(pyArg)) return false;
    +  *arg = (pyArg == Py_True);
    +  return true;
    +}
    +
    +// True function overload for int.
    +inline bool  pyToC ( PyObject* pyArg, int* arg )
    +{
    +  if (PyLong_Check(pyArg)) { *arg = PyLong_AsLong( pyArg ); }
    +  else return false;
    +  return true;
    +}
    +
    +
    +
    +

    2.4 Going From C++ to Python

    +

    To convert a Python object into a C++ object, a set of +cToPy<> templates functions are supplieds.

    +

    We completely disable the partially specialized templates for +objects that are non-POD as the compiler seems to be unable to +choose the fully specialized template in this case (or I still +misunderstood the template resolution mechanism).

    +

    In the case of object registered in PyTypeManager, we delegate +the PyObject creation to the PyTypeManager::link() template +function, which in turn, can call the right PyTypeManagerVTrunk<CppT>::_link() +method.

    +
    +

    Note

    +

    The PyTypeManagerVTrunk<CppT>::_link() method is the reason +why we need the intermediate PyTypeManagerVTrunk<CppT> +template class.

    +
    +
    +

    Note

    +

    Different C++ templates. You may notice that the two following templates +may look like specializations of the same one:

    +
      +
    • template<typename CppT> PyObject* cToPy ( CppT  object )
    • +
    • template<typename CppT> PyObject* cToPy ( CppT* object )
    • +
    +

    Which would be illegal (function templates are not allowed to have partial +specialization), but they are not. The two pairs +(template parameter,function parameter), that is (CppT,CppT) and +(CppT,CppT*) cannot be made to be a specialization of each other.

    +
    +
    // Generic template for values.
    +template< typename CppT >
    +inline PyObject* cToPy ( CppT object )
    +{
    +  if (not Isobar3::PyTypeManager::hasType<CppT>()) {
    +    std::string message = "Overload for Isobar3::cToPy< "
    +                        + Hurricane::demangle(typeid(CppT).name()) + " >() Type not registered in the manager.";
    +    PyErr_SetString( Isobar3::HurricaneError, message.c_str() );
    +    return NULL;
    +  }
    +  return Isobar3::PyTypeManager::link<CppT>( new CppT (object) );
    +}
    +
    +// Disabled for POD & STL types, pointer flavor.
    +template< typename CppT
    +        , typename std::enable_if<   !std::is_same<CppT,bool>::value
    +                                  && !std::is_same<CppT,int >::value
    +                                  && !std::is_same<CppT,std::string>::value
    +                                  && !std::is_same<CppT,const std::string>::value,bool>::type = true >
    +inline PyObject* cToPy ( CppT* object )
    +{ return Isobar3::PyTypeManager::link<CppT>( object ); }
    +
    +// Disabled for POD & STL types, const pointer flavor.
    +template< typename CppT
    +        , typename std::enable_if<   !std::is_same<CppT,bool>::value
    +                                  && !std::is_same<CppT,int >::value
    +                                  && !std::is_same<CppT,std::string>::value
    +                                  && !std::is_same<CppT,const std::string>::value,bool>::type = true >
    +inline PyObject* cToPy ( const CppT* object )
    +{ return Isobar3::PyTypeManager::link<CppT>( const_cast<CppT*>( object )); }
    +
    +// Specialization for booleans.
    +template<>
    +inline PyObject* cToPy<bool> ( bool b )
    +{ if (b) Py_RETURN_TRUE; Py_RETURN_FALSE; }
    +
    +// Specialization for STL std::string.
    +template<> inline PyObject* cToPy<      std::string>  (       std::string  s ) { return PyUnicode_FromString( s.c_str() ); }
    +template<> inline PyObject* cToPy<const std::string > ( const std::string  s ) { return PyUnicode_FromString( s.c_str() ); }
    +template<> inline PyObject* cToPy<const std::string*> ( const std::string* s ) { return PyUnicode_FromString( s->c_str() ); }
    +
    +// Specialization for POD int.
    +template<> inline PyObject* cToPy<      int > (       int  i ) { return PyLong_FromLong(  i ); }
    +template<> inline PyObject* cToPy<const int > ( const int  i ) { return PyLong_FromLong(  i ); }
    +template<> inline PyObject* cToPy<const int*> ( const int* i ) { return PyLong_FromLong( *i ); }
    +
    +
    +
    +

    2.5 Object Methods Wrappers

    +

    One of the more tedious task in exporting a C++ interface towards Python is +to have wrap the C++ functions/methods into C-linkage functions that can be +put into the PyMethodDef table.

    +

    Basically, we want to fit:

    +
      +
    • A C++ function or method with a variable number of arguments, each argument +having it's own type.

      +
      class Parameter {
      +  // ...
      +  public:
      +    void  addValue ( std::string s, int v );
      +  // ...
      +};
      +
      +
    • +
    • Into a PyCFunction prototype.

      +
      extern "C" {
      +  typedef PyObject* ( *PyCFunction )( PyObject* self, PyObject* args );
      +}
      +
      +

      Here, the C++ object is provided through the first argument and the +functions arguments through a tuple in second argument. In Python +wrappers, the tuple doesn't have any complex structure, it boils down +to a sequence of PyObject* (that must match the number of arguments +of it's C++ function conterpart).

      +
    • +
    +

    So, the problem is to change a Python tuple which size is only kown at +runtime into a list of C/C++ parameters known at compile time.

    +

    I am not such an expert in template programming so I can find a generic +solution able to handle any number of parameters. Instead I did write +a set of templates managing the translation from zero to ten parameters. +I did delay that translation as much as possible so it happens very close +to the C++ function call and the duplicated code needed for each template +is kept to a minimum.

    +

    To translate the Python tuple into an ordered list (vector like) of C++ +object of different types, the obvious choice should have been std::tuple<>, +but I did encouter problems when the functions signature did contains +references. So to manage that I did implement:

    +
      +
    • A BaseArg class and it's template derived Arg<T> to hold +one value of a type (more or less like std::any<>). +The type of the value attribute of Arg<T> is T stripped +from reference and constness. This internal type is accessible +through Arg<T>::ValueT.
    • +
    • A template list of arguments Args<typename... Ts> analogous to +std::tuple<> which holds a table of BaseArg to convert all the +arguments.
    • +
    • A recursive template converter function parse_pyobjects<>, which is +called through the Args<>::parse() function.
    • +
    +

    Another challenge is the return type. I distinguish three flavor of +return type:

    +
      +
    • Function returning nothing (void).
    • +
    • Function returning a value.
    • +
    • Function returning a reference to a value.
    • +
    • Function returning a pointer.
    • +
    +

    To uniformize the return type we create four templates _callMethodReturn<>() +that takes whatever the C++ return type is, and turn it into a PyObject*. +Except for the functions returning void, we call cToPy<>() to +wrap the value. Given the return type of the method, only one template +will match. But as functions template do not allow partial specialization, +only one must be defined for that method (the one matching it's +return type), so we make the template mutually exclusives based on +the TR type (with the std::enable_if<> clause).

    +
    +

    Note

    +

    In the various _callMethodReturn<> we have two sets for the +method parameters types : TArgsF... and TArgsW.... This is to +allow a wider range of matching in the template as the type of the +arguments of the method (TArgsF...) may not exactly matches the +one passed by the wrapper (TArgsW...), typically the method has +a const parameter which is non-const in the wrapper.

    +
    +

    Here is an excerpt of the code:

    +
    // Flavor for "return by value" (seems to match std::is_object<>)
    +template< typename TC, typename TR, typename... TArgsF, typename... TArgsW
    +        , typename std::enable_if<   !std::is_reference<TR>::value
    +                                  && !std::is_pointer  <TR>::value
    +                                  && !std::is_void     <TR>::value,bool>::type = true >
    +inline PyObject* _callMethodReturn ( TR(TC::* method)(TArgsF...), TC* cppObject, TArgsW... args )
    +{
    +  TR value = (cppObject->*method)( args... );
    +  return cToPy( value );
    +}
    +
    +// Flavor for "return by reference"
    +template< typename TC, typename TR, typename... TArgsF, typename... TArgsW
    +        , typename std::enable_if<    std::is_reference<TR>::value
    +                                  && !std::is_pointer  <TR>::value
    +                                  && !std::is_void     <TR>::value,bool>::type = true >
    +inline PyObject* _callMethodReturn ( TR(TC::* method)(TArgsF...), TC* cppObject, TArgsW... args )
    +{
    +  TR rvalue = (cppObject->*method)( args... );
    +  return cToPy( rvalue );
    +}
    +
    +// Flavor for "return by pointer".
    +template< typename TC, typename TR, typename... TArgsF, typename... TArgsW
    +        , typename std::enable_if<std::is_pointer<TR>::value,bool>::type = true >
    +inline PyObject* _callMethodReturn ( TR(TC::* method)(TArgsF...), TC* cppObject, TArgsW... args )
    +{
    +  TR pvalue = (cppObject->*method)( args... );
    +  return cToPy( pvalue );
    +}
    +
    +// Flavor for "return void".
    +template< typename TC, typename TR, typename... TArgsF, typename... TArgsW
    +        , typename std::enable_if<std::is_void<TR>::value,bool>::type = true >
    +inline PyObject* _callMethodReturn ( TR(TC::* method)(TArgsF...), TC* cppObject, TArgsW... args )
    +{
    +  (cppObject->*method)( args... );
    +  Py_RETURN_NONE;
    +}
    +
    +// Make the translation call for a method without arguments.
    +template< typename TC, typename TR >
    +inline PyObject* _callMethod ( TR(TC::* method)(), TC* cppObject, Args<>& )
    +{ return _callMethodReturn<TC,TR>( method, cppObject ); }
    +
    +// Make the translation call for a method one argument.
    +template< typename TC, typename TR, typename TA0 >
    +inline PyObject* _callMethod ( TR(TC::* method)(TA0), TC* cppObject, Args<TA0>& args )
    +{ return _callMethodReturn( method, cppObject, as<TA0>( args[0] ) ); }
    +
    +// Make the translation call for a method two argument.
    +template< typename TC, typename TR, typename TA0, typename TA1 >
    +PyObject* _callMethod ( TR(TC::* method)(TA0,TA1), TC* cppObject, Args<TA0,TA1>& args )
    +{ return _callMethodReturn( method, cppObject, as<TA0>( args[0] ), as<TA1>( args[1] ) ); }
    +
    +

    The complete work of translating the Python tuple into a Args<> is done inside +a dedicated template class PyWrapper and it's call() method. +C++ exceptions are catched and translated into Python ones.

    +
      +
    • PyWrapper the base class wich handle both C++ and Python exceptions. +Provides the call() function which in turn wraps the _call() that +must be overloaded in derived classes.
    • +
    • PyFunctionWrapper<>, template derived class for C/C++ normal functions.
    • +
    • PyMethodWrapper<>, template derived class for C++ class methods. +Two flavors are supported, the real method and a function build upon a +method (first argument beaing the object itself). The later is used when +we need to desambiguate overloaded functions, we must create one function +per overload.
    • +
    +

    As a class template cannot guess the template parameters, we wrap them into a +function template which can perform the guess. The callMethod<> template function.

    +

    In the end, what the user can write is simply:

    +
    static PyObject* PyParameter_addValue ( PyObject* self, PyObject* args )
    +{ return callMethod("Parameter.addValue",&Parameter::addValue,self,args); }
    +
    +PyMethodDef PyParameter_Methods[] =
    +  { { "isFile"  , (PyCFunction)PyParameter_isFile  , METH_NOARGS
    +                , "Tells if this parameter (string) holds a file name." }
    +  , { "addValue", (PyCFunction)PyParameter_addValue, METH_VARARGS
    +                , "Add a new value to parameter of enumerated type." }
    +  // ...
    +  , {NULL, NULL, 0, NULL}   /* sentinel */
    +  };
    +
    +
    +
    +

    2.6 Case of C++ overloaded functions

    +

    This apply to both overloaded functions and functions with default arguments values.

    +

    In that case, the only solution is to create a set of different functions +with differents arguments to expose all the various signature of the function. +We then create a function wrapper that calls them in decreasing number of +parameters order.

    +
    +

    Note

    +

    If something goes wrong in a callMethod(), it returns NULL and +sets an error exception. If, say, the setString3() variant fails, +but setString2() succeed, it will clear the error and sets rvalue +to something non-NULL.

    +
    +

    You may also notice that the signature of an un-overloaded function is that +of a normal function, not a class method, with the object (aka C++ this +passed as the first argument). So callMethod() and PyMethodWrapper +support both case (through different constructors).

    +
    static bool  setString1 ( Parameter* self, std::string value )
    +{ return self->setString(value); }
    +
    +static bool  setString2 ( Parameter* self, std::string value, unsigned int flags )
    +{ return self->setString(value,Configuration::getDefaultPriority(),flags); }
    +
    +static bool  setString3 ( Parameter* self
    +                        , std::string value
    +                        , unsigned int flags
    +                        , Parameter::Priority pri )
    +{ return self->setString(value,pri,flags); }
    +
    +static PyObject* PyParameter_setString ( PyObject* self, PyObject* args )
    +{
    +  PyObject*       rvalue = callMethod("Parameter.setString",&setString3,self,args);
    +  if (not rvalue) rvalue = callMethod("Parameter.setString",&setString2,self,args);
    +  if (not rvalue) rvalue = callMethod("Parameter.setString",&setString1,self,args);
    +  return rvalue;
    +}
    +
    +PyMethodDef PyParameter_Methods[] =
    +  { { "isFile"  , (PyCFunction)PyParameter_isFile   , METH_NOARGS
    +                , "Tells if this parameter (string) holds a file name." }
    + , { "setString", (PyCFunction)PyParameter_setString, METH_VARARGS
    +                , "Set the parameter value as a string." }
    +  // ...
    +  , {NULL, NULL, 0, NULL}   /* sentinel */
    +  };
    +
    +
    +
    +

    2.7 Wrapper for ordinary functions

    +

    The same mechanic as for the object methods has been built for ordinary +functions. The top level wrapper beeing callFunction<>() ...

    +
    static PyObject* PyCfg_hasParameter ( PyObject* module, PyObject* args )
    +{ return callFunction("hasParameter",&hasParameter,args); }
    +
    +static PyMethodDef PyCfg_Methods[] =
    +  { { "hasParameter", (PyCFunction)PyCfg_hasParameter, METH_VARARGS
    +                    , "Tells if a parameter exists already in the DB." }
    +  // ...
    +  , {NULL, NULL, 0, NULL}  /* sentinel */
    +  };
    +
    +
    +
    +

    2.8 Object post-create hook

    +

    By defining specialization of the pyTypePostModuleinit<>() function template, +you can add any post-treatment to a Python type object. Like adding sub-classes +or constants values.

    +

    In the following code, we add Priority as a sub-object of Parameter then +set some constant values in Priority. This was we emulate the behavior of +the Priority enum.

    +
    template<>
    +inline void  pyTypePostInit<Cfg::Parameter> ( PyTypeObject* typeObject )
    +{
    +  PyTypeManagerNonDBo<Cfg::Parameter::Priority>::create( (PyObject*)typeObject
    +                                                       , Cfg::PyParameterPriority_Methods
    +                                                       , NULL
    +                                                       , PyTypeManager::NoCppDelete );
    +}
    +
    +template<>
    +inline void  pyTypePostInit<Cfg::Parameter::Priority> ( PyTypeObject* typeObject )
    +{
    +// Parameter::Priority enum.
    +  addConstant( typeObject, "UseDefault"        , Cfg::Parameter::UseDefault );
    +  addConstant( typeObject, "ApplicationBuiltin", Cfg::Parameter::ApplicationBuiltin );
    +  addConstant( typeObject, "ConfigurationFile" , Cfg::Parameter::ConfigurationFile );
    +  addConstant( typeObject, "UserFile"          , Cfg::Parameter::UserFile );
    +  addConstant( typeObject, "CommandLine"       , Cfg::Parameter::CommandLine );
    +  addConstant( typeObject, "Interactive"       , Cfg::Parameter::Interactive );
    +}
    +
    +
    +
    + +
    + + + + + + + \ No newline at end of file diff --git a/documentation/output/pdfs/CheckToolkit.pdf b/documentation/output/pdfs/CheckToolkit.pdf index c7add24c..a8a5ad4a 100644 Binary files a/documentation/output/pdfs/CheckToolkit.pdf and b/documentation/output/pdfs/CheckToolkit.pdf differ diff --git a/documentation/output/pdfs/PythonCpp.pdf b/documentation/output/pdfs/PythonCpp.pdf index f17e78a5..5c55a4a4 100644 Binary files a/documentation/output/pdfs/PythonCpp.pdf and b/documentation/output/pdfs/PythonCpp.pdf differ diff --git a/documentation/output/pdfs/PythonTutorial.pdf b/documentation/output/pdfs/PythonTutorial.pdf index f71e1add..71e655b1 100644 Binary files a/documentation/output/pdfs/PythonTutorial.pdf and b/documentation/output/pdfs/PythonTutorial.pdf differ diff --git a/documentation/output/pdfs/RDS.pdf b/documentation/output/pdfs/RDS.pdf index 95c8df2e..6782502d 100644 Binary files a/documentation/output/pdfs/RDS.pdf and b/documentation/output/pdfs/RDS.pdf differ diff --git a/documentation/output/pdfs/Stratus.pdf b/documentation/output/pdfs/Stratus.pdf index 08487f6a..b68bb199 100644 Binary files a/documentation/output/pdfs/Stratus.pdf and b/documentation/output/pdfs/Stratus.pdf differ diff --git a/documentation/output/pdfs/UsersGuide.pdf b/documentation/output/pdfs/UsersGuide.pdf index fe328d55..0a23e91f 100644 Binary files a/documentation/output/pdfs/UsersGuide.pdf and b/documentation/output/pdfs/UsersGuide.pdf differ diff --git a/documentation/output/theme/css/coriolis.css b/documentation/output/theme/css/coriolis.css index 4f643cd2..85083c94 100644 --- a/documentation/output/theme/css/coriolis.css +++ b/documentation/output/theme/css/coriolis.css @@ -50,6 +50,11 @@ p.credit span.right { font-size: 120%; } +.cb { + font-weight: bold; + font-family: "courrier", "andale mono", monospace; +} + div#contents { background-color: white; border-left: 3px solid rgba(235,35,68,1); @@ -109,7 +114,7 @@ div.note { background: #ffdd66 url('../_static/images/clipboard.png') no-repeat 0% 50%;; font-size: 90% */ - margin: 8px 10% 0px 2%; + margin: 8px 10% 8px 2%; /*padding: 10px 5pt 1px 35px;*/ padding: 1px 10px 5px 35px; border-left: 4px solid #f6b73c; diff --git a/documentation/output/theme/css/nest.css b/documentation/output/theme/css/nest.css index c7c44705..40089223 100644 --- a/documentation/output/theme/css/nest.css +++ b/documentation/output/theme/css/nest.css @@ -106,7 +106,7 @@ code { padding: 3px 6px; } padding-left:20px; padding-right:0px; background:#333; - font-size:14px; + font-size:12px; font-weight:400; font-family:Consolas,monaco,monospace; color:#fff @@ -121,7 +121,7 @@ code { padding: 3px 6px; } padding-left: 5px; padding-right: 5px; background:#fcfce1; - font-size: 14px; + font-size: 12px; font-weight: 400; font-family: Consolas, monaco, monospace; color: #000; diff --git a/documentation/pelicanconf.py b/documentation/pelicanconf.py index 333b6676..e36aad89 100644 --- a/documentation/pelicanconf.py +++ b/documentation/pelicanconf.py @@ -27,6 +27,7 @@ PLUGINS = [ 'bootstrap-rst' ] STATIC_PATHS = [ 'pages/users-guide' , 'pages/python-tutorial' + , 'pages/python-cpp-new' , 'pages/python-cpp' , 'pages/stratus' , 'pages/check-toolkit' @@ -88,8 +89,9 @@ IGNORE_FILES = [ 'UsersGuide.rst' # For User's Guide. , 'ScriptsPlugins.rst' , 'ViewerTools.rst' - , 'PythonTutorial.rst' # For Python Tutorial + , 'PythonTutorial.rst' # For Python Tutorial & New. , 'Introduction.rst' + , 'Implementation.rst' , 'Environment.rst' , 'CellNetComponent.rst' , 'Collections.rst' diff --git a/documentation/themes/nest-coriolis/static/css/coriolis.css b/documentation/themes/nest-coriolis/static/css/coriolis.css index 4f643cd2..c14ef6b6 100644 --- a/documentation/themes/nest-coriolis/static/css/coriolis.css +++ b/documentation/themes/nest-coriolis/static/css/coriolis.css @@ -99,6 +99,10 @@ div#contents ul > li > a { } */ +span.cb { + background: yellow; +} + div.note { /* margin: 8px 2% 0px 2%; diff --git a/equinox/CMakeLists.txt b/equinox/CMakeLists.txt index 7299ec43..44788760 100644 --- a/equinox/CMakeLists.txt +++ b/equinox/CMakeLists.txt @@ -6,16 +6,16 @@ cmake_minimum_required(VERSION 2.8.9) set(ignoreVariables "${BUILD_DOC} ${CMAKE_INSTALL_DIR}") + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) setup_project_paths(CORIOLIS) set_cmake_policies() - setup_boost(program_options filesystem python regex) + setup_boost(program_options) setup_qt() - find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/etesian/CMakeLists.txt b/etesian/CMakeLists.txt index eb832f03..ae9b82b0 100644 --- a/etesian/CMakeLists.txt +++ b/etesian/CMakeLists.txt @@ -3,9 +3,10 @@ set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(ETESIAN) - set(ignoreVariables "${CMAKE_INSTALL_DIR}") + set(ignoreVariables "${CMAKE_INSTALL_DIR}" "${BUILD_DOC}") - option(BUILD_DOC "Build the documentation (doxygen)" OFF) +#option(BUILD_DOC "Build the documentation (doxygen)" OFF) + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) cmake_minimum_required(VERSION 2.8.9) @@ -15,11 +16,10 @@ setup_qt() set_cmake_policies() - setup_boost(program_options python regex) + setup_boost(program_options) - find_package(PythonLibs 2 REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) - find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) #find_package(KATABATIC REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/etesian/src/BloatCells.cpp b/etesian/src/BloatCells.cpp index 2a4bfb94..35a0e122 100644 --- a/etesian/src/BloatCells.cpp +++ b/etesian/src/BloatCells.cpp @@ -83,7 +83,8 @@ namespace Etesian { DbU::Unit vpitch = etesian->getSliceStep();; int xsize = (ab.getWidth() + vpitch - 1) / vpitch; - if (xsize < 6) return vpitch*2; + if (xsize < 6) return vpitch*4; + if (xsize < 8) return vpitch*2; return 0; } diff --git a/etesian/src/CMakeLists.txt b/etesian/src/CMakeLists.txt index f6497523..cde53f53 100644 --- a/etesian/src/CMakeLists.txt +++ b/etesian/src/CMakeLists.txt @@ -8,7 +8,7 @@ ${CONFIGURATION_INCLUDE_DIR} ${QtX_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} - ${PYTHON_INCLUDE_PATH} + ${Python_INCLUDE_DIRS} ) set( includes etesian/Configuration.h etesian/Placement.h @@ -58,7 +58,7 @@ ${QtX_LIBRARIES} ${Boost_LIBRARIES} ${LIBXML2_LIBRARIES} - ${PYTHON_LIBRARIES} -lutil + ${Python_LIBRARIES} -lutil ${LIBEXECINFO_LIBRARIES} ) diff --git a/etesian/src/Configuration.cpp b/etesian/src/Configuration.cpp index 4dfaa973..182c5c73 100644 --- a/etesian/src/Configuration.cpp +++ b/etesian/src/Configuration.cpp @@ -17,7 +17,7 @@ #include #include #include -#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/Error.h" #include "hurricane/Warning.h" #include "hurricane/Technology.h" diff --git a/etesian/src/EtesianEngine.cpp b/etesian/src/EtesianEngine.cpp index bed8891e..a825ed2d 100644 --- a/etesian/src/EtesianEngine.cpp +++ b/etesian/src/EtesianEngine.cpp @@ -21,8 +21,8 @@ #include "coloquinte/circuit.hxx" #include "coloquinte/circuit_helper.hxx" #include "coloquinte/legalizer.hxx" -#include "vlsisapd/configuration/Configuration.h" -#include "vlsisapd/utilities/Dots.h" +#include "hurricane/configuration/Configuration.h" +#include "hurricane/utilities/Dots.h" #include "hurricane/DebugSession.h" #include "hurricane/Bug.h" #include "hurricane/Error.h" @@ -853,8 +853,12 @@ namespace Etesian { instanceName.erase( instanceName.size()-1 ); if (CatalogExtension::isFeed(masterCell)) { - throw Error( "EtesianEngine::toColoquinte(): Feed instance \"%s\" found." - , instanceName.c_str() ); + string feedName = getString( instance->getName() ); + if ( (feedName.substr(0,11) != "spare_feed_") + or (not instance->isFixed())) { + throw Error( "EtesianEngine::toColoquinte(): Feed instance \"%s\" found." + , instanceName.c_str() ); + } } Box instanceAb = _bloatCells.getAb( occurrence ); diff --git a/etesian/src/FeedCells.cpp b/etesian/src/FeedCells.cpp index bcd07d87..30136f8e 100644 --- a/etesian/src/FeedCells.cpp +++ b/etesian/src/FeedCells.cpp @@ -45,7 +45,7 @@ namespace Etesian { , DbU::getValueString(pitch).c_str() ) << endl; - int pitchNb = (int)( cell->getAbutmentBox().getWidth() / pitch ); + //int pitchNb = (int)( cell->getAbutmentBox().getWidth() / pitch ); _tieCell = cell; } diff --git a/etesian/src/FlattenPower.cpp b/etesian/src/FlattenPower.cpp index 34742677..b8483c8d 100644 --- a/etesian/src/FlattenPower.cpp +++ b/etesian/src/FlattenPower.cpp @@ -16,7 +16,7 @@ #include #include -#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/DebugSession.h" #include "hurricane/UpdateSession.h" #include "hurricane/Error.h" diff --git a/etesian/src/Placement.cpp b/etesian/src/Placement.cpp index 8a8ec225..cc138e8f 100644 --- a/etesian/src/Placement.cpp +++ b/etesian/src/Placement.cpp @@ -16,6 +16,7 @@ #include "hurricane/Error.h" #include "hurricane/Warning.h" +#include "hurricane/Breakpoint.h" #include "hurricane/DataBase.h" #include "hurricane/DebugSession.h" #include "hurricane/UpdateSession.h" @@ -35,8 +36,9 @@ namespace Etesian { using namespace std; using Hurricane::tab; - using Hurricane::Warning; using Hurricane::Error; + using Hurricane::Warning; + using Hurricane::Breakpoint; using Hurricane::Path; using Hurricane::Transformation; using Hurricane::DataBase; @@ -738,6 +740,8 @@ namespace Etesian { void EtesianEngine::toHurricane () { + Breakpoint::stop( 101, "EtesianEngine::toHurricane() called." ); + if (not getFeedCells().feedNumbers()) { cerr << Warning( "EtesianEngine::readSlices(): No feed cells available, skipping." ) << endl; return; @@ -813,6 +817,7 @@ namespace Etesian { _area->buildSubSlices(); _area->showSubSlices(); +#if DISABLED_TIE_INSERTION if (getConfiguration()->getLatchUpDistance()) { Cell* feed = getFeedCells().getBiggestFeed(); DbU::Unit tieSpacing = getConfiguration()->getLatchUpDistance()*2 - feed->getAbutmentBox().getWidth(); @@ -820,12 +825,15 @@ namespace Etesian { tieSpacing -= feed->getAbutmentBox().getWidth(); _area->insertTies( tieSpacing ); } +#endif _area->addFeeds(); UpdateSession::close(); //DebugSession::close(); if (_viewer) _viewer->getCellWidget()->refresh(); + + Breakpoint::stop( 101, "EtesianEngine::toHurricane() finished." ); } diff --git a/etesian/src/PyEtesian.cpp b/etesian/src/PyEtesian.cpp index 37a882cd..7edb0c9e 100644 --- a/etesian/src/PyEtesian.cpp +++ b/etesian/src/PyEtesian.cpp @@ -60,13 +60,26 @@ extern "C" { }; + static PyModuleDef PyEtesian_ModuleDef = + { PyModuleDef_HEAD_INIT + , "Etesian" /* m_name */ + , "Standard cell analytical placer (based on SimPL)." + /* m_doc */ + , -1 /* m_size */ + , PyEtesian_Methods /* m_methods */ + , NULL /* m_reload */ + , NULL /* m_traverse */ + , NULL /* m_clear */ + , NULL /* m_free */ + }; // --------------------------------------------------------------- // Module Initialization : "initEtesian ()" - DL_EXPORT(void) initEtesian () { - cdebug_log(34,0) << "initEtesian()" << endl; + PyMODINIT_FUNC PyInit_Etesian ( void ) + { + cdebug_log(34,0) << "PyInit_Etesian()" << endl; PyEtesianEngine_LinkPyType(); PyGraphicEtesianEngine_LinkPyType(); @@ -75,11 +88,11 @@ extern "C" { PYTYPE_READY_SUB( GraphicEtesianEngine, GraphicTool ); - PyObject* module = Py_InitModule( "Etesian", PyEtesian_Methods ); + PyObject* module = PyModule_Create( &PyEtesian_ModuleDef ); if (module == NULL) { cerr << "[ERROR]\n" << " Failed to initialize Etesian module." << endl; - return; + return NULL; } Py_INCREF( &PyTypeEtesianEngine ); @@ -88,6 +101,7 @@ extern "C" { PyModule_AddObject( module, "GraphicEtesianEngine", (PyObject*)&PyTypeGraphicEtesianEngine ); PyEtesianEngine_postModuleInit(); + return module; } diff --git a/flute/CMakeLists.txt b/flute/CMakeLists.txt index 538aa3f0..b7011add 100644 --- a/flute/CMakeLists.txt +++ b/flute/CMakeLists.txt @@ -6,6 +6,7 @@ cmake_minimum_required( VERSION 2.8.9 ) set( ignoreVariables "${BUILD_DOC} ${CMAKE_INSTALL_DIR}" ) + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) list( INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/" ) find_package( Bootstrap REQUIRED ) @@ -16,9 +17,8 @@ check_distribution() setup_sysconfdir( "${CMAKE_INSTALL_PREFIX}" ) - find_package(PythonLibs 2 REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) - find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/flute/src/3.1/CMakeLists.txt b/flute/src/3.1/CMakeLists.txt index 79f0a9c0..da1b484d 100644 --- a/flute/src/3.1/CMakeLists.txt +++ b/flute/src/3.1/CMakeLists.txt @@ -4,7 +4,7 @@ ${CRLCORE_INCLUDE_PATH} ${HURRICANE_INCLUDE_DIR} ${CONFIGURATION_INCLUDE_DIR} - ${PYTHON_INCLUDE_PATH} + ${Python_INCLUDE_DIRS} ) set( includes flute.h @@ -32,7 +32,7 @@ ${CORIOLIS_LIBRARIES} ${HURRICANE_PYTHON_LIBRARIES} ${UTILITIES_LIBRARY} - ${PYTHON_LIBRARIES} + ${Python_LIBRARIES} -lutil ) diff --git a/flute/src/3.1/PyFlute.cpp b/flute/src/3.1/PyFlute.cpp index 7b91a7f2..5b6039a8 100644 --- a/flute/src/3.1/PyFlute.cpp +++ b/flute/src/3.1/PyFlute.cpp @@ -90,7 +90,7 @@ extern "C" { treeTuple = PyTuple_New( 2*tree.deg - 2 ); for ( size_t i=0 ; (int)i < 2*tree.deg - 2 ; ++i ) { PyObject* flutePoint = PyTuple_New( 3 ); - PyTuple_SetItem( flutePoint, 0, PyInt_FromLong( tree.branch[i].n) ); + PyTuple_SetItem( flutePoint, 0, PyLong_FromLong( tree.branch[i].n) ); PyTuple_SetItem( flutePoint, 1, PyDbU_FromLong((DbU::Unit)tree.branch[i].x) ); PyTuple_SetItem( flutePoint, 2, PyDbU_FromLong((DbU::Unit)tree.branch[i].y) ); PyTuple_SetItem( treeTuple, i, flutePoint); @@ -108,21 +108,36 @@ extern "C" { }; + static PyModuleDef PyFlute_ModuleDef = + { PyModuleDef_HEAD_INIT + , "Flute" /* m_name */ + , "FLUTE, Fast Rectilinear Steiner Tree builder." + /* m_doc */ + , -1 /* m_size */ + , PyFlute_Methods /* m_methods */ + , NULL /* m_reload */ + , NULL /* m_traverse */ + , NULL /* m_clear */ + , NULL /* m_free */ + }; + + // --------------------------------------------------------------- // Module Initialization : "initFlute ()" - DL_EXPORT(void) initFlute () + PyMODINIT_FUNC PyInit_Flute ( void ) { - cdebug_log(20,0) << "initFlute()" << endl; + cdebug_log(20,0) << "PyInit_Flute()" << endl; - PyObject* module = Py_InitModule( "Flute", PyFlute_Methods ); + PyObject* module = PyModule_Create( &PyFlute_ModuleDef ); if (not module) { cerr << "[ERROR]\n" << " Failed to initialize Flute module." << endl; - return; + return NULL; } cdebug_log(20,0) << "Flute.so loaded " << (void*)&typeid(string) << endl; + return module; } diff --git a/hurricane/CMakeLists.txt b/hurricane/CMakeLists.txt index a210b386..98296140 100644 --- a/hurricane/CMakeLists.txt +++ b/hurricane/CMakeLists.txt @@ -11,21 +11,22 @@ cmake_minimum_required(VERSION 2.8.9) list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules") + find_package(RapidJSON REQUIRED) find_package(Bootstrap REQUIRED) setup_project_paths(CORIOLIS) list(INSERT CMAKE_MODULE_PATH 0 "${HURRICANE_SOURCE_DIR}/cmake_modules/") set_cmake_policies() - setup_boost(program_options regex) + cmake_policy(SET CMP0054 NEW) + setup_boost(program_options) setup_qt() find_package(LibXml2 REQUIRED) find_package(BZip2 REQUIRED) find_package(BISON REQUIRED) find_package(FLEX REQUIRED) - find_package(PythonLibs 2 REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development ) find_package(PythonSitePackages REQUIRED) - find_package(VLSISAPD REQUIRED) find_package(Libexecinfo REQUIRED) if (USE_LIBBFD) find_package(Libbfd) @@ -39,3 +40,4 @@ #enable_testing() #add_test(HurricaneTest ${PROJECT_BINARY_DIR}/tests/htest) + diff --git a/hurricane/cmake_modules/FindHURRICANE.cmake b/hurricane/cmake_modules/FindHURRICANE.cmake index 6e535452..b61fc4bd 100644 --- a/hurricane/cmake_modules/FindHURRICANE.cmake +++ b/hurricane/cmake_modules/FindHURRICANE.cmake @@ -65,6 +65,54 @@ IF(UNIX) DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}" ) + FIND_PATH(HURRICANE_PYTHON_NEW_INCLUDE_PATH + NAMES hurricane/configuration/PyTypeManager.h + PATHS ${CORIOLIS_DIR_SEARCH} + PATH_SUFFIXES include/coriolis2 include + # Help the user find it if we cannot. + DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}" + ) + + FIND_LIBRARY(HURRICANE_PYTHON_NEW_LIBRARY_PATH + NAMES pytypemanager + PATHS ${CORIOLIS_DIR_SEARCH} + PATH_SUFFIXES lib64 lib + # Help the user find it if we cannot. + DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}" + ) + + FIND_PATH(HURRICANE_UTILITIES_INCLUDE_PATH + NAMES hurricane/utilities/Path.h + PATHS ${CORIOLIS_DIR_SEARCH} + PATH_SUFFIXES include/coriolis2 include + # Help the user find it if we cannot. + DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}" + ) + + FIND_LIBRARY(HURRICANE_UTILITIES_LIBRARY_PATH + NAMES utils + PATHS ${CORIOLIS_DIR_SEARCH} + PATH_SUFFIXES lib64 lib + # Help the user find it if we cannot. + DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}" + ) + + FIND_PATH(HURRICANE_CONFIGURATION_INCLUDE_PATH + NAMES hurricane/configuration/Configuration.h + PATHS ${CORIOLIS_DIR_SEARCH} + PATH_SUFFIXES include/coriolis2 include + # Help the user find it if we cannot. + DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}" + ) + + FIND_LIBRARY(HURRICANE_CONFIGURATION_LIBRARY_PATH + NAMES configuration + PATHS ${CORIOLIS_DIR_SEARCH} + PATH_SUFFIXES lib64 lib + # Help the user find it if we cannot. + DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}" + ) + FIND_PATH(HURRICANE_VIEWER_INCLUDE_PATH NAMES hurricane/viewer/CellWidget.h PATHS ${CORIOLIS_DIR_SEARCH} @@ -81,14 +129,20 @@ IF(UNIX) DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}" ) - SET_LIBRARIES_PATH(HURRICANE HURRICANE) - SET_LIBRARIES_PATH(HURRICANE_ANALOG HURRICANE_ANALOG) - SET_LIBRARIES_PATH(HURRICANE_PYTHON HURRICANE_PYTHON) - SET_LIBRARIES_PATH(HURRICANE_GRAPHICAL HURRICANE_VIEWER) + SET_LIBRARIES_PATH(HURRICANE HURRICANE_CONFIGURATION) + SET_LIBRARIES_PATH(HURRICANE HURRICANE_UTILITIES) + SET_LIBRARIES_PATH(HURRICANE HURRICANE) + SET_LIBRARIES_PATH(HURRICANE_ANALOG HURRICANE_ANALOG) + SET_LIBRARIES_PATH(HURRICANE_PYTHON HURRICANE_PYTHON) + SET_LIBRARIES_PATH(HURRICANE_PYTHON_NEW HURRICANE_PYTHON_NEW) + SET_LIBRARIES_PATH(HURRICANE_GRAPHICAL HURRICANE_VIEWER) HURRICANE_CHECK_LIBRARIES(HURRICANE ) - HURRICANE_CHECK_LIBRARIES(HURRICANE_PYTHON ${HURRICANE_FIND_REQUIRED}) - HURRICANE_CHECK_LIBRARIES(HURRICANE_ANALOG ${HURRICANE_FIND_REQUIRED}) - HURRICANE_CHECK_LIBRARIES(HURRICANE_GRAPHICAL ${HURRICANE_FIND_REQUIRED}) + HURRICANE_CHECK_LIBRARIES(HURRICANE_PYTHON_NEW ${HURRICANE_FIND_REQUIRED}) + HURRICANE_CHECK_LIBRARIES(HURRICANE_PYTHON ${HURRICANE_FIND_REQUIRED}) + HURRICANE_CHECK_LIBRARIES(HURRICANE_ANALOG ${HURRICANE_FIND_REQUIRED}) + HURRICANE_CHECK_LIBRARIES(HURRICANE_GRAPHICAL ${HURRICANE_FIND_REQUIRED}) + + message("HURRICANE_LIBRARIES=${HURRICANE_LIBRARIES}") ENDIF(UNIX) diff --git a/hurricane/doc/analog/html/graph_legend.html b/hurricane/doc/analog/html/graph_legend.html index 3f42a067..114a9e4b 100644 --- a/hurricane/doc/analog/html/graph_legend.html +++ b/hurricane/doc/analog/html/graph_legend.html @@ -74,7 +74,7 @@ A yellow dashed arrow denotes a relation between a template instance and the tem
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/analog/html/index.html b/hurricane/doc/analog/html/index.html index 5b898d58..af3d7e70 100644 --- a/hurricane/doc/analog/html/index.html +++ b/hurricane/doc/analog/html/index.html @@ -92,7 +92,7 @@ Open questions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/analog/latex/refman.tex b/hurricane/doc/analog/latex/refman.tex index 1dcb96bc..37edeb6f 100644 --- a/hurricane/doc/analog/latex/refman.tex +++ b/hurricane/doc/analog/latex/refman.tex @@ -34,7 +34,7 @@ \vspace*{1cm} {\large Generated by Doxygen 1.8.14}\\ \vspace*{0.5cm} - {\small Thu Nov 12 2020 13:58:47}\\ + {\small Fri Oct 1 2021 19:23:10}\\ \end{center} \end{titlepage} diff --git a/hurricane/doc/hurricane/doxygen.warn.log b/hurricane/doc/hurricane/doxygen.warn.log index 7d0d6de8..26e9aa90 100644 --- a/hurricane/doc/hurricane/doxygen.warn.log +++ b/hurricane/doc/hurricane/doxygen.warn.log @@ -128,5 +128,5 @@ Possible candidates: /dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/doc/hurricane/Query.dox:131: warning: Found unknown command `\sreturn' /dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/doc/hurricane/Query.dox:135: warning: Found unknown command `\sreturn' /dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/doc/hurricane/Query.dox:139: warning: Found unknown command `\sreturn' -/dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/src/hurricane/hurricane/Query.h:342: warning: The following parameters of Hurricane::Query::setQuery(Cell *cell, const Box &area, const Transformation &transformation, const BasicLayer *basicLayer, ExtensionSlice::Mask extensionMask, Mask filter, DbU::Unit threshold=0) are not documented: +/dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/src/hurricane/hurricane/Query.h:357: warning: The following parameters of Hurricane::Query::setQuery(Cell *cell, const Box &area, const Transformation &transformation, const BasicLayer *basicLayer, ExtensionSlice::Mask extensionMask, Mask filter, DbU::Unit threshold=0) are not documented: parameter 'threshold' diff --git a/hurricane/doc/hurricane/html/BasicLayer_8h_source.html b/hurricane/doc/hurricane/html/BasicLayer_8h_source.html index e5ad5bc0..7ec32d1f 100644 --- a/hurricane/doc/hurricane/html/BasicLayer_8h_source.html +++ b/hurricane/doc/hurricane/html/BasicLayer_8h_source.html @@ -44,16 +44,16 @@ $(function() {
    BasicLayer.h
  • -
    1 
    2 // -*- C++ -*-
    3 //
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify
    9 // it under the terms of the GNU Lesser General Public License as
    10 // published by the Free Software Foundation, either version 3 of the
    11 // License, or (at your option) any later version.
    12 //
    13 // Hurricane is distributed in the hope that it will be useful, but
    14 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    15 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    16 // General Public License for more details.
    17 //
    18 // You should have received a copy of the Lesser GNU General Public
    19 // License along with Hurricane. If not, see
    20 // <http://www.gnu.org/licenses/>.
    21 //
    22 // +-----------------------------------------------------------------+
    23 // | H U R R I C A N E |
    24 // | V L S I B a c k e n d D a t a - B a s e |
    25 // | |
    26 // | Author : Remy Escassut |
    27 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    28 // | =============================================================== |
    29 // | C++ Header : "./hurricane/BasicLayer.h" |
    30 // +-----------------------------------------------------------------+
    31 
    32 
    33 # ifndef HURRICANE_BASIC_LAYER_H
    34 # define HURRICANE_BASIC_LAYER_H
    35 
    36 # include "hurricane/Layer.h"
    37 # include "hurricane/BasicLayers.h"
    38 # include "hurricane/Box.h"
    39 
    40 
    41 namespace Hurricane {
    42 
    43 
    44  class BasicLayer : public Layer {
    45  public:
    46  typedef Layer Super;
    47 
    48  public:
    49  // Subclass: Material.
    50  class Material {
    51  // Enum: Code.
    52  public:
    53  enum Code { nWell =0
    58  , poly
    59  , cut
    62  , info
    64  };
    65  // Constructors.
    66  Material ( const Code& code = other );
    67  Material ( const Material& material );
    68  // Methods.
    69  Material& operator= ( const Material& material );
    70  inline operator const Code& () const;
    71  inline const Code& getCode () const;
    72  static Material fromString ( const string& );
    73  inline string _getTypeName () const;
    74  string _getString () const;
    75  Record* _getRecord () const;
    76 
    77  // Internal: Attributes.
    78  private:
    79  Code _code;
    80  };
    81 
    82  public:
    83  // Constructor.
    84  static BasicLayer* create ( Technology* technology
    85  , const Name& name
    86  , const Material& material
    87  , unsigned gds2Layer
    88  , unsigned gds2Datatype
    89  , const DbU::Unit& minimalSize = 0
    90  , const DbU::Unit& minimalSpacing = 0
    91  );
    92  // Accessors.
    93  inline const Material& getMaterial () const;
    94  inline unsigned getGds2Layer () const;
    95  inline unsigned getGds2Datatype () const;
    96  virtual BasicLayers getBasicLayers () const;
    97  virtual BasicLayer* getBlockageLayer () const;
    98  virtual const Layer* getTop () const;
    99  virtual const Layer* getBottom () const;
    100  inline const Name& getRealName () const;
    101  // Updators
    102  inline void setBlockageLayer ( BasicLayer* layer);
    103  inline void setGds2Layer ( unsigned int );
    104  inline void setGds2Datatype ( unsigned int );
    105  inline void setRealName ( const char* realName);
    106  // Hurricane Managment.
    107  virtual void _toJson ( JsonWriter* writer ) const;
    108  virtual BasicLayer* _getSymbolicBasicLayer ();
    109  virtual string _getTypeName () const;
    110  virtual string _getString () const;
    111  virtual Record* _getRecord () const;
    112 
    113  private:
    114  // Internal: Attributes
    115  Material _material;
    116  unsigned _gds2Layer;
    117  unsigned _gds2Datatype;
    118  BasicLayer* _blockageLayer;
    119  Name _realName;
    120 
    121  protected:
    122  // Internal: Constructors & Destructors.
    123  BasicLayer ( Technology* technology
    124  , const Name& name
    125  , const Material& material
    126  , unsigned gds2Layer
    127  , unsigned gds2Datatype
    128  , const DbU::Unit& minimalSize = 0
    129  , const DbU::Unit& minimalSpacing = 0
    130  );
    131  virtual void _postCreate ();
    132  virtual void _preDestroy ();
    133  };
    134 
    135 
    136 // Inline Functions.
    137  inline BasicLayer::Material::operator const Code& () const { return _code; }
    138  inline const BasicLayer::Material::Code&
    139  BasicLayer::Material::getCode () const { return _code; }
    140  inline string BasicLayer::Material::_getTypeName () const { return _TName("BasicLayer::Material"); }
    141  inline const BasicLayer::Material&
    142  BasicLayer::getMaterial () const { return _material; }
    143  inline unsigned BasicLayer::getGds2Layer () const { return _gds2Layer; }
    144  inline unsigned BasicLayer::getGds2Datatype () const { return _gds2Datatype; }
    145  inline const Name& BasicLayer::getRealName () const { return _realName; }
    146  inline void BasicLayer::setBlockageLayer ( BasicLayer* layer) { _blockageLayer = layer; layer->setBlockage(true); }
    147  inline void BasicLayer::setGds2Layer ( unsigned int number ) { _gds2Layer=number; }
    148  inline void BasicLayer::setGds2Datatype ( unsigned int number ) { _gds2Datatype=number; }
    149  inline void BasicLayer::setRealName ( const char* realName) { _realName = realName; }
    150 
    151 
    152 // -------------------------------------------------------------------
    153 // Class : "Hurricane::JsonBasicLayer".
    154 
    155  class JsonBasicLayer : public JsonLayer {
    156  public:
    157  static void initialize ();
    158  JsonBasicLayer ( unsigned long flags );
    159  ~JsonBasicLayer ();
    160  virtual string getTypeName () const;
    161  virtual JsonBasicLayer* clone ( unsigned long ) const;
    162  virtual void toData ( JsonStack& );
    163  };
    164 
    165 
    166 } // End of Hurricane namespace.
    167 
    168 
    169 // -------------------------------------------------------------------
    170 // Inspector Support for : BasicLayer::Material::Code.
    171 
    172 
    173 template<>
    174 inline std::string getString<const Hurricane::BasicLayer::Material::Code*>
    175  ( const Hurricane::BasicLayer::Material::Code* object )
    176 {
    177  switch ( *object ) {
    178  case Hurricane::BasicLayer::Material::nWell: return "nWell";
    179  case Hurricane::BasicLayer::Material::pWell: return "pWell";
    180  case Hurricane::BasicLayer::Material::nImplant: return "nImplant";
    181  case Hurricane::BasicLayer::Material::pImplant: return "pImplant";
    182  case Hurricane::BasicLayer::Material::active: return "active";
    183  case Hurricane::BasicLayer::Material::poly: return "poly";
    184  case Hurricane::BasicLayer::Material::cut: return "cut";
    185  case Hurricane::BasicLayer::Material::metal: return "metal";
    186  case Hurricane::BasicLayer::Material::blockage: return "blockage";
    187  case Hurricane::BasicLayer::Material::info: return "info";
    188  case Hurricane::BasicLayer::Material::other: return "other";
    189  }
    190  return "undefined";
    191 }
    192 
    193 
    194 template<>
    195 inline Hurricane::Record* getRecord<const Hurricane::BasicLayer::Material::Code*>
    196  ( const Hurricane::BasicLayer::Material::Code* object )
    197 {
    198  Hurricane::Record* record = new Hurricane::Record(getString(object));
    199  record->add(getSlot("Code", (unsigned int*)object));
    200  return record;
    201 }
    202 
    203 
    204 INSPECTOR_P_SUPPORT(Hurricane::BasicLayer);
    205 INSPECTOR_P_SUPPORT(Hurricane::BasicLayer::Material);
    206 IOSTREAM_POINTER_SUPPORT(Hurricane::BasicLayer::Material::Code);
    207 
    208 
    209 # endif
    +
    1 
    2 // -*- C++ -*-
    3 //
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify
    9 // it under the terms of the GNU Lesser General Public License as
    10 // published by the Free Software Foundation, either version 3 of the
    11 // License, or (at your option) any later version.
    12 //
    13 // Hurricane is distributed in the hope that it will be useful, but
    14 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    15 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    16 // General Public License for more details.
    17 //
    18 // You should have received a copy of the Lesser GNU General Public
    19 // License along with Hurricane. If not, see
    20 // <http://www.gnu.org/licenses/>.
    21 //
    22 // +-----------------------------------------------------------------+
    23 // | H U R R I C A N E |
    24 // | V L S I B a c k e n d D a t a - B a s e |
    25 // | |
    26 // | Author : Remy Escassut |
    27 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    28 // | =============================================================== |
    29 // | C++ Header : "./hurricane/BasicLayer.h" |
    30 // +-----------------------------------------------------------------+
    31 
    32 
    33 # ifndef HURRICANE_BASIC_LAYER_H
    34 # define HURRICANE_BASIC_LAYER_H
    35 
    36 # include "hurricane/Layer.h"
    37 # include "hurricane/BasicLayers.h"
    38 # include "hurricane/Box.h"
    39 
    40 
    41 namespace Hurricane {
    42 
    43 
    44  class BasicLayer : public Layer {
    45  public:
    46  typedef Layer Super;
    47 
    48  public:
    49  // Subclass: Material.
    50  class Material {
    51  // Enum: Code.
    52  public:
    53  enum Code { nWell =0
    58  , poly
    59  , cut
    62  , info
    64  };
    65  // Constructors.
    66  Material ( const Code& code = other );
    67  Material ( const Material& material );
    68  // Methods.
    69  Material& operator= ( const Material& material );
    70  inline operator const Code& () const;
    71  inline const Code& getCode () const;
    72  static Material fromString ( const string& );
    73  inline string _getTypeName () const;
    74  string _getString () const;
    75  Record* _getRecord () const;
    76 
    77  // Internal: Attributes.
    78  private:
    79  Code _code;
    80  };
    81 
    82  public:
    83  // Constructor.
    84  static BasicLayer* create ( Technology* technology
    85  , const Name& name
    86  , const Material& material
    87  , unsigned gds2Layer = 0
    88  , unsigned gds2Datatype = 0
    89  , const DbU::Unit& minimalSize = 0
    90  , const DbU::Unit& minimalSpacing = 0
    91  );
    92  // Accessors.
    93  inline const Material& getMaterial () const;
    94  inline unsigned getGds2Layer () const;
    95  inline unsigned getGds2Datatype () const;
    96  virtual BasicLayers getBasicLayers () const;
    97  virtual BasicLayer* getBlockageLayer () const;
    98  virtual const Layer* getTop () const;
    99  virtual const Layer* getBottom () const;
    100  inline const Name& getRealName () const;
    101  // Updators
    102  inline void setBlockageLayer ( BasicLayer* layer);
    103  inline void setGds2Layer ( unsigned int );
    104  inline void setGds2Datatype ( unsigned int );
    105  inline void setRealName ( const char* realName);
    106  // Hurricane Managment.
    107  virtual void _toJson ( JsonWriter* writer ) const;
    108  virtual BasicLayer* _getSymbolicBasicLayer ();
    109  virtual string _getTypeName () const;
    110  virtual string _getString () const;
    111  virtual Record* _getRecord () const;
    112 
    113  private:
    114  // Internal: Attributes
    115  Material _material;
    116  unsigned _gds2Layer;
    117  unsigned _gds2Datatype;
    118  BasicLayer* _blockageLayer;
    119  Name _realName;
    120 
    121  protected:
    122  // Internal: Constructors & Destructors.
    123  BasicLayer ( Technology* technology
    124  , const Name& name
    125  , const Material& material
    126  , unsigned gds2Layer
    127  , unsigned gds2Datatype
    128  , const DbU::Unit& minimalSize = 0
    129  , const DbU::Unit& minimalSpacing = 0
    130  );
    131  virtual void _postCreate ();
    132  virtual void _preDestroy ();
    133  };
    134 
    135 
    136 // Inline Functions.
    137  inline BasicLayer::Material::operator const Code& () const { return _code; }
    138  inline const BasicLayer::Material::Code&
    139  BasicLayer::Material::getCode () const { return _code; }
    140  inline string BasicLayer::Material::_getTypeName () const { return _TName("BasicLayer::Material"); }
    141  inline const BasicLayer::Material&
    142  BasicLayer::getMaterial () const { return _material; }
    143  inline unsigned BasicLayer::getGds2Layer () const { return _gds2Layer; }
    144  inline unsigned BasicLayer::getGds2Datatype () const { return _gds2Datatype; }
    145  inline const Name& BasicLayer::getRealName () const { return _realName; }
    146  inline void BasicLayer::setBlockageLayer ( BasicLayer* layer) { _blockageLayer = layer; layer->setBlockage(true); }
    147  inline void BasicLayer::setGds2Layer ( unsigned int number ) { _gds2Layer=number; }
    148  inline void BasicLayer::setGds2Datatype ( unsigned int number ) { _gds2Datatype=number; }
    149  inline void BasicLayer::setRealName ( const char* realName) { _realName = realName; }
    150 
    151 
    152 // -------------------------------------------------------------------
    153 // Class : "Hurricane::JsonBasicLayer".
    154 
    155  class JsonBasicLayer : public JsonLayer {
    156  public:
    157  static void initialize ();
    158  JsonBasicLayer ( unsigned long flags );
    159  ~JsonBasicLayer ();
    160  virtual string getTypeName () const;
    161  virtual JsonBasicLayer* clone ( unsigned long ) const;
    162  virtual void toData ( JsonStack& );
    163  };
    164 
    165 
    166 } // End of Hurricane namespace.
    167 
    168 
    169 // -------------------------------------------------------------------
    170 // Inspector Support for : BasicLayer::Material::Code.
    171 
    172 
    173 template<>
    174 inline std::string getString<const Hurricane::BasicLayer::Material::Code*>
    175  ( const Hurricane::BasicLayer::Material::Code* object )
    176 {
    177  switch ( *object ) {
    178  case Hurricane::BasicLayer::Material::nWell: return "nWell";
    179  case Hurricane::BasicLayer::Material::pWell: return "pWell";
    180  case Hurricane::BasicLayer::Material::nImplant: return "nImplant";
    181  case Hurricane::BasicLayer::Material::pImplant: return "pImplant";
    182  case Hurricane::BasicLayer::Material::active: return "active";
    183  case Hurricane::BasicLayer::Material::poly: return "poly";
    184  case Hurricane::BasicLayer::Material::cut: return "cut";
    185  case Hurricane::BasicLayer::Material::metal: return "metal";
    186  case Hurricane::BasicLayer::Material::blockage: return "blockage";
    187  case Hurricane::BasicLayer::Material::info: return "info";
    188  case Hurricane::BasicLayer::Material::other: return "other";
    189  }
    190  return "undefined";
    191 }
    192 
    193 
    194 template<>
    195 inline Hurricane::Record* getRecord<const Hurricane::BasicLayer::Material::Code*>
    196  ( const Hurricane::BasicLayer::Material::Code* object )
    197 {
    198  Hurricane::Record* record = new Hurricane::Record(getString(object));
    199  record->add(getSlot("Code", (unsigned int*)object));
    200  return record;
    201 }
    202 
    203 
    204 INSPECTOR_P_SUPPORT(Hurricane::BasicLayer);
    205 INSPECTOR_P_SUPPORT(Hurricane::BasicLayer::Material);
    206 IOSTREAM_POINTER_SUPPORT(Hurricane::BasicLayer::Material::Code);
    207 
    208 
    209 # endif
    +
    static BasicLayer * create(Technology *technology, const Name &name, const Material &material, unsigned gds2Layer=0, unsigned gds2Datatype=0, const DbU::Unit &minimalSize=0, const DbU::Unit &minimalSpacing=0)
    Definition: BasicLayer.h:59
    -
    static BasicLayer * create(Technology *technology, const Name &name, const Material &material, unsigned gds2Layer, unsigned gds2Datatype, const DbU::Unit &minimalSize=0, const DbU::Unit &minimalSpacing=0)
    BasicLayer description (API)
    Definition: BasicLayer.h:44
    Definition: BasicLayer.h:58
    Code
    Definition: BasicLayer.h:53
    Name description (API)
    Definition: Name.h:35
    -
    std::int64_t Unit
    Definition: DbU.h:70
    -
    DataBase object root class (API).
    Definition: DBo.h:47
    +
    std::int64_t Unit
    Definition: DbU.h:67
    +
    DataBase object root class (API).
    Definition: DBo.h:45
    const Material & getMaterial() const
    Definition: BasicLayer.h:142
    JSON Parser Stack.
    Definition: JsonObject.h:249
    Definition: BasicLayer.h:54
    @@ -74,7 +74,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Box_8h_source.html b/hurricane/doc/hurricane/html/Box_8h_source.html index 89224cbd..570154cf 100644 --- a/hurricane/doc/hurricane/html/Box_8h_source.html +++ b/hurricane/doc/hurricane/html/Box_8h_source.html @@ -49,7 +49,7 @@ $(function() {
    bool contains(const DbU::Unit &x, const DbU::Unit &y) const
    DbU::Unit getXCenter() const
    Definition: Box.h:70
    -
    std::int64_t Unit
    Definition: DbU.h:70
    +
    std::int64_t Unit
    Definition: DbU.h:67
    DbU::Unit getYCenter() const
    Definition: Box.h:71
    Point description (API)
    Definition: Point.h:32
    bool isPonctual() const
    @@ -80,7 +80,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Boxes_8h_source.html b/hurricane/doc/hurricane/html/Boxes_8h_source.html index 294d91d4..7a0b181f 100644 --- a/hurricane/doc/hurricane/html/Boxes_8h_source.html +++ b/hurricane/doc/hurricane/html/Boxes_8h_source.html @@ -50,7 +50,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Cell_8h_source.html b/hurricane/doc/hurricane/html/Cell_8h_source.html index 04b55d12..324e6a89 100644 --- a/hurricane/doc/hurricane/html/Cell_8h_source.html +++ b/hurricane/doc/hurricane/html/Cell_8h_source.html @@ -44,41 +44,39 @@ $(function() {
    Cell.h
    -
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Cell.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_CELL_H
    21 #define HURRICANE_CELL_H
    22 
    23 #include <limits>
    24 #include "hurricane/Flags.h"
    25 #include "hurricane/Observer.h"
    26 #include "hurricane/Signature.h"
    27 #include "hurricane/Relation.h"
    28 #include "hurricane/Pathes.h"
    29 #include "hurricane/Entity.h"
    30 #include "hurricane/Cells.h"
    31 #include "hurricane/DeepNet.h"
    32 #include "hurricane/Instance.h"
    33 #include "hurricane/Pin.h"
    34 #include "hurricane/Pins.h"
    35 #include "hurricane/Slices.h"
    36 #include "hurricane/ExtensionSlice.h"
    37 #include "hurricane/Rubbers.h"
    38 #include "hurricane/Markers.h"
    39 #include "hurricane/Marker.h"
    40 #include "hurricane/Reference.h"
    41 #include "hurricane/Components.h"
    42 #include "hurricane/Occurrences.h"
    43 #include "hurricane/Transformation.h"
    44 #include "hurricane/Layer.h"
    45 #include "hurricane/QuadTree.h"
    46 //#include "hurricane/IntrusiveMap.h"
    47 #include "hurricane/IntrusiveSet.h"
    48 #include "hurricane/MapCollection.h"
    49 #include "hurricane/NetAlias.h"
    50 
    51 
    52 
    53 namespace Hurricane {
    54 
    55 class Library;
    56 class BasicLayer;
    57 
    58 typedef multimap<Entity*,Entity*> SlaveEntityMap;
    59 
    60 
    61 
    62 // ****************************************************************************************************
    63 // Cell declaration
    64 // ****************************************************************************************************
    65 
    66 class Cell : public Entity {
    67 // *************************
    68 
    69 // Types
    70 // *****
    71 
    72  public: typedef Entity Inherit;
    73  public: typedef map<Name,ExtensionSlice*> ExtensionSliceMap;
    74 
    75  public: class Flags : public BaseFlags {
    76  public:
    77  enum Flag { NoFlags = (1 << 0)
    78  , BuildRings = (1 << 1)
    79  , BuildClockRings = (1 << 2)
    80  , BuildSupplyRings = (1 << 3)
    81  , NoClockFlatten = (1 << 4)
    82  , WarnOnUnplacedInstances = (1 << 5)
    83  , StayOnPlugs = (1 << 6)
    84  , MaskRings = BuildRings|BuildClockRings|BuildSupplyRings
    85  // Flags set for Observers.
    86  , CellAboutToChange = (1 << 10)
    87  , CellChanged = (1 << 11)
    88  , CellDestroyed = (1 << 12)
    89  // Cell states
    90  , TerminalNetlist = (1 << 20)
    91  , Pad = (1 << 21)
    92  , Feed = (1 << 22)
    93  , FlattenedNets = (1 << 23)
    94  , Placed = (1 << 24)
    95  , Routed = (1 << 25)
    96  , MergedQuadTree = (1 << 26)
    97  , SlavedAb = (1 << 27)
    98  , Materialized = (1 << 28)
    99  };
    100 
    101  public:
    102  Flags ( uint64_t flags = NoFlags );
    103  virtual ~Flags ();
    104  virtual std::string _getTypeName () const;
    105  virtual std::string _getString () const;
    106  };
    107 
    108  class UniquifyRelation : public Relation {
    109  public:
    110  static UniquifyRelation* create ( Cell* );
    111  static UniquifyRelation* get ( const Cell* );
    112  virtual Name getName () const;
    113  static Name staticGetName ();
    114  Name getUniqueName ();
    115  static std::string getTrunkName ( Name name );
    116  virtual bool hasJson () const;
    117  virtual void toJson ( JsonWriter*, const DBo* ) const;
    118  inline void _setOwner ( Cell* );
    119  inline void _setDuplicates ( unsigned int );
    120  virtual string _getTypeName () const;
    121  virtual Record* _getRecord () const;
    122  private:
    123  static const Name _name;
    124  unsigned int _duplicates;
    125  private:
    126  UniquifyRelation ( Cell* );
    127  protected:
    128  virtual void _preDestroy ();
    129 
    130  public:
    131  class JsonProperty : public JsonObject {
    132  public:
    133  static void initialize ();
    134  JsonProperty ( unsigned long flags );
    135  virtual string getTypeName () const;
    136  virtual JsonProperty* clone ( unsigned long ) const;
    137  virtual void toData ( JsonStack& );
    138  };
    139  public:
    140  class JsonPropertyRef : public JsonObject {
    141  public:
    142  static void initialize ();
    143  JsonPropertyRef ( unsigned long flags );
    144  virtual string getTypeName () const;
    145  virtual JsonPropertyRef* clone ( unsigned long ) const;
    146  virtual void toData ( JsonStack& );
    147  };
    148  };
    149 
    150  class ClonedSet : public Collection<Cell*> {
    151  public:
    152  // Sub-Class: Locator.
    153  class Locator : public Hurricane::Locator<Cell*> {
    154  public:
    155  Locator ( const Cell* );
    156  inline Locator ( const Locator& );
    157  virtual Cell* getElement () const;
    158  virtual Hurricane::Locator<Cell*>* getClone () const;
    159  virtual bool isValid () const;
    160  virtual void progress ();
    161  virtual string _getString () const;
    162  protected:
    163  Hurricane::Locator<DBo*>* _dboLocator;
    164  };
    165 
    166  public:
    167  inline ClonedSet ( const Cell* cell );
    168  inline ClonedSet ( const ClonedSet& );
    169  virtual Hurricane::Collection<Cell*>* getClone () const;
    170  virtual Hurricane::Locator<Cell*>* getLocator () const;
    171  virtual string _getString () const;
    172  protected:
    173  const Cell* _cell;
    174  };
    175 
    176  class SlavedsRelation : public Relation {
    177  public:
    178  static SlavedsRelation* create ( Cell* );
    179  static SlavedsRelation* get ( const Cell* );
    180  virtual Name getName () const;
    181  static Name staticGetName ();
    182  virtual bool hasJson () const;
    183  virtual void toJson ( JsonWriter*, const DBo* ) const;
    184  inline void _setOwner ( Cell* );
    185  virtual string _getTypeName () const;
    186  virtual Record* _getRecord () const;
    187  private:
    188  static const Name _name;
    189  private:
    190  SlavedsRelation ( Cell* );
    191  protected:
    192  virtual void _preDestroy ();
    193 
    194  public:
    195  class JsonProperty : public JsonObject {
    196  public:
    197  static void initialize ();
    198  JsonProperty ( unsigned long flags );
    199  virtual string getTypeName () const;
    200  virtual JsonProperty* clone ( unsigned long ) const;
    201  virtual void toData ( JsonStack& );
    202  };
    203  public:
    204  class JsonPropertyRef : public JsonObject {
    205  public:
    206  static void initialize ();
    207  JsonPropertyRef ( unsigned long flags );
    208  virtual string getTypeName () const;
    209  virtual JsonPropertyRef* clone ( unsigned long ) const;
    210  virtual void toData ( JsonStack& );
    211  };
    212  };
    213 
    214  class SlavedsSet : public Collection<Cell*> {
    215  public:
    216  // Sub-Class: Locator.
    217  class Locator : public Hurricane::Locator<Cell*> {
    218  public:
    219  Locator ( const Cell* );
    220  inline Locator ( const Locator& );
    221  virtual Cell* getElement () const;
    222  virtual Hurricane::Locator<Cell*>* getClone () const;
    223  virtual bool isValid () const;
    224  virtual void progress ();
    225  virtual string _getString () const;
    226  protected:
    227  Hurricane::Locator<DBo*>* _dboLocator;
    228  };
    229 
    230  public:
    231  inline SlavedsSet ( const Cell* cell );
    232  inline SlavedsSet ( const SlavedsSet& );
    233  virtual Hurricane::Collection<Cell*>* getClone () const;
    234  virtual Hurricane::Locator<Cell*>* getLocator () const;
    235  virtual string _getString () const;
    236  protected:
    237  const Cell* _cell;
    238  };
    239 
    240  class InstanceMap : public IntrusiveMap<Name, Instance> {
    241  // ****************************************************
    242 
    243  public: typedef IntrusiveMap<Name, Instance> Inherit;
    244 
    245  public: InstanceMap();
    246 
    247  public: virtual Name _getKey(Instance* instance) const;
    248  public: virtual unsigned _getHashValue(Name name) const;
    249  public: virtual Instance* _getNextElement(Instance* instance) const;
    250  public: virtual void _setNextElement(Instance* instance, Instance* nextInstance) const;
    251 
    252  };
    253 
    254  public: class SlaveInstanceSet : public IntrusiveSet<Instance> {
    255  // ***********************************************************
    256 
    257  public: typedef IntrusiveSet<Instance> Inherit;
    258 
    259  public: SlaveInstanceSet();
    260 
    261  public: virtual unsigned _getHashValue(Instance* slaveInstance) const;
    262  public: virtual Instance* _getNextElement(Instance* slaveInstance) const;
    263  public: virtual void _setNextElement(Instance* slaveInstance, Instance* nextSlaveInstance) const;
    264 
    265  };
    266 
    267  public: class NetMap : public IntrusiveMapConst<Name, Net> {
    268  // *********************************************************
    269 
    270  public: typedef IntrusiveMapConst<Name, Net> Inherit;
    271 
    272  public: NetMap();
    273 
    274  public: virtual const Name& _getKey(Net* net) const;
    275  public: virtual unsigned _getHashValue(const Name& name) const;
    276  public: virtual Net* _getNextElement(Net* net) const;
    277  public: virtual void _setNextElement(Net* net, Net* nextNet) const;
    278 
    279  };
    280 
    281  class PinMap : public IntrusiveMap<Name, Pin> {
    282  // *******************************************
    283 
    284  public: typedef IntrusiveMap<Name, Pin> Inherit;
    285 
    286  public: PinMap();
    287 
    288  public: virtual Name _getKey(Pin* pin) const;
    289  public: virtual unsigned _getHashValue(Name name) const;
    290  public: virtual Pin* _getNextElement(Pin* pin) const;
    291  public: virtual void _setNextElement(Pin* pin, Pin* nextPin) const;
    292 
    293  };
    294 
    295  public: class SliceMap : public IntrusiveMap<const Layer*, Slice> {
    296  // **************************************************************
    297 
    298  public: typedef IntrusiveMap<const Layer*, Slice> Inherit;
    299 
    300  public: SliceMap();
    301 
    302  public: virtual const Layer* _getKey(Slice* slice) const;
    303  public: virtual unsigned _getHashValue(const Layer* layer) const;
    304  public: virtual Slice* _getNextElement(Slice* slice) const;
    305  public: virtual void _setNextElement(Slice* slice, Slice* nextSlice) const;
    306 
    307  };
    308 
    309  public: class MarkerSet : public IntrusiveSet<Marker> {
    310  // **************************************************
    311 
    312  public: typedef IntrusiveSet<Marker> Inherit;
    313 
    314  public: MarkerSet();
    315 
    316  public: virtual unsigned _getHashValue(Marker* marker) const;
    317  public: virtual Marker* _getNextElement(Marker* marker) const;
    318  public: virtual void _setNextElement(Marker* marker, Marker* nextMarker) const;
    319 
    320  };
    321 
    322 // Attributes
    323 // **********
    324 
    325  private: Library* _library;
    326  private: Name _name;
    327  private: Path _shuntedPath;
    328  private: InstanceMap _instanceMap;
    329  private: QuadTree* _quadTree;
    330  private: SlaveInstanceSet _slaveInstanceSet;
    331  private: NetMap _netMap;
    332  private: PinMap _pinMap;
    333  private: SliceMap* _sliceMap;
    334  private: ExtensionSliceMap _extensionSlices;
    335  private: MarkerSet _markerSet;
    336  private: Box _abutmentBox;
    337  private: Box _boundingBox;
    338  private: Cell* _nextOfLibraryCellMap;
    339  private: Cell* _nextOfSymbolCellSet;
    340  private: SlaveEntityMap _slaveEntityMap;
    341  private: AliasNameSet _netAliasSet;
    342  private: Observable _observers;
    343  private: Flags _flags;
    344 
    345 // Constructors
    346 // ************
    347 
    348  protected: Cell(Library* library, const Name& name);
    349 
    350 // Others
    351 // ******
    352 
    353  protected: virtual void _postCreate();
    354 
    355  protected: virtual void _preDestroy();
    356 
    357  public: virtual string _getTypeName() const {return _TName("Cell");};
    358  public: virtual string _getString() const;
    359  public: virtual Record* _getRecord() const;
    360  public: static string getFlagString( uint64_t );
    361  public: static Record* getFlagRecord( uint64_t );
    362  public: static Slot* getFlagSlot( uint64_t );
    363 
    364  public: InstanceMap& _getInstanceMap() {return _instanceMap;};
    365  public: QuadTree* _getQuadTree() {return _quadTree;};
    366  public: SlaveInstanceSet& _getSlaveInstanceSet() {return _slaveInstanceSet;};
    367  public: NetMap& _getNetMap() {return _netMap;};
    368  public: PinMap& _getPinMap() {return _pinMap;};
    369  public: SliceMap* _getSliceMap() {return _sliceMap;};
    370  public: ExtensionSliceMap& _getExtensionSliceMap() {return _extensionSlices;};
    371  public: MarkerSet& _getMarkerSet() {return _markerSet;};
    372  public: Cell* _getNextOfLibraryCellMap() const {return _nextOfLibraryCellMap;};
    373  public: Cell* _getNextOfSymbolCellSet() const {return _nextOfSymbolCellSet;};
    374  public: AliasNameSet& _getNetAliasSet() { return _netAliasSet; }
    375 
    376  public: void _setNextOfLibraryCellMap(Cell* cell) {_nextOfLibraryCellMap = cell;};
    377  public: void _setNextOfSymbolCellSet(Cell* cell) {_nextOfSymbolCellSet = cell;};
    378 
    379  public: void _addNetAlias(NetAliasName* alias) { _netAliasSet.insert(alias); }
    380  public: void _removeNetAlias(NetAliasName* alias) { _netAliasSet.erase(alias); }
    381 
    382  public: void _fit(const Box& box);
    383  public: void _unfit(const Box& box);
    384 
    385  public: void _addSlaveEntity(Entity* entity, Entity* slaveEntity);
    386  public: void _removeSlaveEntity(Entity* entity, Entity* slaveEntity);
    387  public: void _getSlaveEntities(SlaveEntityMap::iterator& begin, SlaveEntityMap::iterator& end);
    388  public: void _getSlaveEntities(Entity* entity, SlaveEntityMap::iterator& begin, SlaveEntityMap::iterator& end);
    389  public: void _insertSlice(ExtensionSlice*);
    390  public: void _removeSlice(ExtensionSlice*);
    391  public: void _slaveAbutmentBox(Cell*);
    392  public: void _changeQuadTree(Cell*);
    393  public: void _setShuntedPath(Path path) { _shuntedPath=path; }
    394  protected: void _setAbutmentBox(const Box& abutmentBox);
    395 
    396  public: virtual void _toJson(JsonWriter*) const;
    397  public: virtual void _toJsonCollections(JsonWriter*) const;
    398 
    399 // Constructors
    400 // ************
    401 
    402  public: static Cell* create(Library* library, const Name& name);
    403  public: static Cell* fromJson(const string& filename);
    404 
    405 // Accessors
    406 // *********
    407 
    408  public: virtual Cell* getCell() const {return (Cell*)this;};
    409  public: virtual Box getBoundingBox() const;
    410  public: Library* getLibrary() const {return _library;};
    411  public: string getHierarchicalName() const;
    412  public: const Name& getName() const {return _name;};
    413  public: const Flags& getFlags() const { return _flags; }
    414  public: Flags& getFlags() { return _flags; }
    415  public: Path getShuntedPath() const { return _shuntedPath; }
    416  public: Entity* getEntity(const Signature&) const;
    417  public: Instance* getInstance(const Name& name) const {return _instanceMap.getElement(name);};
    418  public: Instances getInstances() const {return _instanceMap.getElements();};
    419  public: Instances getPlacedInstances() const;
    420  public: Instances getFixedInstances() const;
    421  public: Instances getUnplacedInstances() const;
    422  public: Instances getNotUnplacedInstances() const;
    423  public: Instances getInstancesUnder(const Box& area, DbU::Unit threshold=0) const;
    424  public: Instances getPlacedInstancesUnder(const Box& area) const;
    425  public: Instances getFixedInstancesUnder(const Box& area) const;
    426  public: Instances getUnplacedInstancesUnder(const Box& area) const;
    427  public: Instances getNotUnplacedInstancesUnder(const Box& area) const;
    428  public: Instances getSlaveInstances() const; // {return _slaveInstanceSet.getElements();}; NOON!!
    429  public: Instances getTerminalInstances() const;
    430  public: Instances getTerminalInstancesUnder(const Box& area) const;
    431  public: Instances getNonTerminalInstances() const;
    432  public: Instances getNonTerminalInstancesUnder(const Box& area) const;
    433  public: Instances getTerminalNetlistInstances() const;
    434  public: Instances getTerminalNetlistInstancesUnder(const Box& area) const;
    435  public: Instances getNonTerminalNetlistInstances() const;
    436  public: Instances getNonTerminalNetlistInstancesUnder(const Box& area) const;
    437  public: Net* getNet(const Name& name) const;
    438  public: DeepNet* getDeepNet( Path, const Net* ) const;
    439  public: Nets getNets() const {return _netMap.getElements();};
    440  public: Nets getGlobalNets() const;
    441  public: Nets getExternalNets() const;
    442  public: Nets getInternalNets() const;
    443  public: Nets getClockNets() const;
    444  public: Nets getSupplyNets() const;
    445  public: Nets getPowerNets() const;
    446  public: Nets getGroundNets() const;
    447  public: Pin* getPin(const Name& name) const {return _pinMap.getElement(name);};
    448  public: Pins getPins() const {return _pinMap.getElements();};
    449  public: Slice* getSlice(const Layer* layer) const {return _sliceMap->getElement(layer);};
    450  public: Slices getSlices(const Layer::Mask& mask = ~0) const;
    451  public: const ExtensionSliceMap& getExtensionSliceMap() const { return _extensionSlices; };
    452  public: ExtensionSlice* getExtensionSlice(const Name& name) const;
    453  public: ExtensionSlices getExtensionSlices(ExtensionSlice::Mask mask=~0) const;
    454  public: Rubbers getRubbers() const;
    455  public: Rubbers getRubbersUnder(const Box& area) const;
    456  public: Markers getMarkers() const {return _markerSet.getElements();};
    457  public: Markers getMarkersUnder(const Box& area) const;
    458  public: References getReferences() const;
    459  public: Components getComponents(const Layer::Mask& mask = ~0) const;
    460  public: Components getComponentsUnder(const Box& area, const Layer::Mask& mask = ~0) const;
    461  public: Occurrences getOccurrences(unsigned searchDepth = std::numeric_limits<unsigned int>::max()) const;
    462  public: Occurrences getOccurrencesUnder(const Box& area, unsigned searchDepth = std::numeric_limits<unsigned int>::max()) const;
    464  public: Occurrences getTerminalInstanceOccurrencesUnder(const Box& area) const;
    465  public: Occurrences getTerminalNetlistInstanceOccurrences( const Instance* topInstance=NULL ) const;
    466  public: Occurrences getTerminalNetlistInstanceOccurrencesUnder(const Box& area) const;
    467  public: Occurrences getNonTerminalNetlistInstanceOccurrences( const Instance* topInstance=NULL ) const;
    468  public: Occurrences getComponentOccurrences(const Layer::Mask& mask = ~0) const;
    469  public: Occurrences getComponentOccurrencesUnder(const Box& area, const Layer::Mask& mask = ~0) const;
    470  public: Occurrences getHyperNetRootNetOccurrences() const;
    471  public: ExtensionSlice::Mask getExtensionSliceMask ( const Name& name ) const;
    472  public: Gos getExtensionGos ( const Name& name ) const;
    473  public: Gos getExtensionGos ( ExtensionSlice::Mask mask = ~0 ) const;
    474  public: Gos getExtensionGosUnder ( const Box& area, const Name& name ) const;
    475  public: Gos getExtensionGosUnder ( const Box& area, ExtensionSlice::Mask mask = ~0 ) const;
    476  public: Cells getSubCells() const;
    477  public: Cells getClonedCells() const;
    478  public: Cell* getCloneMaster() const;
    479  public: Pathes getRecursiveSlavePathes() const;
    480  public: const Box& getAbutmentBox() const {return _abutmentBox;};
    481 
    482 // Predicates
    483 // **********
    484 
    485  public: bool isCalledBy(Cell* cell) const;
    486  public: bool isTerminal() const {return _instanceMap.isEmpty();};
    487  public: bool isTerminalNetlist() const {return _flags.isset(Flags::TerminalNetlist);};
    488  public: bool isUnique() const;
    489  public: bool isUniquified() const;
    490  public: bool isUniquifyMaster() const;
    491  public: bool isPad() const {return _flags.isset(Flags::Pad);};
    492  public: bool isFeed() const {return _flags.isset(Flags::Feed);};
    493  public: bool isFlattenedNets() const {return _flags.isset(Flags::FlattenedNets);};
    494  public: bool isPlaced() const {return _flags.isset(Flags::Placed);};
    495  public: bool isRouted() const {return _flags.isset(Flags::Routed);};
    496  public: bool isNetAlias(const Name& name) const;
    497 
    498 // Updators
    499 // ********
    500 
    501  public: void setName(const Name& name);
    502  public: void setAbutmentBox(const Box& abutmentBox);
    503  public: void slaveAbutmentBox(Cell*);
    504  public: void unslaveAbutmentBox(Cell*);
    505  public: void setTerminalNetlist(bool isTerminalNetlist) {_flags.set(Flags::TerminalNetlist,isTerminalNetlist);};
    506  public: void setPad(bool isPad) {_flags.set(Flags::Pad,isPad);};
    507  public: void setFeed(bool isFeed) {_flags.set(Flags::Feed,isFeed);};
    508  public: void setRouted(bool isRouted) {_flags.set(Flags::Routed,isRouted);};
    509  public: void flattenNets(uint64_t flags=Flags::BuildRings);
    510  public: void flattenNets(const Instance* instance, uint64_t flags=Flags::BuildRings);
    511  public: void createRoutingPadRings(uint64_t flags=Flags::BuildRings);
    512  public: void setFlags(uint64_t flags) { _flags |= flags; }
    513  public: void resetFlags(uint64_t flags) { _flags &= ~flags; }
    514  public: bool updatePlacedFlag();
    515  public: void materialize();
    516  public: void unmaterialize();
    517  public: Cell* getClone();
    518  public: void uniquify(unsigned int depth=std::numeric_limits<unsigned int>::max());
    519  public: void addObserver(BaseObserver*);
    520  public: void removeObserver(BaseObserver*);
    521  public: void notify(unsigned flags);
    522  public: void destroyPhysical();
    523 };
    524 
    525 
    526 inline Cell::ClonedSet::Locator::Locator ( const Locator& other )
    527  : Hurricane::Locator<Cell*>()
    528  , _dboLocator(other._dboLocator)
    529 { }
    530 
    531 inline Cell::ClonedSet::ClonedSet ( const Cell* cell )
    532  : Hurricane::Collection<Cell*>()
    533  , _cell(cell)
    534 { }
    535 
    536 inline Cell::ClonedSet::ClonedSet ( const ClonedSet& other )
    537  : Hurricane::Collection<Cell*>()
    538  , _cell(other._cell)
    539 { }
    540 
    541 
    542 inline void Cell::UniquifyRelation::_setOwner ( Cell* owner ) { _setMasterOwner(owner); }
    543 inline void Cell::UniquifyRelation::_setDuplicates ( unsigned int duplicates ) { _duplicates=duplicates; }
    544 
    545 
    546 inline Cell::SlavedsSet::Locator::Locator ( const Locator& other )
    547  : Hurricane::Locator<Cell*>()
    548  , _dboLocator(other._dboLocator)
    549 { }
    550 
    551 inline Cell::SlavedsSet::SlavedsSet ( const Cell* cell )
    552  : Hurricane::Collection<Cell*>()
    553  , _cell(cell)
    554 { }
    555 
    556 inline Cell::SlavedsSet::SlavedsSet ( const SlavedsSet& other )
    557  : Hurricane::Collection<Cell*>()
    558  , _cell(other._cell)
    559 { }
    560 
    561 
    562 inline void Cell::SlavedsRelation::_setOwner ( Cell* owner ) { _setMasterOwner(owner); }
    563 
    564 
    565 class JsonCell : public JsonEntity {
    566 // *********************************
    567 
    568  public: static void initialize();
    569  public: JsonCell(unsigned long flags);
    570  public: virtual ~JsonCell();
    571  public: virtual string getTypeName() const;
    572  public: virtual JsonCell* clone(unsigned long) const;
    573  public: virtual void toData(JsonStack&);
    574  private: Cell* _cell;
    575  private: bool _materializationState;
    576 };
    577 
    578 } // End of Hurricane namespace.
    579 
    580 
    581 INSPECTOR_P_SUPPORT(Hurricane::Cell);
    582 INSPECTOR_P_SUPPORT(Hurricane::Cell::Flags);
    583 INSPECTOR_P_SUPPORT(Hurricane::Cell::InstanceMap);
    584 INSPECTOR_P_SUPPORT(Hurricane::Cell::SlaveInstanceSet);
    585 INSPECTOR_P_SUPPORT(Hurricane::Cell::NetMap);
    586 INSPECTOR_P_SUPPORT(Hurricane::Cell::PinMap);
    587 INSPECTOR_P_SUPPORT(Hurricane::Cell::SliceMap);
    588 INSPECTOR_P_SUPPORT(Hurricane::Cell::MarkerSet);
    589 INSPECTOR_PR_SUPPORT(Hurricane::Cell::SlavedsRelation);
    590 
    591 
    592 #endif // HURRICANE_CELL_H
    593 
    594 
    595 // ****************************************************************************************************
    596 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    597 // ****************************************************************************************************
    bool isTerminalNetlist() const
    Definition: Cell.h:487
    -
    Path description (API)
    Definition: Path.h:37
    +
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Cell.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #pragma once
    21 #include <limits>
    22 #include "hurricane/Flags.h"
    23 #include "hurricane/Observer.h"
    24 #include "hurricane/Signature.h"
    25 #include "hurricane/Relation.h"
    26 #include "hurricane/Pathes.h"
    27 #include "hurricane/Entity.h"
    28 #include "hurricane/Cells.h"
    29 #include "hurricane/DeepNet.h"
    30 #include "hurricane/Instance.h"
    31 #include "hurricane/Pin.h"
    32 #include "hurricane/Pins.h"
    33 #include "hurricane/Slices.h"
    34 #include "hurricane/ExtensionSlice.h"
    35 #include "hurricane/Rubbers.h"
    36 #include "hurricane/Markers.h"
    37 #include "hurricane/Marker.h"
    38 #include "hurricane/Reference.h"
    39 #include "hurricane/Components.h"
    40 #include "hurricane/Occurrences.h"
    41 #include "hurricane/Transformation.h"
    42 #include "hurricane/Layer.h"
    43 #include "hurricane/QuadTree.h"
    44 //#include "hurricane/IntrusiveMap.h"
    45 #include "hurricane/IntrusiveSet.h"
    46 #include "hurricane/MapCollection.h"
    47 #include "hurricane/NetAlias.h"
    48 
    49 
    50 
    51 namespace Hurricane {
    52 
    53 class Library;
    54 class BasicLayer;
    55 
    56 typedef multimap<Entity*,Entity*> SlaveEntityMap;
    57 
    58 
    59 
    60 // ****************************************************************************************************
    61 // Cell declaration
    62 // ****************************************************************************************************
    63 
    64 class Cell : public Entity {
    65 // *************************
    66 
    67 // Types
    68 // *****
    69 
    70  public: typedef Entity Inherit;
    71  public: typedef map<Name,ExtensionSlice*> ExtensionSliceMap;
    72 
    73  public: class Flags : public BaseFlags {
    74  public:
    75  enum Flag { NoFlags = 0
    76  , BuildRings = (1 << 1)
    77  , BuildClockRings = (1 << 2)
    78  , BuildSupplyRings = (1 << 3)
    79  , NoClockFlatten = (1 << 4)
    80  , WarnOnUnplacedInstances = (1 << 5)
    81  , StayOnPlugs = (1 << 6)
    82  , MaskRings = BuildRings|BuildClockRings|BuildSupplyRings
    83  // Flags set for Observers.
    84  , CellAboutToChange = (1 << 10)
    85  , CellChanged = (1 << 11)
    86  , CellDestroyed = (1 << 12)
    87  // Cell states
    88  , TerminalNetlist = (1 << 20)
    89  , Pad = (1 << 21)
    90  , Feed = (1 << 22)
    91  , FlattenedNets = (1 << 23)
    92  , AbstractedSupply = (1 << 24)
    93  , Placed = (1 << 25)
    94  , Routed = (1 << 26)
    95  , SlavedAb = (1 << 27)
    96  , Materialized = (1 << 28)
    97  };
    98 
    99  public:
    100  Flags ( uint64_t flags = NoFlags );
    101  virtual ~Flags ();
    102  virtual std::string _getTypeName () const;
    103  virtual std::string _getString () const;
    104  };
    105 
    106  class UniquifyRelation : public Relation {
    107  public:
    108  static UniquifyRelation* create ( Cell* );
    109  static UniquifyRelation* get ( const Cell* );
    110  virtual Name getName () const;
    111  static Name staticGetName ();
    112  Name getUniqueName ();
    113  static std::string getTrunkName ( Name name );
    114  virtual bool hasJson () const;
    115  virtual void toJson ( JsonWriter*, const DBo* ) const;
    116  inline void _setOwner ( Cell* );
    117  inline void _setDuplicates ( unsigned int );
    118  virtual string _getTypeName () const;
    119  virtual Record* _getRecord () const;
    120  private:
    121  static const Name _name;
    122  unsigned int _duplicates;
    123  private:
    124  UniquifyRelation ( Cell* );
    125  protected:
    126  virtual void _preDestroy ();
    127 
    128  public:
    129  class JsonProperty : public JsonObject {
    130  public:
    131  static void initialize ();
    132  JsonProperty ( unsigned long flags );
    133  virtual string getTypeName () const;
    134  virtual JsonProperty* clone ( unsigned long ) const;
    135  virtual void toData ( JsonStack& );
    136  };
    137  public:
    138  class JsonPropertyRef : public JsonObject {
    139  public:
    140  static void initialize ();
    141  JsonPropertyRef ( unsigned long flags );
    142  virtual string getTypeName () const;
    143  virtual JsonPropertyRef* clone ( unsigned long ) const;
    144  virtual void toData ( JsonStack& );
    145  };
    146  };
    147 
    148  class ClonedSet : public Collection<Cell*> {
    149  public:
    150  // Sub-Class: Locator.
    151  class Locator : public Hurricane::Locator<Cell*> {
    152  public:
    153  Locator ( const Cell* );
    154  inline Locator ( const Locator& );
    155  virtual Cell* getElement () const;
    156  virtual Hurricane::Locator<Cell*>* getClone () const;
    157  virtual bool isValid () const;
    158  virtual void progress ();
    159  virtual string _getString () const;
    160  protected:
    161  Hurricane::Locator<DBo*>* _dboLocator;
    162  };
    163 
    164  public:
    165  inline ClonedSet ( const Cell* cell );
    166  inline ClonedSet ( const ClonedSet& );
    167  virtual Hurricane::Collection<Cell*>* getClone () const;
    168  virtual Hurricane::Locator<Cell*>* getLocator () const;
    169  virtual string _getString () const;
    170  protected:
    171  const Cell* _cell;
    172  };
    173 
    174  class SlavedsRelation : public Relation {
    175  public:
    176  static SlavedsRelation* create ( Cell* );
    177  static SlavedsRelation* get ( const Cell* );
    178  virtual Name getName () const;
    179  static Name staticGetName ();
    180  virtual bool hasJson () const;
    181  virtual void toJson ( JsonWriter*, const DBo* ) const;
    182  inline void _setOwner ( Cell* );
    183  virtual string _getTypeName () const;
    184  virtual Record* _getRecord () const;
    185  private:
    186  static const Name _name;
    187  private:
    188  SlavedsRelation ( Cell* );
    189  protected:
    190  virtual void _preDestroy ();
    191 
    192  public:
    193  class JsonProperty : public JsonObject {
    194  public:
    195  static void initialize ();
    196  JsonProperty ( unsigned long flags );
    197  virtual string getTypeName () const;
    198  virtual JsonProperty* clone ( unsigned long ) const;
    199  virtual void toData ( JsonStack& );
    200  };
    201  public:
    202  class JsonPropertyRef : public JsonObject {
    203  public:
    204  static void initialize ();
    205  JsonPropertyRef ( unsigned long flags );
    206  virtual string getTypeName () const;
    207  virtual JsonPropertyRef* clone ( unsigned long ) const;
    208  virtual void toData ( JsonStack& );
    209  };
    210  };
    211 
    212  class SlavedsSet : public Collection<Cell*> {
    213  public:
    214  // Sub-Class: Locator.
    215  class Locator : public Hurricane::Locator<Cell*> {
    216  public:
    217  Locator ( const Cell* );
    218  inline Locator ( const Locator& );
    219  virtual Cell* getElement () const;
    220  virtual Hurricane::Locator<Cell*>* getClone () const;
    221  virtual bool isValid () const;
    222  virtual void progress ();
    223  virtual string _getString () const;
    224  protected:
    225  Hurricane::Locator<DBo*>* _dboLocator;
    226  };
    227 
    228  public:
    229  inline SlavedsSet ( const Cell* cell );
    230  inline SlavedsSet ( const SlavedsSet& );
    231  virtual Hurricane::Collection<Cell*>* getClone () const;
    232  virtual Hurricane::Locator<Cell*>* getLocator () const;
    233  virtual string _getString () const;
    234  protected:
    235  const Cell* _cell;
    236  };
    237 
    238  class InstanceMap : public IntrusiveMap<Name, Instance> {
    239  // ****************************************************
    240 
    241  public: typedef IntrusiveMap<Name, Instance> Inherit;
    242 
    243  public: InstanceMap();
    244 
    245  public: virtual Name _getKey(Instance* instance) const;
    246  public: virtual unsigned _getHashValue(Name name) const;
    247  public: virtual Instance* _getNextElement(Instance* instance) const;
    248  public: virtual void _setNextElement(Instance* instance, Instance* nextInstance) const;
    249 
    250  };
    251 
    252  public: class SlaveInstanceSet : public IntrusiveSet<Instance> {
    253  // ***********************************************************
    254 
    255  public: typedef IntrusiveSet<Instance> Inherit;
    256 
    257  public: SlaveInstanceSet();
    258 
    259  public: virtual unsigned _getHashValue(Instance* slaveInstance) const;
    260  public: virtual Instance* _getNextElement(Instance* slaveInstance) const;
    261  public: virtual void _setNextElement(Instance* slaveInstance, Instance* nextSlaveInstance) const;
    262 
    263  };
    264 
    265  public: class NetMap : public IntrusiveMapConst<Name, Net> {
    266  // *********************************************************
    267 
    268  public: typedef IntrusiveMapConst<Name, Net> Inherit;
    269 
    270  public: NetMap();
    271 
    272  public: virtual const Name& _getKey(Net* net) const;
    273  public: virtual unsigned _getHashValue(const Name& name) const;
    274  public: virtual Net* _getNextElement(Net* net) const;
    275  public: virtual void _setNextElement(Net* net, Net* nextNet) const;
    276 
    277  };
    278 
    279  class PinMap : public IntrusiveMap<Name, Pin> {
    280  // *******************************************
    281 
    282  public: typedef IntrusiveMap<Name, Pin> Inherit;
    283 
    284  public: PinMap();
    285 
    286  public: virtual Name _getKey(Pin* pin) const;
    287  public: virtual unsigned _getHashValue(Name name) const;
    288  public: virtual Pin* _getNextElement(Pin* pin) const;
    289  public: virtual void _setNextElement(Pin* pin, Pin* nextPin) const;
    290 
    291  };
    292 
    293  public: class SliceMap : public IntrusiveMap<const Layer*, Slice> {
    294  // **************************************************************
    295 
    296  public: typedef IntrusiveMap<const Layer*, Slice> Inherit;
    297 
    298  public: SliceMap();
    299 
    300  public: virtual const Layer* _getKey(Slice* slice) const;
    301  public: virtual unsigned _getHashValue(const Layer* layer) const;
    302  public: virtual Slice* _getNextElement(Slice* slice) const;
    303  public: virtual void _setNextElement(Slice* slice, Slice* nextSlice) const;
    304 
    305  };
    306 
    307  public: class MarkerSet : public IntrusiveSet<Marker> {
    308  // **************************************************
    309 
    310  public: typedef IntrusiveSet<Marker> Inherit;
    311 
    312  public: MarkerSet();
    313 
    314  public: virtual unsigned _getHashValue(Marker* marker) const;
    315  public: virtual Marker* _getNextElement(Marker* marker) const;
    316  public: virtual void _setNextElement(Marker* marker, Marker* nextMarker) const;
    317 
    318  };
    319 
    320 // Attributes
    321 // **********
    322 
    323  private: Library* _library;
    324  private: Name _name;
    325  private: Path _shuntedPath;
    326  private: InstanceMap _instanceMap;
    327  private: QuadTree* _quadTree;
    328  private: SlaveInstanceSet _slaveInstanceSet;
    329  private: NetMap _netMap;
    330  private: PinMap _pinMap;
    331  private: SliceMap* _sliceMap;
    332  private: ExtensionSliceMap _extensionSlices;
    333  private: MarkerSet _markerSet;
    334  private: Box _abutmentBox;
    335  private: Box _boundingBox;
    336  private: Cell* _nextOfLibraryCellMap;
    337  private: Cell* _nextOfSymbolCellSet;
    338  private: SlaveEntityMap _slaveEntityMap;
    339  private: AliasNameSet _netAliasSet;
    340  private: Observable _observers;
    341  private: Flags _flags;
    342 
    343 // Constructors
    344 // ************
    345 
    346  protected: Cell(Library* library, const Name& name);
    347 
    348 // Others
    349 // ******
    350 
    351  protected: virtual void _postCreate();
    352 
    353  protected: virtual void _preDestroy();
    354 
    355  public: virtual string _getTypeName() const {return _TName("Cell");};
    356  public: virtual string _getString() const;
    357  public: virtual Record* _getRecord() const;
    358  public: static string getFlagString( uint64_t );
    359  public: static Record* getFlagRecord( uint64_t );
    360  public: static Slot* getFlagSlot( uint64_t );
    361 
    362  public: InstanceMap& _getInstanceMap() {return _instanceMap;};
    363  public: QuadTree* _getQuadTree() {return _quadTree;};
    364  public: SlaveInstanceSet& _getSlaveInstanceSet() {return _slaveInstanceSet;};
    365  public: NetMap& _getNetMap() {return _netMap;};
    366  public: PinMap& _getPinMap() {return _pinMap;};
    367  public: SliceMap* _getSliceMap() {return _sliceMap;};
    368  public: ExtensionSliceMap& _getExtensionSliceMap() {return _extensionSlices;};
    369  public: MarkerSet& _getMarkerSet() {return _markerSet;};
    370  public: Cell* _getNextOfLibraryCellMap() const {return _nextOfLibraryCellMap;};
    371  public: Cell* _getNextOfSymbolCellSet() const {return _nextOfSymbolCellSet;};
    372  public: AliasNameSet& _getNetAliasSet() { return _netAliasSet; }
    373 
    374  public: void _setNextOfLibraryCellMap(Cell* cell) {_nextOfLibraryCellMap = cell;};
    375  public: void _setNextOfSymbolCellSet(Cell* cell) {_nextOfSymbolCellSet = cell;};
    376 
    377  public: void _addNetAlias(NetAliasName* alias) { _netAliasSet.insert(alias); }
    378  public: void _removeNetAlias(NetAliasName* alias) { _netAliasSet.erase(alias); }
    379 
    380  public: void _fit(const Box& box);
    381  public: void _unfit(const Box& box);
    382 
    383  public: void _addSlaveEntity(Entity* entity, Entity* slaveEntity);
    384  public: void _removeSlaveEntity(Entity* entity, Entity* slaveEntity);
    385  public: void _getSlaveEntities(SlaveEntityMap::iterator& begin, SlaveEntityMap::iterator& end);
    386  public: void _getSlaveEntities(Entity* entity, SlaveEntityMap::iterator& begin, SlaveEntityMap::iterator& end);
    387  public: void _insertSlice(ExtensionSlice*);
    388  public: void _removeSlice(ExtensionSlice*);
    389  public: void _slaveAbutmentBox(Cell*);
    390  public: void _setShuntedPath(Path path) { _shuntedPath=path; }
    391  protected: void _setAbutmentBox(const Box& abutmentBox);
    392 
    393  public: virtual void _toJson(JsonWriter*) const;
    394  public: virtual void _toJsonCollections(JsonWriter*) const;
    395 
    396 // Constructors
    397 // ************
    398 
    399  public: static Cell* create(Library* library, const Name& name);
    400  public: static Cell* fromJson(const string& filename);
    401 
    402 // Accessors
    403 // *********
    404 
    405  public: virtual Cell* getCell() const {return (Cell*)this;};
    406  public: virtual Box getBoundingBox() const;
    407  public: Library* getLibrary() const {return _library;};
    408  public: string getHierarchicalName() const;
    409  public: const Name& getName() const {return _name;};
    410  public: const Flags& getFlags() const { return _flags; }
    411  public: Flags& getFlags() { return _flags; }
    412  public: Path getShuntedPath() const { return _shuntedPath; }
    413  public: Entity* getEntity(const Signature&) const;
    414  public: Instance* getInstance(const Name& name) const {return _instanceMap.getElement(name);};
    415  public: Instances getInstances() const {return _instanceMap.getElements();};
    416  public: Instances getPlacedInstances() const;
    417  public: Instances getFixedInstances() const;
    418  public: Instances getUnplacedInstances() const;
    419  public: Instances getNotUnplacedInstances() const;
    420  public: Instances getInstancesUnder(const Box& area, DbU::Unit threshold=0) const;
    421  public: Instances getPlacedInstancesUnder(const Box& area) const;
    422  public: Instances getFixedInstancesUnder(const Box& area) const;
    423  public: Instances getUnplacedInstancesUnder(const Box& area) const;
    424  public: Instances getNotUnplacedInstancesUnder(const Box& area) const;
    425  public: Instances getSlaveInstances() const; // {return _slaveInstanceSet.getElements();}; NOON!!
    426  public: Instances getTerminalInstances() const;
    427  public: Instances getTerminalInstancesUnder(const Box& area) const;
    428  public: Instances getNonTerminalInstances() const;
    429  public: Instances getNonTerminalInstancesUnder(const Box& area) const;
    430  public: Instances getTerminalNetlistInstances() const;
    431  public: Instances getTerminalNetlistInstancesUnder(const Box& area) const;
    432  public: Instances getNonTerminalNetlistInstances() const;
    433  public: Instances getNonTerminalNetlistInstancesUnder(const Box& area) const;
    434  public: Net* getNet(const Name& name, bool useAlias=true) const;
    435  public: DeepNet* getDeepNet( Path, const Net* ) const;
    436  public: Nets getNets() const {return _netMap.getElements();};
    437  public: Nets getGlobalNets() const;
    438  public: Nets getExternalNets() const;
    439  public: Nets getInternalNets() const;
    440  public: Nets getClockNets() const;
    441  public: Nets getSupplyNets() const;
    442  public: Nets getPowerNets() const;
    443  public: Nets getGroundNets() const;
    444  public: Pin* getPin(const Name& name) const {return _pinMap.getElement(name);};
    445  public: Pins getPins() const {return _pinMap.getElements();};
    446  public: Slice* getSlice(const Layer* layer) const {return _sliceMap->getElement(layer);};
    447  public: Slices getSlices(const Layer::Mask& mask = ~0) const;
    448  public: const ExtensionSliceMap& getExtensionSliceMap() const { return _extensionSlices; };
    449  public: ExtensionSlice* getExtensionSlice(const Name& name) const;
    450  public: ExtensionSlices getExtensionSlices(ExtensionSlice::Mask mask=~0) const;
    451  public: Rubbers getRubbers() const;
    452  public: Rubbers getRubbersUnder(const Box& area) const;
    453  public: Markers getMarkers() const {return _markerSet.getElements();};
    454  public: Markers getMarkersUnder(const Box& area) const;
    455  public: References getReferences() const;
    456  public: Components getComponents(const Layer::Mask& mask = ~0) const;
    457  public: Components getComponentsUnder(const Box& area, const Layer::Mask& mask = ~0) const;
    458  public: Occurrences getOccurrences(unsigned searchDepth = std::numeric_limits<unsigned int>::max()) const;
    459  public: Occurrences getOccurrencesUnder(const Box& area, unsigned searchDepth = std::numeric_limits<unsigned int>::max(), DbU::Unit threshold=0) const;
    461  public: Occurrences getTerminalInstanceOccurrencesUnder(const Box& area) const;
    462  public: Occurrences getTerminalNetlistInstanceOccurrences( const Instance* topInstance=NULL ) const;
    463  public: Occurrences getTerminalNetlistInstanceOccurrencesUnder(const Box& area) const;
    464  public: Occurrences getNonTerminalNetlistInstanceOccurrences( const Instance* topInstance=NULL ) const;
    465  public: Occurrences getComponentOccurrences(const Layer::Mask& mask = ~0) const;
    466  public: Occurrences getComponentOccurrencesUnder(const Box& area, const Layer::Mask& mask = ~0) const;
    467  public: Occurrences getHyperNetRootNetOccurrences() const;
    468  public: ExtensionSlice::Mask getExtensionSliceMask ( const Name& name ) const;
    469  public: Gos getExtensionGos ( const Name& name ) const;
    470  public: Gos getExtensionGos ( ExtensionSlice::Mask mask = ~0 ) const;
    471  public: Gos getExtensionGosUnder ( const Box& area, const Name& name ) const;
    472  public: Gos getExtensionGosUnder ( const Box& area, ExtensionSlice::Mask mask = ~0 ) const;
    473  public: Cells getSubCells() const;
    474  public: Cells getClonedCells() const;
    475  public: Cell* getCloneMaster() const;
    476  public: Pathes getRecursiveSlavePathes() const;
    477  public: const Box& getAbutmentBox() const {return _abutmentBox;};
    478 
    479 // Predicates
    480 // **********
    481 
    482  public: bool isCalledBy(Cell* cell) const;
    483  public: bool isTerminal() const {return _instanceMap.isEmpty();};
    484  public: bool isTerminalNetlist() const {return _flags.isset(Flags::TerminalNetlist);};
    485  public: bool isUnique() const;
    486  public: bool isUniquified() const;
    487  public: bool isUniquifyMaster() const;
    488  public: bool isPad() const {return _flags.isset(Flags::Pad);};
    489  public: bool isFeed() const {return _flags.isset(Flags::Feed);};
    490  public: bool isFlattenedNets() const {return _flags.isset(Flags::FlattenedNets);};
    491  public: bool isAbstractedSupply() const {return _flags.isset(Flags::AbstractedSupply);};
    492  public: bool isPlaced() const {return _flags.isset(Flags::Placed);};
    493  public: bool isRouted() const {return _flags.isset(Flags::Routed);};
    494  public: bool isNetAlias(const Name& name) const;
    495 
    496 // Updators
    497 // ********
    498 
    499  public: void setName(const Name& name);
    500  public: void setAbutmentBox(const Box& abutmentBox);
    501  public: void slaveAbutmentBox(Cell*);
    502  public: void unslaveAbutmentBox(Cell*);
    503  public: void setTerminalNetlist(bool state) { _flags.set(Flags::TerminalNetlist,state); };
    504  public: void setPad(bool state) {_flags.set(Flags::Pad,state);};
    505  public: void setFeed(bool state) {_flags.set(Flags::Feed,state);};
    506  public: void setRouted(bool state) {_flags.set(Flags::Routed,state);};
    507  public: void setAbstractedSupply(bool state) { _flags.set(Flags::AbstractedSupply,state); };
    508  public: void flattenNets(uint64_t flags=Flags::BuildRings);
    509  public: void flattenNets(const Instance* instance, uint64_t flags=Flags::BuildRings);
    510  public: void flattenNets(const Instance* instance, const std::set<std::string>& excludeds, uint64_t flags=Flags::BuildRings);
    511  public: void createRoutingPadRings(uint64_t flags=Flags::BuildRings);
    512  public: void setFlags(uint64_t flags) { _flags |= flags; }
    513  public: void resetFlags(uint64_t flags) { _flags &= ~flags; }
    514  public: bool updatePlacedFlag();
    515  public: void materialize();
    516  public: void unmaterialize();
    517  public: Cell* getClone();
    518  public: void uniquify(unsigned int depth=std::numeric_limits<unsigned int>::max());
    519  public: void addObserver(BaseObserver*);
    520  public: void removeObserver(BaseObserver*);
    521  public: void notify(unsigned flags);
    522  public: void destroyPhysical();
    523 };
    524 
    525 
    526 inline Cell::ClonedSet::Locator::Locator ( const Locator& other )
    527  : Hurricane::Locator<Cell*>()
    528  , _dboLocator(other._dboLocator)
    529 { }
    530 
    531 inline Cell::ClonedSet::ClonedSet ( const Cell* cell )
    532  : Hurricane::Collection<Cell*>()
    533  , _cell(cell)
    534 { }
    535 
    536 inline Cell::ClonedSet::ClonedSet ( const ClonedSet& other )
    537  : Hurricane::Collection<Cell*>()
    538  , _cell(other._cell)
    539 { }
    540 
    541 
    542 inline void Cell::UniquifyRelation::_setOwner ( Cell* owner ) { _setMasterOwner(owner); }
    543 inline void Cell::UniquifyRelation::_setDuplicates ( unsigned int duplicates ) { _duplicates=duplicates; }
    544 
    545 
    546 inline Cell::SlavedsSet::Locator::Locator ( const Locator& other )
    547  : Hurricane::Locator<Cell*>()
    548  , _dboLocator(other._dboLocator)
    549 { }
    550 
    551 inline Cell::SlavedsSet::SlavedsSet ( const Cell* cell )
    552  : Hurricane::Collection<Cell*>()
    553  , _cell(cell)
    554 { }
    555 
    556 inline Cell::SlavedsSet::SlavedsSet ( const SlavedsSet& other )
    557  : Hurricane::Collection<Cell*>()
    558  , _cell(other._cell)
    559 { }
    560 
    561 
    562 inline void Cell::SlavedsRelation::_setOwner ( Cell* owner ) { _setMasterOwner(owner); }
    563 
    564 
    565 class JsonCell : public JsonEntity {
    566 // *********************************
    567 
    568  public: static void initialize();
    569  public: JsonCell(unsigned long flags);
    570  public: virtual ~JsonCell();
    571  public: virtual string getTypeName() const;
    572  public: virtual JsonCell* clone(unsigned long) const;
    573  public: virtual void toData(JsonStack&);
    574  private: Cell* _cell;
    575  private: bool _materializationState;
    576 };
    577 
    578 } // End of Hurricane namespace.
    579 
    580 
    581 INSPECTOR_P_SUPPORT(Hurricane::Cell);
    582 INSPECTOR_P_SUPPORT(Hurricane::Cell::Flags);
    583 INSPECTOR_P_SUPPORT(Hurricane::Cell::InstanceMap);
    584 INSPECTOR_P_SUPPORT(Hurricane::Cell::SlaveInstanceSet);
    585 INSPECTOR_P_SUPPORT(Hurricane::Cell::NetMap);
    586 INSPECTOR_P_SUPPORT(Hurricane::Cell::PinMap);
    587 INSPECTOR_P_SUPPORT(Hurricane::Cell::SliceMap);
    588 INSPECTOR_P_SUPPORT(Hurricane::Cell::MarkerSet);
    589 INSPECTOR_PR_SUPPORT(Hurricane::Cell::SlavedsRelation);
    590 
    591 
    592 // ****************************************************************************************************
    593 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    594 // ****************************************************************************************************
    bool isTerminalNetlist() const
    Definition: Cell.h:484
    +
    Path description (API)
    Definition: Path.h:35
    Collection description (API)
    Definition: Collection.h:39
    Pad description (API)
    Definition: Pad.h:36
    Library description (API)
    Definition: Library.h:38
    Nets getClockNets() const
    GenericCollection< Go * > Gos
    Definition: Gos.h:27
    void unmaterialize()
    -
    const Box & getAbutmentBox() const
    Definition: Cell.h:480
    -
    Net * getNet(const Name &name) const
    -
    Pin description (API)
    Definition: Pin.h:34
    +
    const Box & getAbutmentBox() const
    Definition: Cell.h:477
    +
    Pin description (API)
    Definition: Pin.h:41
    Instances getSlaveInstances() const
    -
    void setTerminalNetlist(bool isTerminalNetlist)
    Definition: Cell.h:505
    Relation description (API)
    Definition: Relation.h:33
    Components getComponentsUnder(const Box &area, const Layer::Mask &mask=~0) const
    Support for JSON export.
    Definition: JsonObject.h:83
    Name description (API)
    Definition: Name.h:35
    Slices getSlices(const Layer::Mask &mask=~0) const
    -
    std::int64_t Unit
    Definition: DbU.h:70
    +
    std::int64_t Unit
    Definition: DbU.h:67
    void uniquify(unsigned int depth=std::numeric_limits< unsigned int >::max())
    -
    The model (API).
    Definition: Cell.h:66
    +
    The model (API).
    Definition: Cell.h:64
    Occurrences getOccurrences(unsigned searchDepth=std::numeric_limits< unsigned int >::max()) const
    Nets getSupplyNets() const
    Components getComponents(const Layer::Mask &mask=~0) const
    -
    DataBase object root class (API).
    Definition: DBo.h:47
    +
    DataBase object root class (API).
    Definition: DBo.h:45
    Hurricane::Mask< unsigned long long > Mask
    Definition: Layer.h:65
    Nets getExternalNets() const
    -
    Nets getNets() const
    Definition: Cell.h:439
    -
    Library * getLibrary() const
    Definition: Cell.h:410
    +
    Nets getNets() const
    Definition: Cell.h:436
    +
    Library * getLibrary() const
    Definition: Cell.h:407
    Cell * getClone()
    +
    void setTerminalNetlist(bool state)
    Definition: Cell.h:503
    Generic Collection auto-pointer.
    Definition: Collection.h:28
    -
    const Name & getName() const
    Definition: Cell.h:412
    +
    const Name & getName() const
    Definition: Cell.h:409
    JSON Parser Stack.
    Definition: JsonObject.h:249
    -
    Occurrences getOccurrencesUnder(const Box &area, unsigned searchDepth=std::numeric_limits< unsigned int >::max()) const
    Nets getInternalNets() const
    static Cell * create(Library *library, const Name &name)
    void setAbutmentBox(const Box &abutmentBox)
    @@ -86,18 +84,19 @@ $(function() {
    GenericCollection< Cell * > Cells
    Definition: Cells.h:27
    Box description (API)
    Definition: Box.h:31
    bool isUnique() const
    -
    Instance description (API)
    Definition: Instance.h:37
    +
    Instance description (API)
    Definition: Instance.h:35
    Rubbers getRubbers() const
    +
    Net * getNet(const Name &name, bool useAlias=true) const
    GenericCollection< Rubber * > Rubbers
    Definition: Rubbers.h:27
    Layer description (API)
    Definition: Layer.h:52
    bool isCalledBy(Cell *cell) const
    Rubbers getRubbersUnder(const Box &area) const
    -
    Slice * getSlice(const Layer *layer) const
    Definition: Cell.h:449
    +
    Slice * getSlice(const Layer *layer) const
    Definition: Cell.h:446
    Slice description (API)
    Definition: Slice.h:38
    GenericCollection< Path > Pathes
    Definition: Pathes.h:34
    void setName(const Name &name)
    -
    Instance * getInstance(const Name &name) const
    Definition: Cell.h:417
    +
    Instance * getInstance(const Name &name) const
    Definition: Cell.h:414
    Occurrences getTerminalInstanceOccurrences() const
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    Occurrences getNonTerminalNetlistInstanceOccurrences(const Instance *topInstance=NULL) const
    @@ -105,11 +104,12 @@ $(function() {
    Instances getInstancesUnder(const Box &area, DbU::Unit threshold=0) const
    GenericCollection< Component * > Components
    Definition: Components.h:27
    Net description (API)
    Definition: Net.h:48
    +
    Occurrences getOccurrencesUnder(const Box &area, unsigned searchDepth=std::numeric_limits< unsigned int >::max(), DbU::Unit threshold=0) const
    GenericCollection< Occurrence > Occurrences
    Definition: Occurrences.h:40
    -
    Instances getInstances() const
    Definition: Cell.h:418
    +
    Instances getInstances() const
    Definition: Cell.h:415
    Nets getGlobalNets() const
    bool isUniquifyMaster() const
    -
    bool isTerminal() const
    Definition: Cell.h:486
    +
    bool isTerminal() const
    Definition: Cell.h:483
    Occurrences getTerminalNetlistInstanceOccurrences(const Instance *topInstance=NULL) const
    bool isUniquified() const
    @@ -117,7 +117,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Cells_8h_source.html b/hurricane/doc/hurricane/html/Cells_8h_source.html index a7231fbf..608fddc7 100644 --- a/hurricane/doc/hurricane/html/Cells_8h_source.html +++ b/hurricane/doc/hurricane/html/Cells_8h_source.html @@ -47,7 +47,7 @@ $(function() {
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Cells.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_CELLS
    21 #define HURRICANE_CELLS
    22 
    23 #include "hurricane/Collection.h"
    24 
    25 namespace Hurricane {
    26 
    27 class Cell;
    28 
    29 
    30 
    31 // ****************************************************************************************************
    32 // Cells declaration
    33 // ****************************************************************************************************
    34 
    36 
    37 
    38 
    39 // ****************************************************************************************************
    40 // CellLocator declaration
    41 // ****************************************************************************************************
    42 
    44 
    45 
    46 
    47 // ****************************************************************************************************
    48 // CellFilter declaration
    49 // ****************************************************************************************************
    50 
    52 
    53 
    54 
    55 // ****************************************************************************************************
    56 // for_each_cell declaration
    57 // ****************************************************************************************************
    58 
    59 #define for_each_cell(cell, cells)\
    60 /*********************************/\
    61 {\
    62  CellLocator _locator = cells.getLocator();\
    63  while (_locator.isValid()) {\
    64  Cell* cell = _locator.getElement();\
    65  _locator.progress();
    66 
    67 
    68 
    69 } // End of Hurricane namespace.
    70 
    71 #endif // HURRICANE_CELLS
    72 
    73 
    74 // ****************************************************************************************************
    75 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    76 // ****************************************************************************************************
    GenericLocator< Cell * > CellLocator
    Definition: Cells.h:43
    Generic Locator auto-pointer.
    Definition: Locator.h:113
    Generic Filter auto-pointer.
    Definition: Filter.h:27
    -
    The model (API).
    Definition: Cell.h:66
    +
    The model (API).
    Definition: Cell.h:64
    Generic Collection auto-pointer.
    Definition: Collection.h:28
    GenericCollection< Cell * > Cells
    Definition: Cells.h:27
    GenericFilter< Cell * > CellFilter
    Definition: Cells.h:51
    @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Collection_8h_source.html b/hurricane/doc/hurricane/html/Collection_8h_source.html index 7d5a3702..8f9edb2c 100644 --- a/hurricane/doc/hurricane/html/Collection_8h_source.html +++ b/hurricane/doc/hurricane/html/Collection_8h_source.html @@ -76,7 +76,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Commons_8h_source.html b/hurricane/doc/hurricane/html/Commons_8h_source.html index e16c86ba..faf1126f 100644 --- a/hurricane/doc/hurricane/html/Commons_8h_source.html +++ b/hurricane/doc/hurricane/html/Commons_8h_source.html @@ -44,7 +44,7 @@ $(function() {
    Commons.h
    -
    1 // -*- C++ -*-
    2 //
    3 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    4 //
    5 // This file is part of Hurricane.
    6 //
    7 // Hurricane is free software: you can redistribute it and/or modify
    8 // it under the terms of the GNU Lesser General Public License as
    9 // published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but
    13 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    14 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    15 // General Public License for more details.
    16 //
    17 // You should have received a copy of the Lesser GNU General Public
    18 // License along with Hurricane. If not, see
    19 // <http://www.gnu.org/licenses/>.
    20 //
    21 // +-----------------------------------------------------------------+
    22 // | H U R R I C A N E |
    23 // | V L S I B a c k e n d D a t a - B a s e |
    24 // | |
    25 // | Author : Remy Escassut |
    26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    27 // | =============================================================== |
    28 // | C++ Header : "./hurricane/Commons.h" |
    29 // +-----------------------------------------------------------------+
    30 
    31 
    32 #pragma once
    33 #define HURRICANE_COMMONS_H
    34 
    35 #include <cstdio>
    36 #include <cassert>
    37 #include <cmath>
    38 #include <memory>
    39 #include <string>
    40 #include <list>
    41 #include <set>
    42 #include <map>
    43 #include <stack>
    44 #include <array>
    45 #include <vector>
    46 #include <iostream>
    47 #include <iomanip>
    48 #include <fstream>
    49 #include <sstream>
    50 
    51 
    52 // +-----------------------------------------------------------------+
    53 // | Macros Definition |
    54 // +-----------------------------------------------------------------+
    55 
    56 
    57 namespace Hurricane {
    58 
    59  using namespace std;
    60 
    61  class Slot;
    62 
    63 
    64  // +-------------------------------------------------------------+
    65  // | shared_ptr<> support for DBo |
    66  // +-------------------------------------------------------------+
    67 
    68 
    69  template<typename DboType>
    70  class DboDestroy {
    71  public:
    72  inline void operator() ( DboType* dbo ) { dbo->destroy(); }
    73  };
    74 
    75 
    76  template<typename DboType>
    77  class dbo_ptr : public std::shared_ptr<DboType> {
    78  public:
    79  dbo_ptr ( DboType* dbo ) : std::shared_ptr<DboType>(dbo,DboDestroy<DboType>()) { }
    80  };
    81 
    82 
    83 
    84 
    85  // +-------------------------------------------------------------+
    86  // | Miscellaneous Utilites |
    87  // +-------------------------------------------------------------+
    88 
    89 
    90  inline string _TName ( const string& s ) { return s; }
    91  inline string _PName ( const string& s ) { return "Hurricane::" + s; }
    92 
    93  template<class Type>
    94  inline Type abs ( const Type& value ) { return (value<0) ? -value : value; }
    95 
    96  string demangle ( const char* symbol );
    97  inline string demangle ( string symbol ) { return demangle(symbol.c_str()); }
    98  inline string demangle ( const type_info& info ) { return demangle(info.name()); }
    99 
    100  template<typename Element>
    101  inline void erase_element ( vector<Element*>& v, const Element* e )
    102  {
    103  for ( auto ielement = v.begin() ; ielement != v.end() ; ++ielement )
    104  if (*ielement == e) { v.erase( ielement ); return; }
    105  }
    106 
    107 
    108 #if DEPRECATED
    109 // For a complete explanation of this function, please look at :
    110 // http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
    111 
    112  inline int floatCompare ( float a, float b )
    113  {
    114  assert ( sizeof(float) == sizeof(int) );
    115 
    116  if ( a == b ) return 0;
    117  return *(int*)&a - *(int*)&b;
    118  }
    119 
    120  inline int floatDifference ( float a, float b, int threshold )
    121  {
    122  int difference = floatCompare(a,b);
    123  if ( abs(difference) < threshold ) return 0;
    124 
    125  return (difference<0) ? -1 : 1;
    126  }
    127 
    128 
    129  inline void floatRound ( float& value, float precision )
    130  {
    131  float rounded = roundf ( value*precision );
    132  value = rounded / precision;
    133  }
    134 #endif
    135 
    136  inline float roundfp ( float value, float precision=100.0 ) { return roundf(value*precision)/precision; }
    137 
    138 
    139  template<typename Type> inline void order ( Type& a, Type& b ) { if (a>b) std::swap(a,b); }
    140 
    141  template<typename Type> inline Type setInBound ( Type lower, Type upper, Type& value )
    142  {
    143  if (value < lower) value = lower;
    144  else if (value > upper) value = upper;
    145  return value;
    146  }
    147 
    148 
    149 } // End of Hurricane namespace.
    150 
    151 
    152 #include "hurricane/Record.h"
    153 
    154 
    155 // +-----------------------------------------------------------------+
    156 // | Functions for Inspector Support |
    157 // +-----------------------------------------------------------------+
    158 
    159 // Note 1: Theses are specialized templates for "getString<>()" & "getRecord<>()".
    160 // Note 2: we are outside the Hurricane namespace.
    161 // Note 3: thoses templates manage all POD & STL types.
    162 
    163 
    164 // Forward declaration of "getSlot<>()" template.
    165 
    166 template<typename Data> inline Hurricane::Slot* getSlot ( std::string name, Data );
    167 template<typename Data> inline Hurricane::Slot* getSlot ( std::string name, Data* );
    168 
    169 
    170 // -------------------------------------------------------------------
    171 // Inspector Support for : "POD types".
    172 
    173 // Default match.
    174 
    175 template<typename Data> inline std::string getString ( Data data )
    176 { return std::string("<type ")
    177  + Hurricane::demangle(typeid(data).name())
    178  + std::string(" unsupported by getString()>"); }
    179 
    180 // "const &" flavors.
    181 
    182 template<> inline std::string getString<const bool&> ( const bool& b )
    183 { return (b)?"True":"False" ; }
    184 
    185 template<> inline std::string getString<const int&> ( const int& i )
    186 { std::ostringstream os (""); os << i; return os.str(); }
    187 
    188 template<> inline std::string getString<const long&> ( const long& l )
    189 { std::ostringstream os (""); os << l; return os.str(); }
    190 
    191 template<> inline std::string getString<const unsigned int&> ( const unsigned int& u )
    192 { std::ostringstream os (""); os << u; return os.str(); }
    193 
    194 template<> inline std::string getString<const unsigned long&> ( const unsigned long& ul )
    195 { std::ostringstream os (""); os << ul; return os.str(); }
    196 
    197 template<> inline std::string getString<const unsigned long long&> ( const unsigned long long& ull )
    198 { std::ostringstream os (""); os << ull; return os.str(); }
    199 
    200 template<> inline std::string getString<const unsigned short int&> ( const unsigned short int& us )
    201 { std::ostringstream os (""); os << us; return os.str(); }
    202 
    203 template<> inline std::string getString<const float&> ( const float& f )
    204 { std::ostringstream os (""); os << f; return os.str(); }
    205 
    206 template<> inline std::string getString<const double&> ( const double& d )
    207 { std::ostringstream os; os << d; return os.str(); }
    208 
    209 template<> inline std::string getString<const std::string&> ( const std::string& s )
    210 { return s; }
    211 
    212 // "const *" flavors.
    213 
    214 template<> inline std::string getString<const bool*> ( const bool* b )
    215 { return (*b)?"True":"False" ; }
    216 
    217 template<> inline std::string getString<const char*> ( const char* c )
    218 { return c; }
    219 
    220 template<> inline std::string getString<const int*> ( const int* i )
    221 { std::ostringstream os (""); os << *i; return os.str(); }
    222 
    223 template<> inline std::string getString<const long*> ( const long* l )
    224 { std::ostringstream os (""); os << *l; return os.str(); }
    225 
    226 template<> inline std::string getString<const unsigned int*> ( const unsigned int* u )
    227 { std::ostringstream os (""); os << *u; return os.str(); }
    228 
    229 template<> inline std::string getString<const unsigned long*> ( const unsigned long* ul )
    230 { std::ostringstream os (""); os << *ul; return os.str(); }
    231 
    232 template<> inline std::string getString<const unsigned long long*> ( const unsigned long long* ull )
    233 { std::ostringstream os (""); os << *ull; return os.str(); }
    234 
    235 template<> inline std::string getString<const unsigned short int*> ( const unsigned short int* us )
    236 { std::ostringstream os (""); os << *us; return os.str(); }
    237 
    238 template<> inline std::string getString<const float*> ( const float* f )
    239 { std::ostringstream os (""); os << *f; return os.str(); }
    240 
    241 template<> inline std::string getString<const double*> ( const double* d )
    242 { std::ostringstream os; os << *d; return os.str(); }
    243 
    244 template<> inline std::string getString<const void*> ( const void* p )
    245 { std::ostringstream os ("0x"); os << std::hex << p; return os.str(); }
    246 
    247 template<> inline std::string getString<const std::string*> ( const std::string* s )
    248 { return *s; }
    249 
    250 
    251 // "*" flavors.
    252 
    253 template<> inline std::string getString<bool*> ( bool* b )
    254 { return (*b)?"True":"False" ; }
    255 
    256 template<> inline std::string getString<char*> ( char* c )
    257 { return c; }
    258 
    259 template<> inline std::string getString<int*> ( int* i )
    260 { std::ostringstream os (""); os << *i; return os.str(); }
    261 
    262 template<> inline std::string getString<long*> ( long* l )
    263 { std::ostringstream os (""); os << *l; return os.str(); }
    264 
    265 template<> inline std::string getString<unsigned int*> ( unsigned int* u )
    266 { std::ostringstream os (""); os << *u; return os.str(); }
    267 
    268 template<> inline std::string getString<unsigned long*> ( unsigned long* ul )
    269 { std::ostringstream os (""); os << *ul; return os.str(); }
    270 
    271 template<> inline std::string getString<unsigned long long*> ( unsigned long long* ull )
    272 { std::ostringstream os (""); os << *ull; return os.str(); }
    273 
    274 template<> inline std::string getString<unsigned short int*> ( unsigned short int* us )
    275 { std::ostringstream os (""); os << *us; return os.str(); }
    276 
    277 template<> inline std::string getString<float*> ( float* f )
    278 { std::ostringstream os (""); os << *f; return os.str(); }
    279 
    280 template<> inline std::string getString<double*> ( double* d )
    281 { std::ostringstream os; os << *d; return os.str(); }
    282 
    283 template<> inline std::string getString<void*> ( void* p )
    284 { std::ostringstream os ("0x"); os << std::hex << p; return os.str(); }
    285 
    286 template<> inline std::string getString<std::string*> ( std::string* s )
    287 { return *s; }
    288 
    289 
    290 // "by value" flavors.
    291 
    292 template<> inline std::string getString<bool> ( bool b )
    293 { return (b)?"True":"False" ; }
    294 
    295 template<> inline std::string getString<char> ( char c )
    296 { return std::string(1,c); }
    297 
    298 template<> inline std::string getString<int> ( int i )
    299 { std::ostringstream os (""); os << i; return os.str(); }
    300 
    301 template<> inline std::string getString<long> ( long l )
    302 { std::ostringstream os (""); os << l; return os.str(); }
    303 
    304 template<> inline std::string getString<unsigned int> ( unsigned int u )
    305 { std::ostringstream os (""); os << u; return os.str(); }
    306 
    307 template<> inline std::string getString<unsigned long> ( unsigned long ul )
    308 { std::ostringstream os (""); os << ul; return os.str(); }
    309 
    310 template<> inline std::string getString<unsigned long long> ( unsigned long long ull )
    311 { std::ostringstream os (""); os << ull; return os.str(); }
    312 
    313 template<> inline std::string getString<unsigned short int> ( unsigned short int us )
    314 { std::ostringstream os (""); os << us; return os.str(); }
    315 
    316 template<> inline std::string getString<float> ( float f )
    317 { std::ostringstream os (""); os << f; return os.str(); }
    318 
    319 template<> inline std::string getString<double> ( double d )
    320 { std::ostringstream os; os << d; return os.str(); }
    321 
    322 template<> inline std::string getString<std::string> ( std::string s )
    323 { return s; }
    324 
    325 
    326 template<typename Data> inline Hurricane::Record* getRecord ( Data data )
    327 { return NULL; }
    328 
    329 
    330 // -------------------------------------------------------------------
    331 // Inspector Support for : "[const] std::pair<T,U>&".
    332 
    333 template<typename T, typename U>
    334 inline std::string getString ( const std::pair<T,U>& p )
    335 {
    336  return "const std::pair<T,U>";
    337 }
    338 
    339 
    340 template<typename T, typename U>
    341 inline Hurricane::Record* getRecord ( const std::pair<T,U>& p )
    342 {
    343  Hurricane::Record* record = NULL;
    344  record = new Hurricane::Record ( "const std::pair<T,U>" );
    345  record->add( getSlot<const T>(std::string("first" ), &p.first ) );
    346  record->add( getSlot<const U>(std::string("second"), &p.second) );
    347  return record;
    348 }
    349 
    350 
    351 template<typename T, typename U>
    352 inline std::string getString ( std::pair<T,U>& p )
    353 {
    354  return "std::pair<T,U>";
    355 }
    356 
    357 
    358 template<typename T, typename U>
    359 inline Hurricane::Record* getRecord ( std::pair<T,U>& p )
    360 {
    361  Hurricane::Record* record = NULL;
    362  record = new Hurricane::Record ( "std::pair<T,U>" );
    363  record->add( getSlot<T>(std::string("first" ), &p.first ) );
    364  record->add( getSlot<U>(std::string("second"), &p.second) );
    365  return record;
    366 }
    367 
    368 
    369 // -------------------------------------------------------------------
    370 // Inspector Support for : "[const] std::array<Element>*".
    371 
    372 
    373 template<typename Element,size_t N>
    374 inline std::string getString ( std::array<Element,N>* v )
    375 {
    376  std::string name = "const std::array<Element,N>:";
    377  return name + getString<size_t>(v->size());
    378 }
    379 
    380 
    381 template<typename Element,size_t N>
    382 inline Hurricane::Record* getRecord ( std::array<Element,N>* v )
    383 {
    384  Hurricane::Record* record = NULL;
    385  if ( !v->empty() ) {
    386  record = new Hurricane::Record ( "std::array<Element,N>" );
    387  unsigned n = 0;
    388  typename std::array<Element,N>::iterator iterator = v->begin();
    389  while ( iterator != v->end() ) {
    390  record->add ( getSlot<Element>(getString(n++), *iterator) );
    391  ++iterator;
    392  }
    393  }
    394  return record;
    395 }
    396 
    397 
    398 template<typename Element,size_t N>
    399 inline std::string getString ( const std::array<Element,N>* v )
    400 {
    401  std::string name = "const std::array<Element,N>:";
    402  return name + getString<size_t>(v->size());
    403 }
    404 
    405 
    406 template<typename Element,size_t N>
    407 inline Hurricane::Record* getRecord ( const std::array<Element,N>* v )
    408 {
    409  Hurricane::Record* record = NULL;
    410  if ( !v->empty() ) {
    411  record = new Hurricane::Record ( "const std::array<Element,N>" );
    412  unsigned n = 0;
    413  typename std::array<Element,N>::const_iterator iterator = v->begin();
    414  while ( iterator != v->end() ) {
    415  record->add ( getSlot<const Element>(getString(n++), *iterator) );
    416  ++iterator;
    417  }
    418  }
    419  return record;
    420 }
    421 
    422 
    423 template<typename Element,size_t N>
    424 inline std::string getString ( std::array<Element,N>& v )
    425 {
    426  std::string name = "std::array<Element,N>&:";
    427  return name + getString<size_t>(v.size());
    428 }
    429 
    430 
    431 template<typename Element,size_t N>
    432 inline Hurricane::Record* getRecord ( std::array<Element,N>& v )
    433 {
    434  Hurricane::Record* record = NULL;
    435  if (not v.empty()) {
    436  record = new Hurricane::Record ( "std::array<Element,N>&" );
    437  unsigned n = 0;
    438  for ( auto element : v )
    439  record->add( getSlot<Element>(getString(n++), element) );
    440  }
    441  return record;
    442 }
    443 
    444 
    445 template<typename Element,size_t N>
    446 inline std::string getString ( const std::array<Element,N>& v )
    447 {
    448  std::string name = "const std::array<Element,N>&:";
    449  return name + getString<size_t>(v.size());
    450 }
    451 
    452 
    453 template<typename Element,size_t N>
    454 inline Hurricane::Record* getRecord ( const std::array<Element,N>& v )
    455 {
    456  Hurricane::Record* record = NULL;
    457  if (not v.empty()) {
    458  record = new Hurricane::Record ( "const std::array<Element,N>&" );
    459  unsigned n = 0;
    460  for ( auto element : v )
    461  record->add( getSlot<Element>(getString(n++), element) );
    462  }
    463  return record;
    464 }
    465 
    466 
    467 // -------------------------------------------------------------------
    468 // Inspector Support for : "std::vector<Element>*".
    469 
    470 
    471 template<typename Element>
    472 inline std::string getString ( std::vector<Element>* v )
    473 {
    474  std::string name = "std::vector<Element>*:";
    475  return name + getString<size_t>(v->size());
    476 }
    477 
    478 
    479 template<typename Element>
    480 inline Hurricane::Record* getRecord ( std::vector<Element>* v )
    481 {
    482  Hurricane::Record* record = NULL;
    483  if ( !v->empty() ) {
    484  record = new Hurricane::Record ( "std::vector<Element>*" );
    485  unsigned n = 0;
    486  typename std::vector<Element>::iterator iterator = v->begin();
    487  while ( iterator != v->end() ) {
    488  record->add ( getSlot<Element>(getString(n++), &(*iterator)) );
    489  ++iterator;
    490  }
    491  }
    492  return record;
    493 }
    494 
    495 
    496 // -------------------------------------------------------------------
    497 // Inspector Support for : "std::vector<Element*>*".
    498 
    499 
    500 template<typename Element>
    501 inline std::string getString ( std::vector<Element*>* v )
    502 {
    503  std::string name = "std::vector<Element*>*:";
    504  return name + getString<size_t>(v->size());
    505 }
    506 
    507 
    508 template<typename Element>
    509 inline Hurricane::Record* getRecord ( std::vector<Element*>* v )
    510 {
    511  Hurricane::Record* record = NULL;
    512  if ( !v->empty() ) {
    513  record = new Hurricane::Record ( "std::vector<Element*>*" );
    514  unsigned n = 0;
    515  typename std::vector<Element>::iterator iterator = v->begin();
    516  while ( iterator != v->end() ) {
    517  record->add ( getSlot<Element>(getString(n++), *iterator) );
    518  ++iterator;
    519  }
    520  }
    521  return record;
    522 }
    523 
    524 
    525 // -------------------------------------------------------------------
    526 // Inspector Support for : "const std::vector<Element>*".
    527 
    528 
    529 template<typename Element>
    530 inline std::string getString ( const std::vector<Element>* v )
    531 {
    532  std::string name = "const std::vector<Element>*:";
    533  return name + getString<size_t>(v->size());
    534 }
    535 
    536 
    537 template<typename Element>
    538 inline Hurricane::Record* getRecord ( const std::vector<Element>* v )
    539 {
    540  Hurricane::Record* record = NULL;
    541  if ( !v->empty() ) {
    542  record = new Hurricane::Record ( "const std::vector<Element>*" );
    543  unsigned n = 0;
    544  typename std::vector<Element>::const_iterator iterator = v->begin();
    545  while ( iterator != v->end() ) {
    546  record->add ( getSlot<const Element>(getString(n++), &(*iterator)) );
    547  ++iterator;
    548  }
    549  }
    550  return record;
    551 }
    552 
    553 
    554 // -------------------------------------------------------------------
    555 // Inspector Support for : "const std::vector<Element*>*".
    556 
    557 
    558 template<typename Element>
    559 inline std::string getString ( const std::vector<Element*>* v )
    560 {
    561  std::string name = "const std::vector<Element*>*:";
    562  return name + getString<size_t>(v->size());
    563 }
    564 
    565 
    566 template<typename Element>
    567 inline Hurricane::Record* getRecord ( const std::vector<Element*>* v )
    568 {
    569  Hurricane::Record* record = NULL;
    570  if (not v->empty()) {
    571  record = new Hurricane::Record ( "const std::vector<Element*>*" );
    572  size_t n = 0;
    573  typename std::vector<Element*>::const_iterator iterator = v->begin();
    574  while (iterator != v->end()) {
    575  record->add ( getSlot<const Element*>(getString(n++), *iterator) );
    576  ++iterator;
    577  }
    578  }
    579  return record;
    580 }
    581 
    582 
    583 // -------------------------------------------------------------------
    584 // Inspector Support for : "const std::list<Element>*".
    585 
    586 
    587 template<typename Element>
    588 inline std::string getString ( const std::list<Element>* l )
    589 {
    590  std::string name = "const std::list<Element>:";
    591  return name + getString<size_t>(l->size());
    592 }
    593 
    594 
    595 template<typename Element>
    596 inline Hurricane::Record* getRecord ( const std::list<Element>* l )
    597 {
    598  Hurricane::Record* record = NULL;
    599  if ( !l->empty() ) {
    600  record = new Hurricane::Record ( "const std::list<Element>" );
    601  unsigned n = 1;
    602  typename std::list<Element>::const_iterator iterator = l->begin();
    603  while ( iterator != l->end() ) {
    604  record->add ( getSlot<const Element>(getString(n++), *iterator) );
    605  ++iterator;
    606  }
    607  }
    608  return record;
    609 }
    610 
    611 
    612 template<typename Element>
    613 inline std::string getString ( std::list<Element>* l )
    614 {
    615  std::string name = "std::list<Element>:";
    616  return name + getString<size_t>(l->size());
    617 }
    618 
    619 
    620 template<typename Element>
    621 inline Hurricane::Record* getRecord ( std::list<Element>* l )
    622 {
    623  Hurricane::Record* record = NULL;
    624  if ( !l->empty() ) {
    625  record = new Hurricane::Record ( "std::list<Element>" );
    626  unsigned n = 1;
    627  typename std::list<Element>::iterator iterator = l->begin();
    628  while ( iterator != l->end() ) {
    629  record->add ( getSlot<Element>(getString(n++), *iterator) );
    630  ++iterator;
    631  }
    632  }
    633  return record;
    634 }
    635 
    636 
    637 // -------------------------------------------------------------------
    638 // Inspector Support for : "[const] std::map<Key,Element,Compare>*.
    639 
    640 
    641 template<typename Key, typename Element>
    642 inline std::string getString ( std::map<Key,Element>* m )
    643 {
    644  std::string name = "std::map<Element>:";
    645  return name + getString<size_t>(m->size());
    646 }
    647 
    648 
    649 template<typename Key, typename Element>
    650 inline Hurricane::Record* getRecord ( std::map<Key,Element>* m )
    651 {
    652  Hurricane::Record* record = NULL;
    653  if ( !m->empty() ) {
    654  record = new Hurricane::Record ( "std::map<Element>" );
    655  typename std::map<Key,Element>::iterator iterator = m->begin();
    656  while ( iterator != m->end() ) {
    657  record->add ( getSlot<Element>(getString(iterator->first), iterator->second) );
    658  ++iterator;
    659  }
    660  }
    661  return record;
    662 }
    663 
    664 
    665 template<typename Key, typename Element>
    666 inline std::string getString ( const std::map<Key,Element>* m )
    667 {
    668  std::string name = "const std::map<Element>:";
    669  return name + getString<size_t>(m->size());
    670 }
    671 
    672 
    673 template<typename Key, typename Element>
    674 inline Hurricane::Record* getRecord ( const std::map<Key,Element>* m )
    675 {
    676  Hurricane::Record* record = NULL;
    677  if ( !m->empty() ) {
    678  record = new Hurricane::Record ( "const std::map<Element>" );
    679  typename std::map<Key,Element>::const_iterator iterator = m->begin();
    680  while ( iterator != m->end() ) {
    681  record->add ( getSlot<const Element>(getString(iterator->first), iterator->second) );
    682  ++iterator;
    683  }
    684  }
    685  return record;
    686 }
    687 
    688 
    689 // -------------------------------------------------------------------
    690 // Inspector Support for : "[const] std::map<Key,Element,Compare>*.
    691 
    692 
    693 template<typename Key, typename Element, typename Compare>
    694 inline std::string getString ( std::map<Key,Element,Compare>* m )
    695 {
    696  std::string name = "std::map<Element>:";
    697  return name + getString<size_t>(m->size());
    698 }
    699 
    700 
    701 template<typename Key, typename Element, typename Compare>
    702 inline Hurricane::Record* getRecord ( std::map<Key,Element,Compare>* m )
    703 {
    704  Hurricane::Record* record = NULL;
    705  if ( !m->empty() ) {
    706  record = new Hurricane::Record ( "std::map<Element>" );
    707  typename std::map<Key,Element,Compare>::iterator iterator = m->begin();
    708  while ( iterator != m->end() ) {
    709  record->add ( getSlot<Element>(getString(iterator->first), iterator->second) );
    710  ++iterator;
    711  }
    712  }
    713  return record;
    714 }
    715 
    716 
    717 template<typename Key, typename Element, typename Compare>
    718 inline std::string getString ( const std::map<Key,Element,Compare>* m )
    719 {
    720  std::string name = "const std::map<Element>:";
    721  return name + getString<size_t>(m->size());
    722 }
    723 
    724 
    725 template<typename Key, typename Element, typename Compare>
    726 inline Hurricane::Record* getRecord ( const std::map<Key,Element,Compare>* m )
    727 {
    728  Hurricane::Record* record = NULL;
    729  if ( !m->empty() ) {
    730  record = new Hurricane::Record ( "const std::map<Element>" );
    731  typename std::map<Key,Element,Compare>::const_iterator iterator = m->begin();
    732  while ( iterator != m->end() ) {
    733  record->add ( getSlot<const Element>(getString(iterator->first), iterator->second) );
    734  ++iterator;
    735  }
    736  }
    737  return record;
    738 }
    739 
    740 
    741 // -------------------------------------------------------------------
    742 // Inspector Support for : "const std::multimap<Key,Element,Compare>*".
    743 
    744 
    745 template<typename Key, typename Element, typename Compare>
    746 inline std::string getString ( const std::multimap<Key,Element,Compare>* m )
    747 {
    748  std::string name = "const std::multimap<Element>:";
    749  return name + getString<size_t>(m->size());
    750 }
    751 
    752 
    753 template<typename Key, typename Element, typename Compare>
    754 inline Hurricane::Record* getRecord ( const std::multimap<Key,Element,Compare>* m )
    755 {
    756  Hurricane::Record* record = NULL;
    757  if ( !m->empty() ) {
    758  record = new Hurricane::Record ( "const std::multimap<Element>" );
    759  typename std::multimap<Key,Element,Compare>::const_iterator iterator = m->begin();
    760  while ( iterator != m->end() ) {
    761  record->add ( getSlot<const Element>(getString(iterator->first), iterator->second) );
    762  ++iterator;
    763  }
    764  }
    765  return record;
    766 }
    767 
    768 
    769 template<typename Key, typename Element, typename Compare>
    770 inline std::string getString ( std::multimap<Key,Element,Compare>* m )
    771 {
    772  std::string name = "std::multimap<Element>:";
    773  return name + getString<size_t>(m->size());
    774 }
    775 
    776 
    777 template<typename Key, typename Element, typename Compare>
    778 inline Hurricane::Record* getRecord ( std::multimap<Key,Element,Compare>* m )
    779 {
    780  Hurricane::Record* record = NULL;
    781  if ( !m->empty() ) {
    782  record = new Hurricane::Record ( "std::multimap<Element>" );
    783  typename std::multimap<Key,Element,Compare>::iterator iterator = m->begin();
    784  while ( iterator != m->end() ) {
    785  record->add ( getSlot<Element>(getString(iterator->first), iterator->second) );
    786  ++iterator;
    787  }
    788  }
    789  return record;
    790 }
    791 
    792 
    793 // -------------------------------------------------------------------
    794 // Inspector Support for : "[const] std::set<Element,Compare>*".
    795 
    796 
    797 template<typename Element, typename Compare>
    798 inline std::string getString ( const std::set<Element,Compare>* s )
    799 {
    800  std::string name = "const std::set<Element>:";
    801  return name + getString<size_t>(s->size());
    802 }
    803 
    804 
    805 template<typename Element, typename Compare>
    806 inline Hurricane::Record* getRecord ( const std::set<Element,Compare>* s )
    807 {
    808  Hurricane::Record* record = NULL;
    809  if ( !s->empty() ) {
    810  record = new Hurricane::Record ( "const std::set<Element>" );
    811  unsigned n = 1;
    812  typename std::set<Element,Compare>::const_iterator iterator = s->begin();
    813  while ( iterator != s->end() ) {
    814  record->add ( getSlot<const Element>(getString(n++), *iterator) );
    815  ++iterator;
    816  }
    817  }
    818  return record;
    819 }
    820 
    821 
    822 template< typename Element, typename Compare, typename Allocator >
    823 inline std::string getString ( std::set<Element,Compare,Allocator>* s )
    824 {
    825  std::string name = "std::set<Element>:";
    826  return name + getString<size_t>(s->size());
    827 }
    828 
    829 
    830 template< typename Element, typename Compare, typename Allocator >
    831 inline Hurricane::Record* getRecord ( std::set<Element,Compare,Allocator>* s )
    832 {
    833  Hurricane::Record* record = NULL;
    834  if ( !s->empty() ) {
    835  record = new Hurricane::Record ( "std::set<Element>" );
    836  unsigned n = 1;
    837  typename std::set<Element,Compare,Allocator>::iterator iterator = s->begin();
    838  while ( iterator != s->end() ) {
    839  record->add ( getSlot<Element>(getString(n++), *iterator) );
    840  ++iterator;
    841  }
    842  }
    843  return record;
    844 }
    845 
    846 // -------------------------------------------------------------------
    847 // Inspector Support for : "[const] std::set<Element,Compare>&".
    848 
    849 
    850 template<typename Element, typename Compare>
    851 inline std::string getString ( const std::set<Element,Compare>& s )
    852 {
    853  std::string name = "const std::set<Element>:";
    854  return name + getString<size_t>(s.size());
    855 }
    856 
    857 
    858 template<typename Element, typename Compare>
    859 inline Hurricane::Record* getRecord ( const std::set<Element,Compare>& s )
    860 {
    861  Hurricane::Record* record = NULL;
    862  if ( !s.empty() ) {
    863  record = new Hurricane::Record ( "const std::set<Element>" );
    864  unsigned n = 1;
    865  typename std::set<Element,Compare>::const_iterator iterator = s.begin();
    866  while ( iterator != s.end() ) {
    867  record->add ( getSlot<Element>(getString(n++), *iterator) );
    868  ++iterator;
    869  }
    870  }
    871  return record;
    872 }
    873 
    874 // -------------------------------------------------------------------
    875 // Inspector Support for : "const std::multiset<Element,Compare>*".
    876 
    877 
    878 template<typename Element, typename Compare>
    879 inline std::string getString ( const std::multiset<Element,Compare>* s )
    880 {
    881  std::string name = "std::multiset<Element>:";
    882  return name + getString<size_t>(s->size());
    883 }
    884 
    885 
    886 template<typename Element, typename Compare>
    887 inline Hurricane::Record* getRecord ( const std::multiset<Element,Compare>* s )
    888 {
    889  Hurricane::Record* record = NULL;
    890  if ( !s->empty() ) {
    891  record = new Hurricane::Record ( "std::multiset<Element>" );
    892  unsigned n = 1;
    893  typename std::multiset<Element,Compare>::const_iterator iterator = s->begin();
    894  while ( iterator != s->end() ) {
    895  record->add ( getSlot<Element>(getString(n++), *iterator) );
    896  ++iterator;
    897  }
    898  }
    899  return record;
    900 }
    901 
    902 
    903 # define GETSTRING_POINTER_SUPPORT(Data) \
    904  template<> inline std::string getString<Data*>( Data* data ) \
    905  { \
    906  if (!data) return "NULL [" #Data "]"; \
    907  return data->_getString(); \
    908  } \
    909  \
    910  template<> inline std::string getString<const Data*>( const Data* data ) \
    911  { if (!data) return "NULL [const " #Data "]"; return data->_getString(); }
    912 
    913 
    914 # define IOSTREAM_POINTER_SUPPORT(Data) \
    915  inline std::ostream& operator<< ( std::ostream& o, Data* d ) \
    916  { \
    917  if (!d) return o << "NULL [" #Data "]"; \
    918  return o << "&" << getString<const Data*>(d); \
    919  } \
    920  inline std::ostream& operator<< ( std::ostream& o, const Data* d ) \
    921  { \
    922  if (!d) return o << "NULL [const " #Data "]"; \
    923  return o << "&" << getString<const Data*>(d); \
    924  } \
    925 
    926 
    927 # define GETRECORD_POINTER_SUPPORT(Data) \
    928  template<> inline Hurricane::Record* getRecord<Data*>( Data* data ) \
    929  { if (!data) return NULL; return data->_getRecord(); } \
    930  \
    931  template<> inline Hurricane::Record* getRecord<const Data*>( const Data* data ) \
    932  { if (!data) return NULL; return data->_getRecord(); }
    933 
    934 
    935 # define GETSTRING_REFERENCE_SUPPORT(Data) \
    936  template<> inline std::string getString<Data&>( Data& data ) \
    937  { return data._getString(); } \
    938  \
    939  template<> inline std::string getString<const Data&>( const Data& data ) \
    940  { return data._getString(); }
    941 
    942 
    943 # define IOSTREAM_REFERENCE_SUPPORT(Data) \
    944  inline std::ostream& operator<< ( std::ostream& o, Data& d ) \
    945  { return o << getString<Data&>(d); } \
    946  \
    947  inline std::ostream& operator<< ( std::ostream& o, const Data& d ) \
    948  { return o << getString<const Data&>(d); } \
    949  \
    950 
    951 # define GETRECORD_REFERENCE_SUPPORT(Data) \
    952  template<> inline Hurricane::Record* getRecord<Data&>( Data& data ) \
    953  { return data._getRecord(); } \
    954  \
    955  template<> inline Hurricane::Record* getRecord<const Data&>( const Data& data ) \
    956  { return data._getRecord(); }
    957 
    958 
    959 # define GETSTRING_VALUE_SUPPORT(Data) \
    960  template<> inline std::string getString<Data>( Data data ) \
    961  { return data._getString(); }
    962 
    963 
    964 # define IOSTREAM_VALUE_SUPPORT(Data) \
    965  inline std::ostream& operator<< ( std::ostream& o, Data d ) \
    966  { return o << getString<Data>(d); }
    967 
    968 
    969 # define GETRECORD_VALUE_SUPPORT(Data) \
    970  template<> inline Hurricane::Record* getRecord<Data>( Data data ) \
    971  { return data._getRecord(); }
    972 
    973 
    974 # define INSPECTOR_P_SUPPORT(Data) \
    975  GETRECORD_POINTER_SUPPORT(Data) \
    976  GETSTRING_POINTER_SUPPORT(Data) \
    977  IOSTREAM_POINTER_SUPPORT(Data)
    978 
    979 
    980 # define INSPECTOR_R_SUPPORT(Data) \
    981  GETRECORD_REFERENCE_SUPPORT(Data) \
    982  GETSTRING_REFERENCE_SUPPORT(Data) \
    983  IOSTREAM_REFERENCE_SUPPORT(Data)
    984 
    985 
    986 # define INSPECTOR_PR_SUPPORT(Data) \
    987  GETSTRING_POINTER_SUPPORT(Data) \
    988  GETSTRING_REFERENCE_SUPPORT(Data) \
    989  GETSTRING_VALUE_SUPPORT(Data) \
    990  IOSTREAM_POINTER_SUPPORT(Data) \
    991  IOSTREAM_REFERENCE_SUPPORT(Data) \
    992  GETRECORD_POINTER_SUPPORT(Data) \
    993  GETRECORD_REFERENCE_SUPPORT(Data)
    994 
    995 
    996 #include "hurricane/Tabulation.h"
    997 
    998 
    999 // -------------------------------------------------------------------
    1000 // Class : "::cdebug()".
    1001 //
    1002 // Wrapper around the STL ostream which to print debugging messages.
    1003 
    1004 class tstream : public std::ostream {
    1005  public:
    1006  inline int getMinLevel () const;
    1007  inline int getMaxLevel () const;
    1008  inline int setMinLevel ( int );
    1009  inline int setMaxLevel ( int );
    1010  inline int getLevel () const;
    1011  inline int setLevel ( int );
    1012  inline bool enabled () const;
    1013  inline bool enabled ( int ) const;
    1014  inline tstream& log ( int level, int count=0 );
    1015  inline tstream& tabw ( int level, int count );
    1016  inline tstream ( std::ostream & );
    1017  inline tstream& put ( char c );
    1018  inline tstream& flush ();
    1019  private:
    1020  inline tstream& _tab ();
    1021  inline tstream& _tabw ( int count );
    1022  public:
    1023  // Overload for manipulators.
    1024  inline tstream& operator<< ( std::ostream& (*pf)(std::ostream &) );
    1025  private:
    1026  int _minLevel;
    1027  int _maxLevel;
    1028  int _level;
    1029  Hurricane::Tabulation _tabulation;
    1030 };
    1031 
    1032 
    1033 inline tstream::tstream ( std::ostream& s )
    1034  : std::ostream(s.rdbuf())
    1035  , _minLevel (100000)
    1036  , _maxLevel (0)
    1037  , _level (0)
    1038  , _tabulation(" ")
    1039 { }
    1040 
    1041 inline int tstream::getMinLevel () const { return _minLevel; }
    1042 inline int tstream::getMaxLevel () const { return _maxLevel; }
    1043 inline int tstream::setMinLevel ( int l ) { int pl=_minLevel; _minLevel=l; return pl; }
    1044 inline int tstream::setMaxLevel ( int l ) { int pl=_maxLevel; _maxLevel=l; return pl; }
    1045 inline int tstream::getLevel () const { return _level; }
    1046 inline int tstream::setLevel ( int l ) { int pl=_level; _level=l; return pl; }
    1047 inline bool tstream::enabled () const { return (_level >= _minLevel) and (_level < _maxLevel); }
    1048 inline bool tstream::enabled ( int l ) const { return (l >= _minLevel) and (l < _maxLevel); }
    1049 inline tstream& tstream::tabw ( int level, int count ) { setLevel(level); return _tabw(count); }
    1050 inline tstream& tstream::put ( char c ) { if (enabled()) static_cast<std::ostream*>(this)->put(c); return *this; }
    1051 inline tstream& tstream::flush () { if (enabled()) static_cast<std::ostream*>(this)->flush(); return *this; }
    1052 inline tstream& tstream::operator<< ( std::ostream& (*pf)(std::ostream&) ) { if (enabled()) (*pf)(*this); return *this; }
    1053 
    1054 
    1055 inline tstream& tstream::_tab () { if (enabled()) (*this) << _tabulation; return *this; }
    1056 inline tstream& tstream::_tabw ( int count )
    1057 {
    1058  if (enabled()) {
    1059  if (count > 0) while(count--) _tabulation++;
    1060  else if (count < 0) while(count++) _tabulation--;
    1061  }
    1062  return *this;
    1063 }
    1064 
    1065 inline tstream& tstream::log ( int level, int count )
    1066 { setLevel(level); _tab(); return _tabw(count); }
    1067 
    1068 // For STL Types.
    1069 inline tstream& operator<< ( tstream& o, const std::string s )
    1070 { if (o.enabled()) { static_cast<std::ostream&>(o) << s; } return o; };
    1071 
    1072 // For POD Types.
    1073 // template<typename T>
    1074 // inline tstream& operator<< ( tstream& o, T& t )
    1075 // { if (o.enabled()) { static_cast<std::ostream&>(o) << getString<T&>(t); } return o; };
    1076 
    1077 template<typename T>
    1078 inline tstream& operator<< ( tstream& o, T* t )
    1079 { if (o.enabled()) { static_cast<std::ostream&>(o) << getString<T*>(t); } return o; };
    1080 
    1081 // template<typename T>
    1082 // inline tstream& operator<< ( tstream& o, const T& t )
    1083 // { if (o.enabled()) { static_cast<std::ostream&>(o) << getString<const T&>(t); } return o; };
    1084 
    1085 template<typename T>
    1086 inline tstream& operator<< ( tstream& o, T t )
    1087 { if (o.enabled()) { static_cast<std::ostream&>(o) << getString<T>(t); } return o; };
    1088 
    1089 template<typename T>
    1090 inline tstream& operator<< ( tstream& o, const T* t )
    1091 { if (o.enabled()) { static_cast<std::ostream&>(o) << getString<const T*>(t); } return o; };
    1092 
    1093 template<>
    1094 inline tstream& operator<< ( tstream& o, std::ios_base& (*pf)(std::ios_base&) )
    1095 { if (o.enabled()) { static_cast<std::ostream&>(o) << pf; } return o; };
    1096 
    1097 struct _Tsetw { int n_; };
    1098 inline _Tsetw tsetw ( int n ) { return { n }; }
    1099 
    1100 struct _Tsetf { int n_; };
    1101 inline _Tsetf tsetf ( int n ) { return { n }; }
    1102 
    1103 template<>
    1104 inline tstream& operator<< ( tstream& o, _Tsetw manip )
    1105 { if (o.enabled()) { static_cast<std::ostream&>(o) << std::setw(manip.n_); } return o; }
    1106 
    1107 extern tstream cdebug;
    1108 
    1109 
    1110 #define cdebug_log(level,indent) if (cdebug.enabled(level)) cdebug.log(level,indent)
    1111 #define cdebug_tabw(level,indent) cdebug.tabw(level,indent)
    1112 
    1113 
    1114 // x-----------------------------------------------------------------x
    1115 // | Classes Neededs in All Hurricane Modules |
    1116 // x-----------------------------------------------------------------x
    1117 
    1118 #include "hurricane/Slot.h"
    1119 #include "hurricane/Initializer.h"
    1120 #include "hurricane/JsonWriter.h"
    1121 #include "hurricane/JsonObject.h"
    int getLevel() const
    Definition: Commons.h:1045
    +
    1 // -*- C++ -*-
    2 //
    3 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    4 //
    5 // This file is part of Hurricane.
    6 //
    7 // Hurricane is free software: you can redistribute it and/or modify
    8 // it under the terms of the GNU Lesser General Public License as
    9 // published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but
    13 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    14 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    15 // General Public License for more details.
    16 //
    17 // You should have received a copy of the Lesser GNU General Public
    18 // License along with Hurricane. If not, see
    19 // <http://www.gnu.org/licenses/>.
    20 //
    21 // +-----------------------------------------------------------------+
    22 // | H U R R I C A N E |
    23 // | V L S I B a c k e n d D a t a - B a s e |
    24 // | |
    25 // | Author : Remy Escassut |
    26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    27 // | =============================================================== |
    28 // | C++ Header : "./hurricane/Commons.h" |
    29 // +-----------------------------------------------------------------+
    30 
    31 
    32 #pragma once
    33 #define HURRICANE_COMMONS_H
    34 
    35 #include <cstdio>
    36 #include <cassert>
    37 #include <cmath>
    38 #include <memory>
    39 #include <string>
    40 #include <list>
    41 #include <set>
    42 #include <map>
    43 #include <stack>
    44 #include <array>
    45 #include <vector>
    46 #include <iostream>
    47 #include <iomanip>
    48 #include <fstream>
    49 #include <sstream>
    50 
    51 
    52 // +-----------------------------------------------------------------+
    53 // | Macros Definition |
    54 // +-----------------------------------------------------------------+
    55 
    56 
    57 namespace Hurricane {
    58 
    59  using namespace std;
    60 
    61  class Slot;
    62 
    63 
    64  // +-------------------------------------------------------------+
    65  // | shared_ptr<> support for DBo |
    66  // +-------------------------------------------------------------+
    67 
    68 
    69  template<typename DboType>
    70  class DboDestroy {
    71  public:
    72  inline void operator() ( DboType* dbo ) { dbo->destroy(); }
    73  };
    74 
    75 
    76  template<typename DboType>
    77  class dbo_ptr : public std::shared_ptr<DboType> {
    78  public:
    79  dbo_ptr ( DboType* dbo ) : std::shared_ptr<DboType>(dbo,DboDestroy<DboType>()) { }
    80  };
    81 
    82 
    83 
    84 
    85  // +-------------------------------------------------------------+
    86  // | Miscellaneous Utilites |
    87  // +-------------------------------------------------------------+
    88 
    89 
    90  inline string _TName ( const string& s ) { return s; }
    91  inline string _PName ( const string& s ) { return "Hurricane::" + s; }
    92 
    93  template<class Type>
    94  inline Type abs ( const Type& value ) { return (value<0) ? -value : value; }
    95 
    96  string demangle ( const char* symbol );
    97  inline string demangle ( string symbol ) { return demangle(symbol.c_str()); }
    98  inline string demangle ( const type_info& info ) { return demangle(info.name()); }
    99 
    100  template<typename Element>
    101  inline void erase_element ( vector<Element*>& v, const Element* e )
    102  {
    103  for ( auto ielement = v.begin() ; ielement != v.end() ; ++ielement )
    104  if (*ielement == e) { v.erase( ielement ); return; }
    105  }
    106 
    107 
    108 #if DEPRECATED
    109 // For a complete explanation of this function, please look at :
    110 // http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
    111 
    112  inline int floatCompare ( float a, float b )
    113  {
    114  assert ( sizeof(float) == sizeof(int) );
    115 
    116  if ( a == b ) return 0;
    117  return *(int*)&a - *(int*)&b;
    118  }
    119 
    120  inline int floatDifference ( float a, float b, int threshold )
    121  {
    122  int difference = floatCompare(a,b);
    123  if ( abs(difference) < threshold ) return 0;
    124 
    125  return (difference<0) ? -1 : 1;
    126  }
    127 
    128 
    129  inline void floatRound ( float& value, float precision )
    130  {
    131  float rounded = roundf ( value*precision );
    132  value = rounded / precision;
    133  }
    134 #endif
    135 
    136  inline float roundfp ( float value, float precision=100.0 ) { return roundf(value*precision)/precision; }
    137 
    138 
    139  template<typename Type> inline void order ( Type& a, Type& b ) { if (a>b) std::swap(a,b); }
    140 
    141  template<typename Type> inline Type setInBound ( Type lower, Type upper, Type& value )
    142  {
    143  if (value < lower) value = lower;
    144  else if (value > upper) value = upper;
    145  return value;
    146  }
    147 
    148 
    149 } // End of Hurricane namespace.
    150 
    151 
    152 #include "hurricane/Record.h"
    153 
    154 
    155 // +-----------------------------------------------------------------+
    156 // | Functions for Inspector Support |
    157 // +-----------------------------------------------------------------+
    158 
    159 // Note 1: Theses are specialized templates for "getString<>()" & "getRecord<>()".
    160 // Note 2: we are outside the Hurricane namespace.
    161 // Note 3: thoses templates manage all POD & STL types.
    162 
    163 
    164 template<typename Data> inline Hurricane::Slot* getSlot ( std::string name, Data );
    165 
    166 
    167 // -------------------------------------------------------------------
    168 // Inspector Support for : "POD types".
    169 
    170 // Default match.
    171 
    172 template<typename Data> inline std::string getString ( Data data )
    173 { return std::string("<type ")
    174  + Hurricane::demangle(typeid(data).name())
    175  + std::string(" unsupported by getString()>"); }
    176 
    177 // "const &" flavors.
    178 
    179 template<> inline std::string getString<const bool&> ( const bool& b )
    180 { return (b)?"True":"False" ; }
    181 
    182 template<> inline std::string getString<const int&> ( const int& i )
    183 { std::ostringstream os (""); os << i; return os.str(); }
    184 
    185 template<> inline std::string getString<const long&> ( const long& l )
    186 { std::ostringstream os (""); os << l; return os.str(); }
    187 
    188 template<> inline std::string getString<const unsigned int&> ( const unsigned int& u )
    189 { std::ostringstream os (""); os << u; return os.str(); }
    190 
    191 template<> inline std::string getString<const unsigned long&> ( const unsigned long& ul )
    192 { std::ostringstream os (""); os << ul; return os.str(); }
    193 
    194 template<> inline std::string getString<const unsigned long long&> ( const unsigned long long& ull )
    195 { std::ostringstream os (""); os << ull; return os.str(); }
    196 
    197 template<> inline std::string getString<const unsigned short int&> ( const unsigned short int& us )
    198 { std::ostringstream os (""); os << us; return os.str(); }
    199 
    200 template<> inline std::string getString<const float&> ( const float& f )
    201 { std::ostringstream os (""); os << f; return os.str(); }
    202 
    203 template<> inline std::string getString<const double&> ( const double& d )
    204 { std::ostringstream os; os << d; return os.str(); }
    205 
    206 template<> inline std::string getString<const std::string&> ( const std::string& s )
    207 { return s; }
    208 
    209 // "const *" flavors.
    210 
    211 template<> inline std::string getString<const bool*> ( const bool* b )
    212 { return (*b)?"True":"False" ; }
    213 
    214 template<> inline std::string getString<const char*> ( const char* c )
    215 { return c; }
    216 
    217 template<> inline std::string getString<const int*> ( const int* i )
    218 { std::ostringstream os (""); os << *i; return os.str(); }
    219 
    220 template<> inline std::string getString<const long*> ( const long* l )
    221 { std::ostringstream os (""); os << *l; return os.str(); }
    222 
    223 template<> inline std::string getString<const unsigned int*> ( const unsigned int* u )
    224 { std::ostringstream os (""); os << *u; return os.str(); }
    225 
    226 template<> inline std::string getString<const unsigned long*> ( const unsigned long* ul )
    227 { std::ostringstream os (""); os << *ul; return os.str(); }
    228 
    229 template<> inline std::string getString<const unsigned long long*> ( const unsigned long long* ull )
    230 { std::ostringstream os (""); os << *ull; return os.str(); }
    231 
    232 template<> inline std::string getString<const unsigned short int*> ( const unsigned short int* us )
    233 { std::ostringstream os (""); os << *us; return os.str(); }
    234 
    235 template<> inline std::string getString<const float*> ( const float* f )
    236 { std::ostringstream os (""); os << *f; return os.str(); }
    237 
    238 template<> inline std::string getString<const double*> ( const double* d )
    239 { std::ostringstream os; os << *d; return os.str(); }
    240 
    241 template<> inline std::string getString<const void*> ( const void* p )
    242 { std::ostringstream os ("0x"); os << std::hex << p; return os.str(); }
    243 
    244 template<> inline std::string getString<const std::string*> ( const std::string* s )
    245 { return *s; }
    246 
    247 
    248 // "*" flavors.
    249 
    250 template<> inline std::string getString<bool*> ( bool* b )
    251 { return (*b)?"True":"False" ; }
    252 
    253 template<> inline std::string getString<char*> ( char* c )
    254 { return c; }
    255 
    256 template<> inline std::string getString<int*> ( int* i )
    257 { std::ostringstream os (""); os << *i; return os.str(); }
    258 
    259 template<> inline std::string getString<long*> ( long* l )
    260 { std::ostringstream os (""); os << *l; return os.str(); }
    261 
    262 template<> inline std::string getString<unsigned int*> ( unsigned int* u )
    263 { std::ostringstream os (""); os << *u; return os.str(); }
    264 
    265 template<> inline std::string getString<unsigned long*> ( unsigned long* ul )
    266 { std::ostringstream os (""); os << *ul; return os.str(); }
    267 
    268 template<> inline std::string getString<unsigned long long*> ( unsigned long long* ull )
    269 { std::ostringstream os (""); os << *ull; return os.str(); }
    270 
    271 template<> inline std::string getString<unsigned short int*> ( unsigned short int* us )
    272 { std::ostringstream os (""); os << *us; return os.str(); }
    273 
    274 template<> inline std::string getString<float*> ( float* f )
    275 { std::ostringstream os (""); os << *f; return os.str(); }
    276 
    277 template<> inline std::string getString<double*> ( double* d )
    278 { std::ostringstream os; os << *d; return os.str(); }
    279 
    280 template<> inline std::string getString<void*> ( void* p )
    281 { std::ostringstream os ("0x"); os << std::hex << p; return os.str(); }
    282 
    283 template<> inline std::string getString<std::string*> ( std::string* s )
    284 { return *s; }
    285 
    286 
    287 // "by value" flavors.
    288 
    289 template<> inline std::string getString<bool> ( bool b )
    290 { return (b)?"True":"False" ; }
    291 
    292 template<> inline std::string getString<char> ( char c )
    293 { return std::string(1,c); }
    294 
    295 template<> inline std::string getString<int> ( int i )
    296 { std::ostringstream os (""); os << i; return os.str(); }
    297 
    298 template<> inline std::string getString<long> ( long l )
    299 { std::ostringstream os (""); os << l; return os.str(); }
    300 
    301 template<> inline std::string getString<unsigned int> ( unsigned int u )
    302 { std::ostringstream os (""); os << u; return os.str(); }
    303 
    304 template<> inline std::string getString<unsigned long> ( unsigned long ul )
    305 { std::ostringstream os (""); os << ul; return os.str(); }
    306 
    307 template<> inline std::string getString<unsigned long long> ( unsigned long long ull )
    308 { std::ostringstream os (""); os << ull; return os.str(); }
    309 
    310 template<> inline std::string getString<unsigned short int> ( unsigned short int us )
    311 { std::ostringstream os (""); os << us; return os.str(); }
    312 
    313 template<> inline std::string getString<float> ( float f )
    314 { std::ostringstream os (""); os << f; return os.str(); }
    315 
    316 template<> inline std::string getString<double> ( double d )
    317 { std::ostringstream os; os << d; return os.str(); }
    318 
    319 template<> inline std::string getString<std::string> ( std::string s )
    320 { return s; }
    321 
    322 
    323 template<typename Data> inline Hurricane::Record* getRecord ( Data data )
    324 {
    325 //std::cerr << "::getRecord(Data) Data=" << Hurricane::demangle(typeid(data).name()) << std::endl;
    326  return NULL;
    327 }
    328 
    329 
    330 // -------------------------------------------------------------------
    331 // Inspector Support for : "[const] std::pair<T,U>&".
    332 
    333 template<typename T, typename U>
    334 inline std::string getString ( const std::pair<T,U>& p )
    335 {
    336  return "const std::pair<T,U>";
    337 }
    338 
    339 
    340 template<typename T, typename U>
    341 inline Hurricane::Record* getRecord ( const std::pair<T,U>& p )
    342 {
    343  Hurricane::Record* record = NULL;
    344  record = new Hurricane::Record ( "const std::pair<T,U>" );
    345  record->add( getSlot<const T>(std::string("first" ), &p.first ) );
    346  record->add( getSlot<const U>(std::string("second"), &p.second) );
    347  return record;
    348 }
    349 
    350 
    351 template<typename T, typename U>
    352 inline std::string getString ( std::pair<T,U>& p )
    353 {
    354  return "std::pair<T,U>";
    355 }
    356 
    357 
    358 template<typename T, typename U>
    359 inline Hurricane::Record* getRecord ( std::pair<T,U>& p )
    360 {
    361  Hurricane::Record* record = NULL;
    362  record = new Hurricane::Record ( "std::pair<T,U>" );
    363  record->add( getSlot<T>(std::string("first" ), &p.first ) );
    364  record->add( getSlot<U>(std::string("second"), &p.second) );
    365  return record;
    366 }
    367 
    368 
    369 // -------------------------------------------------------------------
    370 // Inspector Support for : "[const] std::array<Element>*".
    371 
    372 
    373 template<typename Element,size_t N>
    374 inline std::string getString ( std::array<Element,N>* v )
    375 {
    376  std::string name = "const std::array<Element,N>:";
    377  return name + getString<size_t>(v->size());
    378 }
    379 
    380 
    381 template<typename Element,size_t N>
    382 inline Hurricane::Record* getRecord ( std::array<Element,N>* v )
    383 {
    384  Hurricane::Record* record = NULL;
    385  if ( !v->empty() ) {
    386  record = new Hurricane::Record ( "std::array<Element,N>" );
    387  unsigned n = 0;
    388  typename std::array<Element,N>::iterator iterator = v->begin();
    389  while ( iterator != v->end() ) {
    390  record->add ( getSlot<Element>(getString(n++), *iterator) );
    391  ++iterator;
    392  }
    393  }
    394  return record;
    395 }
    396 
    397 
    398 template<typename Element,size_t N>
    399 inline std::string getString ( const std::array<Element,N>* v )
    400 {
    401  std::string name = "const std::array<Element,N>:";
    402  return name + getString<size_t>(v->size());
    403 }
    404 
    405 
    406 template<typename Element,size_t N>
    407 inline Hurricane::Record* getRecord ( const std::array<Element,N>* v )
    408 {
    409  Hurricane::Record* record = NULL;
    410  if ( !v->empty() ) {
    411  record = new Hurricane::Record ( "const std::array<Element,N>" );
    412  unsigned n = 0;
    413  typename std::array<Element,N>::const_iterator iterator = v->begin();
    414  while ( iterator != v->end() ) {
    415  record->add ( getSlot<const Element>(getString(n++), *iterator) );
    416  ++iterator;
    417  }
    418  }
    419  return record;
    420 }
    421 
    422 
    423 template<typename Element,size_t N>
    424 inline std::string getString ( std::array<Element,N>& v )
    425 {
    426  std::string name = "std::array<Element,N>&:";
    427  return name + getString<size_t>(v.size());
    428 }
    429 
    430 
    431 template<typename Element,size_t N>
    432 inline Hurricane::Record* getRecord ( std::array<Element,N>& v )
    433 {
    434  Hurricane::Record* record = NULL;
    435  if (not v.empty()) {
    436  record = new Hurricane::Record ( "std::array<Element,N>&" );
    437  unsigned n = 0;
    438  for ( auto element : v )
    439  record->add( getSlot<Element>(getString(n++), element) );
    440  }
    441  return record;
    442 }
    443 
    444 
    445 template<typename Element,size_t N>
    446 inline std::string getString ( const std::array<Element,N>& v )
    447 {
    448  std::string name = "const std::array<Element,N>&:";
    449  return name + getString<size_t>(v.size());
    450 }
    451 
    452 
    453 template<typename Element,size_t N>
    454 inline Hurricane::Record* getRecord ( const std::array<Element,N>& v )
    455 {
    456  Hurricane::Record* record = NULL;
    457  if (not v.empty()) {
    458  record = new Hurricane::Record ( "const std::array<Element,N>&" );
    459  unsigned n = 0;
    460  for ( auto element : v )
    461  record->add( getSlot<Element>(getString(n++), element) );
    462  }
    463  return record;
    464 }
    465 
    466 
    467 // -------------------------------------------------------------------
    468 // Inspector Support for : "std::vector<Element>*".
    469 
    470 
    471 template<typename Element>
    472 inline std::string getString ( std::vector<Element>* v )
    473 {
    474  std::string name = "std::vector<Element>*:";
    475  return name + getString<size_t>(v->size());
    476 }
    477 
    478 
    479 template<typename Element>
    480 inline Hurricane::Record* getRecord ( std::vector<Element>* v )
    481 {
    482  Hurricane::Record* record = NULL;
    483  if ( !v->empty() ) {
    484  record = new Hurricane::Record ( "std::vector<Element>*" );
    485  unsigned n = 0;
    486  typename std::vector<Element>::iterator iterator = v->begin();
    487  while ( iterator != v->end() ) {
    488  record->add ( getSlot<const Element*>(getString(n++), &(*iterator)) );
    489  ++iterator;
    490  }
    491  }
    492  return record;
    493 }
    494 
    495 
    496 // -------------------------------------------------------------------
    497 // Inspector Support for : "std::vector<Element*>*".
    498 
    499 
    500 template<typename Element>
    501 inline std::string getString ( std::vector<Element*>* v )
    502 {
    503  std::string name = "std::vector<Element*>*:";
    504  return name + getString<size_t>(v->size());
    505 }
    506 
    507 
    508 template<typename Element>
    509 inline Hurricane::Record* getRecord ( std::vector<Element*>* v )
    510 {
    511  Hurricane::Record* record = NULL;
    512  if ( !v->empty() ) {
    513  record = new Hurricane::Record ( "std::vector<Element*>*" );
    514  unsigned n = 0;
    515  typename std::vector<Element*>::iterator iterator = v->begin();
    516  while ( iterator != v->end() ) {
    517  record->add ( getSlot<Element*>(getString(n++), *iterator) );
    518  ++iterator;
    519  }
    520  }
    521  return record;
    522 }
    523 
    524 
    525 // -------------------------------------------------------------------
    526 // Inspector Support for : "const std::vector<Element>*".
    527 
    528 
    529 template<typename Element>
    530 inline std::string getString ( const std::vector<Element>* v )
    531 {
    532  std::string name = "const std::vector<Element>*:";
    533  return name + getString<size_t>(v->size());
    534 }
    535 
    536 
    537 template<typename Element>
    538 inline Hurricane::Record* getRecord ( const std::vector<Element>* v )
    539 {
    540  Hurricane::Record* record = NULL;
    541  if ( !v->empty() ) {
    542  record = new Hurricane::Record ( "const std::vector<Element>*" );
    543  unsigned n = 0;
    544  typename std::vector<Element>::const_iterator iterator = v->begin();
    545  while ( iterator != v->end() ) {
    546  record->add ( getSlot<const Element*>(getString(n++), &(*iterator)) );
    547  ++iterator;
    548  }
    549  }
    550  return record;
    551 }
    552 
    553 
    554 // -------------------------------------------------------------------
    555 // Inspector Support for : "const std::vector<Element*>*".
    556 
    557 
    558 template<typename Element>
    559 inline std::string getString ( const std::vector<Element*>* v )
    560 {
    561  std::string name = "const std::vector<Element*>*:";
    562  return name + getString<size_t>(v->size());
    563 }
    564 
    565 
    566 template<typename Element>
    567 inline Hurricane::Record* getRecord ( const std::vector<Element*>* v )
    568 {
    569  Hurricane::Record* record = NULL;
    570  if (not v->empty()) {
    571  record = new Hurricane::Record ( "const std::vector<Element*>*" );
    572  size_t n = 0;
    573  typename std::vector<Element*>::const_iterator iterator = v->begin();
    574  while (iterator != v->end()) {
    575  record->add ( getSlot<const Element*>(getString(n++), *iterator) );
    576  ++iterator;
    577  }
    578  }
    579  return record;
    580 }
    581 
    582 
    583 // -------------------------------------------------------------------
    584 // Inspector Support for : "const std::list<Element>*".
    585 
    586 
    587 template<typename Element>
    588 inline std::string getString ( const std::list<Element>* l )
    589 {
    590  std::string name = "const std::list<Element>*:";
    591  return name + getString<size_t>(l->size());
    592 }
    593 
    594 
    595 template<typename Element>
    596 inline Hurricane::Record* getRecord ( const std::list<Element>* l )
    597 {
    598  Hurricane::Record* record = NULL;
    599  if ( !l->empty() ) {
    600  record = new Hurricane::Record ( "const std::list<Element>" );
    601  unsigned n = 1;
    602  typename std::list<Element>::const_iterator iterator = l->begin();
    603  while ( iterator != l->end() ) {
    604  record->add ( getSlot<const Element*>(getString(n++), &(*iterator)) );
    605  ++iterator;
    606  }
    607  }
    608  return record;
    609 }
    610 
    611 
    612 template<typename Element>
    613 inline std::string getString ( std::list<Element>* l )
    614 {
    615  std::string name = "std::list<Element>*:";
    616  return name + getString<size_t>(l->size());
    617 }
    618 
    619 
    620 template<typename Element>
    621 inline Hurricane::Record* getRecord ( std::list<Element>* l )
    622 {
    623  Hurricane::Record* record = NULL;
    624  if ( !l->empty() ) {
    625  record = new Hurricane::Record ( "std::list<Element>" );
    626  unsigned n = 1;
    627  typename std::list<Element>::iterator iterator = l->begin();
    628  while ( iterator != l->end() ) {
    629  record->add ( getSlot<const Element*>(getString(n++), &(*iterator)) );
    630  ++iterator;
    631  }
    632  }
    633  return record;
    634 }
    635 
    636 
    637 // -------------------------------------------------------------------
    638 // Inspector Support for : "[const] std::map<Key,Element,Compare>*.
    639 
    640 
    641 template<typename Key, typename Element>
    642 inline std::string getString ( std::map<Key,Element>* m )
    643 {
    644  std::string name = "std::map<Element>:";
    645  return name + getString<size_t>(m->size());
    646 }
    647 
    648 
    649 template<typename Key, typename Element>
    650 inline Hurricane::Record* getRecord ( std::map<Key,Element>* m )
    651 {
    652  Hurricane::Record* record = NULL;
    653  if ( !m->empty() ) {
    654  record = new Hurricane::Record ( "std::map<Element>" );
    655  typename std::map<Key,Element>::iterator iterator = m->begin();
    656  while ( iterator != m->end() ) {
    657  record->add ( getSlot<Element>(getString(iterator->first), iterator->second) );
    658  ++iterator;
    659  }
    660  }
    661  return record;
    662 }
    663 
    664 
    665 template<typename Key, typename Element>
    666 inline std::string getString ( const std::map<Key,Element>* m )
    667 {
    668  std::string name = "const std::map<Element>:";
    669  return name + getString<size_t>(m->size());
    670 }
    671 
    672 
    673 template<typename Key, typename Element>
    674 inline Hurricane::Record* getRecord ( const std::map<Key,Element>* m )
    675 {
    676  Hurricane::Record* record = NULL;
    677  if ( !m->empty() ) {
    678  record = new Hurricane::Record ( "const std::map<Element>" );
    679  typename std::map<Key,Element>::const_iterator iterator = m->begin();
    680  while ( iterator != m->end() ) {
    681  record->add ( getSlot<const Element>(getString(iterator->first), iterator->second) );
    682  ++iterator;
    683  }
    684  }
    685  return record;
    686 }
    687 
    688 
    689 // -------------------------------------------------------------------
    690 // Inspector Support for : "[const] std::map<Key,Element,Compare>*.
    691 
    692 
    693 template<typename Key, typename Element, typename Compare>
    694 inline std::string getString ( std::map<Key,Element,Compare>* m )
    695 {
    696  std::string name = "std::map<Element>:";
    697  return name + getString<size_t>(m->size());
    698 }
    699 
    700 
    701 template<typename Key, typename Element, typename Compare>
    702 inline Hurricane::Record* getRecord ( std::map<Key,Element,Compare>* m )
    703 {
    704  Hurricane::Record* record = NULL;
    705  if ( !m->empty() ) {
    706  record = new Hurricane::Record ( "std::map<Element>" );
    707  typename std::map<Key,Element,Compare>::iterator iterator = m->begin();
    708  while ( iterator != m->end() ) {
    709  record->add ( getSlot<Element>(getString(iterator->first), iterator->second) );
    710  ++iterator;
    711  }
    712  }
    713  return record;
    714 }
    715 
    716 
    717 template<typename Key, typename Element, typename Compare>
    718 inline std::string getString ( const std::map<Key,Element,Compare>* m )
    719 {
    720  std::string name = "const std::map<Element>:";
    721  return name + getString<size_t>(m->size());
    722 }
    723 
    724 
    725 template<typename Key, typename Element, typename Compare>
    726 inline Hurricane::Record* getRecord ( const std::map<Key,Element,Compare>* m )
    727 {
    728  Hurricane::Record* record = NULL;
    729  if ( !m->empty() ) {
    730  record = new Hurricane::Record ( "const std::map<Element>" );
    731  typename std::map<Key,Element,Compare>::const_iterator iterator = m->begin();
    732  while ( iterator != m->end() ) {
    733  record->add ( getSlot<const Element>(getString(iterator->first), iterator->second) );
    734  ++iterator;
    735  }
    736  }
    737  return record;
    738 }
    739 
    740 
    741 // -------------------------------------------------------------------
    742 // Inspector Support for : "const std::multimap<Key,Element,Compare>*".
    743 
    744 
    745 template<typename Key, typename Element, typename Compare>
    746 inline std::string getString ( const std::multimap<Key,Element,Compare>* m )
    747 {
    748  std::string name = "const std::multimap<Element>:";
    749  return name + getString<size_t>(m->size());
    750 }
    751 
    752 
    753 template<typename Key, typename Element, typename Compare>
    754 inline Hurricane::Record* getRecord ( const std::multimap<Key,Element,Compare>* m )
    755 {
    756  Hurricane::Record* record = NULL;
    757  if ( !m->empty() ) {
    758  record = new Hurricane::Record ( "const std::multimap<Element>" );
    759  typename std::multimap<Key,Element,Compare>::const_iterator iterator = m->begin();
    760  while ( iterator != m->end() ) {
    761  record->add ( getSlot<const Element>(getString(iterator->first), iterator->second) );
    762  ++iterator;
    763  }
    764  }
    765  return record;
    766 }
    767 
    768 
    769 template<typename Key, typename Element, typename Compare>
    770 inline std::string getString ( std::multimap<Key,Element,Compare>* m )
    771 {
    772  std::string name = "std::multimap<Element>:";
    773  return name + getString<size_t>(m->size());
    774 }
    775 
    776 
    777 template<typename Key, typename Element, typename Compare>
    778 inline Hurricane::Record* getRecord ( std::multimap<Key,Element,Compare>* m )
    779 {
    780  Hurricane::Record* record = NULL;
    781  if ( !m->empty() ) {
    782  record = new Hurricane::Record ( "std::multimap<Element>" );
    783  typename std::multimap<Key,Element,Compare>::iterator iterator = m->begin();
    784  while ( iterator != m->end() ) {
    785  record->add ( getSlot<Element>(getString(iterator->first), iterator->second) );
    786  ++iterator;
    787  }
    788  }
    789  return record;
    790 }
    791 
    792 
    793 // -------------------------------------------------------------------
    794 // Inspector Support for : "[const] std::set<Element,Compare>*".
    795 
    796 
    797 template<typename Element, typename Compare>
    798 inline std::string getString ( const std::set<Element,Compare>* s )
    799 {
    800  std::string name = "const std::set<Element>:";
    801  return name + getString<size_t>(s->size());
    802 }
    803 
    804 
    805 template<typename Element, typename Compare>
    806 inline Hurricane::Record* getRecord ( const std::set<Element,Compare>* s )
    807 {
    808  Hurricane::Record* record = NULL;
    809  if ( !s->empty() ) {
    810  record = new Hurricane::Record ( "const std::set<Element>" );
    811  unsigned n = 1;
    812  typename std::set<Element,Compare>::const_iterator iterator = s->begin();
    813  while ( iterator != s->end() ) {
    814  record->add ( getSlot<const Element>(getString(n++), *iterator) );
    815  ++iterator;
    816  }
    817  }
    818  return record;
    819 }
    820 
    821 
    822 template< typename Element, typename Compare, typename Allocator >
    823 inline std::string getString ( std::set<Element,Compare,Allocator>* s )
    824 {
    825  std::string name = "std::set<Element>:";
    826  return name + getString<size_t>(s->size());
    827 }
    828 
    829 
    830 template< typename Element, typename Compare, typename Allocator >
    831 inline Hurricane::Record* getRecord ( std::set<Element,Compare,Allocator>* s )
    832 {
    833  Hurricane::Record* record = NULL;
    834  if (not s->empty()) {
    835  record = new Hurricane::Record ( "std::set<Element>" );
    836  unsigned n = 1;
    837  typename std::set<Element,Compare,Allocator>::iterator iterator = s->begin();
    838  while ( iterator != s->end() ) {
    839  record->add( getSlot<Element>(getString(n++), *iterator) );
    840  ++iterator;
    841  }
    842  }
    843  return record;
    844 }
    845 
    846 // -------------------------------------------------------------------
    847 // Inspector Support for : "[const] std::set<Element,Compare>&".
    848 
    849 
    850 template<typename Element, typename Compare>
    851 inline std::string getString ( const std::set<Element,Compare>& s )
    852 {
    853  std::string name = "const std::set<Element>:";
    854  return name + getString<size_t>(s.size());
    855 }
    856 
    857 
    858 template<typename Element, typename Compare>
    859 inline Hurricane::Record* getRecord ( const std::set<Element,Compare>& s )
    860 {
    861  Hurricane::Record* record = NULL;
    862  if ( !s.empty() ) {
    863  record = new Hurricane::Record ( "const std::set<Element>" );
    864  unsigned n = 1;
    865  typename std::set<Element,Compare>::const_iterator iterator = s.begin();
    866  while ( iterator != s.end() ) {
    867  record->add ( getSlot<Element>(getString(n++), *iterator) );
    868  ++iterator;
    869  }
    870  }
    871  return record;
    872 }
    873 
    874 // -------------------------------------------------------------------
    875 // Inspector Support for : "const std::multiset<Element,Compare>*".
    876 
    877 
    878 template<typename Element, typename Compare>
    879 inline std::string getString ( const std::multiset<Element,Compare>* s )
    880 {
    881  std::string name = "std::multiset<Element>:";
    882  return name + getString<size_t>(s->size());
    883 }
    884 
    885 
    886 template<typename Element, typename Compare>
    887 inline Hurricane::Record* getRecord ( const std::multiset<Element,Compare>* s )
    888 {
    889  Hurricane::Record* record = NULL;
    890  if ( !s->empty() ) {
    891  record = new Hurricane::Record ( "std::multiset<Element>" );
    892  unsigned n = 1;
    893  typename std::multiset<Element,Compare>::const_iterator iterator = s->begin();
    894  while ( iterator != s->end() ) {
    895  record->add ( getSlot<Element>(getString(n++), *iterator) );
    896  ++iterator;
    897  }
    898  }
    899  return record;
    900 }
    901 
    902 
    903 # define GETSTRING_POINTER_SUPPORT(Data) \
    904  template<> inline std::string getString<Data*>( Data* data ) \
    905  { \
    906  if (!data) return "NULL [" #Data "]"; \
    907  return data->_getString(); \
    908  } \
    909  \
    910  template<> inline std::string getString<const Data*>( const Data* data ) \
    911  { if (!data) return "NULL [const " #Data "]"; return data->_getString(); }
    912 
    913 
    914 # define IOSTREAM_POINTER_SUPPORT(Data) \
    915  inline std::ostream& operator<< ( std::ostream& o, Data* d ) \
    916  { \
    917  if (!d) return o << "NULL [" #Data "]"; \
    918  return o << "&" << getString<const Data*>(d); \
    919  } \
    920  inline std::ostream& operator<< ( std::ostream& o, const Data* d ) \
    921  { \
    922  if (!d) return o << "NULL [const " #Data "]"; \
    923  return o << "&" << getString<const Data*>(d); \
    924  } \
    925 
    926 
    927 # define GETRECORD_POINTER_SUPPORT(Data) \
    928  template<> inline Hurricane::Record* getRecord<Data*>( Data* data ) \
    929  { if (!data) return NULL; return data->_getRecord(); } \
    930  \
    931  template<> inline Hurricane::Record* getRecord<const Data*>( const Data* data ) \
    932  { if (!data) return NULL; return data->_getRecord(); }
    933 
    934 
    935 # define GETSTRING_REFERENCE_SUPPORT(Data) \
    936  template<> inline std::string getString<Data&>( Data& data ) \
    937  { return data._getString(); } \
    938  \
    939  template<> inline std::string getString<const Data&>( const Data& data ) \
    940  { return data._getString(); }
    941 
    942 
    943 # define IOSTREAM_REFERENCE_SUPPORT(Data) \
    944  inline std::ostream& operator<< ( std::ostream& o, Data& d ) \
    945  { return o << getString<Data&>(d); } \
    946  \
    947  inline std::ostream& operator<< ( std::ostream& o, const Data& d ) \
    948  { return o << getString<const Data&>(d); } \
    949  \
    950 
    951 # define GETRECORD_REFERENCE_SUPPORT(Data) \
    952  template<> inline Hurricane::Record* getRecord<Data&>( Data& data ) \
    953  { return data._getRecord(); } \
    954  \
    955  template<> inline Hurricane::Record* getRecord<const Data&>( const Data& data ) \
    956  { return data._getRecord(); }
    957 
    958 
    959 # define GETSTRING_VALUE_SUPPORT(Data) \
    960  template<> inline std::string getString<Data>( Data data ) \
    961  { return data._getString(); }
    962 
    963 
    964 # define IOSTREAM_VALUE_SUPPORT(Data) \
    965  inline std::ostream& operator<< ( std::ostream& o, Data d ) \
    966  { return o << getString<Data>(d); }
    967 
    968 
    969 # define GETRECORD_VALUE_SUPPORT(Data) \
    970  template<> inline Hurricane::Record* getRecord<Data>( Data data ) \
    971  { return data._getRecord(); }
    972 
    973 
    974 # define INSPECTOR_P_SUPPORT(Data) \
    975  GETRECORD_POINTER_SUPPORT(Data) \
    976  GETSTRING_POINTER_SUPPORT(Data) \
    977  IOSTREAM_POINTER_SUPPORT(Data)
    978 
    979 
    980 # define INSPECTOR_R_SUPPORT(Data) \
    981  GETRECORD_REFERENCE_SUPPORT(Data) \
    982  GETSTRING_REFERENCE_SUPPORT(Data) \
    983  IOSTREAM_REFERENCE_SUPPORT(Data)
    984 
    985 
    986 # define INSPECTOR_PR_SUPPORT(Data) \
    987  GETSTRING_POINTER_SUPPORT(Data) \
    988  GETSTRING_REFERENCE_SUPPORT(Data) \
    989  GETSTRING_VALUE_SUPPORT(Data) \
    990  IOSTREAM_POINTER_SUPPORT(Data) \
    991  IOSTREAM_REFERENCE_SUPPORT(Data) \
    992  GETRECORD_POINTER_SUPPORT(Data) \
    993  GETRECORD_REFERENCE_SUPPORT(Data)
    994 
    995 
    996 #include "hurricane/Tabulation.h"
    997 
    998 
    999 // -------------------------------------------------------------------
    1000 // Class : "::cdebug()".
    1001 //
    1002 // Wrapper around the STL ostream which to print debugging messages.
    1003 
    1004 class tstream : public std::ostream {
    1005  public:
    1006  inline int getMinLevel () const;
    1007  inline int getMaxLevel () const;
    1008  inline int setMinLevel ( int );
    1009  inline int setMaxLevel ( int );
    1010  inline int getLevel () const;
    1011  inline int setLevel ( int );
    1012  inline bool enabled () const;
    1013  inline bool enabled ( int ) const;
    1014  inline tstream& log ( int level, int count=0 );
    1015  inline tstream& tabw ( int level, int count );
    1016  inline tstream ( std::ostream & );
    1017  inline tstream& put ( char c );
    1018  inline tstream& flush ();
    1019  private:
    1020  inline tstream& _tab ();
    1021  inline tstream& _tabw ( int count );
    1022  public:
    1023  // Overload for manipulators.
    1024  inline tstream& operator<< ( std::ostream& (*pf)(std::ostream &) );
    1025  private:
    1026  int _minLevel;
    1027  int _maxLevel;
    1028  int _level;
    1029  Hurricane::Tabulation _tabulation;
    1030 };
    1031 
    1032 
    1033 inline tstream::tstream ( std::ostream& s )
    1034  : std::ostream(s.rdbuf())
    1035  , _minLevel (100000)
    1036  , _maxLevel (0)
    1037  , _level (0)
    1038  , _tabulation(" ")
    1039 { }
    1040 
    1041 inline int tstream::getMinLevel () const { return _minLevel; }
    1042 inline int tstream::getMaxLevel () const { return _maxLevel; }
    1043 inline int tstream::setMinLevel ( int l ) { int pl=_minLevel; _minLevel=l; return pl; }
    1044 inline int tstream::setMaxLevel ( int l ) { int pl=_maxLevel; _maxLevel=l; return pl; }
    1045 inline int tstream::getLevel () const { return _level; }
    1046 inline int tstream::setLevel ( int l ) { int pl=_level; _level=l; return pl; }
    1047 inline bool tstream::enabled () const { return (_level >= _minLevel) and (_level < _maxLevel); }
    1048 inline bool tstream::enabled ( int l ) const { return (l >= _minLevel) and (l < _maxLevel); }
    1049 inline tstream& tstream::tabw ( int level, int count ) { setLevel(level); return _tabw(count); }
    1050 inline tstream& tstream::put ( char c ) { if (enabled()) static_cast<std::ostream*>(this)->put(c); return *this; }
    1051 inline tstream& tstream::flush () { if (enabled()) static_cast<std::ostream*>(this)->flush(); return *this; }
    1052 inline tstream& tstream::operator<< ( std::ostream& (*pf)(std::ostream&) ) { if (enabled()) (*pf)(*this); return *this; }
    1053 
    1054 
    1055 inline tstream& tstream::_tab () { if (enabled()) (*this) << _tabulation; return *this; }
    1056 inline tstream& tstream::_tabw ( int count )
    1057 {
    1058  if (enabled()) {
    1059  if (count > 0) while(count--) _tabulation++;
    1060  else if (count < 0) while(count++) _tabulation--;
    1061  }
    1062  return *this;
    1063 }
    1064 
    1065 inline tstream& tstream::log ( int level, int count )
    1066 { setLevel(level); _tab(); return _tabw(count); }
    1067 
    1068 // For STL Types.
    1069 inline tstream& operator<< ( tstream& o, const std::string s )
    1070 { if (o.enabled()) { static_cast<std::ostream&>(o) << s; } return o; };
    1071 
    1072 // For POD Types.
    1073 // template<typename T>
    1074 // inline tstream& operator<< ( tstream& o, T& t )
    1075 // { if (o.enabled()) { static_cast<std::ostream&>(o) << getString<T&>(t); } return o; };
    1076 
    1077 template<typename T>
    1078 inline tstream& operator<< ( tstream& o, T* t )
    1079 { if (o.enabled()) { static_cast<std::ostream&>(o) << getString<T*>(t); } return o; };
    1080 
    1081 // template<typename T>
    1082 // inline tstream& operator<< ( tstream& o, const T& t )
    1083 // { if (o.enabled()) { static_cast<std::ostream&>(o) << getString<const T&>(t); } return o; };
    1084 
    1085 template<typename T>
    1086 inline tstream& operator<< ( tstream& o, T t )
    1087 { if (o.enabled()) { static_cast<std::ostream&>(o) << getString<T>(t); } return o; };
    1088 
    1089 template<typename T>
    1090 inline tstream& operator<< ( tstream& o, const T* t )
    1091 { if (o.enabled()) { static_cast<std::ostream&>(o) << getString<const T*>(t); } return o; };
    1092 
    1093 template<>
    1094 inline tstream& operator<< ( tstream& o, std::ios_base& (*pf)(std::ios_base&) )
    1095 { if (o.enabled()) { static_cast<std::ostream&>(o) << pf; } return o; };
    1096 
    1097 struct _Tsetw { int n_; };
    1098 inline _Tsetw tsetw ( int n ) { return { n }; }
    1099 
    1100 struct _Tsetf { int n_; };
    1101 inline _Tsetf tsetf ( int n ) { return { n }; }
    1102 
    1103 template<>
    1104 inline tstream& operator<< ( tstream& o, _Tsetw manip )
    1105 { if (o.enabled()) { static_cast<std::ostream&>(o) << std::setw(manip.n_); } return o; }
    1106 
    1107 extern tstream cdebug;
    1108 
    1109 
    1110 #define cdebug_log(level,indent) if (cdebug.enabled(level)) cdebug.log(level,indent)
    1111 #define cdebug_tabw(level,indent) cdebug.tabw(level,indent)
    1112 
    1113 
    1114 // x-----------------------------------------------------------------x
    1115 // | Classes Neededs in All Hurricane Modules |
    1116 // x-----------------------------------------------------------------x
    1117 
    1118 #include "hurricane/Slot.h"
    1119 #include "hurricane/Initializer.h"
    1120 #include "hurricane/JsonWriter.h"
    1121 #include "hurricane/JsonObject.h"
    int getLevel() const
    Definition: Commons.h:1045
    Definition: JsonObject.h:213
    string demangle(const char *symbol)
    int setMaxLevel(int)
    Definition: Commons.h:1044
    @@ -63,7 +63,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Component_8h_source.html b/hurricane/doc/hurricane/html/Component_8h_source.html index b81896e3..68ad3c38 100644 --- a/hurricane/doc/hurricane/html/Component_8h_source.html +++ b/hurricane/doc/hurricane/html/Component_8h_source.html @@ -44,7 +44,7 @@ $(function() {
    Component.h
    -
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Component.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 
    21 #ifndef HURRICANE_COMPONENT_H
    22 #define HURRICANE_COMPONENT_H
    23 
    24 #include "hurricane/Points.h"
    25 #include "hurricane/Go.h"
    26 #include "hurricane/Components.h"
    27 #include "hurricane/Hook.h"
    28 #include "hurricane/Hooks.h"
    29 #include "hurricane/Interval.h"
    30 
    31 
    32 namespace Hurricane {
    33 
    34  class Net;
    35  class Rubber;
    36  class Layer;
    37 
    38 
    39 // -------------------------------------------------------------------
    40 // Class : "Component".
    41 
    42  class Component : public Go {
    43  public:
    44  typedef Go Inherit;
    45 
    46  public:
    47  class Points_Contour : public PointHC {
    48  public:
    49  class Locator : public PointHL {
    50  public:
    51  Locator ( const Component* );
    52  inline Locator ( const Locator& );
    53  virtual Point getElement () const;
    54  virtual PointHL* getClone () const;
    55  virtual bool isValid () const;
    56  virtual void progress ();
    57  virtual string _getString () const;
    58  protected:
    59  const Component* _component;
    60  size_t _iPoint;
    61  };
    62  public:
    63  inline Points_Contour ( const Component* );
    64  inline Points_Contour ( const Points_Contour& );
    65  virtual PointHC* getClone () const;
    66  virtual PointHL* getLocator () const;
    67  virtual string _getString () const;
    68  protected:
    69  const Component* _component;
    70  };
    71 
    72  public:
    73  class BodyHook : public Hook {
    74  friend class Component;
    75  public:
    76  typedef Hook Inherit;
    77  public:
    78  virtual Component* getComponent () const;
    79  virtual bool isMaster () const {return true;};
    80  virtual string _getTypeName () const { return "Component::BodyHook"; };
    81  virtual string _getString () const;
    82  static Hook* _compToHook ( Component* );
    83  private:
    84  BodyHook ( Component* );
    85  };
    86 
    87  protected:
    88  Component ( Net* , bool inPlugCreate = false );
    89  public:
    90  // Accessors.
    91  virtual bool isManhattanized () const;
    92  virtual bool isNonRectangle () const;
    93  virtual Cell* getCell () const;
    94  Net* getNet () const { return _net; };
    95  Rubber* getRubber () const { return _rubber; };
    96  Hook* getBodyHook () { return &_bodyHook; };
    97  virtual Hooks getHooks () const;
    98  virtual DbU::Unit getX () const = 0;
    99  virtual DbU::Unit getY () const = 0;
    100  virtual Point getPosition () const { return Point( getX(), getY() ); };
    101  virtual Point getCenter () const { return getPosition(); };
    102  virtual const Layer* getLayer () const = 0;
    103  virtual size_t getPointsSize () const;
    104  virtual Point getPoint ( size_t ) const;
    105  virtual Box getBoundingBox () const = 0;
    106  virtual Box getBoundingBox ( const BasicLayer* ) const = 0;
    107  inline Points getContour () const;
    108  virtual Points getMContour () const;
    111  // Mutators.
    112  virtual void materialize ();
    113  virtual void unmaterialize ();
    114  virtual void invalidate ( bool propagateFlag = true );
    115  virtual void forceId ( unsigned int id );
    116  // Filters
    117  static ComponentFilter getIsUnderFilter ( const Box& area );
    118  // Others
    119  protected:
    120  virtual void _postCreate ();
    121  virtual void _preDestroy ();
    122  public:
    123  virtual void _toJson ( JsonWriter* ) const;
    124  virtual void _toJsonSignature ( JsonWriter* ) const;
    125  virtual string _getString () const;
    126  virtual Record* _getRecord () const;
    127  Component* _getNextOfNetComponentSet () const {return _nextOfNetComponentSet;};
    128  void _setNet ( Net* );
    129  void _setRubber ( Rubber* );
    130  void _setNextOfNetComponentSet ( Component* component ) { _nextOfNetComponentSet = component; };
    131  private:
    132  Net* _net;
    133  Rubber* _rubber;
    134  BodyHook _bodyHook;
    135  Component* _nextOfNetComponentSet;
    136  };
    137 
    138 
    139  inline Points Component::getContour () const { return Points_Contour(this); }
    140 
    141 
    142  inline Component::Points_Contour::Locator::Locator ( const Locator &locator )
    143  : PointHL ()
    144  , _component(locator._component)
    145  , _iPoint (locator._iPoint)
    146  { }
    147 
    148 
    149  inline Component::Points_Contour::Points_Contour ( const Component* component )
    150  : PointHC ()
    151  , _component(component)
    152  { }
    153 
    154 
    155  inline Component::Points_Contour::Points_Contour ( const Points_Contour& other )
    156  : PointHC ()
    157  , _component(other._component)
    158  { }
    159 
    160 
    161  double getArea ( Component* component );
    162 
    163 
    164 // -------------------------------------------------------------------
    165 // Class : "JsonComponent".
    166 
    167  class JsonComponent : public JsonEntity {
    168  public:
    169  JsonComponent ( unsigned long flags );
    170  };
    171 
    172 
    173 } // Hurricane namespace.
    174 
    175 
    176 INSPECTOR_P_SUPPORT(Hurricane::Component);
    177 INSPECTOR_P_SUPPORT(Hurricane::Component::BodyHook);
    178 
    179 
    180 #endif // HURRICANE_COMPONENT_H
    181 
    182 // ****************************************************************************************************
    183 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    184 // ****************************************************************************************************
    Go description (API)
    Definition: Go.h:36
    +
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Component.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 
    21 #ifndef HURRICANE_COMPONENT_H
    22 #define HURRICANE_COMPONENT_H
    23 
    24 #include "hurricane/Points.h"
    25 #include "hurricane/Go.h"
    26 #include "hurricane/Components.h"
    27 #include "hurricane/Hook.h"
    28 #include "hurricane/Hooks.h"
    29 #include "hurricane/Interval.h"
    30 
    31 
    32 namespace Hurricane {
    33 
    34  class Net;
    35  class Rubber;
    36  class Layer;
    37 
    38 
    39 // -------------------------------------------------------------------
    40 // Class : "Component".
    41 
    42  class Component : public Go {
    43  public:
    44  typedef Go Inherit;
    45 
    46  public:
    47  class Points_Contour : public PointHC {
    48  public:
    49  class Locator : public PointHL {
    50  public:
    51  Locator ( const Component* );
    52  inline Locator ( const Locator& );
    53  virtual Point getElement () const;
    54  virtual PointHL* getClone () const;
    55  virtual bool isValid () const;
    56  virtual void progress ();
    57  virtual string _getString () const;
    58  protected:
    59  const Component* _component;
    60  size_t _iPoint;
    61  };
    62  public:
    63  inline Points_Contour ( const Component* );
    64  inline Points_Contour ( const Points_Contour& );
    65  virtual PointHC* getClone () const;
    66  virtual PointHL* getLocator () const;
    67  virtual string _getString () const;
    68  protected:
    69  const Component* _component;
    70  };
    71 
    72  public:
    73  class BodyHook : public Hook {
    74  friend class Component;
    75  public:
    76  typedef Hook Inherit;
    77  public:
    78  virtual Component* getComponent () const;
    79  virtual bool isMaster () const {return true;};
    80  virtual string _getTypeName () const { return "Component::BodyHook"; };
    81  virtual string _getString () const;
    82  static Hook* _compToHook ( Component* );
    83  private:
    84  BodyHook ( Component* );
    85  };
    86 
    87  protected:
    88  Component ( Net* , bool inPlugCreate = false );
    89  public:
    90  // Accessors.
    91  virtual bool isManhattanized () const;
    92  virtual bool isNonRectangle () const;
    93  virtual Cell* getCell () const;
    94  Net* getNet () const { return _net; };
    95  Rubber* getRubber () const { return _rubber; };
    96  Hook* getBodyHook () { return &_bodyHook; };
    97  virtual Hooks getHooks () const;
    98  virtual DbU::Unit getX () const = 0;
    99  virtual DbU::Unit getY () const = 0;
    100  virtual Point getPosition () const { return Point( getX(), getY() ); };
    101  virtual Point getCenter () const { return getPosition(); };
    102  virtual const Layer* getLayer () const = 0;
    103  virtual size_t getPointsSize () const;
    104  virtual Point getPoint ( size_t ) const;
    105  virtual Box getBoundingBox () const = 0;
    106  virtual Box getBoundingBox ( const BasicLayer* ) const = 0;
    107  inline Points getContour () const;
    108  virtual Points getMContour () const;
    111  // Mutators.
    112  virtual void materialize ();
    113  virtual void unmaterialize ();
    114  virtual void invalidate ( bool propagateFlag = true );
    115  virtual void forceId ( unsigned int id );
    116  // Filters
    117  static ComponentFilter getIsUnderFilter ( const Box& area );
    118  // Others
    119  protected:
    120  virtual void _postCreate ();
    121  virtual void _preDestroy ();
    122  public:
    123  virtual void _toJson ( JsonWriter* ) const;
    124  virtual void _toJsonSignature ( JsonWriter* ) const;
    125  virtual string _getString () const;
    126  virtual Record* _getRecord () const;
    127  Component* _getNextOfNetComponentSet () const {return _nextOfNetComponentSet;};
    128  void _setNet ( Net* );
    129  void _setRubber ( Rubber* );
    130  void _setNextOfNetComponentSet ( Component* component ) { _nextOfNetComponentSet = component; };
    131  private:
    132  Net* _net;
    133  Rubber* _rubber;
    134  BodyHook _bodyHook;
    135  Component* _nextOfNetComponentSet;
    136  };
    137 
    138 
    139  inline Points Component::getContour () const { return Points_Contour(this); }
    140 
    141 
    142  inline Component::Points_Contour::Locator::Locator ( const Locator &locator )
    143  : PointHL ()
    144  , _component(locator._component)
    145  , _iPoint (locator._iPoint)
    146  { }
    147 
    148 
    149  inline Component::Points_Contour::Points_Contour ( const Component* component )
    150  : PointHC ()
    151  , _component(component)
    152  { }
    153 
    154 
    155  inline Component::Points_Contour::Points_Contour ( const Points_Contour& other )
    156  : PointHC ()
    157  , _component(other._component)
    158  { }
    159 
    160 
    161  double getArea ( Component* component );
    162 
    163 
    164 // -------------------------------------------------------------------
    165 // Class : "JsonComponent".
    166 
    167  class JsonComponent : public JsonEntity {
    168  public:
    169  JsonComponent ( unsigned long flags );
    170  };
    171 
    172 
    173 } // Hurricane namespace.
    174 
    175 
    176 INSPECTOR_P_SUPPORT(Hurricane::Component);
    177 INSPECTOR_P_SUPPORT(Hurricane::Component::BodyHook);
    178 
    179 
    180 #endif // HURRICANE_COMPONENT_H
    181 
    182 // ****************************************************************************************************
    183 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    184 // ****************************************************************************************************
    Go description (API)
    Definition: Go.h:34
    Collection description (API)
    Definition: Collection.h:39
    Net * getNet() const
    Definition: Component.h:94
    virtual Hooks getHooks() const
    @@ -53,13 +53,13 @@ $(function() {
    virtual DbU::Unit getX() const =0
    Components getConnexComponents() const
    virtual const Layer * getLayer() const =0
    -
    std::int64_t Unit
    Definition: DbU.h:70
    +
    std::int64_t Unit
    Definition: DbU.h:67
    Components getSlaveComponents() const
    -
    The model (API).
    Definition: Cell.h:66
    +
    The model (API).
    Definition: Cell.h:64
    Point description (API)
    Definition: Point.h:32
    Generic Collection auto-pointer.
    Definition: Collection.h:28
    virtual DbU::Unit getY() const =0
    -
    Hook description (API)
    Definition: Hook.h:36
    +
    Hook description (API)
    Definition: Hook.h:34
    Locator description (API)
    Definition: Locator.h:33
    static ComponentFilter getIsUnderFilter(const Box &area)
    Go Inherit
    Definition: Component.h:44
    @@ -76,7 +76,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Components_8h_source.html b/hurricane/doc/hurricane/html/Components_8h_source.html index 143a4041..8568564d 100644 --- a/hurricane/doc/hurricane/html/Components_8h_source.html +++ b/hurricane/doc/hurricane/html/Components_8h_source.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/ContactLayer_8h_source.html b/hurricane/doc/hurricane/html/ContactLayer_8h_source.html index a75159fd..039be0fc 100644 --- a/hurricane/doc/hurricane/html/ContactLayer_8h_source.html +++ b/hurricane/doc/hurricane/html/ContactLayer_8h_source.html @@ -47,9 +47,9 @@ $(function() {
    1 // -*- C++ -*-
    2 //
    3 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    4 //
    5 // This file is part of Hurricane.
    6 //
    7 // Hurricane is free software: you can redistribute it and/or modify
    8 // it under the terms of the GNU Lesser General Public License as
    9 // published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but
    13 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    14 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    15 // General Public License for more details.
    16 //
    17 // You should have received a copy of the Lesser GNU General Public
    18 // License along with Hurricane. If not, see
    19 // <http://www.gnu.org/licenses/>.
    20 //
    21 // +-----------------------------------------------------------------+
    22 // | H U R R I C A N E |
    23 // | V L S I B a c k e n d D a t a - B a s e |
    24 // | |
    25 // | Author : Jean-Paul Chaput |
    26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    27 // | =============================================================== |
    28 // | C++ Header : "./hurricane/ContactLayer.h" |
    29 // +-----------------------------------------------------------------+
    30 
    31 
    32 #ifndef HURRICANE_CONTACT_LAYER_H
    33 #define HURRICANE_CONTACT_LAYER_H
    34 
    35 #include <vector>
    36 
    37 #include "hurricane/Layer.h"
    38 
    39 
    40 namespace Hurricane {
    41 
    42 
    43 // -------------------------------------------------------------------
    44 // Class : "Hurricane::ContactLayer".
    45 
    46  class ContactLayer : public Layer {
    47  public:
    48  typedef Layer Super;
    49 
    50  public:
    51  // Constructor.
    52  static ContactLayer* create ( Technology* technology
    53  , const Name& name
    54  , BasicLayer* metalLayer
    55  , BasicLayer* cutLayer
    56  , BasicLayer* activeLayer
    57  , BasicLayer* diffusionLayer
    58  , BasicLayer* wellLayer
    59  );
    60  // Accessors.
    61  virtual BasicLayers getBasicLayers () const;
    62  virtual DbU::Unit getEnclosure ( uint32_t flags ) const;
    63  virtual DbU::Unit getEnclosure ( const BasicLayer* layer, uint32_t flags ) const;
    64  // Updators.
    65  virtual void setEnclosure ( const BasicLayer* layer, DbU::Unit enclosure, uint32_t flags );
    66  // Hurricane Managment.
    67  virtual void _toJson ( JsonWriter* ) const;
    68  virtual void _onDbuChange ( float scale );
    69  virtual string _getTypeName () const;
    70  virtual string _getString () const;
    71  virtual Record* _getRecord () const;
    72 
    73  private:
    74  // Internal: Attributes
    75  vector<BasicLayer*> _basicLayers;
    76  vector< pair<DbU::Unit,DbU::Unit> > _enclosures;
    77  DbU::Unit _maximalEnclosure;
    78 
    79  protected:
    80  ContactLayer ( Technology* technology
    81  , const Name& name
    82  , BasicLayer* metalLayer
    83  , BasicLayer* cutLayer
    84  , BasicLayer* activeLayer
    85  , BasicLayer* diffusionLayer
    86  , BasicLayer* wellLayer
    87  );
    88  };
    89 
    90 
    91 // -------------------------------------------------------------------
    92 // Class : "Hurricane::JsonContactLayer".
    93 
    94  class JsonContactLayer : public JsonLayer {
    95  public:
    96  static void initialize ();
    97  JsonContactLayer ( unsigned long flags );
    98  ~JsonContactLayer ();
    99  virtual string getTypeName () const;
    100  virtual JsonContactLayer* clone ( unsigned long ) const;
    101  virtual void toData ( JsonStack& );
    102  };
    103 
    104 
    105 } // End of Hurricane namespace.
    106 
    107 
    108 INSPECTOR_P_SUPPORT(Hurricane::ContactLayer);
    109 
    110 
    111 # endif
    BasicLayer description (API)
    Definition: BasicLayer.h:44
    static ContactLayer * create(Technology *technology, const Name &name, BasicLayer *metalLayer, BasicLayer *cutLayer, BasicLayer *activeLayer, BasicLayer *diffusionLayer, BasicLayer *wellLayer)
    Name description (API)
    Definition: Name.h:35
    -
    std::int64_t Unit
    Definition: DbU.h:70
    +
    std::int64_t Unit
    Definition: DbU.h:67
    ContactLayer description (API)
    Definition: ContactLayer.h:46
    -
    DataBase object root class (API).
    Definition: DBo.h:47
    +
    DataBase object root class (API).
    Definition: DBo.h:45
    JSON Parser Stack.
    Definition: JsonObject.h:249
    Layer description (API)
    Definition: Layer.h:52
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    @@ -59,7 +59,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Contact_8h_source.html b/hurricane/doc/hurricane/html/Contact_8h_source.html index 167519b7..8ca56c1f 100644 --- a/hurricane/doc/hurricane/html/Contact_8h_source.html +++ b/hurricane/doc/hurricane/html/Contact_8h_source.html @@ -44,44 +44,44 @@ $(function() {
    Contact.h
    -
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Contact.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_CONTACT
    21 #define HURRICANE_CONTACT
    22 
    23 #include "hurricane/Component.h"
    24 #include "hurricane/Contacts.h"
    25 
    26 namespace Hurricane {
    27 
    28 
    29 // ****************************************************************************************************
    30 // Contact declaration
    31 // ****************************************************************************************************
    32 
    33 class Contact : public Component {
    34 // *****************************
    35 
    36 // Types
    37 // *****
    38 
    39  public: typedef Component Inherit;
    40 
    41  public: class AnchorHook : public Hook {
    42  // ***********************************
    43 
    44  friend class Contact;
    45 
    46  public: typedef Hook Inherit;
    47 
    48  private: AnchorHook(Contact* contact);
    49 
    50  public: virtual Component* getComponent() const;
    51 
    52  public: virtual bool isMaster() const {return false;};
    53 
    54  public: virtual string _getTypeName() const { return "Contact::AnchorHook"; };
    55  public: virtual string _getString() const;
    56  public: static Hook* _compToHook(Component*);
    57  };
    58 
    59 // Attributes
    60 // **********
    61 
    62  private: AnchorHook _anchorHook;
    63  private: const Layer* _layer;
    64  private: DbU::Unit _dx;
    65  private: DbU::Unit _dy;
    66  protected: DbU::Unit _width;
    67  protected: DbU::Unit _height;
    68 
    69 // Constructors
    70 // ************
    71 
    72  protected: Contact( Net* net
    73  , const Layer* layer
    74  , const DbU::Unit& x
    75  , const DbU::Unit& y
    76  , const DbU::Unit& width = 0
    77  , const DbU::Unit& height = 0
    78  );
    79  protected: Contact( Net* net
    80  , Component* anchor
    81  , const Layer* layer
    82  , const DbU::Unit& dx
    83  , const DbU::Unit& dy
    84  , const DbU::Unit& width = 0
    85  , const DbU::Unit& height = 0
    86  );
    87 
    88  public: static Contact* create( Net* net
    89  , const Layer* layer
    90  , const DbU::Unit& x
    91  , const DbU::Unit& y
    92  , const DbU::Unit& width = 0
    93  , const DbU::Unit& height = 0
    94  );
    95  public: static Contact* create( Component* anchor
    96  , const Layer* layer
    97  , const DbU::Unit& dx
    98  , const DbU::Unit& dy
    99  , const DbU::Unit& width = 0
    100  , const DbU::Unit& height = 0
    101  );
    102 
    103 // Accessors
    104 // *********
    105 
    106  public: virtual Hooks getHooks() const;
    107  public: virtual DbU::Unit getX() const;
    108  public: virtual DbU::Unit getY() const;
    109  public: virtual Point getPosition() const;
    110  public: virtual Box getBoundingBox() const;
    111  public: virtual const Layer* getLayer() const {return _layer;};
    112  public: virtual Box getBoundingBox(const BasicLayer* basicLayer) const;
    113  public: Hook* getAnchorHook() {return &_anchorHook;};
    114  public: Component* getAnchor() const;
    115  public: const DbU::Unit& getDx() const {return _dx;};
    116  public: const DbU::Unit& getDy() const {return _dy;};
    117  public: const DbU::Unit& getWidth() const {return _width;};
    118  public: DbU::Unit getHalfWidth() const {return (_width / 2);};
    119  public: const DbU::Unit& getHeight() const {return _height;};
    120  public: DbU::Unit getHalfHeight() const {return (_height / 2);};
    121 
    122 // Updators
    123 // ********
    124 
    125  public: virtual void translate(const DbU::Unit& dx, const DbU::Unit& dy);
    126 
    127  public: void setLayer(const Layer* layer);
    128  public: void setWidth(const DbU::Unit& width);
    129  public: void setHeight(const DbU::Unit& height);
    130  public: void setSizes(const DbU::Unit& width, const DbU::Unit& height);
    131  public: void setX(const DbU::Unit& x);
    132  public: void setY(const DbU::Unit& y);
    133  public: void setPosition(const DbU::Unit& x, const DbU::Unit& y);
    134  public: void setPosition(const Point& position);
    135  public: void setDx(const DbU::Unit& dx);
    136  public: void setDy(const DbU::Unit& dy);
    137  public: void setOffset(const DbU::Unit& dx, const DbU::Unit& dy);
    138 
    139 // Others
    140 // ******
    141 
    142  protected: virtual void _preDestroy();
    143 
    144  public: virtual void _toJson(JsonWriter*) const;
    145  public: virtual string _getTypeName() const {return _TName("Contact");};
    146  public: virtual string _getString() const;
    147  public: virtual Record* _getRecord() const;
    148 
    149 };
    150 
    151 
    152 class JsonContact : public JsonComponent {
    153 // ***************************************
    154 
    155  public: static void initialize();
    156  public: JsonContact(unsigned long flags);
    157  public: virtual string getTypeName() const;
    158  public: virtual JsonContact* clone(unsigned long) const;
    159  public: virtual void toData(JsonStack&);
    160 };
    161 
    162 } // End of Hurricane namespace.
    163 
    164 
    165 INSPECTOR_P_SUPPORT(Hurricane::Contact);
    166 INSPECTOR_P_SUPPORT(Hurricane::Contact::AnchorHook);
    167 
    168 
    169 #endif // HURRICANE_CONTACT
    170 
    171 
    172 // ****************************************************************************************************
    173 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    174 // ****************************************************************************************************
    DbU::Unit getHalfWidth() const
    Definition: Contact.h:118
    -
    void setX(const DbU::Unit &x)
    +
    1 // -*- C++ -*-
    2 //
    3 // Copyright (c) BULL S.A. 2000-2020, All Rights Reserved
    4 //
    5 // This file is part of Hurricane.
    6 //
    7 // Hurricane is free software: you can redistribute it and/or modify
    8 // it under the terms of the GNU Lesser General Public License as
    9 // published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but
    13 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    14 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    15 // General Public License for more details.
    16 //
    17 // You should have received a copy of the Lesser GNU General Public
    18 // License along with Hurricane. If not, see
    19 // <http://www.gnu.org/licenses/>.
    20 //
    21 // +-----------------------------------------------------------------+
    22 // | H U R R I C A N E |
    23 // | V L S I B a c k e n d D a t a - B a s e |
    24 // | |
    25 // | Author : Remy Escassut |
    26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    27 // | =============================================================== |
    28 // | C++ Header : "./hurricane/Commons.h" |
    29 // +-----------------------------------------------------------------+
    30 
    31 
    32 #pragma once
    33 #include "hurricane/Component.h"
    34 #include "hurricane/Contacts.h"
    35 
    36 
    37 namespace Hurricane {
    38 
    39 
    40 // -------------------------------------------------------------------
    41 // Class : "Hurricane::Contact".
    42 
    43  class Contact : public Component {
    44  public:
    45  typedef Component Inherit;
    46  public:
    47  class AnchorHook : public Hook {
    48  friend class Contact;
    49  public:
    50  typedef Hook Inherit;
    51  private:
    52  AnchorHook ( Contact* );
    53  public:
    54  virtual Component* getComponent () const;
    55  virtual bool isMaster () const { return false; };
    56  virtual std::string _getTypeName () const { return "Contact::AnchorHook"; };
    57  virtual std::string _getString () const;
    58  static Hook* _compToHook ( Component* );
    59  };
    60 
    61  protected:
    62  Contact ( Net* net
    63  , const Layer* layer
    64  , DbU::Unit x
    65  , DbU::Unit y
    66  , DbU::Unit width
    67  , DbU::Unit height
    68  );
    69  Contact ( Net* net
    70  , Component* anchor
    71  , const Layer* layer
    72  , DbU::Unit dx
    73  , DbU::Unit dy
    74  , DbU::Unit width
    75  , DbU::Unit height
    76  );
    77  public:
    78  static inline void enableCheckMinSize ();
    79  static inline void disableCheckMinSize ();
    80  static Contact* create ( Net* net
    81  , const Layer* layer
    82  , DbU::Unit x
    83  , DbU::Unit y
    84  , DbU::Unit width =0
    85  , DbU::Unit height=0
    86  );
    87  static Contact* create ( Component* anchor
    88  , const Layer* layer
    89  , DbU::Unit dx
    90  , DbU::Unit dy
    91  , DbU::Unit width =0
    92  , DbU::Unit height=0
    93  );
    94  public:
    95  virtual Hooks getHooks () const;
    96  virtual DbU::Unit getX () const;
    97  virtual DbU::Unit getY () const;
    98  virtual Point getPosition () const;
    99  virtual Box getBoundingBox () const;
    100  virtual const Layer* getLayer () const {return _layer;};
    101  virtual Box getBoundingBox ( const BasicLayer* ) const;
    102  Hook* getAnchorHook () { return &_anchorHook; };
    103  Component* getAnchor () const;
    104  DbU::Unit getDx () const { return _dx; };
    105  DbU::Unit getDy () const { return _dy; };
    106  DbU::Unit getWidth () const { return _width; };
    107  DbU::Unit getHalfWidth () const { return (_width / 2); };
    108  DbU::Unit getHeight () const { return _height; };
    109  DbU::Unit getHalfHeight () const { return (_height / 2); };
    110  public:
    111  virtual void translate ( const DbU::Unit& dx, const DbU::Unit& dy );
    112  void setLayer ( const Layer* );
    113  void setWidth ( DbU::Unit );
    114  void setHeight ( DbU::Unit );
    115  void setSizes ( DbU::Unit width, DbU::Unit height);
    116  void setX ( DbU::Unit );
    117  void setY ( DbU::Unit );
    118  void setPosition ( DbU::Unit x, DbU::Unit y);
    119  void setPosition ( const Point& );
    120  void setDx ( DbU::Unit );
    121  void setDy ( DbU::Unit );
    122  void setOffset ( DbU::Unit dx, DbU::Unit dy);
    123  private:
    124  bool _postCheck ();
    125  protected:
    126  virtual void _preDestroy ();
    127  public:
    128  virtual void _toJson ( JsonWriter* ) const;
    129  virtual std::string _getTypeName () const { return _TName("Contact"); };
    130  virtual std::string _getString () const;
    131  virtual Record* _getRecord () const;
    132  private:
    133  static bool _checkMinSize;
    134  AnchorHook _anchorHook;
    135  const Layer* _layer;
    136  DbU::Unit _dx;
    137  DbU::Unit _dy;
    138  protected:
    139  DbU::Unit _width;
    140  DbU::Unit _height;
    141  };
    142 
    143 
    144  inline void Contact::enableCheckMinSize () { _checkMinSize=true; }
    145  inline void Contact::disableCheckMinSize () { _checkMinSize=false; }
    146 
    147 
    148 // -------------------------------------------------------------------
    149 // Class : "Hurricane::JsonContact".
    150 
    151  class JsonContact : public JsonComponent {
    152  public:
    153  static void initialize ();
    154  JsonContact ( unsigned long flags );
    155  virtual std::string getTypeName () const;
    156  virtual JsonContact* clone ( unsigned long ) const;
    157  virtual void toData ( JsonStack& );
    158  };
    159 
    160 
    161 } // Hurricane namespace.
    162 
    163 
    164 INSPECTOR_P_SUPPORT(Hurricane::Contact);
    165 INSPECTOR_P_SUPPORT(Hurricane::Contact::AnchorHook);
    DbU::Unit getHalfWidth() const
    Definition: Contact.h:107
    BasicLayer description (API)
    Definition: BasicLayer.h:44
    +
    void setSizes(DbU::Unit width, DbU::Unit height)
    +
    void setLayer(const Layer *)
    Component description (API)
    Definition: Component.h:42
    -
    void setDx(const DbU::Unit &dx)
    -
    Contact description (API)
    Definition: Contact.h:33
    -
    std::int64_t Unit
    Definition: DbU.h:70
    -
    void setWidth(const DbU::Unit &width)
    -
    void setOffset(const DbU::Unit &dx, const DbU::Unit &dy)
    -
    Definition: Contact.h:41
    +
    DbU::Unit getDy() const
    Definition: Contact.h:105
    +
    Contact description (API)
    Definition: Contact.h:43
    +
    std::int64_t Unit
    Definition: DbU.h:67
    +
    Definition: Contact.h:47
    Point description (API)
    Definition: Point.h:32
    -
    void setY(const DbU::Unit &y)
    -
    DbU::Unit getHalfHeight() const
    Definition: Contact.h:120
    -
    void setSizes(const DbU::Unit &width, const DbU::Unit &height)
    +
    DbU::Unit getHalfHeight() const
    Definition: Contact.h:109
    +
    void setPosition(DbU::Unit x, DbU::Unit y)
    +
    void setHeight(DbU::Unit)
    Component * getAnchor() const
    Generic Collection auto-pointer.
    Definition: Collection.h:28
    -
    Hook description (API)
    Definition: Hook.h:36
    -
    const DbU::Unit & getWidth() const
    Definition: Contact.h:117
    -
    Hook * getAnchorHook()
    Definition: Contact.h:113
    +
    DbU::Unit getDx() const
    Definition: Contact.h:104
    +
    void setDx(DbU::Unit)
    +
    Hook description (API)
    Definition: Hook.h:34
    +
    void setWidth(DbU::Unit)
    +
    Hook * getAnchorHook()
    Definition: Contact.h:102
    Box description (API)
    Definition: Box.h:31
    -
    static Contact * create(Net *net, const Layer *layer, const DbU::Unit &x, const DbU::Unit &y, const DbU::Unit &width=0, const DbU::Unit &height=0)
    +
    void setOffset(DbU::Unit dx, DbU::Unit dy)
    +
    DbU::Unit getWidth() const
    Definition: Contact.h:106
    +
    void setDy(DbU::Unit)
    +
    void setY(DbU::Unit)
    Layer description (API)
    Definition: Layer.h:52
    -
    void setDy(const DbU::Unit &dy)
    -
    const DbU::Unit & getDy() const
    Definition: Contact.h:116
    +
    void setX(DbU::Unit)
    +
    static Contact * create(Net *net, const Layer *layer, DbU::Unit x, DbU::Unit y, DbU::Unit width=0, DbU::Unit height=0)
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    -
    const DbU::Unit & getHeight() const
    Definition: Contact.h:119
    -
    void setLayer(const Layer *layer)
    +
    DbU::Unit getHeight() const
    Definition: Contact.h:108
    Net description (API)
    Definition: Net.h:48
    -
    const DbU::Unit & getDx() const
    Definition: Contact.h:115
    -
    void setPosition(const DbU::Unit &x, const DbU::Unit &y)
    -
    Component Inherit
    Definition: Contact.h:39
    -
    void setHeight(const DbU::Unit &height)
    +
    Component Inherit
    Definition: Contact.h:45


    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Contacts_8h_source.html b/hurricane/doc/hurricane/html/Contacts_8h_source.html index 8382a82c..fec1311f 100644 --- a/hurricane/doc/hurricane/html/Contacts_8h_source.html +++ b/hurricane/doc/hurricane/html/Contacts_8h_source.html @@ -46,7 +46,7 @@ $(function() {
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Contacts.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_CONTACTS
    21 #define HURRICANE_CONTACTS
    22 
    23 #include "hurricane/Collection.h"
    24 
    25 namespace Hurricane {
    26 
    27 class Contact;
    28 
    29 
    30 
    31 // ****************************************************************************************************
    32 // Contacts declaration
    33 // ****************************************************************************************************
    34 
    36 
    37 
    38 
    39 // ****************************************************************************************************
    40 // ContactLocator declaration
    41 // ****************************************************************************************************
    42 
    44 
    45 
    46 
    47 // ****************************************************************************************************
    48 // ContactFilter declaration
    49 // ****************************************************************************************************
    50 
    52 
    53 
    54 
    55 // ****************************************************************************************************
    56 // for_each_contact declaration
    57 // ****************************************************************************************************
    58 
    59 #define for_each_contact(contact, contacts)\
    60 /******************************************/\
    61 {\
    62  ContactLocator _locator = contacts.getLocator();\
    63  while (_locator.isValid()) {\
    64  Contact* contact = _locator.getElement();\
    65  _locator.progress();
    66 
    67 
    68 
    69 } // End of Hurricane namespace.
    70 
    71 #endif // HURRICANE_CONTACTS
    72 
    73 
    74 // ****************************************************************************************************
    75 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    76 // ****************************************************************************************************
    Generic Locator auto-pointer.
    Definition: Locator.h:113
    Generic Filter auto-pointer.
    Definition: Filter.h:27
    -
    Contact description (API)
    Definition: Contact.h:33
    +
    Contact description (API)
    Definition: Contact.h:43
    GenericLocator< Contact * > ContactLocator
    Definition: Contacts.h:43
    Generic Collection auto-pointer.
    Definition: Collection.h:28
    GenericCollection< Contact * > Contacts
    Definition: Contacts.h:27
    @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/DBo_8h_source.html b/hurricane/doc/hurricane/html/DBo_8h_source.html index 6d37d66f..e4f8dc39 100644 --- a/hurricane/doc/hurricane/html/DBo_8h_source.html +++ b/hurricane/doc/hurricane/html/DBo_8h_source.html @@ -44,15 +44,14 @@ $(function() {
    DBo.h
    -
    1 // -*- C++ -*-
    2 //
    3 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    4 //
    5 // This file is part of Hurricane.
    6 //
    7 // Hurricane is free software: you can redistribute it and/or modify
    8 // it under the terms of the GNU Lesser General Public License as
    9 // published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but
    13 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    14 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    15 // General Public License for more details.
    16 //
    17 // You should have received a copy of the Lesser GNU General Public
    18 // License along with Hurricane. If not, see
    19 // <http://www.gnu.org/licenses/>.
    20 //
    21 // +-----------------------------------------------------------------+
    22 // | H U R R I C A N E |
    23 // | V L S I B a c k e n d D a t a - B a s e |
    24 // | |
    25 // | Author : Remy Escassut |
    26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    27 // | =============================================================== |
    28 // | C++ Header : "./hurricane/DBo.h" |
    29 // +-----------------------------------------------------------------+
    30 
    31 
    32 #ifndef HURRICANE_DBO_H
    33 #define HURRICANE_DBO_H
    34 
    35 #include "hurricane/Error.h"
    36 #include "hurricane/DBos.h"
    37 #include "hurricane/Name.h"
    38 #include "hurricane/Properties.h"
    39 
    40 
    41 namespace Hurricane {
    42 
    43 
    44 // -------------------------------------------------------------------
    45 // Class : "Hurricane::DBo".
    46 
    47  class DBo {
    48  public:
    49  enum DBoFlags { ForcedIdMode = (1<<0)
    50  , NextIdSet = (1<<1)
    51  };
    52  public:
    53  static void setMemoryLimit ( unsigned int );
    54  static void setIdCounterLimit ( unsigned int );
    55  static unsigned int getIdCounter ();
    56  unsigned int getNextId ();
    57  static void setNextId ( unsigned int );
    58  static void resetId ();
    59  static bool inForcedIdMode ();
    60  static void enableForcedIdMode ();
    61  static void disableForcedIdMode ();
    62  static void useIdCounter2 ();
    63  public:
    64  virtual void destroy ();
    65  inline set<Property*>& _getPropertySet ();
    66  void _onDestroyed ( Property* property );
    67  inline unsigned int getId () const;
    68  Property* getProperty ( const Name& ) const;
    69  Properties getProperties () const;
    70  inline bool hasProperty () const;
    71  void setId ( unsigned int );
    72  void put ( Property* );
    73  void remove ( Property* );
    74  void removeProperty ( const Name& );
    75  void clearProperties ();
    76  virtual string _getTypeName () const;
    77  virtual string _getString () const;
    78  virtual Record* _getRecord () const;
    79  virtual void _toJson ( JsonWriter* ) const;
    80  virtual void _toJsonCollections ( JsonWriter* ) const;
    81  virtual void _toJsonSignature ( JsonWriter* ) const;
    82  void toJson ( JsonWriter* ) const;
    83  void toJsonSignature ( JsonWriter* ) const;
    84  protected:
    85  DBo ();
    86  virtual ~DBo () throw(Error);
    87  virtual void _postCreate ();
    88  virtual void _preDestroy ();
    89  private:
    90  DBo ( const DBo& ) = delete;
    91  DBo& operator= ( const DBo& ) = delete;
    92  private:
    93  static unsigned int _memoryLimit;
    94  static unsigned long _flags;
    95  static unsigned int _nextId;
    96  static unsigned int _idCount;
    97  static unsigned int _idCounter;
    98  static unsigned int _idCounterLimit;
    99  unsigned int _id;
    100  mutable set<Property*> _propertySet;
    101  public:
    102  struct CompareById : public std::binary_function<const DBo*,const DBo*,bool> {
    103  template<typename Key>
    104  inline bool operator() ( const Key* lhs, const Key* rhs ) const;
    105  };
    106  };
    107 
    108 
    109 // Inline Functions.
    110  inline set<Property*>& DBo::_getPropertySet () { return _propertySet; }
    111  inline bool DBo::hasProperty () const { return !_propertySet.empty(); }
    112  inline unsigned int DBo::getId () const { return _id; }
    113 
    114  template<typename Key>
    115  inline bool DBo::CompareById::operator() ( const Key* lhs, const Key* rhs ) const
    116  { return ((lhs)?lhs->getId():0) < ((rhs)?rhs->getId():0); }
    117 
    118 
    119 // -------------------------------------------------------------------
    120 // Class : "Hurricane::JsonDBo".
    121 
    122  class JsonDBo : public JsonObject {
    123  public:
    124  JsonDBo ( unsigned int flags );
    125  template<typename T> inline void update ( JsonStack&, T );
    126  };
    127 
    128 
    129  template<typename T> inline void JsonDBo::update ( JsonStack& stack, T hobject )
    130  {
    131  JsonObject::update<T>( stack, hobject );
    132  stack.push_back_dbo( dynamic_cast<DBo*>(hobject) );
    133  }
    134 
    135 
    136 } // Hurricane namespace.
    137 
    138 INSPECTOR_P_SUPPORT(Hurricane::DBo);
    139 
    140 #endif // HURRICANE_DBO_H
    Error description (API)
    Definition: Error.h:43
    -
    void removeProperty(const Name &)
    +
    1 // -*- C++ -*-
    2 //
    3 // Copyright (c) BULL S.A. 2000-2021, All Rights Reserved
    4 //
    5 // This file is part of Hurricane.
    6 //
    7 // Hurricane is free software: you can redistribute it and/or modify
    8 // it under the terms of the GNU Lesser General Public License as
    9 // published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but
    13 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    14 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    15 // General Public License for more details.
    16 //
    17 // You should have received a copy of the Lesser GNU General Public
    18 // License along with Hurricane. If not, see
    19 // <http://www.gnu.org/licenses/>.
    20 //
    21 // +-----------------------------------------------------------------+
    22 // | H U R R I C A N E |
    23 // | V L S I B a c k e n d D a t a - B a s e |
    24 // | |
    25 // | Author : Remy Escassut |
    26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    27 // | =============================================================== |
    28 // | C++ Header : "./hurricane/DBo.h" |
    29 // +-----------------------------------------------------------------+
    30 
    31 
    32 #pragma once
    33 #include "hurricane/Error.h"
    34 #include "hurricane/DBos.h"
    35 #include "hurricane/Name.h"
    36 #include "hurricane/Properties.h"
    37 
    38 
    39 namespace Hurricane {
    40 
    41 
    42 // -------------------------------------------------------------------
    43 // Class : "Hurricane::DBo".
    44 
    45  class DBo {
    46  public:
    47  enum DBoFlags { ForcedIdMode = (1<<0)
    48  , NextIdSet = (1<<1)
    49  };
    50  public:
    51  static void setMemoryLimit ( unsigned int );
    52  static void setIdCounterLimit ( unsigned int );
    53  static unsigned int getIdCounter ();
    54  unsigned int getNextId ();
    55  static void setNextId ( unsigned int );
    56  static void resetId ();
    57  static bool inForcedIdMode ();
    58  static void enableForcedIdMode ();
    59  static void disableForcedIdMode ();
    60  static void useIdCounter2 ();
    61  public:
    62  virtual void destroy ();
    63  inline set<Property*>& _getPropertySet ();
    64  void _onDestroyed ( Property* property );
    65  inline unsigned int getId () const;
    66  Property* getProperty ( const Name& ) const;
    67  Properties getProperties () const;
    68  inline bool hasProperty () const;
    69  void setId ( unsigned int );
    70  void put ( Property* );
    71  void remove ( Property* );
    72  void removeProperty ( const Name& );
    73  void clearProperties ();
    74  virtual string _getTypeName () const;
    75  virtual string _getString () const;
    76  virtual Record* _getRecord () const;
    77  virtual void _toJson ( JsonWriter* ) const;
    78  virtual void _toJsonCollections ( JsonWriter* ) const;
    79  virtual void _toJsonSignature ( JsonWriter* ) const;
    80  void toJson ( JsonWriter* ) const;
    81  void toJsonSignature ( JsonWriter* ) const;
    82  protected:
    83  DBo ();
    84  virtual ~DBo () noexcept(false);
    85  virtual void _postCreate ();
    86  virtual void _preDestroy ();
    87  private:
    88  DBo ( const DBo& ) = delete;
    89  DBo& operator= ( const DBo& ) = delete;
    90  private:
    91  static unsigned int _memoryLimit;
    92  static unsigned long _flags;
    93  static unsigned int _nextId;
    94  static unsigned int _idCount;
    95  static unsigned int _idCounter;
    96  static unsigned int _idCounterLimit;
    97  unsigned int _id;
    98  mutable set<Property*> _propertySet;
    99  public:
    100  struct CompareById : public std::binary_function<const DBo*,const DBo*,bool> {
    101  template<typename Key>
    102  inline bool operator() ( const Key* lhs, const Key* rhs ) const;
    103  };
    104  };
    105 
    106 
    107 // Inline Functions.
    108  inline set<Property*>& DBo::_getPropertySet () { return _propertySet; }
    109  inline bool DBo::hasProperty () const { return !_propertySet.empty(); }
    110  inline unsigned int DBo::getId () const { return _id; }
    111 
    112  template<typename Key>
    113  inline bool DBo::CompareById::operator() ( const Key* lhs, const Key* rhs ) const
    114  { return ((lhs)?lhs->getId():0) < ((rhs)?rhs->getId():0); }
    115 
    116 
    117 // -------------------------------------------------------------------
    118 // Class : "Hurricane::JsonDBo".
    119 
    120  class JsonDBo : public JsonObject {
    121  public:
    122  JsonDBo ( unsigned int flags );
    123  template<typename T> inline void update ( JsonStack&, T );
    124  };
    125 
    126 
    127  template<typename T> inline void JsonDBo::update ( JsonStack& stack, T hobject )
    128  {
    129  JsonObject::update<T>( stack, hobject );
    130  stack.push_back_dbo( dynamic_cast<DBo*>(hobject) );
    131  }
    132 
    133 
    134 } // Hurricane namespace.
    135 
    136 INSPECTOR_P_SUPPORT(Hurricane::DBo);
    void removeProperty(const Name &)
    Name description (API)
    Definition: Name.h:35
    -
    DataBase object root class (API).
    Definition: DBo.h:47
    +
    DataBase object root class (API).
    Definition: DBo.h:45
    void clearProperties()
    -
    bool hasProperty() const
    Definition: DBo.h:111
    +
    bool hasProperty() const
    Definition: DBo.h:109
    Generic Collection auto-pointer.
    Definition: Collection.h:28
    virtual void destroy()
    -
    Property description (API)
    Definition: Property.h:58
    +
    Property description (API)
    Definition: Property.h:56
    Property * getProperty(const Name &) const
    void put(Property *)
    Properties getProperties() const
    @@ -62,7 +61,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/DBos_8h_source.html b/hurricane/doc/hurricane/html/DBos_8h_source.html index c0b63b0a..ee8dae75 100644 --- a/hurricane/doc/hurricane/html/DBos_8h_source.html +++ b/hurricane/doc/hurricane/html/DBos_8h_source.html @@ -47,7 +47,7 @@ $(function() {
    1 // ****************************************************************************************************
    2 // File: ./hurricane/DBos.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_DBOS
    21 #define HURRICANE_DBOS
    22 
    23 #include "hurricane/Collection.h"
    24 
    25 namespace Hurricane {
    26 
    27 class DBo;
    28 
    29 
    30 
    31 // ****************************************************************************************************
    32 // DBos declaration
    33 // ****************************************************************************************************
    34 
    36 
    37 
    38 
    39 // ****************************************************************************************************
    40 // DBoLocator declaration
    41 // ****************************************************************************************************
    42 
    44 
    45 
    46 
    47 // ****************************************************************************************************
    48 // DBoFilter declaration
    49 // ****************************************************************************************************
    50 
    52 
    53 
    54 
    55 // ****************************************************************************************************
    56 // for_each_dbo declaration
    57 // ****************************************************************************************************
    58 
    59 #define for_each_dbo(dbo, dbos)\
    60 /******************************/\
    61 {\
    62  DBoLocator _locator = dbos.getLocator();\
    63  while (_locator.isValid()) {\
    64  DBo* dbo = _locator.getElement();\
    65  _locator.progress();
    66 
    67 
    68 
    69 } // End of Hurricane namespace.
    70 
    71 #endif // HURRICANE_DBOS
    72 
    73 
    74 // ****************************************************************************************************
    75 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    76 // ****************************************************************************************************
    GenericFilter< DBo * > DBoFilter
    Definition: DBos.h:51
    Generic Locator auto-pointer.
    Definition: Locator.h:113
    Generic Filter auto-pointer.
    Definition: Filter.h:27
    -
    DataBase object root class (API).
    Definition: DBo.h:47
    +
    DataBase object root class (API).
    Definition: DBo.h:45
    Generic Collection auto-pointer.
    Definition: Collection.h:28
    GenericLocator< DBo * > DBoLocator
    Definition: DBos.h:43
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/DataBase_8h_source.html b/hurricane/doc/hurricane/html/DataBase_8h_source.html index e0c41487..05e0eb1e 100644 --- a/hurricane/doc/hurricane/html/DataBase_8h_source.html +++ b/hurricane/doc/hurricane/html/DataBase_8h_source.html @@ -48,8 +48,8 @@ $(function() {
    Technology * getTechnology() const
    Definition: DataBase.h:85
    Library * getRootLibrary() const
    Definition: DataBase.h:86
    static DataBase * create()
    -
    The model (API).
    Definition: Cell.h:66
    -
    DataBase object root class (API).
    Definition: DBo.h:47
    +
    The model (API).
    Definition: Cell.h:64
    +
    DataBase object root class (API).
    Definition: DBo.h:45
    The whole DataBase (API).
    Definition: DataBase.h:40
    static DataBase * getDB()
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    @@ -59,7 +59,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/DbU_8h_source.html b/hurricane/doc/hurricane/html/DbU_8h_source.html index 94664f45..2cf65c22 100644 --- a/hurricane/doc/hurricane/html/DbU_8h_source.html +++ b/hurricane/doc/hurricane/html/DbU_8h_source.html @@ -44,61 +44,61 @@ $(function() {
    DbU.h
    -
    1 // -*- C++ -*-
    2 //
    3 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    4 //
    5 // This file is part of Hurricane.
    6 //
    7 // Hurricane is free software: you can redistribute it and/or modify
    8 // it under the terms of the GNU Lesser General Public License as
    9 // published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but
    13 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    14 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    15 // General Public License for more details.
    16 //
    17 // You should have received a copy of the Lesser GNU General Public
    18 // License along with Hurricane. If not, see
    19 // <http://www.gnu.org/licenses/>.
    20 //
    21 // +-----------------------------------------------------------------+
    22 // | H U R R I C A N E |
    23 // | V L S I B a c k e n d D a t a - B a s e |
    24 // | |
    25 // | Author : Remy Escassut |
    26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    27 // | =============================================================== |
    28 // | C++ Header : "./hurricane/DbU.h" |
    29 // +-----------------------------------------------------------------+
    30 
    31 
    32 #ifndef HURRICANE_DBU_H
    33 #define HURRICANE_DBU_H
    34 
    35 
    36 #include <cstdint>
    37 #include <cmath>
    38 #include "hurricane/Commons.h"
    39 
    40 
    41 namespace Hurricane {
    42 
    43  class DataBase;
    44 
    45 
    46  class DbU {
    47  friend class DataBase;
    48  public:
    49  enum FunctionFlags { NoFlags = 0
    50  , NoTechnoUpdate = (1<<0)
    51  };
    52  enum UnitPower { Pico = 1
    53  , Nano
    54  , Micro
    55  , Milli
    56  , Unity
    57  , Kilo
    58  };
    59  enum StringMode { Db = (1<<0)
    60  , Grid = (1<<1)
    61  , Symbolic = (1<<2)
    62  , Physical = (1<<3)
    63  , SmartTruncate = (1<<4)
    64  };
    65  enum SnapMode { Inferior = 1
    66  , Superior = 2
    67  , Nearest = 4
    68  };
    69  public:
    70  typedef std::int64_t Unit;
    71 
    72  public:
    73  static void checkGridBound ( double value );
    74  static void checkLambdaBound ( double value );
    75  static void checkPhysicalBound ( double value, UnitPower p );
    76  // User to DB Converters.
    77  static inline Unit fromDb ( Unit value );
    78  static inline Unit fromGrid ( double value );
    79  static inline Unit fromLambda ( double value );
    80  static inline Unit fromPhysical ( double value, UnitPower p );
    81  // Old naming scheme (was not very clear).
    82  static inline Unit db ( Unit value );
    83  static inline Unit grid ( double value );
    84  static inline Unit lambda ( double value );
    85  static inline Unit physicalToDbu ( double value, UnitPower p );
    86  // Precision & Resolution Managment.
    87  static unsigned int getPrecision ();
    88  static unsigned int getMaximalPrecision ();
    89  static double getResolution ();
    90  static void setPrecision ( unsigned int precision, unsigned int flags=NoFlags );
    91  // Foundry Grid Managment.
    92  static double getUnitPower ( UnitPower p );
    93  static void setPhysicalsPerGrid ( double gridsPerLambda, UnitPower p );
    94  static double getPhysicalsPerGrid ();
    95  static double physicalToGrid ( double physical, UnitPower p );
    96  // Huge Polygon Step Managment.
    97  static inline DbU::Unit getPolygonStep ();
    98  static inline void setPolygonStep ( DbU::Unit );
    99  // Lamba Managment.
    100  static void setGridsPerLambda ( double gridsPerLambda, unsigned int flags=NoFlags );
    101  static double getGridsPerLambda ();
    102  // Snap Grid Managment.
    103  static DbU::Unit getRealSnapGridStep ();
    105  static inline void setRealSnapGridStep ( DbU::Unit step );
    108  static inline void setSymbolicSnapGridStep ( DbU::Unit step );
    109  static DbU::Unit getOnCustomGrid ( DbU::Unit u, DbU::Unit step, SnapMode mode=Nearest );
    110  static inline DbU::Unit getOnPhysicalGrid ( DbU::Unit u, SnapMode mode=Superior );
    111  // Conversions.
    112  static inline Unit toDb ( Unit u );
    113  static inline double toGrid ( Unit u );
    114  static inline double toGrid ( double u );
    115  static inline double toLambda ( Unit u );
    116  static inline double toLambda ( double u );
    117  static inline double toPhysical ( Unit u, UnitPower p );
    118  static inline double toPhysical ( double u, UnitPower p );
    119  // Old naming scheme (not very clear).
    120  static inline Unit getDb ( Unit u );
    121  static inline double getGrid ( Unit u );
    122  static inline double getGrid ( double u );
    123  static inline double getLambda ( Unit u );
    124  static inline double getLambda ( double u );
    125  static inline double getPhysical ( Unit u, UnitPower p );
    126  static inline double getPhysical ( double u, UnitPower p );
    127  static string getValueString ( Unit u, int mode=SmartTruncate );
    128  static string getValueString ( double u, int mode=SmartTruncate );
    129  static Record* getValueRecord ( const Unit* u );
    130  static Slot* getValueSlot ( const string& name, const Unit* u );
    131  static void setStringMode ( unsigned int mode, UnitPower p=Nano );
    132  static void getStringMode ( unsigned int& mode, UnitPower& p );
    133  private:
    134  static void _updateBounds ();
    135 
    136  public:
    137  // Static Attributes: constants.
    138  static const Unit Min;
    139  static const Unit Max;
    140  private:
    141  // Internal: Static Attributes.
    142  static const unsigned int _maximalPrecision;
    143  static unsigned int _precision;
    144  static double _resolution;
    145  static double _gridsPerLambda;
    146  static double _physicalsPerGrid;
    147  static unsigned int _stringMode;
    148  static DbU::UnitPower _stringModeUnitPower;
    149  static DbU::Unit _realSnapGridStep;
    150  static DbU::Unit _symbolicSnapGridStep;
    151  static DbU::Unit _polygonStep;
    152  static double _gridMax;
    153  static double _lambdaMax;
    154  static double _physicalMax;
    155  };
    156 
    157 
    158 // Inline Functions.
    159 // New converter naming scheme.
    160  inline DbU::Unit DbU::fromDb ( DbU::Unit value ) { return value; }
    161  inline DbU::Unit DbU::fromGrid ( double value ) { checkGridBound (value); return (Unit)rint( value/_resolution ); }
    162  inline DbU::Unit DbU::fromLambda ( double value ) { checkLambdaBound (value); return fromGrid(value*_gridsPerLambda); }
    163  inline DbU::Unit DbU::fromPhysical ( double value, UnitPower p ) { checkPhysicalBound(value,p); return fromGrid((value*getUnitPower(p))/_physicalsPerGrid); }
    164  inline DbU::Unit DbU::toDb ( DbU::Unit u ) { return u; }
    165  inline double DbU::toGrid ( DbU::Unit u ) { return _resolution*(double)u; }
    166  inline double DbU::toGrid ( double u ) { return _resolution*u; }
    167  inline double DbU::toLambda ( DbU::Unit u ) { return toGrid(u)/_gridsPerLambda; }
    168  inline double DbU::toLambda ( double u ) { return toGrid(u)/_gridsPerLambda; }
    169  inline double DbU::toPhysical ( DbU::Unit u, UnitPower p ) { return (_physicalsPerGrid*_resolution*(double)u)/getUnitPower(p); }
    170  inline double DbU::toPhysical ( double u, UnitPower p ) { return (_physicalsPerGrid*_resolution*u)/getUnitPower(p); }
    171  inline DbU::Unit DbU::getPolygonStep () { return _polygonStep; }
    172 
    173 // Old converter naming scheme.
    174  inline DbU::Unit DbU::db ( DbU::Unit value ) { return fromDb(value); }
    175  inline DbU::Unit DbU::grid ( double value ) { return fromGrid(value); }
    176  inline DbU::Unit DbU::lambda ( double value ) { return fromLambda(value); }
    177  inline DbU::Unit DbU::physicalToDbu ( double value, UnitPower p ) { return fromPhysical(value,p); }
    178  inline DbU::Unit DbU::getDb ( DbU::Unit u ) { return toDb(u); }
    179  inline double DbU::getGrid ( DbU::Unit u ) { return toGrid(u); }
    180  inline double DbU::getGrid ( double u ) { return toGrid(u); }
    181  inline double DbU::getLambda ( DbU::Unit u ) { return toLambda(u); }
    182  inline double DbU::getLambda ( double u ) { return toLambda(u); }
    183  inline double DbU::getPhysical ( DbU::Unit u, UnitPower p ) { return toPhysical(u,p); }
    184  inline double DbU::getPhysical ( double u, UnitPower p ) { return toPhysical(u,p); }
    185 
    186  inline void DbU::setRealSnapGridStep ( DbU::Unit step ) { _realSnapGridStep = step; }
    187  inline void DbU::setSymbolicSnapGridStep ( DbU::Unit step ) { _symbolicSnapGridStep = step; }
    188  inline void DbU::setPolygonStep ( DbU::Unit step ) { _polygonStep = step; }
    189  inline DbU::Unit DbU::getOnPhysicalGrid ( DbU::Unit u, SnapMode mode ) { return getOnCustomGrid(u, grid(1), mode); }
    190 
    191 
    192 } // End of Hurricane namespace.
    193 
    194 
    195 // inline void jsonWriteDbU ( JsonWriter* w, const std::string& key, long* value )
    196 // { w->key( key ); w->write( value ); }
    197 
    198 
    199 template<>
    200 inline std::string getString ( const std::pair<Hurricane::DbU::Unit,Hurricane::DbU::Unit>& p )
    201 {
    202  return "const std::pair<DbU::Unit,DbU::Unit>";
    203 }
    204 
    205 
    206 template<>
    207 inline Hurricane::Record* getRecord ( const std::pair<Hurricane::DbU::Unit,Hurricane::DbU::Unit>& p )
    208 {
    209  Hurricane::Record* record = NULL;
    210  record = new Hurricane::Record ( "const std::pair<DbU::Unit,DbU::Unit>" );
    211  record->add( Hurricane::DbU::getValueSlot("first" , &p.first ) );
    212  record->add( Hurricane::DbU::getValueSlot("second", &p.second) );
    213  return record;
    214 }
    215 
    216 
    217 template<>
    218 inline std::string getString ( const std::array<Hurricane::DbU::Unit*,3>& a )
    219 {
    220  return "const array<DbU::Unit*,3>";
    221 }
    222 
    223 
    224 template<>
    225 inline Hurricane::Record* getRecord ( const std::array<Hurricane::DbU::Unit*,3>& a )
    226 {
    227  Hurricane::Record* record = NULL;
    228  record = new Hurricane::Record ( "const array<DbU::Unit*,3>" );
    229 
    230  for ( size_t i=0 ; i<a.size() ; ++i ) {
    231  std::string label = "[" + getString(i) + "] ";
    232  record->add( Hurricane::DbU::getValueSlot(label, a[i]) );
    233  }
    234  return record;
    235 }
    236 
    237 
    238 template<>
    239 inline std::string getString ( const std::vector<Hurricane::DbU::Unit>* v )
    240 {
    241  std::string name = "const std::vector<DbU::Unit>:";
    242  return name + getString<size_t>(v->size());
    243 }
    244 
    245 
    246 template<>
    247 inline Hurricane::Record* getRecord ( const std::vector<Hurricane::DbU::Unit>* v )
    248 {
    249  Hurricane::Record* record = NULL;
    250  record = new Hurricane::Record ( "const vector<DbU::Unit>" );
    251 
    252  for ( size_t i=0 ; i<v->size() ; ++i ) {
    253  std::string label = "[" + getString(i) + "] ";
    254  record->add( Hurricane::DbU::getValueSlot(label, &(*v)[i]) );
    255  }
    256  return record;
    257 }
    258 
    259 
    260 #endif // HURRICANE_DBU_H
    static Unit toDb(Unit u)
    Definition: DbU.h:164
    +
    1 // -*- C++ -*-
    2 //
    3 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    4 //
    5 // This file is part of Hurricane.
    6 //
    7 // Hurricane is free software: you can redistribute it and/or modify
    8 // it under the terms of the GNU Lesser General Public License as
    9 // published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but
    13 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    14 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    15 // General Public License for more details.
    16 //
    17 // You should have received a copy of the Lesser GNU General Public
    18 // License along with Hurricane. If not, see
    19 // <http://www.gnu.org/licenses/>.
    20 //
    21 // +-----------------------------------------------------------------+
    22 // | H U R R I C A N E |
    23 // | V L S I B a c k e n d D a t a - B a s e |
    24 // | |
    25 // | Author : Remy Escassut |
    26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    27 // | =============================================================== |
    28 // | C++ Header : "./hurricane/DbU.h" |
    29 // +-----------------------------------------------------------------+
    30 
    31 
    32 #pragma once
    33 #include <cstdint>
    34 #include <cmath>
    35 #include "hurricane/Commons.h"
    36 
    37 
    38 namespace Hurricane {
    39 
    40  class DataBase;
    41 
    42 
    43  class DbU {
    44  friend class DataBase;
    45  public:
    46  enum FunctionFlags { NoFlags = 0
    47  , NoTechnoUpdate = (1<<0)
    48  };
    49  enum UnitPower { Pico = 1
    50  , Nano
    51  , Micro
    52  , Milli
    53  , Unity
    54  , Kilo
    55  };
    56  enum StringMode { Db = (1<<0)
    57  , Grid = (1<<1)
    58  , Symbolic = (1<<2)
    59  , Physical = (1<<3)
    60  , SmartTruncate = (1<<4)
    61  };
    62  enum SnapMode { Inferior = 1
    63  , Superior = 2
    64  , Nearest = 4
    65  };
    66  public:
    67  typedef std::int64_t Unit;
    68 
    69  public:
    70  static void checkGridBound ( double value );
    71  static void checkLambdaBound ( double value );
    72  static void checkPhysicalBound ( double value, UnitPower p );
    73  // User to DB Converters.
    74  static inline Unit fromDb ( Unit value );
    75  static inline Unit fromGrid ( double value );
    76  static inline Unit fromLambda ( double value );
    77  static inline Unit fromPhysical ( double value, UnitPower p );
    78  static inline Unit fromMicrons ( double value );
    79  static inline Unit fromNanos ( double value );
    80  // Old naming scheme (was not very clear).
    81  static inline Unit db ( Unit value );
    82  static inline Unit grid ( double value );
    83  static inline Unit lambda ( double value );
    84  static inline Unit physicalToDbu ( double value, UnitPower p );
    85  // Precision & Resolution Managment.
    86  static unsigned int getPrecision ();
    87  static unsigned int getMaximalPrecision ();
    88  static double getResolution ();
    89  static void setPrecision ( unsigned int precision, unsigned int flags=NoFlags );
    90  // Foundry Grid Managment.
    91  static double getUnitPower ( UnitPower p );
    92  static void setPhysicalsPerGrid ( double gridsPerLambda, UnitPower p );
    93  static double getPhysicalsPerGrid ();
    94  static double physicalToGrid ( double physical, UnitPower p );
    95  // Huge Polygon Step Managment.
    96  static inline DbU::Unit getPolygonStep ();
    97  static inline void setPolygonStep ( DbU::Unit );
    98  // Lamba Managment.
    99  static void setGridsPerLambda ( double gridsPerLambda, unsigned int flags=NoFlags );
    100  static double getGridsPerLambda ();
    101  // Snap Grid Managment.
    102  static DbU::Unit getRealSnapGridStep ();
    104  static inline void setRealSnapGridStep ( DbU::Unit step );
    107  static inline void setSymbolicSnapGridStep ( DbU::Unit step );
    108  static DbU::Unit getOnCustomGrid ( DbU::Unit u, DbU::Unit step, SnapMode mode=Nearest );
    109  static inline DbU::Unit getOnPhysicalGrid ( DbU::Unit u, SnapMode mode=Superior );
    110  static inline DbU::Unit toCeil ( DbU::Unit u, DbU::Unit step );
    111  static inline DbU::Unit toFloor ( DbU::Unit u, DbU::Unit step );
    112  // Conversions.
    113  static inline Unit toDb ( Unit u );
    114  static inline double toGrid ( Unit u );
    115  static inline double toGrid ( double u );
    116  static inline double toLambda ( Unit u );
    117  static inline double toLambda ( double u );
    118  static inline double toPhysical ( Unit u, UnitPower p );
    119  static inline double toPhysical ( double u, UnitPower p );
    120  static inline double toMicrons ( Unit u );
    121  static inline double toNanos ( Unit u );
    122  // Old naming scheme (not very clear).
    123  static inline Unit getDb ( Unit u );
    124  static inline double getGrid ( Unit u );
    125  static inline double getGrid ( double u );
    126  static inline double getLambda ( Unit u );
    127  static inline double getLambda ( double u );
    128  static inline double getPhysical ( Unit u, UnitPower p );
    129  static inline double getPhysical ( double u, UnitPower p );
    130  static string getValueString ( Unit u, int mode=SmartTruncate );
    131  static string getValueString ( double u, int mode=SmartTruncate );
    132  static Record* getValueRecord ( const Unit* u );
    133  static Slot* getValueSlot ( const string& name, const Unit* u );
    134  static void setStringMode ( unsigned int mode, UnitPower p=Nano );
    135  static void getStringMode ( unsigned int& mode, UnitPower& p );
    136  private:
    137  static void _updateBounds ();
    138 
    139  public:
    140  // Static Attributes: constants.
    141  static const Unit Min;
    142  static const Unit Max;
    143  private:
    144  // Internal: Static Attributes.
    145  static const unsigned int _maximalPrecision;
    146  static unsigned int _precision;
    147  static double _resolution;
    148  static double _gridsPerLambda;
    149  static double _physicalsPerGrid;
    150  static unsigned int _stringMode;
    151  static DbU::UnitPower _stringModeUnitPower;
    152  static DbU::Unit _realSnapGridStep;
    153  static DbU::Unit _symbolicSnapGridStep;
    154  static DbU::Unit _polygonStep;
    155  static double _gridMax;
    156  static double _lambdaMax;
    157  static double _physicalMax;
    158  };
    159 
    160 
    161 // Inline Functions.
    162 // New converter naming scheme.
    163  inline DbU::Unit DbU::fromDb ( DbU::Unit value ) { return value; }
    164  inline DbU::Unit DbU::fromGrid ( double value ) { checkGridBound (value); return (Unit)rint( value/_resolution ); }
    165  inline DbU::Unit DbU::fromLambda ( double value ) { checkLambdaBound (value); return fromGrid(value*_gridsPerLambda); }
    166  inline DbU::Unit DbU::fromPhysical ( double value, UnitPower p ) { checkPhysicalBound(value,p); return fromGrid((value*getUnitPower(p))/_physicalsPerGrid); }
    167  inline DbU::Unit DbU::fromMicrons ( double value ) { return fromPhysical(value,UnitPower::Micro); }
    168  inline DbU::Unit DbU::fromNanos ( double value ) { return fromPhysical(value,UnitPower::Nano); }
    169  inline DbU::Unit DbU::toDb ( DbU::Unit u ) { return u; }
    170  inline double DbU::toGrid ( DbU::Unit u ) { return _resolution*(double)u; }
    171  inline double DbU::toGrid ( double u ) { return _resolution*u; }
    172  inline double DbU::toLambda ( DbU::Unit u ) { return toGrid(u)/_gridsPerLambda; }
    173  inline double DbU::toLambda ( double u ) { return toGrid(u)/_gridsPerLambda; }
    174  inline double DbU::toPhysical ( DbU::Unit u, UnitPower p ) { return (_physicalsPerGrid*_resolution*(double)u)/getUnitPower(p); }
    175  inline double DbU::toPhysical ( double u, UnitPower p ) { return (_physicalsPerGrid*_resolution*u)/getUnitPower(p); }
    176  inline double DbU::toMicrons ( Unit u ) { return toPhysical(u,UnitPower::Micro); }
    177  inline double DbU::toNanos ( Unit u ) { return toPhysical(u,UnitPower::Nano); }
    178  inline DbU::Unit DbU::getPolygonStep () { return _polygonStep; }
    179 
    180 // Old converter naming scheme.
    181  inline DbU::Unit DbU::db ( DbU::Unit value ) { return fromDb(value); }
    182  inline DbU::Unit DbU::grid ( double value ) { return fromGrid(value); }
    183  inline DbU::Unit DbU::lambda ( double value ) { return fromLambda(value); }
    184  inline DbU::Unit DbU::physicalToDbu ( double value, UnitPower p ) { return fromPhysical(value,p); }
    185  inline DbU::Unit DbU::getDb ( DbU::Unit u ) { return toDb(u); }
    186  inline double DbU::getGrid ( DbU::Unit u ) { return toGrid(u); }
    187  inline double DbU::getGrid ( double u ) { return toGrid(u); }
    188  inline double DbU::getLambda ( DbU::Unit u ) { return toLambda(u); }
    189  inline double DbU::getLambda ( double u ) { return toLambda(u); }
    190  inline double DbU::getPhysical ( DbU::Unit u, UnitPower p ) { return toPhysical(u,p); }
    191  inline double DbU::getPhysical ( double u, UnitPower p ) { return toPhysical(u,p); }
    192 
    193  inline void DbU::setRealSnapGridStep ( DbU::Unit step ) { _realSnapGridStep = step; }
    194  inline void DbU::setSymbolicSnapGridStep ( DbU::Unit step ) { _symbolicSnapGridStep = step; }
    195  inline void DbU::setPolygonStep ( DbU::Unit step ) { _polygonStep = step; }
    196  inline DbU::Unit DbU::getOnPhysicalGrid ( DbU::Unit u, SnapMode mode ) { return getOnCustomGrid(u, grid(1), mode); }
    197 
    198  inline DbU::Unit DbU::toCeil ( DbU::Unit u, DbU::Unit step )
    199  { DbU::Unit modulo = u % step; return (modulo) ? (u + step - modulo) : u; }
    200 
    201  inline DbU::Unit DbU::toFloor ( DbU::Unit u, DbU::Unit step )
    202  { DbU::Unit modulo = u % step; return (modulo) ? (u - modulo) : u; }
    203 
    204 
    205 } // End of Hurricane namespace.
    206 
    207 
    208 // inline void jsonWriteDbU ( JsonWriter* w, const std::string& key, long* value )
    209 // { w->key( key ); w->write( value ); }
    210 
    211 
    212 template<>
    213 inline std::string getString ( const std::pair<Hurricane::DbU::Unit,Hurricane::DbU::Unit>& p )
    214 {
    215  return "const std::pair<DbU::Unit,DbU::Unit>";
    216 }
    217 
    218 
    219 template<>
    220 inline Hurricane::Record* getRecord ( const std::pair<Hurricane::DbU::Unit,Hurricane::DbU::Unit>& p )
    221 {
    222  Hurricane::Record* record = NULL;
    223  record = new Hurricane::Record ( "const std::pair<DbU::Unit,DbU::Unit>" );
    224  record->add( Hurricane::DbU::getValueSlot("first" , &p.first ) );
    225  record->add( Hurricane::DbU::getValueSlot("second", &p.second) );
    226  return record;
    227 }
    228 
    229 
    230 template<>
    231 inline std::string getString ( const std::array<Hurricane::DbU::Unit*,3>& a )
    232 {
    233  return "const array<DbU::Unit*,3>";
    234 }
    235 
    236 
    237 template<>
    238 inline Hurricane::Record* getRecord ( const std::array<Hurricane::DbU::Unit*,3>& a )
    239 {
    240  Hurricane::Record* record = NULL;
    241  record = new Hurricane::Record ( "const array<DbU::Unit*,3>" );
    242 
    243  for ( size_t i=0 ; i<a.size() ; ++i ) {
    244  std::string label = "[" + getString(i) + "] ";
    245  record->add( Hurricane::DbU::getValueSlot(label, a[i]) );
    246  }
    247  return record;
    248 }
    249 
    250 
    251 template<>
    252 inline std::string getString ( const std::vector<Hurricane::DbU::Unit>* v )
    253 {
    254  std::string name = "const std::vector<DbU::Unit>:";
    255  return name + getString<size_t>(v->size());
    256 }
    257 
    258 
    259 template<>
    260 inline Hurricane::Record* getRecord ( const std::vector<Hurricane::DbU::Unit>* v )
    261 {
    262  Hurricane::Record* record = NULL;
    263  record = new Hurricane::Record ( "const vector<DbU::Unit>" );
    264 
    265  for ( size_t i=0 ; i<v->size() ; ++i ) {
    266  std::string label = "[" + getString(i) + "] ";
    267  record->add( Hurricane::DbU::getValueSlot(label, &(*v)[i]) );
    268  }
    269  return record;
    270 }
    static Unit toDb(Unit u)
    Definition: DbU.h:169
    static DbU::Unit getOnCustomGrid(DbU::Unit u, DbU::Unit step, SnapMode mode=Nearest)
    static unsigned int getPrecision()
    static void setStringMode(unsigned int mode, UnitPower p=Nano)
    static double getResolution()
    -
    Definition: DbU.h:66
    -
    static Unit fromPhysical(double value, UnitPower p)
    Definition: DbU.h:163
    -
    static Unit lambda(double value)
    Definition: DbU.h:176
    +
    Definition: DbU.h:63
    +
    static Unit fromPhysical(double value, UnitPower p)
    Definition: DbU.h:166
    +
    static Unit lambda(double value)
    Definition: DbU.h:183
    static DbU::Unit getOnSymbolicSnapGrid(DbU::Unit u, SnapMode mode=Nearest)
    -
    Definition: DbU.h:59
    -
    static Unit getDb(Unit u)
    Definition: DbU.h:178
    -
    Definition: DbU.h:67
    -
    Definition: DbU.h:65
    -
    static DbU::Unit getOnPhysicalGrid(DbU::Unit u, SnapMode mode=Superior)
    Definition: DbU.h:189
    -
    static void setSymbolicSnapGridStep(DbU::Unit step)
    Definition: DbU.h:187
    -
    static Unit fromLambda(double value)
    Definition: DbU.h:162
    -
    std::int64_t Unit
    Definition: DbU.h:70
    -
    StringMode
    Definition: DbU.h:59
    +
    Definition: DbU.h:56
    +
    static Unit getDb(Unit u)
    Definition: DbU.h:185
    +
    Definition: DbU.h:64
    +
    Definition: DbU.h:62
    +
    static DbU::Unit getOnPhysicalGrid(DbU::Unit u, SnapMode mode=Superior)
    Definition: DbU.h:196
    +
    static void setSymbolicSnapGridStep(DbU::Unit step)
    Definition: DbU.h:194
    +
    static Unit fromLambda(double value)
    Definition: DbU.h:165
    +
    std::int64_t Unit
    Definition: DbU.h:67
    +
    StringMode
    Definition: DbU.h:56
    static void setGridsPerLambda(double gridsPerLambda, unsigned int flags=NoFlags)
    -
    Definition: DbU.h:57
    +
    Definition: DbU.h:54
    static DbU::Unit getOnRealSnapGrid(DbU::Unit u, SnapMode mode=Nearest)
    -
    Definition: DbU.h:60
    +
    Definition: DbU.h:57
    static DbU::Unit getRealSnapGridStep()
    static string getValueString(Unit u, int mode=SmartTruncate)
    -
    static Unit fromDb(Unit value)
    Definition: DbU.h:160
    +
    static Unit fromDb(Unit value)
    Definition: DbU.h:163
    static void setPrecision(unsigned int precision, unsigned int flags=NoFlags)
    -
    Definition: DbU.h:52
    +
    Definition: DbU.h:49
    The whole DataBase (API).
    Definition: DataBase.h:40
    -
    static Unit db(Unit value)
    Definition: DbU.h:174
    -
    Definition: DbU.h:54
    -
    DataBase Unit managment (API).
    Definition: DbU.h:46
    -
    static double toPhysical(Unit u, UnitPower p)
    Definition: DbU.h:169
    +
    static Unit db(Unit value)
    Definition: DbU.h:181
    +
    Definition: DbU.h:51
    +
    DataBase Unit managment (API).
    Definition: DbU.h:43
    +
    static double toPhysical(Unit u, UnitPower p)
    Definition: DbU.h:174
    static double getGridsPerLambda()
    -
    static void setRealSnapGridStep(DbU::Unit step)
    Definition: DbU.h:186
    -
    UnitPower
    Definition: DbU.h:52
    -
    static Unit grid(double value)
    Definition: DbU.h:175
    -
    Definition: DbU.h:56
    -
    static double toGrid(Unit u)
    Definition: DbU.h:165
    -
    Definition: DbU.h:53
    -
    Definition: DbU.h:61
    +
    static void setRealSnapGridStep(DbU::Unit step)
    Definition: DbU.h:193
    +
    UnitPower
    Definition: DbU.h:49
    +
    static Unit grid(double value)
    Definition: DbU.h:182
    +
    Definition: DbU.h:53
    +
    static double toGrid(Unit u)
    Definition: DbU.h:170
    +
    Definition: DbU.h:50
    +
    Definition: DbU.h:58
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    static unsigned int getMaximalPrecision()
    -
    SnapMode
    Definition: DbU.h:65
    +
    SnapMode
    Definition: DbU.h:62
    static DbU::Unit getSymbolicSnapGridStep()
    -
    static Unit fromGrid(double value)
    Definition: DbU.h:161
    -
    static double getLambda(Unit u)
    Definition: DbU.h:181
    -
    static double getGrid(Unit u)
    Definition: DbU.h:179
    -
    static double toLambda(Unit u)
    Definition: DbU.h:167
    -
    Definition: DbU.h:55
    +
    static Unit fromGrid(double value)
    Definition: DbU.h:164
    +
    static double getLambda(Unit u)
    Definition: DbU.h:188
    +
    static double getGrid(Unit u)
    Definition: DbU.h:186
    +
    static double toLambda(Unit u)
    Definition: DbU.h:172
    +
    Definition: DbU.h:52


    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/DebugSession_8h_source.html b/hurricane/doc/hurricane/html/DebugSession_8h_source.html index da10fc46..ce8bf179 100644 --- a/hurricane/doc/hurricane/html/DebugSession_8h_source.html +++ b/hurricane/doc/hurricane/html/DebugSession_8h_source.html @@ -47,7 +47,7 @@ $(function() {
    1 // -*- C++ -*-
    2 //
    3 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    4 //
    5 // This file is part of Hurricane.
    6 //
    7 // Hurricane is free software: you can redistribute it and/or modify
    8 // it under the terms of the GNU Lesser General Public License as
    9 // published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but
    13 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    14 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    15 // General Public License for more details.
    16 //
    17 // You should have received a copy of the Lesser GNU General Public
    18 // License along with Hurricane. If not, see
    19 // <http://www.gnu.org/licenses/>.
    20 //
    21 // +-----------------------------------------------------------------+
    22 // | H U R R I C A N E |
    23 // | V L S I B a c k e n d D a t a - B a s e |
    24 // | |
    25 // | Author : Jean-Paul Chaput |
    26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    27 // | =============================================================== |
    28 // | C++ Header : "./hurricane/DebugSession.h" |
    29 // +-----------------------------------------------------------------+
    30 
    31 
    32 #ifndef HURRICANE_DEBUG_SESSION_H
    33 #define HURRICANE_DEBUG_SESSION_H
    34 
    35 #include <set>
    36 #include <stack>
    37 #include "hurricane/Commons.h"
    38 
    39 
    40 namespace Hurricane {
    41 
    42  class Name;
    43  class Net;
    44  class Cell;
    45 
    46  using std::pair;
    47  using std::make_pair;
    48  using std::set;
    49  using std::stack;
    50 
    51 
    52 // -------------------------------------------------------------------
    53 // Class : "Hurricane::DebugSession".
    54 
    55  class DebugSession {
    56 
    57  public:
    58  // Static Access.
    59  static DebugSession* create ();
    60  static inline DebugSession* get ();
    61  static inline bool isTraced ( const void* symbol );
    62  static inline void isTracedNet ( const Net* );
    63  static inline void addToTrace ( const void* symbol );
    64  static inline void addToTrace ( const Cell*, const Name& );
    65  static inline void addToTrace ( const Net* );
    66  static inline void open ( int minLevel, int maxLevel );
    67  static inline void open ( const void* symbol, int minLevel, int maxLevel );
    68  static inline void close ();
    69  // Singleton Access.
    70  inline bool _isTraced ( const void* symbol ) const;
    71  inline void _addToTrace ( const void* symbol );
    72  void _addToTrace ( const Cell*, const Name& );
    73  inline void _addToTrace ( const Net* net );
    74  // Inspector Management.
    75  Record* _getRecord () const;
    76  string _getString () const;
    77  string _getTypeName () const;
    78 
    79  protected:
    80  // Internal: Attributes.
    81  static DebugSession* _singleton;
    82  set<const void*> _symbols;
    83  stack< pair<int,int> > _levels;
    84 
    85  protected:
    86  // Internal: Constructor & Destructor.
    87  DebugSession ();
    88  ~DebugSession ();
    89  private:
    90  DebugSession ( const DebugSession& );
    91  DebugSession& operator= ( const DebugSession& );
    92  };
    93 
    94 
    95 // Inline Functions.
    96 
    97  void DebugSession::open ( int minLevel, int maxLevel )
    98  {
    99  if (cdebug.getMinLevel() < minLevel) minLevel = cdebug.getMinLevel();
    100  if (cdebug.getMaxLevel() > maxLevel) maxLevel = cdebug.getMaxLevel();
    101 
    102  _singleton->_levels.push( make_pair( cdebug.setMinLevel(minLevel)
    103  , cdebug.setMaxLevel(maxLevel) ) );
    104 
    105  //std::cerr << "DebugSession::open() " << minLevel << ":" << maxLevel << std::endl;
    106  }
    107 
    108 
    109  void DebugSession::open ( const void* symbol, int minLevel, int maxLevel )
    110  {
    111  if (cdebug.getMinLevel() < minLevel) minLevel = cdebug.getMinLevel();
    112  if (cdebug.getMaxLevel() > maxLevel) maxLevel = cdebug.getMaxLevel();
    113 
    114  if ( _singleton->_isTraced(symbol) ) {
    115  _singleton->_levels.push( make_pair( cdebug.setMinLevel(minLevel)
    116  , cdebug.setMaxLevel(maxLevel) ) );
    117 
    118  //std::cerr << "DebugSession::open() " << symbol << " " << minLevel << ":" << maxLevel << std::endl;
    119  } else {
    120  _singleton->_levels.push ( make_pair( cdebug.getMinLevel()
    121  , cdebug.getMaxLevel() ) );
    122 
    123  //std::cerr << "DebugSession::open() Same level " << minLevel << ":" << maxLevel << std::endl;
    124  }
    125  }
    126 
    127 
    129  {
    130  if ( not _singleton->_levels.empty() ) {
    131  cdebug.setMinLevel( _singleton->_levels.top().first );
    132  cdebug.setMaxLevel( _singleton->_levels.top().second );
    133  _singleton->_levels.pop ();
    134 
    135  //std::cerr << "DebugSession::close() " << cdebug.getMinLevel() << ":" << cdebug.getMaxLevel() << std::endl;
    136  }
    137  }
    138 
    139 
    140  DebugSession* DebugSession::get () { return _singleton; }
    141  bool DebugSession::isTraced ( const void* symbol ) { return _singleton->_isTraced(symbol); }
    142  void DebugSession::addToTrace ( const void* symbol ) { _singleton->_addToTrace(symbol); }
    143  void DebugSession::addToTrace ( const Net* net ) { _singleton->_addToTrace(net); }
    144  void DebugSession::addToTrace ( const Cell* cell
    145  , const Name& name ) { _singleton->_addToTrace( cell, name ); }
    146  bool DebugSession::_isTraced ( const void* symbol ) const { return _symbols.find(symbol) != _symbols.end(); }
    147  void DebugSession::_addToTrace ( const void* symbol ) { _symbols.insert( symbol ); }
    148  void DebugSession::_addToTrace ( const Net* net ) { _addToTrace( static_cast<const void*>(net) ); }
    149 
    150 
    151 
    152 } // Hurricane namespace.
    153 
    154 
    155 INSPECTOR_P_SUPPORT(Hurricane::DebugSession);
    156 
    157 
    158 #endif // HURRICANE_DEBUG_SESSION_H
    static void addToTrace(const void *symbol)
    Definition: DebugSession.h:142
    Name description (API)
    Definition: Name.h:35
    int setMaxLevel(int)
    Definition: Commons.h:1044
    -
    The model (API).
    Definition: Cell.h:66
    +
    The model (API).
    Definition: Cell.h:64
    static void close()
    Definition: DebugSession.h:128
    int setMinLevel(int)
    Definition: Commons.h:1043
    int getMinLevel() const
    Definition: Commons.h:1041
    @@ -62,7 +62,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Diagonal_8h_source.html b/hurricane/doc/hurricane/html/Diagonal_8h_source.html index 6e64f5da..c1f7b19a 100644 --- a/hurricane/doc/hurricane/html/Diagonal_8h_source.html +++ b/hurricane/doc/hurricane/html/Diagonal_8h_source.html @@ -47,7 +47,7 @@ $(function() {
    1 // -*- C++ -*-
    2 //
    3 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    4 //
    5 // This file is part of Hurricane.
    6 //
    7 // Hurricane is free software: you can redistribute it and/or modify
    8 // it under the terms of the GNU Lesser General Public License as
    9 // published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but
    13 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    14 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    15 // General Public License for more details.
    16 //
    17 // You should have received a copy of the Lesser GNU General Public
    18 // License along with Hurricane. If not, see
    19 // <http://www.gnu.org/licenses/>.
    20 //
    21 // +-----------------------------------------------------------------+
    22 // | H U R R I C A N E |
    23 // | V L S I B a c k e n d D a t a - B a s e |
    24 // | |
    25 // | Authors : Jean-Paul Chaput |
    26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    27 // | =============================================================== |
    28 // | C++ Header : "./hurricane/Diagonal.h" |
    29 // +-----------------------------------------------------------------+
    30 
    31 
    32 #ifndef HURRICANE_DIAGONAL_H
    33 #define HURRICANE_DIAGONAL_H
    34 
    35 #include "hurricane/Component.h"
    36 
    37 
    38 namespace Hurricane {
    39 
    40  class Layer;
    41 
    42 
    43 // -------------------------------------------------------------------
    44 // Class : "Diagonal".
    45 
    46  class Diagonal : public Component {
    47  public:
    48  typedef Component Super;
    49 
    50  public:
    51  static Diagonal* create ( Net*, const Layer*, const Point& source, const Point& target, DbU::Unit width );
    52  // Accessors.
    53  virtual bool isNonRectangle () const;
    54  virtual DbU::Unit getX () const;
    55  virtual DbU::Unit getY () const;
    56  virtual DbU::Unit getSourceX () const;
    57  virtual DbU::Unit getSourceY () const;
    58  virtual DbU::Unit getTargetX () const;
    59  virtual DbU::Unit getTargetY () const;
    60  virtual Point getSourcePosition () const;
    61  virtual Point getTargetPosition () const;
    62  virtual Box getBoundingBox () const;
    63  virtual Box getBoundingBox ( const BasicLayer* ) const;
    64  virtual size_t getPointsSize () const;
    65  virtual Point getPoint ( size_t i ) const;
    66  DbU::Unit getWidth () const;
    67  virtual const Layer* getLayer () const;
    68  // Mutators.
    69  void setLayer ( const Layer* );
    70  void setWidth ( DbU::Unit );
    71  virtual void translate ( const DbU::Unit& dx, const DbU::Unit& dy );
    72  void setSource ( Point );
    73  void setTarget ( Point );
    74  // Hurricane management.
    75  virtual void _toJson ( JsonWriter* ) const;
    76  static JsonObject* getJsonObject ( unsigned long flags );
    77  virtual string _getTypeName () const;
    78  virtual string _getString () const;
    79  virtual Record* _getRecord () const;
    80  protected:
    81  Diagonal ( Net*, const Layer*, const Point& source, const Point& target, DbU::Unit width );
    82  void _updateB ();
    83  private:
    84  const Layer* _layer;
    85  Point _source;
    86  Point _target;
    87  DbU::Unit _width;
    88  DbU::Unit _B; // octagon half Y.
    89  };
    90 
    91 
    92 // -------------------------------------------------------------------
    93 // Class : "JsonRoutingDiagonal".
    94 
    95  class JsonDiagonal : public JsonComponent {
    96  public:
    97  static void initialize ();
    98  JsonDiagonal ( unsigned long flags );
    99  virtual std::string getTypeName () const;
    100  virtual JsonDiagonal* clone ( unsigned long ) const;
    101  virtual void toData ( JsonStack& );
    102  };
    103 
    104 } // Hurricane namespace.
    105 
    106 
    107 INSPECTOR_P_SUPPORT(Hurricane::Diagonal);
    108 
    109 #endif // HURRICANE_DIAGONAL_H
    BasicLayer description (API)
    Definition: BasicLayer.h:44
    Component description (API)
    Definition: Component.h:42
    Support for JSON export.
    Definition: JsonObject.h:83
    -
    std::int64_t Unit
    Definition: DbU.h:70
    +
    std::int64_t Unit
    Definition: DbU.h:67
    Diagonal description (API)
    Definition: Diagonal.h:46
    Point description (API)
    Definition: Point.h:32
    JSON Parser Stack.
    Definition: JsonObject.h:249
    @@ -62,7 +62,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/DiffusionLayer_8h_source.html b/hurricane/doc/hurricane/html/DiffusionLayer_8h_source.html index e1fbc747..a70f1507 100644 --- a/hurricane/doc/hurricane/html/DiffusionLayer_8h_source.html +++ b/hurricane/doc/hurricane/html/DiffusionLayer_8h_source.html @@ -47,8 +47,8 @@ $(function() {
    1 // -*- C++ -*-
    2 //
    3 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    4 //
    5 // This file is part of Hurricane.
    6 //
    7 // Hurricane is free software: you can redistribute it and/or modify
    8 // it under the terms of the GNU Lesser General Public License as
    9 // published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but
    13 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    14 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    15 // General Public License for more details.
    16 //
    17 // You should have received a copy of the Lesser GNU General Public
    18 // License along with Hurricane. If not, see
    19 // <http://www.gnu.org/licenses/>.
    20 //
    21 // +-----------------------------------------------------------------+
    22 // | H U R R I C A N E |
    23 // | V L S I B a c k e n d D a t a - B a s e |
    24 // | |
    25 // | Author : Jean-Paul Chaput |
    26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    27 // | =============================================================== |
    28 // | C++ Header : "./hurricane/DiffusionLayer.h" |
    29 // +-----------------------------------------------------------------+
    30 
    31 
    32 #ifndef HURRICANE_DIFFUSION_LAYER_H
    33 #define HURRICANE_DIFFUSION_LAYER_H
    34 
    35 #include <vector>
    36 
    37 #include "hurricane/Layer.h"
    38 
    39 
    40 namespace Hurricane {
    41 
    42 // -------------------------------------------------------------------
    43 // Class : "Hurricane::DiffusionLayer".
    44 
    45  class DiffusionLayer : public Layer {
    46  public:
    47  typedef Layer Super;
    48 
    49  public:
    50  // Constructor.
    51  static DiffusionLayer* create ( Technology* technology
    52  , const Name& name
    53  , BasicLayer* activeLayer
    54  , BasicLayer* diffusionLayer
    55  , BasicLayer* wellLayer
    56  );
    57  // Accessors.
    58  virtual BasicLayers getBasicLayers () const;
    59  virtual DbU::Unit getExtentionCap () const;
    60  virtual DbU::Unit getExtentionWidth () const;
    61  virtual DbU::Unit getExtentionCap ( const BasicLayer* layer ) const;
    62  virtual DbU::Unit getExtentionWidth ( const BasicLayer* layer ) const;
    63  // Updators.
    64  virtual void setExtentionCap ( const BasicLayer* layer, DbU::Unit cap );
    65  virtual void setExtentionWidth ( const BasicLayer* layer, DbU::Unit width );
    66  // Hurricane Managment.
    67  virtual void _toJson ( JsonWriter* ) const;
    68  virtual void _onDbuChange ( float scale );
    69  virtual string _getTypeName () const;
    70  virtual string _getString () const;
    71  virtual Record* _getRecord () const;
    72 
    73  private:
    74  // Internal: Attributes
    75  vector<BasicLayer*> _basicLayers;
    76  vector<DbU::Unit> _extentionCaps;
    77  vector<DbU::Unit> _extentionWidths;
    78  DbU::Unit _maximalExtentionCap;
    79  DbU::Unit _maximalExtentionWidth;
    80 
    81  protected:
    82  // Internal: Constructors & Destructors.
    83  DiffusionLayer ( Technology* technology
    84  , const Name& name
    85  , BasicLayer* activeLayer
    86  , BasicLayer* diffusionLayer
    87  , BasicLayer* wellLayer
    88  );
    89  };
    90 
    91 
    92 // -------------------------------------------------------------------
    93 // Class : "Hurricane::JsonDiffusionLayer".
    94 
    95  class JsonDiffusionLayer : public JsonLayer {
    96  public:
    97  static void initialize ();
    98  JsonDiffusionLayer ( unsigned long flags );
    99  ~JsonDiffusionLayer ();
    100  virtual string getTypeName () const;
    101  virtual JsonDiffusionLayer* clone ( unsigned long ) const;
    102  virtual void toData ( JsonStack& );
    103  };
    104 
    105 
    106 } // End of Hurricane namespace.
    107 
    108 
    109 INSPECTOR_P_SUPPORT(Hurricane::DiffusionLayer);
    110 
    111 
    112 #endif
    BasicLayer description (API)
    Definition: BasicLayer.h:44
    DiffusionLayer description (API)
    Definition: DiffusionLayer.h:45
    Name description (API)
    Definition: Name.h:35
    -
    std::int64_t Unit
    Definition: DbU.h:70
    -
    DataBase object root class (API).
    Definition: DBo.h:47
    +
    std::int64_t Unit
    Definition: DbU.h:67
    +
    DataBase object root class (API).
    Definition: DBo.h:45
    JSON Parser Stack.
    Definition: JsonObject.h:249
    Layer description (API)
    Definition: Layer.h:52
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    @@ -59,7 +59,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Entities_8h_source.html b/hurricane/doc/hurricane/html/Entities_8h_source.html index 23cb6175..b3159258 100644 --- a/hurricane/doc/hurricane/html/Entities_8h_source.html +++ b/hurricane/doc/hurricane/html/Entities_8h_source.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Entity_8h_source.html b/hurricane/doc/hurricane/html/Entity_8h_source.html index 2cb79409..18c9b106 100644 --- a/hurricane/doc/hurricane/html/Entity_8h_source.html +++ b/hurricane/doc/hurricane/html/Entity_8h_source.html @@ -44,11 +44,10 @@ $(function() {
    Entity.h
    -
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Entity.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_ENTITY
    21 #define HURRICANE_ENTITY
    22 
    23 #include <functional>
    24 #include "hurricane/DBo.h"
    25 #include "hurricane/Entities.h"
    26 #include "hurricane/Box.h"
    27 
    28 namespace Hurricane {
    29 
    30  class Cell;
    31  class Quark;
    32  class SharedPath;
    33 
    34 
    35 // -------------------------------------------------------------------
    36 // Class : "Hurricane::Entity".
    37 
    38  class Entity : public DBo
    39  {
    40  public:
    41  typedef DBo Inherit;
    42  public:
    43  virtual Cell* getCell () const = 0;
    44  virtual Box getBoundingBox () const = 0;
    45  virtual void _toJson ( JsonWriter* ) const;
    46  virtual string _getString () const;
    47  virtual Record* _getRecord () const;
    48  Quark* _getQuark ( SharedPath* sharedPath = NULL ) const;
    49  protected:
    50  Entity ();
    51  virtual ~Entity () throw(Error);
    52  virtual void _postCreate ();
    53  virtual void _preDestroy ();
    54  };
    55 
    56 
    57 // -------------------------------------------------------------------
    58 // Class : "Hurricane::JsonEntity".
    59 
    60  class JsonEntity : public JsonDBo {
    61  public:
    62  JsonEntity ( unsigned long flags );
    63  template<typename T> inline void update ( JsonStack&, T );
    64  };
    65 
    66 
    67  template<typename T> inline void JsonEntity::update ( JsonStack& stack, T hobject )
    68  {
    69  unsigned int jsonId = get<int64_t>(stack,"_id");
    70 
    71  JsonDBo::update<T>( stack, hobject );
    72  stack.addEntity( jsonId, hobject );
    73  }
    74 
    75 
    76 // -------------------------------------------------------------------
    77 // Class : "JsonEntityRef".
    78 
    79  class JsonEntityRef : public JsonObject {
    80  public:
    81  static void initialize ();
    82  JsonEntityRef ( unsigned long flags );
    83  virtual string getTypeName () const;
    84  virtual JsonEntityRef* clone ( unsigned long ) const;
    85  virtual void toData ( JsonStack& );
    86  };
    87 
    88 
    89 } // Hurricane namespace.
    90 
    91 
    92 INSPECTOR_P_SUPPORT(Hurricane::Entity);
    93 
    94 
    95 #endif // HURRICANE_ENTITY
    96 
    97 // ****************************************************************************************************
    98 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    99 // ****************************************************************************************************
    Quark description (API)
    Definition: Quark.h:35
    -
    Error description (API)
    Definition: Error.h:43
    -
    The model (API).
    Definition: Cell.h:66
    -
    DataBase object root class (API).
    Definition: DBo.h:47
    -
    Occurrenceable objects root class (API).
    Definition: Entity.h:38
    +
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Entity.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #pragma once
    21 #include <functional>
    22 #include "hurricane/DBo.h"
    23 #include "hurricane/Entities.h"
    24 #include "hurricane/Box.h"
    25 
    26 namespace Hurricane {
    27 
    28  class Cell;
    29  class Quark;
    30  class SharedPath;
    31 
    32 
    33 // -------------------------------------------------------------------
    34 // Class : "Hurricane::Entity".
    35 
    36  class Entity : public DBo
    37  {
    38  public:
    39  typedef DBo Inherit;
    40  public:
    41  virtual Cell* getCell () const = 0;
    42  virtual Box getBoundingBox () const = 0;
    43  virtual void _toJson ( JsonWriter* ) const;
    44  virtual string _getString () const;
    45  virtual Record* _getRecord () const;
    46  Quark* _getQuark ( SharedPath* sharedPath = NULL ) const;
    47  protected:
    48  Entity ();
    49  virtual ~Entity ();
    50  virtual void _postCreate ();
    51  virtual void _preDestroy ();
    52  };
    53 
    54 
    55 // -------------------------------------------------------------------
    56 // Class : "Hurricane::JsonEntity".
    57 
    58  class JsonEntity : public JsonDBo {
    59  public:
    60  JsonEntity ( unsigned long flags );
    61  template<typename T> inline void update ( JsonStack&, T );
    62  };
    63 
    64 
    65  template<typename T> inline void JsonEntity::update ( JsonStack& stack, T hobject )
    66  {
    67  unsigned int jsonId = get<int64_t>(stack,"_id");
    68 
    69  JsonDBo::update<T>( stack, hobject );
    70  stack.addEntity( jsonId, hobject );
    71  }
    72 
    73 
    74 // -------------------------------------------------------------------
    75 // Class : "JsonEntityRef".
    76 
    77  class JsonEntityRef : public JsonObject {
    78  public:
    79  static void initialize ();
    80  JsonEntityRef ( unsigned long flags );
    81  virtual string getTypeName () const;
    82  virtual JsonEntityRef* clone ( unsigned long ) const;
    83  virtual void toData ( JsonStack& );
    84  };
    85 
    86 
    87 } // Hurricane namespace.
    88 
    89 
    90 INSPECTOR_P_SUPPORT(Hurricane::Entity);
    91 
    92 // ****************************************************************************************************
    93 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    94 // ****************************************************************************************************
    Quark description (API)
    Definition: Quark.h:35
    +
    The model (API).
    Definition: Cell.h:64
    +
    DataBase object root class (API).
    Definition: DBo.h:45
    +
    Occurrenceable objects root class (API).
    Definition: Entity.h:36
    JSON Parser Stack.
    Definition: JsonObject.h:249
    Box description (API)
    Definition: Box.h:31
    @@ -60,7 +59,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Error_8h_source.html b/hurricane/doc/hurricane/html/Error_8h_source.html index 6774e1a9..e76b6574 100644 --- a/hurricane/doc/hurricane/html/Error_8h_source.html +++ b/hurricane/doc/hurricane/html/Error_8h_source.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Exception_8h_source.html b/hurricane/doc/hurricane/html/Exception_8h_source.html index 58b03d62..dbbf3811 100644 --- a/hurricane/doc/hurricane/html/Exception_8h_source.html +++ b/hurricane/doc/hurricane/html/Exception_8h_source.html @@ -56,7 +56,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Filter_8h_source.html b/hurricane/doc/hurricane/html/Filter_8h_source.html index 368fa184..bd3d8f3c 100644 --- a/hurricane/doc/hurricane/html/Filter_8h_source.html +++ b/hurricane/doc/hurricane/html/Filter_8h_source.html @@ -61,7 +61,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Go_8h_source.html b/hurricane/doc/hurricane/html/Go_8h_source.html index 0ce80f61..8e9dac44 100644 --- a/hurricane/doc/hurricane/html/Go_8h_source.html +++ b/hurricane/doc/hurricane/html/Go_8h_source.html @@ -44,18 +44,17 @@ $(function() {
    Go.h
    -
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Go.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_GO
    21 #define HURRICANE_GO
    22 
    23 #include "hurricane/Entity.h"
    24 #include "hurricane/Gos.h"
    25 #include "hurricane/Transformation.h"
    26 
    27 namespace Hurricane {
    28 
    29 class BasicLayer;
    30 class QuadTree;
    31 
    32 // ****************************************************************************************************
    33 // Go declaration
    34 // ****************************************************************************************************
    35 
    36 class Go : public Entity {
    37 // *********************
    38 
    39 // Friends
    40 // *******
    41 
    42  friend class QuadTree;
    43 
    44 // Types
    45 // *****
    46 
    47  public: typedef Entity Inherit;
    48 
    49 // Attributes
    50 // **********
    51 
    52  private: QuadTree* _quadTree;
    53  private: Go* _nextOfQuadTreeGoSet;
    54 
    55 // Constructors
    56 // ************
    57 
    58  protected: Go();
    59  protected: virtual ~Go() throw(Error);
    60 
    61 // Predicates
    62 // **********
    63 
    64  public: static bool autoMaterializationIsDisabled();
    65 
    66  public: bool isMaterialized() const {return (_quadTree != NULL);};
    67 
    68 // Updators
    69 // ********
    70 
    71  public: static void enableAutoMaterialization();
    72  public: static void disableAutoMaterialization();
    73 
    74  public: virtual void materialize() = 0;
    75  public: virtual void unmaterialize() = 0;
    76 
    77  public: virtual void invalidate(bool propagateFlag = true);
    78  // implementation located on file UpdateSession.cpp to access local variables
    79 
    80  public: virtual void translate(const DbU::Unit& dx, const DbU::Unit& dy) = 0;
    81 
    82 // Others
    83 // ******
    84 
    85  protected: virtual void _postCreate();
    86 
    87  protected: virtual void _preDestroy();
    88 
    89  public: virtual string _getString() const;
    90  public: virtual Record* _getRecord() const;
    91  public: Go* _getNextOfQuadTreeGoSet() const {return _nextOfQuadTreeGoSet;};
    92 
    93  public: void _setNextOfQuadTreeGoSet(Go* go) {_nextOfQuadTreeGoSet = go;};
    94 
    95 };
    96 
    97 
    98 } // End of Hurricane namespace.
    99 
    100 
    101 INSPECTOR_P_SUPPORT(Hurricane::Go);
    102 
    103 
    104 #endif // HURRICANE_GO
    105 
    106 
    107 // ****************************************************************************************************
    108 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    109 // ****************************************************************************************************
    Go description (API)
    Definition: Go.h:36
    +
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Go.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #pragma once
    21 #include "hurricane/Entity.h"
    22 #include "hurricane/Gos.h"
    23 #include "hurricane/Transformation.h"
    24 
    25 namespace Hurricane {
    26 
    27 class BasicLayer;
    28 class QuadTree;
    29 
    30 // ****************************************************************************************************
    31 // Go declaration
    32 // ****************************************************************************************************
    33 
    34 class Go : public Entity {
    35 // *********************
    36 
    37 // Friends
    38 // *******
    39 
    40  friend class QuadTree;
    41 
    42 // Types
    43 // *****
    44 
    45  public: typedef Entity Inherit;
    46 
    47 // Attributes
    48 // **********
    49 
    50  private: QuadTree* _quadTree;
    51  private: Go* _nextOfQuadTreeGoSet;
    52 
    53 // Constructors
    54 // ************
    55 
    56  protected: Go();
    57  protected: virtual ~Go();
    58 
    59 // Predicates
    60 // **********
    61 
    62  public: static bool autoMaterializationIsDisabled();
    63 
    64  public: bool isMaterialized() const {return (_quadTree != NULL);};
    65 
    66 // Updators
    67 // ********
    68 
    69  public: static void enableAutoMaterialization();
    70  public: static void disableAutoMaterialization();
    71 
    72  public: virtual void materialize() = 0;
    73  public: virtual void unmaterialize() = 0;
    74 
    75  public: virtual void invalidate(bool propagateFlag = true);
    76  // implementation located on file UpdateSession.cpp to access local variables
    77 
    78  public: virtual void translate(const DbU::Unit& dx, const DbU::Unit& dy) = 0;
    79 
    80 // Others
    81 // ******
    82 
    83  protected: virtual void _postCreate();
    84 
    85  protected: virtual void _preDestroy();
    86 
    87  public: virtual string _getString() const;
    88  public: virtual Record* _getRecord() const;
    89  public: Go* _getNextOfQuadTreeGoSet() const {return _nextOfQuadTreeGoSet;};
    90 
    91  public: void _setNextOfQuadTreeGoSet(Go* go) {_nextOfQuadTreeGoSet = go;};
    92 
    93 };
    94 
    95 
    96 } // End of Hurricane namespace.
    97 
    98 
    99 INSPECTOR_P_SUPPORT(Hurricane::Go);
    100 
    101 
    102 // ****************************************************************************************************
    103 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    104 // ****************************************************************************************************
    Go description (API)
    Definition: Go.h:34
    static bool autoMaterializationIsDisabled()
    virtual void translate(const DbU::Unit &dx, const DbU::Unit &dy)=0
    -
    Error description (API)
    Definition: Error.h:43
    virtual void invalidate(bool propagateFlag=true)
    -
    std::int64_t Unit
    Definition: DbU.h:70
    -
    DataBase object root class (API).
    Definition: DBo.h:47
    +
    std::int64_t Unit
    Definition: DbU.h:67
    +
    DataBase object root class (API).
    Definition: DBo.h:45
    static void disableAutoMaterialization()
    virtual void unmaterialize()=0
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    -
    bool isMaterialized() const
    Definition: Go.h:66
    +
    bool isMaterialized() const
    Definition: Go.h:64
    QuadTree description (API)
    Definition: QuadTree.h:33
    static void enableAutoMaterialization()
    virtual void materialize()=0
    @@ -64,7 +63,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Gos_8h_source.html b/hurricane/doc/hurricane/html/Gos_8h_source.html index 6e534d0e..231b6170 100644 --- a/hurricane/doc/hurricane/html/Gos_8h_source.html +++ b/hurricane/doc/hurricane/html/Gos_8h_source.html @@ -44,7 +44,7 @@ $(function() {
    Gos.h
    -
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Gos.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_GOS
    21 #define HURRICANE_GOS
    22 
    23 #include "hurricane/Collection.h"
    24 
    25 namespace Hurricane {
    26 
    27 class Go;
    28 
    29 
    30 
    31 // ****************************************************************************************************
    32 // Gos declaration
    33 // ****************************************************************************************************
    34 
    36 
    37 
    38 
    39 // ****************************************************************************************************
    40 // GoLocator declaration
    41 // ****************************************************************************************************
    42 
    44 
    45 
    46 
    47 // ****************************************************************************************************
    48 // GoFilter declaration
    49 // ****************************************************************************************************
    50 
    52 
    53 
    54 
    55 // ****************************************************************************************************
    56 // for_each_go declaration
    57 // ****************************************************************************************************
    58 
    59 #define for_each_go(go, gos)\
    60 /***************************/\
    61 {\
    62  GoLocator _locator = gos.getLocator();\
    63  while (_locator.isValid()) {\
    64  Go* go = _locator.getElement();\
    65  _locator.progress();
    66 
    67 
    68 
    69 } // End of Hurricane namespace.
    70 
    71 #endif // HURRICANE_GOS
    72 
    73 
    74 // ****************************************************************************************************
    75 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    76 // ****************************************************************************************************
    Go description (API)
    Definition: Go.h:36
    +
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Gos.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_GOS
    21 #define HURRICANE_GOS
    22 
    23 #include "hurricane/Collection.h"
    24 
    25 namespace Hurricane {
    26 
    27 class Go;
    28 
    29 
    30 
    31 // ****************************************************************************************************
    32 // Gos declaration
    33 // ****************************************************************************************************
    34 
    36 
    37 
    38 
    39 // ****************************************************************************************************
    40 // GoLocator declaration
    41 // ****************************************************************************************************
    42 
    44 
    45 
    46 
    47 // ****************************************************************************************************
    48 // GoFilter declaration
    49 // ****************************************************************************************************
    50 
    52 
    53 
    54 
    55 // ****************************************************************************************************
    56 // for_each_go declaration
    57 // ****************************************************************************************************
    58 
    59 #define for_each_go(go, gos)\
    60 /***************************/\
    61 {\
    62  GoLocator _locator = gos.getLocator();\
    63  while (_locator.isValid()) {\
    64  Go* go = _locator.getElement();\
    65  _locator.progress();
    66 
    67 
    68 
    69 } // End of Hurricane namespace.
    70 
    71 #endif // HURRICANE_GOS
    72 
    73 
    74 // ****************************************************************************************************
    75 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    76 // ****************************************************************************************************
    Go description (API)
    Definition: Go.h:34
    GenericFilter< Go * > GoFilter
    Definition: Gos.h:51
    GenericCollection< Go * > Gos
    Definition: Gos.h:27
    Generic Locator auto-pointer.
    Definition: Locator.h:113
    @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Hook_8h_source.html b/hurricane/doc/hurricane/html/Hook_8h_source.html index 896eae6d..6c06a522 100644 --- a/hurricane/doc/hurricane/html/Hook_8h_source.html +++ b/hurricane/doc/hurricane/html/Hook_8h_source.html @@ -44,12 +44,11 @@ $(function() {
    Hook.h
    -
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Hook.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_HOOK
    21 #define HURRICANE_HOOK
    22 
    23 #include "hurricane/Error.h"
    24 #include "hurricane/Hooks.h"
    25 
    26 namespace Hurricane {
    27 
    28 class Component;
    29 
    30 
    31 
    32 // ****************************************************************************************************
    33 // Hook declaration
    34 // ****************************************************************************************************
    35 
    36 class Hook {
    37 // *********
    38 
    39  typedef Hook* (*compToHook_t)(Component*);
    40 
    41 // Attributes
    42 // **********
    43 
    44  private: static map<string,compToHook_t> _compToHookMap;
    45  private: Hook* _nextHook;
    46 
    47 // Constructors
    48 // ************
    49 
    50  protected: Hook();
    51 
    52  private: Hook(const Hook& hook); // not implemented to forbid copy construction
    53 
    54 // Destructor
    55 // **********
    56 
    57  protected: virtual ~Hook() throw(Error);
    58 
    59 // Operators
    60 // *********
    61 
    62  private: Hook& operator=(const Hook& hook); // not implemented to forbid assignment
    63 
    64 // Accessors
    65 // *********
    66 
    67  public: virtual Component* getComponent() const = 0;
    68 
    69  public: Hook* getNextHook() const;
    70  public: Hook* getPreviousHook() const;
    71 
    72  public: Hook* getMasterHook() const;
    73  public: Hook* getNextMasterHook() const;
    74  public: Hook* getPreviousMasterHook() const;
    75 
    76  public: Hooks getHooks() const;
    77  public: Hooks getSlaveHooks() const;
    78 
    79 // Filters
    80 // *******
    81 
    82  public: static HookFilter getIsMasterFilter();
    83 
    84 // Predicates
    85 // **********
    86 
    87  public: virtual bool isMaster() const = 0;
    88 
    89  public: bool isAttached() const;
    90 
    91 // Updators
    92 // ********
    93 
    94  public: Hook* detach();
    95  public: Hook* attach(Hook* hook);
    96  public: Hook* merge(Hook* hook);
    97  public: void _setNextHook(Hook* hook);
    98 
    99 // Others
    100 // ******
    101 
    102  public: static void addCompToHook(const string&, compToHook_t );
    103  public: static Hook* compToHook(const string& tname, Component* );
    104  public: string toJson() const;
    105  public: virtual string _getTypeName() const = 0;
    106  public: virtual string _getString() const = 0;
    107  public: virtual Record* _getRecord() const;
    108 
    109 };
    110 
    111 
    112 } // End of Hurricane namespace.
    113 
    114 
    115 INSPECTOR_P_SUPPORT(Hurricane::Hook);
    116 
    117 
    118 #endif // HURRICANE_HOOK
    119 
    120 
    121 // ****************************************************************************************************
    122 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    123 // ****************************************************************************************************
    Hooks getSlaveHooks() const
    +
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Hook.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #pragma once
    21 #include "hurricane/Error.h"
    22 #include "hurricane/Hooks.h"
    23 
    24 namespace Hurricane {
    25 
    26 class Component;
    27 
    28 
    29 
    30 // ****************************************************************************************************
    31 // Hook declaration
    32 // ****************************************************************************************************
    33 
    34 class Hook {
    35 // *********
    36 
    37  typedef Hook* (*compToHook_t)(Component*);
    38 
    39 // Attributes
    40 // **********
    41 
    42  private: static map<string,compToHook_t> _compToHookMap;
    43  private: Hook* _nextHook;
    44 
    45 // Constructors
    46 // ************
    47 
    48  protected: Hook();
    49 
    50  private: Hook(const Hook& hook); // not implemented to forbid copy construction
    51 
    52 // Destructor
    53 // **********
    54 
    55  protected: virtual ~Hook() noexcept(false);
    56 
    57 // Operators
    58 // *********
    59 
    60  private: Hook& operator=(const Hook& hook); // not implemented to forbid assignment
    61 
    62 // Accessors
    63 // *********
    64 
    65  public: virtual Component* getComponent() const = 0;
    66 
    67  public: Hook* getNextHook() const;
    68  public: Hook* getPreviousHook() const;
    69 
    70  public: Hook* getMasterHook() const;
    71  public: Hook* getNextMasterHook() const;
    72  public: Hook* getPreviousMasterHook() const;
    73 
    74  public: Hooks getHooks() const;
    75  public: Hooks getSlaveHooks() const;
    76 
    77 // Filters
    78 // *******
    79 
    80  public: static HookFilter getIsMasterFilter();
    81 
    82 // Predicates
    83 // **********
    84 
    85  public: virtual bool isMaster() const = 0;
    86 
    87  public: bool isAttached() const;
    88 
    89 // Updators
    90 // ********
    91 
    92  public: Hook* detach();
    93  public: Hook* attach(Hook* hook);
    94  public: Hook* merge(Hook* hook);
    95  public: void _setNextHook(Hook* hook);
    96 
    97 // Others
    98 // ******
    99 
    100  public: static void addCompToHook(const string&, compToHook_t );
    101  public: static Hook* compToHook(const string& tname, Component* );
    102  public: string toJson() const;
    103  public: virtual string _getTypeName() const = 0;
    104  public: virtual string _getString() const = 0;
    105  public: virtual Record* _getRecord() const;
    106 
    107 };
    108 
    109 
    110 } // End of Hurricane namespace.
    111 
    112 
    113 INSPECTOR_P_SUPPORT(Hurricane::Hook);
    114 
    115 
    116 // ****************************************************************************************************
    117 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    118 // ****************************************************************************************************
    Hooks getSlaveHooks() const
    Hooks getHooks() const
    virtual bool isMaster() const =0
    Component description (API)
    Definition: Component.h:42
    Hook * getPreviousHook() const
    -
    Error description (API)
    Definition: Error.h:43
    Generic Filter auto-pointer.
    Definition: Filter.h:27
    bool isAttached() const
    virtual Component * getComponent() const =0
    @@ -58,7 +57,7 @@ $(function() {
    Hook * getMasterHook() const
    Hook * getPreviousMasterHook() const
    -
    Hook description (API)
    Definition: Hook.h:36
    +
    Hook description (API)
    Definition: Hook.h:34
    Hook * merge(Hook *hook)
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    Hook * getNextMasterHook() const
    @@ -68,7 +67,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Hooks_8h_source.html b/hurricane/doc/hurricane/html/Hooks_8h_source.html index 7da18b8c..42a418e1 100644 --- a/hurricane/doc/hurricane/html/Hooks_8h_source.html +++ b/hurricane/doc/hurricane/html/Hooks_8h_source.html @@ -49,7 +49,7 @@ $(function() {
    GenericFilter< Hook * > HookFilter
    Definition: Hooks.h:51
    GenericCollection< Hook * > Hooks
    Definition: Hooks.h:27
    Generic Collection auto-pointer.
    Definition: Collection.h:28
    -
    Hook description (API)
    Definition: Hook.h:36
    +
    Hook description (API)
    Definition: Hook.h:34
    GenericLocator< Hook * > HookLocator
    Definition: Hooks.h:43
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Horizontal_8h_source.html b/hurricane/doc/hurricane/html/Horizontal_8h_source.html index aa684022..67496cfa 100644 --- a/hurricane/doc/hurricane/html/Horizontal_8h_source.html +++ b/hurricane/doc/hurricane/html/Horizontal_8h_source.html @@ -50,7 +50,7 @@ $(function() {
    void setY(const DbU::Unit &y)
    Support for JSON export.
    Definition: JsonObject.h:83
    Segment Inherit
    Definition: Horizontal.h:42
    -
    std::int64_t Unit
    Definition: DbU.h:70
    +
    std::int64_t Unit
    Definition: DbU.h:67
    Point description (API)
    Definition: Point.h:32
    Horizontal description (API)
    Definition: Horizontal.h:36
    Box description (API)
    Definition: Box.h:31
    @@ -65,7 +65,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Horizontals_8h_source.html b/hurricane/doc/hurricane/html/Horizontals_8h_source.html index d9b188e1..3cedb504 100644 --- a/hurricane/doc/hurricane/html/Horizontals_8h_source.html +++ b/hurricane/doc/hurricane/html/Horizontals_8h_source.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/HyperNet_8h_source.html b/hurricane/doc/hurricane/html/HyperNet_8h_source.html index 25dfa54d..c958f629 100644 --- a/hurricane/doc/hurricane/html/HyperNet_8h_source.html +++ b/hurricane/doc/hurricane/html/HyperNet_8h_source.html @@ -50,7 +50,7 @@ $(function() {
    Cell * getCell() const
    Definition: HyperNet.h:56
    HyperNet(const Occurrence &occurrence)
    const Occurrence & getNetOccurrence() const
    Definition: HyperNet.h:55
    -
    The model (API).
    Definition: Cell.h:66
    +
    The model (API).
    Definition: Cell.h:64
    Generic Collection auto-pointer.
    Definition: Collection.h:28
    Cell * getOwnerCell() const
    Box description (API)
    Definition: Box.h:31
    @@ -62,7 +62,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Initializer_8h_source.html b/hurricane/doc/hurricane/html/Initializer_8h_source.html index ae7dfff0..f666e598 100644 --- a/hurricane/doc/hurricane/html/Initializer_8h_source.html +++ b/hurricane/doc/hurricane/html/Initializer_8h_source.html @@ -52,7 +52,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Instance_8h_source.html b/hurricane/doc/hurricane/html/Instance_8h_source.html index 750bbe25..c30bf547 100644 --- a/hurricane/doc/hurricane/html/Instance_8h_source.html +++ b/hurricane/doc/hurricane/html/Instance_8h_source.html @@ -44,21 +44,21 @@ $(function() {
    Instance.h
    -
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Instance.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_INSTANCE_H
    21 #define HURRICANE_INSTANCE_H
    22 
    23 #include "hurricane/Go.h"
    24 #include "hurricane/Plug.h"
    25 #include "hurricane/SharedPath.h"
    26 //#include "hurricane/IntrusiveMap.h"
    27 
    28 namespace Hurricane {
    29 
    30 class Net;
    31 class BasicLayer;
    32 
    33 // ****************************************************************************************************
    34 // Instance declaration
    35 // ****************************************************************************************************
    36 
    37 class Instance : public Go {
    38 // ***********************
    39 
    40 // Types
    41 // *****
    42 
    43  public: typedef Go Inherit;
    44 
    45  public: class PlacementStatus {
    46  // **************************
    47 
    48  public: enum Code {UNPLACED=0, PLACED=1, FIXED=2};
    49 
    50  private: Code _code;
    51 
    52  public: PlacementStatus(const Code& code = UNPLACED);
    53  public: PlacementStatus(const PlacementStatus& placementstatus);
    54  public: PlacementStatus(string);
    55 
    56  public: PlacementStatus& operator=(const PlacementStatus& placementstatus);
    57 
    58  public: operator const Code&() const {return _code;};
    59 
    60  public: const Code& getCode() const {return _code;};
    61 
    62  public: string _getTypeName() const { return _TName("Instance::PlacementStatus"); };
    63  public: string _getString() const;
    64  public: Record* _getRecord() const;
    65 
    66  };
    67 
    68  public: class PlugMap : public IntrusiveMap<const Net*, Plug> {
    69  // **********************************************************
    70 
    71  public: typedef IntrusiveMap<const Net*, Plug> Inherit;
    72 
    73  public: PlugMap();
    74 
    75  public: virtual const Net* _getKey(Plug* plug) const;
    76  public: virtual unsigned _getHashValue(const Net* masterNet) const;
    77  public: virtual Plug* _getNextElement(Plug* plug) const;
    78  public: virtual void _setNextElement(Plug* plug, Plug* nextPlug) const;
    79 
    80  };
    81 
    82  public: class SharedPathMap : public IntrusiveMap<const SharedPath*, SharedPath> {
    83  // *****************************************************************************
    84 
    85  public: typedef IntrusiveMap<const SharedPath*, SharedPath> Inherit;
    86 
    87  public: SharedPathMap();
    88 
    89  public: virtual const SharedPath* _getKey(SharedPath* sharedPath) const;
    90  public: virtual unsigned _getHashValue(const SharedPath* tailSharedPath) const;
    91  public: virtual SharedPath* _getNextElement(SharedPath* sharedPath) const;
    92  public: virtual void _setNextElement(SharedPath* sharedPath, SharedPath* nextSharedPath) const;
    93 
    94  };
    95 
    96 // Attributes
    97 // **********
    98 
    99  private: Cell* _cell;
    100  private: Name _name;
    101  private: Cell* _masterCell;
    102  private: Transformation _transformation;
    103  private: PlacementStatus _placementStatus;
    104  private: PlugMap _plugMap;
    105  private: SharedPathMap _sharedPathMap;
    106  private: Instance* _nextOfCellInstanceMap;
    107  private: Instance* _nextOfCellSlaveInstanceSet;
    108 
    109 // Constructors
    110 // ************
    111 
    112  protected: Instance(Cell* cell, const Name& name, Cell* masterCell, const Transformation& transformation, const PlacementStatus& placementstatus, bool secureFlag);
    113 
    114  public: static Instance* create(Cell* cell, const Name& name, Cell* masterCell, bool secureFlag = true);
    115  public: static Instance* create(Cell* cell, const Name& name, Cell* masterCell, const Transformation& transformation, const PlacementStatus& placementstatus, bool secureFlag = true);
    116 
    117 // Accessors
    118 // *********
    119 
    120  public: virtual Cell* getCell() const {return _cell;};
    121  public: virtual Box getBoundingBox() const;
    122  public: const Name& getName() const {return _name;};
    123  public: Cell* getMasterCell() const {return _masterCell;};
    124  public: const Transformation& getTransformation() const {return _transformation;};
    125  public: const PlacementStatus& getPlacementStatus() const {return _placementStatus;};
    126  public: Plug* getPlug(const Net* masterNet) const {return _plugMap.getElement(masterNet);};
    127  public: Plugs getPlugs() const {return _plugMap.getElements();};
    128  public: Plugs getConnectedPlugs() const;
    129  public: Plugs getUnconnectedPlugs() const;
    130  public: Path getPath(const Path& tailPath = Path()) const;
    131  public: Box getAbutmentBox() const;
    132 
    133 // Predicates
    134 // **********
    135 
    136  public: bool isUnplaced() const {return _placementStatus == PlacementStatus::UNPLACED;};
    137  public: bool isPlaced() const {return _placementStatus == PlacementStatus::PLACED;};
    138  public: bool isFixed() const {return _placementStatus == PlacementStatus::FIXED;};
    139  public: bool isTerminal() const;
    140  public: bool isTerminalNetlist() const;
    141  public: bool isUnique() const;
    142  public: bool isUniquified() const;
    143  public: bool isUniquifyMaster() const;
    144 
    145 // Filters
    146 // *******
    147 
    148  public: static InstanceFilter getIsUnderFilter(const Box& area);
    149  public: static InstanceFilter getIsTerminalFilter();
    150  public: static InstanceFilter getIsTerminalNetlistFilter();
    151  public: static InstanceFilter getIsUnplacedFilter();
    152  public: static InstanceFilter getIsPlacedFilter();
    153  public: static InstanceFilter getIsFixedFilter();
    154  public: static InstanceFilter getIsNotUnplacedFilter();
    155 
    156 // Updators
    157 // ********
    158 
    159  public: virtual void materialize();
    160  public: virtual void unmaterialize();
    161  public: virtual void invalidate(bool propagateFlag = true);
    162  public: virtual void translate(const DbU::Unit& dx, const DbU::Unit& dy);
    163 
    164  public: void setName(const Name& name);
    165  public: void setTransformation(const Transformation& transformation);
    166  public: void setPlacementStatus(const PlacementStatus& placementstatus);
    167  public: void setMasterCell(Cell* masterCell, bool secureFlag = true);
    168  public: void uniquify();
    169  public: void slaveAbutmentBox();
    170  public: Instance* getClone(Cell* cloneCell) const;
    171 
    172 // Others
    173 // ******
    174 
    175  protected: virtual void _postCreate();
    176 
    177  protected: virtual void _preDestroy();
    178 
    179  public: virtual string _getTypeName() const {return _TName("Instance");};
    180  public: virtual string _getString() const;
    181  public: virtual Record* _getRecord() const;
    182  public: virtual void _toJson(JsonWriter*) const;
    183  public: virtual void _toJsonCollections(JsonWriter*) const;
    184  public: PlugMap& _getPlugMap() {return _plugMap;};
    185  public: SharedPath* _getSharedPath(const SharedPath* tailSharedPath) const {return _sharedPathMap.getElement(tailSharedPath);}
    186  public: SharedPathes _getSharedPathes() const {return _sharedPathMap.getElements();};
    187  public: SharedPathMap& _getSharedPathMap() {return _sharedPathMap;};
    188  public: Instance* _getNextOfCellInstanceMap() const {return _nextOfCellInstanceMap;};
    189  public: Instance* _getNextOfCellSlaveInstanceSet() const {return _nextOfCellSlaveInstanceSet;};
    190 
    191  public: void _setNextOfCellInstanceMap(Instance* instance) {_nextOfCellInstanceMap = instance;};
    192  public: void _setNextOfCellSlaveInstanceSet(Instance* instance) {_nextOfCellSlaveInstanceSet = instance;};
    193 
    194 };
    195 
    196 
    197 class JsonInstance : public JsonEntity {
    198 // *************************************
    199 
    200  public: static void initialize();
    201  public: JsonInstance(unsigned long flags);
    202  public: virtual string getTypeName() const;
    203  public: virtual JsonInstance* clone(unsigned long) const;
    204  public: virtual void toData(JsonStack&);
    205 };
    206 
    207 } // End of Hurricane namespace.
    208 
    209 
    210 // -------------------------------------------------------------------
    211 // Inspector Support for : Instance::PlacementStatus::Code*".
    212 
    213 template<>
    214 inline std::string getString<const Hurricane::Instance::PlacementStatus::Code*>
    216  {
    217  switch ( *object ) {
    218  case Hurricane::Instance::PlacementStatus::UNPLACED: return "UNPLACED";
    219  case Hurricane::Instance::PlacementStatus::PLACED: return "PLACED";
    220  case Hurricane::Instance::PlacementStatus::FIXED: return "FIXED";
    221  }
    222  return "ABNORMAL";
    223  }
    224 
    225 template<>
    226 inline std::string getString<Hurricane::Instance::PlacementStatus::Code>
    228  {
    229  switch ( object ) {
    230  case Hurricane::Instance::PlacementStatus::UNPLACED: return "UNPLACED";
    231  case Hurricane::Instance::PlacementStatus::PLACED: return "PLACED";
    232  case Hurricane::Instance::PlacementStatus::FIXED: return "FIXED";
    233  }
    234  return "ABNORMAL";
    235  }
    236 
    237 template<>
    238 inline Hurricane::Record* getRecord<const Hurricane::Instance::PlacementStatus::Code*>
    240  {
    241  Hurricane::Record* record = new Hurricane::Record(getString(object));
    242  record->add(getSlot("Code", (unsigned int*)object));
    243  return record;
    244  }
    245 
    246 template<>
    247 inline Hurricane::Record* getRecord<const Hurricane::Instance::PlacementStatus::Code>
    249  {
    250  Hurricane::Record* record = new Hurricane::Record(getString(object));
    251  record->add(getSlot("Code", (unsigned int)object));
    252  return record;
    253  }
    254 
    255 
    256 INSPECTOR_P_SUPPORT(Hurricane::Instance);
    257 INSPECTOR_P_SUPPORT(Hurricane::Instance::PlacementStatus);
    258 INSPECTOR_P_SUPPORT(Hurricane::Instance::PlugMap);
    259 INSPECTOR_P_SUPPORT(Hurricane::Instance::SharedPathMap);
    260 
    261 inline void jsonWrite ( JsonWriter* w, const std::string& key, const Hurricane::Instance::PlacementStatus& status )
    262 {
    263  w->key( key );
    264  w->write( getString(status.getCode()) );
    265 }
    266 
    267 #endif // HURRICANE_INSTANCE
    268 
    269 
    270 // ****************************************************************************************************
    271 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    272 // ****************************************************************************************************
    Path description (API)
    Definition: Path.h:37
    -
    Go description (API)
    Definition: Go.h:36
    -
    const Code & getCode() const
    Definition: Instance.h:60
    +
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Instance.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #pragma once
    21 #include "hurricane/Go.h"
    22 #include "hurricane/Plug.h"
    23 #include "hurricane/SharedPath.h"
    24 //#include "hurricane/IntrusiveMap.h"
    25 
    26 namespace Hurricane {
    27 
    28 class Net;
    29 class BasicLayer;
    30 
    31 // ****************************************************************************************************
    32 // Instance declaration
    33 // ****************************************************************************************************
    34 
    35 class Instance : public Go {
    36 // ***********************
    37 
    38 // Types
    39 // *****
    40 
    41  public: typedef Go Inherit;
    42 
    43  public: class PlacementStatus {
    44  // **************************
    45 
    46  public: enum Code {UNPLACED=0, PLACED=1, FIXED=2};
    47 
    48  private: Code _code;
    49 
    50  public: PlacementStatus(const Code& code = UNPLACED);
    51  public: PlacementStatus(const PlacementStatus& placementstatus);
    52  public: PlacementStatus(string);
    53 
    54  public: PlacementStatus& operator=(const PlacementStatus& placementstatus);
    55 
    56  public: operator const Code&() const {return _code;};
    57 
    58  public: const Code& getCode() const {return _code;};
    59 
    60  public: string _getTypeName() const { return _TName("Instance::PlacementStatus"); };
    61  public: string _getString() const;
    62  public: Record* _getRecord() const;
    63 
    64  };
    65 
    66  public: class PlugMap : public IntrusiveMap<const Net*, Plug> {
    67  // **********************************************************
    68 
    69  public: typedef IntrusiveMap<const Net*, Plug> Inherit;
    70 
    71  public: PlugMap();
    72 
    73  public: virtual const Net* _getKey(Plug* plug) const;
    74  public: virtual unsigned _getHashValue(const Net* masterNet) const;
    75  public: virtual Plug* _getNextElement(Plug* plug) const;
    76  public: virtual void _setNextElement(Plug* plug, Plug* nextPlug) const;
    77 
    78  };
    79 
    80  public: class SharedPathMap : public IntrusiveMap<const SharedPath*, SharedPath> {
    81  // *****************************************************************************
    82 
    83  public: typedef IntrusiveMap<const SharedPath*, SharedPath> Inherit;
    84 
    85  public: SharedPathMap();
    86 
    87  public: virtual const SharedPath* _getKey(SharedPath* sharedPath) const;
    88  public: virtual unsigned _getHashValue(const SharedPath* tailSharedPath) const;
    89  public: virtual SharedPath* _getNextElement(SharedPath* sharedPath) const;
    90  public: virtual void _setNextElement(SharedPath* sharedPath, SharedPath* nextSharedPath) const;
    91 
    92  };
    93 
    94 // Attributes
    95 // **********
    96 
    97  private: Cell* _cell;
    98  private: Name _name;
    99  private: Cell* _masterCell;
    100  private: Transformation _transformation;
    101  private: PlacementStatus _placementStatus;
    102  private: PlugMap _plugMap;
    103  private: SharedPathMap _sharedPathMap;
    104  private: Instance* _nextOfCellInstanceMap;
    105  private: Instance* _nextOfCellSlaveInstanceSet;
    106 
    107 // Constructors
    108 // ************
    109 
    110  protected: Instance(Cell* cell, const Name& name, Cell* masterCell, const Transformation& transformation, const PlacementStatus& placementstatus, bool secureFlag);
    111 
    112  public: static Instance* create(Cell* cell, const Name& name, Cell* masterCell, bool secureFlag = true);
    113  public: static Instance* create(Cell* cell, const Name& name, Cell* masterCell, const Transformation& transformation, const PlacementStatus& placementstatus, bool secureFlag = true);
    114 
    115 // Accessors
    116 // *********
    117 
    118  public: virtual Cell* getCell() const {return _cell;};
    119  public: virtual Box getBoundingBox() const;
    120  public: const Name& getName() const {return _name;};
    121  public: Cell* getMasterCell() const {return _masterCell;};
    122  public: const Transformation& getTransformation() const {return _transformation;};
    123  public: const PlacementStatus& getPlacementStatus() const {return _placementStatus;};
    124  public: Plug* getPlug(const Net* masterNet) const {return _plugMap.getElement(masterNet);};
    125  public: Plugs getPlugs() const {return _plugMap.getElements();};
    126  public: Plugs getConnectedPlugs() const;
    127  public: Plugs getUnconnectedPlugs() const;
    128  public: Path getPath(const Path& tailPath = Path()) const;
    129  public: Box getAbutmentBox() const;
    130 
    131 // Predicates
    132 // **********
    133 
    134  public: bool isUnplaced() const {return _placementStatus == PlacementStatus::UNPLACED;};
    135  public: bool isPlaced() const {return _placementStatus == PlacementStatus::PLACED;};
    136  public: bool isFixed() const {return _placementStatus == PlacementStatus::FIXED;};
    137  public: bool isTerminal() const;
    138  public: bool isTerminalNetlist() const;
    139  public: bool isUnique() const;
    140  public: bool isUniquified() const;
    141  public: bool isUniquifyMaster() const;
    142 
    143 // Filters
    144 // *******
    145 
    146  public: static InstanceFilter getIsUnderFilter(const Box& area);
    147  public: static InstanceFilter getIsTerminalFilter();
    148  public: static InstanceFilter getIsTerminalNetlistFilter();
    149  public: static InstanceFilter getIsUnplacedFilter();
    150  public: static InstanceFilter getIsPlacedFilter();
    151  public: static InstanceFilter getIsFixedFilter();
    152  public: static InstanceFilter getIsNotUnplacedFilter();
    153  public: static InstanceFilter getPruneMasterFilter( uint64_t );
    154 
    155 // Updators
    156 // ********
    157 
    158  public: virtual void materialize();
    159  public: virtual void unmaterialize();
    160  public: virtual void invalidate(bool propagateFlag = true);
    161  public: virtual void translate(const DbU::Unit& dx, const DbU::Unit& dy);
    162 
    163  public: void setName(const Name& name);
    164  public: void setTransformation(const Transformation& transformation);
    165  public: void setPlacementStatus(const PlacementStatus& placementstatus);
    166  public: void setMasterCell(Cell* masterCell, bool secureFlag = true);
    167  public: void uniquify();
    168  public: void slaveAbutmentBox();
    169  public: Instance* getClone(Cell* cloneCell) const;
    170 
    171 // Others
    172 // ******
    173 
    174  protected: virtual void _postCreate();
    175 
    176  protected: virtual void _preDestroy();
    177 
    178  public: virtual string _getTypeName() const {return _TName("Instance");};
    179  public: virtual string _getString() const;
    180  public: virtual Record* _getRecord() const;
    181  public: virtual void _toJson(JsonWriter*) const;
    182  public: virtual void _toJsonCollections(JsonWriter*) const;
    183  public: PlugMap& _getPlugMap() {return _plugMap;};
    184  public: SharedPath* _getSharedPath(const SharedPath* tailSharedPath) const {return _sharedPathMap.getElement(tailSharedPath);}
    185  public: SharedPathes _getSharedPathes() const {return _sharedPathMap.getElements();};
    186  public: SharedPathMap& _getSharedPathMap() {return _sharedPathMap;};
    187  public: Instance* _getNextOfCellInstanceMap() const {return _nextOfCellInstanceMap;};
    188  public: Instance* _getNextOfCellSlaveInstanceSet() const {return _nextOfCellSlaveInstanceSet;};
    189 
    190  public: void _setNextOfCellInstanceMap(Instance* instance) {_nextOfCellInstanceMap = instance;};
    191  public: void _setNextOfCellSlaveInstanceSet(Instance* instance) {_nextOfCellSlaveInstanceSet = instance;};
    192 
    193 };
    194 
    195 
    196 class JsonInstance : public JsonEntity {
    197 // *************************************
    198 
    199  public: static void initialize();
    200  public: JsonInstance(unsigned long flags);
    201  public: virtual string getTypeName() const;
    202  public: virtual JsonInstance* clone(unsigned long) const;
    203  public: virtual void toData(JsonStack&);
    204 };
    205 
    206 } // End of Hurricane namespace.
    207 
    208 
    209 // -------------------------------------------------------------------
    210 // Inspector Support for : Instance::PlacementStatus::Code*".
    211 
    212 template<>
    213 inline std::string getString<const Hurricane::Instance::PlacementStatus::Code*>
    215  {
    216  switch ( *object ) {
    217  case Hurricane::Instance::PlacementStatus::UNPLACED: return "UNPLACED";
    218  case Hurricane::Instance::PlacementStatus::PLACED: return "PLACED";
    219  case Hurricane::Instance::PlacementStatus::FIXED: return "FIXED";
    220  }
    221  return "ABNORMAL";
    222  }
    223 
    224 template<>
    225 inline std::string getString<Hurricane::Instance::PlacementStatus::Code>
    227  {
    228  switch ( object ) {
    229  case Hurricane::Instance::PlacementStatus::UNPLACED: return "UNPLACED";
    230  case Hurricane::Instance::PlacementStatus::PLACED: return "PLACED";
    231  case Hurricane::Instance::PlacementStatus::FIXED: return "FIXED";
    232  }
    233  return "ABNORMAL";
    234  }
    235 
    236 template<>
    237 inline Hurricane::Record* getRecord<const Hurricane::Instance::PlacementStatus::Code*>
    239  {
    240  Hurricane::Record* record = new Hurricane::Record(getString(object));
    241  record->add(getSlot("Code", (unsigned int*)object));
    242  return record;
    243  }
    244 
    245 // template<>
    246 // inline Hurricane::Record* getRecord<const Hurricane::Instance::PlacementStatus::Code>
    247 // ( const Hurricane::Instance::PlacementStatus::Code object )
    248 // {
    249 // Hurricane::Record* record = new Hurricane::Record(getString(object));
    250 // record->add(getSlot("Code", (unsigned int)object));
    251 // return record;
    252 // }
    253 
    254 
    255 INSPECTOR_P_SUPPORT(Hurricane::Instance);
    256 INSPECTOR_P_SUPPORT(Hurricane::Instance::PlacementStatus);
    257 INSPECTOR_P_SUPPORT(Hurricane::Instance::PlugMap);
    258 INSPECTOR_P_SUPPORT(Hurricane::Instance::SharedPathMap);
    259 
    260 inline void jsonWrite ( JsonWriter* w, const std::string& key, const Hurricane::Instance::PlacementStatus& status )
    261 {
    262  w->key( key );
    263  w->write( getString(status.getCode()) );
    264 }
    265 
    266 
    267 // ****************************************************************************************************
    268 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    269 // ****************************************************************************************************
    Path description (API)
    Definition: Path.h:35
    +
    Go description (API)
    Definition: Go.h:34
    +
    const Code & getCode() const
    Definition: Instance.h:58
    PlacementStatus(const Code &code=UNPLACED)
    GenericFilter< Instance * > InstanceFilter
    Definition: Instances.h:51
    -
    Cell * getMasterCell() const
    Definition: Instance.h:123
    -
    Plugs getPlugs() const
    Definition: Instance.h:127
    +
    Cell * getMasterCell() const
    Definition: Instance.h:121
    +
    Plugs getPlugs() const
    Definition: Instance.h:125
    Plugs getConnectedPlugs() const
    Name description (API)
    Definition: Name.h:35
    static InstanceFilter getIsUnderFilter(const Box &area)
    -
    Code
    Definition: Instance.h:48
    -
    std::int64_t Unit
    Definition: DbU.h:70
    - -
    The model (API).
    Definition: Cell.h:66
    - +
    Code
    Definition: Instance.h:46
    +
    std::int64_t Unit
    Definition: DbU.h:67
    + +
    The model (API).
    Definition: Cell.h:64
    +
    Instance * getClone(Cell *cloneCell) const
    Box getAbutmentBox() const
    @@ -66,27 +66,27 @@ $(function() {
    Transformation description (API)
    Definition: Transformation.h:32
    Generic Collection auto-pointer.
    Definition: Collection.h:28
    Path getPath(const Path &tailPath=Path()) const
    -
    const Name & getName() const
    Definition: Instance.h:122
    +
    const Name & getName() const
    Definition: Instance.h:120
    Box description (API)
    Definition: Box.h:31
    -
    Instance description (API)
    Definition: Instance.h:37
    -
    Go Inherit
    Definition: Instance.h:43
    +
    Instance description (API)
    Definition: Instance.h:35
    +
    Go Inherit
    Definition: Instance.h:41
    void setTransformation(const Transformation &transformation)
    static Instance * create(Cell *cell, const Name &name, Cell *masterCell, bool secureFlag=true)
    -
    Instance Placement Status (API)
    Definition: Instance.h:45
    +
    Instance Placement Status (API)
    Definition: Instance.h:43
    void setMasterCell(Cell *masterCell, bool secureFlag=true)
    Plug description (API)
    Definition: Plug.h:37
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    -
    Plug * getPlug(const Net *masterNet) const
    Definition: Instance.h:126
    -
    const Transformation & getTransformation() const
    Definition: Instance.h:124
    +
    Plug * getPlug(const Net *masterNet) const
    Definition: Instance.h:124
    +
    const Transformation & getTransformation() const
    Definition: Instance.h:122
    Plugs getUnconnectedPlugs() const
    - +
    Net description (API)
    Definition: Net.h:48


    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Instances_8h_source.html b/hurricane/doc/hurricane/html/Instances_8h_source.html index ae64e468..a2af97ec 100644 --- a/hurricane/doc/hurricane/html/Instances_8h_source.html +++ b/hurricane/doc/hurricane/html/Instances_8h_source.html @@ -49,7 +49,7 @@ $(function() {
    GenericLocator< Instance * > InstanceLocator
    Definition: Instances.h:43
    Generic Filter auto-pointer.
    Definition: Filter.h:27
    Generic Collection auto-pointer.
    Definition: Collection.h:28
    -
    Instance description (API)
    Definition: Instance.h:37
    +
    Instance description (API)
    Definition: Instance.h:35
    GenericCollection< Instance * > Instances
    Definition: Instances.h:27
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Interruption_8h_source.html b/hurricane/doc/hurricane/html/Interruption_8h_source.html index 87bb972d..2bc49bbe 100644 --- a/hurricane/doc/hurricane/html/Interruption_8h_source.html +++ b/hurricane/doc/hurricane/html/Interruption_8h_source.html @@ -55,7 +55,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Interval_8h_source.html b/hurricane/doc/hurricane/html/Interval_8h_source.html index 3e8268c7..5e5f7bc0 100644 --- a/hurricane/doc/hurricane/html/Interval_8h_source.html +++ b/hurricane/doc/hurricane/html/Interval_8h_source.html @@ -49,7 +49,7 @@ $(function() {
    const DbU::Unit & getVMin() const
    Definition: Interval.h:100
    Interval & merge(const DbU::Unit &)
    bool isPonctual() const
    Definition: Interval.h:108
    -
    std::int64_t Unit
    Definition: DbU.h:70
    +
    std::int64_t Unit
    Definition: DbU.h:67
    Interval description (API)
    Definition: Interval.h:44
    Interval & makeEmpty()
    bool isEmpty() const
    Definition: Interval.h:106
    @@ -72,7 +72,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Intervals_8h_source.html b/hurricane/doc/hurricane/html/Intervals_8h_source.html index 8c3cb297..27055dce 100644 --- a/hurricane/doc/hurricane/html/Intervals_8h_source.html +++ b/hurricane/doc/hurricane/html/Intervals_8h_source.html @@ -50,7 +50,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/JsonObject_8h_source.html b/hurricane/doc/hurricane/html/JsonObject_8h_source.html index 55aef57c..989df96c 100644 --- a/hurricane/doc/hurricane/html/JsonObject_8h_source.html +++ b/hurricane/doc/hurricane/html/JsonObject_8h_source.html @@ -55,8 +55,8 @@ $(function() {
    Definition: JsonObject.h:213
    string demangle(const char *symbol)
    void pop_back_dbo()
    Definition: JsonObject.h:372
    -
    The model (API).
    Definition: Cell.h:66
    -
    DataBase object root class (API).
    Definition: DBo.h:47
    +
    The model (API).
    Definition: Cell.h:64
    +
    DataBase object root class (API).
    Definition: DBo.h:45
    size_t size() const
    Definition: JsonObject.h:375
    void print(std::ostream &) const
    void addEntity(unsigned int jsonId, Entity *)
    @@ -92,7 +92,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/JsonReader_8h_source.html b/hurricane/doc/hurricane/html/JsonReader_8h_source.html index 3d0227c0..8fb09ced 100644 --- a/hurricane/doc/hurricane/html/JsonReader_8h_source.html +++ b/hurricane/doc/hurricane/html/JsonReader_8h_source.html @@ -50,7 +50,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Layer_8h_source.html b/hurricane/doc/hurricane/html/Layer_8h_source.html index cc56b847..400e608c 100644 --- a/hurricane/doc/hurricane/html/Layer_8h_source.html +++ b/hurricane/doc/hurricane/html/Layer_8h_source.html @@ -44,17 +44,17 @@ $(function() {
    Layer.h
    -
    1 
    2 // -*- C++ -*-
    3 //
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify
    9 // it under the terms of the GNU Lesser General Public License as
    10 // published by the Free Software Foundation, either version 3 of the
    11 // License, or (at your option) any later version.
    12 //
    13 // Hurricane is distributed in the hope that it will be useful, but
    14 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    15 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    16 // General Public License for more details.
    17 //
    18 // You should have received a copy of the Lesser GNU General Public
    19 // License along with Hurricane. If not, see
    20 // <http://www.gnu.org/licenses/>.
    21 //
    22 // +-----------------------------------------------------------------+
    23 // | H U R R I C A N E |
    24 // | V L S I B a c k e n d D a t a - B a s e |
    25 // | |
    26 // | Author : Remy Escassut |
    27 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    28 // | =============================================================== |
    29 // | C++ Header : "./hurricane/Layer.h" |
    30 // +-----------------------------------------------------------------+
    31 
    32 
    33 #ifndef HURRICANE_LAYER_H
    34 #define HURRICANE_LAYER_H
    35 
    36 #include "hurricane/Mask.h"
    37 #include "hurricane/DBo.h"
    38 #include "hurricane/Layers.h"
    39 #include "hurricane/DbU.h"
    40 #include "hurricane/BasicLayers.h"
    41 
    42 
    43 namespace Hurricane {
    44 
    45 
    46  class Technology;
    47 
    48 
    49 // -------------------------------------------------------------------
    50 // Class : "Hurricane::Layer".
    51 
    52  class Layer : public DBo {
    53  public:
    54  typedef DBo Super;
    55  public:
    56  static const uint32_t NoFlags = 0;
    57  static const uint32_t EnclosureH = (1 << 0);
    58  static const uint32_t EnclosureV = (1 << 1);
    59  static const uint32_t EnclosureMax = (1 << 2);
    60  static const uint32_t ExtensionCap = (1 << 3);
    61  static const uint32_t ExtensionWidth = (1 << 4);
    62 
    63  public:
    64  // Types.
    65  typedef Hurricane::Mask<unsigned long long> Mask;
    66  // Accessors.
    67  inline Technology* getTechnology () const;
    68  inline const Name& getName () const;
    69  inline const Mask& getMask () const;
    70  inline const Mask& getExtractMask () const;
    71  inline const DbU::Unit& getMinimalSize () const;
    72  inline const DbU::Unit& getMinimalSpacing () const;
    73  virtual BasicLayers getBasicLayers () const = 0;
    74  virtual const Layer* getBlockageLayer () const;
    75  virtual const Layer* getCut () const;
    76  virtual const Layer* getTop () const;
    77  virtual const Layer* getBottom () const;
    78  virtual const Layer* getOpposite ( const Layer* ) const;
    79  Layer* getMetalAbove ( bool useSymbolic=true ) const;
    80  Layer* getMetalBelow ( bool useSymbolic=true ) const;
    81  Layer* getCutAbove ( bool useSymbolic=true ) const;
    82  Layer* getCutBelow ( bool useSymbolic=true ) const;
    83  virtual DbU::Unit getEnclosure ( uint32_t flags ) const;
    84  virtual DbU::Unit getExtentionCap () const;
    85  virtual DbU::Unit getExtentionWidth () const;
    86  virtual DbU::Unit getEnclosure ( const BasicLayer* layer, uint32_t flags ) const;
    87  virtual DbU::Unit getExtentionCap ( const BasicLayer* layer ) const;
    88  virtual DbU::Unit getExtentionWidth ( const BasicLayer* layer ) const;
    89  virtual DbU::Unit getTopEnclosure ( uint32_t flags ) const;
    90  virtual DbU::Unit getBottomEnclosure ( uint32_t flags ) const;
    91  // Predicates
    92  inline bool above ( const Layer* layer ) const;
    93  inline bool below ( const Layer* layer ) const;
    94  bool contains ( const Layer* layer ) const;
    95  bool intersect ( const Layer* layer ) const;
    96  inline bool isSymbolic () const;
    97  inline bool isBlockage () const;
    98  // Updators
    99  void setName ( const Name& name );
    100  inline void setSymbolic ( bool );
    101  inline void setBlockage ( bool );
    102  void setMinimalSize ( const DbU::Unit& minimalSize );
    103  void setMinimalSpacing ( const DbU::Unit& minimalSpacing );
    104  virtual void setEnclosure ( const BasicLayer* layer, DbU::Unit, uint32_t flags );
    105  virtual void setExtentionCap ( const BasicLayer* layer, DbU::Unit );
    106  virtual void setExtentionWidth ( const BasicLayer* layer, DbU::Unit );
    107  // Hurricane Managment.
    108  virtual void _toJson ( JsonWriter* ) const;
    109  virtual string _getString () const;
    110  virtual Record* _getRecord () const;
    111  inline Layer* _getNextOfTechnologyLayerMap () const;
    112  inline void _setMask ( const Mask& mask );
    113  inline void _setExtractMask ( const Mask& extractMask );
    114  inline void _setNextOfTechnologyLayerMap ( Layer* layer );
    115  virtual void _onDbuChange ( float scale );
    116  static const Name& _sgetName ( const Layer* );
    117 
    118  private:
    119  // Internal: Attributes
    120  Technology* _technology;
    121  Name _name;
    122  Mask _mask;
    123  Mask _extractMask;
    124  DbU::Unit _minimalSize;
    125  DbU::Unit _minimalSpacing;
    126  Layer* _nextOfTechnologyLayerMap;
    127  bool _symbolic;
    128  bool _blockage;
    129 
    130  protected:
    131  // Internal: Constructors & Destructors.
    132  Layer ( Technology* technology
    133  , const Name& name
    134  , const DbU::Unit& minimalSize = 0
    135  , const DbU::Unit& minimalSpacing = 0
    136  , const DbU::Unit& pitch = 0
    137  );
    138  virtual void _postCreate ();
    139  virtual void _preDestroy ();
    140 
    141  public:
    142  struct CompareByMask : public binary_function<const Layer*,const Layer*,bool> {
    143  inline bool operator() ( const Layer* lhs, const Layer* rhs ) const;
    144  };
    145  };
    146 
    147 
    148 // Inline Functions.
    149  inline bool Layer::isSymbolic () const { return _symbolic; }
    150  inline bool Layer::isBlockage () const { return _blockage; }
    151  inline bool Layer::above ( const Layer* layer ) const { return _mask > layer->getMask(); }
    152  inline bool Layer::below ( const Layer* layer ) const { return _mask < layer->getMask(); }
    153  inline Technology* Layer::getTechnology () const { return _technology; }
    154  inline const Name& Layer::getName () const { return _name; }
    155  inline const Layer::Mask& Layer::getMask () const { return _mask; }
    156  inline const Layer::Mask& Layer::getExtractMask () const { return _extractMask; }
    157  inline const DbU::Unit& Layer::getMinimalSize () const { return _minimalSize; }
    158  inline const DbU::Unit& Layer::getMinimalSpacing () const { return _minimalSpacing; }
    159  inline void Layer::setSymbolic ( bool state ) { _symbolic = state; }
    160  inline void Layer::setBlockage ( bool state ) { _blockage = state; }
    161  inline Layer* Layer::_getNextOfTechnologyLayerMap () const { return _nextOfTechnologyLayerMap; }
    162  inline void Layer::_setMask ( const Mask& mask ) { _mask = mask; }
    163  inline void Layer::_setExtractMask ( const Mask& extractMask ) { _extractMask = extractMask; }
    164  inline void Layer::_setNextOfTechnologyLayerMap ( Layer* layer ) { _nextOfTechnologyLayerMap = layer; }
    165 
    166  inline bool Layer::CompareByMask::operator() ( const Layer* lhs, const Layer* rhs ) const
    167  { return (lhs?lhs->getMask():Layer::Mask()) < (rhs?rhs->getMask():Layer::Mask()); }
    168 
    169 
    170 // -------------------------------------------------------------------
    171 // Class : "Hurricane::JsonLayer".
    172 
    173  class JsonLayer : public JsonDBo {
    174  public:
    175  JsonLayer ( unsigned long flags );
    176  Technology* lookupTechnology ( JsonStack&, const string& fname ) const;
    177  };
    178 
    179 
    180 } // Hurricane namespace.
    181 
    182 
    183 INSPECTOR_P_SUPPORT(Hurricane::Layer);
    184 INSPECTOR_PR_SUPPORT(Hurricane::Layer::Mask);
    185 
    186 
    187 #endif // HURRICANE_LAYER_H
    void setName(const Name &name)
    +
    1 
    2 // -*- C++ -*-
    3 //
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify
    9 // it under the terms of the GNU Lesser General Public License as
    10 // published by the Free Software Foundation, either version 3 of the
    11 // License, or (at your option) any later version.
    12 //
    13 // Hurricane is distributed in the hope that it will be useful, but
    14 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    15 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    16 // General Public License for more details.
    17 //
    18 // You should have received a copy of the Lesser GNU General Public
    19 // License along with Hurricane. If not, see
    20 // <http://www.gnu.org/licenses/>.
    21 //
    22 // +-----------------------------------------------------------------+
    23 // | H U R R I C A N E |
    24 // | V L S I B a c k e n d D a t a - B a s e |
    25 // | |
    26 // | Author : Remy Escassut |
    27 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    28 // | =============================================================== |
    29 // | C++ Header : "./hurricane/Layer.h" |
    30 // +-----------------------------------------------------------------+
    31 
    32 
    33 #ifndef HURRICANE_LAYER_H
    34 #define HURRICANE_LAYER_H
    35 
    36 #include "hurricane/Mask.h"
    37 #include "hurricane/DBo.h"
    38 #include "hurricane/Layers.h"
    39 #include "hurricane/DbU.h"
    40 #include "hurricane/BasicLayers.h"
    41 
    42 
    43 namespace Hurricane {
    44 
    45 
    46  class Technology;
    47 
    48 
    49 // -------------------------------------------------------------------
    50 // Class : "Hurricane::Layer".
    51 
    52  class Layer : public DBo {
    53  public:
    54  typedef DBo Super;
    55  public:
    56  static const uint32_t NoFlags = 0;
    57  static const uint32_t EnclosureH = (1 << 0);
    58  static const uint32_t EnclosureV = (1 << 1);
    59  static const uint32_t EnclosureMax = (1 << 2);
    60  static const uint32_t ExtensionCap = (1 << 3);
    61  static const uint32_t ExtensionWidth = (1 << 4);
    62 
    63  public:
    64  // Types.
    65  typedef Hurricane::Mask<unsigned long long> Mask;
    66  // Accessors.
    67  inline Technology* getTechnology () const;
    68  inline const Name& getName () const;
    69  inline const Mask& getMask () const;
    70  inline const Mask& getExtractMask () const;
    71  inline const DbU::Unit& getMinimalSize () const;
    72  inline const DbU::Unit& getMinimalSpacing () const;
    73  virtual BasicLayers getBasicLayers () const = 0;
    74  virtual const Layer* getBlockageLayer () const;
    75  virtual const Layer* getCut () const;
    76  virtual const Layer* getTop () const;
    77  virtual const Layer* getBottom () const;
    78  virtual const Layer* getOpposite ( const Layer* ) const;
    79  Layer* getMetalAbove ( bool useSymbolic=true ) const;
    80  Layer* getMetalBelow ( bool useSymbolic=true ) const;
    81  Layer* getCutAbove ( bool useSymbolic=true ) const;
    82  Layer* getCutBelow ( bool useSymbolic=true ) const;
    83  virtual DbU::Unit getEnclosure ( uint32_t flags ) const;
    84  virtual DbU::Unit getExtentionCap () const;
    85  virtual DbU::Unit getExtentionWidth () const;
    86  virtual DbU::Unit getEnclosure ( const BasicLayer* layer, uint32_t flags ) const;
    87  virtual DbU::Unit getExtentionCap ( const BasicLayer* layer ) const;
    88  virtual DbU::Unit getExtentionWidth ( const BasicLayer* layer ) const;
    89  virtual DbU::Unit getTopEnclosure ( uint32_t flags ) const;
    90  virtual DbU::Unit getBottomEnclosure ( uint32_t flags ) const;
    91  virtual double getMinimalArea () const;
    92  // Predicates
    93  inline bool above ( const Layer* layer ) const;
    94  inline bool below ( const Layer* layer ) const;
    95  bool contains ( const Layer* layer ) const;
    96  bool intersect ( const Layer* layer ) const;
    97  inline bool isSymbolic () const;
    98  inline bool isBlockage () const;
    99  // Updators
    100  void setName ( const Name& name );
    101  inline void setSymbolic ( bool );
    102  inline void setBlockage ( bool );
    103  void setMinimalSize ( const DbU::Unit& minimalSize );
    104  void setMinimalSpacing ( const DbU::Unit& minimalSpacing );
    105  virtual void setEnclosure ( const BasicLayer* layer, DbU::Unit, uint32_t flags );
    106  virtual void setExtentionCap ( const BasicLayer* layer, DbU::Unit );
    107  virtual void setExtentionWidth ( const BasicLayer* layer, DbU::Unit );
    108  virtual void setMinimalArea ( double );
    109  // Hurricane Managment.
    110  virtual void _toJson ( JsonWriter* ) const;
    111  virtual string _getString () const;
    112  virtual Record* _getRecord () const;
    113  inline Layer* _getNextOfTechnologyLayerMap () const;
    114  inline void _setMask ( const Mask& mask );
    115  inline void _setExtractMask ( const Mask& extractMask );
    116  inline void _setNextOfTechnologyLayerMap ( Layer* layer );
    117  virtual void _onDbuChange ( float scale );
    118  static const Name& _sgetName ( const Layer* );
    119 
    120  private:
    121  // Internal: Attributes
    122  Technology* _technology;
    123  Name _name;
    124  Mask _mask;
    125  Mask _extractMask;
    126  DbU::Unit _minimalSize;
    127  DbU::Unit _minimalSpacing;
    128  Layer* _nextOfTechnologyLayerMap;
    129  bool _symbolic;
    130  bool _blockage;
    131  double _minimalArea;
    132 
    133  protected:
    134  // Internal: Constructors & Destructors.
    135  Layer ( Technology* technology
    136  , const Name& name
    137  , const DbU::Unit& minimalSize = 0
    138  , const DbU::Unit& minimalSpacing = 0
    139  , const DbU::Unit& pitch = 0
    140  );
    141  virtual void _postCreate ();
    142  virtual void _preDestroy ();
    143 
    144  public:
    145  struct CompareByMask : public binary_function<const Layer*,const Layer*,bool> {
    146  inline bool operator() ( const Layer* lhs, const Layer* rhs ) const;
    147  };
    148  };
    149 
    150 
    151 // Inline Functions.
    152  inline bool Layer::isSymbolic () const { return _symbolic; }
    153  inline bool Layer::isBlockage () const { return _blockage; }
    154  inline bool Layer::above ( const Layer* layer ) const { return _mask > layer->getMask(); }
    155  inline bool Layer::below ( const Layer* layer ) const { return _mask < layer->getMask(); }
    156  inline Technology* Layer::getTechnology () const { return _technology; }
    157  inline const Name& Layer::getName () const { return _name; }
    158  inline const Layer::Mask& Layer::getMask () const { return _mask; }
    159  inline const Layer::Mask& Layer::getExtractMask () const { return _extractMask; }
    160  inline const DbU::Unit& Layer::getMinimalSize () const { return _minimalSize; }
    161  inline const DbU::Unit& Layer::getMinimalSpacing () const { return _minimalSpacing; }
    162  inline void Layer::setSymbolic ( bool state ) { _symbolic = state; }
    163  inline void Layer::setBlockage ( bool state ) { _blockage = state; }
    164  inline Layer* Layer::_getNextOfTechnologyLayerMap () const { return _nextOfTechnologyLayerMap; }
    165  inline void Layer::_setMask ( const Mask& mask ) { _mask = mask; }
    166  inline void Layer::_setExtractMask ( const Mask& extractMask ) { _extractMask = extractMask; }
    167  inline void Layer::_setNextOfTechnologyLayerMap ( Layer* layer ) { _nextOfTechnologyLayerMap = layer; }
    168 
    169  inline bool Layer::CompareByMask::operator() ( const Layer* lhs, const Layer* rhs ) const
    170  { return (lhs?lhs->getMask():Layer::Mask()) < (rhs?rhs->getMask():Layer::Mask()); }
    171 
    172 
    173 // -------------------------------------------------------------------
    174 // Class : "Hurricane::JsonLayer".
    175 
    176  class JsonLayer : public JsonDBo {
    177  public:
    178  JsonLayer ( unsigned long flags );
    179  Technology* lookupTechnology ( JsonStack&, const string& fname ) const;
    180  };
    181 
    182 
    183 } // Hurricane namespace.
    184 
    185 
    186 INSPECTOR_P_SUPPORT(Hurricane::Layer);
    187 INSPECTOR_PR_SUPPORT(Hurricane::Layer::Mask);
    188 
    189 
    190 #endif // HURRICANE_LAYER_H
    void setName(const Name &name)
    bool intersect(const Layer *layer) const
    BasicLayer description (API)
    Definition: BasicLayer.h:44
    -
    Technology * getTechnology() const
    Definition: Layer.h:153
    -
    const DbU::Unit & getMinimalSpacing() const
    Definition: Layer.h:158
    +
    Technology * getTechnology() const
    Definition: Layer.h:156
    +
    const DbU::Unit & getMinimalSpacing() const
    Definition: Layer.h:161
    bool contains(const Layer *layer) const
    Name description (API)
    Definition: Name.h:35
    Layer * getCutBelow(bool useSymbolic=true) const
    virtual const Layer * getOpposite(const Layer *) const
    -
    std::int64_t Unit
    Definition: DbU.h:70
    -
    DataBase object root class (API).
    Definition: DBo.h:47
    +
    std::int64_t Unit
    Definition: DbU.h:67
    +
    DataBase object root class (API).
    Definition: DBo.h:45
    Hurricane::Mask< unsigned long long > Mask
    Definition: Layer.h:65
    virtual void setEnclosure(const BasicLayer *layer, DbU::Unit, uint32_t flags)
    virtual void setExtentionWidth(const BasicLayer *layer, DbU::Unit)
    @@ -63,25 +63,25 @@ $(function() {
    void setMinimalSize(const DbU::Unit &minimalSize)
    virtual const Layer * getTop() const
    Layer description (API)
    Definition: Layer.h:52
    -
    const Mask & getMask() const
    Definition: Layer.h:155
    -
    bool above(const Layer *layer) const
    Definition: Layer.h:151
    -
    const Mask & getExtractMask() const
    Definition: Layer.h:156
    +
    const Mask & getMask() const
    Definition: Layer.h:158
    +
    bool above(const Layer *layer) const
    Definition: Layer.h:154
    +
    const Mask & getExtractMask() const
    Definition: Layer.h:159
    Layer * getCutAbove(bool useSymbolic=true) const
    void setMinimalSpacing(const DbU::Unit &minimalSpacing)
    -
    const Name & getName() const
    Definition: Layer.h:154
    +
    const Name & getName() const
    Definition: Layer.h:157
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    virtual const Layer * getBottom() const
    -
    const DbU::Unit & getMinimalSize() const
    Definition: Layer.h:157
    +
    const DbU::Unit & getMinimalSize() const
    Definition: Layer.h:160
    Layer * getMetalBelow(bool useSymbolic=true) const
    virtual void setExtentionCap(const BasicLayer *layer, DbU::Unit)
    Technological rules description (API).
    Definition: Technology.h:62
    -
    bool below(const Layer *layer) const
    Definition: Layer.h:152
    +
    bool below(const Layer *layer) const
    Definition: Layer.h:155


    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Layers_8h_source.html b/hurricane/doc/hurricane/html/Layers_8h_source.html index 291f7f45..6f7b5bb5 100644 --- a/hurricane/doc/hurricane/html/Layers_8h_source.html +++ b/hurricane/doc/hurricane/html/Layers_8h_source.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Libraries_8h_source.html b/hurricane/doc/hurricane/html/Libraries_8h_source.html index ac9f0482..a720b489 100644 --- a/hurricane/doc/hurricane/html/Libraries_8h_source.html +++ b/hurricane/doc/hurricane/html/Libraries_8h_source.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Library_8h_source.html b/hurricane/doc/hurricane/html/Library_8h_source.html index 9c415923..4c3e6a86 100644 --- a/hurricane/doc/hurricane/html/Library_8h_source.html +++ b/hurricane/doc/hurricane/html/Library_8h_source.html @@ -48,9 +48,9 @@ $(function() {
    Library description (API)
    Definition: Library.h:38
    Cells getCells() const
    Definition: Library.h:102
    Name description (API)
    Definition: Name.h:35
    -
    The model (API).
    Definition: Cell.h:66
    +
    The model (API).
    Definition: Cell.h:64
    Cell * getCell(const Name &name) const
    Definition: Library.h:101
    -
    DataBase object root class (API).
    Definition: DBo.h:47
    +
    DataBase object root class (API).
    Definition: DBo.h:45
    DBo Inherit
    Definition: Library.h:44
    Generic Collection auto-pointer.
    Definition: Collection.h:28
    void setName(const Name &name)
    @@ -66,7 +66,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/ListCollection_8h_source.html b/hurricane/doc/hurricane/html/ListCollection_8h_source.html index f1f97503..80e2097f 100644 --- a/hurricane/doc/hurricane/html/ListCollection_8h_source.html +++ b/hurricane/doc/hurricane/html/ListCollection_8h_source.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Locator_8h_source.html b/hurricane/doc/hurricane/html/Locator_8h_source.html index a47e0ada..bce75940 100644 --- a/hurricane/doc/hurricane/html/Locator_8h_source.html +++ b/hurricane/doc/hurricane/html/Locator_8h_source.html @@ -59,7 +59,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/MapCollection_8h_source.html b/hurricane/doc/hurricane/html/MapCollection_8h_source.html index 5f4b7b5d..228bae21 100644 --- a/hurricane/doc/hurricane/html/MapCollection_8h_source.html +++ b/hurricane/doc/hurricane/html/MapCollection_8h_source.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Name_8h_source.html b/hurricane/doc/hurricane/html/Name_8h_source.html index d51fc7c3..98f387b5 100644 --- a/hurricane/doc/hurricane/html/Name_8h_source.html +++ b/hurricane/doc/hurricane/html/Name_8h_source.html @@ -62,7 +62,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Names_8h_source.html b/hurricane/doc/hurricane/html/Names_8h_source.html index b28ffcb9..4ae9e003 100644 --- a/hurricane/doc/hurricane/html/Names_8h_source.html +++ b/hurricane/doc/hurricane/html/Names_8h_source.html @@ -50,7 +50,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Net_8h_source.html b/hurricane/doc/hurricane/html/Net_8h_source.html index f2c66aef..54327187 100644 --- a/hurricane/doc/hurricane/html/Net_8h_source.html +++ b/hurricane/doc/hurricane/html/Net_8h_source.html @@ -44,7 +44,7 @@ $(function() {
    Net.h
    -
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Net.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_NET
    21 #define HURRICANE_NET
    22 
    23 #include <functional>
    24 #include "hurricane/Entity.h"
    25 #include "hurricane/Nets.h"
    26 #include "hurricane/Component.h"
    27 #include "hurricane/Rubbers.h"
    28 #include "hurricane/Rubber.h"
    29 #include "hurricane/RoutingPads.h"
    30 #include "hurricane/Plugs.h"
    31 #include "hurricane/Pins.h"
    32 #include "hurricane/Contacts.h"
    33 #include "hurricane/Segments.h"
    34 #include "hurricane/Verticals.h"
    35 #include "hurricane/Horizontals.h"
    36 #include "hurricane/Pads.h"
    37 #include "hurricane/IntrusiveSet.h"
    38 #include "hurricane/Path.h"
    39 #include "hurricane/NetAlias.h"
    40 
    41 namespace Hurricane {
    42 
    43 
    44 // ****************************************************************************************************
    45 // Net declaration
    46 // ****************************************************************************************************
    47 
    48 class Net : public Entity {
    49 // **********************
    50 
    51 // Types
    52 // *****
    53 
    54  public: typedef Entity Inherit;
    55 
    56  public: typedef unsigned Arity;
    57 
    58  public: class Type {
    59  // ***************
    60 
    61  public: enum Code {UNDEFINED=0, LOGICAL=1, CLOCK=2, POWER=3, GROUND=4, BLOCKAGE=5, FUSED=6};
    62 
    63  private: Code _code;
    64 
    65  public: Type(const Code& code = UNDEFINED);
    66  public: Type(const Type& type);
    67  public: Type(string);
    68 
    69  public: Type& operator=(const Type& type);
    70 
    71  public: operator const Code&() const {return _code;};
    72 
    73  public: const Code& getCode() const {return _code;};
    74 
    75  public: string _getTypeName() const { return _TName("Net::type"); };
    76  public: string _getString() const;
    77  public: Record* _getRecord() const;
    78 
    79  };
    80 
    81  public: class Direction {
    82  // ********************
    83 
    84  public: enum Code { DirIn = 0x0001
    85  , DirOut = 0x0002
    86  , DirUndefined = 0x0000
    87  , ConnTristate = 0x0100
    88  , ConnWiredOr = 0x0200
    90  , IN = DirIn
    91  , OUT = DirOut
    97  , DirMask = DirIn | DirOut | DirUndefined
    98  };
    99 
    100  private: Code _code;
    101 
    102  public: Direction(const Code& code = UNDEFINED);
    103  public: Direction(const Direction& direction);
    104  public: Direction(string);
    105 
    106  public: Direction& operator =(const Direction& direction);
    107  public: Direction& operator|=(const Direction& direction);
    108 
    109  public: operator const Code&() const {return _code;};
    110 
    111  public: const Code& getCode() const {return _code;};
    112 
    113  public: string _getTypeName() const { return _TName("Net::Direction"); };
    114  public: string _getString() const;
    115  public: Record* _getRecord() const;
    116 
    117  };
    118 
    119  class ComponentSet : public IntrusiveSet<Component> {
    120  // ************************************************
    121 
    122  public: typedef IntrusiveSet<Component> Inherit;
    123 
    124  public: ComponentSet();
    125 
    126  public: virtual unsigned _getHashValue(Component* component) const;
    127  public: virtual Component* _getNextElement(Component* component) const;
    128  public: virtual void _setNextElement(Component* component, Component* nextComponent) const;
    129 
    130  };
    131 
    132  class RubberSet : public IntrusiveSet<Rubber> {
    133  // ******************************************
    134 
    135  public: typedef IntrusiveSet<Rubber> Inherit;
    136 
    137  public: RubberSet();
    138 
    139  public: virtual unsigned _getHashValue(Rubber* rubber) const;
    140  public: virtual Rubber* _getNextElement(Rubber* rubber) const;
    141  public: virtual void _setNextElement(Rubber* rubber, Rubber* nextRubber) const;
    142 
    143  };
    144 
    145 // Attributes
    146 // **********
    147 
    148  private: Cell* _cell;
    149  private: Name _name;
    150  private: Arity _arity;
    151  private: bool _isGlobal;
    152  private: bool _isExternal;
    153  private: bool _isAutomatic;
    154  private: Type _type;
    155  private: Direction _direction;
    156  private: Point _position;
    157  private: ComponentSet _componentSet;
    158  private: RubberSet _rubberSet;
    159  private: Net* _nextOfCellNetMap;
    160  private: NetMainName _mainName;
    161 
    162 // Constructors
    163 // ************
    164 
    165  protected: Net(Cell* cell, const Name& name);
    166 
    167  public: static Net* create(Cell* cell, const Name& name);
    168 
    169 // Accessors
    170 // *********
    171 
    172  public: virtual Cell* getCell() const {return _cell;};
    173  public: virtual Box getBoundingBox() const;
    174  public: const Name& getName() const {return _name;};
    175  public: const NetMainName* getMainName() const { return &_mainName; }
    176  public: const Arity& getArity() const {return _arity;};
    177  public: const Type& getType() const {return _type;};
    178  public: const Direction& getDirection() const {return _direction;};
    179  public: const Point& getPosition() const {return _position;};
    180  public: const DbU::Unit& getX() const {return _position.getX();};
    181  public: const DbU::Unit& getY() const {return _position.getY();};
    182  public: Components getComponents() const {return _componentSet.getElements();};
    183  public: Rubbers getRubbers() const {return _rubberSet.getElements();};
    184  public: RoutingPads getRoutingPads() const;
    185  public: Plugs getPlugs() const;
    186  public: Pins getPins() const;
    187  public: Contacts getContacts() const;
    188  public: Segments getSegments() const;
    189  public: Verticals getVerticals() const;
    190  public: Horizontals getHorizontals() const;
    191  public: Pads getPads() const;
    192  public: Plugs getSlavePlugs() const;
    193  public: Plugs getConnectedSlavePlugs() const;
    194  public: Plugs getUnconnectedSlavePlugs() const;
    195  public: Aliases getAliases() const { return new AliasList(this); };
    196 
    197 // Filters
    198 // *******
    199 
    200  public: static NetFilter getIsCellNetFilter();
    201  public: static NetFilter getIsDeepNetFilter();
    202  public: static NetFilter getIsGlobalFilter();
    203  public: static NetFilter getIsExternalFilter();
    204  public: static NetFilter getIsInternalFilter();
    205  public: static NetFilter getIsClockFilter();
    206  public: static NetFilter getIsSupplyFilter();
    207  public: static NetFilter getIsPowerFilter();
    208  public: static NetFilter getIsGroundFilter();
    209 
    210 // Predicates
    211 // **********
    212 
    213  public: virtual bool isDeepNet () const {return false;};
    214  public: bool isGlobal () const {return _isGlobal;};
    215  public: bool isExternal () const {return _isExternal;};
    216  public: bool isAutomatic() const {return _isAutomatic;};
    217  public: bool isBlockage () const {return (_type == Type::BLOCKAGE);};
    218  public: bool isFused () const {return (_type == Type::FUSED);};
    219  public: bool isLogical () const {return (_type == Type::LOGICAL);};
    220  public: bool isClock () const {return (_type == Type::CLOCK);};
    221  public: bool isPower () const {return (_type == Type::POWER);};
    222  public: bool isGround () const {return (_type == Type::GROUND);};
    223  public: bool isSupply () const {return (isPower() || isGround());};
    224  public: bool hasAlias (const Name& name) const;
    225 
    226 // Updators
    227 // ********
    228 
    229  public: void setName(Name name);
    230  public: void setArity(const Arity& arity);
    231  public: void setGlobal(bool isGlobal);
    232  public: void setExternal(bool isExternal);
    233  public: void setAutomatic(bool isAutomatic);
    234  public: void setType(const Type& type);
    235  public: void setDirection(const Direction& direction);
    236  public: void setPosition(const Point& position);
    237  public: void setRoutingState(uint32_t state);
    238  public: void materialize();
    239  public: void unmaterialize();
    240  public: bool addAlias(const Name& name);
    241  public: bool removeAlias(const Name& name);
    242  public: void merge(Net* net);
    243  public: Net* getClone(Cell* cloneCell);
    244 
    245 // Others
    246 // ******
    247 
    248  protected: virtual void _postCreate();
    249  protected: virtual void _preDestroy();
    250 
    251  public: virtual void _toJson(JsonWriter*) const;
    252  public: virtual void _toJsonSignature(JsonWriter*) const;
    253  public: virtual void _toJsonCollections(JsonWriter*) const;
    254  public: virtual string _getTypeName() const {return _TName("Net");};
    255  public: virtual string _getString() const;
    256  public: virtual Record* _getRecord() const;
    257  public: NetMainName& _getMainName() { return _mainName; }
    258  public: ComponentSet& _getComponentSet() {return _componentSet;};
    259  public: RubberSet& _getRubberSet() {return _rubberSet;};
    260  public: Net* _getNextOfCellNetMap() const {return _nextOfCellNetMap;};
    261 
    262  public: void _setNextOfCellNetMap(Net* net) {_nextOfCellNetMap = net;};
    263 
    264  public: struct CompareByName {
    265  inline bool operator() ( const Net* lhs, const Net* rhs ) const { return lhs->getName() < rhs->getName(); }
    266  };
    267 
    268 };
    269 
    270 
    271 // -------------------------------------------------------------------
    272 // Class : "HookKey".
    273 
    274  class HookKey {
    275  public:
    276  inline HookKey ( unsigned int id, const std::string& tname );
    277  inline unsigned int id () const;
    278  inline std::string tname () const;
    279  private:
    280  unsigned int _id;
    281  std::string _tname;
    282  };
    283 
    284 
    285  inline HookKey::HookKey ( unsigned int id, const std::string& tname ) : _id(id), _tname(tname) { }
    286  inline unsigned int HookKey::id () const { return _id; }
    287  inline std::string HookKey::tname () const { return _tname; }
    288 
    289  inline bool operator< ( const HookKey& lhs, const HookKey& rhs )
    290  {
    291  if (lhs.id() != rhs.id()) return lhs.id() < rhs.id();
    292  return lhs.tname() < rhs.tname();
    293  }
    294 
    295 
    296 // -------------------------------------------------------------------
    297 // Class : "HookElement".
    298 
    299  class HookElement {
    300  public:
    301  enum Flags { OpenRingStart = (1<<0)
    302  , ClosedRing = (1<<1)
    303  };
    304  public:
    305  inline HookElement ( Hook*, unsigned long flags=0 );
    306  inline Hook* hook () const;
    307  inline HookElement* next () const;
    308  inline void setHook ( Hook* );
    309  inline void setNext ( HookElement* );
    310  inline unsigned long flags () const;
    311  inline HookElement& setFlags ( unsigned long mask );
    312  inline HookElement& resetFlags ( unsigned long mask );
    313  inline bool issetFlags ( unsigned long mask ) const;
    314  private:
    315  Hook* _hook;
    316  HookElement* _next;
    317  unsigned long _flags;
    318  };
    319 
    320 
    321  inline HookElement::HookElement ( Hook* hook, unsigned long flags ) : _hook(hook), _next(NULL), _flags(flags) { }
    322  inline Hook* HookElement::hook () const { return _hook; }
    323  inline HookElement* HookElement::next () const { return _next; }
    324  inline void HookElement::setHook ( Hook* hook ) { _hook = hook; }
    325  inline void HookElement::setNext ( HookElement* element ) { _next = element; }
    326  inline unsigned long HookElement::flags () const { return _flags; }
    327  inline HookElement& HookElement::setFlags ( unsigned long mask ) { _flags |= mask; return *this; }
    328  inline HookElement& HookElement::resetFlags ( unsigned long mask ) { _flags &= ~mask; return *this; }
    329  inline bool HookElement::issetFlags ( unsigned long mask ) const { return _flags & mask; }
    330 
    331 
    332  typedef map<HookKey,HookElement> HookLut;
    333 
    334 
    335 // -------------------------------------------------------------------
    336 // Class : "JsonNet".
    337 
    338  class JsonNet : public JsonEntity {
    339  public:
    340  static bool hookFromString ( std::string s, unsigned int& id, std::string& tname );
    341  static void initialize ();
    342  JsonNet ( unsigned long flags );
    343  virtual ~JsonNet ();
    344  virtual string getTypeName () const;
    345  virtual JsonNet* clone ( unsigned long ) const;
    346  virtual void toData ( JsonStack& );
    347  void addHookLink ( Hook*, unsigned int jsonId, const std::string& jsonNext );
    348  Hook* getHook ( unsigned int jsonId, const std::string& tname ) const;
    349  bool checkRings () const;
    350  void buildRings () const;
    351  inline void clearHookLinks ();
    352  protected:
    353  bool _autoMaterialize;
    354  Net* _net;
    355  HookLut _hooks;
    356  };
    357 
    358 
    359  inline void JsonNet::clearHookLinks () { _hooks.clear(); }
    360 
    361 
    362 } // Hurricane namespace.
    363 
    364 
    365 // -------------------------------------------------------------------
    366 // Inspector Support for : Net::Type::Code*".
    367 
    368 template<>
    369 inline std::string getString<const Hurricane::Net::Type::Code*>
    370  ( const Hurricane::Net::Type::Code* object )
    371  {
    372  switch ( *object ) {
    373  case Hurricane::Net::Type::UNDEFINED: return "UNDEFINED";
    374  case Hurricane::Net::Type::LOGICAL: return "LOGICAL";
    375  case Hurricane::Net::Type::CLOCK: return "CLOCK";
    376  case Hurricane::Net::Type::POWER: return "POWER";
    377  case Hurricane::Net::Type::GROUND: return "GROUND";
    378  case Hurricane::Net::Type::BLOCKAGE: return "BLOCKAGE";
    379  case Hurricane::Net::Type::FUSED: return "FUSED";
    380  }
    381  return "ABNORMAL";
    382  }
    383 
    384 template<>
    385 inline Hurricane::Record* getRecord<const Hurricane::Net::Type::Code*>
    386  ( const Hurricane::Net::Type::Code* object )
    387  {
    388  Hurricane::Record* record = new Hurricane::Record(getString(object));
    389  record->add(getSlot("Code", (unsigned int*)object));
    390  return record;
    391  }
    392 
    393 
    394 // -------------------------------------------------------------------
    395 // Inspector Support for : "const Net::Direction::Code*".
    396 
    397 template<>
    398 inline std::string getString<const Hurricane::Net::Direction::Code*>
    399  ( const Hurricane::Net::Direction::Code* object )
    400  {
    401  std::ostringstream s;
    402  s << (((*object) & Hurricane::Net::Direction::DirIn ) ? 'i' : '-');
    403  s << (((*object) & Hurricane::Net::Direction::DirOut ) ? 'o' : '-');
    404  s << (((*object) & Hurricane::Net::Direction::ConnTristate) ? 't' : '-');
    405  s << (((*object) & Hurricane::Net::Direction::ConnWiredOr ) ? 'w' : '-');
    406 
    407  switch ( (int)*object ) {
    408  case Hurricane::Net::Direction::UNDEFINED: s << " (UNDEFINED)"; break;
    409  case Hurricane::Net::Direction::IN: s << " (IN)"; break;
    410  case Hurricane::Net::Direction::OUT: s << " (OUT)"; break;
    411  case Hurricane::Net::Direction::INOUT: s << " (INOUT)"; break;
    412  case Hurricane::Net::Direction::TRISTATE: s << " (TRISTATE)"; break;
    413  case Hurricane::Net::Direction::TRANSCV: s << " (TRANSCV)"; break;
    414  case Hurricane::Net::Direction::WOR_OUT: s << " (WOR_OUT)"; break;
    415  case Hurricane::Net::Direction::WOR_INOUT: s << " (WOR_INOUT)"; break;
    416  }
    417  return s.str();
    418  }
    419 
    420 template<>
    421 inline Hurricane::Record* getRecord<const Hurricane::Net::Direction::Code*>
    422  ( const Hurricane::Net::Direction::Code* object )
    423  {
    424  Hurricane::Record* record = new Hurricane::Record(getString(object));
    425  record->add(getSlot("Code", (unsigned int*)object));
    426  return record;
    427  }
    428 
    429 
    430 INSPECTOR_P_SUPPORT(Hurricane::Net);
    431 INSPECTOR_P_SUPPORT(Hurricane::Net::ComponentSet);
    432 INSPECTOR_P_SUPPORT(Hurricane::Net::RubberSet);
    433 INSPECTOR_PR_SUPPORT(Hurricane::Net::Type);
    434 INSPECTOR_PR_SUPPORT(Hurricane::Net::Direction);
    435 IOSTREAM_POINTER_SUPPORT(Hurricane::Net::Type::Code);
    436 IOSTREAM_VALUE_SUPPORT(Hurricane::Net::Type::Code);
    437 IOSTREAM_POINTER_SUPPORT(Hurricane::Net::Direction::Code);
    438 IOSTREAM_VALUE_SUPPORT(Hurricane::Net::Direction::Code);
    439 
    440 
    441 namespace Hurricane {
    442 
    443 // Force SlotTemplate<> expansion on Net* type.
    444 // Because sometimes it didn't happens (?).
    445  const SlotTemplate<Net*> dummyNetSlot ( string("dummyNetSlot"), NULL );
    446 
    447 }
    448 
    449 #endif // HURRICANE_NET
    450 
    451 
    452 // ****************************************************************************************************
    453 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    454 // ****************************************************************************************************
    static NetFilter getIsGlobalFilter()
    +
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Net.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_NET
    21 #define HURRICANE_NET
    22 
    23 #include <functional>
    24 #include "hurricane/Entity.h"
    25 #include "hurricane/Nets.h"
    26 #include "hurricane/Component.h"
    27 #include "hurricane/Rubbers.h"
    28 #include "hurricane/Rubber.h"
    29 #include "hurricane/RoutingPads.h"
    30 #include "hurricane/Plugs.h"
    31 #include "hurricane/Pins.h"
    32 #include "hurricane/Contacts.h"
    33 #include "hurricane/Segments.h"
    34 #include "hurricane/Verticals.h"
    35 #include "hurricane/Horizontals.h"
    36 #include "hurricane/Pads.h"
    37 #include "hurricane/IntrusiveSet.h"
    38 #include "hurricane/Path.h"
    39 #include "hurricane/NetAlias.h"
    40 
    41 namespace Hurricane {
    42 
    43 
    44 // ****************************************************************************************************
    45 // Net declaration
    46 // ****************************************************************************************************
    47 
    48 class Net : public Entity {
    49 // **********************
    50 
    51 // Types
    52 // *****
    53 
    54  public: typedef Entity Inherit;
    55 
    56  public: typedef unsigned Arity;
    57 
    58  public: class Type {
    59  // ***************
    60 
    61  public: enum Code {UNDEFINED=0, LOGICAL=1, CLOCK=2, POWER=3, GROUND=4, BLOCKAGE=5, FUSED=6};
    62 
    63  private: Code _code;
    64 
    65  public: Type(const Code& code = UNDEFINED);
    66  public: Type(const Type& type);
    67  public: Type(string);
    68 
    69  public: Type& operator=(const Type& type);
    70 
    71  public: operator const Code&() const {return _code;};
    72 
    73  public: const Code& getCode() const {return _code;};
    74 
    75  public: string _getTypeName() const { return _TName("Net::type"); };
    76  public: string _getString() const;
    77  public: Record* _getRecord() const;
    78 
    79  };
    80 
    81  public: class Direction {
    82  // ********************
    83 
    84  public: enum Code { DirIn = 0x0001
    85  , DirOut = 0x0002
    86  , DirUndefined = 0x0000
    87  , ConnTristate = 0x0100
    88  , ConnWiredOr = 0x0200
    90  , IN = DirIn
    91  , OUT = DirOut
    97  , DirMask = DirIn | DirOut | DirUndefined
    98  };
    99 
    100  private: Code _code;
    101 
    102  public: Direction(const Code& code = UNDEFINED);
    103  public: Direction(const Direction& direction);
    104  public: Direction(string);
    105 
    106  public: Direction& operator =(const Direction& direction);
    107  public: Direction& operator|=(const Direction& direction);
    108 
    109  public: operator const Code&() const {return _code;};
    110 
    111  public: const Code& getCode() const {return _code;};
    112 
    113  public: string _getTypeName() const { return _TName("Net::Direction"); };
    114  public: string _getString() const;
    115  public: Record* _getRecord() const;
    116 
    117  };
    118 
    119  class ComponentSet : public IntrusiveSet<Component> {
    120  // ************************************************
    121 
    122  public: typedef IntrusiveSet<Component> Inherit;
    123 
    124  public: ComponentSet();
    125 
    126  public: virtual unsigned _getHashValue(Component* component) const;
    127  public: virtual Component* _getNextElement(Component* component) const;
    128  public: virtual void _setNextElement(Component* component, Component* nextComponent) const;
    129 
    130  };
    131 
    132  class RubberSet : public IntrusiveSet<Rubber> {
    133  // ******************************************
    134 
    135  public: typedef IntrusiveSet<Rubber> Inherit;
    136 
    137  public: RubberSet();
    138 
    139  public: virtual unsigned _getHashValue(Rubber* rubber) const;
    140  public: virtual Rubber* _getNextElement(Rubber* rubber) const;
    141  public: virtual void _setNextElement(Rubber* rubber, Rubber* nextRubber) const;
    142 
    143  };
    144 
    145 // Attributes
    146 // **********
    147 
    148  private: Cell* _cell;
    149  private: Name _name;
    150  private: Arity _arity;
    151  private: bool _isGlobal;
    152  private: bool _isExternal;
    153  private: bool _isAutomatic;
    154  private: Type _type;
    155  private: Direction _direction;
    156  private: Point _position;
    157  private: ComponentSet _componentSet;
    158  private: RubberSet _rubberSet;
    159  private: Net* _nextOfCellNetMap;
    160  private: NetMainName _mainName;
    161 
    162 // Constructors
    163 // ************
    164 
    165  protected: Net(Cell* cell, const Name& name);
    166 
    167  public: static Net* create(Cell* cell, const Name& name);
    168 
    169 // Accessors
    170 // *********
    171 
    172  public: virtual Cell* getCell() const {return _cell;};
    173  public: virtual Box getBoundingBox() const;
    174  public: const Name& getName() const {return _name;};
    175  public: const NetMainName* getMainName() const { return &_mainName; }
    176  public: const Arity& getArity() const {return _arity;};
    177  public: const Type& getType() const {return _type;};
    178  public: const Direction& getDirection() const {return _direction;};
    179  public: const Point& getPosition() const {return _position;};
    180  public: const DbU::Unit& getX() const {return _position.getX();};
    181  public: const DbU::Unit& getY() const {return _position.getY();};
    182  public: Components getComponents() const {return _componentSet.getElements();};
    183  public: Rubbers getRubbers() const {return _rubberSet.getElements();};
    184  public: RoutingPads getRoutingPads() const;
    185  public: Plugs getPlugs() const;
    186  public: Pins getPins() const;
    187  public: Contacts getContacts() const;
    188  public: Segments getSegments() const;
    189  public: Verticals getVerticals() const;
    190  public: Horizontals getHorizontals() const;
    191  public: Pads getPads() const;
    192  public: Plugs getSlavePlugs() const;
    193  public: Plugs getConnectedSlavePlugs() const;
    194  public: Plugs getUnconnectedSlavePlugs() const;
    195  public: Aliases getAliases() const { return new AliasList(this); };
    196 
    197 // Filters
    198 // *******
    199 
    200  public: static NetFilter getIsCellNetFilter();
    201  public: static NetFilter getIsDeepNetFilter();
    202  public: static NetFilter getIsGlobalFilter();
    203  public: static NetFilter getIsExternalFilter();
    204  public: static NetFilter getIsInternalFilter();
    205  public: static NetFilter getIsClockFilter();
    206  public: static NetFilter getIsSupplyFilter();
    207  public: static NetFilter getIsPowerFilter();
    208  public: static NetFilter getIsGroundFilter();
    209 
    210 // Predicates
    211 // **********
    212 
    213  public: virtual bool isDeepNet () const {return false;};
    214  public: bool isGlobal () const {return _isGlobal;};
    215  public: bool isExternal () const {return _isExternal;};
    216  public: bool isAutomatic() const {return _isAutomatic;};
    217  public: bool isBlockage () const {return (_type == Type::BLOCKAGE);};
    218  public: bool isFused () const {return (_type == Type::FUSED);};
    219  public: bool isLogical () const {return (_type == Type::LOGICAL);};
    220  public: bool isClock () const {return (_type == Type::CLOCK);};
    221  public: bool isPower () const {return (_type == Type::POWER);};
    222  public: bool isGround () const {return (_type == Type::GROUND);};
    223  public: bool isSupply () const {return (isPower() || isGround());};
    224  public: bool hasAlias (const Name& ) const;
    225  public: NetAliasHook* getAlias (const Name& ) const;
    226 
    227 // Updators
    228 // ********
    229 
    230  public: void setName(Name name);
    231  public: void setArity(const Arity& arity);
    232  public: void setGlobal(bool isGlobal);
    233  public: void setExternal(bool isExternal);
    234  public: void setAutomatic(bool isAutomatic);
    235  public: void setType(const Type& type);
    236  public: void setDirection(const Direction& direction);
    237  public: void setPosition(const Point& position);
    238  public: void setRoutingState(uint32_t state);
    239  public: void materialize();
    240  public: void unmaterialize();
    241  public: bool addAlias(const Name& name, bool isExternal=false);
    242  public: bool removeAlias(const Name& name);
    243  public: void merge(Net* net);
    244  public: Net* getClone(Cell* cloneCell);
    245 
    246 // Others
    247 // ******
    248 
    249  protected: virtual void _postCreate();
    250  protected: virtual void _preDestroy();
    251 
    252  public: virtual void _toJson(JsonWriter*) const;
    253  public: virtual void _toJsonSignature(JsonWriter*) const;
    254  public: virtual void _toJsonCollections(JsonWriter*) const;
    255  public: virtual string _getTypeName() const {return _TName("Net");};
    256  public: virtual string _getString() const;
    257  public: virtual Record* _getRecord() const;
    258  public: NetMainName& _getMainName() { return _mainName; }
    259  public: ComponentSet& _getComponentSet() {return _componentSet;};
    260  public: RubberSet& _getRubberSet() {return _rubberSet;};
    261  public: Net* _getNextOfCellNetMap() const {return _nextOfCellNetMap;};
    262 
    263  public: void _setNextOfCellNetMap(Net* net) {_nextOfCellNetMap = net;};
    264 
    265  public: struct CompareByName {
    266  inline bool operator() ( const Net* lhs, const Net* rhs ) const { return lhs->getName() < rhs->getName(); }
    267  };
    268 
    269 };
    270 
    271 
    272 // -------------------------------------------------------------------
    273 // Class : "HookKey".
    274 
    275  class HookKey {
    276  public:
    277  inline HookKey ( unsigned int id, const std::string& tname );
    278  inline unsigned int id () const;
    279  inline std::string tname () const;
    280  private:
    281  unsigned int _id;
    282  std::string _tname;
    283  };
    284 
    285 
    286  inline HookKey::HookKey ( unsigned int id, const std::string& tname ) : _id(id), _tname(tname) { }
    287  inline unsigned int HookKey::id () const { return _id; }
    288  inline std::string HookKey::tname () const { return _tname; }
    289 
    290  inline bool operator< ( const HookKey& lhs, const HookKey& rhs )
    291  {
    292  if (lhs.id() != rhs.id()) return lhs.id() < rhs.id();
    293  return lhs.tname() < rhs.tname();
    294  }
    295 
    296 
    297 // -------------------------------------------------------------------
    298 // Class : "HookElement".
    299 
    300  class HookElement {
    301  public:
    302  enum Flags { OpenRingStart = (1<<0)
    303  , ClosedRing = (1<<1)
    304  };
    305  public:
    306  inline HookElement ( Hook*, unsigned long flags=0 );
    307  inline Hook* hook () const;
    308  inline HookElement* next () const;
    309  inline void setHook ( Hook* );
    310  inline void setNext ( HookElement* );
    311  inline unsigned long flags () const;
    312  inline HookElement& setFlags ( unsigned long mask );
    313  inline HookElement& resetFlags ( unsigned long mask );
    314  inline bool issetFlags ( unsigned long mask ) const;
    315  private:
    316  Hook* _hook;
    317  HookElement* _next;
    318  unsigned long _flags;
    319  };
    320 
    321 
    322  inline HookElement::HookElement ( Hook* hook, unsigned long flags ) : _hook(hook), _next(NULL), _flags(flags) { }
    323  inline Hook* HookElement::hook () const { return _hook; }
    324  inline HookElement* HookElement::next () const { return _next; }
    325  inline void HookElement::setHook ( Hook* hook ) { _hook = hook; }
    326  inline void HookElement::setNext ( HookElement* element ) { _next = element; }
    327  inline unsigned long HookElement::flags () const { return _flags; }
    328  inline HookElement& HookElement::setFlags ( unsigned long mask ) { _flags |= mask; return *this; }
    329  inline HookElement& HookElement::resetFlags ( unsigned long mask ) { _flags &= ~mask; return *this; }
    330  inline bool HookElement::issetFlags ( unsigned long mask ) const { return _flags & mask; }
    331 
    332 
    333  typedef map<HookKey,HookElement> HookLut;
    334 
    335 
    336 // -------------------------------------------------------------------
    337 // Class : "JsonNet".
    338 
    339  class JsonNet : public JsonEntity {
    340  public:
    341  static bool hookFromString ( std::string s, unsigned int& id, std::string& tname );
    342  static void initialize ();
    343  JsonNet ( unsigned long flags );
    344  virtual ~JsonNet ();
    345  virtual string getTypeName () const;
    346  virtual JsonNet* clone ( unsigned long ) const;
    347  virtual void toData ( JsonStack& );
    348  void addHookLink ( Hook*, unsigned int jsonId, const std::string& jsonNext );
    349  Hook* getHook ( unsigned int jsonId, const std::string& tname ) const;
    350  bool checkRings () const;
    351  void buildRings () const;
    352  inline void clearHookLinks ();
    353  protected:
    354  bool _autoMaterialize;
    355  Net* _net;
    356  HookLut _hooks;
    357  };
    358 
    359 
    360  inline void JsonNet::clearHookLinks () { _hooks.clear(); }
    361 
    362 
    363 } // Hurricane namespace.
    364 
    365 
    366 // -------------------------------------------------------------------
    367 // Inspector Support for : Net::Type::Code*".
    368 
    369 template<>
    370 inline std::string getString<const Hurricane::Net::Type::Code*>
    371  ( const Hurricane::Net::Type::Code* object )
    372  {
    373  switch ( *object ) {
    374  case Hurricane::Net::Type::UNDEFINED: return "UNDEFINED";
    375  case Hurricane::Net::Type::LOGICAL: return "LOGICAL";
    376  case Hurricane::Net::Type::CLOCK: return "CLOCK";
    377  case Hurricane::Net::Type::POWER: return "POWER";
    378  case Hurricane::Net::Type::GROUND: return "GROUND";
    379  case Hurricane::Net::Type::BLOCKAGE: return "BLOCKAGE";
    380  case Hurricane::Net::Type::FUSED: return "FUSED";
    381  }
    382  return "ABNORMAL";
    383  }
    384 
    385 template<>
    386 inline Hurricane::Record* getRecord<const Hurricane::Net::Type::Code*>
    387  ( const Hurricane::Net::Type::Code* object )
    388  {
    389  Hurricane::Record* record = new Hurricane::Record(getString(object));
    390  record->add(getSlot("Code", (unsigned int*)object));
    391  return record;
    392  }
    393 
    394 
    395 // -------------------------------------------------------------------
    396 // Inspector Support for : "const Net::Direction::Code*".
    397 
    398 template<>
    399 inline std::string getString<const Hurricane::Net::Direction::Code*>
    400  ( const Hurricane::Net::Direction::Code* object )
    401  {
    402  std::ostringstream s;
    403  s << (((*object) & Hurricane::Net::Direction::DirIn ) ? 'i' : '-');
    404  s << (((*object) & Hurricane::Net::Direction::DirOut ) ? 'o' : '-');
    405  s << (((*object) & Hurricane::Net::Direction::ConnTristate) ? 't' : '-');
    406  s << (((*object) & Hurricane::Net::Direction::ConnWiredOr ) ? 'w' : '-');
    407 
    408  switch ( (int)*object ) {
    409  case Hurricane::Net::Direction::UNDEFINED: s << " (UNDEFINED)"; break;
    410  case Hurricane::Net::Direction::IN: s << " (IN)"; break;
    411  case Hurricane::Net::Direction::OUT: s << " (OUT)"; break;
    412  case Hurricane::Net::Direction::INOUT: s << " (INOUT)"; break;
    413  case Hurricane::Net::Direction::TRISTATE: s << " (TRISTATE)"; break;
    414  case Hurricane::Net::Direction::TRANSCV: s << " (TRANSCV)"; break;
    415  case Hurricane::Net::Direction::WOR_OUT: s << " (WOR_OUT)"; break;
    416  case Hurricane::Net::Direction::WOR_INOUT: s << " (WOR_INOUT)"; break;
    417  }
    418  return s.str();
    419  }
    420 
    421 template<>
    422 inline Hurricane::Record* getRecord<const Hurricane::Net::Direction::Code*>
    423  ( const Hurricane::Net::Direction::Code* object )
    424  {
    425  Hurricane::Record* record = new Hurricane::Record(getString(object));
    426  record->add(getSlot("Code", (unsigned int*)object));
    427  return record;
    428  }
    429 
    430 
    431 INSPECTOR_P_SUPPORT(Hurricane::Net);
    432 INSPECTOR_P_SUPPORT(Hurricane::Net::ComponentSet);
    433 INSPECTOR_P_SUPPORT(Hurricane::Net::RubberSet);
    434 INSPECTOR_PR_SUPPORT(Hurricane::Net::Type);
    435 INSPECTOR_PR_SUPPORT(Hurricane::Net::Direction);
    436 IOSTREAM_POINTER_SUPPORT(Hurricane::Net::Type::Code);
    437 IOSTREAM_VALUE_SUPPORT(Hurricane::Net::Type::Code);
    438 IOSTREAM_POINTER_SUPPORT(Hurricane::Net::Direction::Code);
    439 IOSTREAM_VALUE_SUPPORT(Hurricane::Net::Direction::Code);
    440 
    441 
    442 namespace Hurricane {
    443 
    444 // Force SlotTemplate<> expansion on Net* type.
    445 // Because sometimes it didn't happens (?).
    446  const SlotTemplate<Net*> dummyNetSlot ( string("dummyNetSlot"), NULL );
    447 
    448 }
    449 
    450 #endif // HURRICANE_NET
    451 
    452 
    453 // ****************************************************************************************************
    454 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    455 // ****************************************************************************************************
    static NetFilter getIsGlobalFilter()
    static NetFilter getIsExternalFilter()
    const Type & getType() const
    Definition: Net.h:177
    Definition: Net.h:61
    @@ -61,8 +61,8 @@ $(function() {
    bool isExternal() const
    Definition: Net.h:215
    Definition: Net.h:81
    GenericFilter< Net * > NetFilter
    Definition: Nets.h:51
    -
    std::int64_t Unit
    Definition: DbU.h:70
    -
    The model (API).
    Definition: Cell.h:66
    +
    std::int64_t Unit
    Definition: DbU.h:67
    +
    The model (API).
    Definition: Cell.h:64
    Point description (API)
    Definition: Point.h:32
    void setPosition(const Point &position)
    Definition: Net.h:61
    @@ -123,7 +123,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Nets_8h_source.html b/hurricane/doc/hurricane/html/Nets_8h_source.html index 16404e9d..50d02336 100644 --- a/hurricane/doc/hurricane/html/Nets_8h_source.html +++ b/hurricane/doc/hurricane/html/Nets_8h_source.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Occurrence_8h_source.html b/hurricane/doc/hurricane/html/Occurrence_8h_source.html index 22c74e53..27cc18a4 100644 --- a/hurricane/doc/hurricane/html/Occurrence_8h_source.html +++ b/hurricane/doc/hurricane/html/Occurrence_8h_source.html @@ -45,7 +45,7 @@ $(function() {
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Occurrence.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_OCCURENCE
    21 #define HURRICANE_OCCURENCE
    22 
    23 #include "hurricane/Path.h"
    24 #include "hurricane/Name.h"
    25 #include "hurricane/Properties.h"
    26 
    27 namespace Hurricane {
    28 
    29 class Entity;
    30 class SharedPath;
    31 class Quark;
    32 class BasicLayer;
    33 
    34 
    35 // ****************************************************************************************************
    36 // Occurrence declaration
    37 // ****************************************************************************************************
    38 
    39 class Occurrence {
    40 // *************
    41 
    42 // Attributes
    43 // **********
    44 
    45  private: Entity* _entity;
    46  private: SharedPath* _sharedPath;
    47 
    48 // Constructors
    49 // ************
    50 
    51  public: Occurrence(const Entity* entity = NULL);
    52  public: Occurrence(const Entity* entity, const Path& path);
    53  public: Occurrence(const Occurrence& occurrence);
    54 
    55 // Operators
    56 // *********
    57 
    58  public: Occurrence& operator=(const Occurrence& occurrence);
    59 
    60  public: bool operator==(const Occurrence& occurrence) const;
    61  public: bool operator!=(const Occurrence& occurrence) const;
    62 
    63  public: bool operator<(const Occurrence& occurrence) const; // for stl set -> less predicate
    64 
    65 // Accessors
    66 // *********
    67 
    68  public: Entity* getEntity() const {return _entity;};
    69  public: Path getPath() const {return Path(_sharedPath);};
    70  public: Cell* getOwnerCell() const;
    71  public: Cell* getMasterCell() const;
    72  public: Property* getProperty(const Name& name) const;
    73  public: Properties getProperties() const;
    74  public: Occurrence getNetOccurrence() const;
    75  public: Box getBoundingBox() const;
    76  public: Box getBoundingBox(const BasicLayer*) const;
    77 
    78 // Predicates
    79 // **********
    80 
    81  public: bool isValid() const {return (_entity != NULL);};
    82  public: bool isBelowTerminalNetlist() const;
    83  public: bool hasProperty() const;
    84 
    85 // Updators
    86 // ********
    87 
    88  public: void makeInvalid();
    89  public: void put(Property* property);
    90  public: void remove(Property* property);
    91  public: void removeProperty(const Name& name);
    92  public: void clearProperties();
    93 
    94 // Others
    95 // ******
    96 
    97  public: string getName() const;
    98  public: string _getTypeName() const { return _TName("Occurrence"); };
    99  public: string _getString() const;
    100  public: string getCompactString() const;
    101  public: void toJson(JsonWriter*) const;
    102  public: Record* _getRecord() const;
    103  public: SharedPath* _getSharedPath() const {return _sharedPath;};
    104  public: Quark* _getQuark() const;
    105 
    106 };
    107 
    108 
    109 // ****************************************************************************************************
    110 // JsonOccurrence declaration
    111 // ****************************************************************************************************
    112 
    113 
    114 class JsonOccurrence : public JsonObject {
    115 // **********************************
    116 
    117  public: static void initialize();
    118  public: JsonOccurrence(unsigned long);
    119  public: virtual string getTypeName() const;
    120  public: virtual JsonOccurrence* clone(unsigned long) const;
    121  public: virtual void toData(JsonStack&);
    122 };
    123 
    124 } // End of Hurricane namespace.
    125 
    126 
    127 INSPECTOR_PR_SUPPORT(Hurricane::Occurrence);
    128 
    129 
    130 #endif // HURRICANE_OCCURENCE
    131 
    132 
    133 // ****************************************************************************************************
    134 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    135 // ****************************************************************************************************
    Entity * getEntity() const
    Definition: Occurrence.h:68
    -
    Path description (API)
    Definition: Path.h:37
    +
    Path description (API)
    Definition: Path.h:35
    Occurrence description (API)
    Definition: Occurrence.h:39
    void put(Property *property)
    Box getBoundingBox() const
    @@ -56,10 +56,10 @@ $(function() {
    Name description (API)
    Definition: Name.h:35
    Cell * getMasterCell() const
    bool hasProperty() const
    -
    The model (API).
    Definition: Cell.h:66
    +
    The model (API).
    Definition: Cell.h:64
    bool operator<(const Occurrence &occurrence) const
    Generic Collection auto-pointer.
    Definition: Collection.h:28
    -
    Property description (API)
    Definition: Property.h:58
    +
    Property description (API)
    Definition: Property.h:56
    bool operator!=(const Occurrence &occurrence) const
    Cell * getOwnerCell() const
    Box description (API)
    Definition: Box.h:31
    @@ -76,7 +76,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Occurrences_8h_source.html b/hurricane/doc/hurricane/html/Occurrences_8h_source.html index b008e32c..b51404e9 100644 --- a/hurricane/doc/hurricane/html/Occurrences_8h_source.html +++ b/hurricane/doc/hurricane/html/Occurrences_8h_source.html @@ -49,7 +49,7 @@ $(function() {
    Generic Filter auto-pointer.
    Definition: Filter.h:27
    GenericLocator< Occurrence > OccurrenceLocator
    Definition: Occurrences.h:43
    Generic Collection auto-pointer.
    Definition: Collection.h:28
    -
    Instance description (API)
    Definition: Instance.h:37
    +
    Instance description (API)
    Definition: Instance.h:35
    GenericFilter< Occurrence > OccurrenceFilter
    Definition: Occurrences.h:44
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    GenericCollection< Occurrence > Occurrences
    Definition: Occurrences.h:40
    @@ -58,7 +58,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Pad_8h_source.html b/hurricane/doc/hurricane/html/Pad_8h_source.html index ed8a5af7..b49088a0 100644 --- a/hurricane/doc/hurricane/html/Pad_8h_source.html +++ b/hurricane/doc/hurricane/html/Pad_8h_source.html @@ -50,7 +50,7 @@ $(function() {
    static Pad * create(Net *net, const Layer *layer, const Box &boundingBox)
    Component Inherit
    Definition: Pad.h:42
    Support for JSON export.
    Definition: JsonObject.h:83
    -
    std::int64_t Unit
    Definition: DbU.h:70
    +
    std::int64_t Unit
    Definition: DbU.h:67
    Box description (API)
    Definition: Box.h:31
    Layer description (API)
    Definition: Layer.h:52
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    @@ -60,7 +60,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Pads_8h_source.html b/hurricane/doc/hurricane/html/Pads_8h_source.html index e96d617d..90978acc 100644 --- a/hurricane/doc/hurricane/html/Pads_8h_source.html +++ b/hurricane/doc/hurricane/html/Pads_8h_source.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Path_8h_source.html b/hurricane/doc/hurricane/html/Path_8h_source.html index 8efb59b9..491ec892 100644 --- a/hurricane/doc/hurricane/html/Path_8h_source.html +++ b/hurricane/doc/hurricane/html/Path_8h_source.html @@ -44,7 +44,7 @@ $(function() {
    Path.h
    -
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Path.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_PATH
    21 #define HURRICANE_PATH
    22 
    23 #include "hurricane/Instances.h"
    24 #include "hurricane/Transformation.h"
    25 
    26 namespace Hurricane {
    27 
    28 class Cell;
    29 class SharedPath;
    30 
    31 
    32 
    33 // ****************************************************************************************************
    34 // Path declaration
    35 // ****************************************************************************************************
    36 
    37 class Path {
    38 // *******
    39 
    40 // Attributes
    41 // **********
    42 
    43  private: SharedPath* _sharedPath;
    44 
    45 // Constructors
    46 // ************
    47 
    48  public: Path(SharedPath* sharedPath = NULL);
    49  public: Path(Instance* instance);
    50  public: Path(Instance* headInstance, const Path& tailPath);
    51  public: Path(const Path& headPath, Instance* tailInstance);
    52  public: Path(Cell* cell, const string& pathName);
    53  public: Path(const Path& headPath, const Path& tailPath);
    54  public: Path(const Path& path);
    55 
    56 // Destructor
    57 // **********
    58 
    59  public: ~Path();
    60 
    61 // Operators
    62 // *********
    63 
    64  public: Path& operator=(const Path& path);
    65 
    66  public: bool operator==(const Path& path) const;
    67  public: bool operator!=(const Path& path) const;
    68 
    69  public: bool operator<(const Path& path) const; // for stl set -> less predicate
    70 
    71 // Accessors
    72 // *********
    73 
    74  public: static char getNameSeparator();
    75 
    76  public: Instance* getHeadInstance() const;
    77  public: Path getTailPath() const;
    78  public: Path getHeadPath() const;
    79  public: Instance* getTailInstance() const;
    80  public: string getName() const;
    81  public: Cell* getOwnerCell() const;
    82  public: Cell* getMasterCell() const;
    83  public: Instances getInstances() const;
    84  public: Transformation getTransformation(const Transformation& transformation = Transformation()) const;
    85 
    86 // Predicates
    87 // **********
    88 
    89  public: bool isEmpty() const;
    90 
    91 // Updators
    92 // ********
    93 
    94  public: void makeEmpty();
    95  public: static void setNameSeparator(char nameSeparator);
    96 
    97 // Others
    98 // ******
    99 
    100  public: string getCompactString() const;
    101  public: string getJsonString(unsigned long flags) const;
    102  public: string _getTypeName() const { return _TName("Occurrence"); };
    103  public: string _getString() const;
    104  public: Record* _getRecord() const;
    105 
    106  public: SharedPath* _getSharedPath() const {return _sharedPath;};
    107 
    108 };
    109 
    110 
    111 
    112 } // End of Hurricane namespace.
    113 
    114 
    115 INSPECTOR_PR_SUPPORT(Hurricane::Path);
    116 
    117 
    118 #endif // HURRICANE_PATH
    119 
    120 
    121 // ****************************************************************************************************
    122 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    123 // ****************************************************************************************************
    Path description (API)
    Definition: Path.h:37
    +
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Path.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #pragma once
    21 #include "hurricane/Instances.h"
    22 #include "hurricane/Transformation.h"
    23 
    24 namespace Hurricane {
    25 
    26 class Cell;
    27 class SharedPath;
    28 
    29 
    30 
    31 // ****************************************************************************************************
    32 // Path declaration
    33 // ****************************************************************************************************
    34 
    35 class Path {
    36 // *******
    37 
    38 // Attributes
    39 // **********
    40 
    41  private: SharedPath* _sharedPath;
    42 
    43 // Constructors
    44 // ************
    45 
    46  public: Path(SharedPath* sharedPath = NULL);
    47  public: Path(Instance* instance);
    48  public: Path(Instance* headInstance, const Path& tailPath);
    49  public: Path(const Path& headPath, Instance* tailInstance);
    50  public: Path(Cell* cell, const string& pathName);
    51  public: Path(const Path& headPath, const Path& tailPath);
    52  public: Path(const Path& path);
    53 
    54 // Destructor
    55 // **********
    56 
    57  public: ~Path();
    58 
    59 // Operators
    60 // *********
    61 
    62  public: Path& operator=(const Path& path);
    63 
    64  public: bool operator==(const Path& path) const;
    65  public: bool operator!=(const Path& path) const;
    66 
    67  public: bool operator<(const Path& path) const; // for stl set -> less predicate
    68 
    69 // Accessors
    70 // *********
    71 
    72  public: static char getNameSeparator();
    73 
    74  public: Instance* getHeadInstance() const;
    75  public: Path getTailPath() const;
    76  public: Path getHeadPath() const;
    77  public: Instance* getTailInstance() const;
    78  public: string getName() const;
    79  public: Cell* getOwnerCell() const;
    80  public: Cell* getMasterCell() const;
    81  public: Instances getInstances() const;
    82  public: Transformation getTransformation(const Transformation& transformation = Transformation()) const;
    83 
    84 // Predicates
    85 // **********
    86 
    87  public: bool isEmpty() const;
    88  public: int32_t contains(Instance*) const;
    89 
    90 // Updators
    91 // ********
    92 
    93  public: void makeEmpty();
    94  public: static void setNameSeparator(char nameSeparator);
    95 
    96 // Others
    97 // ******
    98 
    99  public: string getCompactString(bool showBrackets=true) const;
    100  public: string getJsonString(unsigned long flags) const;
    101  public: string _getTypeName() const { return _TName("Occurrence"); };
    102  public: string _getString() const;
    103  public: Record* _getRecord() const;
    104 
    105  public: SharedPath* _getSharedPath() const {return _sharedPath;};
    106 
    107 };
    108 
    109 
    110 
    111 } // End of Hurricane namespace.
    112 
    113 
    114 INSPECTOR_PR_SUPPORT(Hurricane::Path);
    115 
    116 
    117 // ****************************************************************************************************
    118 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    119 // ****************************************************************************************************
    Path description (API)
    Definition: Path.h:35
    static char getNameSeparator()
    Path getHeadPath() const
    Path & operator=(const Path &path)
    @@ -54,12 +54,12 @@ $(function() {
    Instance * getHeadInstance() const
    Transformation getTransformation(const Transformation &transformation=Transformation()) const
    bool operator==(const Path &path) const
    -
    The model (API).
    Definition: Cell.h:66
    +
    The model (API).
    Definition: Cell.h:64
    bool isEmpty() const
    Transformation description (API)
    Definition: Transformation.h:32
    Generic Collection auto-pointer.
    Definition: Collection.h:28
    bool operator!=(const Path &path) const
    -
    Instance description (API)
    Definition: Instance.h:37
    +
    Instance description (API)
    Definition: Instance.h:35
    Cell * getMasterCell() const
    string getName() const
    Cell * getOwnerCell() const
    @@ -73,7 +73,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Pathes_8h_source.html b/hurricane/doc/hurricane/html/Pathes_8h_source.html index 8ed18bce..e1b98f35 100644 --- a/hurricane/doc/hurricane/html/Pathes_8h_source.html +++ b/hurricane/doc/hurricane/html/Pathes_8h_source.html @@ -56,7 +56,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/PhysicalRule_8h_source.html b/hurricane/doc/hurricane/html/PhysicalRule_8h_source.html index b122b8c7..e9b0b22b 100644 --- a/hurricane/doc/hurricane/html/PhysicalRule_8h_source.html +++ b/hurricane/doc/hurricane/html/PhysicalRule_8h_source.html @@ -44,11 +44,11 @@ $(function() {
    PhysicalRule.h
    -
    1 // -*- C++ -*-
    2 //
    3 // This file is part of the Coriolis Software.
    4 // Copyright (c) UPMC 2009-2018, All Rights Reserved
    5 //
    6 // +-----------------------------------------------------------------+
    7 // | C O R I O L I S |
    8 // | H u r r i c a n e A n a l o g |
    9 // | |
    10 // | Authors : Damien Dupuis |
    11 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    12 // | =============================================================== |
    13 // | C++ Header : "./hurricane/PhysicalRule.h" |
    14 // +-----------------------------------------------------------------+
    15 
    16 
    17 #pragma once
    18 #include <tuple>
    19 #include "hurricane/DbU.h"
    20 #include "hurricane/Rule.h"
    21 
    22 
    23 namespace Hurricane {
    24 
    25 
    26  class RuleStep {
    27  public:
    28  inline RuleStep ( Hurricane::DbU::Unit uValue );
    29  inline RuleStep ( Hurricane::DbU::Unit hValue, Hurricane::DbU::Unit vValue );
    30  inline Hurricane::DbU::Unit getValue () const;
    31  inline Hurricane::DbU::Unit getHValue () const;
    32  inline Hurricane::DbU::Unit getVValue () const;
    33  inline Hurricane::DbU::Unit getThreshold () const;
    34  inline void setThreshold ( Hurricane::DbU::Unit );
    35  public:
    36  std::string _getTypeName () const;
    37  std::string _getString () const;
    38  Record* _getRecord () const;
    39  private:
    40  Hurricane::DbU::Unit _hValue;
    41  Hurricane::DbU::Unit _vValue;
    42  Hurricane::DbU::Unit _threshold;
    43  };
    44 
    45 
    46  inline RuleStep::RuleStep ( Hurricane::DbU::Unit uValue )
    47  : _hValue (uValue)
    48  , _vValue (uValue)
    49  , _threshold(0)
    50  { }
    51 
    52  inline RuleStep::RuleStep ( Hurricane::DbU::Unit hValue, Hurricane::DbU::Unit vValue )
    53  : _hValue (hValue)
    54  , _vValue (vValue)
    55  , _threshold(0)
    56  { }
    57 
    58  inline Hurricane::DbU::Unit RuleStep::getValue () const { return _hValue; }
    59  inline Hurricane::DbU::Unit RuleStep::getHValue () const { return _hValue; }
    60  inline Hurricane::DbU::Unit RuleStep::getVValue () const { return _vValue; }
    61  inline Hurricane::DbU::Unit RuleStep::getThreshold () const { return _threshold; }
    62  inline void RuleStep::setThreshold ( Hurricane::DbU::Unit t ) { _threshold = t; }
    63 
    64 
    65  class PhysicalRule : public Rule {
    66  public:
    67  typedef Rule Super;
    68  typedef std::vector<RuleStep> Steps;
    69  public:
    70  inline PhysicalRule ( const Name& name, const std::string& reference );
    71  inline PhysicalRule ( const PhysicalRule& rule );
    72  virtual ~PhysicalRule ();
    73  inline bool isDouble () const;
    74  inline bool isDbU () const;
    75  inline bool isSymmetric () const;
    76  inline bool hasSteps () const;
    77  inline void setSymmetric ( bool );
    78  inline double getDoubleValue () const;
    79  inline DbU::Unit getValue ( Hurricane::DbU::Unit length=0, bool hDir=true ) const;
    80  inline void addValue ( double );
    81  inline void addValue ( Hurricane::DbU::Unit value
    82  , Hurricane::DbU::Unit maxLength );
    83  inline void addValue ( Hurricane::DbU::Unit hValue
    84  , Hurricane::DbU::Unit vValue
    85  , Hurricane::DbU::Unit maxLength );
    86  public:
    87  virtual std::string _getTypeName () const;
    88  virtual std::string _getString () const;
    89  virtual Record* _getRecord () const;
    90  public:
    91  inline void _addValue ( const RuleStep& );
    92  private:
    93  Steps _stepsValue;
    94  double _doubleValue;
    95  bool _symmetric;
    96  };
    97 
    98 
    99  inline PhysicalRule::PhysicalRule ( const Name& name
    100  , const std::string& reference )
    101  : Rule(name,reference)
    102  , _stepsValue ()
    103  , _doubleValue(0.0)
    104  , _symmetric (true)
    105  { }
    106 
    107 
    108  inline PhysicalRule::PhysicalRule ( const PhysicalRule& rule )
    109  : Rule(rule.getName(),rule.getReference())
    110  , _stepsValue (rule._stepsValue)
    111  , _doubleValue(rule._doubleValue)
    112  { }
    113 
    114 
    115  inline bool PhysicalRule::isDouble () const { return _doubleValue != 0; }
    116  inline bool PhysicalRule::isDbU () const { return not _stepsValue.empty(); }
    117  inline bool PhysicalRule::isSymmetric () const { return _symmetric; }
    118  inline bool PhysicalRule::hasSteps () const { return not _stepsValue.size() > 1; }
    119  inline double PhysicalRule::getDoubleValue () const { return _doubleValue; }
    120  inline void PhysicalRule::setSymmetric ( bool state ) { _symmetric = state; }
    121  inline void PhysicalRule::addValue ( double value ) { _doubleValue = value; }
    122 
    123 
    125  {
    126  if (_stepsValue.empty()) return 0;
    127  for ( const RuleStep& step : _stepsValue ) {
    128  if (length < step.getThreshold()) {
    129  return (hDir) ? step.getHValue() : step.getVValue();
    130  }
    131  }
    132  return (hDir) ? _stepsValue.back().getHValue() : _stepsValue.back().getVValue();;
    133  }
    134 
    135 
    137  {
    138  RuleStep step ( value );
    139  step.setThreshold( maxLength );
    140  _addValue( step );
    141  }
    142 
    143 
    145  {
    146  RuleStep step ( hValue, vValue );
    147  step.setThreshold( maxLength );
    148  _addValue( step );
    149  }
    150 
    151 
    152  inline void PhysicalRule::_addValue ( const RuleStep& step )
    153  {
    154  for ( auto istep = _stepsValue.begin() ; istep != _stepsValue.end() ; ++istep ) {
    155  if (step.getThreshold() < (*istep).getThreshold()) {
    156  _stepsValue.insert( istep, step );
    157  return;
    158  }
    159  }
    160  _stepsValue.push_back( step );
    161  }
    162 
    163 
    164 } // Hurricane namespace.
    165 
    166 
    167 INSPECTOR_P_SUPPORT(Hurricane::PhysicalRule);
    168 INSPECTOR_PR_SUPPORT(Hurricane::RuleStep);
    DbU::Unit getValue(Hurricane::DbU::Unit length=0, bool hDir=true) const
    Definition: PhysicalRule.h:124
    +
    1 // -*- C++ -*-
    2 //
    3 // This file is part of the Coriolis Software.
    4 // Copyright (c) UPMC 2009-2018, All Rights Reserved
    5 //
    6 // +-----------------------------------------------------------------+
    7 // | C O R I O L I S |
    8 // | H u r r i c a n e A n a l o g |
    9 // | |
    10 // | Authors : Damien Dupuis |
    11 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    12 // | =============================================================== |
    13 // | C++ Header : "./hurricane/PhysicalRule.h" |
    14 // +-----------------------------------------------------------------+
    15 
    16 
    17 #pragma once
    18 #include <tuple>
    19 #include "hurricane/DbU.h"
    20 #include "hurricane/Rule.h"
    21 
    22 
    23 namespace Hurricane {
    24 
    25 
    26  class RuleStep {
    27  public:
    28  inline RuleStep ( Hurricane::DbU::Unit uValue );
    29  inline RuleStep ( Hurricane::DbU::Unit hValue, Hurricane::DbU::Unit vValue );
    30  inline Hurricane::DbU::Unit getValue () const;
    31  inline Hurricane::DbU::Unit getHValue () const;
    32  inline Hurricane::DbU::Unit getVValue () const;
    33  inline Hurricane::DbU::Unit getThreshold () const;
    34  inline void setThreshold ( Hurricane::DbU::Unit );
    35  public:
    36  std::string _getTypeName () const;
    37  std::string _getString () const;
    38  Record* _getRecord () const;
    39  private:
    40  Hurricane::DbU::Unit _hValue;
    41  Hurricane::DbU::Unit _vValue;
    42  Hurricane::DbU::Unit _threshold;
    43  };
    44 
    45 
    46  inline RuleStep::RuleStep ( Hurricane::DbU::Unit uValue )
    47  : _hValue (uValue)
    48  , _vValue (uValue)
    49  , _threshold(0)
    50  { }
    51 
    52  inline RuleStep::RuleStep ( Hurricane::DbU::Unit hValue, Hurricane::DbU::Unit vValue )
    53  : _hValue (hValue)
    54  , _vValue (vValue)
    55  , _threshold(0)
    56  { }
    57 
    58  inline Hurricane::DbU::Unit RuleStep::getValue () const { return _hValue; }
    59  inline Hurricane::DbU::Unit RuleStep::getHValue () const { return _hValue; }
    60  inline Hurricane::DbU::Unit RuleStep::getVValue () const { return _vValue; }
    61  inline Hurricane::DbU::Unit RuleStep::getThreshold () const { return _threshold; }
    62  inline void RuleStep::setThreshold ( Hurricane::DbU::Unit t ) { _threshold = t; }
    63 
    64 
    65  class PhysicalRule : public Rule {
    66  public:
    67  typedef Rule Super;
    68  typedef std::vector<RuleStep> Steps;
    69  public:
    70  inline PhysicalRule ( const Name& name, const std::string& reference );
    71  inline PhysicalRule ( const PhysicalRule& rule );
    72  virtual ~PhysicalRule ();
    73  inline bool isDouble () const;
    74  inline bool isDbU () const;
    75  inline bool isSymmetric () const;
    76  inline bool hasSteps () const;
    77  inline void setSymmetric ( bool );
    78  inline double getDoubleValue () const;
    79  inline DbU::Unit getValue ( Hurricane::DbU::Unit length=0, bool hDir=true ) const;
    80  inline void addValue ( double );
    81  inline void addValue ( Hurricane::DbU::Unit value
    82  , Hurricane::DbU::Unit maxLength );
    83  inline void addValue ( Hurricane::DbU::Unit hValue
    84  , Hurricane::DbU::Unit vValue
    85  , Hurricane::DbU::Unit maxLength );
    86  public:
    87  virtual std::string _getTypeName () const;
    88  virtual std::string _getString () const;
    89  virtual Record* _getRecord () const;
    90  public:
    91  inline void _addValue ( const RuleStep& );
    92  private:
    93  Steps _stepsValue;
    94  double _doubleValue;
    95  bool _symmetric;
    96  };
    97 
    98 
    99  inline PhysicalRule::PhysicalRule ( const Name& name
    100  , const std::string& reference )
    101  : Rule(name,reference)
    102  , _stepsValue ()
    103  , _doubleValue(0.0)
    104  , _symmetric (true)
    105  { }
    106 
    107 
    108  inline PhysicalRule::PhysicalRule ( const PhysicalRule& rule )
    109  : Rule(rule.getName(),rule.getReference())
    110  , _stepsValue (rule._stepsValue)
    111  , _doubleValue(rule._doubleValue)
    112  { }
    113 
    114 
    115  inline bool PhysicalRule::isDouble () const { return _doubleValue != 0; }
    116  inline bool PhysicalRule::isDbU () const { return not _stepsValue.empty(); }
    117  inline bool PhysicalRule::isSymmetric () const { return _symmetric; }
    118  inline bool PhysicalRule::hasSteps () const { return not (_stepsValue.size() > 1); }
    119  inline double PhysicalRule::getDoubleValue () const { return _doubleValue; }
    120  inline void PhysicalRule::setSymmetric ( bool state ) { _symmetric = state; }
    121  inline void PhysicalRule::addValue ( double value ) { _doubleValue = value; }
    122 
    123 
    125  {
    126  if (_stepsValue.empty()) return 0;
    127  for ( const RuleStep& step : _stepsValue ) {
    128  if (length < step.getThreshold()) {
    129  return (hDir) ? step.getHValue() : step.getVValue();
    130  }
    131  }
    132  return (hDir) ? _stepsValue.back().getHValue() : _stepsValue.back().getVValue();;
    133  }
    134 
    135 
    137  {
    138  RuleStep step ( value );
    139  step.setThreshold( maxLength );
    140  _addValue( step );
    141  }
    142 
    143 
    145  {
    146  RuleStep step ( hValue, vValue );
    147  step.setThreshold( maxLength );
    148  _addValue( step );
    149  }
    150 
    151 
    152  inline void PhysicalRule::_addValue ( const RuleStep& step )
    153  {
    154  for ( auto istep = _stepsValue.begin() ; istep != _stepsValue.end() ; ++istep ) {
    155  if (step.getThreshold() < (*istep).getThreshold()) {
    156  _stepsValue.insert( istep, step );
    157  return;
    158  }
    159  }
    160  _stepsValue.push_back( step );
    161  }
    162 
    163 
    164 } // Hurricane namespace.
    165 
    166 
    167 INSPECTOR_P_SUPPORT(Hurricane::PhysicalRule);
    168 INSPECTOR_PR_SUPPORT(Hurricane::RuleStep);
    DbU::Unit getValue(Hurricane::DbU::Unit length=0, bool hDir=true) const
    Definition: PhysicalRule.h:124
    bool isSymmetric() const
    Definition: PhysicalRule.h:117
    double getDoubleValue() const
    Definition: PhysicalRule.h:119
    Name description (API)
    Definition: Name.h:35
    -
    std::int64_t Unit
    Definition: DbU.h:70
    +
    std::int64_t Unit
    Definition: DbU.h:67
    bool hasSteps() const
    Definition: PhysicalRule.h:118
    void addValue(double)
    Definition: PhysicalRule.h:121
    bool isDbU() const
    Definition: PhysicalRule.h:116
    @@ -61,7 +61,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Pin_8h_source.html b/hurricane/doc/hurricane/html/Pin_8h_source.html index 142d2d76..e37c243d 100644 --- a/hurricane/doc/hurricane/html/Pin_8h_source.html +++ b/hurricane/doc/hurricane/html/Pin_8h_source.html @@ -44,11 +44,11 @@ $(function() {
    Pin.h
    -
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Pin.h
    3 // Authors: C. Alexandre
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_PIN
    21 #define HURRICANE_PIN
    22 
    23 #include "hurricane/Contact.h"
    24 #include "hurricane/Pins.h"
    25 
    26 namespace Hurricane {
    27 
    28 
    29 
    30 // ****************************************************************************************************
    31 // Pin declaration
    32 // ****************************************************************************************************
    33 
    34 class Pin : public Contact {
    35 // ***********************
    36 
    37 // Types
    38 // *****
    39 
    40  public: typedef Contact Inherit;
    41 
    42  public: class AccessDirection {
    43  // **************************
    44 
    45  public: enum Code {UNDEFINED=0, NORTH=1, SOUTH=2, EAST=3, WEST=4};
    46 
    47  private: Code _code;
    48 
    49  public: AccessDirection(const Code& code = UNDEFINED);
    50  public: AccessDirection(const AccessDirection& accessDirection);
    51 
    52  public: AccessDirection& operator=(const AccessDirection& accessDirection);
    53 
    54  public: operator const Code&() const {return _code;};
    55 
    56  public: const Code& getCode() const {return _code;};
    57 
    58  public: string _getTypeName() const { return _TName("Pin::AccessDirection"); };
    59  public: string _getString() const;
    60  public: Record* _getRecord() const;
    61 
    62  };
    63 
    64  public: class PlacementStatus {
    65  // **************************
    66 
    67  public: enum Code {UNPLACED=0, PLACED=1, FIXED=2};
    68 
    69  private: Code _code;
    70 
    71  public: PlacementStatus(const Code& code = UNPLACED);
    72  public: PlacementStatus(const PlacementStatus& placementstatus);
    73 
    74  public: PlacementStatus& operator=(const PlacementStatus& placementstatus);
    75 
    76  public: operator const Code&() const {return _code;};
    77 
    78  public: const Code& getCode() const {return _code;};
    79 
    80  public: string _getTypeName() const { return _TName("Pin::PlacementStatus"); };
    81  public: string _getString() const;
    82  public: Record* _getRecord() const;
    83 
    84  };
    85 
    86 // Attributes
    87 // **********
    88 
    89  private: Name _name;
    90  private: AccessDirection _accessDirection;
    91  private: PlacementStatus _placementStatus;
    92  private: Pin* _nextOfCellPinMap;
    93 
    94 // Constructors
    95 // ************
    96 
    97  protected: Pin( Net* net
    98  , const Name& name
    99  , const AccessDirection& accessDirection
    100  , const PlacementStatus& placementStatus
    101  , const Layer* layer
    102  , const DbU::Unit& x
    103  , const DbU::Unit& y
    104  , const DbU::Unit& width = 0
    105  , const DbU::Unit& height = 0
    106  );
    107  public: static Pin* create( Net* net
    108  , const Name& name
    109  , const AccessDirection& accessDirection
    110  , const PlacementStatus& placementStatus
    111  , const Layer* layer
    112  , const DbU::Unit& x
    113  , const DbU::Unit& y
    114  , const DbU::Unit& width = 0
    115  , const DbU::Unit& height = 0
    116  );
    117 
    118 // Accessors
    119 // *********
    120 
    121  public: const Name& getName() const {return _name;};
    122  public: const AccessDirection& getAccessDirection() const {return _accessDirection;};
    123  public: const PlacementStatus& getPlacementStatus() const {return _placementStatus;};
    124 
    125 // Predicates
    126 // **********
    127 
    128  public: bool isUnplaced() const {return _placementStatus == PlacementStatus::UNPLACED;};
    129  public: bool isPlaced() const {return _placementStatus == PlacementStatus::PLACED;};
    130  public: bool isFixed() const {return _placementStatus == PlacementStatus::FIXED;};
    131 
    132 // Updators
    133 // ********
    134 
    135  public: void setPlacementStatus(const PlacementStatus& placementstatus);
    136 
    137 // Others
    138 // ******
    139 
    140  protected: virtual void _postCreate();
    141 
    142  protected: virtual void _preDestroy();
    143 
    144  public: virtual string _getTypeName() const {return _TName("Pin");};
    145  public: virtual string _getString() const;
    146  public: virtual Record* _getRecord() const;
    147 
    148  public: Pin* _getNextOfCellPinMap() const {return _nextOfCellPinMap;};
    149 
    150  public: void _setNextOfCellPinMap(Pin* pin) {_nextOfCellPinMap = pin;};
    151 
    152 };
    153 
    154 
    155 } // End of Hurricane namespace.
    156 
    157 
    158 INSPECTOR_P_SUPPORT(Hurricane::Pin);
    159 INSPECTOR_PR_SUPPORT(Hurricane::Pin::AccessDirection);
    160 INSPECTOR_PR_SUPPORT(Hurricane::Pin::PlacementStatus);
    161 
    162 
    163 #endif // HURRICANE_PIN
    164 
    165 // ****************************************************************************************************
    166 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    167 // ****************************************************************************************************
    Pin description (API)
    Definition: Pin.h:34
    +
    1 // -*- C++ -*-
    2 //
    3 // Copyright (c) BULL S.A. 2000-2020, All Rights Reserved
    4 //
    5 // This file is part of Hurricane.
    6 //
    7 // Hurricane is free software: you can redistribute it and/or modify
    8 // it under the terms of the GNU Lesser General Public License as
    9 // published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but
    13 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    14 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    15 // General Public License for more details.
    16 //
    17 // You should have received a copy of the Lesser GNU General Public
    18 // License along with Hurricane. If not, see
    19 // <http://www.gnu.org/licenses/>.
    20 //
    21 // +-----------------------------------------------------------------+
    22 // | H U R R I C A N E |
    23 // | V L S I B a c k e n d D a t a - B a s e |
    24 // | |
    25 // | Author : Christophe Alexandre |
    26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    27 // | =============================================================== |
    28 // | C++ Header : "./hurricane/Commons.h" |
    29 // +-----------------------------------------------------------------+
    30 
    31 #pragma once
    32 #include "hurricane/Contact.h"
    33 #include "hurricane/Pins.h"
    34 
    35 namespace Hurricane {
    36 
    37 
    38 // -------------------------------------------------------------------
    39 // Class : "Hurricane::Pin".
    40 
    41  class Pin : public Contact {
    42  public:
    43  typedef Contact Inherit;
    44 
    45  public:
    46  class AccessDirection {
    47  public:
    48  enum Code { UNDEFINED=0, NORTH=1, SOUTH=2, EAST=3, WEST=4 };
    49  public:
    50  AccessDirection ( Code code=UNDEFINED );
    51  AccessDirection ( const AccessDirection& accessDirection );
    52  AccessDirection& operator= ( const AccessDirection& accessDirection );
    53  operator Code () const { return _code; };
    54  Code getCode () const { return _code; };
    55  std::string _getTypeName () const { return _TName("Pin::AccessDirection"); };
    56  std::string _getString () const;
    57  Record* _getRecord () const;
    58  private:
    59  Code _code;
    60  };
    61 
    62  public:
    63  class PlacementStatus {
    64  public:
    65  enum Code { UNPLACED=0, PLACED=1, FIXED=2 };
    66  public:
    67  PlacementStatus ( Code code=UNPLACED);
    68  PlacementStatus ( const PlacementStatus& placementstatus );
    69  PlacementStatus& operator= ( const PlacementStatus& placementstatus );
    70  operator Code () const { return _code; };
    71  Code getCode () const { return _code; };
    72  std::string _getTypeName () const { return _TName("Pin::PlacementStatus"); };
    73  std::string _getString () const;
    74  Record* _getRecord () const;
    75  private:
    76  Code _code;
    77  };
    78 
    79  protected:
    80  Pin ( Net*
    81  , const Name&
    82  , const AccessDirection&
    83  , const PlacementStatus&
    84  , const Layer*
    85  , DbU::Unit x
    86  , DbU::Unit y
    87  , DbU::Unit width
    88  , DbU::Unit height
    89  );
    90  public:
    91  static Pin* create ( Net*
    92  , const Name&
    93  , const AccessDirection&
    94  , const PlacementStatus&
    95  , const Layer*
    96  , DbU::Unit x
    97  , DbU::Unit y
    98  , DbU::Unit width =0
    99  , DbU::Unit height=0
    100  );
    101  public:
    102  const Name& getName () const { return _name; };
    103  const AccessDirection& getAccessDirection () const { return _accessDirection; };
    104  const PlacementStatus& getPlacementStatus () const { return _placementStatus; };
    105  bool isUnplaced () const { return _placementStatus == PlacementStatus::UNPLACED; };
    106  bool isPlaced () const { return _placementStatus == PlacementStatus::PLACED; };
    107  bool isFixed () const { return _placementStatus == PlacementStatus::FIXED; };
    108  void setPlacementStatus ( const PlacementStatus& );
    109  protected:
    110  virtual void _postCreate ();
    111  virtual void _preDestroy ();
    112  private:
    113  bool _postCheck ();
    114  public:
    115  virtual std::string _getTypeName () const {return _TName("Pin");};
    116  virtual std::string _getString () const;
    117  virtual Record* _getRecord () const;
    118  Pin* _getNextOfCellPinMap () const { return _nextOfCellPinMap; };
    119  void _setNextOfCellPinMap ( Pin* pin ) { _nextOfCellPinMap = pin; };
    120  private:
    121  Name _name;
    122  AccessDirection _accessDirection;
    123  PlacementStatus _placementStatus;
    124  Pin* _nextOfCellPinMap;
    125  };
    126 
    127 
    128 } // Hurricane namespace.
    129 
    130 
    131 INSPECTOR_P_SUPPORT(Hurricane::Pin);
    132 INSPECTOR_PR_SUPPORT(Hurricane::Pin::AccessDirection);
    133 INSPECTOR_PR_SUPPORT(Hurricane::Pin::PlacementStatus);
    Pin description (API)
    Definition: Pin.h:41
    Name description (API)
    Definition: Name.h:35
    -
    Contact description (API)
    Definition: Contact.h:33
    -
    std::int64_t Unit
    Definition: DbU.h:70
    -
    DataBase object root class (API).
    Definition: DBo.h:47
    +
    Contact description (API)
    Definition: Contact.h:43
    +
    std::int64_t Unit
    Definition: DbU.h:67
    +
    DataBase object root class (API).
    Definition: DBo.h:45
    Layer description (API)
    Definition: Layer.h:52
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    Net description (API)
    Definition: Net.h:48
    @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Pins_8h_source.html b/hurricane/doc/hurricane/html/Pins_8h_source.html index ee4ce914..6bdf989a 100644 --- a/hurricane/doc/hurricane/html/Pins_8h_source.html +++ b/hurricane/doc/hurricane/html/Pins_8h_source.html @@ -50,7 +50,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Plug_8h_source.html b/hurricane/doc/hurricane/html/Plug_8h_source.html index 54bbf19f..0f1327f3 100644 --- a/hurricane/doc/hurricane/html/Plug_8h_source.html +++ b/hurricane/doc/hurricane/html/Plug_8h_source.html @@ -49,14 +49,14 @@ $(function() {
    Net * getMasterNet() const
    Definition: Plug.h:73
    Component description (API)
    Definition: Component.h:42
    Generic Filter auto-pointer.
    Definition: Filter.h:27
    -
    std::int64_t Unit
    Definition: DbU.h:70
    -
    The model (API).
    Definition: Cell.h:66
    +
    std::int64_t Unit
    Definition: DbU.h:67
    +
    The model (API).
    Definition: Cell.h:64
    Point description (API)
    Definition: Point.h:32
    Component Inherit
    Definition: Plug.h:43
    Instance * getInstance() const
    Definition: Plug.h:72
    void setNet(Net *net)
    Box description (API)
    Definition: Box.h:31
    -
    Instance description (API)
    Definition: Instance.h:37
    +
    Instance description (API)
    Definition: Instance.h:35
    static PlugFilter getIsUnconnectedFilter()
    Layer description (API)
    Definition: Layer.h:52
    bool isConnected() const
    Definition: Plug.h:84
    @@ -69,7 +69,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Plugs_8h_source.html b/hurricane/doc/hurricane/html/Plugs_8h_source.html index 25d1415f..bed6d24b 100644 --- a/hurricane/doc/hurricane/html/Plugs_8h_source.html +++ b/hurricane/doc/hurricane/html/Plugs_8h_source.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Point_8h_source.html b/hurricane/doc/hurricane/html/Point_8h_source.html index 1d0ebd32..49c5cdaa 100644 --- a/hurricane/doc/hurricane/html/Point_8h_source.html +++ b/hurricane/doc/hurricane/html/Point_8h_source.html @@ -44,22 +44,22 @@ $(function() {
    Point.h
    -
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Point.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_POINT
    21 #define HURRICANE_POINT
    22 
    23 #include "hurricane/DbU.h"
    24 
    25 namespace Hurricane {
    26 
    27 
    28 // ****************************************************************************************************
    29 // Point declaration
    30 // ****************************************************************************************************
    31 
    32 class Point {
    33 // ********
    34 
    35 // Attributes
    36 // **********
    37 
    38  private: DbU::Unit _x;
    39  private: DbU::Unit _y;
    40 
    41 // Constructors
    42 // ************
    43 
    44  public: Point();
    45 
    46  public: Point(const DbU::Unit& x, const DbU::Unit& y);
    47 
    48  public: Point(const Point& point);
    49 
    50 // Operators
    51 // *********
    52 
    53  public: Point& operator=(const Point& point);
    54 
    55  public: bool operator==(const Point& point) const;
    56  public: bool operator!=(const Point& point) const;
    57 
    58  public: Point operator+(const Point& point) const;
    59  public: Point operator-(const Point& point) const;
    60  public: Point& operator+=(const Point& point);
    61  public: Point& operator-=(const Point& point);
    62 
    63 // Accessors
    64 // *********
    65 
    66  public: const DbU::Unit& getX() const {return _x;};
    67  public: const DbU::Unit& getY() const {return _y;};
    68  public: DbU::Unit manhattanDistance(const Point pt) const
    69  { return abs(_x - pt.getX()) + abs(_y - pt.getY()); }
    70 
    71 // Updators
    72 // ********
    73 
    74  public: void setX(const DbU::Unit& x) {_x = x;};
    75  public: void setY(const DbU::Unit& y) {_y = y;};
    76  public: Point& translate(const DbU::Unit& dx, const DbU::Unit& dy);
    77  public: Point getTranslated(const DbU::Unit& dx, const DbU::Unit& dy) const;
    78 
    79 // Others
    80 // ******
    81 
    82  public: string _getTypeName() const { return _TName("Point"); };
    83  public: string _getString() const;
    84  public: Record* _getRecord() const;
    85  public: void toJson(JsonWriter*) const;
    86 
    87 };
    88 
    89 
    90 class JsonPoint : public JsonObject {
    91 // **********************************
    92 
    93  public: static void initialize();
    94  public: JsonPoint(unsigned long);
    95  public: virtual string getTypeName() const;
    96  public: virtual JsonPoint* clone(unsigned long) const;
    97  public: virtual void toData(JsonStack&);
    98 };
    99 
    100 
    101 } // End of Hurricane namespace.
    102 
    103 INSPECTOR_PR_SUPPORT(Hurricane::Point);
    104 
    105 
    106 #endif // HURRICANE_POINT
    107 
    108 
    109 // ****************************************************************************************************
    110 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    111 // ****************************************************************************************************
    Point & translate(const DbU::Unit &dx, const DbU::Unit &dy)
    +
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Point.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_POINT
    21 #define HURRICANE_POINT
    22 
    23 #include "hurricane/DbU.h"
    24 
    25 namespace Hurricane {
    26 
    27 
    28 // ****************************************************************************************************
    29 // Point declaration
    30 // ****************************************************************************************************
    31 
    32 class Point {
    33 // ********
    34 
    35 // Attributes
    36 // **********
    37 
    38  private: DbU::Unit _x;
    39  private: DbU::Unit _y;
    40 
    41 // Constructors
    42 // ************
    43 
    44  public: Point();
    45 
    46  public: Point(const DbU::Unit& x, const DbU::Unit& y);
    47 
    48  public: Point(const Point& point);
    49 
    50 // Operators
    51 // *********
    52 
    53  public: Point& operator=(const Point& point);
    54 
    55  public: bool operator==(const Point& point) const;
    56  public: bool operator!=(const Point& point) const;
    57 
    58  public: Point operator+(const Point& point) const;
    59  public: Point operator-(const Point& point) const;
    60  public: Point& operator+=(const Point& point);
    61  public: Point& operator-=(const Point& point);
    62 
    63 // Accessors
    64 // *********
    65 
    66  public: const DbU::Unit& getX() const {return _x;};
    67  public: const DbU::Unit& getY() const {return _y;};
    68  public: DbU::Unit manhattanDistance(const Point pt) const
    69  { return abs(_x - pt.getX()) + abs(_y - pt.getY()); }
    70 
    71 // Updators
    72 // ********
    73 
    74  public: void setX(DbU::Unit x) {_x = x;};
    75  public: void setY(DbU::Unit y) {_y = y;};
    76  public: Point& translate(const DbU::Unit& dx, const DbU::Unit& dy);
    77  public: Point getTranslated(const DbU::Unit& dx, const DbU::Unit& dy) const;
    78 
    79 // Others
    80 // ******
    81 
    82  public: string _getTypeName() const { return _TName("Point"); };
    83  public: string _getString() const;
    84  public: Record* _getRecord() const;
    85  public: void toJson(JsonWriter*) const;
    86 
    87 };
    88 
    89 
    90 class JsonPoint : public JsonObject {
    91 // **********************************
    92 
    93  public: static void initialize();
    94  public: JsonPoint(unsigned long);
    95  public: virtual string getTypeName() const;
    96  public: virtual JsonPoint* clone(unsigned long) const;
    97  public: virtual void toData(JsonStack&);
    98 };
    99 
    100 
    101 } // End of Hurricane namespace.
    102 
    103 INSPECTOR_PR_SUPPORT(Hurricane::Point);
    104 
    105 
    106 #endif // HURRICANE_POINT
    107 
    108 
    109 // ****************************************************************************************************
    110 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    111 // ****************************************************************************************************
    Point & translate(const DbU::Unit &dx, const DbU::Unit &dy)
    bool operator==(const Point &point) const
    Point & operator=(const Point &point)
    -
    std::int64_t Unit
    Definition: DbU.h:70
    +
    std::int64_t Unit
    Definition: DbU.h:67
    Point description (API)
    Definition: Point.h:32
    bool operator!=(const Point &point) const
    +
    void setY(DbU::Unit y)
    Definition: Point.h:75
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    -
    void setY(const DbU::Unit &y)
    Definition: Point.h:75
    -
    void setX(const DbU::Unit &x)
    Definition: Point.h:74
    +
    void setX(DbU::Unit x)
    Definition: Point.h:74


    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Points_8h_source.html b/hurricane/doc/hurricane/html/Points_8h_source.html index 07d3aaac..8c593a8c 100644 --- a/hurricane/doc/hurricane/html/Points_8h_source.html +++ b/hurricane/doc/hurricane/html/Points_8h_source.html @@ -50,7 +50,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Polygon_8h_source.html b/hurricane/doc/hurricane/html/Polygon_8h_source.html index 139a357d..d9278ac9 100644 --- a/hurricane/doc/hurricane/html/Polygon_8h_source.html +++ b/hurricane/doc/hurricane/html/Polygon_8h_source.html @@ -46,7 +46,7 @@ $(function() {
    1 // -*- C++ -*-
    2 //
    3 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    4 //
    5 // This file is part of Hurricane.
    6 //
    7 // Hurricane is free software: you can redistribute it and/or modify
    8 // it under the terms of the GNU Lesser General Public License as
    9 // published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but
    13 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    14 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    15 // General Public License for more details.
    16 //
    17 // You should have received a copy of the Lesser GNU General Public
    18 // License along with Hurricane. If not, see
    19 // <http://www.gnu.org/licenses/>.
    20 //
    21 // +-----------------------------------------------------------------+
    22 // | H U R R I C A N E |
    23 // | V L S I B a c k e n d D a t a - B a s e |
    24 // | |
    25 // | Author : Jean-Paul Chaput |
    26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    27 // | =============================================================== |
    28 // | C++ Header : "./hurricane/Polygon.h" |
    29 // +-----------------------------------------------------------------+
    30 
    31 
    32 #ifndef HURRICANE_POLYGON_H
    33 #define HURRICANE_POLYGON_H
    34 
    35 #include "hurricane/Component.h"
    36 #include "hurricane/Polygons.h"
    37 
    38 
    39 namespace Hurricane {
    40 
    41  class Layer;
    42 
    43 
    44  class Polygon : public Component {
    45  public:
    46  typedef Component Super;
    47  public:
    48  static const uint32_t Above = (1<<0);
    49  static const uint32_t YSteps = (1<<1);
    50  static const uint32_t XSteps = (1<<2);
    51  static const uint32_t XIncrease = (1<<3);
    52  static const uint32_t YIncrease = (1<<4);
    53  static const uint32_t Horizontal = (1<<5);
    54  static const uint32_t Vertical = (1<<6);
    55 
    56  public:
    57  class Edge {
    58  public:
    59  Edge ( Point origin, Point extremity, uint32_t flags );
    60  inline size_t getSize () const;
    61  Point getPoint ( size_t i ) const;
    62  inline bool isPositiveSlope () const;
    63  inline bool isYIncrease () const;
    64  inline bool isXIncrease () const;
    65  inline bool isHV () const;
    66  inline bool isXSteps () const;
    67  inline bool isYSteps () const;
    68  void translate ( DbU::Unit dx, DbU::Unit dy );
    69  string _getTypeName () const;
    70  string _getString () const;
    71  Record* _getRecord () const;
    72  private:
    73  uint32_t _flags;
    74  DbU::Unit _xyOrigin;
    75  vector<DbU::Unit> _steps;
    76  };
    77 
    78  public:
    79  class Points_Manhattan : public PointHC {
    80  public:
    81  class Locator : public PointHL {
    82  public:
    83  Locator ( const Polygon* );
    84  inline Locator ( const Locator& );
    85  virtual Point getElement () const;
    86  virtual PointHL* getClone () const;
    87  virtual bool isValid () const;
    88  virtual void progress ();
    89  virtual string _getString () const;
    90  protected:
    91  const Polygon* _polygon;
    92  size_t _iEdge;
    93  size_t _iPoint;
    94  };
    95  public:
    96  inline Points_Manhattan ( const Polygon* );
    97  inline Points_Manhattan ( const Points_Manhattan& );
    98  virtual PointHC* getClone () const;
    99  virtual PointHL* getLocator () const;
    100  virtual string _getString () const;
    101  protected:
    102  const Polygon* _polygon;
    103  };
    104 
    105  public:
    106  static Polygon* create ( Net*, const Layer*, const std::vector<Point>& );
    107  static float getSlope ( const Point&, const Point& );
    108  public:
    109  virtual bool isNonRectangle () const;
    110  virtual bool isManhattanized () const;
    111  virtual DbU::Unit getX () const;
    112  virtual DbU::Unit getY () const;
    113  inline const vector<Point>& getPoints () const;
    114  inline const vector<Edge*>& getEdges () const;
    115  virtual size_t getPointsSize () const;
    116  virtual Point getPoint ( size_t ) const;
    117  virtual Box getBoundingBox () const;
    118  virtual Box getBoundingBox ( const BasicLayer* ) const;
    119  void getSubPolygons ( vector< vector<Point> >& ) const;
    120  virtual const Layer* getLayer () const;
    121  void setLayer ( const Layer* layer );
    122  virtual void translate ( const DbU::Unit& dx, const DbU::Unit& dy );
    123  void setPoints ( const vector<Point>& );
    124  static float getSign ( const vector<Point>&, size_t );
    125  float getSlope ( size_t i ) const;
    126  void manhattanize ();
    127  virtual Points getMContour () const;
    128  virtual void _toJson ( JsonWriter* ) const;
    129  static JsonObject* getJsonObject ( unsigned long flags );
    130  virtual string _getTypeName () const;
    131  virtual string _getString () const;
    132  virtual Record* _getRecord () const;
    133  protected:
    134  Polygon ( Net*, const Layer*, const std::vector<Point>& );
    135  ~Polygon ();
    136  private:
    137  const Layer* _layer;
    138  std::vector<Point> _points;
    139  std::vector<Edge*> _edges;
    140  };
    141 
    142 
    143  inline const vector<Polygon::Edge*>& Polygon::getEdges () const { return _edges; }
    144  inline const vector<Point>& Polygon::getPoints () const { return _points; }
    145 
    146  inline bool Polygon::Edge::isYIncrease () const { return (_flags & Polygon::YIncrease); }
    147  inline bool Polygon::Edge::isXIncrease () const { return (_flags & Polygon::XIncrease); }
    148  inline bool Polygon::Edge::isPositiveSlope () const { return not ( (_flags & Polygon::XIncrease) xor (_flags & Polygon::YIncrease) ); }
    149  inline bool Polygon::Edge::isHV () const { return (_flags & (Polygon::Horizontal|Polygon::Vertical)); }
    150  inline bool Polygon::Edge::isXSteps () const { return (_flags & Polygon::XSteps); }
    151  inline bool Polygon::Edge::isYSteps () const { return (_flags & Polygon::YSteps); }
    152  inline size_t Polygon::Edge::getSize () const { if (isHV() or (_steps.size() < 2)) return 1; return (_steps.size() - 1)*2; }
    153 
    154 
    155  inline Polygon::Points_Manhattan::Locator::Locator ( const Locator &locator )
    156  : PointHL ()
    157  , _polygon(locator._polygon)
    158  , _iEdge (locator._iEdge)
    159  , _iPoint (locator._iPoint)
    160  { }
    161 
    162 
    163  inline Polygon::Points_Manhattan::Points_Manhattan ( const Polygon* polygon )
    164  : PointHC ()
    165  , _polygon(polygon)
    166  { }
    167 
    168 
    169  inline Polygon::Points_Manhattan::Points_Manhattan ( const Points_Manhattan& other )
    170  : PointHC()
    171  , _polygon(other._polygon)
    172  { }
    173 
    174 
    175  class JsonPolygon : public JsonComponent {
    176  public:
    177  static void initialize ();
    178  JsonPolygon ( unsigned long flags );
    179  virtual string getTypeName () const;
    180  virtual JsonPolygon* clone ( unsigned long ) const;
    181  virtual void toData ( JsonStack& );
    182  };
    183 
    184 
    185 } // Hurricane namespace.
    186 
    187 
    188 INSPECTOR_P_SUPPORT(Hurricane::Polygon::Edge);
    189 INSPECTOR_P_SUPPORT(Hurricane::Polygon);
    190 
    191 #endif // HURRICANE_POLYGON_H
    Collection description (API)
    Definition: Collection.h:39
    Component description (API)
    Definition: Component.h:42
    -
    std::int64_t Unit
    Definition: DbU.h:70
    +
    std::int64_t Unit
    Definition: DbU.h:67
    Point description (API)
    Definition: Point.h:32
    Horizontal description (API)
    Definition: Horizontal.h:36
    Vertical description (API)
    Definition: Vertical.h:36
    @@ -60,7 +60,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Properties_8h_source.html b/hurricane/doc/hurricane/html/Properties_8h_source.html index 628c9ae9..39f27125 100644 --- a/hurricane/doc/hurricane/html/Properties_8h_source.html +++ b/hurricane/doc/hurricane/html/Properties_8h_source.html @@ -47,7 +47,7 @@ $(function() {
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Properties.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_PROPERTIES
    21 #define HURRICANE_PROPERTIES
    22 
    23 #include "hurricane/Collection.h"
    24 
    25 namespace Hurricane {
    26 
    27 class Property;
    28 
    29 
    30 
    31 // ****************************************************************************************************
    32 // Properties declaration
    33 // ****************************************************************************************************
    34 
    36 
    37 
    38 
    39 // ****************************************************************************************************
    40 // PropertyLocator declaration
    41 // ****************************************************************************************************
    42 
    44 
    45 
    46 
    47 // ****************************************************************************************************
    48 // PropertyFilter declaration
    49 // ****************************************************************************************************
    50 
    52 
    53 
    54 
    55 // ****************************************************************************************************
    56 // for_each_property declaration
    57 // ****************************************************************************************************
    58 
    59 #define for_each_property(property, properties)\
    60 /**********************************************/\
    61 {\
    62  PropertyLocator _locator = properties.getLocator();\
    63  while (_locator.isValid()) {\
    64  Property* property = _locator.getElement();\
    65  _locator.progress();
    66 
    67 
    68 
    69 } // End of Hurricane namespace.
    70 
    71 #endif // HURRICANE_PROPERTIES
    72 
    73 
    74 // ****************************************************************************************************
    75 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    76 // ****************************************************************************************************
    Generic Locator auto-pointer.
    Definition: Locator.h:113
    Generic Filter auto-pointer.
    Definition: Filter.h:27
    Generic Collection auto-pointer.
    Definition: Collection.h:28
    -
    Property description (API)
    Definition: Property.h:58
    +
    Property description (API)
    Definition: Property.h:56
    GenericFilter< Property * > PropertyFilter
    Definition: Properties.h:51
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    GenericCollection< Property * > Properties
    Definition: Properties.h:27
    @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Property_8h_source.html b/hurricane/doc/hurricane/html/Property_8h_source.html index 955c8f37..e547e7e9 100644 --- a/hurricane/doc/hurricane/html/Property_8h_source.html +++ b/hurricane/doc/hurricane/html/Property_8h_source.html @@ -44,29 +44,29 @@ $(function() {
    Property.h
    -
    1 // -*- C++ -*-
    2 //
    3 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    4 //
    5 // This file is part of Hurricane.
    6 //
    7 // Hurricane is free software: you can redistribute it and/or modify
    8 // it under the terms of the GNU Lesser General Public License as
    9 // published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but
    13 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    14 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    15 // General Public License for more details.
    16 //
    17 // You should have received a copy of the Lesser GNU General Public
    18 // License along with Hurricane. If not, see
    19 // <http://www.gnu.org/licenses/>.
    20 //
    21 // +-----------------------------------------------------------------+
    22 // | H U R R I C A N E |
    23 // | V L S I B a c k e n d D a t a - B a s e |
    24 // | |
    25 // | Author : Remy Escassut |
    26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    27 // | =============================================================== |
    28 // | C++ Header : "./hurricane/Property.h" |
    29 // +-----------------------------------------------------------------+
    30 
    31 
    32 #ifndef HURRICANE_PROPERTY_H
    33 #define HURRICANE_PROPERTY_H
    34 
    35 #include "hurricane/Name.h"
    36 #include "hurricane/Properties.h"
    37 #include "hurricane/DBo.h"
    38 #include "hurricane/Error.h"
    39 
    40 
    41 namespace Hurricane {
    42 
    43 
    44  extern const char* propertyTypeNameError;
    45 
    46 
    47 // -------------------------------------------------------------------
    48 // Classes : template enable/disable Json support.
    49 
    50  struct JsonEnabled { enum State { enabled=1 }; };
    51  struct JsonDisabled { enum State { enabled=0 }; };
    52 
    53 
    54 // -------------------------------------------------------------------
    55 // Class : "Hurricane::Property".
    56 
    57 
    58  class Property {
    59 
    60  public:
    61  // Static Method.
    62  template<typename DerivedProperty>
    63  static DerivedProperty* get ( const DBo* );
    64  static Name staticGetName ();
    65  // Constructor.
    66  template<typename DerivedProperty>
    67  static DerivedProperty* create ();
    68  template<typename DerivedProperty, typename Value>
    69  static DerivedProperty* create ( const Value& );
    70  // Destructor.
    71  virtual void destroy ();
    72  // Methods.
    73  virtual Name getName () const = 0;
    74  virtual void onCapturedBy ( DBo* owner ) = 0;
    75  virtual void onReleasedBy ( DBo* owner ) = 0;
    76  // Hurricane Managment.
    77  virtual bool hasJson () const;
    78  virtual void toJson ( JsonWriter*, const DBo* ) const;
    79  virtual string _getTypeName () const = 0;
    80  virtual string _getString () const;
    81  virtual Record* _getRecord () const;
    82 
    83  private:
    84  static Name _baseName;
    85  protected:
    86  // Internal: Constructors & Destructors.
    87  Property ();
    88  virtual ~Property ();
    89  virtual void _postCreate () {};
    90  virtual void _preDestroy () {};
    91  private:
    92  Property ( const Property& );
    93  Property& operator= ( const Property& );
    94  };
    95 
    96 
    97  template<typename DerivedProperty>
    98  DerivedProperty* Property::create ()
    99  {
    100  DerivedProperty* property = new DerivedProperty();
    101  property->_postCreate();
    102  return property;
    103  }
    104 
    105 
    106  template<typename DerivedProperty, typename Value>
    107  DerivedProperty* Property::create ( const Value& value )
    108  {
    109  DerivedProperty* property = new DerivedProperty(value);
    110  property->_postCreate();
    111  return property;
    112  }
    113 
    114 
    115  template<typename DerivedProperty>
    116  DerivedProperty* Property::get ( const DBo* object )
    117  {
    118  Property* property1 = object->getProperty ( DerivedProperty::staticGetName() );
    119  DerivedProperty* property2 = dynamic_cast<DerivedProperty*> ( property1 );
    120 
    121  if ( property1 && !property2 )
    122  throw Error ( propertyTypeNameError
    123  , getString(DerivedProperty::staticGetName()).c_str()
    124  , getString(object).c_str() );
    125 
    126  return property2;
    127  }
    128 
    129 
    130 // -------------------------------------------------------------------
    131 // Class : "Hurricane::PrivateProperty".
    132 
    133 
    134  class PrivateProperty : public Property {
    135 
    136  public:
    137  // Methods.
    138  inline DBo* getOwner () const;
    139  virtual void onCapturedBy ( DBo* owner );
    140  virtual void onReleasedBy ( DBo* owner );
    141  virtual void onNotOwned ();
    142  virtual string _getString () const;
    143  virtual Record* _getRecord () const;
    144 
    145  private:
    146  // Internal: Attributes.
    147  DBo* _owner;
    148  protected:
    149  // Internal: Constructor & Destructors.
    150  PrivateProperty ();
    151  virtual void _preDestroy ();
    152  };
    153 
    154 
    155 // Inline Functions.
    156  inline DBo* PrivateProperty::getOwner () const { return _owner; };
    157 
    158 
    159 // -------------------------------------------------------------------
    160 // Template Class : "Hurricane::StandardPrivateProperty".
    161 
    162 
    163  template<typename Value, typename JsonState=JsonDisabled>
    165  public:
    166  static Name staticGetName ();
    167  static Value* staticGetValue ( const DBo* );
    168  static StandardPrivateProperty* get ( const DBo*, bool create=false );
    169  // Constructors.
    170  static StandardPrivateProperty* create ();
    171  static StandardPrivateProperty* create ( const Value& );
    172  // Methods.
    173  virtual Name getName () const;
    174  Value& getValue () const;
    175  void setValue ( const Value& );
    176  virtual bool hasJson () const;
    177  virtual void toJson ( JsonWriter*, const DBo* ) const;
    178  virtual string _getTypeName () const;
    179  virtual string _getString () const;
    180  virtual Record* _getRecord () const;
    181  private:
    182  // Internal: Attributes.
    183  static Name _name;
    184  static DBo* _owner;
    185  static StandardPrivateProperty* _cache;
    186  mutable Value _value;
    187  protected:
    188  // Internal: Constructor.
    190  StandardPrivateProperty ( const Value& );
    191  public:
    192  class JsonProperty : public JsonObject {
    193  public:
    194  static void initialize ();
    195  JsonProperty ( unsigned long flags );
    196  virtual string getTypeName () const;
    197  virtual JsonProperty* clone ( unsigned long ) const;
    198  virtual void toData ( JsonStack& );
    199  };
    200  };
    201 
    202 
    203  template<typename Value, typename JsonState>
    205  : JsonObject(flags)
    206  {
    207  if (flags & JsonWriter::RegisterMode)
    208  cerr << "Registering JsonProperty" << endl;
    209  add( "_value", typeid(Value) );
    210  }
    211 
    212 
    213  template<typename Value, typename JsonState>
    214  string StandardPrivateProperty<Value,JsonState>::JsonProperty::getTypeName () const
    215  { return getString(StandardPrivateProperty<Value,JsonState>::staticGetName()); }
    216 
    217 
    218  template<typename Value, typename JsonState>
    219  void StandardPrivateProperty<Value,JsonState>::JsonProperty::initialize ()
    220  { JsonTypes::registerType( new JsonProperty (JsonWriter::RegisterMode) ); }
    221 
    222 
    223  template<typename Value, typename JsonState>
    224  typename StandardPrivateProperty<Value,JsonState>::JsonProperty*
    225  StandardPrivateProperty<Value,JsonState>::JsonProperty::clone ( unsigned long flags ) const
    226  { return new JsonProperty ( flags ); }
    227 
    228 
    229  template<typename Value, typename JsonState>
    230  void StandardPrivateProperty<Value,JsonState>::JsonProperty::toData ( JsonStack& stack )
    231  {
    232  check( stack, "JsonProperty::toData" );
    233 
    234  DBo* dbo = stack.back_dbo();
    235  Value value = get<string>(stack,"_value");
    236  StandardPrivateProperty<Value,JsonState>* property
    237  = StandardPrivateProperty<Value,JsonState>::create(value);
    238  if (dbo) dbo->put( property );
    239 
    240  update( stack, property );
    241  }
    242 
    243 
    244  template<typename Value, typename JsonState>
    245  DBo* StandardPrivateProperty<Value,JsonState>::_owner = NULL;
    246 
    247 
    248  template<typename Value, typename JsonState>
    249  StandardPrivateProperty<Value,JsonState>* StandardPrivateProperty<Value,JsonState>::_cache = NULL;
    250 
    251 
    252  template<typename Value, typename JsonState>
    253  Name StandardPrivateProperty<Value,JsonState>::staticGetName ()
    254  {
    255  return _name;
    256  }
    257 
    258 
    259  template<typename Value, typename JsonState>
    260  Value* StandardPrivateProperty<Value,JsonState>::staticGetValue ( const DBo* object )
    261  {
    262  if ( ( object == _owner ) || get(object) ) return _cache->getValue();
    263  return NULL;
    264  }
    265 
    266 
    267  template<typename Value, typename JsonState>
    268  StandardPrivateProperty<Value,JsonState>* StandardPrivateProperty<Value,JsonState>::create ()
    269  {
    270  _cache = new StandardPrivateProperty<Value>();
    271  _cache->_postCreate();
    272  return _cache;
    273  }
    274 
    275 
    276  template<typename Value, typename JsonState>
    277  StandardPrivateProperty<Value,JsonState>* StandardPrivateProperty<Value,JsonState>::create ( const Value& value )
    278  {
    279  _cache = new StandardPrivateProperty<Value>(value);
    280  _cache->_postCreate();
    281  return _cache;
    282  }
    283 
    284 
    285  template<typename Value, typename JsonState>
    286  StandardPrivateProperty<Value,JsonState>* StandardPrivateProperty<Value,JsonState>::get ( const DBo* object, bool create )
    287  {
    288  if ( object == _owner ) return _cache;
    289 
    290  Property* property = object->getProperty ( StandardPrivateProperty<Value>::staticGetName() );
    291  _cache = dynamic_cast<StandardPrivateProperty<Value>*> ( property );
    292 
    293  if ( !_cache ) {
    294  if ( property )
    295  throw Error ( propertyTypeNameError
    296  , getString(StandardPrivateProperty<Value>::staticGetName()).c_str()
    297  , getString(object).c_str() );
    298  else if ( create )
    299  const_cast<DBo*>(object)->put ( StandardPrivateProperty<Value>::create() );
    300  }
    301 
    302  return _cache;
    303  }
    304 
    305 
    306  template<typename Value, typename JsonState>
    307  StandardPrivateProperty<Value,JsonState>::StandardPrivateProperty ()
    308  : PrivateProperty(), _value()
    309  { }
    310 
    311 
    312  template<typename Value, typename JsonState>
    313  StandardPrivateProperty<Value,JsonState>::StandardPrivateProperty ( const Value& value )
    314  : PrivateProperty(), _value(value)
    315  { }
    316 
    317 
    318  template<typename Value, typename JsonState>
    319  Name StandardPrivateProperty<Value,JsonState>::getName() const
    320  {
    321  return staticGetName();
    322  }
    323 
    324 
    325  template<typename Value, typename JsonState>
    326  Value& StandardPrivateProperty<Value,JsonState>::getValue () const
    327  {
    328  return _value;
    329  }
    330 
    331 
    332  template<typename Value, typename JsonState>
    333  void StandardPrivateProperty<Value,JsonState>::setValue ( const Value& value )
    334  {
    335  _value = value;
    336  }
    337 
    338 
    339  template<typename Value, typename JsonState>
    340  bool StandardPrivateProperty<Value,JsonState>::hasJson () const
    341  {
    342  return JsonState::enabled;
    343  }
    344 
    345 
    346  template<typename Value, typename JsonState>
    347  void StandardPrivateProperty<Value,JsonState>::toJson ( JsonWriter* w, const DBo* ) const
    348  {
    349  w->startObject();
    350  std::string tname = getString(staticGetName());
    351  jsonWrite( w, "@typename", tname );
    352  jsonWrite( w, "_value", _value );
    353  w->endObject();
    354  }
    355 
    356 
    357  template<typename Value, typename JsonState>
    358  string StandardPrivateProperty<Value,JsonState>::_getTypeName () const
    359  {
    360  return _TName("StandardPrivateProperty");
    361  }
    362 
    363  template<typename Value, typename JsonState>
    364  string StandardPrivateProperty<Value,JsonState>::_getString () const
    365  {
    366  string s = PrivateProperty::_getString();
    367  s.insert(s.length() - 1, " " + getString<Value&>(_value));
    368  return s;
    369  }
    370 
    371  template<typename Value, typename JsonState>
    372  Record* StandardPrivateProperty<Value,JsonState>::_getRecord () const
    373  {
    374  Record* record = PrivateProperty::_getRecord();
    375  if (record) {
    376  record->add ( getSlot("_name" , staticGetName()) );
    377  record->add ( getSlot("_value" ,&_value) );
    378  record->add ( getSlot("JSON support", JsonState::enabled) );
    379  }
    380  return record;
    381  }
    382 
    383 
    384 // -------------------------------------------------------------------
    385 // Class : "Hurricane::SharedProperty".
    386 
    387 
    388  class SharedProperty : public Property {
    389  private:
    390  class Orphaned {
    391  public:
    392  inline Orphaned ( SharedProperty* );
    393  public:
    394  SharedProperty* _property;
    395  unsigned int _refcount;
    396  unsigned int _count;
    397  };
    398  public:
    399  typedef set<DBo*,DBo::CompareById> DBoSet;
    400  typedef map<string,Orphaned> OrphanedMap;
    401  public:
    402  static const OrphanedMap& getOrphaneds ();
    403  static SharedProperty* getOrphaned ( const string& );
    404  static void addOrphaned ( const string&, SharedProperty* );
    405  static void refOrphaned ( const string& );
    406  static void countOrphaned ( const string&, unsigned int );
    407  static void removeOrphaned ( const string& );
    408  static void clearOrphaneds ();
    409  public:
    410  inline DBos getOwners () const;
    411  virtual void onCapturedBy ( DBo* owner );
    412  virtual void onReleasedBy ( DBo* owner );
    413  virtual void onNotOwned ();
    414  void _erase ( DBo* owner );
    415  inline DBoSet& _getOwnerSet ();
    416  virtual string _getString () const;
    417  virtual Record* _getRecord () const;
    418  private:
    419  static OrphanedMap _orphaneds;
    420  private:
    421  DBoSet _ownerSet;
    422  protected:
    423  SharedProperty ();
    424  virtual void _preDestroy ();
    425  };
    426 
    427 
    428 // Inline Functions.
    429  inline SharedProperty::Orphaned::Orphaned ( SharedProperty* property )
    430  : _property(property), _refcount(0), _count(0)
    431  { }
    432 
    433  inline DBos SharedProperty::getOwners () const { return getCollection(_ownerSet); }
    434  inline SharedProperty::DBoSet& SharedProperty::_getOwnerSet () { return _ownerSet; }
    435 
    436 
    437 // -------------------------------------------------------------------
    438 // Template Class : "Hurricane::StandardSharedProperty".
    439 
    440 
    441  template<typename Value> class StandardSharedProperty : public SharedProperty {
    442 
    443  public:
    444  static Name staticGetName ();
    445  static Value* staticGetValue ( const DBo* );
    446  static StandardSharedProperty* get ( const DBo*, bool create=false );
    447  // Constructors.
    448  static StandardSharedProperty* create ();
    449  static StandardSharedProperty* create ( const Value& );
    450  // Methods.
    451  virtual Name getName () const;
    452  Value& getValue () const;
    453  void setValue ( const Value& );
    454  virtual string _getTypeName () const;
    455  virtual string _getString () const;
    456  virtual Record* _getRecord () const;
    457 
    458  private:
    459  // Internal: Attributes.
    460  static Name _name;
    461  static DBo* _owner;
    462  static StandardSharedProperty* _cache;
    463  mutable Value _value;
    464 
    465  protected:
    466  // Internal: Constructor.
    468  StandardSharedProperty ( const Value& );
    469  };
    470 
    471 
    472 // Template function members.
    473  template<typename Value>
    475 
    476 
    477  template<typename Value>
    479 
    480 
    481  template<typename Value>
    483  {
    484  return _name;
    485  }
    486 
    487 
    488  template<typename Value>
    489  Value* StandardSharedProperty<Value>::staticGetValue ( const DBo* object )
    490  {
    491  if ( ( object == _owner ) || get(object) ) return _cache->getValue();
    492  return NULL;
    493  }
    494 
    495 
    496  template<typename Value>
    497  StandardSharedProperty<Value>* StandardSharedProperty<Value>::create ()
    498  {
    499  _cache = new StandardSharedProperty<Value>();
    500  _cache->_postCreate();
    501  return _cache;
    502  }
    503 
    504 
    505  template<typename Value>
    506  StandardSharedProperty<Value>* StandardSharedProperty<Value>::create ( const Value& value )
    507  {
    508  _cache = new StandardPrivateProperty<Value>(value);
    509  _cache->_postCreate();
    510  return _cache;
    511  }
    512 
    513 
    514  template<typename Value>
    515  StandardSharedProperty<Value>* StandardSharedProperty<Value>::get ( const DBo* object, bool create )
    516  {
    517  if ( _owner == object ) return _cache;
    518 
    519  Property* property = object->getProperty ( StandardSharedProperty<Value>::staticGetName() );
    520  _cache = dynamic_cast<StandardSharedProperty<Value>*> ( property );
    521 
    522  if ( !_cache ) {
    523  if ( property )
    524  throw Error ( propertyTypeNameError
    525  , getString(StandardSharedProperty<Value>::staticGetName()).c_str()
    526  , getString(object).c_str() );
    527  else if ( create )
    528  const_cast<DBo*>(object)->put ( StandardSharedProperty<Value>::create() );
    529  }
    530 
    531  return _cache;
    532  }
    533 
    534 
    535  template<typename Value>
    536  StandardSharedProperty<Value>::StandardSharedProperty ()
    537  : SharedProperty(), _value()
    538  { }
    539 
    540 
    541  template<typename Value>
    542  StandardSharedProperty<Value>::StandardSharedProperty ( const Value& value )
    543  : SharedProperty(), _value(value)
    544  { }
    545 
    546 
    547  template<typename Value>
    548  Name StandardSharedProperty<Value>::getName() const
    549  {
    550  return staticGetName();
    551  }
    552 
    553 
    554  template<typename Value>
    555  Value& StandardSharedProperty<Value>::getValue() const
    556  {
    557  return _value;
    558  }
    559 
    560 
    561  template<typename Value>
    562  void StandardSharedProperty<Value>::setValue(const Value& value)
    563  {
    564  _value = value;
    565  }
    566 
    567 
    568  template<typename Value>
    569  string StandardSharedProperty<Value>::_getTypeName() const
    570  {
    571  return _TName("StandardSharedProperty");
    572  }
    573 
    574 
    575  template<typename Value>
    576  string StandardSharedProperty<Value>::_getString() const
    577  {
    578  string s = SharedProperty::_getString();
    579  s.insert(s.length() - 1, " " + getString(_value));
    580  return s;
    581  }
    582 
    583 
    584  template<typename Value>
    585  Record* StandardSharedProperty<Value>::_getRecord() const
    586  {
    587  Record* record = SharedProperty::_getRecord();
    588  if (record) {
    589  record->add ( getSlot("Name" , staticGetName()) );
    590  record->add ( getSlot("Value", &_value) );
    591  }
    592  return record;
    593  }
    594 
    595 
    596 } // Hurricane namespace.
    597 
    598 
    599 INSPECTOR_P_SUPPORT(Hurricane::Property);
    600 
    601 
    602 #endif // HURRICANE_PROPERTY_H
    PrivateProperty description (API)
    Definition: Property.h:134
    +
    1 // -*- C++ -*-
    2 //
    3 // Copyright (c) BULL S.A. 2000-2021, All Rights Reserved
    4 //
    5 // This file is part of Hurricane.
    6 //
    7 // Hurricane is free software: you can redistribute it and/or modify
    8 // it under the terms of the GNU Lesser General Public License as
    9 // published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but
    13 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    14 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    15 // General Public License for more details.
    16 //
    17 // You should have received a copy of the Lesser GNU General Public
    18 // License along with Hurricane. If not, see
    19 // <http://www.gnu.org/licenses/>.
    20 //
    21 // +-----------------------------------------------------------------+
    22 // | H U R R I C A N E |
    23 // | V L S I B a c k e n d D a t a - B a s e |
    24 // | |
    25 // | Author : Remy Escassut |
    26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    27 // | =============================================================== |
    28 // | C++ Header : "./hurricane/Property.h" |
    29 // +-----------------------------------------------------------------+
    30 
    31 
    32 #pragma once
    33 #include "hurricane/Name.h"
    34 #include "hurricane/Properties.h"
    35 #include "hurricane/DBo.h"
    36 #include "hurricane/Error.h"
    37 
    38 
    39 namespace Hurricane {
    40 
    41 
    42  extern const char* propertyTypeNameError;
    43 
    44 
    45 // -------------------------------------------------------------------
    46 // Classes : template enable/disable Json support.
    47 
    48  struct JsonEnabled { enum State { enabled=1 }; };
    49  struct JsonDisabled { enum State { enabled=0 }; };
    50 
    51 
    52 // -------------------------------------------------------------------
    53 // Class : "Hurricane::Property".
    54 
    55 
    56  class Property {
    57 
    58  public:
    59  // Static Method.
    60  template<typename DerivedProperty>
    61  static DerivedProperty* get ( const DBo* );
    62  static Name staticGetName ();
    63  // Constructor.
    64  template<typename DerivedProperty>
    65  static DerivedProperty* create ();
    66  template<typename DerivedProperty, typename Value>
    67  static DerivedProperty* create ( const Value& );
    68  // Destructor.
    69  virtual void destroy ();
    70  // Methods.
    71  virtual Name getName () const = 0;
    72  virtual void onCapturedBy ( DBo* owner ) = 0;
    73  virtual void onReleasedBy ( DBo* owner ) = 0;
    74  // Hurricane Managment.
    75  virtual bool hasJson () const;
    76  virtual void toJson ( JsonWriter*, const DBo* ) const;
    77  virtual string _getTypeName () const = 0;
    78  virtual string _getString () const;
    79  virtual Record* _getRecord () const;
    80 
    81  private:
    82  static Name _baseName;
    83  protected:
    84  // Internal: Constructors & Destructors.
    85  Property ();
    86  virtual ~Property ();
    87  virtual void _postCreate () {};
    88  virtual void _preDestroy () {};
    89  private:
    90  Property ( const Property& );
    91  Property& operator= ( const Property& );
    92  };
    93 
    94 
    95  template<typename DerivedProperty>
    96  DerivedProperty* Property::create ()
    97  {
    98  DerivedProperty* property = new DerivedProperty();
    99  property->_postCreate();
    100  return property;
    101  }
    102 
    103 
    104  template<typename DerivedProperty, typename Value>
    105  DerivedProperty* Property::create ( const Value& value )
    106  {
    107  DerivedProperty* property = new DerivedProperty(value);
    108  property->_postCreate();
    109  return property;
    110  }
    111 
    112 
    113  template<typename DerivedProperty>
    114  DerivedProperty* Property::get ( const DBo* object )
    115  {
    116  Property* property1 = object->getProperty ( DerivedProperty::staticGetName() );
    117  DerivedProperty* property2 = dynamic_cast<DerivedProperty*> ( property1 );
    118 
    119  if ( property1 && !property2 )
    120  throw Error ( propertyTypeNameError
    121  , getString(DerivedProperty::staticGetName()).c_str()
    122  , getString(object).c_str() );
    123 
    124  return property2;
    125  }
    126 
    127 
    128 // -------------------------------------------------------------------
    129 // Class : "Hurricane::PrivateProperty".
    130 
    131 
    132  class PrivateProperty : public Property {
    133 
    134  public:
    135  // Methods.
    136  inline DBo* getOwner () const;
    137  virtual void onCapturedBy ( DBo* owner );
    138  virtual void onReleasedBy ( DBo* owner );
    139  virtual void onNotOwned ();
    140  virtual string _getString () const;
    141  virtual Record* _getRecord () const;
    142 
    143  private:
    144  // Internal: Attributes.
    145  DBo* _owner;
    146  protected:
    147  // Internal: Constructor & Destructors.
    148  PrivateProperty ();
    149  virtual void _preDestroy ();
    150  };
    151 
    152 
    153 // Inline Functions.
    154  inline DBo* PrivateProperty::getOwner () const { return _owner; };
    155 
    156 
    157 // -------------------------------------------------------------------
    158 // Template Class : "Hurricane::StandardPrivateProperty".
    159 
    160 
    161  template<typename Value, typename JsonState=JsonDisabled>
    163  public:
    164  static Name staticGetName ();
    165  static Value* staticGetValue ( const DBo* );
    166  static StandardPrivateProperty* get ( const DBo*, bool create=false );
    167  // Constructors.
    168  static StandardPrivateProperty* create ();
    169  static StandardPrivateProperty* create ( const Value& );
    170  // Methods.
    171  virtual Name getName () const;
    172  Value& getValue () const;
    173  void setValue ( const Value& );
    174  virtual bool hasJson () const;
    175  virtual void toJson ( JsonWriter*, const DBo* ) const;
    176  virtual string _getTypeName () const;
    177  virtual string _getString () const;
    178  virtual Record* _getRecord () const;
    179  private:
    180  // Internal: Attributes.
    181  static Name _name;
    182  static DBo* _owner;
    183  static StandardPrivateProperty* _cache;
    184  mutable Value _value;
    185  protected:
    186  // Internal: Constructor.
    188  StandardPrivateProperty ( const Value& );
    189  public:
    190  class JsonProperty : public JsonObject {
    191  public:
    192  static void initialize ();
    193  JsonProperty ( unsigned long flags );
    194  virtual string getTypeName () const;
    195  virtual JsonProperty* clone ( unsigned long ) const;
    196  virtual void toData ( JsonStack& );
    197  };
    198  };
    199 
    200 
    201  template<typename Value, typename JsonState>
    203  : JsonObject(flags)
    204  {
    205  if (flags & JsonWriter::RegisterMode)
    206  cerr << "Registering JsonProperty" << endl;
    207  add( "_value", typeid(Value) );
    208  }
    209 
    210 
    211  template<typename Value, typename JsonState>
    212  string StandardPrivateProperty<Value,JsonState>::JsonProperty::getTypeName () const
    213  { return getString(StandardPrivateProperty<Value,JsonState>::staticGetName()); }
    214 
    215 
    216  template<typename Value, typename JsonState>
    217  void StandardPrivateProperty<Value,JsonState>::JsonProperty::initialize ()
    218  { JsonTypes::registerType( new JsonProperty (JsonWriter::RegisterMode) ); }
    219 
    220 
    221  template<typename Value, typename JsonState>
    222  typename StandardPrivateProperty<Value,JsonState>::JsonProperty*
    223  StandardPrivateProperty<Value,JsonState>::JsonProperty::clone ( unsigned long flags ) const
    224  { return new JsonProperty ( flags ); }
    225 
    226 
    227  template<typename Value, typename JsonState>
    228  void StandardPrivateProperty<Value,JsonState>::JsonProperty::toData ( JsonStack& stack )
    229  {
    230  check( stack, "JsonProperty::toData" );
    231 
    232  DBo* dbo = stack.back_dbo();
    233  Value value = get<string>(stack,"_value");
    234  StandardPrivateProperty<Value,JsonState>* property
    235  = StandardPrivateProperty<Value,JsonState>::create(value);
    236  if (dbo) dbo->put( property );
    237 
    238  update( stack, property );
    239  }
    240 
    241 
    242  template<typename Value, typename JsonState>
    243  DBo* StandardPrivateProperty<Value,JsonState>::_owner = NULL;
    244 
    245 
    246  template<typename Value, typename JsonState>
    247  StandardPrivateProperty<Value,JsonState>* StandardPrivateProperty<Value,JsonState>::_cache = NULL;
    248 
    249 
    250  template<typename Value, typename JsonState>
    251  Name StandardPrivateProperty<Value,JsonState>::staticGetName ()
    252  {
    253  return _name;
    254  }
    255 
    256 
    257  template<typename Value, typename JsonState>
    258  Value* StandardPrivateProperty<Value,JsonState>::staticGetValue ( const DBo* object )
    259  {
    260  if ( ( object == _owner ) || get(object) ) return _cache->getValue();
    261  return NULL;
    262  }
    263 
    264 
    265  template<typename Value, typename JsonState>
    266  StandardPrivateProperty<Value,JsonState>* StandardPrivateProperty<Value,JsonState>::create ()
    267  {
    268  _cache = new StandardPrivateProperty<Value>();
    269  _cache->_postCreate();
    270  return _cache;
    271  }
    272 
    273 
    274  template<typename Value, typename JsonState>
    275  StandardPrivateProperty<Value,JsonState>* StandardPrivateProperty<Value,JsonState>::create ( const Value& value )
    276  {
    277  _cache = new StandardPrivateProperty<Value>(value);
    278  _cache->_postCreate();
    279  return _cache;
    280  }
    281 
    282 
    283  template<typename Value, typename JsonState>
    284  StandardPrivateProperty<Value,JsonState>* StandardPrivateProperty<Value,JsonState>::get ( const DBo* object, bool create )
    285  {
    286  if ( object == _owner ) return _cache;
    287 
    288  Property* property = object->getProperty ( StandardPrivateProperty<Value>::staticGetName() );
    289  _cache = dynamic_cast<StandardPrivateProperty<Value>*> ( property );
    290 
    291  if ( !_cache ) {
    292  if ( property )
    293  throw Error ( propertyTypeNameError
    294  , getString(StandardPrivateProperty<Value>::staticGetName()).c_str()
    295  , getString(object).c_str() );
    296  else if ( create )
    297  const_cast<DBo*>(object)->put ( StandardPrivateProperty<Value>::create() );
    298  }
    299 
    300  return _cache;
    301  }
    302 
    303 
    304  template<typename Value, typename JsonState>
    305  StandardPrivateProperty<Value,JsonState>::StandardPrivateProperty ()
    306  : PrivateProperty(), _value()
    307  { }
    308 
    309 
    310  template<typename Value, typename JsonState>
    311  StandardPrivateProperty<Value,JsonState>::StandardPrivateProperty ( const Value& value )
    312  : PrivateProperty(), _value(value)
    313  { }
    314 
    315 
    316  template<typename Value, typename JsonState>
    317  Name StandardPrivateProperty<Value,JsonState>::getName() const
    318  {
    319  return staticGetName();
    320  }
    321 
    322 
    323  template<typename Value, typename JsonState>
    324  Value& StandardPrivateProperty<Value,JsonState>::getValue () const
    325  {
    326  return _value;
    327  }
    328 
    329 
    330  template<typename Value, typename JsonState>
    331  void StandardPrivateProperty<Value,JsonState>::setValue ( const Value& value )
    332  {
    333  _value = value;
    334  }
    335 
    336 
    337  template<typename Value, typename JsonState>
    338  bool StandardPrivateProperty<Value,JsonState>::hasJson () const
    339  {
    340  return JsonState::enabled;
    341  }
    342 
    343 
    344  template<typename Value, typename JsonState>
    345  void StandardPrivateProperty<Value,JsonState>::toJson ( JsonWriter* w, const DBo* ) const
    346  {
    347  w->startObject();
    348  std::string tname = getString(staticGetName());
    349  jsonWrite( w, "@typename", tname );
    350  jsonWrite( w, "_value", _value );
    351  w->endObject();
    352  }
    353 
    354 
    355  template<typename Value, typename JsonState>
    356  string StandardPrivateProperty<Value,JsonState>::_getTypeName () const
    357  {
    358  return _TName("StandardPrivateProperty");
    359  }
    360 
    361  template<typename Value, typename JsonState>
    362  string StandardPrivateProperty<Value,JsonState>::_getString () const
    363  {
    364  string s = PrivateProperty::_getString();
    365  s.insert(s.length() - 1, " " + getString<Value&>(_value));
    366  return s;
    367  }
    368 
    369  template<typename Value, typename JsonState>
    370  Record* StandardPrivateProperty<Value,JsonState>::_getRecord () const
    371  {
    372  Record* record = PrivateProperty::_getRecord();
    373  if (record) {
    374  record->add ( getSlot("_name" , staticGetName()) );
    375  record->add ( getSlot("_value" ,&_value) );
    376  record->add ( getSlot("JSON support", JsonState::enabled) );
    377  }
    378  return record;
    379  }
    380 
    381 
    382 // -------------------------------------------------------------------
    383 // Class : "Hurricane::SharedProperty".
    384 
    385 
    386  class SharedProperty : public Property {
    387  private:
    388  class Orphaned {
    389  public:
    390  inline Orphaned ( SharedProperty* );
    391  public:
    392  SharedProperty* _property;
    393  unsigned int _refcount;
    394  unsigned int _count;
    395  };
    396  public:
    397  typedef set<DBo*,DBo::CompareById> DBoSet;
    398  typedef map<string,Orphaned> OrphanedMap;
    399  public:
    400  static const OrphanedMap& getOrphaneds ();
    401  static SharedProperty* getOrphaned ( const string& );
    402  static void addOrphaned ( const string&, SharedProperty* );
    403  static void refOrphaned ( const string& );
    404  static void countOrphaned ( const string&, unsigned int );
    405  static void removeOrphaned ( const string& );
    406  static void clearOrphaneds ();
    407  public:
    408  inline DBos getOwners () const;
    409  virtual void onCapturedBy ( DBo* owner );
    410  virtual void onReleasedBy ( DBo* owner );
    411  virtual void onNotOwned ();
    412  void _erase ( DBo* owner );
    413  inline DBoSet& _getOwnerSet ();
    414  virtual string _getString () const;
    415  virtual Record* _getRecord () const;
    416  private:
    417  static OrphanedMap _orphaneds;
    418  private:
    419  DBoSet _ownerSet;
    420  protected:
    421  SharedProperty ();
    422  virtual void _preDestroy ();
    423  };
    424 
    425 
    426 // Inline Functions.
    427  inline SharedProperty::Orphaned::Orphaned ( SharedProperty* property )
    428  : _property(property), _refcount(0), _count(0)
    429  { }
    430 
    431  inline DBos SharedProperty::getOwners () const { return getCollection(_ownerSet); }
    432  inline SharedProperty::DBoSet& SharedProperty::_getOwnerSet () { return _ownerSet; }
    433 
    434 
    435 // -------------------------------------------------------------------
    436 // Template Class : "Hurricane::StandardSharedProperty".
    437 
    438 
    439  template<typename Value> class StandardSharedProperty : public SharedProperty {
    440 
    441  public:
    442  static Name staticGetName ();
    443  static Value* staticGetValue ( const DBo* );
    444  static StandardSharedProperty* get ( const DBo*, bool create=false );
    445  // Constructors.
    446  static StandardSharedProperty* create ();
    447  static StandardSharedProperty* create ( const Value& );
    448  // Methods.
    449  virtual Name getName () const;
    450  Value& getValue () const;
    451  void setValue ( const Value& );
    452  virtual string _getTypeName () const;
    453  virtual string _getString () const;
    454  virtual Record* _getRecord () const;
    455 
    456  private:
    457  // Internal: Attributes.
    458  static Name _name;
    459  static DBo* _owner;
    460  static StandardSharedProperty* _cache;
    461  mutable Value _value;
    462 
    463  protected:
    464  // Internal: Constructor.
    466  StandardSharedProperty ( const Value& );
    467  };
    468 
    469 
    470 // Template function members.
    471  template<typename Value>
    473 
    474 
    475  template<typename Value>
    477 
    478 
    479  template<typename Value>
    481  {
    482  return _name;
    483  }
    484 
    485 
    486  template<typename Value>
    487  Value* StandardSharedProperty<Value>::staticGetValue ( const DBo* object )
    488  {
    489  if ( ( object == _owner ) || get(object) ) return _cache->getValue();
    490  return NULL;
    491  }
    492 
    493 
    494  template<typename Value>
    495  StandardSharedProperty<Value>* StandardSharedProperty<Value>::create ()
    496  {
    497  _cache = new StandardSharedProperty<Value>();
    498  _cache->_postCreate();
    499  return _cache;
    500  }
    501 
    502 
    503  template<typename Value>
    504  StandardSharedProperty<Value>* StandardSharedProperty<Value>::create ( const Value& value )
    505  {
    506  _cache = new StandardPrivateProperty<Value>(value);
    507  _cache->_postCreate();
    508  return _cache;
    509  }
    510 
    511 
    512  template<typename Value>
    513  StandardSharedProperty<Value>* StandardSharedProperty<Value>::get ( const DBo* object, bool create )
    514  {
    515  if ( _owner == object ) return _cache;
    516 
    517  Property* property = object->getProperty ( StandardSharedProperty<Value>::staticGetName() );
    518  _cache = dynamic_cast<StandardSharedProperty<Value>*> ( property );
    519 
    520  if ( !_cache ) {
    521  if ( property )
    522  throw Error ( propertyTypeNameError
    523  , getString(StandardSharedProperty<Value>::staticGetName()).c_str()
    524  , getString(object).c_str() );
    525  else if ( create )
    526  const_cast<DBo*>(object)->put ( StandardSharedProperty<Value>::create() );
    527  }
    528 
    529  return _cache;
    530  }
    531 
    532 
    533  template<typename Value>
    534  StandardSharedProperty<Value>::StandardSharedProperty ()
    535  : SharedProperty(), _value()
    536  { }
    537 
    538 
    539  template<typename Value>
    540  StandardSharedProperty<Value>::StandardSharedProperty ( const Value& value )
    541  : SharedProperty(), _value(value)
    542  { }
    543 
    544 
    545  template<typename Value>
    546  Name StandardSharedProperty<Value>::getName() const
    547  {
    548  return staticGetName();
    549  }
    550 
    551 
    552  template<typename Value>
    553  Value& StandardSharedProperty<Value>::getValue() const
    554  {
    555  return _value;
    556  }
    557 
    558 
    559  template<typename Value>
    560  void StandardSharedProperty<Value>::setValue(const Value& value)
    561  {
    562  _value = value;
    563  }
    564 
    565 
    566  template<typename Value>
    567  string StandardSharedProperty<Value>::_getTypeName() const
    568  {
    569  return _TName("StandardSharedProperty");
    570  }
    571 
    572 
    573  template<typename Value>
    574  string StandardSharedProperty<Value>::_getString() const
    575  {
    576  string s = SharedProperty::_getString();
    577  s.insert(s.length() - 1, " " + getString(_value));
    578  return s;
    579  }
    580 
    581 
    582  template<typename Value>
    583  Record* StandardSharedProperty<Value>::_getRecord() const
    584  {
    585  Record* record = SharedProperty::_getRecord();
    586  if (record) {
    587  record->add ( getSlot("Name" , staticGetName()) );
    588  record->add ( getSlot("Value", &_value) );
    589  }
    590  return record;
    591  }
    592 
    593 
    594 } // Hurricane namespace.
    595 
    596 
    597 INSPECTOR_P_SUPPORT(Hurricane::Property);
    PrivateProperty description (API)
    Definition: Property.h:132
    virtual void onReleasedBy(DBo *owner)=0
    -
    DBo * getOwner() const
    Definition: Property.h:156
    +
    DBo * getOwner() const
    Definition: Property.h:154
    Support for JSON export.
    Definition: JsonObject.h:83
    virtual void destroy()
    Name description (API)
    Definition: Name.h:35
    virtual void onCapturedBy(DBo *owner)=0
    -
    SharedProperty description (API)
    Definition: Property.h:388
    -
    DataBase object root class (API).
    Definition: DBo.h:47
    +
    SharedProperty description (API)
    Definition: Property.h:386
    +
    DataBase object root class (API).
    Definition: DBo.h:45
    Generic Collection auto-pointer.
    Definition: Collection.h:28
    JSON Parser Stack.
    Definition: JsonObject.h:249
    -
    Property description (API)
    Definition: Property.h:58
    -
    StandardPrivateProperty description (API)
    Definition: Property.h:164
    +
    Property description (API)
    Definition: Property.h:56
    +
    StandardPrivateProperty description (API)
    Definition: Property.h:162
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    GenericCollection< DBo * > DBos
    Definition: DBos.h:27
    virtual Name getName() const =0
    -
    StandardSharedProperty description (API)
    Definition: Property.h:441
    +
    StandardSharedProperty description (API)
    Definition: Property.h:439


    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/QuadTree_8h_source.html b/hurricane/doc/hurricane/html/QuadTree_8h_source.html index 77b13ac2..fdf5f0a7 100644 --- a/hurricane/doc/hurricane/html/QuadTree_8h_source.html +++ b/hurricane/doc/hurricane/html/QuadTree_8h_source.html @@ -44,8 +44,8 @@ $(function() {
    QuadTree.h
    -
    1 // ****************************************************************************************************
    2 // File: ./hurricane/QuadTree.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #pragma once
    21 #include "hurricane/Box.h"
    22 #include "hurricane/Gos.h"
    23 #include "hurricane/IntrusiveSet.h"
    24 
    25 namespace Hurricane {
    26 
    27 
    28 
    29 // ****************************************************************************************************
    30 // QuadTree declaration
    31 // ****************************************************************************************************
    32 
    33 class QuadTree {
    34 // Types
    35 // *****
    36 
    37  public: class GoSet : public IntrusiveSet<Go> {
    38  // *******************************************
    39 
    40  public: typedef IntrusiveSet<Go> Inherit;
    41 
    42  public: GoSet();
    43 
    44  public: virtual unsigned _getHashValue(Go* go) const;
    45  public: virtual Go* _getNextElement(Go* go) const;
    46  public: virtual void _setNextElement(Go* go, Go* nextGo) const;
    47 
    48  };
    49 
    50 // Attributes
    51 // **********
    52 
    53  private: QuadTree* _parent;
    54  private: DbU::Unit _x;
    55  private: DbU::Unit _y;
    56  private: Box _boundingBox;
    57  private: unsigned _size;
    58  private: GoSet _goSet;
    59  private: QuadTree* _ulChild; // Upper Left Child
    60  private: QuadTree* _urChild; // Upper Right Child
    61  private: QuadTree* _llChild; // Lower Left Child
    62  private: QuadTree* _lrChild; // Lower Right Child
    63 
    64 // Constructors
    65 // ************
    66 
    67  public: QuadTree();
    68 
    69  private: QuadTree(QuadTree* parent);
    70 
    71  private: QuadTree(const QuadTree& quadTree); // not implemented to forbid copy construction
    72 
    73 // Destructor
    74 // **********
    75 
    76  public: ~QuadTree();
    77 
    78 // Operators
    79 // *********
    80 
    81  private: QuadTree& operator=(const QuadTree& quadTree); // not implemented to forbid assignment
    82 
    83 // Accessors
    84 // *********
    85 
    86  //public: static size_t getLocatorAllocateds ();
    87  public: const Box& getBoundingBox() const;
    88  public: Gos getGos() const;
    89  public: Gos getGosUnder(const Box& area, DbU::Unit threshold=0) const;
    90 
    91 // Predicates
    92 // **********
    93 
    94  public: bool isEmpty() const {return (_size == 0);};
    95 
    96 // Updators
    97 // ********
    98 
    99  public: void insert(Go* go);
    100  public: void remove(Go* go);
    101 
    102 // Others
    103 // ******
    104 
    105  public: string _getTypeName() const { return _TName("QuadTree"); };
    106  public: string _getString() const;
    107  public: Record* _getRecord() const;
    108 
    109  public: GoSet& _getGoSet() {return _goSet;};
    110  public: QuadTree* _getDeepestChild(const Box& box);
    111  public: QuadTree* _getFirstQuadTree() const;
    112  public: QuadTree* _getFirstQuadTree(const Box& area) const;
    113  public: QuadTree* _getNextQuadTree();
    114  public: QuadTree* _getNextQuadTree(const Box& area);
    115 
    116  public: bool _hasBeenExploded() const {return (_ulChild != NULL);};
    117 
    118  public: void _explode();
    119  public: void _implode();
    120 
    121 };
    122 
    123 
    124 } // End of Hurricane namespace.
    125 
    126 
    127 INSPECTOR_P_SUPPORT(Hurricane::QuadTree);
    128 INSPECTOR_P_SUPPORT(Hurricane::QuadTree::GoSet);
    129 
    130 
    131 // ****************************************************************************************************
    132 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    133 // ****************************************************************************************************
    Go description (API)
    Definition: Go.h:36
    -
    std::int64_t Unit
    Definition: DbU.h:70
    +
    1 // ****************************************************************************************************
    2 // File: ./hurricane/QuadTree.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #pragma once
    21 #include "hurricane/Box.h"
    22 #include "hurricane/Gos.h"
    23 #include "hurricane/IntrusiveSet.h"
    24 
    25 namespace Hurricane {
    26 
    27 
    28 
    29 // ****************************************************************************************************
    30 // QuadTree declaration
    31 // ****************************************************************************************************
    32 
    33 class QuadTree {
    34 // Types
    35 // *****
    36 
    37  public: class GoSet : public IntrusiveSet<Go> {
    38  // *******************************************
    39 
    40  public: typedef IntrusiveSet<Go> Inherit;
    41 
    42  public: GoSet();
    43 
    44  public: virtual unsigned _getHashValue(Go* go) const;
    45  public: virtual Go* _getNextElement(Go* go) const;
    46  public: virtual void _setNextElement(Go* go, Go* nextGo) const;
    47 
    48  };
    49 
    50 // Attributes
    51 // **********
    52 
    53  private: QuadTree* _parent;
    54  private: DbU::Unit _x;
    55  private: DbU::Unit _y;
    56  private: Box _boundingBox;
    57  private: unsigned _size;
    58  private: GoSet _goSet;
    59  private: QuadTree* _ulChild; // Upper Left Child
    60  private: QuadTree* _urChild; // Upper Right Child
    61  private: QuadTree* _llChild; // Lower Left Child
    62  private: QuadTree* _lrChild; // Lower Right Child
    63 
    64 // Constructors
    65 // ************
    66 
    67  public: QuadTree();
    68 
    69  private: QuadTree(QuadTree* parent);
    70 
    71  private: QuadTree(const QuadTree& quadTree); // not implemented to forbid copy construction
    72 
    73 // Destructor
    74 // **********
    75 
    76  public: ~QuadTree();
    77 
    78 // Operators
    79 // *********
    80 
    81  private: QuadTree& operator=(const QuadTree& quadTree); // not implemented to forbid assignment
    82 
    83 // Accessors
    84 // *********
    85 
    86  //public: static size_t getLocatorAllocateds ();
    87  public: const Box& getBoundingBox() const;
    88  public: Gos getGos() const;
    89  public: Gos getGosUnder(const Box& area, DbU::Unit threshold=0) const;
    90 
    91 // Predicates
    92 // **********
    93 
    94  public: bool isEmpty() const {return (_size == 0);};
    95 
    96 // Updators
    97 // ********
    98 
    99  public: void insert(Go* go);
    100  public: void remove(Go* go);
    101 
    102 // Others
    103 // ******
    104 
    105  public: string _getTypeName() const { return _TName("QuadTree"); };
    106  public: string _getString() const;
    107  public: Record* _getRecord() const;
    108 
    109  public: GoSet& _getGoSet() {return _goSet;};
    110  public: QuadTree* _getDeepestChild(const Box& box);
    111  public: QuadTree* _getFirstQuadTree() const;
    112  public: QuadTree* _getFirstQuadTree(const Box& area) const;
    113  public: QuadTree* _getNextQuadTree();
    114  public: QuadTree* _getNextQuadTree(const Box& area);
    115 
    116  public: bool _hasBeenExploded() const {return (_ulChild != NULL);};
    117 
    118  public: void _explode();
    119  public: void _implode();
    120 
    121 };
    122 
    123 
    124 } // End of Hurricane namespace.
    125 
    126 
    127 INSPECTOR_P_SUPPORT(Hurricane::QuadTree);
    128 INSPECTOR_P_SUPPORT(Hurricane::QuadTree::GoSet);
    129 
    130 
    131 // ****************************************************************************************************
    132 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    133 // ****************************************************************************************************
    Go description (API)
    Definition: Go.h:34
    +
    std::int64_t Unit
    Definition: DbU.h:67
    bool isEmpty() const
    Definition: QuadTree.h:94
    Gos getGos() const
    Generic Collection auto-pointer.
    Definition: Collection.h:28
    @@ -62,7 +62,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Quark_8h_source.html b/hurricane/doc/hurricane/html/Quark_8h_source.html index 95ae4c0f..6fddb491 100644 --- a/hurricane/doc/hurricane/html/Quark_8h_source.html +++ b/hurricane/doc/hurricane/html/Quark_8h_source.html @@ -46,7 +46,7 @@ $(function() {
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Quark.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_QUARK
    21 #define HURRICANE_QUARK
    22 
    23 #include "hurricane/DBo.h"
    24 #include "hurricane/Quarks.h"
    25 #include "hurricane/Occurrence.h"
    26 
    27 namespace Hurricane {
    28 
    29 
    30 
    31 // ****************************************************************************************************
    32 // Quark declaration
    33 // ****************************************************************************************************
    34 
    35 class Quark : public DBo {
    36 // *********************
    37 
    38 // Types
    39 // *****
    40 
    41  public: typedef DBo Inherit;
    42 
    43 // Attributes
    44 // **********
    45 
    46  private: Occurrence _occurrence;
    47  private: Quark* _nextOfSharedPathQuarkMap;
    48 
    49 // Constructors
    50 // ************
    51 
    52  protected: Quark(const Occurrence& occurrence);
    53 
    54 // Accessors
    55 // *********
    56 
    57  public: const Occurrence& getOccurrence() const {return _occurrence;};
    58 
    59 // Others
    60 // ******
    61 
    62  public: static Quark* _create(const Occurrence& occurrence);
    63  protected: virtual void _postCreate();
    64 
    65  protected: virtual void _preDestroy();
    66 
    67  public: virtual string _getTypeName() const {return _TName("Quark");};
    68  public: virtual string _getString() const;
    69  public: virtual Record* _getRecord() const;
    70  public: Quark* _getNextOfSharedPathQuarkMap() const {return _nextOfSharedPathQuarkMap;};
    71 
    72  public: void _setNextOfSharedPathQuarkMap(Quark* quark) {_nextOfSharedPathQuarkMap = quark;};
    73 
    74 };
    75 
    76 
    77 } // End of Hurricane namespace.
    78 
    79 
    80 INSPECTOR_P_SUPPORT(Hurricane::Quark);
    81 
    82 
    83 #endif // HURRICANE_QUARK
    84 
    85 
    86 // ****************************************************************************************************
    87 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    88 // ****************************************************************************************************
    Occurrence description (API)
    Definition: Occurrence.h:39
    Quark description (API)
    Definition: Quark.h:35
    -
    DataBase object root class (API).
    Definition: DBo.h:47
    +
    DataBase object root class (API).
    Definition: DBo.h:45
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    const Occurrence & getOccurrence() const
    Definition: Quark.h:57
    @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Quarks_8h_source.html b/hurricane/doc/hurricane/html/Quarks_8h_source.html index ce9f791e..b6013fae 100644 --- a/hurricane/doc/hurricane/html/Quarks_8h_source.html +++ b/hurricane/doc/hurricane/html/Quarks_8h_source.html @@ -50,7 +50,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Query_8h_source.html b/hurricane/doc/hurricane/html/Query_8h_source.html index f84633e1..8a1f0270 100644 --- a/hurricane/doc/hurricane/html/Query_8h_source.html +++ b/hurricane/doc/hurricane/html/Query_8h_source.html @@ -44,62 +44,62 @@ $(function() {
    Query.h
    -
    1 // -*- C++ -*-
    2 //
    3 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    4 //
    5 // This file is part of Hurricane.
    6 //
    7 // Hurricane is free software: you can redistribute it and/or modify
    8 // it under the terms of the GNU Lesser General Public License as
    9 // published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but
    13 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    14 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    15 // General Public License for more details.
    16 //
    17 // You should have received a copy of the Lesser GNU General Public
    18 // License along with Hurricane. If not, see
    19 // <http://www.gnu.org/licenses/>.
    20 //
    21 // +-----------------------------------------------------------------+
    22 // | H U R R I C A N E |
    23 // | V L S I B a c k e n d D a t a - B a s e |
    24 // | |
    25 // | Author : Jean-Paul CHAPUT |
    26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    27 // | =============================================================== |
    28 // | C++ Header : "./hurricane/Query.h" |
    29 // +-----------------------------------------------------------------+
    30 
    31 
    32 #pragma once
    33 #include <vector>
    34 #include "hurricane/Commons.h"
    35 #include "hurricane/Box.h"
    36 #include "hurricane/Transformation.h"
    37 #include "hurricane/Cell.h"
    38 #include "hurricane/Instance.h"
    39 
    40 
    41 namespace Hurricane {
    42 
    43  class BasicLayer;
    44  class Go;
    45  class QueryStack;
    46 
    47 
    48 // -------------------------------------------------------------------
    49 // Slave Class : "QueryState".
    50 
    51  class QueryState {
    52  private:
    53  inline QueryState ( Locator<Instance*>* locator );
    54  inline QueryState ( Locator<Instance*>* locator
    55  , const Box& area
    56  , const Transformation& transformation
    57  , const Path& path
    58  );
    59  QueryState ( const QueryState& );
    60  QueryState& operator= ( const QueryState& );
    61  inline ~QueryState ();
    62  private:
    63  Locator<Instance*>* _locator;
    64  Box _area;
    65  Transformation _transformation;
    66  Path _path;
    67 
    68  friend class QueryStack;
    69  };
    70 
    71 
    72 // QueryState Inline Functions.
    73 
    74 
    75  inline QueryState::QueryState ( Locator<Instance*>* locator )
    76  : _locator (locator)
    77  , _area ()
    78  , _transformation()
    79  , _path ()
    80  { }
    81 
    82 
    83  inline QueryState::QueryState ( Locator<Instance*>* locator
    84  , const Box& area
    85  , const Transformation& transformation
    86  , const Path& path
    87  )
    88  : _locator (locator)
    89  , _area (area)
    90  , _transformation(transformation)
    91  , _path (path)
    92  { }
    93 
    94 
    95  inline QueryState::~QueryState ()
    96  {
    97  if ( _locator ) delete _locator;
    98  }
    99 
    100 
    101 // -------------------------------------------------------------------
    102 // Class : "QueryStack".
    103 
    104 
    105  class QueryStack : public vector<QueryState*> {
    106  public:
    107  // Constructor & destructor.
    108  QueryStack ();
    109  ~QueryStack ();
    110  // Accessors.
    111  inline Cell* getTopCell ();
    112  inline const Box& getTopArea () const;
    113  inline const Transformation& getTopTransformation () const;
    114  inline unsigned int getStartLevel () const;
    115  inline unsigned int getStopLevel () const;
    116  inline Cell* getMasterCell ();
    117  inline Instance* getInstance ();
    118  inline const Box& getArea () const;
    119  inline DbU::Unit getThreshold () const;
    120  inline const Transformation& getTransformation () const;
    121  inline const Path& getPath () const;
    122  //inline const Tabulation& getTab () const;
    123  // Modifiers.
    124  inline void setTopCell ( Cell* cell );
    125  inline void setTopArea ( const Box& area );
    126  inline void setTopTransformation ( const Transformation& transformation );
    127  inline void setThreshold ( DbU::Unit threshold );
    128  inline void setStartLevel ( unsigned int level );
    129  inline void setStopLevel ( unsigned int level );
    130  inline void init ();
    131  inline void updateTransformation ();
    132  inline bool levelDown ();
    133  inline void levelUp ();
    134  inline void levelProgress ();
    135  inline bool levelCompleted ();
    136  inline void progress ( bool init=false );
    137 
    138  protected:
    139  // Internal: Attributes.
    140  // Tabulation _tab;
    141  Cell* _topCell;
    142  Box _topArea;
    143  DbU::Unit _threshold;
    144  Transformation _topTransformation;
    145  unsigned int _startLevel;
    146  unsigned int _stopLevel;
    147 
    148  private:
    149  // Internal: Constructors.
    150  QueryStack ( const QueryStack& );
    151  QueryStack& operator= ( const QueryStack& );
    152  };
    153 
    154 
    155 // QueryStack Inline Functions.
    156 
    157 
    158  inline Cell* QueryStack::getTopCell () { return _topCell; }
    159  inline const Box& QueryStack::getTopArea () const { return _topArea; }
    160  inline const Transformation& QueryStack::getTopTransformation () const { return _topTransformation; }
    161  inline DbU::Unit QueryStack::getThreshold () const { return _threshold; }
    162  inline unsigned int QueryStack::getStartLevel () const { return _startLevel; }
    163  inline unsigned int QueryStack::getStopLevel () const { return _stopLevel; }
    164  inline const Box& QueryStack::getArea () const { return back()->_area; }
    165  inline const Transformation& QueryStack::getTransformation () const { return back()->_transformation; }
    166  inline const Path& QueryStack::getPath () const { return back()->_path; }
    167 //inline const Tabulation& QueryStack::getTab () const { return _tab; }
    168 
    169 
    170  inline Instance* QueryStack::getInstance ()
    171  {
    172  if ( levelCompleted() ) return NULL;
    173  return back()->_locator->getElement();
    174  }
    175 
    176 
    177  inline Cell* QueryStack::getMasterCell ()
    178  {
    179  if ( size() == 1 ) return _topCell;
    180  if ( !getInstance() ) return NULL;
    181  return getInstance()->getMasterCell();
    182  }
    183 
    184 
    185  inline void QueryStack::setTopCell ( Cell* cell ) { _topCell = cell; }
    186  inline void QueryStack::setTopArea ( const Box& area ) { _topArea = area; }
    187  inline void QueryStack::setTopTransformation ( const Transformation& transformation ) { _topTransformation = transformation; }
    188  inline void QueryStack::setThreshold ( DbU::Unit threshold ) { _threshold = threshold; }
    189  inline void QueryStack::setStartLevel ( unsigned int level ) { _startLevel = level; }
    190  inline void QueryStack::setStopLevel ( unsigned int level ) { _stopLevel = level; }
    191 
    192 
    193  inline void QueryStack::init ()
    194  {
    195  while ( !empty() ) levelUp();
    196 
    197  push_back ( new QueryState(NULL,_topArea,_topTransformation,Path()) );
    198  //_tab++;
    199 
    200  progress ( true );
    201  }
    202 
    203 
    204  inline void QueryStack::updateTransformation ()
    205  {
    206  QueryState* child = *(rbegin() );
    207  QueryState* parent = *(rbegin()+1);
    208  Instance* instance = child->_locator->getElement();
    209 
    210  //cerr << "Processing " << instance << endl;
    211 
    212  child->_area = parent->_area;
    213  child->_transformation = instance->getTransformation ();
    214 
    215  instance->getTransformation().getInvert().applyOn ( child->_area );
    216  parent->_transformation.applyOn ( child->_transformation );
    217 
    218  //child->_path = Path ( Path(parent->_path,instance->getCell()->getShuntedPath()) , instance );
    219  child->_path = Path ( parent->_path, instance );
    220  }
    221 
    222 
    223  inline bool QueryStack::levelDown ()
    224  {
    225  if ( size() > _stopLevel ) return false;
    226 
    227  //cerr << "QueryStack::levelDown(): t:" << DbU::getValueString(getThreshold()) << endl;
    228  Locator<Instance*>* locator =
    229  getMasterCell()->getInstancesUnder(getArea(),getThreshold()).getLocator();
    230 
    231  if ( locator->isValid() ) {
    232  push_back ( new QueryState ( locator ) );
    233 
    234  updateTransformation ();
    235  //_tab++;
    236 
    237  return true;
    238  } else
    239  delete locator;
    240 
    241  //cerr << " Aborting level down" << endl;
    242  return false;
    243  }
    244 
    245 
    246  inline void QueryStack::levelUp ()
    247  {
    248  delete back ();
    249  pop_back ();
    250  //_tab--;
    251  }
    252 
    253 
    254  inline bool QueryStack::levelCompleted ()
    255  {
    256  if ( !back()->_locator || !back()->_locator->isValid () ) return true;
    257  return false;
    258  }
    259 
    260 
    261  inline void QueryStack::levelProgress ()
    262  {
    263  if ( levelCompleted() ) return;
    264 
    265  back()->_locator->progress ();
    266  if ( !back()->_locator->isValid() ) return;
    267 
    268  updateTransformation ();
    269  }
    270 
    271 
    272  inline void QueryStack::progress ( bool init )
    273  {
    274  if ( !init ) levelProgress ();
    275  else {
    276  if ( !levelDown() && ( size() > _startLevel ) )
    277  return;
    278  }
    279 
    280  while ( !empty() ) {
    281  if ( levelCompleted() ) {
    282  levelUp ();
    283  } else {
    284  if ( levelDown() ) continue;
    285  }
    286 
    287  if ( size() > _startLevel ) return;
    288  if ( empty() ) break;
    289  levelProgress ();
    290  }
    291  }
    292 
    293 
    294 // -------------------------------------------------------------------
    295 // Class : "Query".
    296 
    297  class Query {
    298  public:
    299  typedef Hurricane::Mask<int> Mask;
    300  public:
    301  // Types.
    305  , DoMarkers = 8
    306  , DoRubbers = 16
    310  | DoComponents
    311  | DoMarkers
    312  | DoRubbers
    314  };
    315  public:
    316  // Constructors & Destructors.
    317  Query ();
    318  virtual ~Query ();
    319  // Accessors.
    320  inline unsigned int getStartLevel () const;
    321  inline unsigned int getStopLevel () const;
    322  inline size_t getDepth () const;
    323  inline const Transformation& getTransformation () const;
    324  inline const Box& getArea () const;
    325  inline DbU::Unit getThreshold () const;
    326  inline const BasicLayer* getBasicLayer () const;
    327  inline Cell* getMasterCell ();
    328  inline Instance* getInstance ();
    329  inline Path getPath () const;
    330  //inline const Tabulation& getTab () const;
    331  virtual bool hasGoCallback () const;
    332  virtual bool hasMarkerCallback () const;
    333  virtual bool hasRubberCallback () const;
    334  virtual bool hasExtensionGoCallback () const;
    335  virtual bool hasMasterCellCallback () const;
    336  virtual void goCallback ( Go* ) = 0;
    337  virtual void markerCallback ( Marker* );
    338  virtual void rubberCallback ( Rubber* );
    339  virtual void extensionGoCallback ( Go* ) = 0;
    340  virtual void masterCellCallback () = 0;
    341  // Modifiers.
    342  void setQuery ( Cell* cell
    343  , const Box& area
    344  , const Transformation& transformation
    345  , const BasicLayer* basicLayer
    346  , ExtensionSlice::Mask extensionMask
    347  , Mask filter
    348  , DbU::Unit threshold=0
    349  );
    350  inline void setCell ( Cell* cell );
    351  inline void setArea ( const Box& area );
    352  inline void setThreshold ( DbU::Unit threshold );
    353  inline void setTransformation ( const Transformation& transformation );
    354  virtual void setBasicLayer ( const BasicLayer* basicLayer );
    355  inline void setExtensionMask ( ExtensionSlice::Mask mode );
    356  inline void setFilter ( Mask mode );
    357  inline void setStartLevel ( unsigned int level );
    358  inline void setStopLevel ( unsigned int level );
    359  virtual void doQuery ();
    360 
    361  protected:
    362  // Internal: Attributes.
    363  QueryStack _stack;
    364  const BasicLayer* _basicLayer;
    365  ExtensionSlice::Mask _extensionMask;
    366  Mask _filter;
    367  };
    368 
    369 
    370 // Query Inline Functions.
    371 
    372  inline void Query::setCell ( Cell* cell ) { _stack.setTopCell(cell); }
    373  inline void Query::setArea ( const Box& area ) { _stack.setTopArea(area); }
    374  inline void Query::setThreshold ( DbU::Unit threshold ) { _stack.setThreshold(threshold); }
    375  inline void Query::setTransformation ( const Transformation& transformation ) { _stack.setTopTransformation(transformation); }
    376  inline void Query::setFilter ( Mask filter ) { _filter = filter; }
    377  inline void Query::setExtensionMask ( ExtensionSlice::Mask mask ) { _extensionMask = mask; }
    378  inline void Query::setStartLevel ( unsigned int level ) { _stack.setStartLevel(level); }
    379  inline void Query::setStopLevel ( unsigned int level ) { _stack.setStopLevel(level); }
    380 
    381  inline unsigned int Query::getStartLevel () const { return _stack.getStartLevel(); }
    382  inline unsigned int Query::getStopLevel () const { return _stack.getStopLevel(); }
    383  inline size_t Query::getDepth () const { return _stack.size(); }
    384  inline const Box& Query::getArea () const { return _stack.getArea(); }
    385  inline const Transformation& Query::getTransformation () const { return _stack.getTransformation(); }
    386  inline Path Query::getPath () const { return _stack.getPath(); }
    387  inline const BasicLayer* Query::getBasicLayer () const { return _basicLayer; }
    388  inline Cell* Query::getMasterCell () { return _stack.getMasterCell(); }
    389  inline Instance* Query::getInstance () { return _stack.getInstance(); }
    390 //inline const Tabulation& Query::getTab () const { return _stack.getTab(); }
    391 
    392 
    393 } // Hurricane namespace.
    Path description (API)
    Definition: Path.h:37
    -
    Definition: Query.h:304
    -
    Go description (API)
    Definition: Go.h:36
    -
    unsigned int getStopLevel() const
    Definition: Query.h:382
    +
    1 // -*- C++ -*-
    2 //
    3 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    4 //
    5 // This file is part of Hurricane.
    6 //
    7 // Hurricane is free software: you can redistribute it and/or modify
    8 // it under the terms of the GNU Lesser General Public License as
    9 // published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but
    13 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    14 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    15 // General Public License for more details.
    16 //
    17 // You should have received a copy of the Lesser GNU General Public
    18 // License along with Hurricane. If not, see
    19 // <http://www.gnu.org/licenses/>.
    20 //
    21 // +-----------------------------------------------------------------+
    22 // | H U R R I C A N E |
    23 // | V L S I B a c k e n d D a t a - B a s e |
    24 // | |
    25 // | Author : Jean-Paul CHAPUT |
    26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    27 // | =============================================================== |
    28 // | C++ Header : "./hurricane/Query.h" |
    29 // +-----------------------------------------------------------------+
    30 
    31 
    32 #pragma once
    33 #include <vector>
    34 #include <iomanip>
    35 #include "hurricane/Commons.h"
    36 #include "hurricane/Box.h"
    37 #include "hurricane/Transformation.h"
    38 #include "hurricane/Cell.h"
    39 #include "hurricane/Instance.h"
    40 
    41 
    42 namespace Hurricane {
    43 
    44  class BasicLayer;
    45  class Go;
    46  class QueryStack;
    47 
    48 
    49 // -------------------------------------------------------------------
    50 // Slave Class : "QueryState".
    51 
    52  class QueryState {
    53  private:
    54  inline QueryState ( Locator<Instance*>* locator );
    55  inline QueryState ( Locator<Instance*>* locator
    56  , const Box& area
    57  , const Transformation& transformation
    58  , const Path& path
    59  );
    60  QueryState ( const QueryState& );
    61  QueryState& operator= ( const QueryState& );
    62  inline ~QueryState ();
    63  private:
    64  Locator<Instance*>* _locator;
    65  Box _area;
    66  Transformation _transformation;
    67  Path _path;
    68 
    69  friend class QueryStack;
    70  };
    71 
    72 
    73 // QueryState Inline Functions.
    74 
    75 
    76  inline QueryState::QueryState ( Locator<Instance*>* locator )
    77  : _locator (locator)
    78  , _area ()
    79  , _transformation()
    80  , _path ()
    81  { }
    82 
    83 
    84  inline QueryState::QueryState ( Locator<Instance*>* locator
    85  , const Box& area
    86  , const Transformation& transformation
    87  , const Path& path
    88  )
    89  : _locator (locator)
    90  , _area (area)
    91  , _transformation(transformation)
    92  , _path (path)
    93  { }
    94 
    95 
    96  inline QueryState::~QueryState ()
    97  {
    98  if ( _locator ) delete _locator;
    99  }
    100 
    101 
    102 // -------------------------------------------------------------------
    103 // Class : "QueryStack".
    104 
    105 
    106  class QueryStack : public vector<QueryState*> {
    107  public:
    108  // Constructor & destructor.
    109  QueryStack ();
    110  ~QueryStack ();
    111  // Accessors.
    112  inline Cell* getTopCell ();
    113  inline const Box& getTopArea () const;
    114  inline const Transformation& getTopTransformation () const;
    115  inline unsigned int getStartLevel () const;
    116  inline unsigned int getStopLevel () const;
    117  inline Cell::Flags getStopCellFlags () const;
    118  inline Cell* getMasterCell ();
    119  inline Instance* getInstance ();
    120  inline const Box& getArea () const;
    121  inline DbU::Unit getThreshold () const;
    122  inline const Transformation& getTransformation () const;
    123  inline const Path& getPath () const;
    124  //inline const Tabulation& getTab () const;
    125  // Modifiers.
    126  inline void setTopCell ( Cell* cell );
    127  inline void setTopArea ( const Box& area );
    128  inline void setTopTransformation ( const Transformation& transformation );
    129  inline void setThreshold ( DbU::Unit threshold );
    130  inline void setStartLevel ( unsigned int level );
    131  inline void setStopLevel ( unsigned int level );
    132  inline void setStopCellFlags ( Cell::Flags );
    133  inline void init ();
    134  inline void updateTransformation ();
    135  inline bool levelDown ();
    136  inline void levelUp ();
    137  inline void levelProgress ();
    138  inline bool levelCompleted ();
    139  inline void progress ( bool init=false );
    140  inline size_t getInstanceCount () const;
    141 
    142  protected:
    143  // Internal: Attributes.
    144  // Tabulation _tab;
    145  Cell* _topCell;
    146  Box _topArea;
    147  DbU::Unit _threshold;
    148  Transformation _topTransformation;
    149  unsigned int _startLevel;
    150  unsigned int _stopLevel;
    151  Cell::Flags _stopCellFlags;
    152  size_t _instanceCount;
    153 
    154  private:
    155  // Internal: Constructors.
    156  QueryStack ( const QueryStack& );
    157  QueryStack& operator= ( const QueryStack& );
    158  };
    159 
    160 
    161 // QueryStack Inline Functions.
    162 
    163 
    164  inline Cell* QueryStack::getTopCell () { return _topCell; }
    165  inline const Box& QueryStack::getTopArea () const { return _topArea; }
    166  inline const Transformation& QueryStack::getTopTransformation () const { return _topTransformation; }
    167  inline DbU::Unit QueryStack::getThreshold () const { return _threshold; }
    168  inline unsigned int QueryStack::getStartLevel () const { return _startLevel; }
    169  inline unsigned int QueryStack::getStopLevel () const { return _stopLevel; }
    170  inline Cell::Flags QueryStack::getStopCellFlags () const { return _stopCellFlags; }
    171  inline const Box& QueryStack::getArea () const { return back()->_area; }
    172  inline const Transformation& QueryStack::getTransformation () const { return back()->_transformation; }
    173  inline const Path& QueryStack::getPath () const { return back()->_path; }
    174 //inline const Tabulation& QueryStack::getTab () const { return _tab; }
    175  inline size_t QueryStack::getInstanceCount () const { return _instanceCount; }
    176 
    177 
    178  inline Instance* QueryStack::getInstance ()
    179  {
    180  if ( levelCompleted() ) return NULL;
    181  return back()->_locator->getElement();
    182  }
    183 
    184 
    185  inline Cell* QueryStack::getMasterCell ()
    186  {
    187  if ( size() == 1 ) return _topCell;
    188  if ( !getInstance() ) return NULL;
    189  return getInstance()->getMasterCell();
    190  }
    191 
    192 
    193  inline void QueryStack::setTopCell ( Cell* cell ) { _topCell = cell; }
    194  inline void QueryStack::setTopArea ( const Box& area ) { _topArea = area; }
    195  inline void QueryStack::setTopTransformation ( const Transformation& transformation ) { _topTransformation = transformation; }
    196  inline void QueryStack::setThreshold ( DbU::Unit threshold ) { _threshold = threshold; }
    197  inline void QueryStack::setStartLevel ( unsigned int level ) { _startLevel = level; }
    198  inline void QueryStack::setStopLevel ( unsigned int level ) { _stopLevel = level; }
    199  inline void QueryStack::setStopCellFlags ( Cell::Flags flags ) { _stopCellFlags = flags; }
    200 
    201 
    202  inline void QueryStack::init ()
    203  {
    204  _instanceCount = 0;
    205  while (not empty()) levelUp();
    206 
    207  push_back( new QueryState(NULL,_topArea,_topTransformation,Path()) );
    208  //_tab++;
    209 
    210  progress( true );
    211  }
    212 
    213 
    214  inline void QueryStack::updateTransformation ()
    215  {
    216  QueryState* child = *(rbegin() );
    217  QueryState* parent = *(rbegin()+1);
    218  Instance* instance = child->_locator->getElement();
    219 
    220  //cerr << "Processing " << instance << endl;
    221 
    222  child->_area = parent->_area;
    223  child->_transformation = instance->getTransformation ();
    224 
    225  instance->getTransformation().getInvert().applyOn ( child->_area );
    226  parent->_transformation.applyOn ( child->_transformation );
    227 
    228  //child->_path = Path ( Path(parent->_path,instance->getCell()->getShuntedPath()) , instance );
    229  child->_path = Path ( parent->_path, instance );
    230  //cerr << "QueryStack::updateTransformation() " << child->_path << endl;
    231  }
    232 
    233 
    234  inline bool QueryStack::levelDown ()
    235  {
    236  if (size() > _stopLevel) return false;
    237  if (getMasterCell()->getFlags().isset(_stopCellFlags)) return false;
    238 
    239  //cerr << "QueryStack::levelDown(): t:" << DbU::getValueString(getThreshold()) << endl;
    240  Locator<Instance*>* locator =
    241  getMasterCell()->getInstancesUnder(getArea(),getThreshold()).getLocator();
    242 
    243  if ( locator->isValid() ) {
    244  push_back ( new QueryState ( locator ) );
    245 
    246  updateTransformation ();
    247  //_tab++;
    248 
    249  return true;
    250  } else
    251  delete locator;
    252 
    253  //cerr << " Aborting level down" << endl;
    254  return false;
    255  }
    256 
    257 
    258  inline void QueryStack::levelUp ()
    259  {
    260  delete back ();
    261  pop_back ();
    262  //_tab--;
    263  }
    264 
    265 
    266  inline bool QueryStack::levelCompleted ()
    267  {
    268  if ( !back()->_locator || !back()->_locator->isValid () ) return true;
    269  return false;
    270  }
    271 
    272 
    273  inline void QueryStack::levelProgress ()
    274  {
    275  if (levelCompleted()) return;
    276 
    277  back()->_locator->progress();
    278  if (not back()->_locator->isValid()) return;
    279 
    280  //cerr << " stack:" << std::setw(3) << _instanceCount << ":" << getPath() << endl;
    281  ++_instanceCount;
    282  updateTransformation();
    283  }
    284 
    285 
    286  inline void QueryStack::progress ( bool init )
    287  {
    288  if (not init) levelProgress ();
    289  else {
    290  if (not levelDown() and (size() > _startLevel))
    291  return;
    292  }
    293 
    294  while (not empty()) {
    295  if (levelCompleted()) {
    296  levelUp ();
    297  } else {
    298  if (levelDown()) continue;
    299  }
    300 
    301  if (size() > _startLevel) return;
    302  if (empty()) break;
    303  levelProgress();
    304  }
    305  }
    306 
    307 
    308 // -------------------------------------------------------------------
    309 // Class : "Query".
    310 
    311  class Query {
    312  public:
    313  typedef Hurricane::Mask<int> Mask;
    314  public:
    315  // Types.
    319  , DoMarkers = 8
    320  , DoRubbers = 16
    324  | DoComponents
    325  | DoMarkers
    326  | DoRubbers
    328  };
    329  public:
    330  // Constructors & Destructors.
    331  Query ();
    332  virtual ~Query ();
    333  // Accessors.
    334  inline unsigned int getStartLevel () const;
    335  inline unsigned int getStopLevel () const;
    336  inline Cell::Flags getStopCellFlags () const;
    337  inline size_t getDepth () const;
    338  inline const Transformation& getTransformation () const;
    339  inline const Box& getArea () const;
    340  inline DbU::Unit getThreshold () const;
    341  inline const BasicLayer* getBasicLayer () const;
    342  inline Cell* getMasterCell ();
    343  inline Instance* getInstance ();
    344  inline Path getPath () const;
    345  //inline const Tabulation& getTab () const;
    346  virtual bool hasGoCallback () const;
    347  virtual bool hasMarkerCallback () const;
    348  virtual bool hasRubberCallback () const;
    349  virtual bool hasExtensionGoCallback () const;
    350  virtual bool hasMasterCellCallback () const;
    351  virtual void goCallback ( Go* ) = 0;
    352  virtual void markerCallback ( Marker* );
    353  virtual void rubberCallback ( Rubber* );
    354  virtual void extensionGoCallback ( Go* ) = 0;
    355  virtual void masterCellCallback () = 0;
    356  // Modifiers.
    357  void setQuery ( Cell* cell
    358  , const Box& area
    359  , const Transformation& transformation
    360  , const BasicLayer* basicLayer
    361  , ExtensionSlice::Mask extensionMask
    362  , Mask filter
    363  , DbU::Unit threshold=0
    364  );
    365  inline void setCell ( Cell* cell );
    366  inline void setArea ( const Box& area );
    367  inline void setThreshold ( DbU::Unit threshold );
    368  inline void setTransformation ( const Transformation& transformation );
    369  virtual void setBasicLayer ( const BasicLayer* basicLayer );
    370  inline void setExtensionMask ( ExtensionSlice::Mask mode );
    371  inline void setFilter ( Mask mode );
    372  inline void setStartLevel ( unsigned int level );
    373  inline void setStopLevel ( unsigned int level );
    374  inline void setStopCellFlags ( Cell::Flags );
    375  virtual void doQuery ();
    376 
    377  protected:
    378  // Internal: Attributes.
    379  QueryStack _stack;
    380  const BasicLayer* _basicLayer;
    381  ExtensionSlice::Mask _extensionMask;
    382  Mask _filter;
    383  };
    384 
    385 
    386 // Query Inline Functions.
    387 
    388  inline void Query::setCell ( Cell* cell ) { _stack.setTopCell(cell); }
    389  inline void Query::setArea ( const Box& area ) { _stack.setTopArea(area); }
    390  inline void Query::setThreshold ( DbU::Unit threshold ) { _stack.setThreshold(threshold); }
    391  inline void Query::setTransformation ( const Transformation& transformation ) { _stack.setTopTransformation(transformation); }
    392  inline void Query::setFilter ( Mask filter ) { _filter = filter; }
    393  inline void Query::setExtensionMask ( ExtensionSlice::Mask mask ) { _extensionMask = mask; }
    394  inline void Query::setStartLevel ( unsigned int level ) { _stack.setStartLevel(level); }
    395  inline void Query::setStopLevel ( unsigned int level ) { _stack.setStopLevel(level); }
    396  inline void Query::setStopCellFlags ( Cell::Flags flags ) { _stack.setStopCellFlags(flags); }
    397 
    398  inline unsigned int Query::getStartLevel () const { return _stack.getStartLevel(); }
    399  inline unsigned int Query::getStopLevel () const { return _stack.getStopLevel(); }
    400  inline Cell::Flags Query::getStopCellFlags () const { return _stack.getStopCellFlags(); }
    401  inline size_t Query::getDepth () const { return _stack.size(); }
    402  inline const Box& Query::getArea () const { return _stack.getArea(); }
    403  inline const Transformation& Query::getTransformation () const { return _stack.getTransformation(); }
    404  inline Path Query::getPath () const { return _stack.getPath(); }
    405  inline const BasicLayer* Query::getBasicLayer () const { return _basicLayer; }
    406  inline Cell* Query::getMasterCell () { return _stack.getMasterCell(); }
    407  inline Instance* Query::getInstance () { return _stack.getInstance(); }
    408 //inline const Tabulation& Query::getTab () const { return _stack.getTab(); }
    409 
    410 
    411 } // Hurricane namespace.
    Path description (API)
    Definition: Path.h:35
    +
    Definition: Query.h:318
    +
    Go description (API)
    Definition: Go.h:34
    +
    unsigned int getStopLevel() const
    Definition: Query.h:399
    BasicLayer description (API)
    Definition: BasicLayer.h:44
    -
    void setStartLevel(unsigned int level)
    Definition: Query.h:378
    -
    const Box & getArea() const
    Definition: Query.h:384
    -
    Definition: Query.h:307
    -
    Instance * getInstance()
    Definition: Query.h:389
    -
    Query description (API)
    Definition: Query.h:297
    +
    void setStartLevel(unsigned int level)
    Definition: Query.h:394
    +
    const Box & getArea() const
    Definition: Query.h:402
    +
    Definition: Query.h:321
    +
    Instance * getInstance()
    Definition: Query.h:407
    +
    Query description (API)
    Definition: Query.h:311
    virtual void setBasicLayer(const BasicLayer *basicLayer)
    virtual ~Query()
    -
    std::int64_t Unit
    Definition: DbU.h:70
    -
    The model (API).
    Definition: Cell.h:66
    -
    Definition: Query.h:303
    +
    std::int64_t Unit
    Definition: DbU.h:67
    +
    The model (API).
    Definition: Cell.h:64
    +
    Definition: Query.h:317
    virtual void markerCallback(Marker *)
    -
    void setArea(const Box &area)
    Definition: Query.h:373
    +
    void setArea(const Box &area)
    Definition: Query.h:389
    virtual bool hasGoCallback() const
    void setQuery(Cell *cell, const Box &area, const Transformation &transformation, const BasicLayer *basicLayer, ExtensionSlice::Mask extensionMask, Mask filter, DbU::Unit threshold=0)
    -
    Definition: Query.h:305
    -
    unsigned int getStartLevel() const
    Definition: Query.h:381
    -
    void setStopLevel(unsigned int level)
    Definition: Query.h:379
    +
    Definition: Query.h:319
    +
    unsigned int getStartLevel() const
    Definition: Query.h:398
    +
    void setStopLevel(unsigned int level)
    Definition: Query.h:395
    Transformation description (API)
    Definition: Transformation.h:32
    -
    size_t getDepth() const
    Definition: Query.h:383
    +
    size_t getDepth() const
    Definition: Query.h:401
    virtual void rubberCallback(Rubber *)
    -
    void setFilter(Mask mode)
    Definition: Query.h:376
    -
    Definition: Query.h:306
    -
    Path getPath() const
    Definition: Query.h:386
    +
    void setFilter(Mask mode)
    Definition: Query.h:392
    +
    Definition: Query.h:320
    +
    Path getPath() const
    Definition: Query.h:404
    Box description (API)
    Definition: Box.h:31
    -
    Instance description (API)
    Definition: Instance.h:37
    -
    void setCell(Cell *cell)
    Definition: Query.h:372
    +
    Instance description (API)
    Definition: Instance.h:35
    +
    void setCell(Cell *cell)
    Definition: Query.h:388
    virtual bool hasMarkerCallback() const
    -
    const BasicLayer * getBasicLayer() const
    Definition: Query.h:387
    +
    const BasicLayer * getBasicLayer() const
    Definition: Query.h:405
    virtual bool hasExtensionGoCallback() const
    virtual void masterCellCallback()=0
    virtual void extensionGoCallback(Go *)=0
    -
    Cell * getMasterCell()
    Definition: Query.h:388
    +
    Cell * getMasterCell()
    Definition: Query.h:406
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    -
    void setTransformation(const Transformation &transformation)
    Definition: Query.h:375
    +
    void setTransformation(const Transformation &transformation)
    Definition: Query.h:391
    virtual void doQuery()
    virtual void goCallback(Go *)=0
    -
    Definition: Query.h:302
    -
    QueryFilter
    Definition: Query.h:302
    +
    Definition: Query.h:316
    +
    QueryFilter
    Definition: Query.h:316
    virtual bool hasRubberCallback() const
    -
    void setExtensionMask(ExtensionSlice::Mask mode)
    Definition: Query.h:377
    +
    void setExtensionMask(ExtensionSlice::Mask mode)
    Definition: Query.h:393
    virtual bool hasMasterCellCallback() const
    Rubber description (API)
    Definition: Rubber.h:36
    -
    Definition: Query.h:308
    -
    const Transformation & getTransformation() const
    Definition: Query.h:385
    +
    Definition: Query.h:322
    +
    const Transformation & getTransformation() const
    Definition: Query.h:403


    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/RegularLayer_8h_source.html b/hurricane/doc/hurricane/html/RegularLayer_8h_source.html index 56d9c0d3..13cbc580 100644 --- a/hurricane/doc/hurricane/html/RegularLayer_8h_source.html +++ b/hurricane/doc/hurricane/html/RegularLayer_8h_source.html @@ -47,8 +47,8 @@ $(function() {
    1 
    2 // -*- C++ -*-
    3 //
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify
    9 // it under the terms of the GNU Lesser General Public License as
    10 // published by the Free Software Foundation, either version 3 of the
    11 // License, or (at your option) any later version.
    12 //
    13 // Hurricane is distributed in the hope that it will be useful, but
    14 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    15 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    16 // General Public License for more details.
    17 //
    18 // You should have received a copy of the Lesser GNU General Public
    19 // License along with Hurricane. If not, see
    20 // <http://www.gnu.org/licenses/>.
    21 //
    22 // +-----------------------------------------------------------------+
    23 // | H U R R I C A N E |
    24 // | V L S I B a c k e n d D a t a - B a s e |
    25 // | |
    26 // | Author : Jean-Paul Chaput |
    27 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    28 // | =============================================================== |
    29 // | C++ Header : "./hurricane/RegularLayer.h" |
    30 // +-----------------------------------------------------------------+
    31 
    32 
    33 #ifndef HURRICANE_REGULAR_LAYER_H
    34 #define HURRICANE_REGULAR_LAYER_H
    35 
    36 #include "hurricane/Layer.h"
    37 #include "hurricane/RegularLayers.h"
    38 
    39 
    40 namespace Hurricane {
    41 
    42 // -------------------------------------------------------------------
    43 // Class : "Hurricane::RegularLayer".
    44 
    45  class RegularLayer : public Layer {
    46  public:
    47  typedef Layer Super;
    48 
    49  public:
    50  // Constructor.
    51  static RegularLayer* create ( Technology* technology
    52  , const Name& name
    53  , BasicLayer* layer
    54  );
    55  // Accessors.
    56  virtual BasicLayers getBasicLayers () const;
    57  inline BasicLayer* getBasicLayer () const;
    58  virtual const Layer* getBlockageLayer () const;
    59  virtual const Layer* getTop () const;
    60  virtual const Layer* getBottom () const;
    61  virtual const Layer* getOpposite ( const Layer* ) const;
    62  virtual DbU::Unit getEnclosure ( uint32_t flags=0 ) const;
    63  virtual DbU::Unit getExtentionCap () const;
    64  virtual DbU::Unit getExtentionWidth () const;
    65  virtual DbU::Unit getEnclosure ( const BasicLayer* layer, uint32_t flags=0 ) const;
    66  virtual DbU::Unit getExtentionCap ( const BasicLayer* layer ) const;
    67  virtual DbU::Unit getExtentionWidth ( const BasicLayer* layer ) const;
    68  // Updators
    69  void setBasicLayer ( BasicLayer* layer );
    70  virtual void setEnclosure ( const BasicLayer* layer, DbU::Unit enclosure, uint32_t flags=0 );
    71  virtual void setExtentionCap ( const BasicLayer* layer, DbU::Unit cap );
    72  virtual void setExtentionWidth ( const BasicLayer* layer, DbU::Unit width );
    73  // Hurricane Managment.
    74  virtual void _toJson ( JsonWriter* ) const;
    75  virtual void _onDbuChange ( float scale );
    76  virtual string _getTypeName () const;
    77  virtual string _getString () const;
    78  virtual Record* _getRecord () const;
    79 
    80  private:
    81  // Internal: Attributes
    82  BasicLayer* _basicLayer;
    83  DbU::Unit _enclosure;
    84  DbU::Unit _extentionCap;
    85  DbU::Unit _extentionWidth;
    86 
    87  protected:
    88  // Internal: Constructors & Destructors.
    89  RegularLayer ( Technology* technology
    90  , const Name& name
    91  );
    92  };
    93 
    94 
    95 // Inline Functions.
    96  inline BasicLayer* RegularLayer::getBasicLayer () const { return _basicLayer; }
    97 
    98 
    99 // -------------------------------------------------------------------
    100 // Class : "Hurricane::JsonRegularLayer".
    101 
    102  class JsonRegularLayer : public JsonLayer {
    103  public:
    104  static void initialize ();
    105  JsonRegularLayer ( unsigned long flags );
    106  ~JsonRegularLayer ();
    107  virtual string getTypeName () const;
    108  virtual JsonRegularLayer* clone ( unsigned long ) const;
    109  virtual void toData ( JsonStack& );
    110  };
    111 
    112 
    113 } // Hurricane namespace.
    114 
    115 INSPECTOR_P_SUPPORT(Hurricane::RegularLayer);
    116 
    117 #endif // HURRICANE_REGULAR_LAYER_H
    RegularLayer description (API)
    Definition: RegularLayer.h:45
    BasicLayer description (API)
    Definition: BasicLayer.h:44
    Name description (API)
    Definition: Name.h:35
    -
    std::int64_t Unit
    Definition: DbU.h:70
    -
    DataBase object root class (API).
    Definition: DBo.h:47
    +
    std::int64_t Unit
    Definition: DbU.h:67
    +
    DataBase object root class (API).
    Definition: DBo.h:45
    BasicLayer * getBasicLayer() const
    Definition: RegularLayer.h:96
    static RegularLayer * create(Technology *technology, const Name &name, BasicLayer *layer)
    JSON Parser Stack.
    Definition: JsonObject.h:249
    @@ -60,7 +60,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Relation_8h_source.html b/hurricane/doc/hurricane/html/Relation_8h_source.html index 5a105440..79b1fb85 100644 --- a/hurricane/doc/hurricane/html/Relation_8h_source.html +++ b/hurricane/doc/hurricane/html/Relation_8h_source.html @@ -47,8 +47,8 @@ $(function() {
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Relation.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_RELATION_H
    21 #define HURRICANE_RELATION_H
    22 
    23 #include "hurricane/Property.h"
    24 
    25 namespace Hurricane {
    26 
    27 
    28 
    29 // ****************************************************************************************************
    30 // Relation declaration
    31 // ****************************************************************************************************
    32 
    33 class Relation : public SharedProperty {
    34 // ***********************************
    35 
    36 // Types
    37 // *****
    38 
    39  public: typedef SharedProperty Inherit;
    40 
    41 // Attributes
    42 // **********
    43 
    44  private: DBo* _masterOwner;
    45 
    46 // Constructors
    47 // ************
    48 
    49  protected: Relation(DBo* masterOwner);
    50 
    51 // Accessors
    52 // *********
    53 
    54  public: DBo* getMasterOwner() const {return _masterOwner;};
    55  public: DBos getSlaveOwners() const;
    56 
    57 // Managers
    58 // ********
    59 
    60  public: virtual void onReleasedBy(DBo* owner);
    61 
    62 // Others
    63 // ******
    64 
    65  public: void _setMasterOwner(DBo* owner) {_masterOwner=owner; }
    66  protected: virtual void _postCreate();
    67 
    68  public: virtual string _getTypeName() const {return _TName("Relation");};
    69  public: virtual string _getString() const;
    70  public: virtual Record* _getRecord() const;
    71 
    72 };
    73 
    74 
    75 
    76 // ****************************************************************************************************
    77 // StandardRelation declaration
    78 // ****************************************************************************************************
    79 
    80 class StandardRelation : public Relation {
    81 // *************************************
    82 
    83 // Types
    84 // *****
    85 
    86  public: typedef Relation Inherit;
    87 
    88 // Attributes
    89 // **********
    90 
    91  private: Name _name;
    92 
    93 // Constructors
    94 // ************
    95 
    96  protected: StandardRelation(DBo* masterOwner, const Name& name);
    97 
    98  public: static StandardRelation* create(DBo* masterOwner, const Name& name);
    99 
    100 // Accessors
    101 // *********
    102 
    103  public: virtual Name getName() const {return _name;};
    104 
    105 // Others
    106 // ******
    107 
    108  public: virtual string _getTypeName() const {return _TName("StandardRelation");};
    109  public: virtual string _getString() const;
    110  public: virtual Record* _getRecord() const;
    111 
    112 };
    113 
    114 
    115 } // End of Hurricane namespace.
    116 
    117 
    118 #endif // HURRICANE_RELATION
    119 
    120 
    121 // ****************************************************************************************************
    122 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    123 // ****************************************************************************************************
    Relation description (API)
    Definition: Relation.h:33
    StandardRelation description (API)
    Definition: Relation.h:80
    Name description (API)
    Definition: Name.h:35
    -
    SharedProperty description (API)
    Definition: Property.h:388
    -
    DataBase object root class (API).
    Definition: DBo.h:47
    +
    SharedProperty description (API)
    Definition: Property.h:386
    +
    DataBase object root class (API).
    Definition: DBo.h:45
    Generic Collection auto-pointer.
    Definition: Collection.h:28
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    @@ -56,7 +56,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/RoutingPad_8h_source.html b/hurricane/doc/hurricane/html/RoutingPad_8h_source.html index 8f0a0d71..c1bd1313 100644 --- a/hurricane/doc/hurricane/html/RoutingPad_8h_source.html +++ b/hurricane/doc/hurricane/html/RoutingPad_8h_source.html @@ -50,13 +50,13 @@ $(function() {
    BasicLayer description (API)
    Definition: BasicLayer.h:44
    virtual DbU::Unit getX() const
    Definition: RoutingPad.h:55
    -
    Pin description (API)
    Definition: Pin.h:34
    +
    Pin description (API)
    Definition: Pin.h:41
    DbU::Unit getSourceY() const
    virtual DbU::Unit getY() const
    Component description (API)
    Definition: Component.h:42
    Definition: RoutingPad.h:53
    Flags
    Definition: RoutingPad.h:51
    -
    std::int64_t Unit
    Definition: DbU.h:70
    +
    std::int64_t Unit
    Definition: DbU.h:67
    Point description (API)
    Definition: Point.h:32
    virtual const Layer * getLayer() const
    bool isEmpty() const
    @@ -90,7 +90,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Rubber_8h_source.html b/hurricane/doc/hurricane/html/Rubber_8h_source.html index f146bcc1..0228cf7f 100644 --- a/hurricane/doc/hurricane/html/Rubber_8h_source.html +++ b/hurricane/doc/hurricane/html/Rubber_8h_source.html @@ -44,16 +44,16 @@ $(function() {
    Rubber.h
    -
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Rubber.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_RUBBER_H
    21 #define HURRICANE_RUBBER_H
    22 
    23 #include "hurricane/Go.h"
    24 #include "hurricane/Hooks.h"
    25 #include "hurricane/Rubbers.h"
    26 
    27 namespace Hurricane {
    28 
    29 class Net;
    30 
    31 
    32 // ****************************************************************************************************
    33 // Rubber declaration
    34 // ****************************************************************************************************
    35 
    36 class Rubber : public Go {
    37 // *********************
    38 
    39 // Types
    40 // *****
    41 
    42  public: typedef Go Inherit;
    43 
    44 
    45 // Attributes
    46 // **********
    47 
    48  private: Net* _net;
    49  private: Hook* _hook;
    50  private: unsigned _count;
    51  private: Box _boundingBox;
    52  private: Rubber* _nextOfNetRubberSet;
    53 
    54 // Constructors
    55 // ************
    56 
    57  protected: Rubber(Net* net, Hook* hook);
    58 
    59 // Destructor
    60 // **********
    61 
    62  public: virtual void destroy();
    63 
    64 // Accessors
    65 // *********
    66 
    67  public: virtual Cell* getCell() const;
    68  public: Net* getNet() const {return _net;};
    69  public: Hook* getHook() const {return _hook;};
    70  public: unsigned getCount() const {return _count;};
    71  public: Point getCenter() const;
    72  public: Point getBarycenter() const;
    73  public: virtual Box getBoundingBox() const;
    74  public: Hooks getHooks() const;
    75 
    76 // Updators
    77 // ********
    78 
    79  public: virtual void materialize();
    80  public: virtual void unmaterialize();
    81  public: virtual void translate(const DbU::Unit& dx, const DbU::Unit& dy);
    82  public: virtual void invalidate(bool propagateFlag = true);
    83 
    84 // Others
    85 // ******
    86 
    87  public: static Rubber* _create(Hook* hook);
    88  protected: virtual void _postCreate();
    89 
    90  public: void _destroy();
    91  protected: virtual void _preDestroy();
    92 
    93  public: virtual string _getTypeName() const {return _TName("Rubber");};
    94  public: virtual string _getString() const;
    95  public: virtual Record* _getRecord() const;
    96  public: Rubber* _getNextOfNetRubberSet() const {return _nextOfNetRubberSet;};
    97 
    98  public: void _setNet(Net* net);
    99  public: void _setHook(Hook* hook);
    100  public: void _setNextOfNetRubberSet(Rubber* rubber) {_nextOfNetRubberSet = rubber;};
    101 
    102  public: void _capture();
    103  public: void _release();
    104 
    105 };
    106 
    107 
    108 } // End of Hurricane namespace.
    109 
    110 
    111 INSPECTOR_P_SUPPORT(Hurricane::Rubber);
    112 
    113 
    114 #endif // HURRICANE_RUBBER_H
    115 
    116 
    117 // ****************************************************************************************************
    118 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    119 // ****************************************************************************************************
    Go description (API)
    Definition: Go.h:36
    +
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Rubber.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_RUBBER_H
    21 #define HURRICANE_RUBBER_H
    22 
    23 #include "hurricane/Go.h"
    24 #include "hurricane/Hooks.h"
    25 #include "hurricane/Rubbers.h"
    26 
    27 namespace Hurricane {
    28 
    29 class Net;
    30 
    31 
    32 // ****************************************************************************************************
    33 // Rubber declaration
    34 // ****************************************************************************************************
    35 
    36 class Rubber : public Go {
    37 // *********************
    38 
    39 // Types
    40 // *****
    41 
    42  public: typedef Go Inherit;
    43 
    44 
    45 // Attributes
    46 // **********
    47 
    48  private: Net* _net;
    49  private: Hook* _hook;
    50  private: unsigned _count;
    51  private: Box _boundingBox;
    52  private: Rubber* _nextOfNetRubberSet;
    53 
    54 // Constructors
    55 // ************
    56 
    57  protected: Rubber(Net* net, Hook* hook);
    58 
    59 // Destructor
    60 // **********
    61 
    62  public: virtual void destroy();
    63 
    64 // Accessors
    65 // *********
    66 
    67  public: virtual Cell* getCell() const;
    68  public: Net* getNet() const {return _net;};
    69  public: Hook* getHook() const {return _hook;};
    70  public: unsigned getCount() const {return _count;};
    71  public: Point getCenter() const;
    72  public: Point getBarycenter() const;
    73  public: virtual Box getBoundingBox() const;
    74  public: Hooks getHooks() const;
    75 
    76 // Updators
    77 // ********
    78 
    79  public: virtual void materialize();
    80  public: virtual void unmaterialize();
    81  public: virtual void translate(const DbU::Unit& dx, const DbU::Unit& dy);
    82  public: virtual void invalidate(bool propagateFlag = true);
    83 
    84 // Others
    85 // ******
    86 
    87  public: static Rubber* _create(Hook* hook);
    88  protected: virtual void _postCreate();
    89 
    90  public: void _destroy();
    91  protected: virtual void _preDestroy();
    92 
    93  public: virtual string _getTypeName() const {return _TName("Rubber");};
    94  public: virtual string _getString() const;
    95  public: virtual Record* _getRecord() const;
    96  public: Rubber* _getNextOfNetRubberSet() const {return _nextOfNetRubberSet;};
    97 
    98  public: void _setNet(Net* net);
    99  public: void _setHook(Hook* hook);
    100  public: void _setNextOfNetRubberSet(Rubber* rubber) {_nextOfNetRubberSet = rubber;};
    101 
    102  public: void _capture();
    103  public: void _release();
    104 
    105 };
    106 
    107 
    108 } // End of Hurricane namespace.
    109 
    110 
    111 INSPECTOR_P_SUPPORT(Hurricane::Rubber);
    112 
    113 
    114 #endif // HURRICANE_RUBBER_H
    115 
    116 
    117 // ****************************************************************************************************
    118 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    119 // ****************************************************************************************************
    Go description (API)
    Definition: Go.h:34
    Hooks getHooks() const
    Hook * getHook() const
    Definition: Rubber.h:69
    -
    std::int64_t Unit
    Definition: DbU.h:70
    +
    std::int64_t Unit
    Definition: DbU.h:67
    Net * getNet() const
    Definition: Rubber.h:68
    Point getCenter() const
    -
    The model (API).
    Definition: Cell.h:66
    +
    The model (API).
    Definition: Cell.h:64
    Point description (API)
    Definition: Point.h:32
    Generic Collection auto-pointer.
    Definition: Collection.h:28
    -
    Hook description (API)
    Definition: Hook.h:36
    +
    Hook description (API)
    Definition: Hook.h:34
    Box description (API)
    Definition: Box.h:31
    unsigned getCount() const
    Definition: Rubber.h:70
    Go Inherit
    Definition: Rubber.h:42
    @@ -65,7 +65,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Rubbers_8h_source.html b/hurricane/doc/hurricane/html/Rubbers_8h_source.html index c7f72fc9..8be6df72 100644 --- a/hurricane/doc/hurricane/html/Rubbers_8h_source.html +++ b/hurricane/doc/hurricane/html/Rubbers_8h_source.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Segment_8h_source.html b/hurricane/doc/hurricane/html/Segment_8h_source.html index 8adb91d3..42153dfb 100644 --- a/hurricane/doc/hurricane/html/Segment_8h_source.html +++ b/hurricane/doc/hurricane/html/Segment_8h_source.html @@ -55,13 +55,13 @@ $(function() {
    void setLayer(const Layer *layer)
    Hook * getSourceHook()
    Definition: Segment.h:102
    Component * getSource() const
    -
    std::int64_t Unit
    Definition: DbU.h:70
    +
    std::int64_t Unit
    Definition: DbU.h:67
    Definition: Segment.h:59
    Point description (API)
    Definition: Point.h:32
    Generic Collection auto-pointer.
    Definition: Collection.h:28
    virtual DbU::Unit getSourceY() const =0
    -
    Hook description (API)
    Definition: Hook.h:36
    +
    Hook description (API)
    Definition: Hook.h:34
    Layer description (API)
    Definition: Layer.h:52
    Segment description (API)
    Definition: Segment.h:33
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    @@ -80,7 +80,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Segments_8h_source.html b/hurricane/doc/hurricane/html/Segments_8h_source.html index 298b7459..95c95ad6 100644 --- a/hurricane/doc/hurricane/html/Segments_8h_source.html +++ b/hurricane/doc/hurricane/html/Segments_8h_source.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/SetCollection_8h_source.html b/hurricane/doc/hurricane/html/SetCollection_8h_source.html index b1bbcdf6..2159d242 100644 --- a/hurricane/doc/hurricane/html/SetCollection_8h_source.html +++ b/hurricane/doc/hurricane/html/SetCollection_8h_source.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Slice_8h_source.html b/hurricane/doc/hurricane/html/Slice_8h_source.html index 9e2ec095..12f670d4 100644 --- a/hurricane/doc/hurricane/html/Slice_8h_source.html +++ b/hurricane/doc/hurricane/html/Slice_8h_source.html @@ -46,8 +46,8 @@ $(function() {
    1 // ****************************************************************************************************
    2 // File: ./hurricane/Slice.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #pragma once
    21 #include "hurricane/QuadTree.h"
    22 #include "hurricane/Components.h"
    23 #include "hurricane/Markers.h"
    24 #include "hurricane/Transformation.h"
    25 
    26 namespace Hurricane {
    27 
    28 class Cell;
    29 class Layer;
    30 class BasicLayer;
    31 
    32 
    33 
    34 // ****************************************************************************************************
    35 // Slice declaration
    36 // ****************************************************************************************************
    37 
    38 class Slice {
    39 // ********
    40 
    41 // Attributes
    42 // **********
    43 
    44  private: Cell* _cell;
    45  private: const Layer* _layer;
    46  private: QuadTree _quadTree;
    47  private: Slice* _nextOfCellSliceMap;
    48 
    49 // Constructors
    50 // ************
    51 
    52  protected: Slice(Cell* cell, const Layer* layer);
    53 
    54  private: Slice(const Slice& slice); // not implemented to forbid copy construction
    55 
    56 // Destructor
    57 // **********
    58 
    59  protected: ~Slice();
    60 
    61 // Operators
    62 // *********
    63 
    64  private: Slice& operator=(const Slice& slice); // not implemented to forbid assignment
    65 
    66 // Accessors
    67 // *********
    68 
    69  public: Cell* getCell() const {return _cell;};
    70  public: const Layer* getLayer() const {return _layer;};
    71  public: const Box& getBoundingBox() const {return _quadTree.getBoundingBox();};
    72  public: Gos getGos() const {return _quadTree.getGos();};
    73  public: Gos getGosUnder(const Box& area, DbU::Unit threshold=0) const {return _quadTree.getGosUnder(area,threshold);};
    74  public: Components getComponents() const;
    75  public: Components getComponentsUnder(const Box& area, DbU::Unit threshold=0) const;
    76  public: Markers getMarkers() const;
    77  public: Markers getMarkersUnder(const Box& area) const;
    78 
    79 // Predicates
    80 // **********
    81 
    82  public: bool isEmpty() const {return _quadTree.isEmpty();};
    83 
    84 // Others
    85 // ******
    86 
    87  public: static Slice* _create(Cell* cell, const Layer* layer);
    88 
    89  public: void _destroy();
    90 
    91  public: string _getTypeName() const { return _TName("Slice"); };
    92  public: string _getString() const;
    93  public: Record* _getRecord() const;
    94  public: QuadTree* _getQuadTree() {return &_quadTree;};
    95  public: Slice* _getNextOfCellSliceMap() const {return _nextOfCellSliceMap;};
    96 
    97  public: void _setNextOfCellSliceMap(Slice* slice) {_nextOfCellSliceMap = slice;};
    98 
    99 };
    100 
    101 
    102 } // End of Hurricane namespace.
    103 
    104 
    105 INSPECTOR_P_SUPPORT(Hurricane::Slice);
    106 
    107 
    108 // ****************************************************************************************************
    109 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    110 // ****************************************************************************************************
    Components getComponentsUnder(const Box &area, DbU::Unit threshold=0) const
    const Box & getBoundingBox() const
    Definition: Slice.h:71
    -
    std::int64_t Unit
    Definition: DbU.h:70
    -
    The model (API).
    Definition: Cell.h:66
    +
    std::int64_t Unit
    Definition: DbU.h:67
    +
    The model (API).
    Definition: Cell.h:64
    bool isEmpty() const
    Definition: QuadTree.h:94
    Gos getGos() const
    Definition: Slice.h:72
    Gos getGos() const
    @@ -68,7 +68,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Slices_8h_source.html b/hurricane/doc/hurricane/html/Slices_8h_source.html index 6394ade7..99eff06a 100644 --- a/hurricane/doc/hurricane/html/Slices_8h_source.html +++ b/hurricane/doc/hurricane/html/Slices_8h_source.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Tabulation_8h_source.html b/hurricane/doc/hurricane/html/Tabulation_8h_source.html index 47b393fb..12be7474 100644 --- a/hurricane/doc/hurricane/html/Tabulation_8h_source.html +++ b/hurricane/doc/hurricane/html/Tabulation_8h_source.html @@ -56,7 +56,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Technology_8h_source.html b/hurricane/doc/hurricane/html/Technology_8h_source.html index f51c017f..66d8a9d3 100644 --- a/hurricane/doc/hurricane/html/Technology_8h_source.html +++ b/hurricane/doc/hurricane/html/Technology_8h_source.html @@ -56,7 +56,7 @@ $(function() {
    Name description (API)
    Definition: Name.h:35
    PhysicalRule * getUnitRule(std::string ruleName) const
    ViaLayers getViaLayers() const
    -
    DataBase object root class (API).
    Definition: DBo.h:47
    +
    DataBase object root class (API).
    Definition: DBo.h:45
    bool isMetal(const Layer *) const
    Definition: Technology.h:200
    Hurricane::Mask< unsigned long long > Mask
    Definition: Layer.h:65
    Layers getLayers() const
    Definition: Technology.h:204
    @@ -65,7 +65,7 @@ $(function() {
    The whole DataBase (API).
    Definition: DataBase.h:40
    Layer * getCutBelow(const Layer *, bool useSymbolic=true) const
    Layer description (API)
    Definition: Layer.h:52
    -
    const Mask & getMask() const
    Definition: Layer.h:155
    +
    const Mask & getMask() const
    Definition: Layer.h:158
    DataBase * getDataBase() const
    Definition: Technology.h:201
    Layer * getNthMetal(int) const
    Define a rule for the technology (API).
    Definition: PhysicalRule.h:65
    @@ -83,7 +83,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Transformation_8h_source.html b/hurricane/doc/hurricane/html/Transformation_8h_source.html index 669c5b20..e9a75668 100644 --- a/hurricane/doc/hurricane/html/Transformation_8h_source.html +++ b/hurricane/doc/hurricane/html/Transformation_8h_source.html @@ -51,7 +51,7 @@ $(function() {
    const DbU::Unit & getTy() const
    Definition: Transformation.h:89
    DbU::Unit getY(const DbU::Unit &x, const DbU::Unit &y) const
    void applyOn(DbU::Unit &x, DbU::Unit &y) const
    -
    std::int64_t Unit
    Definition: DbU.h:70
    +
    std::int64_t Unit
    Definition: DbU.h:67
    Transformation getTransformation(const Transformation &transformation) const
    Point description (API)
    Definition: Point.h:32
    const Orientation & getOrientation() const
    Definition: Transformation.h:91
    @@ -73,7 +73,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/TransistorLayer_8h_source.html b/hurricane/doc/hurricane/html/TransistorLayer_8h_source.html index 8c682bd5..78c63a1a 100644 --- a/hurricane/doc/hurricane/html/TransistorLayer_8h_source.html +++ b/hurricane/doc/hurricane/html/TransistorLayer_8h_source.html @@ -46,8 +46,8 @@ $(function() {
    1 // -*- C++ -*-
    2 //
    3 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    4 //
    5 // This file is part of Hurricane.
    6 //
    7 // Hurricane is free software: you can redistribute it and/or modify
    8 // it under the terms of the GNU Lesser General Public License as
    9 // published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but
    13 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    14 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    15 // General Public License for more details.
    16 //
    17 // You should have received a copy of the Lesser GNU General Public
    18 // License along with Hurricane. If not, see
    19 // <http://www.gnu.org/licenses/>.
    20 //
    21 // +-----------------------------------------------------------------+
    22 // | H U R R I C A N E |
    23 // | V L S I B a c k e n d D a t a - B a s e |
    24 // | |
    25 // | Author : Jean-Paul Chaput |
    26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    27 // | =============================================================== |
    28 // | C++ Header : "./hurricane/TransistorLayer.h" |
    29 // +-----------------------------------------------------------------+
    30 
    31 
    32 #ifndef HURRICANE_TRANSISTOR_LAYER_H
    33 #define HURRICANE_TRANSISTOR_LAYER_H
    34 
    35 #include <vector>
    36 
    37 #include "hurricane/Layer.h"
    38 #include "hurricane/TransistorLayers.h"
    39 
    40 
    41 namespace Hurricane {
    42 
    43 // -------------------------------------------------------------------
    44 // Class : "Hurricane::TransistorLayer".
    45 
    46  class TransistorLayer : public Layer {
    47  public:
    48  typedef Layer Super;
    49 
    50  public:
    51  // Constructor.
    52  static TransistorLayer* create ( Technology* technology
    53  , const Name& name
    54  , BasicLayer* gateLayer
    55  , BasicLayer* activeLayer
    56  , BasicLayer* diffusionLayer
    57  , BasicLayer* wellLayer
    58  );
    59  // Accessors.
    60  virtual BasicLayers getBasicLayers () const;
    61  virtual DbU::Unit getExtentionCap () const;
    62  virtual DbU::Unit getExtentionWidth () const;
    63  virtual DbU::Unit getExtentionCap ( const BasicLayer* layer ) const;
    64  virtual DbU::Unit getExtentionWidth ( const BasicLayer* layer ) const;
    65  // Updators.
    66  virtual void setExtentionCap ( const BasicLayer* layer, DbU::Unit cap );
    67  virtual void setExtentionWidth ( const BasicLayer* layer, DbU::Unit width );
    68  // Hurricane Managment.
    69  virtual void _toJson ( JsonWriter* ) const;
    70  virtual void _onDbuChange ( float scale );
    71  virtual string _getTypeName () const;
    72  virtual string _getString () const;
    73  virtual Record* _getRecord () const;
    74 
    75  private:
    76  // Internal: Attributes
    77  vector<BasicLayer*> _basicLayers;
    78  vector<DbU::Unit> _extentionCaps;
    79  vector<DbU::Unit> _extentionWidths;
    80  DbU::Unit _maximalExtentionCap;
    81  DbU::Unit _maximalExtentionWidth;
    82 
    83  protected:
    84  // Internal: Constructors & Destructors.
    85  TransistorLayer ( Technology* technology
    86  , const Name& name
    87  , BasicLayer* gateLayer
    88  , BasicLayer* activeLayer
    89  , BasicLayer* diffusionLayer
    90  , BasicLayer* wellLayer
    91  );
    92  };
    93 
    94 
    95 // -------------------------------------------------------------------
    96 // Class : "Hurricane::JsonTransistorLayer".
    97 
    98  class JsonTransistorLayer : public JsonLayer {
    99  public:
    100  static void initialize ();
    101  JsonTransistorLayer ( unsigned long flags );
    102  ~JsonTransistorLayer ();
    103  virtual string getTypeName () const;
    104  virtual JsonTransistorLayer* clone ( unsigned long ) const;
    105  virtual void toData ( JsonStack& );
    106  };
    107 
    108 
    109 } // End of Hurricane namespace.
    110 
    111 
    112 INSPECTOR_P_SUPPORT(Hurricane::TransistorLayer);
    113 
    114 
    115 # endif
    BasicLayer description (API)
    Definition: BasicLayer.h:44
    Name description (API)
    Definition: Name.h:35
    -
    std::int64_t Unit
    Definition: DbU.h:70
    -
    DataBase object root class (API).
    Definition: DBo.h:47
    +
    std::int64_t Unit
    Definition: DbU.h:67
    +
    DataBase object root class (API).
    Definition: DBo.h:45
    TransistorLayer description (API)
    Definition: TransistorLayer.h:46
    JSON Parser Stack.
    Definition: JsonObject.h:249
    static TransistorLayer * create(Technology *technology, const Name &name, BasicLayer *gateLayer, BasicLayer *activeLayer, BasicLayer *diffusionLayer, BasicLayer *wellLayer)
    @@ -59,7 +59,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/UpdateSession_8h_source.html b/hurricane/doc/hurricane/html/UpdateSession_8h_source.html index 765d0517..f555390c 100644 --- a/hurricane/doc/hurricane/html/UpdateSession_8h_source.html +++ b/hurricane/doc/hurricane/html/UpdateSession_8h_source.html @@ -45,8 +45,8 @@ $(function() {
    1 // ****************************************************************************************************
    2 // File: ./hurricane/UpdateSession.h
    3 // Authors: R. Escassut
    4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    5 //
    6 // This file is part of Hurricane.
    7 //
    8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
    9 // Lesser General Public License as published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    14 // General Public License for more details.
    15 //
    16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
    17 // not, see <http://www.gnu.org/licenses/>.
    18 // ****************************************************************************************************
    19 
    20 #ifndef HURRICANE_UPDATE_SESSION
    21 #define HURRICANE_UPDATE_SESSION
    22 
    23 #include "hurricane/Property.h"
    24 
    25 namespace Hurricane {
    26 
    27 class Go;
    28 
    29 
    30 
    31 // ****************************************************************************************************
    32 // UpdateSession declaration
    33 // ****************************************************************************************************
    34 
    35 class UpdateSession : public SharedProperty {
    36 // ****************************************
    37 
    38 // Types
    39 // *****
    40 
    41  public: typedef SharedProperty Inherit;
    42 
    43 // Constructors
    44 // ************
    45 
    46  protected: UpdateSession();
    47 
    48  public: virtual void destroy();
    49 
    50 // Accessors
    51 // *********
    52 
    53  public: static const Name& getPropertyName();
    54  public: virtual Name getName() const {return getPropertyName();};
    55 
    56 // Managers
    57 // ********
    58 
    59  public: virtual void onCapturedBy(DBo* owner);
    60  public: virtual void onNotOwned();
    61 
    62 // Ohers
    63 // *****
    64 
    65  public: static UpdateSession* _create();
    66  protected: virtual void _postCreate();
    67 
    68  public: void _destroy();
    69  protected: virtual void _preDestroy();
    70 
    71  public: virtual string _getTypeName() const {return _TName("UpdateSession");};
    72  public: virtual string _getString() const;
    73  public: virtual Record* _getRecord() const;
    74 
    75  public: static void open();
    76  public: static void close();
    77  public: static void reset();
    78  public: static size_t getStackSize();
    79 
    80 
    81 };
    82 
    83 
    84 // ****************************************************************************************************
    85 // Generic functions
    86 // ****************************************************************************************************
    87 
    88 //void openUpdateSession();
    89 //
    90 //void closeUpdateSession();
    91 //
    92 
    93 
    94 } // End of Hurricane namespace.
    95 
    96 
    97 #endif // HURRICANE_UPDATE_SESSION
    98 
    99 
    100 // ****************************************************************************************************
    101 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    102 // ****************************************************************************************************
    Name description (API)
    Definition: Name.h:35
    -
    SharedProperty description (API)
    Definition: Property.h:388
    -
    DataBase object root class (API).
    Definition: DBo.h:47
    +
    SharedProperty description (API)
    Definition: Property.h:386
    +
    DataBase object root class (API).
    Definition: DBo.h:45
    UpdateSession description (API)
    Definition: UpdateSession.h:35
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/VectorCollection_8h_source.html b/hurricane/doc/hurricane/html/VectorCollection_8h_source.html index 502c0000..b4346fe0 100644 --- a/hurricane/doc/hurricane/html/VectorCollection_8h_source.html +++ b/hurricane/doc/hurricane/html/VectorCollection_8h_source.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Vertical_8h_source.html b/hurricane/doc/hurricane/html/Vertical_8h_source.html index 3ff235e5..9a02a759 100644 --- a/hurricane/doc/hurricane/html/Vertical_8h_source.html +++ b/hurricane/doc/hurricane/html/Vertical_8h_source.html @@ -49,7 +49,7 @@ $(function() {
    const DbU::Unit & getDySource() const
    Definition: Vertical.h:92
    Support for JSON export.
    Definition: JsonObject.h:83
    Segment Inherit
    Definition: Vertical.h:42
    -
    std::int64_t Unit
    Definition: DbU.h:70
    +
    std::int64_t Unit
    Definition: DbU.h:67
    Point description (API)
    Definition: Point.h:32
    Vertical description (API)
    Definition: Vertical.h:36
    Box description (API)
    Definition: Box.h:31
    @@ -65,7 +65,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Verticals_8h_source.html b/hurricane/doc/hurricane/html/Verticals_8h_source.html index b81878ed..4e7b5516 100644 --- a/hurricane/doc/hurricane/html/Verticals_8h_source.html +++ b/hurricane/doc/hurricane/html/Verticals_8h_source.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/ViaLayer_8h_source.html b/hurricane/doc/hurricane/html/ViaLayer_8h_source.html index e6036780..df371e51 100644 --- a/hurricane/doc/hurricane/html/ViaLayer_8h_source.html +++ b/hurricane/doc/hurricane/html/ViaLayer_8h_source.html @@ -46,8 +46,8 @@ $(function() {
    1 // -*- C++ -*-
    2 //
    3 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
    4 //
    5 // This file is part of Hurricane.
    6 //
    7 // Hurricane is free software: you can redistribute it and/or modify
    8 // it under the terms of the GNU Lesser General Public License as
    9 // published by the Free Software Foundation, either version 3 of the
    10 // License, or (at your option) any later version.
    11 //
    12 // Hurricane is distributed in the hope that it will be useful, but
    13 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
    14 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
    15 // General Public License for more details.
    16 //
    17 // You should have received a copy of the Lesser GNU General Public
    18 // License along with Hurricane. If not, see
    19 // <http://www.gnu.org/licenses/>.
    20 //
    21 // +-----------------------------------------------------------------+
    22 // | H U R R I C A N E |
    23 // | V L S I B a c k e n d D a t a - B a s e |
    24 // | |
    25 // | Author : Jean-Paul Chaput |
    26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    27 // | =============================================================== |
    28 // | C++ Header : "./hurricane/ViaLayer.h" |
    29 // +-----------------------------------------------------------------+
    30 
    31 
    32 #ifndef HURRICANE_VIA_LAYER_H
    33 #define HURRICANE_VIA_LAYER_H
    34 
    35 #include <vector>
    36 
    37 #include "hurricane/Layer.h"
    38 #include "hurricane/ViaLayers.h"
    39 
    40 
    41 namespace Hurricane {
    42 
    43 // -------------------------------------------------------------------
    44 // Class : "Hurricane::ViaLayer".
    45 
    46  class ViaLayer : public Layer {
    47  public:
    48  typedef Layer Super;
    49 
    50  public:
    51  // Constructor.
    52  static ViaLayer* create ( Technology* technology
    53  , const Name& name
    54  , BasicLayer* bottomLayer
    55  , BasicLayer* cutLayer
    56  , BasicLayer* topLayer
    57  );
    58  // Accessors.
    59  virtual BasicLayers getBasicLayers () const;
    60  virtual const Layer* getCut () const;
    61  virtual const Layer* getTop () const;
    62  virtual const Layer* getBottom () const;
    63  virtual const Layer* getOpposite ( const Layer* ) const;
    64  virtual DbU::Unit getEnclosure ( uint32_t flags ) const;
    65  virtual DbU::Unit getEnclosure ( const BasicLayer* layer, uint32_t flags ) const;
    66  virtual DbU::Unit getTopEnclosure ( uint32_t flags ) const;
    67  virtual DbU::Unit getBottomEnclosure ( uint32_t flags ) const;
    68  // Updators.
    69  virtual void setEnclosure ( const BasicLayer* layer, DbU::Unit enclosure, uint32_t flags );
    70  // Hurricane Managment.
    71  virtual void _toJson ( JsonWriter* ) const;
    72  virtual void _onDbuChange ( float scale );
    73  virtual string _getTypeName () const;
    74  virtual string _getString () const;
    75  virtual Record* _getRecord () const;
    76 
    77  private:
    78  // Internal: Attributes
    79  vector<BasicLayer*> _basicLayers;
    80  vector< pair<DbU::Unit,DbU::Unit> > _enclosures;
    81  DbU::Unit _maximalEnclosure;
    82 
    83  protected:
    84  // Internal: Constructors & Destructors.
    85  ViaLayer ( Technology* technology
    86  , const Name& name
    87  , BasicLayer* bottomLayer
    88  , BasicLayer* cutLayer
    89  , BasicLayer* topLayer
    90  );
    91  };
    92 
    93 
    94 // -------------------------------------------------------------------
    95 // Class : "Hurricane::JsonViaLayer".
    96 
    97  class JsonViaLayer : public JsonLayer {
    98  public:
    99  static void initialize ();
    100  JsonViaLayer ( unsigned long flags );
    101  ~JsonViaLayer ();
    102  virtual string getTypeName () const;
    103  virtual JsonViaLayer* clone ( unsigned long ) const;
    104  virtual void toData ( JsonStack& );
    105  };
    106 
    107 
    108 } // End of Hurricane namespace.
    109 
    110 
    111 INSPECTOR_P_SUPPORT(Hurricane::ViaLayer);
    112 
    113 
    114 # endif
    BasicLayer description (API)
    Definition: BasicLayer.h:44
    Name description (API)
    Definition: Name.h:35
    -
    std::int64_t Unit
    Definition: DbU.h:70
    -
    DataBase object root class (API).
    Definition: DBo.h:47
    +
    std::int64_t Unit
    Definition: DbU.h:67
    +
    DataBase object root class (API).
    Definition: DBo.h:45
    JSON Parser Stack.
    Definition: JsonObject.h:249
    Layer description (API)
    Definition: Layer.h:52
    The namespace dedicated to Hurricane.
    Definition: Generalities.dox:5
    @@ -59,7 +59,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/Warning_8h_source.html b/hurricane/doc/hurricane/html/Warning_8h_source.html index a82c2e04..db944850 100644 --- a/hurricane/doc/hurricane/html/Warning_8h_source.html +++ b/hurricane/doc/hurricane/html/Warning_8h_source.html @@ -56,7 +56,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/annotated.html b/hurricane/doc/hurricane/html/annotated.html index 3befeba8..717ff6cd 100644 --- a/hurricane/doc/hurricane/html/annotated.html +++ b/hurricane/doc/hurricane/html/annotated.html @@ -135,7 +135,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classEntity_1_1CompareById.html b/hurricane/doc/hurricane/html/classEntity_1_1CompareById.html index 048e92e8..3120f8fe 100644 --- a/hurricane/doc/hurricane/html/classEntity_1_1CompareById.html +++ b/hurricane/doc/hurricane/html/classEntity_1_1CompareById.html @@ -58,7 +58,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1BasicLayer-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1BasicLayer-members.html index 7a216fc1..e79987b7 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1BasicLayer-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1BasicLayer-members.html @@ -51,7 +51,7 @@ $(function() { below(const Layer *layer) constHurricane::Layerinline clearProperties()Hurricane::DBo contains(const Layer *layer) constHurricane::Layer - create(Technology *technology, const Name &name, const Material &material, unsigned gds2Layer, unsigned gds2Datatype, const DbU::Unit &minimalSize=0, const DbU::Unit &minimalSpacing=0)Hurricane::BasicLayerstatic + create(Technology *technology, const Name &name, const Material &material, unsigned gds2Layer=0, unsigned gds2Datatype=0, const DbU::Unit &minimalSize=0, const DbU::Unit &minimalSpacing=0)Hurricane::BasicLayerstatic destroy()Hurricane::DBovirtual getCutAbove(bool useSymbolic=true) constHurricane::Layer getCutBelow(bool useSymbolic=true) constHurricane::Layer @@ -87,7 +87,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1BasicLayer.html b/hurricane/doc/hurricane/html/classHurricane_1_1BasicLayer.html index 84a5f254..f8fb972f 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1BasicLayer.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1BasicLayer.html @@ -140,8 +140,8 @@ Public Member Functions - - + +

    Static Public Member Functions

    static BasicLayercreate (Technology *technology, const Name &name, const Material &material, unsigned gds2Layer, unsigned gds2Datatype, const DbU::Unit &minimalSize=0, const DbU::Unit &minimalSpacing=0)
     
    static BasicLayercreate (Technology *technology, const Name &name, const Material &material, unsigned gds2Layer=0, unsigned gds2Datatype=0, const DbU::Unit &minimalSize=0, const DbU::Unit &minimalSpacing=0)
     
    @@ -154,8 +154,8 @@ Additional Inherited Members

    For a more complete description of the Layers object, please refer to Layer Introduction.

    For purpose of BasicLayers, also see BasicLayer::Material.

    Member Function Documentation

    - -

    ◆ create()

    + +

    ◆ create()

    @@ -185,13 +185,13 @@ Additional Inherited Members
    - + - + @@ -338,7 +338,7 @@ Additional Inherited Members

    Additional Inherited Members

    unsigned gds2Layer, gds2Layer = 0,
    unsigned gds2Datatype, gds2Datatype = 0,
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1BasicLayer_1_1Material-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1BasicLayer_1_1Material-members.html index bf3228ab..0319353e 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1BasicLayer_1_1Material-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1BasicLayer_1_1Material-members.html @@ -63,7 +63,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1BasicLayer_1_1Material.html b/hurricane/doc/hurricane/html/classHurricane_1_1BasicLayer_1_1Material.html index eaf89c39..5a7f88e8 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1BasicLayer_1_1Material.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1BasicLayer_1_1Material.html @@ -123,7 +123,7 @@ Public Types
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Box-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Box-members.html index 16084ae4..b270b918 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Box-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Box-members.html @@ -91,7 +91,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Box.html b/hurricane/doc/hurricane/html/classHurricane_1_1Box.html index c896fa11..2dce4ae4 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Box.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Box.html @@ -1104,7 +1104,7 @@ Remark on Modifiers
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Cell-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Cell-members.html index 994833ac..3500b19e 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Cell-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Cell-members.html @@ -63,11 +63,11 @@ $(function() { getInternalNets() constHurricane::Cell getLibrary() constHurricane::Cellinline getName() constHurricane::Cellinline - getNet(const Name &name) constHurricane::Cell + getNet(const Name &name, bool useAlias=true) constHurricane::Cell getNets() constHurricane::Cellinline getNonTerminalNetlistInstanceOccurrences(const Instance *topInstance=NULL) constHurricane::Cell getOccurrences(unsigned searchDepth=std::numeric_limits< unsigned int >::max()) constHurricane::Cell - getOccurrencesUnder(const Box &area, unsigned searchDepth=std::numeric_limits< unsigned int >::max()) constHurricane::Cell + getOccurrencesUnder(const Box &area, unsigned searchDepth=std::numeric_limits< unsigned int >::max(), DbU::Unit threshold=0) constHurricane::Cell getProperties() constHurricane::DBo getProperty(const Name &) constHurricane::DBo getRubbers() constHurricane::Cell @@ -91,7 +91,7 @@ $(function() { removeProperty(const Name &)Hurricane::DBo setAbutmentBox(const Box &abutmentBox)Hurricane::Cell setName(const Name &name)Hurricane::Cell - setTerminalNetlist(bool isTerminalNetlist)Hurricane::Cellinline + setTerminalNetlist(bool state)Hurricane::Cellinline uniquify(unsigned int depth=std::numeric_limits< unsigned int >::max())Hurricane::Cell unmaterialize()Hurricane::Cell
    @@ -99,7 +99,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Cell.html b/hurricane/doc/hurricane/html/classHurricane_1_1Cell.html index f0eff3ac..202a80b2 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Cell.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Cell.html @@ -75,8 +75,8 @@ Public Member Functions   Instances getSlaveInstances () const   -NetgetNet (const Name &name) const -  +NetgetNet (const Name &name, bool useAlias=true) const +  Nets getNets () const   Nets getGlobalNets () const @@ -103,8 +103,8 @@ Public Member Functions   Occurrences getOccurrences (unsigned searchDepth=std::numeric_limits< unsigned int >::max()) const   -Occurrences getOccurrencesUnder (const Box &area, unsigned searchDepth=std::numeric_limits< unsigned int >::max()) const -  +Occurrences getOccurrencesUnder (const Box &area, unsigned searchDepth=std::numeric_limits< unsigned int >::max(), DbU::Unit threshold=0) const +  Occurrences getTerminalInstanceOccurrences () const   Occurrences getTerminalNetlistInstanceOccurrences (const Instance *topInstance=NULL) const @@ -129,8 +129,8 @@ Public Member Functions   void setAbutmentBox (const Box &abutmentBox)   -void setTerminalNetlist (bool isTerminalNetlist) -  +void setTerminalNetlist (bool state) +  void materialize ()   void unmaterialize () @@ -375,8 +375,8 @@ Layout vs. Netlist Cell Hierarchy
    - -

    ◆ getNet()

    + +

    ◆ getNet()

    @@ -385,8 +385,18 @@ Layout vs. Netlist Cell Hierarchy Net * Hurricane::Cell::getNet ( const Name &  - name) - const + name, + + + + + bool  + useAlias = true  + + + + ) + const
    @@ -663,8 +673,8 @@ Layout vs. Netlist Cell Hierarchy
    - -

    ◆ getOccurrencesUnder()

    + +

    ◆ getOccurrencesUnder()

    @@ -679,7 +689,13 @@ Layout vs. Netlist Cell Hierarchy unsigned  - searchDepth = std::numeric_limits<unsigned int>::max()  + searchDepth = std::numeric_limits<unsigned int>::max(), + + + + + DbU::Unit  + threshold = 0  @@ -845,8 +861,6 @@ Layout vs. Netlist Cell Hierarchy

    Returns true if the Cell is marked as terminal for the netlist hierarchy. A terminal netlist cell may, however contains further level of physical (layout) instances. This is a state that can be set or unset.

    -

    Referenced by setTerminalNetlist().

    -
    @@ -943,8 +957,8 @@ Layout vs. Netlist Cell Hierarchy
    - -

    ◆ setTerminalNetlist()

    + +

    ◆ setTerminalNetlist()

    @@ -968,8 +982,6 @@ Layout vs. Netlist Cell Hierarchy

    sets Cell netlist terminal status to state.

    -

    References isTerminalNetlist().

    -
    @@ -1063,7 +1075,7 @@ Layout vs. Netlist Cell Hierarchy
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Collection-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Collection-members.html index 250d7087..24425c54 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Collection-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Collection-members.html @@ -60,7 +60,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Collection.html b/hurricane/doc/hurricane/html/classHurricane_1_1Collection.html index 73b9a0a4..143d6502 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Collection.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Collection.html @@ -376,7 +376,7 @@ template<class SubType >

    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Component-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Component-members.html index 2dbe19ed..44cf0264 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Component-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Component-members.html @@ -78,7 +78,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Component.html b/hurricane/doc/hurricane/html/classHurricane_1_1Component.html index 66e67599..1bfd54e7 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Component.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Component.html @@ -504,7 +504,7 @@ Predefined filters
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Component_1_1BodyHook-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Component_1_1BodyHook-members.html index d058946c..9a98dc4d 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Component_1_1BodyHook-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Component_1_1BodyHook-members.html @@ -63,7 +63,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Component_1_1BodyHook.html b/hurricane/doc/hurricane/html/classHurricane_1_1Component_1_1BodyHook.html index a6b87348..99c2bb4e 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Component_1_1BodyHook.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Component_1_1BodyHook.html @@ -91,7 +91,7 @@ Additional Inherited Members
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Contact-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Contact-members.html index 0c4acdfa..4a925048 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Contact-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Contact-members.html @@ -49,8 +49,8 @@ $(function() { - - + + @@ -58,41 +58,41 @@ $(function() { - - + + - + - + - - - - - - - - - - - + + + + + + + + + + +
    autoMaterializationIsDisabled()Hurricane::Gostatic
    clearProperties()Hurricane::DBo
    create(Net *net, const Layer *layer, const DbU::Unit &x, const DbU::Unit &y, const DbU::Unit &width=0, const DbU::Unit &height=0)Hurricane::Contactstatic
    create(Component *anchor, const Layer *layer, const DbU::Unit &dx, const DbU::Unit &dy, const DbU::Unit &width=0, const DbU::Unit &height=0)Hurricane::Contactstatic
    create(Net *net, const Layer *layer, DbU::Unit x, DbU::Unit y, DbU::Unit width=0, DbU::Unit height=0)Hurricane::Contactstatic
    create(Component *anchor, const Layer *layer, DbU::Unit dx, DbU::Unit dy, DbU::Unit width=0, DbU::Unit height=0)Hurricane::Contactstatic
    destroy()Hurricane::DBovirtual
    disableAutoMaterialization()Hurricane::Gostatic
    enableAutoMaterialization()Hurricane::Gostatic
    getAnchorHook()Hurricane::Contactinline
    getBodyHook()Hurricane::Componentinline
    getConnexComponents() constHurricane::Component
    getDx() constHurricane::Contactinline
    getDy() constHurricane::Contactinline
    getDx() constHurricane::Contactinline
    getDy() constHurricane::Contactinline
    getHalfHeight() constHurricane::Contactinline
    getHalfWidth() constHurricane::Contactinline
    getHeight() constHurricane::Contactinline
    getHeight() constHurricane::Contactinline
    getIsUnderFilter(const Box &area)Hurricane::Componentstatic
    getNet() constHurricane::Componentinline
    getProperties() constHurricane::DBo
    getProperty(const Name &) constHurricane::DBo
    getRubber() constHurricane::Componentinline
    getSlaveComponents() constHurricane::Component
    getWidth() constHurricane::Contactinline
    getWidth() constHurricane::Contactinline
    hasProperty() constHurricane::DBoinline
    Inherit typedefHurricane::Contact
    isMaterialized() constHurricane::Goinline
    put(Property *)Hurricane::DBo
    remove(Property *)Hurricane::DBo
    removeProperty(const Name &)Hurricane::DBo
    setDx(const DbU::Unit &dx)Hurricane::Contact
    setDy(const DbU::Unit &dy)Hurricane::Contact
    setHeight(const DbU::Unit &height)Hurricane::Contact
    setLayer(const Layer *layer)Hurricane::Contact
    setOffset(const DbU::Unit &dx, const DbU::Unit &dy)Hurricane::Contact
    setPosition(const DbU::Unit &x, const DbU::Unit &y)Hurricane::Contact
    setPosition(const Point &position)Hurricane::Contact
    setSizes(const DbU::Unit &width, const DbU::Unit &height)Hurricane::Contact
    setWidth(const DbU::Unit &width)Hurricane::Contact
    setX(const DbU::Unit &x)Hurricane::Contact
    setY(const DbU::Unit &y)Hurricane::Contact
    setDx(DbU::Unit)Hurricane::Contact
    setDy(DbU::Unit)Hurricane::Contact
    setHeight(DbU::Unit)Hurricane::Contact
    setLayer(const Layer *)Hurricane::Contact
    setOffset(DbU::Unit dx, DbU::Unit dy)Hurricane::Contact
    setPosition(DbU::Unit x, DbU::Unit y)Hurricane::Contact
    setPosition(const Point &)Hurricane::Contact
    setSizes(DbU::Unit width, DbU::Unit height)Hurricane::Contact
    setWidth(DbU::Unit)Hurricane::Contact
    setX(DbU::Unit)Hurricane::Contact
    setY(DbU::Unit)Hurricane::Contact


    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Contact.html b/hurricane/doc/hurricane/html/classHurricane_1_1Contact.html index 892557b1..10c41542 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Contact.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Contact.html @@ -85,40 +85,40 @@ Public Member Functions   ComponentgetAnchor () const   -const DbU::UnitgetDx () const -  -const DbU::UnitgetDy () const -  -const DbU::UnitgetWidth () const -  +DbU::Unit getDx () const +  +DbU::Unit getDy () const +  +DbU::Unit getWidth () const +  DbU::Unit getHalfWidth () const   -const DbU::UnitgetHeight () const -  +DbU::Unit getHeight () const +  DbU::Unit getHalfHeight () const   -void setLayer (const Layer *layer) -  -void setWidth (const DbU::Unit &width) -  -void setHeight (const DbU::Unit &height) -  -void setSizes (const DbU::Unit &width, const DbU::Unit &height) -  -void setX (const DbU::Unit &x) -  -void setY (const DbU::Unit &y) -  -void setPosition (const DbU::Unit &x, const DbU::Unit &y) -  -void setPosition (const Point &position) -  -void setDx (const DbU::Unit &dx) -  -void setDy (const DbU::Unit &dy) -  -void setOffset (const DbU::Unit &dx, const DbU::Unit &dy) -  +void setLayer (const Layer *) +  +void setWidth (DbU::Unit) +  +void setHeight (DbU::Unit) +  +void setSizes (DbU::Unit width, DbU::Unit height) +  +void setX (DbU::Unit) +  +void setY (DbU::Unit) +  +void setPosition (DbU::Unit x, DbU::Unit y) +  +void setPosition (const Point &) +  +void setDx (DbU::Unit) +  +void setDy (DbU::Unit) +  +void setOffset (DbU::Unit dx, DbU::Unit dy) +  - Public Member Functions inherited from Hurricane::Component NetgetNet () const   @@ -153,10 +153,10 @@ Public Member Functions - - - - + + + + @@ -190,8 +190,8 @@ Introduction

    Member Function Documentation

    - -

    ◆ create() [1/2]

    + +

    ◆ create() [1/2]

    @@ -214,25 +214,25 @@ Introduction
    - + - + - + - + @@ -252,8 +252,8 @@ Introduction - -

    ◆ create() [2/2]

    + +

    ◆ create() [2/2]

    @@ -276,25 +276,25 @@ Introduction
    - + - + - + - + @@ -359,8 +359,8 @@ Introduction - -

    ◆ getDx()

    + +

    ◆ getDx()

    @@ -369,7 +369,7 @@ Introduction

    Static Public Member Functions

    static Contactcreate (Net *net, const Layer *layer, const DbU::Unit &x, const DbU::Unit &y, const DbU::Unit &width=0, const DbU::Unit &height=0)
     
    static Contactcreate (Component *anchor, const Layer *layer, const DbU::Unit &dx, const DbU::Unit &dy, const DbU::Unit &width=0, const DbU::Unit &height=0)
     
    static Contactcreate (Net *net, const Layer *layer, DbU::Unit x, DbU::Unit y, DbU::Unit width=0, DbU::Unit height=0)
     
    static Contactcreate (Component *anchor, const Layer *layer, DbU::Unit dx, DbU::Unit dy, DbU::Unit width=0, DbU::Unit height=0)
     
    - Static Public Member Functions inherited from Hurricane::Component
    static ComponentFilter getIsUnderFilter (const Box &area)
     
    const DbU::UnitDbU::Unit  x,
    const DbU::UnitDbU::Unit  y,
    const DbU::UnitDbU::Unit  width = 0,
    const DbU::UnitDbU::Unit  height = 0 
    const DbU::UnitDbU::Unit  dx,
    const DbU::UnitDbU::Unit  dy,
    const DbU::UnitDbU::Unit  width = 0,
    const DbU::UnitDbU::Unit  height = 0 
    - + @@ -386,8 +386,8 @@ Introduction - -

    ◆ getDy()

    + +

    ◆ getDy()

    @@ -396,7 +396,7 @@ Introduction

    const DbU::Unit & Hurricane::Contact::getDx DbU::Unit Hurricane::Contact::getDx ( ) const - + @@ -413,8 +413,8 @@ Introduction - -

    ◆ getWidth()

    + +

    ◆ getWidth()

    @@ -423,7 +423,7 @@ Introduction

    const DbU::Unit & Hurricane::Contact::getDy DbU::Unit Hurricane::Contact::getDy ( ) const - + @@ -465,8 +465,8 @@ Introduction - -

    ◆ getHeight()

    + +

    ◆ getHeight()

    @@ -475,7 +475,7 @@ Introduction

    const DbU::Unit & Hurricane::Contact::getWidth DbU::Unit Hurricane::Contact::getWidth ( ) const - + @@ -517,8 +517,8 @@ Introduction - -

    ◆ setLayer()

    + +

    ◆ setLayer()

    @@ -536,8 +536,8 @@ Introduction
    - -

    ◆ setWidth()

    + +

    ◆ setWidth()

    @@ -545,7 +545,7 @@ Introduction
    - + @@ -555,8 +555,8 @@ Introduction - -

    ◆ setHeight()

    + +

    ◆ setHeight()

    @@ -564,7 +564,7 @@ Introduction
    - + @@ -574,8 +574,8 @@ Introduction - -

    ◆ setSizes()

    + +

    ◆ setSizes()

    @@ -583,13 +583,13 @@ Introduction
    - + - + @@ -603,8 +603,8 @@ Introduction - -

    ◆ setX()

    + +

    ◆ setX()

    @@ -612,7 +612,7 @@ Introduction
    - + @@ -622,8 +622,8 @@ Introduction - -

    ◆ setY()

    + +

    ◆ setY()

    @@ -631,7 +631,7 @@ Introduction
    - + @@ -641,8 +641,8 @@ Introduction - -

    ◆ setPosition() [1/2]

    + +

    ◆ setPosition() [1/2]

    @@ -650,13 +650,13 @@ Introduction
    - + - + @@ -670,8 +670,8 @@ Introduction - -

    ◆ setPosition() [2/2]

    + +

    ◆ setPosition() [2/2]

    @@ -689,8 +689,8 @@ Introduction
    - -

    ◆ setDx()

    + +

    ◆ setDx()

    @@ -698,7 +698,7 @@ Introduction
    - + @@ -709,8 +709,8 @@ Introduction - -

    ◆ setDy()

    + +

    ◆ setDy()

    @@ -718,7 +718,7 @@ Introduction
    - + @@ -729,8 +729,8 @@ Introduction - -

    ◆ setOffset()

    + +

    ◆ setOffset()

    @@ -738,13 +738,13 @@ Introduction
    - + - + @@ -768,7 +768,7 @@ Introduction
    const DbU::Unit & Hurricane::Contact::getHeight DbU::Unit Hurricane::Contact::getHeight ( ) const
    void Hurricane::Contact::setWidth (const DbU::UnitDbU::Unit  width)
    void Hurricane::Contact::setHeight (const DbU::UnitDbU::Unit  height)
    void Hurricane::Contact::setSizes (const DbU::UnitDbU::Unit  width,
    const DbU::UnitDbU::Unit  height 
    void Hurricane::Contact::setX (const DbU::UnitDbU::Unit  x)
    void Hurricane::Contact::setY (const DbU::UnitDbU::Unit  y)
    void Hurricane::Contact::setPosition (const DbU::UnitDbU::Unit  x,
    const DbU::UnitDbU::Unit  y 
    void Hurricane::Contact::setDx (const DbU::UnitDbU::Unit  dx)
    void Hurricane::Contact::setDy (const DbU::UnitDbU::Unit  dy)
    void Hurricane::Contact::setOffset (const DbU::UnitDbU::Unit  dx,
    const DbU::UnitDbU::Unit  dy 
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1ContactLayer-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1ContactLayer-members.html index ffdb567d..648ab5c2 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1ContactLayer-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1ContactLayer-members.html @@ -84,7 +84,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1ContactLayer.html b/hurricane/doc/hurricane/html/classHurricane_1_1ContactLayer.html index d4e618b8..bce5daaa 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1ContactLayer.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1ContactLayer.html @@ -225,7 +225,7 @@ Additional Inherited Members
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Contact_1_1AnchorHook-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Contact_1_1AnchorHook-members.html index 57290f2c..b7d5823d 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Contact_1_1AnchorHook-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Contact_1_1AnchorHook-members.html @@ -63,7 +63,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Contact_1_1AnchorHook.html b/hurricane/doc/hurricane/html/classHurricane_1_1Contact_1_1AnchorHook.html index 5c2d0a3c..0f7f68e3 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Contact_1_1AnchorHook.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Contact_1_1AnchorHook.html @@ -92,7 +92,7 @@ Additional Inherited Members
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1DBo-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1DBo-members.html index b87650b6..ccdb2c2f 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1DBo-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1DBo-members.html @@ -60,7 +60,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1DBo.html b/hurricane/doc/hurricane/html/classHurricane_1_1DBo.html index 848112e9..c37344c8 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1DBo.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1DBo.html @@ -317,7 +317,7 @@ Remark
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1DataBase-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1DataBase-members.html index a327b519..6acedca4 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1DataBase-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1DataBase-members.html @@ -64,7 +64,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1DataBase.html b/hurricane/doc/hurricane/html/classHurricane_1_1DataBase.html index c7a8fa38..9784361a 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1DataBase.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1DataBase.html @@ -213,7 +213,7 @@ Static Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1DbU-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1DbU-members.html index 6e26a37a..b2291e46 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1DbU-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1DbU-members.html @@ -98,7 +98,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1DbU.html b/hurricane/doc/hurricane/html/classHurricane_1_1DbU.html index 9dce0023..b8b34202 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1DbU.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1DbU.html @@ -168,7 +168,7 @@ Static Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1DebugSession-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1DebugSession-members.html index ca54bf3c..7b0fa191 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1DebugSession-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1DebugSession-members.html @@ -58,7 +58,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1DebugSession.html b/hurricane/doc/hurricane/html/classHurricane_1_1DebugSession.html index 1c96dbea..75cb0a3a 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1DebugSession.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1DebugSession.html @@ -378,7 +378,7 @@ Trace Levels
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Diagonal-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Diagonal-members.html index 044d8372..5ca356f4 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Diagonal-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Diagonal-members.html @@ -75,7 +75,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Diagonal.html b/hurricane/doc/hurricane/html/classHurricane_1_1Diagonal.html index ed81c24d..2d5a9c78 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Diagonal.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Diagonal.html @@ -212,7 +212,7 @@ Introduction
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1DiffusionLayer-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1DiffusionLayer-members.html index 60b49165..85400bbe 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1DiffusionLayer-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1DiffusionLayer-members.html @@ -83,7 +83,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1DiffusionLayer.html b/hurricane/doc/hurricane/html/classHurricane_1_1DiffusionLayer.html index 942f6deb..bd89f211 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1DiffusionLayer.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1DiffusionLayer.html @@ -211,7 +211,7 @@ Additional Inherited Members
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Entity-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Entity-members.html index 2bbf6392..fe03959c 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Entity-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Entity-members.html @@ -62,7 +62,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Entity.html b/hurricane/doc/hurricane/html/classHurricane_1_1Entity.html index 305eb4ba..0ca056ec 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Entity.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Entity.html @@ -174,7 +174,7 @@ Unique Identifier
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Error-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Error-members.html index 5c70c30d..0379c525 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Error-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Error-members.html @@ -66,7 +66,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Error.html b/hurricane/doc/hurricane/html/classHurricane_1_1Error.html index e60aea0d..b34f2d8a 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Error.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Error.html @@ -345,7 +345,7 @@ Printing format
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Exception-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Exception-members.html index 75f1022d..80d30760 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Exception-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Exception-members.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Exception.html b/hurricane/doc/hurricane/html/classHurricane_1_1Exception.html index eb0893a2..7f302a8a 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Exception.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Exception.html @@ -234,7 +234,7 @@ Example
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Filter-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Filter-members.html index 7985b417..d56eee75 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Filter-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Filter-members.html @@ -55,7 +55,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Filter.html b/hurricane/doc/hurricane/html/classHurricane_1_1Filter.html index 5f8cf0cc..2cab7143 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Filter.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Filter.html @@ -185,7 +185,7 @@ template<class Type>

    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1GenericCollection-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1GenericCollection-members.html index fa0019f5..765d8b2a 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1GenericCollection-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1GenericCollection-members.html @@ -60,7 +60,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1GenericCollection.html b/hurricane/doc/hurricane/html/classHurricane_1_1GenericCollection.html index cb8dc255..555bf317 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1GenericCollection.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1GenericCollection.html @@ -188,7 +188,7 @@ template<class Type>

    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1GenericFilter-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1GenericFilter-members.html index adb41664..155cd1b3 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1GenericFilter-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1GenericFilter-members.html @@ -56,7 +56,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1GenericFilter.html b/hurricane/doc/hurricane/html/classHurricane_1_1GenericFilter.html index d11a0bb5..e490d0c7 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1GenericFilter.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1GenericFilter.html @@ -178,7 +178,7 @@ template<class Type >

    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1GenericLocator-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1GenericLocator-members.html index 43a662d3..eaee6ef6 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1GenericLocator-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1GenericLocator-members.html @@ -55,7 +55,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1GenericLocator.html b/hurricane/doc/hurricane/html/classHurricane_1_1GenericLocator.html index 69bf73fb..7d01e084 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1GenericLocator.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1GenericLocator.html @@ -175,7 +175,7 @@ template<class Type>

    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Go-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Go-members.html index ef0b1b4d..84948881 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Go-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Go-members.html @@ -70,7 +70,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Go.html b/hurricane/doc/hurricane/html/classHurricane_1_1Go.html index 615fc6d4..8545355a 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Go.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Go.html @@ -333,7 +333,7 @@ Construction and destruction

    It is within this function that the object captures or not the current update session, which involves its future re-materialization when the time commes.

    It is also within this function that all objects, whose geometry will be affected directly or indirectly by the object change, must be invalidated. The flag <propagateFlag> allows to limit the propagation in some cases (i.e. when the contact size changes, objects anchored on it are not affected and there is no need to invalidate them).

    An already dematerialized object must not be taken in count in the current update session, but its propagation, if required, must be systematically executed.

    -
    Sample: We give as an example the implementation for the instances :
    void Instance::invalidate ( bool propagateFlag )
    {
    Inherit::invalidate(false);
    if (propagateFlag) {
    forEach(Plug*, iplug, GetConnectedPlugs()) {
    iplug->invalidate(true);
    }
    }
    }
    void Component::invalidate ( bool propagateFlag )
    {
    Inherit::invalidate(false);
    if (propagateFlag) {
    forEach(Component*, icomponent, GetSlaveComponents()) {
    icomponent->invalidate(false);
    }
    }
    }
    void Contact::setLayer ( Layer* layer )
    {
    if (!layer) throw Error("Can't set layer : null layer");
    if (layer != _layer) {
    // we do the change only if necessary
    invalidate(false); // done before the modification
    _layer = layer;
    }
    }
    void Instance::setTransformation(const Transformation& transformation)
    {
    if (transformation != _transformation) {
    // we do the change only if necessary
    invalidate(true); // done before the modification
    _transformation = transformation;
    }
    }
    +
    Sample: We give as an example the implementation for the instances :
    void Instance::invalidate ( bool propagateFlag )
    {
    Inherit::invalidate(false);
    if (propagateFlag) {
    forEach(Plug*, iplug, GetConnectedPlugs()) {
    iplug->invalidate(true);
    }
    }
    }
    void Component::invalidate ( bool propagateFlag )
    {
    Inherit::invalidate(false);
    if (propagateFlag) {
    forEach(Component*, icomponent, GetSlaveComponents()) {
    icomponent->invalidate(false);
    }
    }
    }
    void Contact::setLayer ( Layer* layer )
    {
    if (!layer) throw Error("Can't set layer : null layer");
    if (layer != _layer) {
    // we do the change only if necessary
    invalidate(false); // done before the modification
    _layer = layer;
    }
    }
    void Instance::setTransformation(const Transformation& transformation)
    {
    if (transformation != _transformation) {
    // we do the change only if necessary
    invalidate(true); // done before the modification
    _transformation = transformation;
    }
    }
    @@ -386,7 +386,7 @@ Construction and destruction
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Hook-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Hook-members.html index c04808c7..dd3c985c 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Hook-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Hook-members.html @@ -65,7 +65,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Hook.html b/hurricane/doc/hurricane/html/classHurricane_1_1Hook.html index 36375aad..fbe905f9 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Hook.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Hook.html @@ -421,7 +421,7 @@ Of course the search is done in the natural forward direction (else it would be
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Horizontal-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Horizontal-members.html index 6b8a3366..d543532a 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Horizontal-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Horizontal-members.html @@ -92,7 +92,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Horizontal.html b/hurricane/doc/hurricane/html/classHurricane_1_1Horizontal.html index 146d1780..b77bee47 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Horizontal.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Horizontal.html @@ -419,7 +419,7 @@ Introduction
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1HyperNet-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1HyperNet-members.html index 5983dad9..4decd035 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1HyperNet-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1HyperNet-members.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1HyperNet.html b/hurricane/doc/hurricane/html/classHurricane_1_1HyperNet.html index feb7dcd5..dab578e7 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1HyperNet.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1HyperNet.html @@ -234,7 +234,7 @@ Introduction
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Initializer-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Initializer-members.html index dfe3a6ca..c4fb9d70 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Initializer-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Initializer-members.html @@ -53,7 +53,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Initializer.html b/hurricane/doc/hurricane/html/classHurricane_1_1Initializer.html index c0512f6f..7f2f29dd 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Initializer.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Initializer.html @@ -105,7 +105,7 @@ template<typename T >

    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Instance-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Instance-members.html index dc02aac0..7c4af248 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Instance-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Instance-members.html @@ -82,7 +82,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Instance.html b/hurricane/doc/hurricane/html/classHurricane_1_1Instance.html index 717e6b6f..0b3fb768 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Instance.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Instance.html @@ -646,7 +646,7 @@ Instance Destruction
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Instance_1_1PlacementStatus-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Instance_1_1PlacementStatus-members.html index 5e2a1abc..bbff8627 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Instance_1_1PlacementStatus-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Instance_1_1PlacementStatus-members.html @@ -60,7 +60,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Instance_1_1PlacementStatus.html b/hurricane/doc/hurricane/html/classHurricane_1_1Instance_1_1PlacementStatus.html index 06794e07..972071f3 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Instance_1_1PlacementStatus.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Instance_1_1PlacementStatus.html @@ -209,7 +209,7 @@ Instance Placement Status
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Interruption-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Interruption-members.html index 30115b71..f909311d 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Interruption-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Interruption-members.html @@ -61,7 +61,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Interruption.html b/hurricane/doc/hurricane/html/classHurricane_1_1Interruption.html index d54fd66d..433b80d4 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Interruption.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Interruption.html @@ -188,7 +188,7 @@ Introduction
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Interval-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Interval-members.html index 2da49e51..46216053 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Interval-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Interval-members.html @@ -79,7 +79,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Interval.html b/hurricane/doc/hurricane/html/classHurricane_1_1Interval.html index 8e165bc7..6d91248a 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Interval.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Interval.html @@ -737,7 +737,7 @@ Remark
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1JsonObject-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1JsonObject-members.html index 406846fa..cb63debf 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1JsonObject-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1JsonObject-members.html @@ -76,7 +76,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1JsonObject.html b/hurricane/doc/hurricane/html/classHurricane_1_1JsonObject.html index 15f502d9..b0b38cf4 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1JsonObject.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1JsonObject.html @@ -917,7 +917,7 @@ template<typename T >

    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1JsonStack-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1JsonStack-members.html index 1b6be332..c28aea90 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1JsonStack-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1JsonStack-members.html @@ -65,7 +65,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1JsonStack.html b/hurricane/doc/hurricane/html/classHurricane_1_1JsonStack.html index 0b38dcae..b2758be6 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1JsonStack.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1JsonStack.html @@ -528,7 +528,7 @@ template<typename T >

    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Layer-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Layer-members.html index 48132d8c..de476f4f 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Layer-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Layer-members.html @@ -85,7 +85,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Layer.html b/hurricane/doc/hurricane/html/classHurricane_1_1Layer.html index 7e40d213..adc0e431 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Layer.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Layer.html @@ -834,7 +834,7 @@ Looking Up a Layer from a Mask
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Library-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Library-members.html index 01ba7da2..4334979e 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Library-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Library-members.html @@ -71,7 +71,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Library.html b/hurricane/doc/hurricane/html/classHurricane_1_1Library.html index b24ac8ac..9669cccf 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Library.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Library.html @@ -421,7 +421,7 @@ Introduction
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1ListCollection-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1ListCollection-members.html index 0d42ed5c..b0bfa642 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1ListCollection-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1ListCollection-members.html @@ -58,7 +58,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1ListCollection.html b/hurricane/doc/hurricane/html/classHurricane_1_1ListCollection.html index 92338ab0..bc8654ec 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1ListCollection.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1ListCollection.html @@ -120,7 +120,7 @@ template<class Element >

    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Locator-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Locator-members.html index 89f26f0b..f220d36a 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Locator-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Locator-members.html @@ -56,7 +56,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Locator.html b/hurricane/doc/hurricane/html/classHurricane_1_1Locator.html index 726a02a6..6c867429 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Locator.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Locator.html @@ -211,7 +211,7 @@ template<class Type>

    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1MapCollection-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1MapCollection-members.html index 98d405c3..85c44345 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1MapCollection-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1MapCollection-members.html @@ -58,7 +58,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1MapCollection.html b/hurricane/doc/hurricane/html/classHurricane_1_1MapCollection.html index 371d248c..74750abd 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1MapCollection.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1MapCollection.html @@ -120,7 +120,7 @@ template<class Key , class Element , class Compare = less<Key>> - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Name-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Name-members.html index 49329e47..f4f42911 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Name-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Name-members.html @@ -66,7 +66,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Name.html b/hurricane/doc/hurricane/html/classHurricane_1_1Name.html index c3d045c7..35e35f0f 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Name.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Name.html @@ -363,7 +363,7 @@ Introduction
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Net-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Net-members.html index 398f20f5..9f7af5ec 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Net-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Net-members.html @@ -103,7 +103,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Net.html b/hurricane/doc/hurricane/html/classHurricane_1_1Net.html index 06452bbf..88a5ff04 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Net.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Net.html @@ -1168,7 +1168,7 @@ Once the merger done the net <net> is definitively deleted. I
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Net_1_1Direction-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Net_1_1Direction-members.html index 422461a2..5d6c95ad 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Net_1_1Direction-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Net_1_1Direction-members.html @@ -66,7 +66,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Net_1_1Direction.html b/hurricane/doc/hurricane/html/classHurricane_1_1Net_1_1Direction.html index 3c5ac529..d2d7aa5a 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Net_1_1Direction.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Net_1_1Direction.html @@ -135,7 +135,7 @@ Public Types
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Net_1_1Type-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Net_1_1Type-members.html index eec3a6a4..6ecb5c15 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Net_1_1Type-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Net_1_1Type-members.html @@ -58,7 +58,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Net_1_1Type.html b/hurricane/doc/hurricane/html/classHurricane_1_1Net_1_1Type.html index c1972432..d310cfc0 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Net_1_1Type.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Net_1_1Type.html @@ -103,7 +103,7 @@ Public Types
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1NotFilter-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1NotFilter-members.html index 7c9dcd35..aa80cea3 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1NotFilter-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1NotFilter-members.html @@ -55,7 +55,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1NotFilter.html b/hurricane/doc/hurricane/html/classHurricane_1_1NotFilter.html index b3015eb5..c2e20212 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1NotFilter.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1NotFilter.html @@ -146,7 +146,7 @@ template<class Type>

    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Occurrence-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Occurrence-members.html index b0a2cdae..8a9f19b9 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Occurrence-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Occurrence-members.html @@ -72,7 +72,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Occurrence.html b/hurricane/doc/hurricane/html/classHurricane_1_1Occurrence.html index ca3a51c1..ca2af92b 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Occurrence.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Occurrence.html @@ -538,7 +538,7 @@ Remarks
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Pad-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Pad-members.html index dbe65e09..03fda935 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Pad-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Pad-members.html @@ -74,7 +74,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Pad.html b/hurricane/doc/hurricane/html/classHurricane_1_1Pad.html index b8962eaf..35a8f405 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Pad.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Pad.html @@ -198,7 +198,7 @@ Introduction
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Path-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Path-members.html index b6fa9231..9e828a71 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Path-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Path-members.html @@ -75,7 +75,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Path.html b/hurricane/doc/hurricane/html/classHurricane_1_1Path.html index 997951af..ed809a1d 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Path.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Path.html @@ -605,7 +605,7 @@ Remarks
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1PhysicalRule-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1PhysicalRule-members.html index 0f4c4d90..a2f9b5f0 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1PhysicalRule-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1PhysicalRule-members.html @@ -62,7 +62,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1PhysicalRule.html b/hurricane/doc/hurricane/html/classHurricane_1_1PhysicalRule.html index f8c691d4..2aef0199 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1PhysicalRule.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1PhysicalRule.html @@ -417,7 +417,7 @@ Introduction
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Pin-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Pin-members.html index 02ff8ee5..7bb49747 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Pin-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Pin-members.html @@ -49,8 +49,8 @@ $(function() { - - + + @@ -58,40 +58,40 @@ $(function() { - - + + - + - + - - - - - - - - - - - + + + + + + + + + + +
    autoMaterializationIsDisabled()Hurricane::Gostatic
    clearProperties()Hurricane::DBo
    Hurricane::Contact::create(Net *net, const Layer *layer, const DbU::Unit &x, const DbU::Unit &y, const DbU::Unit &width=0, const DbU::Unit &height=0)Hurricane::Contactstatic
    Hurricane::Contact::create(Component *anchor, const Layer *layer, const DbU::Unit &dx, const DbU::Unit &dy, const DbU::Unit &width=0, const DbU::Unit &height=0)Hurricane::Contactstatic
    Hurricane::Contact::create(Net *net, const Layer *layer, DbU::Unit x, DbU::Unit y, DbU::Unit width=0, DbU::Unit height=0)Hurricane::Contactstatic
    Hurricane::Contact::create(Component *anchor, const Layer *layer, DbU::Unit dx, DbU::Unit dy, DbU::Unit width=0, DbU::Unit height=0)Hurricane::Contactstatic
    destroy()Hurricane::DBovirtual
    disableAutoMaterialization()Hurricane::Gostatic
    enableAutoMaterialization()Hurricane::Gostatic
    getAnchorHook()Hurricane::Contactinline
    getBodyHook()Hurricane::Componentinline
    getConnexComponents() constHurricane::Component
    getDx() constHurricane::Contactinline
    getDy() constHurricane::Contactinline
    getDx() constHurricane::Contactinline
    getDy() constHurricane::Contactinline
    getHalfHeight() constHurricane::Contactinline
    getHalfWidth() constHurricane::Contactinline
    getHeight() constHurricane::Contactinline
    getHeight() constHurricane::Contactinline
    getIsUnderFilter(const Box &area)Hurricane::Componentstatic
    getNet() constHurricane::Componentinline
    getProperties() constHurricane::DBo
    getProperty(const Name &) constHurricane::DBo
    getRubber() constHurricane::Componentinline
    getSlaveComponents() constHurricane::Component
    getWidth() constHurricane::Contactinline
    getWidth() constHurricane::Contactinline
    hasProperty() constHurricane::DBoinline
    isMaterialized() constHurricane::Goinline
    put(Property *)Hurricane::DBo
    remove(Property *)Hurricane::DBo
    removeProperty(const Name &)Hurricane::DBo
    setDx(const DbU::Unit &dx)Hurricane::Contact
    setDy(const DbU::Unit &dy)Hurricane::Contact
    setHeight(const DbU::Unit &height)Hurricane::Contact
    setLayer(const Layer *layer)Hurricane::Contact
    setOffset(const DbU::Unit &dx, const DbU::Unit &dy)Hurricane::Contact
    setPosition(const DbU::Unit &x, const DbU::Unit &y)Hurricane::Contact
    setPosition(const Point &position)Hurricane::Contact
    setSizes(const DbU::Unit &width, const DbU::Unit &height)Hurricane::Contact
    setWidth(const DbU::Unit &width)Hurricane::Contact
    setX(const DbU::Unit &x)Hurricane::Contact
    setY(const DbU::Unit &y)Hurricane::Contact
    setDx(DbU::Unit)Hurricane::Contact
    setDy(DbU::Unit)Hurricane::Contact
    setHeight(DbU::Unit)Hurricane::Contact
    setLayer(const Layer *)Hurricane::Contact
    setOffset(DbU::Unit dx, DbU::Unit dy)Hurricane::Contact
    setPosition(DbU::Unit x, DbU::Unit y)Hurricane::Contact
    setPosition(const Point &)Hurricane::Contact
    setSizes(DbU::Unit width, DbU::Unit height)Hurricane::Contact
    setWidth(DbU::Unit)Hurricane::Contact
    setX(DbU::Unit)Hurricane::Contact
    setY(DbU::Unit)Hurricane::Contact


    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Pin.html b/hurricane/doc/hurricane/html/classHurricane_1_1Pin.html index d3a37ff4..dfae0c9a 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Pin.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Pin.html @@ -75,40 +75,40 @@ Additional Inherited Members   ComponentgetAnchor () const   -const DbU::UnitgetDx () const -  -const DbU::UnitgetDy () const -  -const DbU::UnitgetWidth () const -  +DbU::Unit getDx () const +  +DbU::Unit getDy () const +  +DbU::Unit getWidth () const +  DbU::Unit getHalfWidth () const   -const DbU::UnitgetHeight () const -  +DbU::Unit getHeight () const +  DbU::Unit getHalfHeight () const   -void setLayer (const Layer *layer) -  -void setWidth (const DbU::Unit &width) -  -void setHeight (const DbU::Unit &height) -  -void setSizes (const DbU::Unit &width, const DbU::Unit &height) -  -void setX (const DbU::Unit &x) -  -void setY (const DbU::Unit &y) -  -void setPosition (const DbU::Unit &x, const DbU::Unit &y) -  -void setPosition (const Point &position) -  -void setDx (const DbU::Unit &dx) -  -void setDy (const DbU::Unit &dy) -  -void setOffset (const DbU::Unit &dx, const DbU::Unit &dy) -  +void setLayer (const Layer *) +  +void setWidth (DbU::Unit) +  +void setHeight (DbU::Unit) +  +void setSizes (DbU::Unit width, DbU::Unit height) +  +void setX (DbU::Unit) +  +void setY (DbU::Unit) +  +void setPosition (DbU::Unit x, DbU::Unit y) +  +void setPosition (const Point &) +  +void setDx (DbU::Unit) +  +void setDy (DbU::Unit) +  +void setOffset (DbU::Unit dx, DbU::Unit dy) +  - Public Member Functions inherited from Hurricane::Component NetgetNet () const   @@ -141,10 +141,10 @@ Additional Inherited Members void clearProperties ()   - Static Public Member Functions inherited from Hurricane::Contact -static Contactcreate (Net *net, const Layer *layer, const DbU::Unit &x, const DbU::Unit &y, const DbU::Unit &width=0, const DbU::Unit &height=0) -  -static Contactcreate (Component *anchor, const Layer *layer, const DbU::Unit &dx, const DbU::Unit &dy, const DbU::Unit &width=0, const DbU::Unit &height=0) -  +static Contactcreate (Net *net, const Layer *layer, DbU::Unit x, DbU::Unit y, DbU::Unit width=0, DbU::Unit height=0) +  +static Contactcreate (Component *anchor, const Layer *layer, DbU::Unit dx, DbU::Unit dy, DbU::Unit width=0, DbU::Unit height=0) +  - Static Public Member Functions inherited from Hurricane::Component static ComponentFilter getIsUnderFilter (const Box &area)   @@ -166,7 +166,7 @@ Additional Inherited Members
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Plug-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Plug-members.html index 7ef0bc5f..1ade893a 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Plug-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Plug-members.html @@ -77,7 +77,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Plug.html b/hurricane/doc/hurricane/html/classHurricane_1_1Plug.html index 5aa5bde7..c5d70fd0 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Plug.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Plug.html @@ -327,7 +327,7 @@ Predefined filters
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Point-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Point-members.html index bbcb73c4..8e5039f4 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Point-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Point-members.html @@ -53,15 +53,15 @@ $(function() { Point()Hurricane::Point Point(const DbU::Unit &x, const DbU::Unit &y)Hurricane::Point Point(const Point &point)Hurricane::Point - setX(const DbU::Unit &x)Hurricane::Pointinline - setY(const DbU::Unit &y)Hurricane::Pointinline + setX(DbU::Unit x)Hurricane::Pointinline + setY(DbU::Unit y)Hurricane::Pointinline translate(const DbU::Unit &dx, const DbU::Unit &dy)Hurricane::Point


    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Point.html b/hurricane/doc/hurricane/html/classHurricane_1_1Point.html index ee04c626..65207397 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Point.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Point.html @@ -65,10 +65,10 @@ Public Member Functions   bool operator!= (const Point &point) const   -void setX (const DbU::Unit &x) -  -void setY (const DbU::Unit &y) -  +void setX (DbU::Unit x) +  +void setY (DbU::Unit y) +  Pointtranslate (const DbU::Unit &dx, const DbU::Unit &dy)   @@ -199,8 +199,8 @@ Public Member Functions
    - -

    ◆ setX()

    + +

    ◆ setX()

    @@ -211,7 +211,7 @@ Public Member Functions void Hurricane::Point::setX ( - const DbU::Unit &  + DbU::Unit  x) @@ -226,8 +226,8 @@ Public Member Functions
    - -

    ◆ setY()

    + +

    ◆ setY()

    @@ -238,7 +238,7 @@ Public Member Functions void Hurricane::Point::setY ( - const DbU::Unit &  + DbU::Unit  y) @@ -291,7 +291,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Polygon-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Polygon-members.html index 1bd67737..aeb36ffd 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Polygon-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Polygon-members.html @@ -75,7 +75,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Polygon.html b/hurricane/doc/hurricane/html/classHurricane_1_1Polygon.html index 72d2d323..5b4eaed4 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Polygon.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Polygon.html @@ -200,7 +200,7 @@ Introduction
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1PrivateProperty-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1PrivateProperty-members.html index e3e35170..4bf056b5 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1PrivateProperty-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1PrivateProperty-members.html @@ -55,7 +55,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1PrivateProperty.html b/hurricane/doc/hurricane/html/classHurricane_1_1PrivateProperty.html index b865deee..7c2e4d40 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1PrivateProperty.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1PrivateProperty.html @@ -121,7 +121,7 @@ Destruction
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Property-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Property-members.html index d335763a..1a6e00c4 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Property-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Property-members.html @@ -56,7 +56,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Property.html b/hurricane/doc/hurricane/html/classHurricane_1_1Property.html index e2943286..db6ca2d7 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Property.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Property.html @@ -258,7 +258,7 @@ Remarks
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1QuadTree-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1QuadTree-members.html index d8f29acd..9e9f6371 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1QuadTree-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1QuadTree-members.html @@ -60,7 +60,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1QuadTree.html b/hurricane/doc/hurricane/html/classHurricane_1_1QuadTree.html index 8ad9b75a..1e47b956 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1QuadTree.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1QuadTree.html @@ -260,7 +260,7 @@ Introduction
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Quark-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Quark-members.html index 95c7ae36..864b5d55 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Quark-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Quark-members.html @@ -61,7 +61,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Quark.html b/hurricane/doc/hurricane/html/classHurricane_1_1Quark.html index 788378a9..35abb78a 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Quark.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Quark.html @@ -136,7 +136,7 @@ Example
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Query-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Query-members.html index 384c6287..f4d9b5d1 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Query-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Query-members.html @@ -91,7 +91,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Query.html b/hurricane/doc/hurricane/html/classHurricane_1_1Query.html index 4fbfe953..d0adbdd8 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Query.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Query.html @@ -1056,7 +1056,7 @@ secQueryParameters
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1RegularLayer-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1RegularLayer-members.html index ab543db7..7e362f73 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1RegularLayer-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1RegularLayer-members.html @@ -80,7 +80,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1RegularLayer.html b/hurricane/doc/hurricane/html/classHurricane_1_1RegularLayer.html index fda79f0d..089f2628 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1RegularLayer.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1RegularLayer.html @@ -222,7 +222,7 @@ RegularLayer::getOpposite()
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Relation-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Relation-members.html index af674428..bf9d3e8f 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Relation-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Relation-members.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Relation.html b/hurricane/doc/hurricane/html/classHurricane_1_1Relation.html index 4e7aa32a..69b6cc98 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Relation.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Relation.html @@ -78,7 +78,7 @@ Additional Inherited Members
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1RoutingPad-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1RoutingPad-members.html index 4bd06c7e..3ea92e52 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1RoutingPad-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1RoutingPad-members.html @@ -98,7 +98,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1RoutingPad.html b/hurricane/doc/hurricane/html/classHurricane_1_1RoutingPad.html index 623596e1..fc752f8c 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1RoutingPad.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1RoutingPad.html @@ -721,7 +721,7 @@ Introduction
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Rubber-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Rubber-members.html index 7f99060d..f4818542 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Rubber-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Rubber-members.html @@ -69,7 +69,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Rubber.html b/hurricane/doc/hurricane/html/classHurricane_1_1Rubber.html index 7fa59927..1c855eaa 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Rubber.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Rubber.html @@ -257,7 +257,7 @@ Constructors & Destructors
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Segment-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Segment-members.html index ed5c3d5e..271b93d7 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Segment-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Segment-members.html @@ -93,7 +93,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Segment.html b/hurricane/doc/hurricane/html/classHurricane_1_1Segment.html index f347cdc0..93b9ab3b 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Segment.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Segment.html @@ -644,7 +644,7 @@ Introduction
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Segment_1_1SourceHook-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Segment_1_1SourceHook-members.html index 4262371d..14e9bf79 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Segment_1_1SourceHook-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Segment_1_1SourceHook-members.html @@ -63,7 +63,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Segment_1_1SourceHook.html b/hurricane/doc/hurricane/html/classHurricane_1_1Segment_1_1SourceHook.html index 6f42632f..384a6c2f 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Segment_1_1SourceHook.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Segment_1_1SourceHook.html @@ -91,7 +91,7 @@ Additional Inherited Members
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Segment_1_1TargetHook-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Segment_1_1TargetHook-members.html index 05d3275e..74d99b59 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Segment_1_1TargetHook-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Segment_1_1TargetHook-members.html @@ -63,7 +63,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Segment_1_1TargetHook.html b/hurricane/doc/hurricane/html/classHurricane_1_1Segment_1_1TargetHook.html index 9d4b2eb8..f9a5083e 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Segment_1_1TargetHook.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Segment_1_1TargetHook.html @@ -91,7 +91,7 @@ Additional Inherited Members
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1SetCollection-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1SetCollection-members.html index 390a9fe3..bcc537ce 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1SetCollection-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1SetCollection-members.html @@ -58,7 +58,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1SetCollection.html b/hurricane/doc/hurricane/html/classHurricane_1_1SetCollection.html index 4525a33b..f8506f28 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1SetCollection.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1SetCollection.html @@ -120,7 +120,7 @@ template<class Element , class Compare = less<Element>>

    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1SharedProperty-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1SharedProperty-members.html index 9a49e39b..50eea8c2 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1SharedProperty-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1SharedProperty-members.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1SharedProperty.html b/hurricane/doc/hurricane/html/classHurricane_1_1SharedProperty.html index 9eff7fc4..3d02b804 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1SharedProperty.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1SharedProperty.html @@ -89,7 +89,7 @@ Introduction
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Slice-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Slice-members.html index 6990916e..708959d9 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Slice-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Slice-members.html @@ -58,7 +58,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Slice.html b/hurricane/doc/hurricane/html/classHurricane_1_1Slice.html index e2412274..e4ec3cf5 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Slice.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Slice.html @@ -243,7 +243,7 @@ Example
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1StandardPrivateProperty-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1StandardPrivateProperty-members.html index d3cb573c..ff4dfa97 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1StandardPrivateProperty-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1StandardPrivateProperty-members.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1StandardPrivateProperty.html b/hurricane/doc/hurricane/html/classHurricane_1_1StandardPrivateProperty.html index 13def639..969154ec 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1StandardPrivateProperty.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1StandardPrivateProperty.html @@ -84,7 +84,7 @@ Introduction
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1StandardRelation-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1StandardRelation-members.html index 30057b19..740669ef 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1StandardRelation-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1StandardRelation-members.html @@ -53,7 +53,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1StandardRelation.html b/hurricane/doc/hurricane/html/classHurricane_1_1StandardRelation.html index 5beb3d5f..a9c68147 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1StandardRelation.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1StandardRelation.html @@ -76,7 +76,7 @@ Additional Inherited Members
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1StandardSharedProperty-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1StandardSharedProperty-members.html index 7f3d4ba8..9681a560 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1StandardSharedProperty-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1StandardSharedProperty-members.html @@ -53,7 +53,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1StandardSharedProperty.html b/hurricane/doc/hurricane/html/classHurricane_1_1StandardSharedProperty.html index 050b66e8..84563b5a 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1StandardSharedProperty.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1StandardSharedProperty.html @@ -81,7 +81,7 @@ Introduction
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1SubSetCollection-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1SubSetCollection-members.html index 824119d5..2fbfdac0 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1SubSetCollection-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1SubSetCollection-members.html @@ -60,7 +60,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1SubSetCollection.html b/hurricane/doc/hurricane/html/classHurricane_1_1SubSetCollection.html index 473ed54a..07ec7a0d 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1SubSetCollection.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1SubSetCollection.html @@ -165,7 +165,7 @@ template<class Type >

    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1SubTypeCollection-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1SubTypeCollection-members.html index 06aa0283..9303546f 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1SubTypeCollection-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1SubTypeCollection-members.html @@ -61,7 +61,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1SubTypeCollection.html b/hurricane/doc/hurricane/html/classHurricane_1_1SubTypeCollection.html index 4ca2ed72..00b0d1c3 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1SubTypeCollection.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1SubTypeCollection.html @@ -184,7 +184,7 @@ template<class Type , class SubType >
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Tabulation-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Tabulation-members.html index 66cede94..cebd0fe3 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Tabulation-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Tabulation-members.html @@ -60,7 +60,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Tabulation.html b/hurricane/doc/hurricane/html/classHurricane_1_1Tabulation.html index 9735df45..43f7e707 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Tabulation.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Tabulation.html @@ -243,7 +243,7 @@ Remark
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Technology-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Technology-members.html index d299f3e7..4bb59806 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Technology-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Technology-members.html @@ -89,7 +89,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Technology.html b/hurricane/doc/hurricane/html/classHurricane_1_1Technology.html index 23954f4b..f5cb323d 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Technology.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Technology.html @@ -986,7 +986,7 @@ Using PhysicalRules
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Transformation-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Transformation-members.html index d998bcec..5e8b0ae7 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Transformation-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Transformation-members.html @@ -81,7 +81,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Transformation.html b/hurricane/doc/hurricane/html/classHurricane_1_1Transformation.html index ddbe4ec2..2f2ae9aa 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Transformation.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Transformation.html @@ -840,7 +840,7 @@ Transformers
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Transformation_1_1Orientation-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Transformation_1_1Orientation-members.html index 9fbfc5f4..ad1f14df 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Transformation_1_1Orientation-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Transformation_1_1Orientation-members.html @@ -52,7 +52,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Transformation_1_1Orientation.html b/hurricane/doc/hurricane/html/classHurricane_1_1Transformation_1_1Orientation.html index 2d974cfc..cf5a8602 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Transformation_1_1Orientation.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Transformation_1_1Orientation.html @@ -106,7 +106,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1TransistorLayer-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1TransistorLayer-members.html index 45116dfb..31e34dbd 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1TransistorLayer-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1TransistorLayer-members.html @@ -83,7 +83,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1TransistorLayer.html b/hurricane/doc/hurricane/html/classHurricane_1_1TransistorLayer.html index daae6376..1c9d175b 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1TransistorLayer.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1TransistorLayer.html @@ -217,7 +217,7 @@ Additional Inherited Members
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1UpdateSession-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1UpdateSession-members.html index 5fb158d0..c3e2aeb4 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1UpdateSession-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1UpdateSession-members.html @@ -52,7 +52,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1UpdateSession.html b/hurricane/doc/hurricane/html/classHurricane_1_1UpdateSession.html index 99475653..f67d9117 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1UpdateSession.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1UpdateSession.html @@ -87,7 +87,7 @@ Update Session Mechanism
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1VectorCollection-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1VectorCollection-members.html index 4ef2ea92..64c0be23 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1VectorCollection-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1VectorCollection-members.html @@ -58,7 +58,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1VectorCollection.html b/hurricane/doc/hurricane/html/classHurricane_1_1VectorCollection.html index a8c0ee7a..cf229b40 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1VectorCollection.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1VectorCollection.html @@ -120,7 +120,7 @@ template<class Element >
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Vertical-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Vertical-members.html index 1cbfc8ce..b73b8286 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Vertical-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Vertical-members.html @@ -92,7 +92,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Vertical.html b/hurricane/doc/hurricane/html/classHurricane_1_1Vertical.html index 55fdb465..27be134c 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Vertical.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Vertical.html @@ -420,7 +420,7 @@ Introduction
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1ViaLayer-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1ViaLayer-members.html index 179f3896..200ef502 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1ViaLayer-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1ViaLayer-members.html @@ -81,7 +81,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1ViaLayer.html b/hurricane/doc/hurricane/html/classHurricane_1_1ViaLayer.html index 88ae5a5c..f0e02a72 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1ViaLayer.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1ViaLayer.html @@ -207,7 +207,7 @@ ViaLayer::getOpposite()
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Warning-members.html b/hurricane/doc/hurricane/html/classHurricane_1_1Warning-members.html index 39982793..afe671fa 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Warning-members.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Warning-members.html @@ -65,7 +65,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classHurricane_1_1Warning.html b/hurricane/doc/hurricane/html/classHurricane_1_1Warning.html index 1315d737..9b179a4d 100644 --- a/hurricane/doc/hurricane/html/classHurricane_1_1Warning.html +++ b/hurricane/doc/hurricane/html/classHurricane_1_1Warning.html @@ -317,7 +317,7 @@ Remark
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/classes.html b/hurricane/doc/hurricane/html/classes.html index eca36f9d..a86ef367 100644 --- a/hurricane/doc/hurricane/html/classes.html +++ b/hurricane/doc/hurricane/html/classes.html @@ -136,7 +136,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/clasststream-members.html b/hurricane/doc/hurricane/html/clasststream-members.html index 701e24d3..9de91103 100644 --- a/hurricane/doc/hurricane/html/clasststream-members.html +++ b/hurricane/doc/hurricane/html/clasststream-members.html @@ -58,7 +58,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/clasststream.html b/hurricane/doc/hurricane/html/clasststream.html index bc2df946..333efac0 100644 --- a/hurricane/doc/hurricane/html/clasststream.html +++ b/hurricane/doc/hurricane/html/clasststream.html @@ -404,7 +404,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/dir_2450e9a649c497a3424377400b95054f.html b/hurricane/doc/hurricane/html/dir_2450e9a649c497a3424377400b95054f.html index b38eea60..ee02fba0 100644 --- a/hurricane/doc/hurricane/html/dir_2450e9a649c497a3424377400b95054f.html +++ b/hurricane/doc/hurricane/html/dir_2450e9a649c497a3424377400b95054f.html @@ -49,7 +49,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/hurricane/doc/hurricane/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html index 2925f164..322b0d4b 100644 --- a/hurricane/doc/hurricane/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ b/hurricane/doc/hurricane/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -49,7 +49,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/dir_84a91669594ac5e20f6d730a15331f7a.html b/hurricane/doc/hurricane/html/dir_84a91669594ac5e20f6d730a15331f7a.html index 001dee0c..2da9e9de 100644 --- a/hurricane/doc/hurricane/html/dir_84a91669594ac5e20f6d730a15331f7a.html +++ b/hurricane/doc/hurricane/html/dir_84a91669594ac5e20f6d730a15331f7a.html @@ -53,7 +53,7 @@ Directories
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/files.html b/hurricane/doc/hurricane/html/files.html index 8d443218..b824a326 100644 --- a/hurricane/doc/hurricane/html/files.html +++ b/hurricane/doc/hurricane/html/files.html @@ -139,7 +139,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions.html b/hurricane/doc/hurricane/html/functions.html index 57019ef4..293142bf 100644 --- a/hurricane/doc/hurricane/html/functions.html +++ b/hurricane/doc/hurricane/html/functions.html @@ -87,7 +87,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_0x7e.html b/hurricane/doc/hurricane/html/functions_0x7e.html index 609952bc..0c314dbf 100644 --- a/hurricane/doc/hurricane/html/functions_0x7e.html +++ b/hurricane/doc/hurricane/html/functions_0x7e.html @@ -63,7 +63,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_b.html b/hurricane/doc/hurricane/html/functions_b.html index b6417bf4..8f225bf2 100644 --- a/hurricane/doc/hurricane/html/functions_b.html +++ b/hurricane/doc/hurricane/html/functions_b.html @@ -60,7 +60,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_c.html b/hurricane/doc/hurricane/html/functions_c.html index a239ad12..51366189 100644 --- a/hurricane/doc/hurricane/html/functions_c.html +++ b/hurricane/doc/hurricane/html/functions_c.html @@ -82,9 +82,9 @@ $(function() { : Hurricane::JsonObject
  • create() -: Hurricane::BasicLayer +: Hurricane::BasicLayer , Hurricane::Cell -, Hurricane::Contact +, Hurricane::Contact , Hurricane::ContactLayer , Hurricane::DataBase , Hurricane::Diagonal @@ -111,7 +111,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_d.html b/hurricane/doc/hurricane/html/functions_d.html index 7104fc6c..9e907cb1 100644 --- a/hurricane/doc/hurricane/html/functions_d.html +++ b/hurricane/doc/hurricane/html/functions_d.html @@ -94,7 +94,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_e.html b/hurricane/doc/hurricane/html/functions_e.html index e650876d..581601e4 100644 --- a/hurricane/doc/hurricane/html/functions_e.html +++ b/hurricane/doc/hurricane/html/functions_e.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_enum.html b/hurricane/doc/hurricane/html/functions_enum.html index d24334a1..55cece1b 100644 --- a/hurricane/doc/hurricane/html/functions_enum.html +++ b/hurricane/doc/hurricane/html/functions_enum.html @@ -64,7 +64,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_eval.html b/hurricane/doc/hurricane/html/functions_eval.html index 981f6e40..6351dece 100644 --- a/hurricane/doc/hurricane/html/functions_eval.html +++ b/hurricane/doc/hurricane/html/functions_eval.html @@ -276,7 +276,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_f.html b/hurricane/doc/hurricane/html/functions_f.html index 97095670..ba39bb78 100644 --- a/hurricane/doc/hurricane/html/functions_f.html +++ b/hurricane/doc/hurricane/html/functions_f.html @@ -63,7 +63,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func.html b/hurricane/doc/hurricane/html/functions_func.html index 12fe304f..0d58e31a 100644 --- a/hurricane/doc/hurricane/html/functions_func.html +++ b/hurricane/doc/hurricane/html/functions_func.html @@ -81,7 +81,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_0x7e.html b/hurricane/doc/hurricane/html/functions_func_0x7e.html index 72717d5b..6ebbd9f7 100644 --- a/hurricane/doc/hurricane/html/functions_func_0x7e.html +++ b/hurricane/doc/hurricane/html/functions_func_0x7e.html @@ -63,7 +63,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_b.html b/hurricane/doc/hurricane/html/functions_func_b.html index 11c8fce2..03ff1529 100644 --- a/hurricane/doc/hurricane/html/functions_func_b.html +++ b/hurricane/doc/hurricane/html/functions_func_b.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_c.html b/hurricane/doc/hurricane/html/functions_func_c.html index 208890ab..ba06c878 100644 --- a/hurricane/doc/hurricane/html/functions_func_c.html +++ b/hurricane/doc/hurricane/html/functions_func_c.html @@ -64,9 +64,9 @@ $(function() { : Hurricane::JsonObject
  • create() -: Hurricane::BasicLayer +: Hurricane::BasicLayer , Hurricane::Cell -, Hurricane::Contact +, Hurricane::Contact , Hurricane::ContactLayer , Hurricane::DataBase , Hurricane::Diagonal @@ -90,7 +90,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_d.html b/hurricane/doc/hurricane/html/functions_func_d.html index bc540afa..785b3414 100644 --- a/hurricane/doc/hurricane/html/functions_func_d.html +++ b/hurricane/doc/hurricane/html/functions_func_d.html @@ -61,7 +61,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_e.html b/hurricane/doc/hurricane/html/functions_func_e.html index 10c7f022..66d33ced 100644 --- a/hurricane/doc/hurricane/html/functions_func_e.html +++ b/hurricane/doc/hurricane/html/functions_func_e.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_f.html b/hurricane/doc/hurricane/html/functions_func_f.html index 60d44a75..5896adf4 100644 --- a/hurricane/doc/hurricane/html/functions_func_f.html +++ b/hurricane/doc/hurricane/html/functions_func_f.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_g.html b/hurricane/doc/hurricane/html/functions_func_g.html index 06906cbd..637b5cf9 100644 --- a/hurricane/doc/hurricane/html/functions_func_g.html +++ b/hurricane/doc/hurricane/html/functions_func_g.html @@ -182,7 +182,7 @@ $(function() { : Hurricane::PhysicalRule
  • getDx() -: Hurricane::Contact +: Hurricane::Contact , Hurricane::Transformation
  • getDxSource() @@ -192,7 +192,7 @@ $(function() { : Hurricane::Horizontal
  • getDy() -: Hurricane::Contact +: Hurricane::Contact , Hurricane::Transformation
  • getDySource() @@ -253,7 +253,7 @@ $(function() {
  • getHeight() : Hurricane::Box -, Hurricane::Contact +, Hurricane::Contact
  • getHook() : Hurricane::Rubber @@ -397,7 +397,7 @@ $(function() { : Hurricane::Path
  • getNet() -: Hurricane::Cell +: Hurricane::Cell , Hurricane::Component , Hurricane::Rubber
  • @@ -436,7 +436,7 @@ $(function() { : Hurricane::Cell
  • getOccurrencesUnder() -: Hurricane::Cell +: Hurricane::Cell
  • getOnCustomGrid() : Hurricane::DbU @@ -707,7 +707,7 @@ $(function() {
  • getWidth() : Hurricane::Box -, Hurricane::Contact +, Hurricane::Contact , Hurricane::Segment
  • getX() @@ -752,7 +752,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_h.html b/hurricane/doc/hurricane/html/functions_func_h.html index 5815f6a6..a5ce0d73 100644 --- a/hurricane/doc/hurricane/html/functions_func_h.html +++ b/hurricane/doc/hurricane/html/functions_func_h.html @@ -79,7 +79,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_i.html b/hurricane/doc/hurricane/html/functions_func_i.html index 9aa71955..b0e6c93f 100644 --- a/hurricane/doc/hurricane/html/functions_func_i.html +++ b/hurricane/doc/hurricane/html/functions_func_i.html @@ -169,7 +169,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_j.html b/hurricane/doc/hurricane/html/functions_func_j.html index 8e1ab6d8..6febcf33 100644 --- a/hurricane/doc/hurricane/html/functions_func_j.html +++ b/hurricane/doc/hurricane/html/functions_func_j.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_l.html b/hurricane/doc/hurricane/html/functions_func_l.html index c828599b..114fdea9 100644 --- a/hurricane/doc/hurricane/html/functions_func_l.html +++ b/hurricane/doc/hurricane/html/functions_func_l.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_m.html b/hurricane/doc/hurricane/html/functions_func_m.html index 327fe4da..94f26fad 100644 --- a/hurricane/doc/hurricane/html/functions_func_m.html +++ b/hurricane/doc/hurricane/html/functions_func_m.html @@ -69,7 +69,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_n.html b/hurricane/doc/hurricane/html/functions_func_n.html index c3bd415b..91a31d59 100644 --- a/hurricane/doc/hurricane/html/functions_func_n.html +++ b/hurricane/doc/hurricane/html/functions_func_n.html @@ -51,7 +51,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_o.html b/hurricane/doc/hurricane/html/functions_func_o.html index 5da1bf89..e6a4cb7b 100644 --- a/hurricane/doc/hurricane/html/functions_func_o.html +++ b/hurricane/doc/hurricane/html/functions_func_o.html @@ -116,7 +116,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_p.html b/hurricane/doc/hurricane/html/functions_func_p.html index 8661d52f..872325e9 100644 --- a/hurricane/doc/hurricane/html/functions_func_p.html +++ b/hurricane/doc/hurricane/html/functions_func_p.html @@ -79,7 +79,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_q.html b/hurricane/doc/hurricane/html/functions_func_q.html index a689d23d..c1dcdd70 100644 --- a/hurricane/doc/hurricane/html/functions_func_q.html +++ b/hurricane/doc/hurricane/html/functions_func_q.html @@ -51,7 +51,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_r.html b/hurricane/doc/hurricane/html/functions_func_r.html index 6ff15e52..6c374412 100644 --- a/hurricane/doc/hurricane/html/functions_func_r.html +++ b/hurricane/doc/hurricane/html/functions_func_r.html @@ -67,7 +67,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_s.html b/hurricane/doc/hurricane/html/functions_func_s.html index b8b824be..4522cbae 100644 --- a/hurricane/doc/hurricane/html/functions_func_s.html +++ b/hurricane/doc/hurricane/html/functions_func_s.html @@ -64,10 +64,10 @@ $(function() { : Hurricane::Net
  • setDx() -: Hurricane::Contact +: Hurricane::Contact
  • setDy() -: Hurricane::Contact +: Hurricane::Contact
  • setEnclosure() : Hurricane::Layer @@ -100,13 +100,13 @@ $(function() { : Hurricane::DbU
  • setHeight() -: Hurricane::Contact +: Hurricane::Contact
  • setHtmlTranslator() : Hurricane::Exception
  • setLayer() -: Hurricane::Contact +: Hurricane::Contact , Hurricane::Segment
  • setLevel() @@ -146,13 +146,13 @@ $(function() { : Hurricane::JsonObject
  • setOffset() -: Hurricane::Contact +: Hurricane::Contact
  • setOnBestComponent() : Hurricane::RoutingPad
  • setPosition() -: Hurricane::Contact +: Hurricane::Contact , Hurricane::Net
  • setPrecision() @@ -168,7 +168,7 @@ $(function() { : Hurricane::DbU
  • setSizes() -: Hurricane::Contact +: Hurricane::Contact
  • setStartLevel() : Hurricane::Query @@ -189,7 +189,7 @@ $(function() { : Hurricane::PhysicalRule
  • setTerminalNetlist() -: Hurricane::Cell +: Hurricane::Cell
  • setTextTranslator() : Hurricane::Exception @@ -202,18 +202,18 @@ $(function() { : Hurricane::Net
  • setWidth() -: Hurricane::Contact +: Hurricane::Contact , Hurricane::Segment
  • setX() -: Hurricane::Contact -, Hurricane::Point +: Hurricane::Contact +, Hurricane::Point , Hurricane::Vertical
  • setY() -: Hurricane::Contact +: Hurricane::Contact , Hurricane::Horizontal -, Hurricane::Point +, Hurricane::Point
  • size() : Hurricane::JsonStack @@ -230,7 +230,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_t.html b/hurricane/doc/hurricane/html/functions_func_t.html index 5b1787d7..e734ebcf 100644 --- a/hurricane/doc/hurricane/html/functions_func_t.html +++ b/hurricane/doc/hurricane/html/functions_func_t.html @@ -84,7 +84,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_u.html b/hurricane/doc/hurricane/html/functions_func_u.html index 7b616c64..5ec4f938 100644 --- a/hurricane/doc/hurricane/html/functions_func_u.html +++ b/hurricane/doc/hurricane/html/functions_func_u.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_v.html b/hurricane/doc/hurricane/html/functions_func_v.html index a62ee4eb..545d168b 100644 --- a/hurricane/doc/hurricane/html/functions_func_v.html +++ b/hurricane/doc/hurricane/html/functions_func_v.html @@ -48,7 +48,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_func_w.html b/hurricane/doc/hurricane/html/functions_func_w.html index 595fe2a6..d9f4af42 100644 --- a/hurricane/doc/hurricane/html/functions_func_w.html +++ b/hurricane/doc/hurricane/html/functions_func_w.html @@ -51,7 +51,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_g.html b/hurricane/doc/hurricane/html/functions_g.html index ce9b92d0..bf53b72e 100644 --- a/hurricane/doc/hurricane/html/functions_g.html +++ b/hurricane/doc/hurricane/html/functions_g.html @@ -182,7 +182,7 @@ $(function() { : Hurricane::PhysicalRule
  • getDx() -: Hurricane::Contact +: Hurricane::Contact , Hurricane::Transformation
  • getDxSource() @@ -192,7 +192,7 @@ $(function() { : Hurricane::Horizontal
  • getDy() -: Hurricane::Contact +: Hurricane::Contact , Hurricane::Transformation
  • getDySource() @@ -253,7 +253,7 @@ $(function() {
  • getHeight() : Hurricane::Box -, Hurricane::Contact +, Hurricane::Contact
  • getHook() : Hurricane::Rubber @@ -397,7 +397,7 @@ $(function() { : Hurricane::Path
  • getNet() -: Hurricane::Cell +: Hurricane::Cell , Hurricane::Component , Hurricane::Rubber
  • @@ -436,7 +436,7 @@ $(function() { : Hurricane::Cell
  • getOccurrencesUnder() -: Hurricane::Cell +: Hurricane::Cell
  • getOnCustomGrid() : Hurricane::DbU @@ -707,7 +707,7 @@ $(function() {
  • getWidth() : Hurricane::Box -, Hurricane::Contact +, Hurricane::Contact , Hurricane::Segment
  • getX() @@ -758,7 +758,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_h.html b/hurricane/doc/hurricane/html/functions_h.html index dee57eed..6cea6c77 100644 --- a/hurricane/doc/hurricane/html/functions_h.html +++ b/hurricane/doc/hurricane/html/functions_h.html @@ -82,7 +82,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_i.html b/hurricane/doc/hurricane/html/functions_i.html index d2d4f150..a2ee8c69 100644 --- a/hurricane/doc/hurricane/html/functions_i.html +++ b/hurricane/doc/hurricane/html/functions_i.html @@ -193,7 +193,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_j.html b/hurricane/doc/hurricane/html/functions_j.html index f9b96e3d..b2d55a80 100644 --- a/hurricane/doc/hurricane/html/functions_j.html +++ b/hurricane/doc/hurricane/html/functions_j.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_k.html b/hurricane/doc/hurricane/html/functions_k.html index 466fca08..a9cae238 100644 --- a/hurricane/doc/hurricane/html/functions_k.html +++ b/hurricane/doc/hurricane/html/functions_k.html @@ -48,7 +48,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_l.html b/hurricane/doc/hurricane/html/functions_l.html index b4e80a29..54869122 100644 --- a/hurricane/doc/hurricane/html/functions_l.html +++ b/hurricane/doc/hurricane/html/functions_l.html @@ -60,7 +60,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_m.html b/hurricane/doc/hurricane/html/functions_m.html index 20b55789..5c3de108 100644 --- a/hurricane/doc/hurricane/html/functions_m.html +++ b/hurricane/doc/hurricane/html/functions_m.html @@ -81,7 +81,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_n.html b/hurricane/doc/hurricane/html/functions_n.html index 0d1e06fe..54be9140 100644 --- a/hurricane/doc/hurricane/html/functions_n.html +++ b/hurricane/doc/hurricane/html/functions_n.html @@ -63,7 +63,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_o.html b/hurricane/doc/hurricane/html/functions_o.html index bbb37f01..5c258770 100644 --- a/hurricane/doc/hurricane/html/functions_o.html +++ b/hurricane/doc/hurricane/html/functions_o.html @@ -122,7 +122,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_p.html b/hurricane/doc/hurricane/html/functions_p.html index 9f6aef4d..2ad4b2f2 100644 --- a/hurricane/doc/hurricane/html/functions_p.html +++ b/hurricane/doc/hurricane/html/functions_p.html @@ -97,7 +97,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_q.html b/hurricane/doc/hurricane/html/functions_q.html index 518e1668..a3206091 100644 --- a/hurricane/doc/hurricane/html/functions_q.html +++ b/hurricane/doc/hurricane/html/functions_q.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_r.html b/hurricane/doc/hurricane/html/functions_r.html index f4b75534..81e00297 100644 --- a/hurricane/doc/hurricane/html/functions_r.html +++ b/hurricane/doc/hurricane/html/functions_r.html @@ -67,7 +67,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_s.html b/hurricane/doc/hurricane/html/functions_s.html index 646ce91c..a5c51dff 100644 --- a/hurricane/doc/hurricane/html/functions_s.html +++ b/hurricane/doc/hurricane/html/functions_s.html @@ -64,10 +64,10 @@ $(function() { : Hurricane::Net
  • setDx() -: Hurricane::Contact +: Hurricane::Contact
  • setDy() -: Hurricane::Contact +: Hurricane::Contact
  • setEnclosure() : Hurricane::Layer @@ -100,13 +100,13 @@ $(function() { : Hurricane::DbU
  • setHeight() -: Hurricane::Contact +: Hurricane::Contact
  • setHtmlTranslator() : Hurricane::Exception
  • setLayer() -: Hurricane::Contact +: Hurricane::Contact , Hurricane::Segment
  • setLevel() @@ -146,13 +146,13 @@ $(function() { : Hurricane::JsonObject
  • setOffset() -: Hurricane::Contact +: Hurricane::Contact
  • setOnBestComponent() : Hurricane::RoutingPad
  • setPosition() -: Hurricane::Contact +: Hurricane::Contact , Hurricane::Net
  • setPrecision() @@ -168,7 +168,7 @@ $(function() { : Hurricane::DbU
  • setSizes() -: Hurricane::Contact +: Hurricane::Contact
  • setStartLevel() : Hurricane::Query @@ -189,7 +189,7 @@ $(function() { : Hurricane::PhysicalRule
  • setTerminalNetlist() -: Hurricane::Cell +: Hurricane::Cell
  • setTextTranslator() : Hurricane::Exception @@ -202,18 +202,18 @@ $(function() { : Hurricane::Net
  • setWidth() -: Hurricane::Contact +: Hurricane::Contact , Hurricane::Segment
  • setX() -: Hurricane::Contact -, Hurricane::Point +: Hurricane::Contact +, Hurricane::Point , Hurricane::Vertical
  • setY() -: Hurricane::Contact +: Hurricane::Contact , Hurricane::Horizontal -, Hurricane::Point +, Hurricane::Point
  • ShowWarning : Hurricane::RoutingPad @@ -249,7 +249,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_t.html b/hurricane/doc/hurricane/html/functions_t.html index 40440a4f..6d11f4a9 100644 --- a/hurricane/doc/hurricane/html/functions_t.html +++ b/hurricane/doc/hurricane/html/functions_t.html @@ -90,7 +90,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_type.html b/hurricane/doc/hurricane/html/functions_type.html index da89f21d..d476d7b3 100644 --- a/hurricane/doc/hurricane/html/functions_type.html +++ b/hurricane/doc/hurricane/html/functions_type.html @@ -71,7 +71,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_u.html b/hurricane/doc/hurricane/html/functions_u.html index 6be75952..b9087348 100644 --- a/hurricane/doc/hurricane/html/functions_u.html +++ b/hurricane/doc/hurricane/html/functions_u.html @@ -73,7 +73,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_v.html b/hurricane/doc/hurricane/html/functions_v.html index 1361209f..2dfb5974 100644 --- a/hurricane/doc/hurricane/html/functions_v.html +++ b/hurricane/doc/hurricane/html/functions_v.html @@ -48,7 +48,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/functions_w.html b/hurricane/doc/hurricane/html/functions_w.html index af4f17b4..12f50a02 100644 --- a/hurricane/doc/hurricane/html/functions_w.html +++ b/hurricane/doc/hurricane/html/functions_w.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/graph_legend.html b/hurricane/doc/hurricane/html/graph_legend.html index 3f42a067..114a9e4b 100644 --- a/hurricane/doc/hurricane/html/graph_legend.html +++ b/hurricane/doc/hurricane/html/graph_legend.html @@ -74,7 +74,7 @@ A yellow dashed arrow denotes a relation between a template instance and the tem
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/group__DbUGroup.html b/hurricane/doc/hurricane/html/group__DbUGroup.html index 3f4975f6..080dae9c 100644 --- a/hurricane/doc/hurricane/html/group__DbUGroup.html +++ b/hurricane/doc/hurricane/html/group__DbUGroup.html @@ -1293,7 +1293,7 @@ Translators
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/group__Generalities.html b/hurricane/doc/hurricane/html/group__Generalities.html index 52e27af7..ad7f080b 100644 --- a/hurricane/doc/hurricane/html/group__Generalities.html +++ b/hurricane/doc/hurricane/html/group__Generalities.html @@ -155,7 +155,7 @@ Remarks
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/group__JsonSupport.html b/hurricane/doc/hurricane/html/group__JsonSupport.html index 23250a00..69de0472 100644 --- a/hurricane/doc/hurricane/html/group__JsonSupport.html +++ b/hurricane/doc/hurricane/html/group__JsonSupport.html @@ -117,7 +117,7 @@ JsonObject Life Cycle
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/group__grpSynthHierarchy.html b/hurricane/doc/hurricane/html/group__grpSynthHierarchy.html index 3c186059..e6690512 100644 --- a/hurricane/doc/hurricane/html/group__grpSynthHierarchy.html +++ b/hurricane/doc/hurricane/html/group__grpSynthHierarchy.html @@ -238,7 +238,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/hierarchy.html b/hurricane/doc/hurricane/html/hierarchy.html index bc981bcc..c2e95400 100644 --- a/hurricane/doc/hurricane/html/hierarchy.html +++ b/hurricane/doc/hurricane/html/hierarchy.html @@ -144,7 +144,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/hurricane.tag b/hurricane/doc/hurricane/html/hurricane.tag index d859829c..142029da 100644 --- a/hurricane/doc/hurricane/html/hurricane.tag +++ b/hurricane/doc/hurricane/html/hurricane.tag @@ -42,8 +42,8 @@ static BasicLayer * create classHurricane_1_1BasicLayer.html - a76ccb64abaaf9c834c8ee8f010d5d24f - (Technology *technology, const Name &name, const Material &material, unsigned gds2Layer, unsigned gds2Datatype, const DbU::Unit &minimalSize=0, const DbU::Unit &minimalSpacing=0) + aecdcb9bef9b3c1c2bcb6d4513e1ca657 + (Technology *technology, const Name &name, const Material &material, unsigned gds2Layer=0, unsigned gds2Datatype=0, const DbU::Unit &minimalSize=0, const DbU::Unit &minimalSpacing=0) @@ -380,8 +380,8 @@ Net * getNet classHurricane_1_1Cell.html - a63cb19881279b5af0a4e7dae707ef1bd - (const Name &name) const + a70f06abd224895aeeeeb042365dbf48a + (const Name &name, bool useAlias=true) const Nets @@ -478,8 +478,8 @@ Occurrences getOccurrencesUnder classHurricane_1_1Cell.html - a7fb09c8e350923c47ce4c4407bdb00ce - (const Box &area, unsigned searchDepth=std::numeric_limits< unsigned int >::max()) const + aee27efc0497992f811c9812ffa272a5a + (const Box &area, unsigned searchDepth=std::numeric_limits< unsigned int >::max(), DbU::Unit threshold=0) const Occurrences @@ -569,8 +569,8 @@ void setTerminalNetlist classHurricane_1_1Cell.html - a15958b25e911e8f5543557b6deea5618 - (bool isTerminalNetlist) + a47ce34631bb9f6862caa13e5b25a4d8f + (bool state) void @@ -987,24 +987,24 @@ () const - const DbU::Unit & + DbU::Unit getDx classHurricane_1_1Contact.html - acf8405f74b97239ea74ec629d0b4e194 + a8a5c4475668b6c6730ed5265e5447553 () const - const DbU::Unit & + DbU::Unit getDy classHurricane_1_1Contact.html - aa7bc32ab9211fd5f6ad3aacdf1214f20 + af674c59fcaf1f5214d54a558fe30e41a () const - const DbU::Unit & + DbU::Unit getWidth classHurricane_1_1Contact.html - a28bd18de9ca6e5cf2b77fce5e22af43a + a794ce7c3aa5ffe894c1231f7c5ac3c52 () const @@ -1015,10 +1015,10 @@ () const - const DbU::Unit & + DbU::Unit getHeight classHurricane_1_1Contact.html - adf6487485a4f48bd15aa6f9a8ac5fd27 + a07a4ecc7ea2479e2d63f5f31d9325dde () const @@ -1032,92 +1032,92 @@ void setLayer classHurricane_1_1Contact.html - a147644849f33bc4d58b6b997543c8306 - (const Layer *layer) + aec627634d5b6cfc5079a02b1b518b50e + (const Layer *) void setWidth classHurricane_1_1Contact.html - aae6d5c96862fd6c834ff4abd61edc86f - (const DbU::Unit &width) + a08d14ce6cdf3696e472f4a621b936afe + (DbU::Unit) void setHeight classHurricane_1_1Contact.html - a2fc2e7c85dc5495810544c48bb604712 - (const DbU::Unit &height) + a6480b6a75cc098d3227f27080a2cb42b + (DbU::Unit) void setSizes classHurricane_1_1Contact.html - aa18aa1e78eba9f4c10ece0e20683faf5 - (const DbU::Unit &width, const DbU::Unit &height) + a1bded13596d448c6bb9c93271fffe5fd + (DbU::Unit width, DbU::Unit height) void setX classHurricane_1_1Contact.html - a181436f128b65467e1ab94ffcb0c345b - (const DbU::Unit &x) + a5b2338675993259feabb641fd9a1996e + (DbU::Unit) void setY classHurricane_1_1Contact.html - a455b8925aae10157c9143b58a3a52e57 - (const DbU::Unit &y) + a232a49a5dd180e9ff8dfb2bd2a67f2cd + (DbU::Unit) void setPosition classHurricane_1_1Contact.html - afac88ee8442e3e943a24bb526057851a - (const DbU::Unit &x, const DbU::Unit &y) + ae44d4d7655428705f13dca34c7167690 + (DbU::Unit x, DbU::Unit y) void setPosition classHurricane_1_1Contact.html - ad3ff25d47d1c00c53bb07bb0ff4067f1 - (const Point &position) + aedcc63fe54538939c03fe81a16b0bae0 + (const Point &) void setDx classHurricane_1_1Contact.html - a6ee60b9d228fe5487bf73dc396b94706 - (const DbU::Unit &dx) + a82f29c6b48b0c5a51fe3c1678d71876c + (DbU::Unit) void setDy classHurricane_1_1Contact.html - a32ee96c21115ee9d197bc505fd48e37d - (const DbU::Unit &dy) + ac5dadc06ae38c1ff287f031864f58850 + (DbU::Unit) void setOffset classHurricane_1_1Contact.html - a41ba972136e77d768f58ad0407d18f8e - (const DbU::Unit &dx, const DbU::Unit &dy) + a5c8cb75debcbe10aedc092e2089a975c + (DbU::Unit dx, DbU::Unit dy) static Contact * create classHurricane_1_1Contact.html - a5402fec0518c81d35fbec2c2b2ec0f8f - (Net *net, const Layer *layer, const DbU::Unit &x, const DbU::Unit &y, const DbU::Unit &width=0, const DbU::Unit &height=0) + ab66989c2dce4d398f1f7647aca50d983 + (Net *net, const Layer *layer, DbU::Unit x, DbU::Unit y, DbU::Unit width=0, DbU::Unit height=0) static Contact * create classHurricane_1_1Contact.html - a6645345f819cb4769fac075a0b1ea028 - (Component *anchor, const Layer *layer, const DbU::Unit &dx, const DbU::Unit &dy, const DbU::Unit &width=0, const DbU::Unit &height=0) + a2e555edb8984b599c391f16db105c1f5 + (Component *anchor, const Layer *layer, DbU::Unit dx, DbU::Unit dy, DbU::Unit width=0, DbU::Unit height=0) secContactIntro @@ -4791,15 +4791,15 @@ void setX classHurricane_1_1Point.html - a713ba6d38358fc1820371f74647b4214 - (const DbU::Unit &x) + adebab98c82f881b1d2e1e7680a907830 + (DbU::Unit x) void setY classHurricane_1_1Point.html - a5b5c5811c3e354235142eacffc2d887e - (const DbU::Unit &y) + a14a51f177d298ccccb25066c0298a268 + (DbU::Unit y) Point & diff --git a/hurricane/doc/hurricane/html/index.html b/hurricane/doc/hurricane/html/index.html index 7010045f..d8c7be1a 100644 --- a/hurricane/doc/hurricane/html/index.html +++ b/hurricane/doc/hurricane/html/index.html @@ -48,7 +48,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/modules.html b/hurricane/doc/hurricane/html/modules.html index abcf96a4..19bad9ff 100644 --- a/hurricane/doc/hurricane/html/modules.html +++ b/hurricane/doc/hurricane/html/modules.html @@ -53,7 +53,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/namespaceHurricane.html b/hurricane/doc/hurricane/html/namespaceHurricane.html index 70b6f58f..e051109e 100644 --- a/hurricane/doc/hurricane/html/namespaceHurricane.html +++ b/hurricane/doc/hurricane/html/namespaceHurricane.html @@ -1381,7 +1381,7 @@ Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/namespacemembers.html b/hurricane/doc/hurricane/html/namespacemembers.html index dcfb5819..9de2be67 100644 --- a/hurricane/doc/hurricane/html/namespacemembers.html +++ b/hurricane/doc/hurricane/html/namespacemembers.html @@ -285,7 +285,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/namespacemembers_func.html b/hurricane/doc/hurricane/html/namespacemembers_func.html index a1928e94..1bcf64e2 100644 --- a/hurricane/doc/hurricane/html/namespacemembers_func.html +++ b/hurricane/doc/hurricane/html/namespacemembers_func.html @@ -46,7 +46,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/namespacemembers_type.html b/hurricane/doc/hurricane/html/namespacemembers_type.html index e39007da..9575299b 100644 --- a/hurricane/doc/hurricane/html/namespacemembers_type.html +++ b/hurricane/doc/hurricane/html/namespacemembers_type.html @@ -282,7 +282,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/html/namespaces.html b/hurricane/doc/hurricane/html/namespaces.html index 93c4b251..fb2005bf 100644 --- a/hurricane/doc/hurricane/html/namespaces.html +++ b/hurricane/doc/hurricane/html/namespaces.html @@ -50,7 +50,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/hurricane/latex/classHurricane_1_1BasicLayer.tex b/hurricane/doc/hurricane/latex/classHurricane_1_1BasicLayer.tex index bcf37818..714be111 100644 --- a/hurricane/doc/hurricane/latex/classHurricane_1_1BasicLayer.tex +++ b/hurricane/doc/hurricane/latex/classHurricane_1_1BasicLayer.tex @@ -33,7 +33,7 @@ void \mbox{\hyperlink{classHurricane_1_1BasicLayer_aa5aa1e1079c14d7e9c05799d14e7 \subsection*{Static Public Member Functions} \begin{DoxyCompactItemize} \item -static \mbox{\hyperlink{classHurricane_1_1BasicLayer}{Basic\+Layer}} $\ast$ \mbox{\hyperlink{classHurricane_1_1BasicLayer_a76ccb64abaaf9c834c8ee8f010d5d24f}{create}} (\mbox{\hyperlink{classHurricane_1_1Technology}{Technology}} $\ast$technology, const \mbox{\hyperlink{classHurricane_1_1Name}{Name}} \&name, const \mbox{\hyperlink{classHurricane_1_1BasicLayer_1_1Material}{Material}} \&material, unsigned gds2\+Layer, unsigned gds2\+Datatype, const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&minimal\+Size=0, const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&minimal\+Spacing=0) +static \mbox{\hyperlink{classHurricane_1_1BasicLayer}{Basic\+Layer}} $\ast$ \mbox{\hyperlink{classHurricane_1_1BasicLayer_aecdcb9bef9b3c1c2bcb6d4513e1ca657}{create}} (\mbox{\hyperlink{classHurricane_1_1Technology}{Technology}} $\ast$technology, const \mbox{\hyperlink{classHurricane_1_1Name}{Name}} \&name, const \mbox{\hyperlink{classHurricane_1_1BasicLayer_1_1Material}{Material}} \&material, unsigned gds2\+Layer=0, unsigned gds2\+Datatype=0, const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&minimal\+Size=0, const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&minimal\+Spacing=0) \end{DoxyCompactItemize} \subsection*{Additional Inherited Members} @@ -46,11 +46,11 @@ For a more complete description of the Layers object, please refer to \mbox{\hyp For purpose of Basic\+Layers, also see \mbox{\hyperlink{classHurricane_1_1BasicLayer_1_1Material}{Basic\+Layer\+::\+Material}}. \subsection{Member Function Documentation} -\mbox{\Hypertarget{classHurricane_1_1BasicLayer_a76ccb64abaaf9c834c8ee8f010d5d24f}\label{classHurricane_1_1BasicLayer_a76ccb64abaaf9c834c8ee8f010d5d24f}} +\mbox{\Hypertarget{classHurricane_1_1BasicLayer_aecdcb9bef9b3c1c2bcb6d4513e1ca657}\label{classHurricane_1_1BasicLayer_aecdcb9bef9b3c1c2bcb6d4513e1ca657}} \index{Hurricane\+::\+Basic\+Layer@{Hurricane\+::\+Basic\+Layer}!create@{create}} \index{create@{create}!Hurricane\+::\+Basic\+Layer@{Hurricane\+::\+Basic\+Layer}} \subsubsection{\texorpdfstring{create()}{create()}} -{\footnotesize\ttfamily \mbox{\hyperlink{classHurricane_1_1BasicLayer}{Basic\+Layer}} $\ast$ Hurricane\+::\+Basic\+Layer\+::create (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classHurricane_1_1Technology}{Technology}} $\ast$}]{technology, }\item[{const \mbox{\hyperlink{classHurricane_1_1Name}{Name}} \&}]{name, }\item[{const \mbox{\hyperlink{classHurricane_1_1BasicLayer_1_1Material}{Material}} \&}]{material, }\item[{unsigned}]{gds2\+Layer, }\item[{unsigned}]{gds2\+Datatype, }\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{minimal\+Size = {\ttfamily 0}, }\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{minimal\+Spacing = {\ttfamily 0} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}} +{\footnotesize\ttfamily \mbox{\hyperlink{classHurricane_1_1BasicLayer}{Basic\+Layer}} $\ast$ Hurricane\+::\+Basic\+Layer\+::create (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classHurricane_1_1Technology}{Technology}} $\ast$}]{technology, }\item[{const \mbox{\hyperlink{classHurricane_1_1Name}{Name}} \&}]{name, }\item[{const \mbox{\hyperlink{classHurricane_1_1BasicLayer_1_1Material}{Material}} \&}]{material, }\item[{unsigned}]{gds2\+Layer = {\ttfamily 0}, }\item[{unsigned}]{gds2\+Datatype = {\ttfamily 0}, }\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{minimal\+Size = {\ttfamily 0}, }\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{minimal\+Spacing = {\ttfamily 0} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}} creates and returns a new basic layer named {\ttfamily $<$name$>$}, of type {\ttfamily $<$material$>$} for the given technology (some geometrical characteristics can also be specified). diff --git a/hurricane/doc/hurricane/latex/classHurricane_1_1Cell.tex b/hurricane/doc/hurricane/latex/classHurricane_1_1Cell.tex index 6391c570..ba06131c 100644 --- a/hurricane/doc/hurricane/latex/classHurricane_1_1Cell.tex +++ b/hurricane/doc/hurricane/latex/classHurricane_1_1Cell.tex @@ -29,7 +29,7 @@ const \mbox{\hyperlink{classHurricane_1_1Name}{Name}} \& \mbox{\hyperlink{classH \item \mbox{\hyperlink{namespaceHurricane_ac9436b03a2926f34ad6863deae2baadc}{Instances}} \mbox{\hyperlink{classHurricane_1_1Cell_a7e51bee5db73dd44f788e591a5c175c8}{get\+Slave\+Instances}} () const \item -\mbox{\hyperlink{classHurricane_1_1Net}{Net}} $\ast$ \mbox{\hyperlink{classHurricane_1_1Cell_a63cb19881279b5af0a4e7dae707ef1bd}{get\+Net}} (const \mbox{\hyperlink{classHurricane_1_1Name}{Name}} \&name) const +\mbox{\hyperlink{classHurricane_1_1Net}{Net}} $\ast$ \mbox{\hyperlink{classHurricane_1_1Cell_a70f06abd224895aeeeeb042365dbf48a}{get\+Net}} (const \mbox{\hyperlink{classHurricane_1_1Name}{Name}} \&name, bool use\+Alias=true) const \item \mbox{\hyperlink{namespaceHurricane_a3404a8b17130a1824f4a281704b04df7}{Nets}} \mbox{\hyperlink{classHurricane_1_1Cell_a8b4728abe83e9ec21d7bee1154218279}{get\+Nets}} () const \item @@ -57,7 +57,7 @@ const \mbox{\hyperlink{classHurricane_1_1Name}{Name}} \& \mbox{\hyperlink{classH \item \mbox{\hyperlink{namespaceHurricane_a1912927c128eee859af62dbe4cbe0a6b}{Occurrences}} \mbox{\hyperlink{classHurricane_1_1Cell_ab5bbab0a59106855d61deb94805e6115}{get\+Occurrences}} (unsigned search\+Depth=std\+::numeric\+\_\+limits$<$ unsigned int $>$\+::max()) const \item -\mbox{\hyperlink{namespaceHurricane_a1912927c128eee859af62dbe4cbe0a6b}{Occurrences}} \mbox{\hyperlink{classHurricane_1_1Cell_a7fb09c8e350923c47ce4c4407bdb00ce}{get\+Occurrences\+Under}} (const \mbox{\hyperlink{classHurricane_1_1Box}{Box}} \&area, unsigned search\+Depth=std\+::numeric\+\_\+limits$<$ unsigned int $>$\+::max()) const +\mbox{\hyperlink{namespaceHurricane_a1912927c128eee859af62dbe4cbe0a6b}{Occurrences}} \mbox{\hyperlink{classHurricane_1_1Cell_aee27efc0497992f811c9812ffa272a5a}{get\+Occurrences\+Under}} (const \mbox{\hyperlink{classHurricane_1_1Box}{Box}} \&area, unsigned search\+Depth=std\+::numeric\+\_\+limits$<$ unsigned int $>$\+::max(), \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} threshold=0) const \item \mbox{\hyperlink{namespaceHurricane_a1912927c128eee859af62dbe4cbe0a6b}{Occurrences}} \mbox{\hyperlink{classHurricane_1_1Cell_a30b71d9a35ff4e0b59b98ef515f26fc0}{get\+Terminal\+Instance\+Occurrences}} () const \item @@ -83,7 +83,7 @@ void \mbox{\hyperlink{classHurricane_1_1Cell_ad2c9face922062664110c66ee205eab2}{ \item void \mbox{\hyperlink{classHurricane_1_1Cell_ab1949e2b708f0bd2d215ab90cfe864e0}{set\+Abutment\+Box}} (const \mbox{\hyperlink{classHurricane_1_1Box}{Box}} \&abutment\+Box) \item -void \mbox{\hyperlink{classHurricane_1_1Cell_a15958b25e911e8f5543557b6deea5618}{set\+Terminal\+Netlist}} (bool \mbox{\hyperlink{classHurricane_1_1Cell_a6fe2b5a80d4b344733416b25ea559497}{is\+Terminal\+Netlist}}) +void \mbox{\hyperlink{classHurricane_1_1Cell_a47ce34631bb9f6862caa13e5b25a4d8f}{set\+Terminal\+Netlist}} (bool state) \item void \mbox{\hyperlink{classHurricane_1_1Cell_affefc597317063857f4904d4b16d5d4f}{materialize}} () \item @@ -169,11 +169,11 @@ Returns the collection of all instances of the \mbox{\hyperlink{classHurricane_1 \subsubsection{\texorpdfstring{get\+Slave\+Instances()}{getSlaveInstances()}} {\footnotesize\ttfamily \mbox{\hyperlink{namespaceHurricane_ac9436b03a2926f34ad6863deae2baadc}{Instances}} Hurricane\+::\+Cell\+::get\+Slave\+Instances (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const} -Returns the \mbox{\hyperlink{classHurricane_1_1Collection}{Collection}} of instances whose master is this \mbox{\hyperlink{classHurricane_1_1Cell}{Cell}}. \mbox{\Hypertarget{classHurricane_1_1Cell_a63cb19881279b5af0a4e7dae707ef1bd}\label{classHurricane_1_1Cell_a63cb19881279b5af0a4e7dae707ef1bd}} +Returns the \mbox{\hyperlink{classHurricane_1_1Collection}{Collection}} of instances whose master is this \mbox{\hyperlink{classHurricane_1_1Cell}{Cell}}. \mbox{\Hypertarget{classHurricane_1_1Cell_a70f06abd224895aeeeeb042365dbf48a}\label{classHurricane_1_1Cell_a70f06abd224895aeeeeb042365dbf48a}} \index{Hurricane\+::\+Cell@{Hurricane\+::\+Cell}!get\+Net@{get\+Net}} \index{get\+Net@{get\+Net}!Hurricane\+::\+Cell@{Hurricane\+::\+Cell}} \subsubsection{\texorpdfstring{get\+Net()}{getNet()}} -{\footnotesize\ttfamily \mbox{\hyperlink{classHurricane_1_1Net}{Net}} $\ast$ Hurricane\+::\+Cell\+::get\+Net (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classHurricane_1_1Name}{Name}} \&}]{name }\end{DoxyParamCaption}) const} +{\footnotesize\ttfamily \mbox{\hyperlink{classHurricane_1_1Net}{Net}} $\ast$ Hurricane\+::\+Cell\+::get\+Net (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classHurricane_1_1Name}{Name}} \&}]{name, }\item[{bool}]{use\+Alias = {\ttfamily true} }\end{DoxyParamCaption}) const} Returns the \mbox{\hyperlink{classHurricane_1_1Net}{Net}} of name {\itshape name} if it exists, else {\ttfamily N\+U\+LL}. \mbox{\Hypertarget{classHurricane_1_1Cell_a8b4728abe83e9ec21d7bee1154218279}\label{classHurricane_1_1Cell_a8b4728abe83e9ec21d7bee1154218279}} \index{Hurricane\+::\+Cell@{Hurricane\+::\+Cell}!get\+Nets@{get\+Nets}} @@ -268,11 +268,11 @@ Returns the \mbox{\hyperlink{classHurricane_1_1Collection}{Collection}} of all O \begin{DoxyRemark}{Remarks} The search depth is decremented each time a hirearchical level is crossed. The search ends when depth becomes null (the value {\ttfamily I\+N\+F\+I\+N\+I\+TE} is equal to {\ttfamily }(unsigned)-\/1) . \end{DoxyRemark} -\mbox{\Hypertarget{classHurricane_1_1Cell_a7fb09c8e350923c47ce4c4407bdb00ce}\label{classHurricane_1_1Cell_a7fb09c8e350923c47ce4c4407bdb00ce}} +\mbox{\Hypertarget{classHurricane_1_1Cell_aee27efc0497992f811c9812ffa272a5a}\label{classHurricane_1_1Cell_aee27efc0497992f811c9812ffa272a5a}} \index{Hurricane\+::\+Cell@{Hurricane\+::\+Cell}!get\+Occurrences\+Under@{get\+Occurrences\+Under}} \index{get\+Occurrences\+Under@{get\+Occurrences\+Under}!Hurricane\+::\+Cell@{Hurricane\+::\+Cell}} \subsubsection{\texorpdfstring{get\+Occurrences\+Under()}{getOccurrencesUnder()}} -{\footnotesize\ttfamily \mbox{\hyperlink{namespaceHurricane_a1912927c128eee859af62dbe4cbe0a6b}{Occurrences}} Hurricane\+::\+Cell\+::get\+Occurrences\+Under (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classHurricane_1_1Box}{Box}} \&}]{area, }\item[{unsigned}]{search\+Depth = {\ttfamily std\+:\+:numeric\+\_\+limits$<$unsigned~int$>$\+:\+:max()} }\end{DoxyParamCaption}) const} +{\footnotesize\ttfamily \mbox{\hyperlink{namespaceHurricane_a1912927c128eee859af62dbe4cbe0a6b}{Occurrences}} Hurricane\+::\+Cell\+::get\+Occurrences\+Under (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classHurricane_1_1Box}{Box}} \&}]{area, }\item[{unsigned}]{search\+Depth = {\ttfamily std\+:\+:numeric\+\_\+limits$<$unsigned~int$>$\+:\+:max()}, }\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{threshold = {\ttfamily 0} }\end{DoxyParamCaption}) const} Returns the \mbox{\hyperlink{classHurricane_1_1Collection}{Collection}} of all Occurrences belonging to this \mbox{\hyperlink{classHurricane_1_1Cell}{Cell}} and intersecting the given rectangular area. @@ -324,11 +324,7 @@ Returns {\bfseries true} if the cell contains no instances. This is a layout lea \subsubsection{\texorpdfstring{is\+Terminal\+Netlist()}{isTerminalNetlist()}} {\footnotesize\ttfamily bool Hurricane\+::\+Cell\+::is\+Terminal\+Netlist (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}} -Returns {\bfseries true} if the \mbox{\hyperlink{classHurricane_1_1Cell}{Cell}} is marked as terminal for the {\itshape netlist} hierarchy. A terminal {\itshape netlist} cell may, however contains further level of physical (layout) instances. This is a state that can be set or unset. - -Referenced by set\+Terminal\+Netlist(). - -\mbox{\Hypertarget{classHurricane_1_1Cell_a6c2f2fd9f6f6e0578937a90c0c37a507}\label{classHurricane_1_1Cell_a6c2f2fd9f6f6e0578937a90c0c37a507}} +Returns {\bfseries true} if the \mbox{\hyperlink{classHurricane_1_1Cell}{Cell}} is marked as terminal for the {\itshape netlist} hierarchy. A terminal {\itshape netlist} cell may, however contains further level of physical (layout) instances. This is a state that can be set or unset. \mbox{\Hypertarget{classHurricane_1_1Cell_a6c2f2fd9f6f6e0578937a90c0c37a507}\label{classHurricane_1_1Cell_a6c2f2fd9f6f6e0578937a90c0c37a507}} \index{Hurricane\+::\+Cell@{Hurricane\+::\+Cell}!is\+Unique@{is\+Unique}} \index{is\+Unique@{is\+Unique}!Hurricane\+::\+Cell@{Hurricane\+::\+Cell}} \subsubsection{\texorpdfstring{is\+Unique()}{isUnique()}} @@ -368,17 +364,13 @@ sets \mbox{\hyperlink{classHurricane_1_1Cell}{Cell}} abutment box. \begin{DoxyRemark}{Remarks} At the \mbox{\hyperlink{classHurricane_1_1Cell}{Cell}} creation the abutment box is empty. This one must be set through this function. It is possible also, once fixed, to reset it to empty (undefined) by passing an empty \mbox{\hyperlink{classHurricane_1_1Box}{Box}} as argument. \end{DoxyRemark} -\mbox{\Hypertarget{classHurricane_1_1Cell_a15958b25e911e8f5543557b6deea5618}\label{classHurricane_1_1Cell_a15958b25e911e8f5543557b6deea5618}} +\mbox{\Hypertarget{classHurricane_1_1Cell_a47ce34631bb9f6862caa13e5b25a4d8f}\label{classHurricane_1_1Cell_a47ce34631bb9f6862caa13e5b25a4d8f}} \index{Hurricane\+::\+Cell@{Hurricane\+::\+Cell}!set\+Terminal\+Netlist@{set\+Terminal\+Netlist}} \index{set\+Terminal\+Netlist@{set\+Terminal\+Netlist}!Hurricane\+::\+Cell@{Hurricane\+::\+Cell}} \subsubsection{\texorpdfstring{set\+Terminal\+Netlist()}{setTerminalNetlist()}} {\footnotesize\ttfamily void Hurricane\+::\+Cell\+::set\+Terminal\+Netlist (\begin{DoxyParamCaption}\item[{bool}]{state }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}} -sets \mbox{\hyperlink{classHurricane_1_1Cell}{Cell}} {\itshape netlist} terminal status to {\itshape state}. - -References is\+Terminal\+Netlist(). - -\mbox{\Hypertarget{classHurricane_1_1Cell_affefc597317063857f4904d4b16d5d4f}\label{classHurricane_1_1Cell_affefc597317063857f4904d4b16d5d4f}} +sets \mbox{\hyperlink{classHurricane_1_1Cell}{Cell}} {\itshape netlist} terminal status to {\itshape state}. \mbox{\Hypertarget{classHurricane_1_1Cell_affefc597317063857f4904d4b16d5d4f}\label{classHurricane_1_1Cell_affefc597317063857f4904d4b16d5d4f}} \index{Hurricane\+::\+Cell@{Hurricane\+::\+Cell}!materialize@{materialize}} \index{materialize@{materialize}!Hurricane\+::\+Cell@{Hurricane\+::\+Cell}} \subsubsection{\texorpdfstring{materialize()}{materialize()}} diff --git a/hurricane/doc/hurricane/latex/classHurricane_1_1Contact.tex b/hurricane/doc/hurricane/latex/classHurricane_1_1Contact.tex index 8fa445a2..3cb33d43 100644 --- a/hurricane/doc/hurricane/latex/classHurricane_1_1Contact.tex +++ b/hurricane/doc/hurricane/latex/classHurricane_1_1Contact.tex @@ -31,46 +31,46 @@ typedef \mbox{\hyperlink{classHurricane_1_1Component}{Component}} \mbox{\hyperli \item \mbox{\hyperlink{classHurricane_1_1Component}{Component}} $\ast$ \mbox{\hyperlink{classHurricane_1_1Contact_ab0b327b306bf7ebda634f59d8d0cfd8f}{get\+Anchor}} () const \item -const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \& \mbox{\hyperlink{classHurricane_1_1Contact_acf8405f74b97239ea74ec629d0b4e194}{get\+Dx}} () const +\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \mbox{\hyperlink{classHurricane_1_1Contact_a8a5c4475668b6c6730ed5265e5447553}{get\+Dx}} () const \item -const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \& \mbox{\hyperlink{classHurricane_1_1Contact_aa7bc32ab9211fd5f6ad3aacdf1214f20}{get\+Dy}} () const +\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \mbox{\hyperlink{classHurricane_1_1Contact_af674c59fcaf1f5214d54a558fe30e41a}{get\+Dy}} () const \item -const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \& \mbox{\hyperlink{classHurricane_1_1Contact_a28bd18de9ca6e5cf2b77fce5e22af43a}{get\+Width}} () const +\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \mbox{\hyperlink{classHurricane_1_1Contact_a794ce7c3aa5ffe894c1231f7c5ac3c52}{get\+Width}} () const \item \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \mbox{\hyperlink{classHurricane_1_1Contact_a4a5136f4e8299435e50db7da28172ca1}{get\+Half\+Width}} () const \item -const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \& \mbox{\hyperlink{classHurricane_1_1Contact_adf6487485a4f48bd15aa6f9a8ac5fd27}{get\+Height}} () const +\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \mbox{\hyperlink{classHurricane_1_1Contact_a07a4ecc7ea2479e2d63f5f31d9325dde}{get\+Height}} () const \item \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \mbox{\hyperlink{classHurricane_1_1Contact_aebd3ff8e1368617ab750b20ae9ffb59b}{get\+Half\+Height}} () const \item -void \mbox{\hyperlink{classHurricane_1_1Contact_a147644849f33bc4d58b6b997543c8306}{set\+Layer}} (const \mbox{\hyperlink{classHurricane_1_1Layer}{Layer}} $\ast$layer) +void \mbox{\hyperlink{classHurricane_1_1Contact_aec627634d5b6cfc5079a02b1b518b50e}{set\+Layer}} (const \mbox{\hyperlink{classHurricane_1_1Layer}{Layer}} $\ast$) \item -void \mbox{\hyperlink{classHurricane_1_1Contact_aae6d5c96862fd6c834ff4abd61edc86f}{set\+Width}} (const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&width) +void \mbox{\hyperlink{classHurricane_1_1Contact_a08d14ce6cdf3696e472f4a621b936afe}{set\+Width}} (\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}) \item -void \mbox{\hyperlink{classHurricane_1_1Contact_a2fc2e7c85dc5495810544c48bb604712}{set\+Height}} (const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&height) +void \mbox{\hyperlink{classHurricane_1_1Contact_a6480b6a75cc098d3227f27080a2cb42b}{set\+Height}} (\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}) \item -void \mbox{\hyperlink{classHurricane_1_1Contact_aa18aa1e78eba9f4c10ece0e20683faf5}{set\+Sizes}} (const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&width, const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&height) +void \mbox{\hyperlink{classHurricane_1_1Contact_a1bded13596d448c6bb9c93271fffe5fd}{set\+Sizes}} (\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} width, \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} height) \item -void \mbox{\hyperlink{classHurricane_1_1Contact_a181436f128b65467e1ab94ffcb0c345b}{setX}} (const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&x) +void \mbox{\hyperlink{classHurricane_1_1Contact_a5b2338675993259feabb641fd9a1996e}{setX}} (\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}) \item -void \mbox{\hyperlink{classHurricane_1_1Contact_a455b8925aae10157c9143b58a3a52e57}{setY}} (const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&y) +void \mbox{\hyperlink{classHurricane_1_1Contact_a232a49a5dd180e9ff8dfb2bd2a67f2cd}{setY}} (\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}) \item -void \mbox{\hyperlink{classHurricane_1_1Contact_afac88ee8442e3e943a24bb526057851a}{set\+Position}} (const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&x, const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&y) +void \mbox{\hyperlink{classHurricane_1_1Contact_ae44d4d7655428705f13dca34c7167690}{set\+Position}} (\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} x, \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} y) \item -void \mbox{\hyperlink{classHurricane_1_1Contact_ad3ff25d47d1c00c53bb07bb0ff4067f1}{set\+Position}} (const \mbox{\hyperlink{classHurricane_1_1Point}{Point}} \&position) +void \mbox{\hyperlink{classHurricane_1_1Contact_aedcc63fe54538939c03fe81a16b0bae0}{set\+Position}} (const \mbox{\hyperlink{classHurricane_1_1Point}{Point}} \&) \item -void \mbox{\hyperlink{classHurricane_1_1Contact_a6ee60b9d228fe5487bf73dc396b94706}{set\+Dx}} (const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&dx) +void \mbox{\hyperlink{classHurricane_1_1Contact_a82f29c6b48b0c5a51fe3c1678d71876c}{set\+Dx}} (\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}) \item -void \mbox{\hyperlink{classHurricane_1_1Contact_a32ee96c21115ee9d197bc505fd48e37d}{set\+Dy}} (const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&dy) +void \mbox{\hyperlink{classHurricane_1_1Contact_ac5dadc06ae38c1ff287f031864f58850}{set\+Dy}} (\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}) \item -void \mbox{\hyperlink{classHurricane_1_1Contact_a41ba972136e77d768f58ad0407d18f8e}{set\+Offset}} (const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&dx, const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&dy) +void \mbox{\hyperlink{classHurricane_1_1Contact_a5c8cb75debcbe10aedc092e2089a975c}{set\+Offset}} (\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} dx, \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} dy) \end{DoxyCompactItemize} \subsection*{Static Public Member Functions} \begin{DoxyCompactItemize} \item -static \mbox{\hyperlink{classHurricane_1_1Contact}{Contact}} $\ast$ \mbox{\hyperlink{classHurricane_1_1Contact_a5402fec0518c81d35fbec2c2b2ec0f8f}{create}} (\mbox{\hyperlink{classHurricane_1_1Net}{Net}} $\ast$net, const \mbox{\hyperlink{classHurricane_1_1Layer}{Layer}} $\ast$layer, const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&x, const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&y, const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&width=0, const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&height=0) +static \mbox{\hyperlink{classHurricane_1_1Contact}{Contact}} $\ast$ \mbox{\hyperlink{classHurricane_1_1Contact_ab66989c2dce4d398f1f7647aca50d983}{create}} (\mbox{\hyperlink{classHurricane_1_1Net}{Net}} $\ast$net, const \mbox{\hyperlink{classHurricane_1_1Layer}{Layer}} $\ast$layer, \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} x, \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} y, \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} width=0, \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} height=0) \item -static \mbox{\hyperlink{classHurricane_1_1Contact}{Contact}} $\ast$ \mbox{\hyperlink{classHurricane_1_1Contact_a6645345f819cb4769fac075a0b1ea028}{create}} (\mbox{\hyperlink{classHurricane_1_1Component}{Component}} $\ast$anchor, const \mbox{\hyperlink{classHurricane_1_1Layer}{Layer}} $\ast$layer, const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&dx, const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&dy, const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&width=0, const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&height=0) +static \mbox{\hyperlink{classHurricane_1_1Contact}{Contact}} $\ast$ \mbox{\hyperlink{classHurricane_1_1Contact_a2e555edb8984b599c391f16db105c1f5}{create}} (\mbox{\hyperlink{classHurricane_1_1Component}{Component}} $\ast$anchor, const \mbox{\hyperlink{classHurricane_1_1Layer}{Layer}} $\ast$layer, \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} dx, \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} dy, \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} width=0, \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} height=0) \end{DoxyCompactItemize} @@ -90,22 +90,22 @@ Contacts are objects representing contact points within a net. A contact may hav Useful for calling upon methods of the base class without knowing it. \subsection{Member Function Documentation} -\mbox{\Hypertarget{classHurricane_1_1Contact_a5402fec0518c81d35fbec2c2b2ec0f8f}\label{classHurricane_1_1Contact_a5402fec0518c81d35fbec2c2b2ec0f8f}} +\mbox{\Hypertarget{classHurricane_1_1Contact_ab66989c2dce4d398f1f7647aca50d983}\label{classHurricane_1_1Contact_ab66989c2dce4d398f1f7647aca50d983}} \index{Hurricane\+::\+Contact@{Hurricane\+::\+Contact}!create@{create}} \index{create@{create}!Hurricane\+::\+Contact@{Hurricane\+::\+Contact}} \subsubsection{\texorpdfstring{create()}{create()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} -{\footnotesize\ttfamily \mbox{\hyperlink{classHurricane_1_1Contact}{Contact}} $\ast$ Hurricane\+::\+Contact\+::create (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classHurricane_1_1Net}{Net}} $\ast$}]{net, }\item[{const \mbox{\hyperlink{classHurricane_1_1Layer}{Layer}} $\ast$}]{layer, }\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{x, }\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{y, }\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{width = {\ttfamily 0}, }\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{height = {\ttfamily 0} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}} +{\footnotesize\ttfamily \mbox{\hyperlink{classHurricane_1_1Contact}{Contact}} $\ast$ Hurricane\+::\+Contact\+::create (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classHurricane_1_1Net}{Net}} $\ast$}]{net, }\item[{const \mbox{\hyperlink{classHurricane_1_1Layer}{Layer}} $\ast$}]{layer, }\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{x, }\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{y, }\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{width = {\ttfamily 0}, }\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{height = {\ttfamily 0} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}} creates and returns a new contact belonging to the net {\ttfamily $<$net$>$}, on the layer {\ttfamily $<$layer$>$}, of size {\ttfamily $<$width$>$} and {\ttfamily $<$height$>$} and located at the absolute coordinates {\ttfamily $<$x$>$} and {\ttfamily $<$y$>$}. \begin{DoxyParagraph}{Caution\+: Throws an exception if the layer or the net is null. } \end{DoxyParagraph} -\mbox{\Hypertarget{classHurricane_1_1Contact_a6645345f819cb4769fac075a0b1ea028}\label{classHurricane_1_1Contact_a6645345f819cb4769fac075a0b1ea028}} +\mbox{\Hypertarget{classHurricane_1_1Contact_a2e555edb8984b599c391f16db105c1f5}\label{classHurricane_1_1Contact_a2e555edb8984b599c391f16db105c1f5}} \index{Hurricane\+::\+Contact@{Hurricane\+::\+Contact}!create@{create}} \index{create@{create}!Hurricane\+::\+Contact@{Hurricane\+::\+Contact}} \subsubsection{\texorpdfstring{create()}{create()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} -{\footnotesize\ttfamily \mbox{\hyperlink{classHurricane_1_1Contact}{Contact}} $\ast$ Hurricane\+::\+Contact\+::create (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classHurricane_1_1Component}{Component}} $\ast$}]{anchor, }\item[{const \mbox{\hyperlink{classHurricane_1_1Layer}{Layer}} $\ast$}]{layer, }\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{dx, }\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{dy, }\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{width = {\ttfamily 0}, }\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{height = {\ttfamily 0} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}} +{\footnotesize\ttfamily \mbox{\hyperlink{classHurricane_1_1Contact}{Contact}} $\ast$ Hurricane\+::\+Contact\+::create (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classHurricane_1_1Component}{Component}} $\ast$}]{anchor, }\item[{const \mbox{\hyperlink{classHurricane_1_1Layer}{Layer}} $\ast$}]{layer, }\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{dx, }\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{dy, }\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{width = {\ttfamily 0}, }\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{height = {\ttfamily 0} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}} creates and returns a new contact on the layer {\ttfamily $<$layer$>$}, of size {\ttfamily $<$width$>$} and {\ttfamily $<$height$>$} attached upon the component {\ttfamily $<$anchor$>$} through an offset defined by {\ttfamily $<$dx$>$} et {\ttfamily $<$dy$>$}. @@ -127,33 +127,33 @@ The new contact belongs to the anchor\textquotesingle{}s net. \subsubsection{\texorpdfstring{get\+Anchor()}{getAnchor()}} {\footnotesize\ttfamily \mbox{\hyperlink{classHurricane_1_1Component}{Component}} $\ast$ Hurricane\+::\+Contact\+::get\+Anchor (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const} -The anchor hook of the contact being a slave one, it may have a master hook representing the body of the anchor on which it is attached. This method returns the owner of this master hook if it exists else N\+U\+LL (either the contact is an absolute one (its anchor hook is not inserted in a ring) or this ring doesn\textquotesingle{}t contain a master hook (lowly probable, transitory)). \mbox{\Hypertarget{classHurricane_1_1Contact_acf8405f74b97239ea74ec629d0b4e194}\label{classHurricane_1_1Contact_acf8405f74b97239ea74ec629d0b4e194}} +The anchor hook of the contact being a slave one, it may have a master hook representing the body of the anchor on which it is attached. This method returns the owner of this master hook if it exists else N\+U\+LL (either the contact is an absolute one (its anchor hook is not inserted in a ring) or this ring doesn\textquotesingle{}t contain a master hook (lowly probable, transitory)). \mbox{\Hypertarget{classHurricane_1_1Contact_a8a5c4475668b6c6730ed5265e5447553}\label{classHurricane_1_1Contact_a8a5c4475668b6c6730ed5265e5447553}} \index{Hurricane\+::\+Contact@{Hurricane\+::\+Contact}!get\+Dx@{get\+Dx}} \index{get\+Dx@{get\+Dx}!Hurricane\+::\+Contact@{Hurricane\+::\+Contact}} \subsubsection{\texorpdfstring{get\+Dx()}{getDx()}} -{\footnotesize\ttfamily const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \& Hurricane\+::\+Contact\+::get\+Dx (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}} +{\footnotesize\ttfamily \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} Hurricane\+::\+Contact\+::get\+Dx (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}} {\bfseries Returns\+:} the relative abscissa of the contact. \begin{DoxyRemark}{Remarks} If you want to get the absolute one use the member function get\+X() defined at the \mbox{\hyperlink{classHurricane_1_1Component}{Component}} level. \end{DoxyRemark} -\mbox{\Hypertarget{classHurricane_1_1Contact_aa7bc32ab9211fd5f6ad3aacdf1214f20}\label{classHurricane_1_1Contact_aa7bc32ab9211fd5f6ad3aacdf1214f20}} +\mbox{\Hypertarget{classHurricane_1_1Contact_af674c59fcaf1f5214d54a558fe30e41a}\label{classHurricane_1_1Contact_af674c59fcaf1f5214d54a558fe30e41a}} \index{Hurricane\+::\+Contact@{Hurricane\+::\+Contact}!get\+Dy@{get\+Dy}} \index{get\+Dy@{get\+Dy}!Hurricane\+::\+Contact@{Hurricane\+::\+Contact}} \subsubsection{\texorpdfstring{get\+Dy()}{getDy()}} -{\footnotesize\ttfamily const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \& Hurricane\+::\+Contact\+::get\+Dy (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}} +{\footnotesize\ttfamily \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} Hurricane\+::\+Contact\+::get\+Dy (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}} {\bfseries Returns\+:} the relative ordinate of the contact. \begin{DoxyRemark}{Remarks} If you want to get the absolute one use the member function get\+Y() defined at the \mbox{\hyperlink{classHurricane_1_1Component}{Component}} level. \end{DoxyRemark} -\mbox{\Hypertarget{classHurricane_1_1Contact_a28bd18de9ca6e5cf2b77fce5e22af43a}\label{classHurricane_1_1Contact_a28bd18de9ca6e5cf2b77fce5e22af43a}} +\mbox{\Hypertarget{classHurricane_1_1Contact_a794ce7c3aa5ffe894c1231f7c5ac3c52}\label{classHurricane_1_1Contact_a794ce7c3aa5ffe894c1231f7c5ac3c52}} \index{Hurricane\+::\+Contact@{Hurricane\+::\+Contact}!get\+Width@{get\+Width}} \index{get\+Width@{get\+Width}!Hurricane\+::\+Contact@{Hurricane\+::\+Contact}} \subsubsection{\texorpdfstring{get\+Width()}{getWidth()}} -{\footnotesize\ttfamily const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \& Hurricane\+::\+Contact\+::get\+Width (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}} +{\footnotesize\ttfamily \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} Hurricane\+::\+Contact\+::get\+Width (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}} {\bfseries Returns\+:} the contact width. \mbox{\Hypertarget{classHurricane_1_1Contact_a4a5136f4e8299435e50db7da28172ca1}\label{classHurricane_1_1Contact_a4a5136f4e8299435e50db7da28172ca1}} \index{Hurricane\+::\+Contact@{Hurricane\+::\+Contact}!get\+Half\+Width@{get\+Half\+Width}} @@ -161,11 +161,11 @@ If you want to get the absolute one use the member function get\+Y() defined at \subsubsection{\texorpdfstring{get\+Half\+Width()}{getHalfWidth()}} {\footnotesize\ttfamily \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} Hurricane\+::\+Contact\+::get\+Half\+Width (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}} -{\bfseries Returns\+:} the contact half width. \mbox{\Hypertarget{classHurricane_1_1Contact_adf6487485a4f48bd15aa6f9a8ac5fd27}\label{classHurricane_1_1Contact_adf6487485a4f48bd15aa6f9a8ac5fd27}} +{\bfseries Returns\+:} the contact half width. \mbox{\Hypertarget{classHurricane_1_1Contact_a07a4ecc7ea2479e2d63f5f31d9325dde}\label{classHurricane_1_1Contact_a07a4ecc7ea2479e2d63f5f31d9325dde}} \index{Hurricane\+::\+Contact@{Hurricane\+::\+Contact}!get\+Height@{get\+Height}} \index{get\+Height@{get\+Height}!Hurricane\+::\+Contact@{Hurricane\+::\+Contact}} \subsubsection{\texorpdfstring{get\+Height()}{getHeight()}} -{\footnotesize\ttfamily const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \& Hurricane\+::\+Contact\+::get\+Height (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}} +{\footnotesize\ttfamily \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} Hurricane\+::\+Contact\+::get\+Height (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}} {\bfseries Returns\+:} the contact height. \mbox{\Hypertarget{classHurricane_1_1Contact_aebd3ff8e1368617ab750b20ae9ffb59b}\label{classHurricane_1_1Contact_aebd3ff8e1368617ab750b20ae9ffb59b}} \index{Hurricane\+::\+Contact@{Hurricane\+::\+Contact}!get\+Half\+Height@{get\+Half\+Height}} @@ -173,81 +173,81 @@ If you want to get the absolute one use the member function get\+Y() defined at \subsubsection{\texorpdfstring{get\+Half\+Height()}{getHalfHeight()}} {\footnotesize\ttfamily \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} Hurricane\+::\+Contact\+::get\+Half\+Height (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}} -{\bfseries Returns\+:} the contact half height. \mbox{\Hypertarget{classHurricane_1_1Contact_a147644849f33bc4d58b6b997543c8306}\label{classHurricane_1_1Contact_a147644849f33bc4d58b6b997543c8306}} +{\bfseries Returns\+:} the contact half height. \mbox{\Hypertarget{classHurricane_1_1Contact_aec627634d5b6cfc5079a02b1b518b50e}\label{classHurricane_1_1Contact_aec627634d5b6cfc5079a02b1b518b50e}} \index{Hurricane\+::\+Contact@{Hurricane\+::\+Contact}!set\+Layer@{set\+Layer}} \index{set\+Layer@{set\+Layer}!Hurricane\+::\+Contact@{Hurricane\+::\+Contact}} \subsubsection{\texorpdfstring{set\+Layer()}{setLayer()}} {\footnotesize\ttfamily void Hurricane\+::\+Contact\+::set\+Layer (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classHurricane_1_1Layer}{Layer}} $\ast$}]{layer }\end{DoxyParamCaption})} -sets the contact layer. \mbox{\Hypertarget{classHurricane_1_1Contact_aae6d5c96862fd6c834ff4abd61edc86f}\label{classHurricane_1_1Contact_aae6d5c96862fd6c834ff4abd61edc86f}} +sets the contact layer. \mbox{\Hypertarget{classHurricane_1_1Contact_a08d14ce6cdf3696e472f4a621b936afe}\label{classHurricane_1_1Contact_a08d14ce6cdf3696e472f4a621b936afe}} \index{Hurricane\+::\+Contact@{Hurricane\+::\+Contact}!set\+Width@{set\+Width}} \index{set\+Width@{set\+Width}!Hurricane\+::\+Contact@{Hurricane\+::\+Contact}} \subsubsection{\texorpdfstring{set\+Width()}{setWidth()}} -{\footnotesize\ttfamily void Hurricane\+::\+Contact\+::set\+Width (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{width }\end{DoxyParamCaption})} +{\footnotesize\ttfamily void Hurricane\+::\+Contact\+::set\+Width (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{width }\end{DoxyParamCaption})} -sets the contact width. \mbox{\Hypertarget{classHurricane_1_1Contact_a2fc2e7c85dc5495810544c48bb604712}\label{classHurricane_1_1Contact_a2fc2e7c85dc5495810544c48bb604712}} +sets the contact width. \mbox{\Hypertarget{classHurricane_1_1Contact_a6480b6a75cc098d3227f27080a2cb42b}\label{classHurricane_1_1Contact_a6480b6a75cc098d3227f27080a2cb42b}} \index{Hurricane\+::\+Contact@{Hurricane\+::\+Contact}!set\+Height@{set\+Height}} \index{set\+Height@{set\+Height}!Hurricane\+::\+Contact@{Hurricane\+::\+Contact}} \subsubsection{\texorpdfstring{set\+Height()}{setHeight()}} -{\footnotesize\ttfamily void Hurricane\+::\+Contact\+::set\+Height (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{height }\end{DoxyParamCaption})} +{\footnotesize\ttfamily void Hurricane\+::\+Contact\+::set\+Height (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{height }\end{DoxyParamCaption})} -sets the contact height. \mbox{\Hypertarget{classHurricane_1_1Contact_aa18aa1e78eba9f4c10ece0e20683faf5}\label{classHurricane_1_1Contact_aa18aa1e78eba9f4c10ece0e20683faf5}} +sets the contact height. \mbox{\Hypertarget{classHurricane_1_1Contact_a1bded13596d448c6bb9c93271fffe5fd}\label{classHurricane_1_1Contact_a1bded13596d448c6bb9c93271fffe5fd}} \index{Hurricane\+::\+Contact@{Hurricane\+::\+Contact}!set\+Sizes@{set\+Sizes}} \index{set\+Sizes@{set\+Sizes}!Hurricane\+::\+Contact@{Hurricane\+::\+Contact}} \subsubsection{\texorpdfstring{set\+Sizes()}{setSizes()}} -{\footnotesize\ttfamily void Hurricane\+::\+Contact\+::set\+Sizes (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{width, }\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{height }\end{DoxyParamCaption})} +{\footnotesize\ttfamily void Hurricane\+::\+Contact\+::set\+Sizes (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{width, }\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{height }\end{DoxyParamCaption})} -sets both contact width and height. \mbox{\Hypertarget{classHurricane_1_1Contact_a181436f128b65467e1ab94ffcb0c345b}\label{classHurricane_1_1Contact_a181436f128b65467e1ab94ffcb0c345b}} +sets both contact width and height. \mbox{\Hypertarget{classHurricane_1_1Contact_a5b2338675993259feabb641fd9a1996e}\label{classHurricane_1_1Contact_a5b2338675993259feabb641fd9a1996e}} \index{Hurricane\+::\+Contact@{Hurricane\+::\+Contact}!setX@{setX}} \index{setX@{setX}!Hurricane\+::\+Contact@{Hurricane\+::\+Contact}} \subsubsection{\texorpdfstring{set\+X()}{setX()}} -{\footnotesize\ttfamily void Hurricane\+::\+Contact\+::setX (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{x }\end{DoxyParamCaption})} +{\footnotesize\ttfamily void Hurricane\+::\+Contact\+::setX (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{x }\end{DoxyParamCaption})} -Allows to change the absolute abscissa of the contact (if it has a location relative to an other component, only relative position to this last is accordingly changed). \mbox{\Hypertarget{classHurricane_1_1Contact_a455b8925aae10157c9143b58a3a52e57}\label{classHurricane_1_1Contact_a455b8925aae10157c9143b58a3a52e57}} +Allows to change the absolute abscissa of the contact (if it has a location relative to an other component, only relative position to this last is accordingly changed). \mbox{\Hypertarget{classHurricane_1_1Contact_a232a49a5dd180e9ff8dfb2bd2a67f2cd}\label{classHurricane_1_1Contact_a232a49a5dd180e9ff8dfb2bd2a67f2cd}} \index{Hurricane\+::\+Contact@{Hurricane\+::\+Contact}!setY@{setY}} \index{setY@{setY}!Hurricane\+::\+Contact@{Hurricane\+::\+Contact}} \subsubsection{\texorpdfstring{set\+Y()}{setY()}} -{\footnotesize\ttfamily void Hurricane\+::\+Contact\+::setY (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{y }\end{DoxyParamCaption})} +{\footnotesize\ttfamily void Hurricane\+::\+Contact\+::setY (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{y }\end{DoxyParamCaption})} -Allows to change the absolute ordinate of the contact (if it has a location relative to an other component, only relative position to this last is accordingly changed). \mbox{\Hypertarget{classHurricane_1_1Contact_afac88ee8442e3e943a24bb526057851a}\label{classHurricane_1_1Contact_afac88ee8442e3e943a24bb526057851a}} +Allows to change the absolute ordinate of the contact (if it has a location relative to an other component, only relative position to this last is accordingly changed). \mbox{\Hypertarget{classHurricane_1_1Contact_ae44d4d7655428705f13dca34c7167690}\label{classHurricane_1_1Contact_ae44d4d7655428705f13dca34c7167690}} \index{Hurricane\+::\+Contact@{Hurricane\+::\+Contact}!set\+Position@{set\+Position}} \index{set\+Position@{set\+Position}!Hurricane\+::\+Contact@{Hurricane\+::\+Contact}} \subsubsection{\texorpdfstring{set\+Position()}{setPosition()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} -{\footnotesize\ttfamily void Hurricane\+::\+Contact\+::set\+Position (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{x, }\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{y }\end{DoxyParamCaption})} +{\footnotesize\ttfamily void Hurricane\+::\+Contact\+::set\+Position (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{x, }\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{y }\end{DoxyParamCaption})} -No description. \mbox{\Hypertarget{classHurricane_1_1Contact_ad3ff25d47d1c00c53bb07bb0ff4067f1}\label{classHurricane_1_1Contact_ad3ff25d47d1c00c53bb07bb0ff4067f1}} +No description. \mbox{\Hypertarget{classHurricane_1_1Contact_aedcc63fe54538939c03fe81a16b0bae0}\label{classHurricane_1_1Contact_aedcc63fe54538939c03fe81a16b0bae0}} \index{Hurricane\+::\+Contact@{Hurricane\+::\+Contact}!set\+Position@{set\+Position}} \index{set\+Position@{set\+Position}!Hurricane\+::\+Contact@{Hurricane\+::\+Contact}} \subsubsection{\texorpdfstring{set\+Position()}{setPosition()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} {\footnotesize\ttfamily void Hurricane\+::\+Contact\+::set\+Position (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classHurricane_1_1Point}{Point}} \&}]{position }\end{DoxyParamCaption})} -Allows to change the absolute location of the contact (if it has a location relative to an other component, only relative position to this last is accordingly changed). \mbox{\Hypertarget{classHurricane_1_1Contact_a6ee60b9d228fe5487bf73dc396b94706}\label{classHurricane_1_1Contact_a6ee60b9d228fe5487bf73dc396b94706}} +Allows to change the absolute location of the contact (if it has a location relative to an other component, only relative position to this last is accordingly changed). \mbox{\Hypertarget{classHurricane_1_1Contact_a82f29c6b48b0c5a51fe3c1678d71876c}\label{classHurricane_1_1Contact_a82f29c6b48b0c5a51fe3c1678d71876c}} \index{Hurricane\+::\+Contact@{Hurricane\+::\+Contact}!set\+Dx@{set\+Dx}} \index{set\+Dx@{set\+Dx}!Hurricane\+::\+Contact@{Hurricane\+::\+Contact}} \subsubsection{\texorpdfstring{set\+Dx()}{setDx()}} -{\footnotesize\ttfamily void Hurricane\+::\+Contact\+::set\+Dx (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{dx }\end{DoxyParamCaption})} +{\footnotesize\ttfamily void Hurricane\+::\+Contact\+::set\+Dx (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{dx }\end{DoxyParamCaption})} Allows to change the horizontal offset of the contact. \begin{DoxyRemark}{Remarks} If the contact is absolute, this amounts to change its absolute abscissa. \end{DoxyRemark} -\mbox{\Hypertarget{classHurricane_1_1Contact_a32ee96c21115ee9d197bc505fd48e37d}\label{classHurricane_1_1Contact_a32ee96c21115ee9d197bc505fd48e37d}} +\mbox{\Hypertarget{classHurricane_1_1Contact_ac5dadc06ae38c1ff287f031864f58850}\label{classHurricane_1_1Contact_ac5dadc06ae38c1ff287f031864f58850}} \index{Hurricane\+::\+Contact@{Hurricane\+::\+Contact}!set\+Dy@{set\+Dy}} \index{set\+Dy@{set\+Dy}!Hurricane\+::\+Contact@{Hurricane\+::\+Contact}} \subsubsection{\texorpdfstring{set\+Dy()}{setDy()}} -{\footnotesize\ttfamily void Hurricane\+::\+Contact\+::set\+Dy (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{dy }\end{DoxyParamCaption})} +{\footnotesize\ttfamily void Hurricane\+::\+Contact\+::set\+Dy (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{dy }\end{DoxyParamCaption})} Allows to change the vertical offset of the contact. \begin{DoxyRemark}{Remarks} If the contact is absolute, this amounts to change its absolute ordinate. \end{DoxyRemark} -\mbox{\Hypertarget{classHurricane_1_1Contact_a41ba972136e77d768f58ad0407d18f8e}\label{classHurricane_1_1Contact_a41ba972136e77d768f58ad0407d18f8e}} +\mbox{\Hypertarget{classHurricane_1_1Contact_a5c8cb75debcbe10aedc092e2089a975c}\label{classHurricane_1_1Contact_a5c8cb75debcbe10aedc092e2089a975c}} \index{Hurricane\+::\+Contact@{Hurricane\+::\+Contact}!set\+Offset@{set\+Offset}} \index{set\+Offset@{set\+Offset}!Hurricane\+::\+Contact@{Hurricane\+::\+Contact}} \subsubsection{\texorpdfstring{set\+Offset()}{setOffset()}} -{\footnotesize\ttfamily void Hurricane\+::\+Contact\+::set\+Offset (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{dx, }\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{dy }\end{DoxyParamCaption})} +{\footnotesize\ttfamily void Hurricane\+::\+Contact\+::set\+Offset (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{dx, }\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{dy }\end{DoxyParamCaption})} Allows to change the offset of the contact. diff --git a/hurricane/doc/hurricane/latex/classHurricane_1_1Go.tex b/hurricane/doc/hurricane/latex/classHurricane_1_1Go.tex index 90d8308c..ac16522d 100644 --- a/hurricane/doc/hurricane/latex/classHurricane_1_1Go.tex +++ b/hurricane/doc/hurricane/latex/classHurricane_1_1Go.tex @@ -198,7 +198,7 @@ An already dematerialized object must not be taken in count in the current updat \end{DoxyCode} \begin{DoxyCode} -\textcolor{keywordtype}{void} \mbox{\hyperlink{classHurricane_1_1Contact_a147644849f33bc4d58b6b997543c8306}{Contact::setLayer}} ( Layer* layer ) +\textcolor{keywordtype}{void} \mbox{\hyperlink{classHurricane_1_1Contact_aec627634d5b6cfc5079a02b1b518b50e}{Contact::setLayer}} ( Layer* layer ) \{ \textcolor{keywordflow}{if} (!layer) \textcolor{keywordflow}{throw} Error(\textcolor{stringliteral}{"Can't set layer : null layer"}); diff --git a/hurricane/doc/hurricane/latex/classHurricane_1_1Point.tex b/hurricane/doc/hurricane/latex/classHurricane_1_1Point.tex index 2c32fb0e..b60bd714 100644 --- a/hurricane/doc/hurricane/latex/classHurricane_1_1Point.tex +++ b/hurricane/doc/hurricane/latex/classHurricane_1_1Point.tex @@ -20,9 +20,9 @@ bool \mbox{\hyperlink{classHurricane_1_1Point_a2aeb5fe96fbe9324dcbc90d41ad70fb9} \item bool \mbox{\hyperlink{classHurricane_1_1Point_ac6a0b7107f04913b78f96afa69e68d86}{operator!=}} (const \mbox{\hyperlink{classHurricane_1_1Point}{Point}} \&point) const \item -void \mbox{\hyperlink{classHurricane_1_1Point_a713ba6d38358fc1820371f74647b4214}{setX}} (const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&x) +void \mbox{\hyperlink{classHurricane_1_1Point_adebab98c82f881b1d2e1e7680a907830}{setX}} (\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} x) \item -void \mbox{\hyperlink{classHurricane_1_1Point_a5b5c5811c3e354235142eacffc2d887e}{setY}} (const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&y) +void \mbox{\hyperlink{classHurricane_1_1Point_a14a51f177d298ccccb25066c0298a268}{setY}} (\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} y) \item \mbox{\hyperlink{classHurricane_1_1Point}{Point}} \& \mbox{\hyperlink{classHurricane_1_1Point_a86d908d60346bc15f1af4e96eddbdb19}{translate}} (const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&dx, const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&dy) \end{DoxyCompactItemize} @@ -71,17 +71,17 @@ Equality operator. \mbox{\Hypertarget{classHurricane_1_1Point_ac6a0b7107f04913b7 \subsubsection{\texorpdfstring{operator"!=()}{operator!=()}} {\footnotesize\ttfamily bool Hurricane\+::\+Point\+::operator!= (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classHurricane_1_1Point}{Point}} \&}]{point }\end{DoxyParamCaption}) const} -Difference operator. \mbox{\Hypertarget{classHurricane_1_1Point_a713ba6d38358fc1820371f74647b4214}\label{classHurricane_1_1Point_a713ba6d38358fc1820371f74647b4214}} +Difference operator. \mbox{\Hypertarget{classHurricane_1_1Point_adebab98c82f881b1d2e1e7680a907830}\label{classHurricane_1_1Point_adebab98c82f881b1d2e1e7680a907830}} \index{Hurricane\+::\+Point@{Hurricane\+::\+Point}!setX@{setX}} \index{setX@{setX}!Hurricane\+::\+Point@{Hurricane\+::\+Point}} \subsubsection{\texorpdfstring{set\+X()}{setX()}} -{\footnotesize\ttfamily void Hurricane\+::\+Point\+::setX (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{x }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}} +{\footnotesize\ttfamily void Hurricane\+::\+Point\+::setX (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{x }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}} -Modifies point abscissa. \mbox{\Hypertarget{classHurricane_1_1Point_a5b5c5811c3e354235142eacffc2d887e}\label{classHurricane_1_1Point_a5b5c5811c3e354235142eacffc2d887e}} +Modifies point abscissa. \mbox{\Hypertarget{classHurricane_1_1Point_a14a51f177d298ccccb25066c0298a268}\label{classHurricane_1_1Point_a14a51f177d298ccccb25066c0298a268}} \index{Hurricane\+::\+Point@{Hurricane\+::\+Point}!setY@{setY}} \index{setY@{setY}!Hurricane\+::\+Point@{Hurricane\+::\+Point}} \subsubsection{\texorpdfstring{set\+Y()}{setY()}} -{\footnotesize\ttfamily void Hurricane\+::\+Point\+::setY (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}} \&}]{y }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}} +{\footnotesize\ttfamily void Hurricane\+::\+Point\+::setY (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__DbUGroup_ga4fbfa3e8c89347af76c9628ea06c4146}{Db\+U\+::\+Unit}}}]{y }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}} Modifies point ordinate. \mbox{\Hypertarget{classHurricane_1_1Point_a86d908d60346bc15f1af4e96eddbdb19}\label{classHurricane_1_1Point_a86d908d60346bc15f1af4e96eddbdb19}} \index{Hurricane\+::\+Point@{Hurricane\+::\+Point}!translate@{translate}} diff --git a/hurricane/doc/hurricane/latex/refman.tex b/hurricane/doc/hurricane/latex/refman.tex index 52adcda3..5c3c4667 100644 --- a/hurricane/doc/hurricane/latex/refman.tex +++ b/hurricane/doc/hurricane/latex/refman.tex @@ -34,7 +34,7 @@ \vspace*{1cm} {\large Generated by Doxygen 1.8.14}\\ \vspace*{0.5cm} - {\small Thu Nov 12 2020 13:58:48}\\ + {\small Fri Oct 1 2021 19:23:10}\\ \end{center} \end{titlepage} diff --git a/hurricane/doc/viewer/html/CellImage_8h_source.html b/hurricane/doc/viewer/html/CellImage_8h_source.html index 1c9c8a68..827811d7 100644 --- a/hurricane/doc/viewer/html/CellImage_8h_source.html +++ b/hurricane/doc/viewer/html/CellImage_8h_source.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/CellPrinter_8h_source.html b/hurricane/doc/viewer/html/CellPrinter_8h_source.html index 994e3c98..d5993198 100644 --- a/hurricane/doc/viewer/html/CellPrinter_8h_source.html +++ b/hurricane/doc/viewer/html/CellPrinter_8h_source.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/CellViewer_8h_source.html b/hurricane/doc/viewer/html/CellViewer_8h_source.html index 4102c188..0bd09bbf 100644 --- a/hurricane/doc/viewer/html/CellViewer_8h_source.html +++ b/hurricane/doc/viewer/html/CellViewer_8h_source.html @@ -72,7 +72,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/CellWidget_8h_source.html b/hurricane/doc/viewer/html/CellWidget_8h_source.html index 46fa168d..a08acc42 100644 --- a/hurricane/doc/viewer/html/CellWidget_8h_source.html +++ b/hurricane/doc/viewer/html/CellWidget_8h_source.html @@ -44,7 +44,7 @@ $(function() {
    CellWidget.h
    -
    1 // -*- C++ -*-
    2 //
    3 // This file is part of the Coriolis Software.
    4 // Copyright (c) UPMC/LIP6 2008-2018, All Rights Reserved
    5 //
    6 // +-----------------------------------------------------------------+
    7 // | C O R I O L I S |
    8 // | V L S I B a c k e n d D a t a - B a s e |
    9 // | |
    10 // | Author : Jean-Paul CHAPUT |
    11 // | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
    12 // | =============================================================== |
    13 // | C++ Header : "./hurricane/viewer/CellWidget.h" |
    14 // +-----------------------------------------------------------------+
    15 
    16 
    17 #pragma once
    18 #include <math.h>
    19 #include <vector>
    20 #include <functional>
    21 #include <memory>
    22 #include <boost/function.hpp>
    23 #include <QWidget>
    24 #include <QPixmap>
    25 #include <QPainter>
    26 #include <QPrinter>
    27 #include <QImage>
    28 #include <QRect>
    29 #include <QPoint>
    30 class QCursor;
    31 class QShowEvent;
    32 class QResizeEvent;
    33 class QMouseEvent;
    34 class QKeyEvent;
    35 class QAction;
    36 
    37 #include "hurricane/Timer.h"
    38 #include "hurricane/Commons.h"
    39 #include "hurricane/Warning.h"
    40 #include "hurricane/Point.h"
    41 #include "hurricane/Box.h"
    42 #include "hurricane/Transformation.h"
    43 #include "hurricane/Query.h"
    44 #include "hurricane/viewer/DisplayStyle.h"
    45 #include "hurricane/viewer/CellWidgets.h"
    46 #include "hurricane/viewer/Selector.h"
    47 #include "hurricane/viewer/SelectorCriterion.h"
    48 #include "hurricane/viewer/Ruler.h"
    49 
    50 
    51 namespace Hurricane {
    52 
    53  using std::vector;
    54  using std::unary_function;
    55  using std::shared_ptr;
    56 
    57  class Technology;
    58  class BasicLayer;
    59  class Go;
    60  class Net;
    61  class Cell;
    62  class Instance;
    63  class Slice;
    64  class Segment;
    65  class Contact;
    66  class Pad;
    67  class Selector;
    68  class PaletteWidget;
    69  class Command;
    70 //class MapView;
    71 
    72  enum UpdateState { ExternalEmit = 0
    73  , InternalEmit
    74  , InternalReceive
    75  };
    76 
    77 
    78 // -------------------------------------------------------------------
    79 // Class : "Hurricane::CellWidget".
    80 
    81 
    82  class CellWidget : public QWidget {
    83  Q_OBJECT;
    84 
    85  private:
    86  class DrawingPlanes;
    87  public:
    88  class State;
    89  typedef void ( DrawExtensionGo_t )( CellWidget*
    90  , const Go*
    91  , const BasicLayer*
    92  , const Box&
    93  , const Transformation&
    94  );
    95  typedef void ( InitExtensionGo_t )( CellWidget* );
    96  typedef boost::function< void(QPainter&) > PainterCb_t;
    97  enum RubberShape { Centric=1, Barycentric, Steiner };
    98  enum TextFlag { Bold =0x0001
    99  , BigFont =0x0002
    100  , Reverse =0x0004
    101  , Frame =0x0008
    102  , Rounded =0x0010
    103  , Center =0x0020
    104  , Left =0x0040
    105  , Right =0x0080
    106  , Top =0x0100
    107  };
    108  enum Flag { NoFlags =0x0000
    109  , NoResetCommands=0x0001
    110  };
    111  public:
    113  public:
    114  // Constructor & Destructor.
    115  CellWidget ( QWidget* parent=NULL );
    116  virtual ~CellWidget ();
    117  // Accessors.
    118  // MapView* getMapView () { return _mapView; };
    119  void setCell ( Cell*, Path topPath=Path(), unsigned int flags=NoFlags );
    120  inline Cell* getCell () const;
    121  inline Cell* getTopCell () const;
    122  inline Path getTopPath () const;
    123  inline shared_ptr<State>& getState ();
    124  inline shared_ptr<State> getStateClone ();
    125  inline PaletteWidget* getPalette ();
    126  inline Occurrences getOccurrencesUnder ( const QRect& ) const;
    127  Occurrences getOccurrencesUnder ( const Box& ) const;
    128  inline SelectorSet& getSelectorSet ();
    129  inline RulerSet& getRulerSet ();
    130  inline RubberShape getRubberShape () const;
    131  inline int getStartLevel () const;
    132  inline int getStopLevel () const;
    133  inline Query::Mask getQueryFilter () const ;
    134  void bindToPalette ( PaletteWidget* );
    135  void detachFromPalette ();
    136  void detach ( Selector*);
    137  void bindCommand ( Command* );
    138  void unbindCommand ( Command* );
    139  void resetCommands ();
    140  inline void setActiveCommand ( Command* );
    141  inline Command* getActiveCommand () const;
    142  Command* getCommand ( const std::string& ) const;
    143  inline void resetActiveCommand ();
    144  inline void setCursorStep ( DbU::Unit );
    145  inline void setRealSnapGridStep ( DbU::Unit step );
    146  inline unsigned int getDbuMode () const;
    147  inline bool gridMode () const;
    148  inline bool symbolicMode () const;
    149  inline bool physicalMode () const;
    150  inline DbU::UnitPower getUnitPower () const;
    151  inline bool showBoundaries () const;
    152  inline bool showSelection () const;
    153  inline bool cumulativeSelection () const;
    154  inline void setDbuMode ( int );
    155  inline void setUnitPower ( DbU::UnitPower );
    156  inline void setRubberShape ( RubberShape );
    157  inline void setStartLevel ( int );
    158  inline void setStopLevel ( int );
    159  inline void setQueryFilter ( Query::Mask );
    160  inline bool timeout ( const char*, const Timer&, double timeout, bool& timedout ) const;
    161  // Painter control & Hurricane objects drawing primitives.
    162  inline void setEnableRedrawInterrupt ( bool );
    163  inline void addDrawExtensionGo ( const Name&, InitExtensionGo_t*, DrawExtensionGo_t* );
    164  inline void copyDrawExtensionGos ( const CellWidget* );
    165  inline QPainter& getPainter ( size_t plane=PlaneId::Working );
    166  inline const DisplayStyle::HSVr& getDarkening () const;
    167  inline void copyToPrinter ( int xpaper, int ypaper, QPrinter*, PainterCb_t& );
    168  inline void copyToImage ( QImage*, PainterCb_t& );
    169  inline const float& getScale () const;
    170  inline const QPoint& getMousePosition () const;
    171  inline void updateMousePosition ();
    172  void setLayerVisible ( const Name& layer, bool visible );
    173  bool isLayerVisible ( const Name& );
    174  bool isDrawable ( const Name& );
    175  bool isDrawableLayer ( const Name& );
    176  bool isDrawableExtension ( const Name& );
    177  bool isSelectable ( const Name& ) const;
    178  bool isSelectable ( const Layer* ) const;
    179  bool isPrinter () const;
    180  void setPrinter ( bool );
    181  inline void setDarkening ( const DisplayStyle::HSVr& );
    182  inline void setPen ( const QPen& , size_t plane=PlaneId::Working );
    183  void drawBox ( DbU::Unit, DbU::Unit, DbU::Unit, DbU::Unit );
    184  void drawBox ( const Box& );
    185  void drawBoxBorder ( const Box& );
    186  void drawLine ( DbU::Unit, DbU::Unit, DbU::Unit, DbU::Unit, bool mode=true );
    187  void drawLine ( const Point&, const Point&, bool mode=true );
    188  void drawText ( const Point&, const char*, unsigned int flags=0, int angle=0 );
    189  void drawGrid ( QRect );
    190  void drawSpot ();
    191  void drawRuler ( shared_ptr<Ruler> );
    192  void drawRulers ( QRect );
    193  void drawDisplayText ( const QRect& , const char*, unsigned int flags=0 );
    194  void drawDisplayText ( const QPoint&, const char*, unsigned int flags=0, int angle=0 );
    195  void drawScreenPolygon ( const QPoint*, int count, size_t plane=PlaneId::Working );
    196  void drawScreenPolygon ( const QPolygon&, size_t plane=PlaneId::Working );
    197  void drawScreenLine ( const QPoint&, const QPoint&, size_t plane=PlaneId::Working, bool mode=true );
    198  void drawScreenRect ( const QPoint&, const QPoint&, size_t plane=PlaneId::Working );
    199  void drawScreenRect ( const QRect& , size_t plane=PlaneId::Working );
    200  void drawScreenPolyline ( const QPoint*, int, int, size_t plane=PlaneId::Working );
    201  // Geometric conversions.
    202  inline DbU::Unit toDbu ( float ) const;
    203  QRect dbuToScreenRect ( DbU::Unit x1, DbU::Unit y1, DbU::Unit x2, DbU::Unit y2, bool usePoint=true ) const;
    204  QRect dbuToScreenRect ( const Box& box , bool usePoint=true ) const;
    205  inline int dbuToScreenX ( DbU::Unit x ) const;
    206  inline int dbuToScreenY ( DbU::Unit y ) const;
    207  inline int dbuToScreenLength ( DbU::Unit length ) const;
    208  inline QPoint dbuToScreenPoint ( DbU::Unit x, DbU::Unit y ) const;
    209  inline QPoint dbuToScreenPoint ( const Point& point ) const;
    210  inline DbU::Unit screenToDbuLength ( int length ) const;
    211  inline DbU::Unit screenToDbuX ( int x ) const;
    212  inline DbU::Unit screenToDbuY ( int y ) const;
    213  inline Point screenToDbuPoint ( const QPoint& point ) const;
    214  inline Box screenToDbuBox ( const QRect& rect ) const;
    215  inline Box& pixelInflate ( Box&, int pixels ) const;
    216  inline Point getTopLeft () const;
    217  inline Box getVisibleArea () const;
    218  Box computeVisibleArea ( float scale ) const;
    219  Box computeVisibleArea ( float scale, const Point& topLeft ) const;
    220  Box computeVisibleArea ( const Box&, float& scale ) const;
    221  inline DbU::Unit cursorStep () const;
    222  inline bool _underDetailedGridThreshold() const;
    223  inline DbU::Unit _snapGridStep () const;
    224  inline DbU::Unit _onSnapGrid ( DbU::Unit ) const;
    225  inline Point _onSnapGrid ( const Point& ) const;
    226  inline DbU::Unit _onCursorGrid ( DbU::Unit ) const;
    227  inline Point _onCursorGrid ( const Point& ) const;
    228  // Qt QWidget Functions Overloads.
    229  void pushCursor ( Qt::CursorShape cursor );
    230  void popCursor ();
    231  virtual QSize minimumSizeHint () const;
    232  virtual void showEvent ( QShowEvent* );
    233  virtual void resizeEvent ( QResizeEvent* );
    234  virtual void wheelEvent ( QWheelEvent* );
    235  virtual void keyPressEvent ( QKeyEvent* );
    236  virtual void keyReleaseEvent ( QKeyEvent* );
    237  virtual void mouseMoveEvent ( QMouseEvent* );
    238  virtual void mousePressEvent ( QMouseEvent* );
    239  virtual void mouseReleaseEvent ( QMouseEvent* );
    240  signals:
    241  void cellChanged ( Cell* );
    242  void cellPreModificated ();
    243  void cellPostModificated ();
    244  void stateChanged ( shared_ptr<CellWidget::State>& );
    245  void styleChanged ();
    246  void queryFilterChanged ();
    247  void dbuModeChanged ( unsigned int mode, DbU::UnitPower );
    248  void updatePalette ( Cell* );
    249  void mousePositionChanged ( const Point& position );
    250  void selectionModeChanged ();
    251  void selectionChanged ( const SelectorSet& );
    252  void selectionToggled ( Selector* );
    253  void unlinkSelector ( Selector* );
    254  void showBoundariesToggled ( bool );
    255  protected:
    256  virtual void paintEvent ( QPaintEvent* );
    257  public slots:
    258  // Qt QWidget Slots Overload & CellWidget Specifics.
    259  void setState ( shared_ptr<CellWidget::State>&
    260  , unsigned int flags=NoFlags );
    261  inline void openRefreshSession ();
    262  inline void closeRefreshSession ();
    263  inline DrawingPlanes& getDrawingPlanes ();
    264  // void select ( const Net* );
    265  void select ( Occurrence );
    266  bool isSelected ( Occurrence );
    267  void selectOccurrencesUnder ( Box selectArea );
    268  // void unselect ( const Net* );
    269  void unselect ( Occurrence );
    270  void unselectAll ();
    271  void toggleSelection ( Occurrence );
    272  void setShowSelection ( bool state );
    273  void setCumulativeSelection ( bool state );
    274  // void _select ( const Net* );
    275  // void _unselect ( const Net* );
    276  // void _selectOccurrencesUnder ( Box selectArea );
    277  void _unselectAll ();
    278  inline void addRuler ( const Point&, const Point& );
    279  inline void addRuler ( shared_ptr<Ruler> );
    280  inline void clearRulers ();
    281  void changeQueryFilter ();
    282  void rubberChange ();
    283  void changeDbuMode ( unsigned int mode, DbU::UnitPower );
    284  void setStyle ( int id );
    285  void updatePalette ();
    286  void cellPreModificate ();
    287  void cellPostModificate ();
    288  inline void refresh ();
    289  void _redraw ( QRect redrawArea );
    290  inline void redrawSelection ();
    291  void redrawSelection ( QRect redrawArea );
    292  void goLeft ( int dx = 0 );
    293  void goRight ( int dx = 0 );
    294  void goUp ( int dy = 0 );
    295  void goDown ( int dy = 0 );
    296  void fitToContents ( bool historyEnable=true );
    297  void fitToNet ( const Net*, bool historyEnable=true );
    298  void setScale ( float );
    299  void scaleHistoryUp ();
    300  void scaleHistoryDown ();
    301  // void setGridMode ();
    302  // void setSymbolicMode ();
    303  // void setPhysicalMode ( DbU::UnitPower );
    304  void setShowBoundaries ( bool state );
    305  void reframe ();
    306  void reframe ( const Box& box, bool historyEnable=true );
    307  void displayReframe ();
    308  void _goLeft ( int dx );
    309  void _goRight ( int dx );
    310  void _goUp ( int dy );
    311  void _goDown ( int dy );
    312  void _refresh ();
    313  std::string _getString () const;
    314 
    315  private:
    316  class Spot {
    317  public:
    318  Spot ( CellWidget* );
    319  void setRestore ( bool );
    320  inline void setShowSpot ( bool );
    321  inline const QPoint& getSpotPoint () const;
    322  void restore ();
    323  QPoint computeSpotPoint ( const QPoint& );
    324  void moveTo ( const QPoint& );
    325  private:
    326  CellWidget* _cellWidget;
    327  QPoint _spotPoint;
    328  bool _restore;
    329  bool _showSpot;
    330  };
    331 
    332  private:
    333  class RedrawEvent {
    334  public:
    335  enum EventType { GoLeft = 1
    336  , GoRight = 2
    337  , GoUp = 3
    338  , GoDown = 4
    339  , Refresh = 5
    340  };
    341  public:
    342  RedrawEvent ( EventType, int shift, CellWidget* );
    343  inline EventType getType () const;
    344  inline int getShift () const;
    345  private:
    346  EventType _type;
    347  int _shift;
    348  };
    349 
    350  private:
    351  class RedrawManager {
    352  public:
    353  inline RedrawManager ( CellWidget* );
    354  ~RedrawManager ();
    355  void goLeft ( int );
    356  void goRight ( int );
    357  void goUp ( int );
    358  void goDown ( int );
    359  void refresh ();
    360  void process ();
    361  inline void stopProcessing ();
    362  inline bool isProcessing () const;
    363  inline bool interrupted () const;
    364  inline size_t getPendings () const;
    365  inline void openRefreshSession ();
    366  inline void closeRefreshSession ();
    367  private:
    368  CellWidget* _widget;
    369  list<RedrawEvent*> _events;
    370  int _refreshSession;
    371  bool _processing;
    372  bool _interrupted;
    373  };
    374 
    375  public:
    376  class PlaneId {
    377  public:
    378  enum Ids { Normal = 0 // _planes[0]
    379  , Selection = 1 // _planes[1]
    380  , AutoCopy = 2 // _planes[2]
    381  , Widget = 3
    382  , Printer = 4
    383  , Image = 5
    384  , Working = 6
    385  };
    386  };
    387 
    388  private:
    389  class DrawingPlanes {
    390  public:
    391  DrawingPlanes ( const QSize& size, CellWidget* cw );
    392  ~DrawingPlanes ();
    393  inline bool getLineMode () const;
    394  inline size_t getWorkingPlane () const;
    395  inline void pushWorkingPlane ();
    396  inline void popWorkingPlane ();
    397  inline int width () const;
    398  inline int height () const;
    399  inline QSize size () const;
    400  inline void select ( size_t i );
    401  inline QPainter& painter ( size_t i=PlaneId::Working );
    402  inline void begin ( size_t i=PlaneId::Working );
    403  inline void end ( size_t i=PlaneId::Working );
    404  inline void buffersBegin ();
    405  inline void buffersEnd ();
    406  void setLineMode ( bool mode );
    407  void setPen ( const QPen& pen );
    408  void setBrush ( const QBrush& brush );
    409  void setBackground ( const QBrush& brush );
    410  void setBackgroundMode ( Qt::BGMode mode );
    411  void resize ( const QSize& size );
    412  void shiftLeft ( int dx );
    413  void shiftRight ( int dx );
    414  void shiftUp ( int dy );
    415  void shiftDown ( int dy );
    416  inline void copyToSelect ();
    417  inline void copyToSelect ( const QRect& );
    418  void copyToSelect ( int sx, int sy, int h, int w );
    419  inline void copyToScreen ();
    420  void copyToScreen ( int sx, int sy, int h, int w );
    421  inline void copyToPrinter ( int xpaper, int ypaper, QPrinter*, CellWidget::PainterCb_t& );
    422  void copyToPrinter ( int xpaper, int ypaper, int sx, int sy, int h, int w, QPrinter*, CellWidget::PainterCb_t& );
    423  inline void copyToImage ( QImage*, CellWidget::PainterCb_t& );
    424  void copyToImage ( int sx, int sy, int h, int w, QImage*, CellWidget::PainterCb_t& );
    425  private:
    426  static const int _cartoucheWidth;
    427  static const int _cartoucheHeight;
    428  static const int _titleHeight;
    429  CellWidget* _cellWidget;
    430  QPrinter* _printer;
    431  QImage* _image;
    432  QPixmap* _planes[3];
    433  QPainter _painters[PlaneId::Working];
    434  QPen _normalPen;
    435  QPen _linePen;
    436  QPoint _brushOrigin;
    437  size_t _workingPlane;
    438  size_t _pushWorkingPlane;
    439  bool _lineMode;
    440  private:
    441  DrawingPlanes ( const DrawingPlanes& );
    442  DrawingPlanes& operator= ( const DrawingPlanes& );
    443  };
    444 
    445  private:
    446  class DrawingQuery : public Query {
    447  public:
    448  DrawingQuery ( CellWidget* widget );
    449  inline void setQuery ( const Box& area
    450  , const Transformation& transformation
    451  , const BasicLayer* basicLayer
    452  , ExtensionSlice::Mask extensionMask
    453  , unsigned int filter
    454  );
    455  inline void addDrawExtensionGo ( const Name&
    456  , InitExtensionGo_t*
    457  , DrawExtensionGo_t*
    458  );
    459  inline void copyDrawExtensionGos ( const DrawingQuery& );
    460  void setDrawExtensionGo ( const Name& );
    461  virtual bool hasMasterCellCallback () const;
    462  virtual bool hasGoCallback () const;
    463  virtual bool hasMarkerCallback () const;
    464  virtual bool hasRubberCallback () const;
    465  virtual bool hasExtensionGoCallback () const;
    466  virtual void masterCellCallback ();
    467  virtual void goCallback ( Go* );
    468  virtual void rubberCallback ( Rubber* );
    469  virtual void markerCallback ( Marker* );
    470  virtual void extensionGoCallback ( Go* );
    471  void drawMasterCell ( const Cell* cell
    472  , const Transformation& transformation
    473  );
    474  void drawGo ( const Go* go
    475  , const BasicLayer* basicLayer
    476  , const Box& area
    477  , const Transformation& transformation
    478  );
    479  void drawRubber ( const Rubber* rubber
    480  , const Box& area
    481  , const Transformation& transformation
    482  );
    483  void drawMarker ( const Marker* marker
    484  , const Box& area
    485  , const Transformation& transformation
    486  );
    487  void drawExtensionGo ( CellWidget* widget
    488  , const Go* go
    489  , const BasicLayer* basicLayer
    490  , const Box& area
    491  , const Transformation& transformation
    492  );
    493  inline unsigned int getGoCount () const;
    494  inline unsigned int getExtensionGoCount () const;
    495  inline unsigned int getInstanceCount () const;
    496  inline void resetGoCount ();
    497  inline void resetExtensionGoCount ();
    498  inline void resetInstanceCount ();
    499 
    500  protected:
    501  CellWidget* _cellWidget;
    502  DrawExtensionGo_t* _drawExtensionGo;
    503  map<Name,pair<InitExtensionGo_t*,DrawExtensionGo_t*> >
    504  _drawExtensionGos;
    505  unsigned int _goCount;
    506  unsigned int _extensionGoCount;
    507  unsigned int _instanceCount;
    508  };
    509 
    510  private:
    511  class TextDrawingQuery : public Query {
    512  public:
    513  TextDrawingQuery ( CellWidget* widget );
    514  inline void setQuery ( const Box& area
    515  , const Transformation& transformation
    516  );
    517  virtual bool hasMasterCellCallback () const;
    518  virtual bool hasGoCallback () const;
    519  virtual bool hasRubberCallback () const;
    520  virtual bool hasExtensionGoCallback () const;
    521  virtual void masterCellCallback ();
    522  virtual void goCallback ( Go* go );
    523  virtual void extensionGoCallback ( Go* go );
    524  virtual void rubberCallback ( Rubber* );
    525 
    526  protected:
    527  CellWidget* _cellWidget;
    528  };
    529 
    530  private:
    531  class SelectorCriterions {
    532  public:
    533  SelectorCriterions ();
    534  ~SelectorCriterions ();
    535  inline void setCellWidget ( CellWidget* );
    536  inline const vector<SelectorCriterion*>& getCriterions () const;
    537  SelectorCriterion* add ( const Net* net );
    538  SelectorCriterion* add ( Box area );
    539  inline SelectorCriterion* add ( SelectorCriterion* );
    540  bool remove ( const Net* net );
    541  void clear ();
    542  void invalidate ();
    543  void revalidate ();
    544  inline size_t size () const;
    545  private:
    546  CellWidget* _cellWidget;
    547  vector<SelectorCriterion*> _criterions;
    548  };
    549 
    550  public:
    551  class State {
    552  public:
    553  inline State ( Cell* cell=NULL, Path topPath=Path() );
    554  State* clone () const;
    555  inline void setCell ( Cell* );
    556  inline void setTopPath ( Path );
    557  inline void setCellWidget ( CellWidget* );
    558  inline void setCursorStep ( DbU::Unit );
    559  inline DbU::Unit getCursorStep () const;
    560  inline DbU::UnitPower getUnitPower () const;
    561  inline void setDbuMode ( int );
    562  inline void setUnitPower ( DbU::UnitPower );
    563  inline void setShowBoundaries ( bool );
    564  inline void setShowSelection ( bool );
    565  inline void setCumulativeSelection ( bool );
    566  void setScale ( float );
    567  inline void setTopLeft ( DbU::Unit, DbU::Unit );
    568  inline void setTopLeft ( const Point& );
    569  inline void setQueryFilter ( Query::Mask );
    570  inline void setStartLevel ( int );
    571  inline void setStopLevel ( int );
    572  inline void setRubberShape ( RubberShape );
    573  inline void setHistoryEnable ( bool );
    574  bool scaleHistoryUp ();
    575  bool scaleHistoryDown ();
    576  inline Cell* getCell () const;
    577  inline Cell* getTopCell () const;
    578  inline Path getTopPath () const;
    579  const Name& getName () const;
    580  inline SelectorCriterions& getSelection ();
    581  inline RulerSet& getRulers ();
    582  inline DbU::Unit cursorStep () const;
    583  inline unsigned int getDbuMode () const;
    584  inline bool gridMode () const;
    585  inline bool symbolicMode () const;
    586  inline bool physicalMode () const;
    587  inline bool nanoMode () const;
    588  inline bool microMode () const;
    589  inline bool showBoundaries () const;
    590  inline bool showSelection () const;
    591  inline bool cumulativeSelection () const;
    592  inline bool getHistoryEnable () const;
    593  inline size_t getHistorySize () const;
    594  inline const float& getScale () const;
    595  inline const Point& getTopLeft () const;
    596  inline Query::Mask getQueryFilter () const;
    597  inline int getStartLevel () const;
    598  inline int getStopLevel () const;
    599  inline RubberShape getRubberShape () const;
    600 
    601  private:
    602  class ScaleEntry {
    603  public:
    604  inline ScaleEntry ( float, const Point& );
    605  public:
    606  float _scale;
    607  Point _topLeft;
    608  };
    609 
    610  private:
    611  Cell* _cell;
    612  Path _topPath;
    613  Name _hierarchicalName;
    614  CellWidget* _cellWidget;
    615  SelectorCriterions _selection;
    616  RulerSet _rulers;
    617  DbU::Unit _cursorStep;
    618  unsigned int _dbuMode;
    619  DbU::UnitPower _unitPower;
    620  bool _showBoundaries;
    621  bool _showSelection;
    622  Query::Mask _queryFilter;
    623  int _startLevel;
    624  int _stopLevel;
    625  RubberShape _rubberShape;
    626  bool _cumulativeSelection;
    627  vector<ScaleEntry> _scaleHistory;
    628  size_t _ihistory;
    629  bool _historyEnable;
    630  };
    631  public:
    632  class FindStateName : public unary_function< const shared_ptr<State>&, bool > {
    633  public:
    634  inline FindStateName ( const Name& );
    635  inline bool operator() ( const shared_ptr<State>& );
    636  private:
    637  const Name _cellHierName;
    638  };
    639 
    640  protected:
    641  // Internal: Attributes.
    642  static int _initialSide;
    643  vector<Qt::CursorShape> _cursors;
    644  // MapView* _mapView;
    645  Technology* _technology;
    646  PaletteWidget* _palette;
    647  Box _screenArea;
    648  RedrawManager _redrawManager;
    649  DrawingPlanes _drawingPlanes;
    650  DrawingQuery _drawingQuery;
    651  TextDrawingQuery _textDrawingQuery;
    652  DisplayStyle::HSVr _darkening;
    653  QPoint _mousePosition;
    654  Spot _spot;
    655  shared_ptr<State> _state;
    656  bool _isPrinter;
    657  bool _cellChanged;
    658  bool _selectionHasChanged;
    659  int _delaySelectionChanged;
    660  bool _cellModificated;
    661  bool _enableRedrawInterrupt;
    662  SelectorSet _selectors;
    663  Command* _activeCommand;
    664  vector<Command*> _commands;
    665  size_t _redrawRectCount;
    666  int _textFontHeight;
    667 
    668  friend class RedrawManager;
    669  };
    670 
    671 
    672  inline void CellWidget::Spot::setShowSpot ( bool show )
    673  { _showSpot = show; }
    674 
    675 
    676  inline const QPoint& CellWidget::Spot::getSpotPoint () const
    677  { return _spotPoint; }
    678 
    679 
    680  inline void CellWidget::DrawingQuery::setQuery ( const Box& area
    681  , const Transformation& transformation
    682  , const BasicLayer* basicLayer
    683  , ExtensionSlice::Mask extensionMask
    684  , unsigned int filter
    685  )
    686  {
    687  Query::setQuery ( _cellWidget->getCell()
    688  , area
    689  , transformation
    690  , basicLayer
    691  , extensionMask
    692  , filter
    693  );
    694  }
    695 
    696 
    697  inline void CellWidget::setEnableRedrawInterrupt ( bool state )
    698  { _enableRedrawInterrupt = state; }
    699 
    700 
    701  inline void CellWidget::openRefreshSession ()
    702  { _redrawManager.openRefreshSession (); }
    703 
    704 
    705  inline void CellWidget::closeRefreshSession ()
    706  { _redrawManager.closeRefreshSession (); }
    707 
    708 
    709  inline void CellWidget::DrawingQuery::addDrawExtensionGo ( const Name& name
    710  , InitExtensionGo_t* initExtensionGo
    711  , DrawExtensionGo_t* drawExtensionGo
    712  )
    713  { _drawExtensionGos[name] = make_pair(initExtensionGo,drawExtensionGo); }
    714 
    715 
    716  inline void CellWidget::DrawingQuery::copyDrawExtensionGos ( const CellWidget::DrawingQuery& other )
    717  { _drawExtensionGos = other._drawExtensionGos; }
    718 
    719 
    720  inline void CellWidget::DrawingQuery::resetGoCount ()
    721  { _goCount = 0; }
    722 
    723 
    724  inline void CellWidget::DrawingQuery::resetExtensionGoCount ()
    725  { _extensionGoCount = 0; }
    726 
    727 
    728  inline void CellWidget::DrawingQuery::resetInstanceCount ()
    729  { _instanceCount = 0; }
    730 
    731 
    732  inline unsigned int CellWidget::DrawingQuery::getGoCount () const
    733  { return _goCount; }
    734 
    735 
    736  inline unsigned int CellWidget::DrawingQuery::getExtensionGoCount () const
    737  { return _extensionGoCount; }
    738 
    739 
    740  inline unsigned int CellWidget::DrawingQuery::getInstanceCount () const
    741  { return _instanceCount; }
    742 
    743 
    744  inline CellWidget::RedrawEvent::EventType CellWidget::RedrawEvent::getType () const
    745  { return _type; }
    746 
    747 
    748  inline int CellWidget::RedrawEvent::getShift () const
    749  { return _shift; }
    750 
    751 
    752  inline bool CellWidget::RedrawManager::isProcessing () const
    753  { return _processing; }
    754 
    755 
    756  inline void CellWidget::RedrawManager::stopProcessing ()
    757  { _processing = false; }
    758 
    759 
    760  inline size_t CellWidget::RedrawManager::getPendings () const
    761  { return _events.size(); }
    762 
    763 
    764  inline void CellWidget::RedrawManager::openRefreshSession ()
    765  { _refreshSession++; }
    766 
    767 
    768  inline void CellWidget::RedrawManager::closeRefreshSession ()
    769  {
    770  _refreshSession--;
    771  if ( !_processing && (_refreshSession == 0) ) process ();
    772  }
    773 
    774 
    775  inline bool CellWidget::RedrawManager::interrupted () const
    776  {
    777 #ifdef ALLOW_REQUEST_INTERRUPT
    778  return ( _events.size() > 5 ) || _interrupted;
    779 #else
    780  return _interrupted;
    781 #endif
    782  }
    783 
    784 
    785  inline bool CellWidget::DrawingPlanes::getLineMode () const
    786  { return _lineMode; }
    787 
    788 
    789  inline size_t CellWidget::DrawingPlanes::getWorkingPlane () const
    790  { return _workingPlane; }
    791 
    792 
    793  inline void CellWidget::DrawingPlanes::pushWorkingPlane ()
    794  { _pushWorkingPlane = _workingPlane; }
    795 
    796 
    797  inline void CellWidget::DrawingPlanes::popWorkingPlane ()
    798  { _workingPlane = _pushWorkingPlane; }
    799 
    800 
    801  inline int CellWidget::DrawingPlanes::width () const
    802  { return _planes[PlaneId::Normal]->width(); }
    803 
    804 
    805  inline int CellWidget::DrawingPlanes::height () const
    806  { return _planes[PlaneId::Normal]->height(); }
    807 
    808 
    809  inline QSize CellWidget::DrawingPlanes::size () const
    810  { return _planes[PlaneId::Normal]->size(); }
    811 
    812 
    813  inline void CellWidget::DrawingPlanes::select ( size_t i )
    814  { _workingPlane = i; }
    815 
    816 
    817  inline QPainter& CellWidget::DrawingPlanes::painter ( size_t i )
    818  { return _painters[ (i>=PlaneId::Working) ? _workingPlane : i ]; }
    819 
    820 
    821  inline void CellWidget::DrawingPlanes::begin ( size_t i )
    822  {
    823  size_t wp = (i>=PlaneId::Working) ? _workingPlane : i;
    824  switch ( wp ) {
    825  case PlaneId::Normal:
    826  case PlaneId::Selection:
    827  case PlaneId::AutoCopy: _painters[wp ].begin( _planes[wp] ); break;
    828  case PlaneId::Widget: _painters[PlaneId::Widget ].begin( _cellWidget ); break;
    829  case PlaneId::Printer: _painters[PlaneId::Printer].begin( _printer ); break;
    830  case PlaneId::Image: _painters[PlaneId::Image ].begin( _image ); break;
    831  default:
    832  std::cerr << "[BUG] Bad plane selection." << std::endl;
    833  }
    834  }
    835 
    836 
    837  inline void CellWidget::DrawingPlanes::end ( size_t i )
    838  { _painters[(i>=PlaneId::Working)?_workingPlane:i].end (); }
    839 
    840 
    841  inline void CellWidget::DrawingPlanes::buffersBegin ()
    842  {
    843  begin( PlaneId::Normal );
    844  begin( PlaneId::Selection );
    845  begin( PlaneId::AutoCopy );
    846  }
    847 
    848 
    849  inline void CellWidget::DrawingPlanes::buffersEnd ()
    850  {
    851  end( PlaneId::Normal );
    852  end( PlaneId::Selection );
    853  end( PlaneId::AutoCopy );
    854  }
    855 
    856 
    857  inline void CellWidget::DrawingPlanes::copyToSelect ()
    858  { copyToSelect ( 0, 0, width(), height() ); }
    859 
    860 
    861  inline void CellWidget::DrawingPlanes::copyToSelect ( const QRect& r )
    862  { copyToSelect ( r.x(), r.y(), r.width(), r.height() ); }
    863 
    864 
    865  inline void CellWidget::DrawingPlanes::copyToScreen ()
    866  { copyToScreen ( 0, 0, width(), height() ); }
    867 
    868 
    869  inline void CellWidget::DrawingPlanes::copyToPrinter ( int xpaper, int ypaper, QPrinter* printer, CellWidget::PainterCb_t& cb )
    870  {
    871  copyToPrinter ( xpaper
    872  , ypaper
    873  , 0
    874  , 0
    875  , _cellWidget->geometry().width()
    876  , _cellWidget->geometry().height()
    877  , printer
    878  , cb
    879  );
    880  }
    881 
    882 
    883  inline void CellWidget::DrawingPlanes::copyToImage ( QImage* image, CellWidget::PainterCb_t& cb )
    884  {
    885  copyToImage ( 0
    886  , 0
    887  , _cellWidget->geometry().width()
    888  , _cellWidget->geometry().height()
    889  , image
    890  , cb
    891  );
    892  }
    893 
    894 
    895  inline void CellWidget::SelectorCriterions::setCellWidget ( CellWidget* cw )
    896  { _cellWidget = cw; }
    897 
    898 
    899  inline size_t CellWidget::SelectorCriterions::size () const
    900  { return _criterions.size(); }
    901 
    902 
    903  inline const vector<SelectorCriterion*>& CellWidget::SelectorCriterions::getCriterions () const
    904  { return _criterions; }
    905 
    906 
    907  inline SelectorCriterion* CellWidget::SelectorCriterions::add ( SelectorCriterion* criterion )
    908  {
    909  _criterions.push_back( criterion );
    910  return _criterions.back();
    911  }
    912 
    913 
    914  inline CellWidget::State::ScaleEntry::ScaleEntry ( float scale, const Point& topLeft )
    915  : _scale(scale), _topLeft(topLeft)
    916  { }
    917 
    918 
    919  inline CellWidget::State::State ( Cell* cell, Path topPath )
    920  : _cell (cell)
    921  , _topPath (topPath)
    922  , _hierarchicalName ()
    923  , _cellWidget (NULL)
    924  , _selection ()
    925  , _rulers ()
    926  , _cursorStep (DbU::lambda(0.5))
    927  , _dbuMode (DbU::Symbolic)
    928  , _unitPower (DbU::Nano)
    929  , _showBoundaries (true)
    930  , _showSelection (false)
    931  , _queryFilter (~Query::DoTerminalCells)
    932  , _startLevel (0)
    933  , _stopLevel (99)
    934  , _rubberShape (CellWidget::Barycentric)
    935  , _cumulativeSelection(false)
    936  , _scaleHistory ()
    937  , _ihistory (0)
    938  , _historyEnable (false)
    939  {
    940  _scaleHistory.push_back ( ScaleEntry(1.0,Point(0,0)) );
    941  if (_cell) _hierarchicalName = Name( _cell->getHierarchicalName() );
    942  }
    943 
    944 
    945  inline unsigned int CellWidget::State::getDbuMode () const
    946  { return _dbuMode; }
    947 
    948 
    949  inline bool CellWidget::State::symbolicMode () const
    950  { return (_dbuMode == DbU::Symbolic); }
    951 
    952 
    953  inline bool CellWidget::State::gridMode () const
    954  { return (_dbuMode == DbU::Grid); }
    955 
    956 
    957  inline bool CellWidget::State::physicalMode () const
    958  { return (_dbuMode == DbU::Physical); }
    959 
    960 
    961  inline void CellWidget::State::setCell ( Cell* cell )
    962  {
    963  _cell = cell;
    964  if (_cell) _hierarchicalName = Name( _cell->getHierarchicalName() );
    965  }
    966 
    967 
    968  inline void CellWidget::State::setTopPath ( Path topPath )
    969  { _topPath = topPath; }
    970 
    971 
    972  inline void CellWidget::State::setCellWidget ( CellWidget* cw )
    973  {
    974  _cellWidget = cw;
    975  _selection.setCellWidget ( cw );
    976  }
    977 
    978 
    979  inline void CellWidget::State::setCursorStep ( DbU::Unit step )
    980  { _cursorStep = step; }
    981 
    982  inline DbU::Unit CellWidget::State::getCursorStep () const
    983  { return _cursorStep; }
    984 
    985 
    986  inline DbU::UnitPower CellWidget::State::getUnitPower () const
    987  { return _unitPower; }
    988 
    989 
    990  inline void CellWidget::State::setDbuMode ( int mode )
    991  {
    992  _dbuMode = mode;
    993  switch ( _dbuMode ) {
    994  case DbU::Symbolic: _cursorStep = DbU::fromLambda(0.5); break;
    995  case DbU::Grid: _cursorStep = DbU::fromGrid (1.0); break;
    996  case DbU::Physical: _cursorStep = DbU::fromGrid (1.0); break;
    997  }
    998  }
    999 
    1000 
    1001  inline void CellWidget::State::setUnitPower ( DbU::UnitPower p )
    1002  { _unitPower = p; }
    1003 
    1004 
    1005  inline void CellWidget::State::setShowBoundaries ( bool state )
    1006  { _showBoundaries = state; }
    1007 
    1008 
    1009  inline void CellWidget::State::setShowSelection ( bool state )
    1010  { _showSelection = state; }
    1011 
    1012 
    1013  inline void CellWidget::State::setCumulativeSelection ( bool state )
    1014  { _cumulativeSelection = state; }
    1015 
    1016 
    1017  inline void CellWidget::State::setTopLeft ( DbU::Unit x, DbU::Unit y )
    1018  {
    1019  _scaleHistory[_ihistory]._topLeft.setX(x);
    1020  _scaleHistory[_ihistory]._topLeft.setY(y);
    1021  }
    1022 
    1023 
    1024  inline void CellWidget::State::setTopLeft ( const Point& topLeft )
    1025  { _scaleHistory[_ihistory]._topLeft = topLeft; }
    1026 
    1027 
    1028  inline void CellWidget::State::setQueryFilter ( Query::Mask mask )
    1029  { _queryFilter = mask; }
    1030 
    1031 
    1032  inline void CellWidget::State::setStartLevel ( int level )
    1033  { _startLevel = level; }
    1034 
    1035 
    1036  inline void CellWidget::State::setStopLevel ( int level )
    1037  { _stopLevel = level; }
    1038 
    1039 
    1040  inline void CellWidget::State::setRubberShape ( RubberShape shape )
    1041  { _rubberShape = shape; }
    1042 
    1043 
    1044  inline void CellWidget::State::setHistoryEnable ( bool enable )
    1045  { _historyEnable = enable; }
    1046 
    1047 
    1048  inline Cell* CellWidget::State::getCell () const
    1049  { return _cell; }
    1050 
    1051 
    1052  inline Path CellWidget::State::getTopPath () const
    1053  { return _topPath; }
    1054 
    1055 
    1056  inline Cell* CellWidget::State::getTopCell () const
    1057  { return (_topPath.isEmpty()) ? _cell : _topPath.getOwnerCell(); }
    1058 
    1059 
    1060  inline DbU::Unit CellWidget::State::cursorStep () const
    1061  { return _cursorStep; }
    1062 
    1063 
    1064  inline CellWidget::SelectorCriterions& CellWidget::State::getSelection ()
    1065  { return _selection; }
    1066 
    1067 
    1068  inline RulerSet& CellWidget::State::getRulers ()
    1069  { return _rulers; }
    1070 
    1071 
    1072  inline bool CellWidget::State::showBoundaries () const
    1073  { return _showBoundaries; }
    1074 
    1075 
    1076  inline bool CellWidget::State::showSelection () const
    1077  { return _showSelection; }
    1078 
    1079 
    1080  inline bool CellWidget::State::cumulativeSelection () const
    1081  { return _cumulativeSelection; }
    1082 
    1083 
    1084  inline bool CellWidget::State::getHistoryEnable () const
    1085  { return _historyEnable; }
    1086 
    1087 
    1088  inline size_t CellWidget::State::getHistorySize () const
    1089  { return _scaleHistory.size(); }
    1090 
    1091 
    1092  inline const Point& CellWidget::State::getTopLeft () const
    1093  { return _scaleHistory[_ihistory]._topLeft; }
    1094 
    1095 
    1096  inline Query::Mask CellWidget::State::getQueryFilter () const
    1097  { return _queryFilter; }
    1098 
    1099 
    1100  inline int CellWidget::State::getStartLevel () const
    1101  { return _startLevel; }
    1102 
    1103 
    1104  inline int CellWidget::State::getStopLevel () const
    1105  { return _stopLevel; }
    1106 
    1107 
    1108  inline CellWidget::RubberShape CellWidget::State::getRubberShape () const
    1109  { return _rubberShape; }
    1110 
    1111 
    1112  inline const float& CellWidget::State::getScale () const
    1113  { return _scaleHistory[_ihistory]._scale; }
    1114 
    1115 
    1116  inline CellWidget::FindStateName::FindStateName ( const Name& cellHierName )
    1117  : unary_function< const shared_ptr<State>&, bool >()
    1118  , _cellHierName(cellHierName)
    1119  { }
    1120 
    1121 
    1122  inline bool CellWidget::FindStateName::operator () ( const shared_ptr<State>& state )
    1123  { return state->getName() == _cellHierName; }
    1124 
    1125 
    1126  inline void CellWidget::setActiveCommand ( Command* command )
    1127  { _activeCommand = command; }
    1128 
    1129 
    1130  inline Command* CellWidget::getActiveCommand () const
    1131  { return _activeCommand; }
    1132 
    1133 
    1134  inline void CellWidget::resetActiveCommand ()
    1135  { _activeCommand = NULL; }
    1136 
    1137 
    1138  inline void CellWidget::setCursorStep ( DbU::Unit step )
    1139  { _state->setCursorStep(step); }
    1140 
    1141 
    1142  inline void CellWidget::setRealSnapGridStep ( DbU::Unit step )
    1143  { DbU::setRealSnapGridStep(step); }
    1144 
    1145 
    1146  inline shared_ptr<CellWidget::State>& CellWidget::getState ()
    1147  {
    1148  _state->setTopLeft ( getTopLeft() );
    1149  return _state;
    1150  }
    1151 
    1152 
    1153  inline shared_ptr<CellWidget::State> CellWidget::getStateClone ()
    1154  {
    1155  _state->setTopLeft ( getTopLeft() );
    1156  return shared_ptr<State>( _state->clone() );
    1157  }
    1158 
    1159 
    1160  inline void CellWidget::addDrawExtensionGo ( const Name& name
    1161  , InitExtensionGo_t* initExtensionGo
    1162  , DrawExtensionGo_t* drawExtensionGo
    1163  )
    1164  { _drawingQuery.addDrawExtensionGo( name, initExtensionGo, drawExtensionGo ); }
    1165 
    1166 
    1167  inline void CellWidget::copyDrawExtensionGos ( const CellWidget* other )
    1168  { _drawingQuery.copyDrawExtensionGos( other->_drawingQuery ); }
    1169 
    1170 
    1171  inline void CellWidget::setStartLevel ( int level )
    1172  {
    1173  _drawingQuery.setStartLevel ( level );
    1174  _state->setStartLevel ( level );
    1175  emit queryFilterChanged ();
    1176  }
    1177 
    1178 
    1179  inline void CellWidget::setStopLevel ( int level )
    1180  {
    1181  _drawingQuery.setStopLevel ( level );
    1182  _state->setStopLevel ( level );
    1183  emit queryFilterChanged ();
    1184  }
    1185 
    1186 
    1187  inline int CellWidget::getStartLevel () const
    1188  { return _drawingQuery.getStartLevel (); }
    1189 
    1190 
    1191  inline int CellWidget::getStopLevel () const
    1192  { return _drawingQuery.getStopLevel (); }
    1193 
    1194 
    1195  inline CellWidget::DrawingPlanes& CellWidget::getDrawingPlanes ()
    1196  { return _drawingPlanes; }
    1197 
    1198 
    1199  inline SelectorSet& CellWidget::getSelectorSet ()
    1200  { return _selectors; }
    1201 
    1202 
    1203  Occurrences CellWidget::getOccurrencesUnder ( const QRect& area ) const
    1204  { return getOccurrencesUnder(screenToDbuBox(area)); }
    1205 
    1206 
    1207  inline void CellWidget::addRuler ( const Point& origin, const Point& extremity )
    1208  {
    1209  _state->getRulers().insert ( shared_ptr<Ruler>( new Ruler(origin,extremity) ) );
    1210  refresh ();
    1211  }
    1212 
    1213 
    1214  inline void CellWidget::addRuler ( shared_ptr<Ruler> ruler )
    1215  {
    1216  _state->getRulers().insert ( ruler );
    1217  refresh ();
    1218  }
    1219 
    1220 
    1221  inline void CellWidget::clearRulers ()
    1222  { _state->getRulers().clear (); refresh(); }
    1223 
    1224 
    1225  inline void CellWidget::refresh ()
    1226  { _redrawManager.refresh(); }
    1227 
    1228 
    1229  inline void CellWidget::redrawSelection ()
    1230  { redrawSelection ( QRect(QPoint(0,0),_drawingPlanes.size()) ); }
    1231 
    1232 
    1233  inline void CellWidget::copyToPrinter ( int xpaper, int ypaper, QPrinter* printer, CellWidget::PainterCb_t& cb )
    1234  { _drawingPlanes.copyToPrinter( xpaper, ypaper, printer, cb ); }
    1235 
    1236 
    1237  inline void CellWidget::copyToImage ( QImage* image, PainterCb_t& cb )
    1238  { _drawingPlanes.copyToImage ( image, cb ); }
    1239 
    1240 
    1241  inline DbU::Unit CellWidget::toDbu ( float d ) const
    1242  {
    1243  DbU::Unit unit;
    1244  switch ( getDbuMode() ) {
    1245  case DbU::Physical: unit = DbU::grid(DbU::physicalToGrid(d,DbU::Micro)); break;
    1246  case DbU::Grid: unit = DbU::grid(d); break;
    1247  case DbU::Db: unit = DbU::db((long)d); break;
    1248  default:
    1249  case DbU::Symbolic: unit = DbU::lambda(d); break;
    1250  }
    1251  return unit;
    1252  }
    1253 
    1254 
    1255  inline int CellWidget::dbuToScreenX ( DbU::Unit x ) const
    1256  { return (int)rint ( (float)( x - _screenArea.getXMin() ) * getScale() ); }
    1257 
    1258 
    1259  inline int CellWidget::dbuToScreenY ( DbU::Unit y ) const
    1260  { return (int)rint ( (float)( _screenArea.getYMax() - y ) * getScale() ); }
    1261 
    1262 
    1263  inline int CellWidget::dbuToScreenLength ( DbU::Unit length ) const
    1264  { return (int)rint ( (float)length * getScale() ); }
    1265 
    1266 
    1267  inline QPoint CellWidget::dbuToScreenPoint ( DbU::Unit x, DbU::Unit y ) const
    1268  { return QPoint ( dbuToScreenX(x), dbuToScreenY(y) ); }
    1269 
    1270 
    1271  inline QPoint CellWidget::dbuToScreenPoint ( const Point& point ) const
    1272  { return QPoint ( dbuToScreenX(point.getX()), dbuToScreenY(point.getY()) ); }
    1273 
    1274 
    1275  inline DbU::Unit CellWidget::screenToDbuX ( int x ) const
    1276  { return (DbU::Unit)(x/getScale()) + _screenArea.getXMin(); }
    1277 
    1278 
    1279  inline DbU::Unit CellWidget::screenToDbuY ( int y ) const
    1280  { return _screenArea.getYMax() - (DbU::Unit)(y/getScale()); }
    1281 
    1282 
    1283  inline DbU::Unit CellWidget::screenToDbuLength ( int length ) const
    1284  { return (int)( (float)length / getScale() ); }
    1285 
    1286 
    1287  inline Point CellWidget::screenToDbuPoint ( const QPoint& point ) const
    1288  { return Point ( screenToDbuX(point.x()), screenToDbuY(point.y()) ); }
    1289 
    1290 
    1291  inline Box CellWidget::screenToDbuBox ( const QRect& rect ) const
    1292  {
    1293  return Box ( screenToDbuX(rect.x())
    1294  , screenToDbuY(rect.y())
    1295  , screenToDbuX(rect.x()+rect.width ())
    1296  , screenToDbuY(rect.y()+rect.height())
    1297  );
    1298  }
    1299 
    1300 
    1301  inline Box& CellWidget::pixelInflate ( Box& box, int pixels ) const
    1302  { return box.inflate(screenToDbuLength(pixels)); }
    1303 
    1304 
    1305  inline Point CellWidget::getTopLeft () const
    1306  { return Point(_screenArea.getXMin(),_screenArea.getYMax()); }
    1307 
    1308 
    1309  inline Box CellWidget::getVisibleArea () const
    1310  { return computeVisibleArea(getScale()); }
    1311 
    1312 
    1313  inline Cell* CellWidget::getCell () const
    1314  { return _state->getCell(); }
    1315 
    1316 
    1317  inline Cell* CellWidget::getTopCell () const
    1318  { return _state->getTopCell(); }
    1319 
    1320 
    1321  inline Path CellWidget::getTopPath () const
    1322  { return _state->getTopPath(); }
    1323 
    1324 
    1325  inline PaletteWidget* CellWidget::getPalette ()
    1326  { return _palette; }
    1327 
    1328 
    1329  inline DbU::Unit CellWidget::cursorStep () const
    1330  { return _state->cursorStep(); }
    1331 
    1332 
    1333  inline unsigned int CellWidget::getDbuMode () const
    1334  { return _state->getDbuMode(); }
    1335 
    1336 
    1337  inline bool CellWidget::gridMode () const
    1338  { return _state->gridMode(); }
    1339 
    1340 
    1341  inline bool CellWidget::symbolicMode () const
    1342  { return _state->symbolicMode(); }
    1343 
    1344 
    1345  inline bool CellWidget::physicalMode () const
    1346  { return _state->physicalMode(); }
    1347 
    1348 
    1349  inline DbU::UnitPower CellWidget::getUnitPower () const
    1350  { return _state->getUnitPower(); }
    1351 
    1352 
    1353  inline bool CellWidget::showBoundaries () const
    1354  { return _state->showBoundaries(); }
    1355 
    1356 
    1357  inline bool CellWidget::showSelection () const
    1358  { return _state->showSelection(); }
    1359 
    1360 
    1361  inline bool CellWidget::cumulativeSelection () const
    1362  { return _state->cumulativeSelection(); }
    1363 
    1364 
    1365  inline QPainter& CellWidget::getPainter ( size_t plane )
    1366  { return _drawingPlanes.painter(plane); }
    1367 
    1368 
    1369  inline const DisplayStyle::HSVr& CellWidget::getDarkening () const
    1370  { return _darkening; }
    1371 
    1372 
    1373  inline const float& CellWidget::getScale () const
    1374  { return _state->getScale(); }
    1375 
    1376 
    1377  inline const QPoint& CellWidget::getMousePosition () const
    1378  { return _mousePosition; }
    1379 
    1380 
    1381  inline void CellWidget::updateMousePosition ()
    1382  {
    1383  Point mousePoint = screenToDbuPoint ( _mousePosition );
    1384  emit mousePositionChanged ( _onCursorGrid(mousePoint) );
    1385  }
    1386 
    1387 
    1388  inline void CellWidget::setQueryFilter ( Query::Mask filter )
    1389  {
    1390  _state->setQueryFilter ( filter );
    1391  emit queryFilterChanged ();
    1392  }
    1393 
    1394 
    1395  inline Query::Mask CellWidget::getQueryFilter () const
    1396  { return _state->getQueryFilter(); }
    1397 
    1398 
    1399  inline void CellWidget::setDbuMode ( int mode )
    1400  { _state->setDbuMode(mode); }
    1401 
    1402 
    1403  inline void CellWidget::setUnitPower ( DbU::UnitPower p )
    1404  { _state->setUnitPower(p); }
    1405 
    1406 
    1407  inline void CellWidget::setRubberShape ( RubberShape shape )
    1408  {
    1409  _state->setRubberShape ( shape );
    1410  _redrawManager.refresh ();
    1411  emit queryFilterChanged ();
    1412  }
    1413 
    1414 
    1415  inline CellWidget::RubberShape CellWidget::getRubberShape () const
    1416  { return _state->getRubberShape(); }
    1417 
    1418 
    1419  inline void CellWidget::setPen ( const QPen& pen, size_t plane )
    1420  { _drawingPlanes.painter(plane).setPen(pen); }
    1421 
    1422 
    1423  inline void CellWidget::setDarkening ( const DisplayStyle::HSVr& darkening )
    1424  { _darkening = darkening; }
    1425 
    1426 
    1427  inline bool CellWidget::isPrinter () const
    1428  { return _isPrinter; }
    1429 
    1430 
    1431  inline void CellWidget::setPrinter ( bool state )
    1432  { _isPrinter = state; }
    1433 
    1434 
    1435  inline bool CellWidget::timeout ( const char* fname, const Timer& timer, double timeout, bool& timedout ) const
    1436  {
    1437  if ( timedout ) return true;
    1438  if ( timer.getCombTimeOnTheFly() < timeout ) return false;
    1439 
    1440  timedout = true;
    1441  cerr << Warning("CellWidget::%s(): timeout %.3f (limit:%.1f)."
    1442  ,fname,timer.getCombTimeOnTheFly(),timeout) << endl;
    1443  return true;
    1444  }
    1445 
    1446 
    1447  inline DbU::Unit CellWidget::_snapGridStep () const
    1448  { return symbolicMode() ? DbU::getSymbolicSnapGridStep() : DbU::getRealSnapGridStep(); }
    1449 
    1450 
    1451  inline DbU::Unit CellWidget::_onSnapGrid ( DbU::Unit u ) const
    1452  { return symbolicMode() ? DbU::getOnSymbolicSnapGrid(u) : DbU::getOnRealSnapGrid(u); }
    1453 
    1454 
    1455  inline Point CellWidget::_onSnapGrid ( const Point& p ) const
    1456  { return Point(_onSnapGrid(p.getX()),_onSnapGrid(p.getY())); }
    1457 
    1458 
    1459  inline DbU::Unit CellWidget::_onCursorGrid ( DbU::Unit u ) const
    1460  { return DbU::getOnCustomGrid(u,cursorStep()); }
    1461 
    1462 
    1463  inline Point CellWidget::_onCursorGrid ( const Point& p ) const
    1464  { return Point(_onCursorGrid(p.getX()),_onCursorGrid(p.getY())); }
    1465 
    1466 
    1467 } // End of Hurricane namespace.
    1468 
    1469 
    1470 GETSTRING_POINTER_SUPPORT(Hurricane::CellWidget);
    1471 IOSTREAM_POINTER_SUPPORT(Hurricane::CellWidget);
    static DbU::Unit getOnCustomGrid(DbU::Unit u, DbU::Unit step, SnapMode mode=Nearest)
    +
    1 // -*- C++ -*-
    2 //
    3 // This file is part of the Coriolis Software.
    4 // Copyright (c) UPMC/LIP6 2008-2018, All Rights Reserved
    5 //
    6 // +-----------------------------------------------------------------+
    7 // | C O R I O L I S |
    8 // | V L S I B a c k e n d D a t a - B a s e |
    9 // | |
    10 // | Author : Jean-Paul CHAPUT |
    11 // | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
    12 // | =============================================================== |
    13 // | C++ Header : "./hurricane/viewer/CellWidget.h" |
    14 // +-----------------------------------------------------------------+
    15 
    16 
    17 #pragma once
    18 #include <math.h>
    19 #include <vector>
    20 #include <functional>
    21 #include <memory>
    22 #include <boost/function.hpp>
    23 #include <QWidget>
    24 #include <QPixmap>
    25 #include <QPainter>
    26 #include <QPrinter>
    27 #include <QImage>
    28 #include <QRect>
    29 #include <QPoint>
    30 class QCursor;
    31 class QShowEvent;
    32 class QResizeEvent;
    33 class QMouseEvent;
    34 class QKeyEvent;
    35 class QAction;
    36 
    37 #include "hurricane/Timer.h"
    38 #include "hurricane/Commons.h"
    39 #include "hurricane/Warning.h"
    40 #include "hurricane/Point.h"
    41 #include "hurricane/Box.h"
    42 #include "hurricane/Transformation.h"
    43 #include "hurricane/Query.h"
    44 #include "hurricane/viewer/DisplayStyle.h"
    45 #include "hurricane/viewer/CellWidgets.h"
    46 #include "hurricane/viewer/Selector.h"
    47 #include "hurricane/viewer/SelectorCriterion.h"
    48 #include "hurricane/viewer/Ruler.h"
    49 
    50 
    51 namespace Hurricane {
    52 
    53  using std::vector;
    54  using std::unary_function;
    55  using std::shared_ptr;
    56 
    57  class Technology;
    58  class BasicLayer;
    59  class Go;
    60  class Net;
    61  class Cell;
    62  class Instance;
    63  class Slice;
    64  class Segment;
    65  class Contact;
    66  class Pad;
    67  class Selector;
    68  class PaletteWidget;
    69  class Command;
    70 //class MapView;
    71 
    72  enum UpdateState { ExternalEmit = 0
    73  , InternalEmit
    74  , InternalReceive
    75  };
    76 
    77 
    78 // -------------------------------------------------------------------
    79 // Class : "Hurricane::CellWidget".
    80 
    81 
    82  class CellWidget : public QWidget {
    83  Q_OBJECT;
    84 
    85  private:
    86  class DrawingPlanes;
    87  public:
    88  class State;
    89  typedef void ( DrawExtensionGo_t )( CellWidget*
    90  , const Go*
    91  , const BasicLayer*
    92  , const Box&
    93  , const Transformation&
    94  );
    95  typedef void ( InitExtensionGo_t )( CellWidget* );
    96  typedef boost::function< void(QPainter&) > PainterCb_t;
    97  enum RubberShape { Centric=1, Barycentric, Steiner };
    98  enum TextFlag { Bold =0x0001
    99  , BigFont =0x0002
    100  , Reverse =0x0004
    101  , Frame =0x0008
    102  , Rounded =0x0010
    103  , Center =0x0020
    104  , Left =0x0040
    105  , Right =0x0080
    106  , Top =0x0100
    107  };
    108  enum Flag { NoFlags =0x0000
    109  , NoResetCommands=0x0001
    110  };
    111  public:
    113  public:
    114  // Constructor & Destructor.
    115  CellWidget ( QWidget* parent=NULL );
    116  virtual ~CellWidget ();
    117  // Accessors.
    118  // MapView* getMapView () { return _mapView; };
    119  void setCell ( Cell*, Path topPath=Path(), unsigned int flags=NoFlags );
    120  inline Cell* getCell () const;
    121  inline Cell* getTopCell () const;
    122  inline Path getTopPath () const;
    123  inline shared_ptr<State>& getState ();
    124  inline shared_ptr<State> getStateClone ();
    125  inline PaletteWidget* getPalette ();
    126  inline Occurrences getOccurrencesUnder ( const QRect& ) const;
    127  Occurrences getOccurrencesUnder ( const Box& ) const;
    128  inline SelectorSet& getSelectorSet ();
    129  inline RulerSet& getRulerSet ();
    130  inline RubberShape getRubberShape () const;
    131  inline int getStartLevel () const;
    132  inline int getStopLevel () const;
    133  inline Query::Mask getQueryFilter () const ;
    134  void bindToPalette ( PaletteWidget* );
    135  void detachFromPalette ();
    136  void detach ( Selector*);
    137  void bindCommand ( Command* );
    138  void unbindCommand ( Command* );
    139  void resetCommands ();
    140  inline void setActiveCommand ( Command* );
    141  inline Command* getActiveCommand () const;
    142  Command* getCommand ( const std::string& ) const;
    143  inline void resetActiveCommand ();
    144  inline void setCursorStep ( DbU::Unit );
    145  inline void setRealSnapGridStep ( DbU::Unit step );
    146  inline unsigned int getDbuMode () const;
    147  inline bool gridMode () const;
    148  inline bool symbolicMode () const;
    149  inline bool physicalMode () const;
    150  inline DbU::UnitPower getUnitPower () const;
    151  inline bool showBoundaries () const;
    152  inline bool showSelection () const;
    153  inline bool cumulativeSelection () const;
    154  inline void setDbuMode ( int );
    155  inline void setUnitPower ( DbU::UnitPower );
    156  inline void setRubberShape ( RubberShape );
    157  inline void setStartLevel ( int );
    158  inline void setStopLevel ( int );
    159  inline void setQueryFilter ( Query::Mask );
    160  inline bool timeout ( const char*, const Timer&, double timeout, bool& timedout ) const;
    161  // Painter control & Hurricane objects drawing primitives.
    162  inline void setEnableRedrawInterrupt ( bool );
    163  inline void addDrawExtensionGo ( const Name&, InitExtensionGo_t*, DrawExtensionGo_t* );
    164  inline void copyDrawExtensionGos ( const CellWidget* );
    165  inline QPainter& getPainter ( size_t plane=PlaneId::Working );
    166  inline const DisplayStyle::HSVr& getDarkening () const;
    167  inline void copyToPrinter ( int xpaper, int ypaper, QPrinter*, PainterCb_t& );
    168  inline void copyToImage ( QImage*, PainterCb_t& );
    169  inline int getPixelThreshold () const;
    170  inline const float& getScale () const;
    171  inline const QPoint& getMousePosition () const;
    172  inline void updateMousePosition ();
    173  void setLayerVisible ( const Name& layer, bool visible );
    174  bool isLayerVisible ( const Name& );
    175  bool isDrawable ( const Name& );
    176  bool isDrawableLayer ( const Name& );
    177  bool isDrawableExtension ( const Name& );
    178  bool isSelectable ( const Name& ) const;
    179  bool isSelectable ( const Layer* ) const;
    180  bool isPrinter () const;
    181  void setPrinter ( bool );
    182  inline void setDarkening ( const DisplayStyle::HSVr& );
    183  inline void setPen ( const QPen& , size_t plane=PlaneId::Working );
    184  void drawBox ( DbU::Unit, DbU::Unit, DbU::Unit, DbU::Unit );
    185  void drawBox ( const Box& );
    186  void drawBoxBorder ( const Box& );
    187  void drawLine ( DbU::Unit, DbU::Unit, DbU::Unit, DbU::Unit, bool mode=true );
    188  void drawLine ( const Point&, const Point&, bool mode=true );
    189  void drawText ( const Point&, const char*, unsigned int flags=0, int angle=0 );
    190  void drawGrid ( QRect );
    191  void drawSpot ();
    192  void drawRuler ( shared_ptr<Ruler> );
    193  void drawRulers ( QRect );
    194  void drawDisplayText ( const QRect& , const char*, unsigned int flags=0 );
    195  void drawDisplayText ( const QPoint&, const char*, unsigned int flags=0, int angle=0 );
    196  void drawScreenPolygon ( const QPoint*, int count, size_t plane=PlaneId::Working );
    197  void drawScreenPolygon ( const QPolygon&, size_t plane=PlaneId::Working );
    198  void drawScreenLine ( const QPoint&, const QPoint&, size_t plane=PlaneId::Working, bool mode=true );
    199  void drawScreenRect ( const QPoint&, const QPoint&, size_t plane=PlaneId::Working );
    200  void drawScreenRect ( const QRect& , size_t plane=PlaneId::Working );
    201  void drawScreenPolyline ( const QPoint*, int, int, size_t plane=PlaneId::Working );
    202  // Geometric conversions.
    203  inline DbU::Unit toDbu ( float ) const;
    204  QRect dbuToScreenRect ( DbU::Unit x1, DbU::Unit y1, DbU::Unit x2, DbU::Unit y2, bool usePoint=true ) const;
    205  QRect dbuToScreenRect ( const Box& box , bool usePoint=true ) const;
    206  inline int dbuToScreenX ( DbU::Unit x ) const;
    207  inline int dbuToScreenY ( DbU::Unit y ) const;
    208  inline int dbuToScreenLength ( DbU::Unit length ) const;
    209  inline QPoint dbuToScreenPoint ( DbU::Unit x, DbU::Unit y ) const;
    210  inline QPoint dbuToScreenPoint ( const Point& point ) const;
    211  inline DbU::Unit screenToDbuLength ( int length ) const;
    212  inline DbU::Unit screenToDbuX ( int x ) const;
    213  inline DbU::Unit screenToDbuY ( int y ) const;
    214  inline Point screenToDbuPoint ( const QPoint& point ) const;
    215  inline Box screenToDbuBox ( const QRect& rect ) const;
    216  inline Box& pixelInflate ( Box&, int pixels ) const;
    217  inline Point getTopLeft () const;
    218  inline Box getVisibleArea () const;
    219  Box computeVisibleArea ( float scale ) const;
    220  Box computeVisibleArea ( float scale, const Point& topLeft ) const;
    221  Box computeVisibleArea ( const Box&, float& scale ) const;
    222  inline DbU::Unit cursorStep () const;
    223  inline bool _underDetailedGridThreshold() const;
    224  inline DbU::Unit _snapGridStep () const;
    225  inline DbU::Unit _onSnapGrid ( DbU::Unit ) const;
    226  inline Point _onSnapGrid ( const Point& ) const;
    227  inline DbU::Unit _onCursorGrid ( DbU::Unit ) const;
    228  inline Point _onCursorGrid ( const Point& ) const;
    229  // Qt QWidget Functions Overloads.
    230  void pushCursor ( Qt::CursorShape cursor );
    231  void popCursor ();
    232  virtual QSize minimumSizeHint () const;
    233  virtual void showEvent ( QShowEvent* );
    234  virtual void resizeEvent ( QResizeEvent* );
    235  virtual void wheelEvent ( QWheelEvent* );
    236  virtual void keyPressEvent ( QKeyEvent* );
    237  virtual void keyReleaseEvent ( QKeyEvent* );
    238  virtual void mouseMoveEvent ( QMouseEvent* );
    239  virtual void mousePressEvent ( QMouseEvent* );
    240  virtual void mouseReleaseEvent ( QMouseEvent* );
    241  signals:
    242  void cellChanged ( Cell* );
    243  void cellPreModificated ();
    244  void cellPostModificated ();
    245  void stateChanged ( shared_ptr<CellWidget::State>& );
    246  void styleChanged ();
    247  void queryFilterChanged ();
    248  void dbuModeChanged ( unsigned int mode, DbU::UnitPower );
    249  void updatePalette ( Cell* );
    250  void mousePositionChanged ( const Point& position );
    251  void selectionModeChanged ();
    252  void selectionChanged ( const SelectorSet& );
    253  void selectionToggled ( Selector* );
    254  void unlinkSelector ( Selector* );
    255  void showBoundariesToggled ( bool );
    256  protected:
    257  virtual void paintEvent ( QPaintEvent* );
    258  public slots:
    259  // Qt QWidget Slots Overload & CellWidget Specifics.
    260  void setState ( shared_ptr<CellWidget::State>&
    261  , unsigned int flags=NoFlags );
    262  inline void openRefreshSession ();
    263  inline void closeRefreshSession ();
    264  inline DrawingPlanes& getDrawingPlanes ();
    265  // void select ( const Net* );
    266  void select ( Occurrence );
    267  bool isSelected ( Occurrence );
    268  void selectOccurrencesUnder ( Box selectArea );
    269  // void unselect ( const Net* );
    270  void unselect ( Occurrence );
    271  void unselectAll ();
    272  void toggleSelection ( Occurrence );
    273  void setShowSelection ( bool state );
    274  void setCumulativeSelection ( bool state );
    275  // void _select ( const Net* );
    276  // void _unselect ( const Net* );
    277  // void _selectOccurrencesUnder ( Box selectArea );
    278  void _unselectAll ();
    279  inline void addRuler ( const Point&, const Point& );
    280  inline void addRuler ( shared_ptr<Ruler> );
    281  inline void clearRulers ();
    282  void changeQueryFilter ();
    283  void rubberChange ();
    284  void changeDbuMode ( unsigned int mode, DbU::UnitPower );
    285  void setStyle ( int id );
    286  void updatePalette ();
    287  void cellPreModificate ();
    288  void cellPostModificate ();
    289  inline void refresh ();
    290  void _redraw ( QRect redrawArea );
    291  inline void redrawSelection ();
    292  void redrawSelection ( QRect redrawArea );
    293  void goLeft ( int dx = 0 );
    294  void goRight ( int dx = 0 );
    295  void goUp ( int dy = 0 );
    296  void goDown ( int dy = 0 );
    297  void fitToContents ( bool historyEnable=true );
    298  void fitToNet ( const Net*, bool historyEnable=true );
    299  void setScale ( float );
    300  void scaleHistoryUp ();
    301  void scaleHistoryDown ();
    302  // void setGridMode ();
    303  // void setSymbolicMode ();
    304  // void setPhysicalMode ( DbU::UnitPower );
    305  void setShowBoundaries ( bool state );
    306  void reframe ();
    307  void reframe ( const Box& box, bool historyEnable=true );
    308  void displayReframe ();
    309  void _goLeft ( int dx );
    310  void _goRight ( int dx );
    311  void _goUp ( int dy );
    312  void _goDown ( int dy );
    313  void _refresh ();
    314  std::string _getString () const;
    315 
    316  private:
    317  class Spot {
    318  public:
    319  Spot ( CellWidget* );
    320  void setRestore ( bool );
    321  inline void setShowSpot ( bool );
    322  inline const QPoint& getSpotPoint () const;
    323  void restore ();
    324  QPoint computeSpotPoint ( const QPoint& );
    325  void moveTo ( const QPoint& );
    326  private:
    327  CellWidget* _cellWidget;
    328  QPoint _spotPoint;
    329  bool _restore;
    330  bool _showSpot;
    331  };
    332 
    333  private:
    334  class RedrawEvent {
    335  public:
    336  enum EventType { GoLeft = 1
    337  , GoRight = 2
    338  , GoUp = 3
    339  , GoDown = 4
    340  , Refresh = 5
    341  };
    342  public:
    343  RedrawEvent ( EventType, int shift, CellWidget* );
    344  inline EventType getType () const;
    345  inline int getShift () const;
    346  private:
    347  EventType _type;
    348  int _shift;
    349  };
    350 
    351  private:
    352  class RedrawManager {
    353  public:
    354  inline RedrawManager ( CellWidget* );
    355  ~RedrawManager ();
    356  void goLeft ( int );
    357  void goRight ( int );
    358  void goUp ( int );
    359  void goDown ( int );
    360  void refresh ();
    361  void process ();
    362  inline void stopProcessing ();
    363  inline bool isProcessing () const;
    364  inline bool interrupted () const;
    365  inline size_t getPendings () const;
    366  inline void openRefreshSession ();
    367  inline void closeRefreshSession ();
    368  private:
    369  CellWidget* _widget;
    370  list<RedrawEvent*> _events;
    371  int _refreshSession;
    372  bool _processing;
    373  bool _interrupted;
    374  };
    375 
    376  public:
    377  class PlaneId {
    378  public:
    379  enum Ids { Normal = 0 // _planes[0]
    380  , Selection = 1 // _planes[1]
    381  , AutoCopy = 2 // _planes[2]
    382  , Widget = 3
    383  , Printer = 4
    384  , Image = 5
    385  , Working = 6
    386  };
    387  };
    388 
    389  private:
    390  class DrawingPlanes {
    391  public:
    392  DrawingPlanes ( const QSize& size, CellWidget* cw );
    393  ~DrawingPlanes ();
    394  inline bool getLineMode () const;
    395  inline size_t getWorkingPlane () const;
    396  inline void pushWorkingPlane ();
    397  inline void popWorkingPlane ();
    398  inline int width () const;
    399  inline int height () const;
    400  inline QSize size () const;
    401  inline void select ( size_t i );
    402  inline QPainter& painter ( size_t i=PlaneId::Working );
    403  inline void begin ( size_t i=PlaneId::Working );
    404  inline void end ( size_t i=PlaneId::Working );
    405  inline void buffersBegin ();
    406  inline void buffersEnd ();
    407  void setLineMode ( bool mode );
    408  void setPen ( const QPen& pen );
    409  void setBrush ( const QBrush& brush );
    410  void setBackground ( const QBrush& brush );
    411  void setBackgroundMode ( Qt::BGMode mode );
    412  void resize ( const QSize& size );
    413  void shiftLeft ( int dx );
    414  void shiftRight ( int dx );
    415  void shiftUp ( int dy );
    416  void shiftDown ( int dy );
    417  inline void copyToSelect ();
    418  inline void copyToSelect ( const QRect& );
    419  void copyToSelect ( int sx, int sy, int h, int w );
    420  inline void copyToScreen ();
    421  void copyToScreen ( int sx, int sy, int h, int w );
    422  inline void copyToPrinter ( int xpaper, int ypaper, QPrinter*, CellWidget::PainterCb_t& );
    423  void copyToPrinter ( int xpaper, int ypaper, int sx, int sy, int h, int w, QPrinter*, CellWidget::PainterCb_t& );
    424  inline void copyToImage ( QImage*, CellWidget::PainterCb_t& );
    425  void copyToImage ( int sx, int sy, int h, int w, QImage*, CellWidget::PainterCb_t& );
    426  private:
    427  static const int _cartoucheWidth;
    428  static const int _cartoucheHeight;
    429  static const int _titleHeight;
    430  CellWidget* _cellWidget;
    431  QPrinter* _printer;
    432  QImage* _image;
    433  QPixmap* _planes[3];
    434  QPainter _painters[PlaneId::Working];
    435  QPen _normalPen;
    436  QPen _linePen;
    437  QPoint _brushOrigin;
    438  size_t _workingPlane;
    439  size_t _pushWorkingPlane;
    440  bool _lineMode;
    441  private:
    442  DrawingPlanes ( const DrawingPlanes& );
    443  DrawingPlanes& operator= ( const DrawingPlanes& );
    444  };
    445 
    446  private:
    447  class DrawingQuery : public Query {
    448  public:
    449  DrawingQuery ( CellWidget* widget );
    450  inline void setQuery ( const Box& area
    451  , const Transformation& transformation
    452  , const BasicLayer* basicLayer
    453  , ExtensionSlice::Mask extensionMask
    454  , unsigned int filter
    455  );
    456  inline void addDrawExtensionGo ( const Name&
    457  , InitExtensionGo_t*
    458  , DrawExtensionGo_t*
    459  );
    460  inline void copyDrawExtensionGos ( const DrawingQuery& );
    461  void setDrawExtensionGo ( const Name& );
    462  virtual bool hasMasterCellCallback () const;
    463  virtual bool hasGoCallback () const;
    464  virtual bool hasMarkerCallback () const;
    465  virtual bool hasRubberCallback () const;
    466  virtual bool hasExtensionGoCallback () const;
    467  virtual void masterCellCallback ();
    468  virtual void goCallback ( Go* );
    469  virtual void rubberCallback ( Rubber* );
    470  virtual void markerCallback ( Marker* );
    471  virtual void extensionGoCallback ( Go* );
    472  void drawMasterCell ( const Cell* cell
    473  , const Transformation& transformation
    474  );
    475  void drawGo ( const Go* go
    476  , const BasicLayer* basicLayer
    477  , const Box& area
    478  , const Transformation& transformation
    479  );
    480  void drawRubber ( const Rubber* rubber
    481  , const Box& area
    482  , const Transformation& transformation
    483  );
    484  void drawMarker ( const Marker* marker
    485  , const Box& area
    486  , const Transformation& transformation
    487  );
    488  void drawExtensionGo ( CellWidget* widget
    489  , const Go* go
    490  , const BasicLayer* basicLayer
    491  , const Box& area
    492  , const Transformation& transformation
    493  );
    494  inline unsigned int getGoCount () const;
    495  inline unsigned int getExtensionGoCount () const;
    496  inline unsigned int getInstanceCount () const;
    497  inline void resetGoCount ();
    498  inline void resetExtensionGoCount ();
    499  inline void resetInstanceCount ();
    500 
    501  protected:
    502  CellWidget* _cellWidget;
    503  DrawExtensionGo_t* _drawExtensionGo;
    504  map<Name,pair<InitExtensionGo_t*,DrawExtensionGo_t*> >
    505  _drawExtensionGos;
    506  unsigned int _goCount;
    507  unsigned int _extensionGoCount;
    508  unsigned int _instanceCount;
    509  };
    510 
    511  private:
    512  class TextDrawingQuery : public Query {
    513  public:
    514  TextDrawingQuery ( CellWidget* widget );
    515  inline void setQuery ( const Box& area
    516  , const Transformation& transformation
    517  );
    518  virtual bool hasMasterCellCallback () const;
    519  virtual bool hasGoCallback () const;
    520  virtual bool hasRubberCallback () const;
    521  virtual bool hasExtensionGoCallback () const;
    522  virtual void masterCellCallback ();
    523  virtual void goCallback ( Go* go );
    524  virtual void extensionGoCallback ( Go* go );
    525  virtual void rubberCallback ( Rubber* );
    526 
    527  protected:
    528  CellWidget* _cellWidget;
    529  };
    530 
    531  private:
    532  class SelectorCriterions {
    533  public:
    534  SelectorCriterions ();
    535  ~SelectorCriterions ();
    536  inline void setCellWidget ( CellWidget* );
    537  inline const vector<SelectorCriterion*>& getCriterions () const;
    538  SelectorCriterion* add ( const Net* net );
    539  SelectorCriterion* add ( Box area );
    540  inline SelectorCriterion* add ( SelectorCriterion* );
    541  bool remove ( const Net* net );
    542  void clear ();
    543  void invalidate ();
    544  void revalidate ();
    545  inline size_t size () const;
    546  private:
    547  CellWidget* _cellWidget;
    548  vector<SelectorCriterion*> _criterions;
    549  };
    550 
    551  public:
    552  class State {
    553  public:
    554  inline State ( Cell* cell=NULL, Path topPath=Path() );
    555  State* clone () const;
    556  inline void setCell ( Cell* );
    557  inline void setTopPath ( Path );
    558  inline void setCellWidget ( CellWidget* );
    559  inline void setCursorStep ( DbU::Unit );
    560  inline DbU::Unit getCursorStep () const;
    561  inline DbU::UnitPower getUnitPower () const;
    562  inline void setDbuMode ( int );
    563  inline void setUnitPower ( DbU::UnitPower );
    564  inline void setShowBoundaries ( bool );
    565  inline void setShowSelection ( bool );
    566  inline void setCumulativeSelection ( bool );
    567  void setScale ( float );
    568  inline void setTopLeft ( DbU::Unit, DbU::Unit );
    569  inline void setTopLeft ( const Point& );
    570  inline void setQueryFilter ( Query::Mask );
    571  inline void setStartLevel ( int );
    572  inline void setStopLevel ( int );
    573  inline void setRubberShape ( RubberShape );
    574  inline void setHistoryEnable ( bool );
    575  bool scaleHistoryUp ();
    576  bool scaleHistoryDown ();
    577  inline Cell* getCell () const;
    578  inline Cell* getTopCell () const;
    579  inline Path getTopPath () const;
    580  const Name& getName () const;
    581  inline SelectorCriterions& getSelection ();
    582  inline RulerSet& getRulers ();
    583  inline DbU::Unit cursorStep () const;
    584  inline unsigned int getDbuMode () const;
    585  inline bool gridMode () const;
    586  inline bool symbolicMode () const;
    587  inline bool physicalMode () const;
    588  inline bool nanoMode () const;
    589  inline bool microMode () const;
    590  inline bool showBoundaries () const;
    591  inline bool showSelection () const;
    592  inline bool cumulativeSelection () const;
    593  inline bool getHistoryEnable () const;
    594  inline size_t getHistorySize () const;
    595  inline const float& getScale () const;
    596  inline const Point& getTopLeft () const;
    597  inline Query::Mask getQueryFilter () const;
    598  inline int getStartLevel () const;
    599  inline int getStopLevel () const;
    600  inline RubberShape getRubberShape () const;
    601 
    602  private:
    603  class ScaleEntry {
    604  public:
    605  inline ScaleEntry ( float, const Point& );
    606  public:
    607  float _scale;
    608  Point _topLeft;
    609  };
    610 
    611  private:
    612  Cell* _cell;
    613  Path _topPath;
    614  Name _hierarchicalName;
    615  CellWidget* _cellWidget;
    616  SelectorCriterions _selection;
    617  RulerSet _rulers;
    618  DbU::Unit _cursorStep;
    619  unsigned int _dbuMode;
    620  DbU::UnitPower _unitPower;
    621  bool _showBoundaries;
    622  bool _showSelection;
    623  Query::Mask _queryFilter;
    624  int _startLevel;
    625  int _stopLevel;
    626  RubberShape _rubberShape;
    627  bool _cumulativeSelection;
    628  vector<ScaleEntry> _scaleHistory;
    629  size_t _ihistory;
    630  bool _historyEnable;
    631  };
    632  public:
    633  class FindStateName : public unary_function< const shared_ptr<State>&, bool > {
    634  public:
    635  inline FindStateName ( const Name& );
    636  inline bool operator() ( const shared_ptr<State>& );
    637  private:
    638  const Name _cellHierName;
    639  };
    640 
    641  protected:
    642  // Internal: Attributes.
    643  vector<Qt::CursorShape> _cursors;
    644  // MapView* _mapView;
    645  Technology* _technology;
    646  PaletteWidget* _palette;
    647  Box _screenArea;
    648  RedrawManager _redrawManager;
    649  DrawingPlanes _drawingPlanes;
    650  DrawingQuery _drawingQuery;
    651  TextDrawingQuery _textDrawingQuery;
    652  DisplayStyle::HSVr _darkening;
    653  QPoint _mousePosition;
    654  Spot _spot;
    655  shared_ptr<State> _state;
    656  bool _isPrinter;
    657  bool _cellChanged;
    658  bool _selectionHasChanged;
    659  int _delaySelectionChanged;
    660  bool _cellModificated;
    661  bool _enableRedrawInterrupt;
    662  SelectorSet _selectors;
    663  Command* _activeCommand;
    664  vector<Command*> _commands;
    665  size_t _redrawRectCount;
    666  int _textFontHeight;
    667  int _pixelThreshold;
    668 
    669  friend class RedrawManager;
    670  };
    671 
    672 
    673  inline void CellWidget::Spot::setShowSpot ( bool show )
    674  { _showSpot = show; }
    675 
    676 
    677  inline const QPoint& CellWidget::Spot::getSpotPoint () const
    678  { return _spotPoint; }
    679 
    680 
    681  inline void CellWidget::DrawingQuery::setQuery ( const Box& area
    682  , const Transformation& transformation
    683  , const BasicLayer* basicLayer
    684  , ExtensionSlice::Mask extensionMask
    685  , unsigned int filter
    686  )
    687  {
    688  Query::setQuery ( _cellWidget->getCell()
    689  , area
    690  , transformation
    691  , basicLayer
    692  , extensionMask
    693  , filter
    694  );
    695  }
    696 
    697 
    698  inline void CellWidget::setEnableRedrawInterrupt ( bool state )
    699  { _enableRedrawInterrupt = state; }
    700 
    701 
    702  inline void CellWidget::openRefreshSession ()
    703  { _redrawManager.openRefreshSession (); }
    704 
    705 
    706  inline void CellWidget::closeRefreshSession ()
    707  { _redrawManager.closeRefreshSession (); }
    708 
    709 
    710  inline void CellWidget::DrawingQuery::addDrawExtensionGo ( const Name& name
    711  , InitExtensionGo_t* initExtensionGo
    712  , DrawExtensionGo_t* drawExtensionGo
    713  )
    714  { _drawExtensionGos[name] = make_pair(initExtensionGo,drawExtensionGo); }
    715 
    716 
    717  inline void CellWidget::DrawingQuery::copyDrawExtensionGos ( const CellWidget::DrawingQuery& other )
    718  { _drawExtensionGos = other._drawExtensionGos; }
    719 
    720 
    721  inline void CellWidget::DrawingQuery::resetGoCount ()
    722  { _goCount = 0; }
    723 
    724 
    725  inline void CellWidget::DrawingQuery::resetExtensionGoCount ()
    726  { _extensionGoCount = 0; }
    727 
    728 
    729  inline void CellWidget::DrawingQuery::resetInstanceCount ()
    730  { _instanceCount = 0; }
    731 
    732 
    733  inline unsigned int CellWidget::DrawingQuery::getGoCount () const
    734  { return _goCount; }
    735 
    736 
    737  inline unsigned int CellWidget::DrawingQuery::getExtensionGoCount () const
    738  { return _extensionGoCount; }
    739 
    740 
    741  inline unsigned int CellWidget::DrawingQuery::getInstanceCount () const
    742  { return _instanceCount; }
    743 
    744 
    745  inline CellWidget::RedrawEvent::EventType CellWidget::RedrawEvent::getType () const
    746  { return _type; }
    747 
    748 
    749  inline int CellWidget::RedrawEvent::getShift () const
    750  { return _shift; }
    751 
    752 
    753  inline bool CellWidget::RedrawManager::isProcessing () const
    754  { return _processing; }
    755 
    756 
    757  inline void CellWidget::RedrawManager::stopProcessing ()
    758  { _processing = false; }
    759 
    760 
    761  inline size_t CellWidget::RedrawManager::getPendings () const
    762  { return _events.size(); }
    763 
    764 
    765  inline void CellWidget::RedrawManager::openRefreshSession ()
    766  { _refreshSession++; }
    767 
    768 
    769  inline void CellWidget::RedrawManager::closeRefreshSession ()
    770  {
    771  _refreshSession--;
    772  if ( !_processing && (_refreshSession == 0) ) process ();
    773  }
    774 
    775 
    776  inline bool CellWidget::RedrawManager::interrupted () const
    777  {
    778 #ifdef ALLOW_REQUEST_INTERRUPT
    779  return ( _events.size() > 5 ) || _interrupted;
    780 #else
    781  return _interrupted;
    782 #endif
    783  }
    784 
    785 
    786  inline bool CellWidget::DrawingPlanes::getLineMode () const
    787  { return _lineMode; }
    788 
    789 
    790  inline size_t CellWidget::DrawingPlanes::getWorkingPlane () const
    791  { return _workingPlane; }
    792 
    793 
    794  inline void CellWidget::DrawingPlanes::pushWorkingPlane ()
    795  { _pushWorkingPlane = _workingPlane; }
    796 
    797 
    798  inline void CellWidget::DrawingPlanes::popWorkingPlane ()
    799  { _workingPlane = _pushWorkingPlane; }
    800 
    801 
    802  inline int CellWidget::DrawingPlanes::width () const
    803  { return _planes[PlaneId::Normal]->width(); }
    804 
    805 
    806  inline int CellWidget::DrawingPlanes::height () const
    807  { return _planes[PlaneId::Normal]->height(); }
    808 
    809 
    810  inline QSize CellWidget::DrawingPlanes::size () const
    811  { return _planes[PlaneId::Normal]->size(); }
    812 
    813 
    814  inline void CellWidget::DrawingPlanes::select ( size_t i )
    815  { _workingPlane = i; }
    816 
    817 
    818  inline QPainter& CellWidget::DrawingPlanes::painter ( size_t i )
    819  { return _painters[ (i>=PlaneId::Working) ? _workingPlane : i ]; }
    820 
    821 
    822  inline void CellWidget::DrawingPlanes::begin ( size_t i )
    823  {
    824  size_t wp = (i>=PlaneId::Working) ? _workingPlane : i;
    825  switch ( wp ) {
    826  case PlaneId::Normal:
    827  case PlaneId::Selection:
    828  case PlaneId::AutoCopy: _painters[wp ].begin( _planes[wp] ); break;
    829  case PlaneId::Widget: _painters[PlaneId::Widget ].begin( _cellWidget ); break;
    830  case PlaneId::Printer: _painters[PlaneId::Printer].begin( _printer ); break;
    831  case PlaneId::Image: _painters[PlaneId::Image ].begin( _image ); break;
    832  default:
    833  std::cerr << "[BUG] Bad plane selection." << std::endl;
    834  }
    835  }
    836 
    837 
    838  inline void CellWidget::DrawingPlanes::end ( size_t i )
    839  { _painters[(i>=PlaneId::Working)?_workingPlane:i].end (); }
    840 
    841 
    842  inline void CellWidget::DrawingPlanes::buffersBegin ()
    843  {
    844  begin( PlaneId::Normal );
    845  begin( PlaneId::Selection );
    846  begin( PlaneId::AutoCopy );
    847  }
    848 
    849 
    850  inline void CellWidget::DrawingPlanes::buffersEnd ()
    851  {
    852  end( PlaneId::Normal );
    853  end( PlaneId::Selection );
    854  end( PlaneId::AutoCopy );
    855  }
    856 
    857 
    858  inline void CellWidget::DrawingPlanes::copyToSelect ()
    859  { copyToSelect ( 0, 0, width(), height() ); }
    860 
    861 
    862  inline void CellWidget::DrawingPlanes::copyToSelect ( const QRect& r )
    863  { copyToSelect ( r.x(), r.y(), r.width(), r.height() ); }
    864 
    865 
    866  inline void CellWidget::DrawingPlanes::copyToScreen ()
    867  { copyToScreen ( 0, 0, width(), height() ); }
    868 
    869 
    870  inline void CellWidget::DrawingPlanes::copyToPrinter ( int xpaper, int ypaper, QPrinter* printer, CellWidget::PainterCb_t& cb )
    871  {
    872  copyToPrinter ( xpaper
    873  , ypaper
    874  , 0
    875  , 0
    876  , _cellWidget->geometry().width()
    877  , _cellWidget->geometry().height()
    878  , printer
    879  , cb
    880  );
    881  }
    882 
    883 
    884  inline void CellWidget::DrawingPlanes::copyToImage ( QImage* image, CellWidget::PainterCb_t& cb )
    885  {
    886  copyToImage ( 0
    887  , 0
    888  , _cellWidget->geometry().width()
    889  , _cellWidget->geometry().height()
    890  , image
    891  , cb
    892  );
    893  }
    894 
    895 
    896  inline void CellWidget::SelectorCriterions::setCellWidget ( CellWidget* cw )
    897  { _cellWidget = cw; }
    898 
    899 
    900  inline size_t CellWidget::SelectorCriterions::size () const
    901  { return _criterions.size(); }
    902 
    903 
    904  inline const vector<SelectorCriterion*>& CellWidget::SelectorCriterions::getCriterions () const
    905  { return _criterions; }
    906 
    907 
    908  inline SelectorCriterion* CellWidget::SelectorCriterions::add ( SelectorCriterion* criterion )
    909  {
    910  _criterions.push_back( criterion );
    911  return _criterions.back();
    912  }
    913 
    914 
    915  inline CellWidget::State::ScaleEntry::ScaleEntry ( float scale, const Point& topLeft )
    916  : _scale(scale), _topLeft(topLeft)
    917  { }
    918 
    919 
    920  inline CellWidget::State::State ( Cell* cell, Path topPath )
    921  : _cell (cell)
    922  , _topPath (topPath)
    923  , _hierarchicalName ()
    924  , _cellWidget (NULL)
    925  , _selection ()
    926  , _rulers ()
    927  , _cursorStep (DbU::lambda(0.5))
    928  , _dbuMode (DbU::Symbolic)
    929  , _unitPower (DbU::Nano)
    930  , _showBoundaries (true)
    931  , _showSelection (false)
    932  , _queryFilter (~Query::DoTerminalCells)
    933  , _startLevel (0)
    934  , _stopLevel (99)
    935  , _rubberShape (CellWidget::Barycentric)
    936  , _cumulativeSelection(false)
    937  , _scaleHistory ()
    938  , _ihistory (0)
    939  , _historyEnable (false)
    940  {
    941  _scaleHistory.push_back ( ScaleEntry(1.0,Point(0,0)) );
    942  if (_cell) _hierarchicalName = Name( _cell->getHierarchicalName() );
    943  }
    944 
    945 
    946  inline unsigned int CellWidget::State::getDbuMode () const
    947  { return _dbuMode; }
    948 
    949 
    950  inline bool CellWidget::State::symbolicMode () const
    951  { return (_dbuMode == DbU::Symbolic); }
    952 
    953 
    954  inline bool CellWidget::State::gridMode () const
    955  { return (_dbuMode == DbU::Grid); }
    956 
    957 
    958  inline bool CellWidget::State::physicalMode () const
    959  { return (_dbuMode == DbU::Physical); }
    960 
    961 
    962  inline void CellWidget::State::setCell ( Cell* cell )
    963  {
    964  _cell = cell;
    965  if (_cell) _hierarchicalName = Name( _cell->getHierarchicalName() );
    966  }
    967 
    968 
    969  inline void CellWidget::State::setTopPath ( Path topPath )
    970  { _topPath = topPath; }
    971 
    972 
    973  inline void CellWidget::State::setCellWidget ( CellWidget* cw )
    974  {
    975  _cellWidget = cw;
    976  _selection.setCellWidget ( cw );
    977  }
    978 
    979 
    980  inline void CellWidget::State::setCursorStep ( DbU::Unit step )
    981  { _cursorStep = step; }
    982 
    983  inline DbU::Unit CellWidget::State::getCursorStep () const
    984  { return _cursorStep; }
    985 
    986 
    987  inline DbU::UnitPower CellWidget::State::getUnitPower () const
    988  { return _unitPower; }
    989 
    990 
    991  inline void CellWidget::State::setDbuMode ( int mode )
    992  {
    993  _dbuMode = mode;
    994  switch ( _dbuMode ) {
    995  case DbU::Symbolic: _cursorStep = DbU::fromLambda(0.5); break;
    996  case DbU::Grid: _cursorStep = DbU::fromGrid (1.0); break;
    997  case DbU::Physical: _cursorStep = DbU::fromGrid (1.0); break;
    998  }
    999  }
    1000 
    1001 
    1002  inline void CellWidget::State::setUnitPower ( DbU::UnitPower p )
    1003  { _unitPower = p; }
    1004 
    1005 
    1006  inline void CellWidget::State::setShowBoundaries ( bool state )
    1007  { _showBoundaries = state; }
    1008 
    1009 
    1010  inline void CellWidget::State::setShowSelection ( bool state )
    1011  { _showSelection = state; }
    1012 
    1013 
    1014  inline void CellWidget::State::setCumulativeSelection ( bool state )
    1015  { _cumulativeSelection = state; }
    1016 
    1017 
    1018  inline void CellWidget::State::setTopLeft ( DbU::Unit x, DbU::Unit y )
    1019  {
    1020  _scaleHistory[_ihistory]._topLeft.setX(x);
    1021  _scaleHistory[_ihistory]._topLeft.setY(y);
    1022  }
    1023 
    1024 
    1025  inline void CellWidget::State::setTopLeft ( const Point& topLeft )
    1026  { _scaleHistory[_ihistory]._topLeft = topLeft; }
    1027 
    1028 
    1029  inline void CellWidget::State::setQueryFilter ( Query::Mask mask )
    1030  { _queryFilter = mask; }
    1031 
    1032 
    1033  inline void CellWidget::State::setStartLevel ( int level )
    1034  { _startLevel = level; }
    1035 
    1036 
    1037  inline void CellWidget::State::setStopLevel ( int level )
    1038  { _stopLevel = level; }
    1039 
    1040 
    1041  inline void CellWidget::State::setRubberShape ( RubberShape shape )
    1042  { _rubberShape = shape; }
    1043 
    1044 
    1045  inline void CellWidget::State::setHistoryEnable ( bool enable )
    1046  { _historyEnable = enable; }
    1047 
    1048 
    1049  inline Cell* CellWidget::State::getCell () const
    1050  { return _cell; }
    1051 
    1052 
    1053  inline Path CellWidget::State::getTopPath () const
    1054  { return _topPath; }
    1055 
    1056 
    1057  inline Cell* CellWidget::State::getTopCell () const
    1058  { return (_topPath.isEmpty()) ? _cell : _topPath.getOwnerCell(); }
    1059 
    1060 
    1061  inline DbU::Unit CellWidget::State::cursorStep () const
    1062  { return _cursorStep; }
    1063 
    1064 
    1065  inline CellWidget::SelectorCriterions& CellWidget::State::getSelection ()
    1066  { return _selection; }
    1067 
    1068 
    1069  inline RulerSet& CellWidget::State::getRulers ()
    1070  { return _rulers; }
    1071 
    1072 
    1073  inline bool CellWidget::State::showBoundaries () const
    1074  { return _showBoundaries; }
    1075 
    1076 
    1077  inline bool CellWidget::State::showSelection () const
    1078  { return _showSelection; }
    1079 
    1080 
    1081  inline bool CellWidget::State::cumulativeSelection () const
    1082  { return _cumulativeSelection; }
    1083 
    1084 
    1085  inline bool CellWidget::State::getHistoryEnable () const
    1086  { return _historyEnable; }
    1087 
    1088 
    1089  inline size_t CellWidget::State::getHistorySize () const
    1090  { return _scaleHistory.size(); }
    1091 
    1092 
    1093  inline const Point& CellWidget::State::getTopLeft () const
    1094  { return _scaleHistory[_ihistory]._topLeft; }
    1095 
    1096 
    1097  inline Query::Mask CellWidget::State::getQueryFilter () const
    1098  { return _queryFilter; }
    1099 
    1100 
    1101  inline int CellWidget::State::getStartLevel () const
    1102  { return _startLevel; }
    1103 
    1104 
    1105  inline int CellWidget::State::getStopLevel () const
    1106  { return _stopLevel; }
    1107 
    1108 
    1109  inline CellWidget::RubberShape CellWidget::State::getRubberShape () const
    1110  { return _rubberShape; }
    1111 
    1112 
    1113  inline const float& CellWidget::State::getScale () const
    1114  { return _scaleHistory[_ihistory]._scale; }
    1115 
    1116 
    1117  inline int CellWidget::getPixelThreshold () const
    1118  { return _pixelThreshold; }
    1119 
    1120  inline CellWidget::FindStateName::FindStateName ( const Name& cellHierName )
    1121  : unary_function< const shared_ptr<State>&, bool >()
    1122  , _cellHierName(cellHierName)
    1123  { }
    1124 
    1125 
    1126  inline bool CellWidget::FindStateName::operator () ( const shared_ptr<State>& state )
    1127  { return state->getName() == _cellHierName; }
    1128 
    1129 
    1130  inline void CellWidget::setActiveCommand ( Command* command )
    1131  { _activeCommand = command; }
    1132 
    1133 
    1134  inline Command* CellWidget::getActiveCommand () const
    1135  { return _activeCommand; }
    1136 
    1137 
    1138  inline void CellWidget::resetActiveCommand ()
    1139  { _activeCommand = NULL; }
    1140 
    1141 
    1142  inline void CellWidget::setCursorStep ( DbU::Unit step )
    1143  { _state->setCursorStep(step); }
    1144 
    1145 
    1146  inline void CellWidget::setRealSnapGridStep ( DbU::Unit step )
    1147  { DbU::setRealSnapGridStep(step); }
    1148 
    1149 
    1150  inline shared_ptr<CellWidget::State>& CellWidget::getState ()
    1151  {
    1152  _state->setTopLeft ( getTopLeft() );
    1153  return _state;
    1154  }
    1155 
    1156 
    1157  inline shared_ptr<CellWidget::State> CellWidget::getStateClone ()
    1158  {
    1159  _state->setTopLeft ( getTopLeft() );
    1160  return shared_ptr<State>( _state->clone() );
    1161  }
    1162 
    1163 
    1164  inline void CellWidget::addDrawExtensionGo ( const Name& name
    1165  , InitExtensionGo_t* initExtensionGo
    1166  , DrawExtensionGo_t* drawExtensionGo
    1167  )
    1168  { _drawingQuery.addDrawExtensionGo( name, initExtensionGo, drawExtensionGo ); }
    1169 
    1170 
    1171  inline void CellWidget::copyDrawExtensionGos ( const CellWidget* other )
    1172  { _drawingQuery.copyDrawExtensionGos( other->_drawingQuery ); }
    1173 
    1174 
    1175  inline void CellWidget::setStartLevel ( int level )
    1176  {
    1177  _drawingQuery.setStartLevel ( level );
    1178  _state->setStartLevel ( level );
    1179  emit queryFilterChanged ();
    1180  }
    1181 
    1182 
    1183  inline void CellWidget::setStopLevel ( int level )
    1184  {
    1185  _drawingQuery.setStopLevel ( level );
    1186  _state->setStopLevel ( level );
    1187  emit queryFilterChanged ();
    1188  }
    1189 
    1190 
    1191  inline int CellWidget::getStartLevel () const
    1192  { return _drawingQuery.getStartLevel (); }
    1193 
    1194 
    1195  inline int CellWidget::getStopLevel () const
    1196  { return _drawingQuery.getStopLevel (); }
    1197 
    1198 
    1199  inline CellWidget::DrawingPlanes& CellWidget::getDrawingPlanes ()
    1200  { return _drawingPlanes; }
    1201 
    1202 
    1203  inline SelectorSet& CellWidget::getSelectorSet ()
    1204  { return _selectors; }
    1205 
    1206 
    1207  Occurrences CellWidget::getOccurrencesUnder ( const QRect& area ) const
    1208  { return getOccurrencesUnder(screenToDbuBox(area)); }
    1209 
    1210 
    1211  inline void CellWidget::addRuler ( const Point& origin, const Point& extremity )
    1212  {
    1213  _state->getRulers().insert ( shared_ptr<Ruler>( new Ruler(origin,extremity) ) );
    1214  refresh ();
    1215  }
    1216 
    1217 
    1218  inline void CellWidget::addRuler ( shared_ptr<Ruler> ruler )
    1219  {
    1220  _state->getRulers().insert ( ruler );
    1221  refresh ();
    1222  }
    1223 
    1224 
    1225  inline void CellWidget::clearRulers ()
    1226  { _state->getRulers().clear (); refresh(); }
    1227 
    1228 
    1229  inline void CellWidget::refresh ()
    1230  { _redrawManager.refresh(); }
    1231 
    1232 
    1233  inline void CellWidget::redrawSelection ()
    1234  { redrawSelection ( QRect(QPoint(0,0),_drawingPlanes.size()) ); }
    1235 
    1236 
    1237  inline void CellWidget::copyToPrinter ( int xpaper, int ypaper, QPrinter* printer, CellWidget::PainterCb_t& cb )
    1238  { _drawingPlanes.copyToPrinter( xpaper, ypaper, printer, cb ); }
    1239 
    1240 
    1241  inline void CellWidget::copyToImage ( QImage* image, PainterCb_t& cb )
    1242  { _drawingPlanes.copyToImage ( image, cb ); }
    1243 
    1244 
    1245  inline DbU::Unit CellWidget::toDbu ( float d ) const
    1246  {
    1247  DbU::Unit unit;
    1248  switch ( getDbuMode() ) {
    1249  case DbU::Physical: unit = DbU::grid(DbU::physicalToGrid(d,DbU::Micro)); break;
    1250  case DbU::Grid: unit = DbU::grid(d); break;
    1251  case DbU::Db: unit = DbU::db((long)d); break;
    1252  default:
    1253  case DbU::Symbolic: unit = DbU::lambda(d); break;
    1254  }
    1255  return unit;
    1256  }
    1257 
    1258 
    1259  inline int CellWidget::dbuToScreenX ( DbU::Unit x ) const
    1260  { return (int)rint ( (float)( x - _screenArea.getXMin() ) * getScale() ); }
    1261 
    1262 
    1263  inline int CellWidget::dbuToScreenY ( DbU::Unit y ) const
    1264  { return (int)rint ( (float)( _screenArea.getYMax() - y ) * getScale() ); }
    1265 
    1266 
    1267  inline int CellWidget::dbuToScreenLength ( DbU::Unit length ) const
    1268  { return (int)rint ( (float)length * getScale() ); }
    1269 
    1270 
    1271  inline QPoint CellWidget::dbuToScreenPoint ( DbU::Unit x, DbU::Unit y ) const
    1272  { return QPoint ( dbuToScreenX(x), dbuToScreenY(y) ); }
    1273 
    1274 
    1275  inline QPoint CellWidget::dbuToScreenPoint ( const Point& point ) const
    1276  { return QPoint ( dbuToScreenX(point.getX()), dbuToScreenY(point.getY()) ); }
    1277 
    1278 
    1279  inline DbU::Unit CellWidget::screenToDbuX ( int x ) const
    1280  { return (DbU::Unit)(x/getScale()) + _screenArea.getXMin(); }
    1281 
    1282 
    1283  inline DbU::Unit CellWidget::screenToDbuY ( int y ) const
    1284  { return _screenArea.getYMax() - (DbU::Unit)(y/getScale()); }
    1285 
    1286 
    1287  inline DbU::Unit CellWidget::screenToDbuLength ( int length ) const
    1288  { return (int)( (float)length / getScale() ); }
    1289 
    1290 
    1291  inline Point CellWidget::screenToDbuPoint ( const QPoint& point ) const
    1292  { return Point ( screenToDbuX(point.x()), screenToDbuY(point.y()) ); }
    1293 
    1294 
    1295  inline Box CellWidget::screenToDbuBox ( const QRect& rect ) const
    1296  {
    1297  return Box ( screenToDbuX(rect.x())
    1298  , screenToDbuY(rect.y())
    1299  , screenToDbuX(rect.x()+rect.width ())
    1300  , screenToDbuY(rect.y()+rect.height())
    1301  );
    1302  }
    1303 
    1304 
    1305  inline Box& CellWidget::pixelInflate ( Box& box, int pixels ) const
    1306  { return box.inflate(screenToDbuLength(pixels)); }
    1307 
    1308 
    1309  inline Point CellWidget::getTopLeft () const
    1310  { return Point(_screenArea.getXMin(),_screenArea.getYMax()); }
    1311 
    1312 
    1313  inline Box CellWidget::getVisibleArea () const
    1314  { return computeVisibleArea(getScale()); }
    1315 
    1316 
    1317  inline Cell* CellWidget::getCell () const
    1318  { return _state->getCell(); }
    1319 
    1320 
    1321  inline Cell* CellWidget::getTopCell () const
    1322  { return _state->getTopCell(); }
    1323 
    1324 
    1325  inline Path CellWidget::getTopPath () const
    1326  { return _state->getTopPath(); }
    1327 
    1328 
    1329  inline PaletteWidget* CellWidget::getPalette ()
    1330  { return _palette; }
    1331 
    1332 
    1333  inline DbU::Unit CellWidget::cursorStep () const
    1334  { return _state->cursorStep(); }
    1335 
    1336 
    1337  inline unsigned int CellWidget::getDbuMode () const
    1338  { return _state->getDbuMode(); }
    1339 
    1340 
    1341  inline bool CellWidget::gridMode () const
    1342  { return _state->gridMode(); }
    1343 
    1344 
    1345  inline bool CellWidget::symbolicMode () const
    1346  { return _state->symbolicMode(); }
    1347 
    1348 
    1349  inline bool CellWidget::physicalMode () const
    1350  { return _state->physicalMode(); }
    1351 
    1352 
    1353  inline DbU::UnitPower CellWidget::getUnitPower () const
    1354  { return _state->getUnitPower(); }
    1355 
    1356 
    1357  inline bool CellWidget::showBoundaries () const
    1358  { return _state->showBoundaries(); }
    1359 
    1360 
    1361  inline bool CellWidget::showSelection () const
    1362  { return _state->showSelection(); }
    1363 
    1364 
    1365  inline bool CellWidget::cumulativeSelection () const
    1366  { return _state->cumulativeSelection(); }
    1367 
    1368 
    1369  inline QPainter& CellWidget::getPainter ( size_t plane )
    1370  { return _drawingPlanes.painter(plane); }
    1371 
    1372 
    1373  inline const DisplayStyle::HSVr& CellWidget::getDarkening () const
    1374  { return _darkening; }
    1375 
    1376 
    1377  inline const float& CellWidget::getScale () const
    1378  { return _state->getScale(); }
    1379 
    1380 
    1381  inline const QPoint& CellWidget::getMousePosition () const
    1382  { return _mousePosition; }
    1383 
    1384 
    1385  inline void CellWidget::updateMousePosition ()
    1386  {
    1387  Point mousePoint = screenToDbuPoint ( _mousePosition );
    1388  emit mousePositionChanged ( _onCursorGrid(mousePoint) );
    1389  }
    1390 
    1391 
    1392  inline void CellWidget::setQueryFilter ( Query::Mask filter )
    1393  {
    1394  _state->setQueryFilter ( filter );
    1395  emit queryFilterChanged ();
    1396  }
    1397 
    1398 
    1399  inline Query::Mask CellWidget::getQueryFilter () const
    1400  { return _state->getQueryFilter(); }
    1401 
    1402 
    1403  inline void CellWidget::setDbuMode ( int mode )
    1404  { _state->setDbuMode(mode); }
    1405 
    1406 
    1407  inline void CellWidget::setUnitPower ( DbU::UnitPower p )
    1408  { _state->setUnitPower(p); }
    1409 
    1410 
    1411  inline void CellWidget::setRubberShape ( RubberShape shape )
    1412  {
    1413  _state->setRubberShape ( shape );
    1414  _redrawManager.refresh ();
    1415  emit queryFilterChanged ();
    1416  }
    1417 
    1418 
    1419  inline CellWidget::RubberShape CellWidget::getRubberShape () const
    1420  { return _state->getRubberShape(); }
    1421 
    1422 
    1423  inline void CellWidget::setPen ( const QPen& pen, size_t plane )
    1424  { _drawingPlanes.painter(plane).setPen(pen); }
    1425 
    1426 
    1427  inline void CellWidget::setDarkening ( const DisplayStyle::HSVr& darkening )
    1428  { _darkening = darkening; }
    1429 
    1430 
    1431  inline bool CellWidget::isPrinter () const
    1432  { return _isPrinter; }
    1433 
    1434 
    1435  inline void CellWidget::setPrinter ( bool state )
    1436  { _isPrinter = state; }
    1437 
    1438 
    1439  inline bool CellWidget::timeout ( const char* fname, const Timer& timer, double timeout, bool& timedout ) const
    1440  {
    1441  if ( timedout ) return true;
    1442  if ( timer.getCombTimeOnTheFly() < timeout ) return false;
    1443 
    1444  timedout = true;
    1445  cerr << Warning("CellWidget::%s(): timeout %.3f (limit:%.1f)."
    1446  ,fname,timer.getCombTimeOnTheFly(),timeout) << endl;
    1447  return true;
    1448  }
    1449 
    1450 
    1451  inline DbU::Unit CellWidget::_snapGridStep () const
    1452  { return symbolicMode() ? DbU::getSymbolicSnapGridStep() : DbU::getRealSnapGridStep(); }
    1453 
    1454 
    1455  inline DbU::Unit CellWidget::_onSnapGrid ( DbU::Unit u ) const
    1456  { return symbolicMode() ? DbU::getOnSymbolicSnapGrid(u) : DbU::getOnRealSnapGrid(u); }
    1457 
    1458 
    1459  inline Point CellWidget::_onSnapGrid ( const Point& p ) const
    1460  { return Point(_onSnapGrid(p.getX()),_onSnapGrid(p.getY())); }
    1461 
    1462 
    1463  inline DbU::Unit CellWidget::_onCursorGrid ( DbU::Unit u ) const
    1464  { return DbU::getOnCustomGrid(u,cursorStep()); }
    1465 
    1466 
    1467  inline Point CellWidget::_onCursorGrid ( const Point& p ) const
    1468  { return Point(_onCursorGrid(p.getX()),_onCursorGrid(p.getY())); }
    1469 
    1470 
    1471 } // End of Hurricane namespace.
    1472 
    1473 
    1474 GETSTRING_POINTER_SUPPORT(Hurricane::CellWidget);
    1475 IOSTREAM_POINTER_SUPPORT(Hurricane::CellWidget);
    static DbU::Unit getOnCustomGrid(DbU::Unit u, DbU::Unit step, SnapMode mode=Nearest)
    @@ -88,7 +88,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/DisplayStyle_8h_source.html b/hurricane/doc/viewer/html/DisplayStyle_8h_source.html index 24a5dc04..84dc8aed 100644 --- a/hurricane/doc/viewer/html/DisplayStyle_8h_source.html +++ b/hurricane/doc/viewer/html/DisplayStyle_8h_source.html @@ -74,7 +74,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/Graphics_8h_source.html b/hurricane/doc/viewer/html/Graphics_8h_source.html index 1ba63287..25213e05 100644 --- a/hurricane/doc/viewer/html/Graphics_8h_source.html +++ b/hurricane/doc/viewer/html/Graphics_8h_source.html @@ -78,7 +78,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/InspectorWidget_8h_source.html b/hurricane/doc/viewer/html/InspectorWidget_8h_source.html index aac6cb2e..aaa253f0 100644 --- a/hurricane/doc/viewer/html/InspectorWidget_8h_source.html +++ b/hurricane/doc/viewer/html/InspectorWidget_8h_source.html @@ -55,7 +55,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/annotated.html b/hurricane/doc/viewer/html/annotated.html index ccfdcdf2..45cd0488 100644 --- a/hurricane/doc/viewer/html/annotated.html +++ b/hurricane/doc/viewer/html/annotated.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/classHurricane_1_1CellImage-members.html b/hurricane/doc/viewer/html/classHurricane_1_1CellImage-members.html index 84c73842..5582c47e 100644 --- a/hurricane/doc/viewer/html/classHurricane_1_1CellImage-members.html +++ b/hurricane/doc/viewer/html/classHurricane_1_1CellImage-members.html @@ -59,7 +59,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/classHurricane_1_1CellImage.html b/hurricane/doc/viewer/html/classHurricane_1_1CellImage.html index fc50148b..aa45e047 100644 --- a/hurricane/doc/viewer/html/classHurricane_1_1CellImage.html +++ b/hurricane/doc/viewer/html/classHurricane_1_1CellImage.html @@ -261,7 +261,7 @@ ShowScale: display a false color scale at the bottom of the image. Useful if you
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/classHurricane_1_1CellPrinter-members.html b/hurricane/doc/viewer/html/classHurricane_1_1CellPrinter-members.html index 1b691be7..2ed7552e 100644 --- a/hurricane/doc/viewer/html/classHurricane_1_1CellPrinter-members.html +++ b/hurricane/doc/viewer/html/classHurricane_1_1CellPrinter-members.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/classHurricane_1_1CellPrinter.html b/hurricane/doc/viewer/html/classHurricane_1_1CellPrinter.html index e21d4f7a..bc26a243 100644 --- a/hurricane/doc/viewer/html/classHurricane_1_1CellPrinter.html +++ b/hurricane/doc/viewer/html/classHurricane_1_1CellPrinter.html @@ -240,7 +240,7 @@ Implementation details
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/classHurricane_1_1CellViewer-members.html b/hurricane/doc/viewer/html/classHurricane_1_1CellViewer-members.html index 144ecc12..a3321ff1 100644 --- a/hurricane/doc/viewer/html/classHurricane_1_1CellViewer-members.html +++ b/hurricane/doc/viewer/html/classHurricane_1_1CellViewer-members.html @@ -69,7 +69,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/classHurricane_1_1CellViewer.html b/hurricane/doc/viewer/html/classHurricane_1_1CellViewer.html index f9b3c010..f1da78bc 100644 --- a/hurricane/doc/viewer/html/classHurricane_1_1CellViewer.html +++ b/hurricane/doc/viewer/html/classHurricane_1_1CellViewer.html @@ -511,7 +511,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/classHurricane_1_1CellWidget-members.html b/hurricane/doc/viewer/html/classHurricane_1_1CellWidget-members.html index e2891601..0939c070 100644 --- a/hurricane/doc/viewer/html/classHurricane_1_1CellWidget-members.html +++ b/hurricane/doc/viewer/html/classHurricane_1_1CellWidget-members.html @@ -55,7 +55,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/classHurricane_1_1CellWidget.html b/hurricane/doc/viewer/html/classHurricane_1_1CellWidget.html index 1cfd1e9d..cc96de88 100644 --- a/hurricane/doc/viewer/html/classHurricane_1_1CellWidget.html +++ b/hurricane/doc/viewer/html/classHurricane_1_1CellWidget.html @@ -97,7 +97,7 @@ Public Types
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/classHurricane_1_1DisplayStyle-members.html b/hurricane/doc/viewer/html/classHurricane_1_1DisplayStyle-members.html index 6575676d..2f6264e8 100644 --- a/hurricane/doc/viewer/html/classHurricane_1_1DisplayStyle-members.html +++ b/hurricane/doc/viewer/html/classHurricane_1_1DisplayStyle-members.html @@ -71,7 +71,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/classHurricane_1_1DisplayStyle.html b/hurricane/doc/viewer/html/classHurricane_1_1DisplayStyle.html index e8e4cc3e..c8366519 100644 --- a/hurricane/doc/viewer/html/classHurricane_1_1DisplayStyle.html +++ b/hurricane/doc/viewer/html/classHurricane_1_1DisplayStyle.html @@ -620,7 +620,7 @@ Static Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/classHurricane_1_1Graphics-members.html b/hurricane/doc/viewer/html/classHurricane_1_1Graphics-members.html index cf57f3ed..66cafb0e 100644 --- a/hurricane/doc/viewer/html/classHurricane_1_1Graphics-members.html +++ b/hurricane/doc/viewer/html/classHurricane_1_1Graphics-members.html @@ -71,7 +71,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/classHurricane_1_1Graphics.html b/hurricane/doc/viewer/html/classHurricane_1_1Graphics.html index fdd5ae1e..6c75dddf 100644 --- a/hurricane/doc/viewer/html/classHurricane_1_1Graphics.html +++ b/hurricane/doc/viewer/html/classHurricane_1_1Graphics.html @@ -673,7 +673,7 @@ Static Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/classHurricane_1_1InspectorWidget-members.html b/hurricane/doc/viewer/html/classHurricane_1_1InspectorWidget-members.html index a2589f87..d1fd3431 100644 --- a/hurricane/doc/viewer/html/classHurricane_1_1InspectorWidget-members.html +++ b/hurricane/doc/viewer/html/classHurricane_1_1InspectorWidget-members.html @@ -55,7 +55,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/classHurricane_1_1InspectorWidget.html b/hurricane/doc/viewer/html/classHurricane_1_1InspectorWidget.html index 2f65a347..8a7a75d3 100644 --- a/hurricane/doc/viewer/html/classHurricane_1_1InspectorWidget.html +++ b/hurricane/doc/viewer/html/classHurricane_1_1InspectorWidget.html @@ -140,7 +140,7 @@ Inspector Memory Management
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/classes.html b/hurricane/doc/viewer/html/classes.html index 41904396..201852f4 100644 --- a/hurricane/doc/viewer/html/classes.html +++ b/hurricane/doc/viewer/html/classes.html @@ -63,7 +63,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/dir_0afc25342c548a63e1813d8fbde8101d.html b/hurricane/doc/viewer/html/dir_0afc25342c548a63e1813d8fbde8101d.html index 906f9fd6..1795f312 100644 --- a/hurricane/doc/viewer/html/dir_0afc25342c548a63e1813d8fbde8101d.html +++ b/hurricane/doc/viewer/html/dir_0afc25342c548a63e1813d8fbde8101d.html @@ -49,7 +49,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/dir_22af1943967c75aa4d199e6ffd8de9d2.html b/hurricane/doc/viewer/html/dir_22af1943967c75aa4d199e6ffd8de9d2.html index b5deaea5..761e8dd8 100644 --- a/hurricane/doc/viewer/html/dir_22af1943967c75aa4d199e6ffd8de9d2.html +++ b/hurricane/doc/viewer/html/dir_22af1943967c75aa4d199e6ffd8de9d2.html @@ -49,7 +49,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/dir_53ec41d7bc61ef1f85d867f95df84d28.html b/hurricane/doc/viewer/html/dir_53ec41d7bc61ef1f85d867f95df84d28.html index e7305718..dec2e762 100644 --- a/hurricane/doc/viewer/html/dir_53ec41d7bc61ef1f85d867f95df84d28.html +++ b/hurricane/doc/viewer/html/dir_53ec41d7bc61ef1f85d867f95df84d28.html @@ -53,7 +53,7 @@ Directories
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/hurricane/doc/viewer/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html index b4d3da4d..10784571 100644 --- a/hurricane/doc/viewer/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ b/hurricane/doc/viewer/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -49,7 +49,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/files.html b/hurricane/doc/viewer/html/files.html index 5499435d..0c08b66b 100644 --- a/hurricane/doc/viewer/html/files.html +++ b/hurricane/doc/viewer/html/files.html @@ -56,7 +56,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/functions.html b/hurricane/doc/viewer/html/functions.html index 547d81e8..5f01e3c5 100644 --- a/hurricane/doc/viewer/html/functions.html +++ b/hurricane/doc/viewer/html/functions.html @@ -286,7 +286,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/functions_enum.html b/hurricane/doc/viewer/html/functions_enum.html index 8035e6b7..062cab15 100644 --- a/hurricane/doc/viewer/html/functions_enum.html +++ b/hurricane/doc/viewer/html/functions_enum.html @@ -49,7 +49,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/functions_eval.html b/hurricane/doc/viewer/html/functions_eval.html index 63af9994..cdb8983d 100644 --- a/hurricane/doc/viewer/html/functions_eval.html +++ b/hurricane/doc/viewer/html/functions_eval.html @@ -52,7 +52,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/functions_func.html b/hurricane/doc/viewer/html/functions_func.html index 60d1ab98..3b3dbf6c 100644 --- a/hurricane/doc/viewer/html/functions_func.html +++ b/hurricane/doc/viewer/html/functions_func.html @@ -271,7 +271,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/graph_legend.html b/hurricane/doc/viewer/html/graph_legend.html index 7c7e4f2b..4ba34c8d 100644 --- a/hurricane/doc/viewer/html/graph_legend.html +++ b/hurricane/doc/viewer/html/graph_legend.html @@ -74,7 +74,7 @@ A yellow dashed arrow denotes a relation between a template instance and the tem
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/group__graphicsGroup.html b/hurricane/doc/viewer/html/group__graphicsGroup.html index 2a09b498..5e1b258b 100644 --- a/hurricane/doc/viewer/html/group__graphicsGroup.html +++ b/hurricane/doc/viewer/html/group__graphicsGroup.html @@ -96,7 +96,7 @@ General Structure of the Graphics Object
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/index.html b/hurricane/doc/viewer/html/index.html index 70666fb9..f0324507 100644 --- a/hurricane/doc/viewer/html/index.html +++ b/hurricane/doc/viewer/html/index.html @@ -45,7 +45,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/html/modules.html b/hurricane/doc/viewer/html/modules.html index 439a1e77..838c77d2 100644 --- a/hurricane/doc/viewer/html/modules.html +++ b/hurricane/doc/viewer/html/modules.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/hurricane/doc/viewer/latex/refman.tex b/hurricane/doc/viewer/latex/refman.tex index d108043e..51d9161e 100644 --- a/hurricane/doc/viewer/latex/refman.tex +++ b/hurricane/doc/viewer/latex/refman.tex @@ -34,7 +34,7 @@ \vspace*{1cm} {\large Generated by Doxygen 1.8.14}\\ \vspace*{0.5cm} - {\small Thu Nov 12 2020 13:58:48}\\ + {\small Fri Oct 1 2021 19:23:10}\\ \end{center} \end{titlepage} diff --git a/hurricane/src/CMakeLists.txt b/hurricane/src/CMakeLists.txt index a7592f03..c216ac05 100644 --- a/hurricane/src/CMakeLists.txt +++ b/hurricane/src/CMakeLists.txt @@ -1,5 +1,6 @@ +add_subdirectory(configuration) +add_subdirectory(utilities) add_subdirectory(hurricane) add_subdirectory(viewer) add_subdirectory(isobar) add_subdirectory(analog) -add_subdirectory(configuration) diff --git a/hurricane/src/analog/CMakeLists.txt b/hurricane/src/analog/CMakeLists.txt index b2680251..acd1ed06 100644 --- a/hurricane/src/analog/CMakeLists.txt +++ b/hurricane/src/analog/CMakeLists.txt @@ -6,10 +6,10 @@ ${HURRICANE_SOURCE_DIR}/src/isobar ${HURRICANE_SOURCE_DIR}/src/viewer ${HURRICANE_SOURCE_DIR}/src/analog - ${CONFIGURATION_INCLUDE_DIR} + ${HURRICANE_SOURCE_DIR}/src/configuration3 ${QtX_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} - ${PYTHON_INCLUDE_PATH} + ${Python_INCLUDE_DIRS} ) set( cpps AnalogCellExtension.cpp @@ -156,11 +156,9 @@ ) set( depLibs viewer - isobar - hurricane + isobar + hurricane ${UTILITIES_LIBRARY} - ${CONFIGURATION_LIBRARY} - ${Boost_LIBRARIES} ${QtX_LIBRARIES} ) diff --git a/hurricane/src/analog/LayoutGenerator.cpp b/hurricane/src/analog/LayoutGenerator.cpp index 546aff5b..397c1d59 100644 --- a/hurricane/src/analog/LayoutGenerator.cpp +++ b/hurricane/src/analog/LayoutGenerator.cpp @@ -179,7 +179,7 @@ namespace Analog { if (not pTupleCheck) { cerr << Error( "LayoutGenerator::callCheckCoherency(): An exception may have occured in checkCoherency().\n" " (\"%s\")" - , _script->getFileName() + , _script->getFileName().c_str() ) << endl; finalize( NoFlags ); return false; @@ -188,7 +188,7 @@ namespace Analog { if ( not PyTuple_Check(pTupleCheck) or (PyTuple_Size(pTupleCheck) != 2) ) { cerr << Error( "LayoutGenerator::callCheckCoherency(): checkCoherency() did not return a tuple (bool,str).\n" " (\"%s\")" - , _script->getFileName() + , _script->getFileName().c_str() ) << endl; return false; } @@ -197,14 +197,14 @@ namespace Analog { if (pCheckOk == Py_False) { if (flags & ShowError) cerr << Error( "%s\n (\"%s\")" - , PyString_AsString(PyTuple_GetItem(pTupleCheck,1)) - , _script->getFileName() + , PyString_AsString(PyTuple_GetItem(pTupleCheck,1)).c_str() + , _script->getFileName().c_str() ) << endl; return false; } if (not pCheckOk) { cerr << Error( "%s\n A Python exception has occurred." - , _script->getFileName() + , _script->getFileName().c_str() ) << endl; return false; } @@ -218,7 +218,7 @@ namespace Analog { if (not _matrix) { cerr << Error( "LayoutGenerator::callLayout(): An exception may have occured in layout().\n" " (\"%s\")" - , _script->getFileName() + , _script->getFileName().c_str() ) << endl; finalize( NoFlags ); return false; @@ -251,7 +251,7 @@ namespace Analog { finalize( NoFlags ); cerr << Error( "LayoutGenerator::getDeviceBox(): No \"box\" key in returned dictionary.\n" " (\"%s\")" - , _script->getFileName() + , _script->getFileName().c_str() ) << endl; return Box(); } @@ -259,7 +259,7 @@ namespace Analog { if (not IsPyBox(pyBox)) { cerr << Error( "LayoutGenerator::getDeviceBox(): Value associated with \"box\" key is *not* of Box type.\n" " (\"%s\")" - , _script->getFileName() + , _script->getFileName().c_str() ) << endl; finalize( NoFlags ); return Box(); @@ -275,7 +275,7 @@ namespace Analog { if (not pyBox) { cerr << Error( "LayoutGenerator::getDeviceBox(): No \"globalActiveBox\" key in returned dictionary.\n" " (\"%s\")" - , _script->getFileName() + , _script->getFileName().c_str() ) << endl; finalize( NoFlags ); return Box(); @@ -284,7 +284,7 @@ namespace Analog { if (not IsPyBox(pyBox)) { cerr << Error( "LayoutGenerator::getDeviceBox(): Value associated with \"globalActiveBox\" key is *not* of Box type.\n" " (\"%s\")" - , _script->getFileName() + , _script->getFileName().c_str() ) << endl; finalize( NoFlags ); } diff --git a/hurricane/src/analog/MultiCapacitor.cpp b/hurricane/src/analog/MultiCapacitor.cpp index d271784e..b2a8c18a 100644 --- a/hurricane/src/analog/MultiCapacitor.cpp +++ b/hurricane/src/analog/MultiCapacitor.cpp @@ -95,12 +95,12 @@ namespace Analog { unsigned int MultiCapacitor::getRestriction ( Net* net ) const { unsigned int ok = 0x1; - unsigned int yes = 0x2; + //unsigned int yes = 0x2; unsigned int west = 0; unsigned int east = 2; - unsigned int south = 4; - unsigned int north = 6; + //unsigned int south = 4; + //unsigned int north = 6; unsigned int rule = 0; rule |= (ok << east) | (ok << west); diff --git a/hurricane/src/analog/PyAnalog.cpp b/hurricane/src/analog/PyAnalog.cpp index 4528831e..d7e77ece 100644 --- a/hurricane/src/analog/PyAnalog.cpp +++ b/hurricane/src/analog/PyAnalog.cpp @@ -67,10 +67,25 @@ extern "C" { }; + static PyModuleDef PyAnalog_ModuleDef = + { PyModuleDef_HEAD_INIT + , "Analog" /* m_name */ + , "Coriolis Analogic Database." + /* m_doc */ + , -1 /* m_size */ + , PyAnalog_Methods /* m_methods */ + , NULL /* m_reload */ + , NULL /* m_traverse */ + , NULL /* m_clear */ + , NULL /* m_free */ + }; + + // --------------------------------------------------------------- // Module Initialization : "initAnalog ()" - DL_EXPORT(void) initAnalog () { + PyMODINIT_FUNC PyInit_Analog ( void ) + { //trace_on(); cdebug.log(49) << "initAnalog()" << endl; @@ -171,11 +186,11 @@ extern "C" { __cs.addType( "laygen" , &PyTypeLayoutGenerator , "" , false ); - PyObject* module = Py_InitModule( "Analog", PyAnalog_Methods ); + PyObject* module = PyModule_Create( &PyAnalog_ModuleDef ); if (module == NULL) { cerr << "[ERROR]\n" << " Failed to initialize Analog module." << endl; - return; + return NULL; } Py_INCREF( &PyTypeTransistorFamily ); @@ -250,6 +265,8 @@ extern "C" { //PyObject* dictionnary = PyModule_GetDict ( module ); //trace_off(); + + return module; } diff --git a/hurricane/src/analog/PyMatrix.cpp b/hurricane/src/analog/PyMatrix.cpp index fce55f02..17d6e266 100644 --- a/hurricane/src/analog/PyMatrix.cpp +++ b/hurricane/src/analog/PyMatrix.cpp @@ -211,7 +211,7 @@ extern "C" { for ( Py_ssize_t colIndex = 0; colIndex::const_iterator iparameter = _parameters.find(name); if ( iparameter == _parameters.end() ) return NULL; @@ -99,9 +99,9 @@ namespace Cfg2 { } - Parameter* Configuration::addParameter ( const string& id + Parameter* Configuration::addParameter ( string id , Parameter::Type type - , const string& value + , string value , Parameter::Priority priority ) { Parameter* p = getParameter ( id ); @@ -127,7 +127,7 @@ namespace Cfg2 { return _failsafe; } - void Configuration::addLog ( unsigned int mask, const string& id ) + void Configuration::addLog ( unsigned int mask, string id ) { map< unsigned int, set >::iterator ilog = _logSets.find(mask); if ( ilog == _logSets.end() ) { @@ -138,7 +138,7 @@ namespace Cfg2 { } - void Configuration::removeLog ( unsigned int mask, const string& id ) + void Configuration::removeLog ( unsigned int mask, string id ) { map< unsigned int, set >::iterator ilog = _logSets.find(mask); if ( ilog != _logSets.end() ) (*ilog).second.erase ( id ); @@ -150,19 +150,16 @@ namespace Cfg2 { } - bool Configuration::writeToFile ( const std::string& fileName, unsigned int flags, const string& tabs ) const - { - } + bool Configuration::writeToFile ( std::string fileName, unsigned int flags, string tabs ) const + { return false; } - void Configuration::writeToStream ( ostream& out, unsigned int flags, const string& tabs ) const - { - } + void Configuration::writeToStream ( ostream& out, unsigned int flags, string tabs ) const + { } - bool Configuration::readFromFile ( const std::string& fileName ) - { - } + bool Configuration::readFromFile ( std::string fileName ) + { return false; } } // Cfg namespace. diff --git a/hurricane/src/configuration/ConfigurationDialog.cpp b/hurricane/src/configuration/ConfigurationDialog.cpp index 8be4082b..4e768708 100644 --- a/hurricane/src/configuration/ConfigurationDialog.cpp +++ b/hurricane/src/configuration/ConfigurationDialog.cpp @@ -22,7 +22,7 @@ #include "hurricane/configuration/ConfigurationDialog.h" -namespace Cfg2 { +namespace Cfg { ConfigurationDialog::ConfigurationDialog ( QWidget* parent ) diff --git a/hurricane/src/configuration/ConfigurationWidget.cpp b/hurricane/src/configuration/ConfigurationWidget.cpp index c8d0b97d..a5a857fb 100644 --- a/hurricane/src/configuration/ConfigurationWidget.cpp +++ b/hurricane/src/configuration/ConfigurationWidget.cpp @@ -31,7 +31,7 @@ #include "hurricane/configuration/ConfigurationWidget.h" -namespace Cfg2 { +namespace Cfg { using std::max; using std::cerr; @@ -172,8 +172,8 @@ namespace Cfg2 { void ConfigurationWidget::syncSlaves () { - const map& parameters = Configuration::get()->getParameters (); - map::const_iterator iparam = parameters.begin(); + const map& parameters = Configuration::get()->getParameters (); + map::const_iterator iparam = parameters.begin(); for ( ; iparam != parameters.end() ; ++iparam ) { if ( (*iparam).second->getSlaves().empty() ) continue; diff --git a/hurricane/src/configuration/LayoutDescription.cpp b/hurricane/src/configuration/LayoutDescription.cpp index e6d4e540..69934df8 100644 --- a/hurricane/src/configuration/LayoutDescription.cpp +++ b/hurricane/src/configuration/LayoutDescription.cpp @@ -20,7 +20,7 @@ #include "hurricane/configuration/ConfigurationWidget.h" -namespace Cfg2 { +namespace Cfg { using std::cerr; using std::endl; @@ -47,7 +47,7 @@ namespace Cfg2 { } - WidgetDescription::Type WidgetDescription::stringToType ( const string& s ) + WidgetDescription::Type WidgetDescription::stringToType ( string s ) { if (s == "Title" ) return Title; if (s == "Section" ) return Section; @@ -72,7 +72,7 @@ namespace Cfg2 { size_t LayoutDescription::_timestamp = 0; - WidgetDescription* LayoutDescription::getWidget ( const string& id ) + WidgetDescription* LayoutDescription::getWidget ( string id ) { map::iterator iwid = _widgets.find(id); if ( iwid != _widgets.end() ) return (*iwid).second; @@ -87,7 +87,7 @@ namespace Cfg2 { } - TabDescription* LayoutDescription::getTab ( const string& tabName, const string& id ) + TabDescription* LayoutDescription::getTab ( string tabName, string id ) { for ( size_t itab=0 ; itab<_tabs.size() ; ++itab ) { if ( _tabs[itab]->getName() == tabName ) return _tabs[itab]; @@ -98,7 +98,7 @@ namespace Cfg2 { } - void LayoutDescription::addRule ( const string& tabName ) + void LayoutDescription::addRule ( string tabName ) { TabDescription* tab = getTab ( tabName ); tab->addWidget ( WidgetDescription::rule() ); @@ -106,7 +106,7 @@ namespace Cfg2 { } - void LayoutDescription::addTitle ( const string& tabName, const string& title ) + void LayoutDescription::addTitle ( string tabName, string title ) { TabDescription* tab = getTab ( tabName ); tab->addWidget ( WidgetDescription::title(title) ); @@ -114,7 +114,7 @@ namespace Cfg2 { } - void LayoutDescription::addSection ( const string& tabName, const string& section, int column ) + void LayoutDescription::addSection ( string tabName, string section, int column ) { TabDescription* tab = getTab ( tabName ); tab->addWidget ( WidgetDescription::section(section,column) ); @@ -122,9 +122,9 @@ namespace Cfg2 { } - void LayoutDescription::addParameter ( const string& tabName - , const string& id - , const string& label + void LayoutDescription::addParameter ( string tabName + , string id + , string label , int column , int span , unsigned int flags ) @@ -185,7 +185,7 @@ namespace Cfg2 { } - void LayoutDescription::writeToStream ( ostream& out, const string& tabs ) const + void LayoutDescription::writeToStream ( ostream& out, string tabs ) const { } diff --git a/hurricane/src/configuration/LogWidget.cpp b/hurricane/src/configuration/LogWidget.cpp index 75c7196b..299ed5cb 100644 --- a/hurricane/src/configuration/LogWidget.cpp +++ b/hurricane/src/configuration/LogWidget.cpp @@ -27,7 +27,7 @@ #include "hurricane/configuration/LogWidget.h" -namespace Cfg2 { +namespace Cfg { using std::set; using std::string; diff --git a/hurricane/src/configuration/Parameter.cpp b/hurricane/src/configuration/Parameter.cpp index e65426c0..928eeb4c 100644 --- a/hurricane/src/configuration/Parameter.cpp +++ b/hurricane/src/configuration/Parameter.cpp @@ -1,7 +1,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC 2008-2018, All Rights Reserved +// Copyright (c) Sorbonne Université 2008-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -15,12 +15,12 @@ #include -//#include "vlsisapd/utilities/Path.h" +#include "hurricane/utilities/Path.h" #include "hurricane/configuration/Parameter.h" #include "hurricane/configuration/Configuration.h" -namespace Cfg2 { +namespace Cfg { using std::cerr; using std::endl; @@ -70,7 +70,7 @@ namespace Cfg2 { } - Parameter::Type Parameter::stringToType ( const std::string& stype ) + Parameter::Type Parameter::stringToType ( std::string stype ) { if (stype == "string" ) return String; else if (stype == "int" ) return Int; @@ -97,7 +97,7 @@ namespace Cfg2 { } - Parameter::Priority Parameter::stringToPriority ( const std::string& spriority ) + Parameter::Priority Parameter::stringToPriority ( std::string spriority ) { if (spriority == "UseDefault" ) return UseDefault; else if (spriority == "ApplicationBuiltin") return ApplicationBuiltin; @@ -110,10 +110,10 @@ namespace Cfg2 { } - Parameter::Parameter ( const std::string& id - , Type type - , const std::string& value - , Priority priority + Parameter::Parameter ( std::string id + , Type type + , std::string value + , Priority priority ) : _id (id) , _type (type) @@ -195,14 +195,14 @@ namespace Cfg2 { } - bool Parameter::setRawString ( const string& s, Priority priority ) + bool Parameter::setRawString ( string s, Priority priority ) { if ( not _updatePriority(priority) ) return false; return _doChange ( _flags|FromString, s, false, 0, 0.0 ); } - bool Parameter::setString ( const std::string& s, Priority priority, unsigned int flags ) + bool Parameter::setString ( std::string s, Priority priority, unsigned int flags ) { if ( not _updatePriority(priority) ) return false; @@ -294,7 +294,7 @@ namespace Cfg2 { } - bool Parameter::_doChange ( unsigned int flags, const string& s, bool b, int i, double d ) + bool Parameter::_doChange ( unsigned int flags, string s, bool b, int i, double d ) { //cerr << "_doChange: " << _id << ":" << _value << " -> \"" << s << "\"|" << b << "|" << i << "|" << d // << " [" << _flags << "]"; diff --git a/hurricane/src/configuration/ParameterWidget.cpp b/hurricane/src/configuration/ParameterWidget.cpp index 48330418..a9c53457 100644 --- a/hurricane/src/configuration/ParameterWidget.cpp +++ b/hurricane/src/configuration/ParameterWidget.cpp @@ -28,7 +28,7 @@ #include "hurricane/configuration/ConfigurationWidget.h" -namespace Cfg2 { +namespace Cfg { using std::cerr; using std::endl; diff --git a/hurricane/src/configuration/ProxyProperty.cpp b/hurricane/src/configuration/ProxyProperty.cpp new file mode 100644 index 00000000..1564fadd --- /dev/null +++ b/hurricane/src/configuration/ProxyProperty.cpp @@ -0,0 +1,135 @@ + +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) UPMC 2008-2018, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | I s o b a r - Hurricane / Python Interface | +// | | +// | Authors : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +// | =============================================================== | +// | C++ Module : "./ProxyProperty.cpp" | +// +-----------------------------------------------------------------+ + + +#include +#include +#include "hurricane/configuration/ProxyProperty.h" +#include "hurricane/Error.h" +#include "hurricane/Warning.h" + +using namespace Hurricane; + +namespace Isobar3 { + +namespace { + + using namespace std; + + + // --------------------------------------------------------------- + // Local Variables. + + + const char* twiceSetOffset = + "ProxyProperty::setOffset () :\n\n" + " Attempt to sets the _shadow member offset twice.\n"; + + +} + + +// ------------------------------------------------------------------- +// Class : "ProxyProperty". + + + Name ProxyProperty::_name = "Isobar3::ProxyProperty"; + size_t ProxyProperty::_offset = (size_t)-1; + + + ProxyProperty::ProxyProperty ( void* shadow ) + : Property() + , _owner (NULL) + , _shadow (shadow) + { + if (_offset == (size_t)-1) + throw Error( "ProxyProperty::ProxyProperty(): _offset has not been computed yet!" ); + } + + + ProxyProperty* ProxyProperty::create ( void* shadow ) + { + if (not shadow) + throw Error( "ProxyProperty::create(): Empty \"shadow\" argument." ); + + ProxyProperty* property = new ProxyProperty ( shadow ); + if (not property) + throw Error( "ProxyProperty::create()" ); + return property; + } + + + void ProxyProperty::_preDestroy () + { + if (_owner) _owner->_onDestroyed( this ); + + cdebug_log(20,0) << "ProxyProperty::_owner: " << (void*)_owner << endl; + cdebug_log(20,0) << "ProxyProperty::_shadow: " << (void*)_shadow << endl; + if (_offset >= 0) { + void** shadowMember = ( (void**)( (size_t)_shadow + _offset ) ); + cdebug_log(20,0) << "ProxyProperty::_shadowMember: " << (void*)*shadowMember << endl; + *shadowMember = NULL; + } + } + + + void ProxyProperty::onCapturedBy ( DBo* owner ) + { + if ((_owner) and (_owner != owner) ) + throw Error( getString(this).c_str() ); + _owner = owner; + } + + + void ProxyProperty::onReleasedBy ( DBo* owner ) + { if (_owner == owner) onNotOwned (); } + + + void ProxyProperty::onNotOwned () + { destroy (); } + + + void ProxyProperty::setOffset ( size_t offset ) + { + if (_offset != (size_t)-1) throw Error( twiceSetOffset ); + _offset = offset; + } + + + string ProxyProperty::_getString () const + { + ostringstream os; + os << "<" << _getTypeName() << " "; + if ( _owner ) os << hex << (void*)_owner << " "; + else os << "[not owned] "; + os << _shadow << ">"; + return os.str(); + } + + + Record* ProxyProperty::_getRecord () const + { + Record* record = Property::_getRecord (); + + if (record) { + record->add ( getSlot ( "_owner" , _owner ) ); + record->add ( getSlot ( "_shadow", _shadow ) ); + } + return ( record ); + } + + +} // Isobar namespace. diff --git a/hurricane/src/configuration/PyBasicLayer.cpp b/hurricane/src/configuration/PyBasicLayer.cpp new file mode 100644 index 00000000..20ab1b35 --- /dev/null +++ b/hurricane/src/configuration/PyBasicLayer.cpp @@ -0,0 +1,130 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | 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 : "./PyBasicLayer.cpp" | +// +-----------------------------------------------------------------+ + + +#include "hurricane/configuration/PyName.h" +#include "hurricane/configuration/PyTechnology.h" +#include "hurricane/configuration/PyBasicLayer.h" + + +namespace Isobar3 { + +using namespace Hurricane; + +extern "C" { + + +// Thin wrappers for overloadeds member functions. + + static BasicLayer* create3 ( Technology* technology + , Name name + , BasicLayer::Material material + ) + { return BasicLayer::create( technology, name, material ); } + + static BasicLayer* create5 ( Technology* technology + , Name name + , BasicLayer::Material material + , unsigned gds2Layer + , unsigned gds2Datatype + ) + { return BasicLayer::create( technology, name, material, gds2Layer, gds2Datatype ); } + + static BasicLayer* create6 ( Technology* technology + , Name name + , BasicLayer::Material material + , unsigned gds2Layer + , unsigned gds2Datatype + , DbU::Unit minimalSize + ) + { return BasicLayer::create( technology, name, material, gds2Layer, gds2Datatype, minimalSize ); } + + static BasicLayer* create7 ( Technology* technology + , Name name + , BasicLayer::Material material + , unsigned gds2Layer + , unsigned gds2Datatype + , DbU::Unit minimalSize + , DbU::Unit minimalSpacing + ) + { return BasicLayer::create( technology + , name + , material + , gds2Layer + , gds2Datatype + , minimalSize + , minimalSpacing ); } + + +// Python methods. + + static PyObject* PyBasicLayer_create ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callFunction("BasicLayer.create",&create7,args); + if (not rvalue) rvalue = callFunction("BasicLayer.create",&create6,args); + if (not rvalue) rvalue = callFunction("BasicLayer.create",&create5,args); + if (not rvalue) rvalue = callFunction("BasicLayer.create",&create3,args); + return rvalue; + } + + static PyObject* PyBasicLayer_getMaterial ( PyObject* self, PyObject* args ) + { return callMethod("BasicLayer.getMaterial",&BasicLayer::getMaterial,self,args); } + + static PyObject* PyBasicLayer_getBlockageLayer ( PyObject* self, PyObject* args ) + { return callMethod("BasicLayer.getBlockageLayer",&BasicLayer::getBlockageLayer,self,args); } + + static PyObject* PyBasicLayer_setBlockageLayer ( PyObject* self, PyObject* args ) + { return callMethod("BasicLayer.setBlockageLayer",&BasicLayer::setBlockageLayer,self,args); } + + static PyObject* PyBasicLayer_setGds2Layer ( PyObject* self, PyObject* args ) + { return callMethod("BasicLayer.setGds2Layer",&BasicLayer::setGds2Layer,self,args); } + + static PyObject* PyBasicLayer_setGds2Datatype ( PyObject* self, PyObject* args ) + { return callMethod("BasicLayer.setGds2Datatype",&BasicLayer::setGds2Datatype,self,args); } + + static PyObject* PyBasicLayer_setRealName ( PyObject* self, PyObject* args ) + { return callMethod("BasicLayer.setRealName",&BasicLayer::setRealName,self,args); } + + static PyObject* PyBasicLayer_destroy ( PyObject* self, PyObject* args ) + { return callMethod("BasicLayer.destroy",&BasicLayer::destroy,self,args); } + + + // --------------------------------------------------------------- + // PyBasicLayer Attribute Method table. + + PyMethodDef PyBasicLayer_Methods[] = + { { "create" , (PyCFunction)PyBasicLayer_create , METH_VARARGS|METH_STATIC + , "Create a new BasicLayer." } + , { "getMaterial" , (PyCFunction)PyBasicLayer_getMaterial , METH_NOARGS + , "Returns the type of Material." } + , { "getBlockageLayer" , (PyCFunction)PyBasicLayer_getBlockageLayer , METH_NOARGS + , "Returns the associated blockage layer, if any." } + , { "setBlockageLayer" , (PyCFunction)PyBasicLayer_setBlockageLayer , METH_VARARGS + , "Sets the blockage layer associated to this one." } + , { "setGds2Layer" , (PyCFunction)PyBasicLayer_setGds2Layer , METH_VARARGS + , "Sets the GDSII layer number." } + , { "setGds2Datatype" , (PyCFunction)PyBasicLayer_setGds2Datatype , METH_VARARGS + , "Sets the GDSII layer Datatype." } + , { "setRealName" , (PyCFunction)PyBasicLayer_setRealName , METH_VARARGS + , "Sets the real name of this layer (as seen in GDSII)." } + , { "destroy" , (PyCFunction)PyBasicLayer_destroy , METH_NOARGS + , "destroy associated hurricane object, the python object remains." } + , {NULL, NULL, 0, NULL} /* sentinel */ + }; + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/PyBox.cpp b/hurricane/src/configuration/PyBox.cpp new file mode 100644 index 00000000..b2cf07b9 --- /dev/null +++ b/hurricane/src/configuration/PyBox.cpp @@ -0,0 +1,221 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | 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 : "./PyBox.cpp" | +// +-----------------------------------------------------------------+ + + +#include "hurricane/configuration/PyPoint.h" +#include "hurricane/configuration/PyBox.h" + + +namespace Isobar3 { + +using namespace Hurricane; + +extern "C" { + + +// Thin wrappers for overloadeds member functions. + + static Box* ctorBox0 () + { return new Box(); } + + static Box* ctorBox1 ( Point p ) + { return new Box( p ); } + + static Box* ctorBox2u ( DbU::Unit x, DbU::Unit y ) + { return new Box( x, y ); } + + static Box* ctorBox2p ( Point p1, Point p2 ) + { return new Box( p1, p2 ); } + + static Box* ctorBox4 ( DbU::Unit x1, DbU::Unit y1, DbU::Unit x2, DbU::Unit y2 ) + { return new Box( x1, y1, x2, y2 ); } + + static Box& inflate4 ( Box* box, DbU::Unit dxMin, DbU::Unit dyMin, DbU::Unit dxMax, DbU::Unit dyMax ) + { return box->inflate( dxMin, dyMin, dxMax, dyMax ); } + + static Box& inflate2 ( Box* box, DbU::Unit dx, DbU::Unit dy ) + { return box->inflate( dx, dy ); } + + static Box& inflate1 ( Box* box, DbU::Unit dxy ) + { return box->inflate( dxy ); } + + static Box& merge4 ( Box* box, DbU::Unit x1, DbU::Unit y1, DbU::Unit x2, DbU::Unit y2 ) + { + cerr << "Box_merge4() called." << endl; + return box->merge( x1, y1, x2, y2 ); + } + + static Box& merge2 ( Box* box, DbU::Unit x, DbU::Unit y ) + { + cerr << "Box_merge2() called." << endl; + return box->merge( x, y ); + } + + static Box& merge1p ( Box* box, Point p ) + { + cerr << "Box_merge1p() called." << endl; + return box->merge( p ); + } + + static Box& merge1b ( Box* box, Box b ) + { + cerr << "Box_merge1b() called." << endl; + return box->merge( b ); + } + + static bool contains2 ( Box* box, DbU::Unit x, DbU::Unit y ) + { return box->contains( x, y ); } + + static bool contains1p ( Box* box, Point p ) + { return box->contains( p ); } + + static bool contains1b ( Box* box, Box b ) + { return box->contains( b ); } + + +// Python methods. + + static PyObject* PyBox_isEmpty ( PyObject* self, PyObject* args ) + { return callMethod("Box.isEmpty",&Box::isEmpty,self,args); } + + static PyObject* PyBox_isFlat ( PyObject* self, PyObject* args ) + { return callMethod("Box.isFlat",&Box::isFlat,self,args); } + + static PyObject* PyBox_isPonctual ( PyObject* self, PyObject* args ) + { return callMethod("Box.isPonctual",&Box::isPonctual,self,args); } + + static PyObject* PyBox_getXMin ( PyObject* self, PyObject* args ) + { return callMethod("Box.getXMin",&Box::getXMin,self,args); } + + static PyObject* PyBox_getYMin ( PyObject* self, PyObject* args ) + { return callMethod("Box.getYMin",&Box::getYMin,self,args); } + + static PyObject* PyBox_getXMax ( PyObject* self, PyObject* args ) + { return callMethod("Box.getXMax",&Box::getXMax,self,args); } + + static PyObject* PyBox_getYMax ( PyObject* self, PyObject* args ) + { return callMethod("Box.getYMax",&Box::getYMax,self,args); } + + static PyObject* PyBox_getXCenter ( PyObject* self, PyObject* args ) + { return callMethod("Box.getXCenter",&Box::getXCenter,self,args); } + + static PyObject* PyBox_getYCenter ( PyObject* self, PyObject* args ) + { return callMethod("Box.getYCenter",&Box::getYCenter,self,args); } + + static PyObject* PyBox_getCenter ( PyObject* self, PyObject* args ) + { return callMethod("Box.getCenter",&Box::getCenter,self,args); } + + static PyObject* PyBox_getWidth ( PyObject* self, PyObject* args ) + { return callMethod("Box.getWidth",&Box::getWidth,self,args); } + + static PyObject* PyBox_getHalfWidth ( PyObject* self, PyObject* args ) + { return callMethod("Box.getHalfWidth",&Box::getHalfWidth,self,args); } + + static PyObject* PyBox_getHeight ( PyObject* self, PyObject* args ) + { return callMethod("Box.getHeight",&Box::getHeight,self,args); } + + static PyObject* PyBox_getHalfHeight ( PyObject* self, PyObject* args ) + { return callMethod("Box.getHalfHeight",&Box::getHalfHeight,self,args); } + + static PyObject* PyBox_getUnion ( PyObject* self, PyObject* args ) + { return callMethod("Box.getUnion",&Box::getUnion,self,args); } + + static PyObject* PyBox_getIntersection ( PyObject* self, PyObject* args ) + { return callMethod("Box.getIntersection",&Box::getIntersection,self,args); } + + static PyObject* PyBox_intersect ( PyObject* self, PyObject* args ) + { return callMethod("Box.intersect",&Box::intersect,self,args); } + + static PyObject* PyBox_isConstrainedBy ( PyObject* self, PyObject* args ) + { return callMethod("Box.isConstrainedBy",&Box::isConstrainedBy,self,args); } + + static PyObject* PyBox_inflate ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Box.inflate",&inflate4,self,args); + if (not rvalue) rvalue = callMethod("Box.inflate",&inflate2,self,args); + if (not rvalue) rvalue = callMethod("Box.inflate",&inflate1,self,args); + return rvalue; + } + + static PyObject* PyBox_merge ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Box.merge4",&merge4 ,self,args); + if (not rvalue) rvalue = callMethod("Box.merge2",&merge2 ,self,args); + if (not rvalue) rvalue = callMethod("Box.merge1b",&merge1b,self,args); + if (not rvalue) rvalue = callMethod("Box.merge1p",&merge1p,self,args); + return rvalue; + } + + static PyObject* PyBox_contains ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Box.contains",&contains2 ,self,args); + if (not rvalue) rvalue = callMethod("Box.contains",&contains1b,self,args); + if (not rvalue) rvalue = callMethod("Box.contains",&contains1p,self,args); + return rvalue; + } + + static PyObject* PyBox_makeEmpty ( PyObject* self, PyObject* args ) + { return callMethod("Box.makeEmpty",&Box::makeEmpty,self,args); } + + PyObject* PyBox_NEW ( PyTypeObject* pyType, PyObject* args, PyObject* kwargs ) + { + PyObject* rvalue = callFunction("Box",&ctorBox4 ,args); + if (not rvalue) rvalue = callFunction("Box",&ctorBox2p,args); + if (not rvalue) rvalue = callFunction("Box",&ctorBox2u,args); + if (not rvalue) rvalue = callFunction("Box",&ctorBox1 ,args); + if (not rvalue) rvalue = callFunction("Box",&ctorBox0 ,args); + return rvalue; + } + + int PyBox_Init ( PyObject* self, PyObject* args, PyObject* kwargs ) + { + cdebug_log(20,0) << "PyBox_Init(): " << (void*)self << endl; + return 0; + } + + + // --------------------------------------------------------------- + // PyBox Method table. + + PyMethodDef PyBox_Methods[] = + { { "getXMin" , (PyCFunction)PyBox_getXMin , METH_NOARGS , "Return the XMin value." } + , { "getYMin" , (PyCFunction)PyBox_getYMin , METH_NOARGS , "Return the YMin value." } + , { "getXMax" , (PyCFunction)PyBox_getXMax , METH_NOARGS , "Return the XMax value." } + , { "getYMax" , (PyCFunction)PyBox_getYMax , METH_NOARGS , "Return the YMax value." } + , { "getXCenter" , (PyCFunction)PyBox_getXCenter , METH_NOARGS , "Return the X box center value." } + , { "getYCenter" , (PyCFunction)PyBox_getYCenter , METH_NOARGS , "Return the Y box center value." } + , { "getCenter" , (PyCFunction)PyBox_getCenter , METH_NOARGS , "Return the box center Point." } + , { "getWidth" , (PyCFunction)PyBox_getWidth , METH_NOARGS , "Return the box width." } + , { "getHalfWidth" , (PyCFunction)PyBox_getHalfWidth , METH_NOARGS , "Return the box half width." } + , { "getHeight" , (PyCFunction)PyBox_getHeight , METH_NOARGS , "Return the box height." } + , { "getHalfHeight" , (PyCFunction)PyBox_getHalfHeight , METH_NOARGS , "Return the box half height." } + , { "getUnion" , (PyCFunction)PyBox_getUnion , METH_VARARGS, "Return the smallest enclosing box." } + , { "getIntersection", (PyCFunction)PyBox_getIntersection, METH_VARARGS, "Return the overlapping area." } + , { "isEmpty" , (PyCFunction)PyBox_isEmpty , METH_NOARGS , "Return true if the box is empty." } + , { "isFlat" , (PyCFunction)PyBox_isFlat , METH_NOARGS , "Return true if the box is flat." } + , { "isPonctual" , (PyCFunction)PyBox_isPonctual , METH_NOARGS , "Return true if the box reduced to a point." } + , { "contains" , (PyCFunction)PyBox_contains , METH_VARARGS, "Return true if the box contains the argument." } + , { "intersect" , (PyCFunction)PyBox_intersect , METH_VARARGS, "Return true if two boxes overlap." } + , { "isConstrainedBy", (PyCFunction)PyBox_isConstrainedBy, METH_VARARGS, "Return true if the argment box is included and share at least a side." } + , { "makeEmpty" , (PyCFunction)PyBox_makeEmpty , METH_NOARGS , "Transform the box in an empty one." } + , { "inflate" , (PyCFunction)PyBox_inflate , METH_VARARGS, "Expand the box to contains the arguments." } + , { "merge" , (PyCFunction)PyBox_merge , METH_VARARGS, "Expand or contract the box to contains the arguments." } + , {NULL, NULL, 0, NULL} /* sentinel */ + }; + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/PyCfg.cpp b/hurricane/src/configuration/PyCfg.cpp index 81ee29f3..ed3255c9 100644 --- a/hurricane/src/configuration/PyCfg.cpp +++ b/hurricane/src/configuration/PyCfg.cpp @@ -14,87 +14,166 @@ // +-----------------------------------------------------------------+ -#include "hurricane/configuration/PyHurricane2.h" +#include "hurricane/configuration/PyTypeManager.h" #include "hurricane/configuration/PyConfiguration.h" +#include "hurricane/configuration/PyParameter.h" +#include "hurricane/configuration/PyLayoutDescription.h" -namespace Cfg2 { +namespace Cfg { using std::cerr; using std::endl; using std::string; - using namespace Isobar2; - - -#if !defined(__PYTHON_MODULE__) - -// +=================================================================+ -// | "PyCfg" Shared Library Code Part | -// +=================================================================+ - - -# else // PyCfg Shared Library Code Part. - -// +=================================================================+ -// | "PyCfg" Python Module Code Part | -// +=================================================================+ + using namespace Isobar3; extern "C" { - - PyObject* ConstructorError = NULL; - PyObject* ProxyError = NULL; - PyObject* HurricaneError = NULL; - PyObject* HurricaneWarning = NULL; + + Parameter* getParamString1 ( std::string id ) { return getParamString(id); } + Parameter* getParamBool1 ( std::string id ) { return getParamBool(id); } + Parameter* getParamInt1 ( std::string id ) { return getParamInt(id); } + Parameter* getParamEnumerate1 ( std::string id ) { return getParamEnumerate(id); } + Parameter* getParamDouble1 ( std::string id ) { return getParamDouble(id); } + Parameter* getParamPercentage1 ( std::string id ) { return getParamPercentage(id); } + + Parameter* getParamString2 ( std::string id, std::string value ) { return getParamString(id,value); } + Parameter* getParamInt2 ( std::string id, int value ) { return getParamInt(id,value); } + Parameter* getParamEnumerate2 ( std::string id, int value ) { return getParamEnumerate(id,value); } + Parameter* getParamBool2 ( std::string id, bool value ) { return getParamBool(id,value); } + Parameter* getParamDouble2 ( std::string id, double value ) { return getParamDouble(id,value); } + Parameter* getParamPercentage2 ( std::string id, double value ) { return getParamPercentage(id,value); } - static PyObject* PyCfg_get ( PyObject* args ) + static PyObject* PyCfg_hasParameter ( PyObject* module, PyObject* args ) + { return callFunction("hasParameter",&hasParameter,args); } + + + static PyObject* PyCfg_getParamString ( PyObject* self, PyObject* args ) { - return staticMethod( "Cfg.get()", new PyFunctionWrapperAny(&Configuration::get), args ); + PyObject* rvalue = callFunction("getParamString",&getParamString2,args); + if (not rvalue) rvalue = callFunction("getParamString",&getParamString1,args); + return rvalue; + } + + + static PyObject* PyCfg_getParamBool ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callFunction("getParamBool",&getParamBool2,args); + if (not rvalue) rvalue = callFunction("getParamBool",&getParamBool1,args); + return rvalue; + } + + + static PyObject* PyCfg_getParamInt ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callFunction("getParamInt",&getParamInt2,args); + if (not rvalue) rvalue = callFunction("getParamInt",&getParamInt1,args); + return rvalue; + } + + + static PyObject* PyCfg_getParamEnumerate ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callFunction("getParamEnumerate",&getParamEnumerate2,args); + if (not rvalue) rvalue = callFunction("getParamEnumerate",&getParamEnumerate1,args); + return rvalue; + } + + + static PyObject* PyCfg_getParamDouble ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callFunction("getParamDouble",&getParamDouble2,args); + if (not rvalue) rvalue = callFunction("getParamDouble",&getParamDouble1,args); + return rvalue; + } + + + static PyObject* PyCfg_getParamPercentage ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callFunction("getParamPercentage",&getParamPercentage2,args); + if (not rvalue) rvalue = callFunction("getParamPercentage",&getParamPercentage1,args); + return rvalue; } static PyMethodDef PyCfg_Methods[] = - { { "get" , (PyCFunction)PyCfg_get, METH_VARARGS - , "Return the Configuration database singleton." } + { { "hasParameter" , (PyCFunction)PyCfg_hasParameter , METH_VARARGS + , "Return the Configuration database singleton." } + , { "getParamString" , (PyCFunction)PyCfg_getParamString , METH_VARARGS + , "Return the named string parameter (if it exists)." } + , { "getParamBool" , (PyCFunction)PyCfg_getParamBool , METH_VARARGS + , "Return the named string parameter (if it exists)." } + , { "getParamInt" , (PyCFunction)PyCfg_getParamInt , METH_VARARGS + , "Return the named string parameter (if it exists)." } + , { "getParamEnumerate" , (PyCFunction)PyCfg_getParamEnumerate , METH_VARARGS + , "Return the named string parameter (if it exists)." } + , { "getParamDouble" , (PyCFunction)PyCfg_getParamDouble , METH_VARARGS + , "Return the named string parameter (if it exists)." } + , { "getParamPercentage", (PyCFunction)PyCfg_getParamPercentage, METH_VARARGS + , "Return the named string parameter (if it exists)." } , {NULL, NULL, 0, NULL} /* sentinel */ }; - DL_EXPORT(void) initCfg2 () + static PyModuleDef PyCfg_ModuleDef = + { PyModuleDef_HEAD_INIT + , .m_name = "Cfg" + , .m_doc = "Coriolis configuration database." + , .m_size = -1 + , .m_methods = PyCfg_Methods + }; + + + PyMODINIT_FUNC PyInit_Cfg ( void ) { - cdebug_log(20,0) << "initCfg2()" << endl; + cdebug_log(20,0) << "PyInit_Cfg() (Python3+template)" << endl; + cerr << "PyInit_Cfg() (Python3+template)" << endl; - PyObject* module = Py_InitModule( "Cfg2", PyCfg_Methods ); + PyObject* module = PyModule_Create( &PyCfg_ModuleDef ); if (not module) { cerr << "[ERROR]\n" - << " Failed to initialize Cfg2 module." << endl; - return; + << " Failed to initialize Cfg module." << endl; + return NULL; } PyObject* dictionnary = PyModule_GetDict( module ); - uint64_t flags = PyTypeManager::NoFlags; - PyTypeManager::add( module, (PyMethodDef*)PyConfiguration_Methods, flags ); - - //PyParameter_postModuleInit(); + PyTypeManagerNonDBo::create( module + , PyConfiguration_Methods + , PyConfiguration_Getsets + , PyTypeManager::NoCppDelete ); + PyTypeManagerNonDBo::create( module + , PyParameter_Methods + , PyParameter_Getsets + , PyTypeManager::NoCppDelete ); + PyTypeManagerVector::create( module, PyTypeManager::NoCppDelete ); + PyTypeManagerMap ::create( module, PyTypeManager::NoCppDelete ); + PyTypeManagerNonDBo::create( module + , PyLayoutDescription_Methods + , NULL + , PyTypeManager::NoCppDelete ); - ConstructorError = PyErr_NewException ( (char*)"hurricane.ConstructorError", NULL, NULL ); - ProxyError = PyErr_NewException ( (char*)"hurricane.ProxyError" , NULL, NULL ); - HurricaneError = PyErr_NewException ( (char*)"hurricane.HurricaneError" , NULL, NULL ); - HurricaneWarning = PyErr_NewException ( (char*)"hurricane.HurricaneWarning", PyExc_Warning, NULL ); + ConstructorError = PyErr_NewException( (char*)"hurricane.ConstructorError", NULL, NULL ); + ProxyError = PyErr_NewException( (char*)"hurricane.ProxyError" , NULL, NULL ); + HurricaneError = PyErr_NewException( (char*)"hurricane.HurricaneError" , NULL, NULL ); + HurricaneWarning = PyErr_NewException( (char*)"hurricane.HurricaneWarning", PyExc_Warning, NULL ); - PyDict_SetItemString ( dictionnary, "ConstructorError", ConstructorError ); - PyDict_SetItemString ( dictionnary, "ProxyError" , ProxyError ); - PyDict_SetItemString ( dictionnary, "HurricaneError" , HurricaneError ); + PyDict_SetItemString( dictionnary, "ConstructorError", ConstructorError ); + PyDict_SetItemString( dictionnary, "ProxyError" , ProxyError ); + PyDict_SetItemString( dictionnary, "HurricaneError" , HurricaneError ); - cdebug_log(20,0) << "Cfg.so loaded " << (void*)&typeid(string) << endl; + cdebug_log(20,0) + << "Cfg.so loaded " << (void*)&typeid(string) + << " (" << demangle(typeid(string).name()) << ")" << endl; + cerr + << "Cfg.so loaded " << (void*)&typeid(string) + << " (" << demangle(typeid(string).name()) << ")" << endl; + + return module; } -} // End of extern "C". - - -#endif // PyCfg Module Code Part. +} // extern "C". } // Cfg namespace. diff --git a/hurricane/src/configuration/PyConfiguration.cpp b/hurricane/src/configuration/PyConfiguration.cpp index a6004c35..67618359 100644 --- a/hurricane/src/configuration/PyConfiguration.cpp +++ b/hurricane/src/configuration/PyConfiguration.cpp @@ -15,90 +15,132 @@ #include "hurricane/configuration/PyConfiguration.h" +#include "hurricane/configuration/PyParameter.h" -namespace Cfg2 { +namespace Cfg { using namespace Hurricane; +using namespace Isobar3; + extern "C" { + static LayoutDescription* getLayout ( const Configuration* cf ) + { return const_cast( &(cf->getLayout()) ); } -//#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Configuration,cw,function) + static Parameter* getParameter1 ( const Configuration* cf, std::string id ) + { return cf->getParameter( id ); } + + static Parameter* getParameter2 ( const Configuration* cf, std::string id, Parameter::Type type ) + { return cf->getParameter( id, type ); } + + static Parameter* addParameter4 ( Configuration* cf + , std::string id + , Parameter::Type type + , std::string value + , Parameter::Priority priority ) + { + return cf->addParameter( id, type, value, priority ); + } + + static Parameter* addParameter3 ( Configuration* cf + , std::string id + , Parameter::Type type + , std::string value ) + { + Parameter* p = cf->addParameter( id, type, value ); + return p; + } -// +=================================================================+ -// | "PyConfiguration" Python Module Code Part | -// +=================================================================+ +// Getter & Setters, for members/attributes. + + static PyObject* PyConfiguration_getFlags ( PyObject* self, void* closure ) + { return callMethod("Configuration.getFlags",&Configuration::getFlags,self,NULL); } -#if defined(__PYTHON_MODULE__) + static PyObject* PyConfiguration_setFlags ( PyObject* self, PyObject* value, void* closure ) + { + callMethod("Configuration.setFlags",&Configuration::setFlags,self,PyTuple_Pack(1,value)); + return 0; + } - // Standart Destroy (Attribute). - // DirectDestroyAttribute(PyConfiguration_destroy, PyConfiguration) +// Object methods. + + static PyObject* PyConfiguration_get ( PyObject*, PyObject* args ) + { return callFunction("Configuration.get",&Configuration::get,args); } - // static PyObject* PyConfiguration_hasMenu ( PyConfiguration* self, PyObject* args ) - // { - // cdebug_log(20,0) << "PyConfiguration_hasMenu()" << endl; + static PyObject* PyConfiguration_pushDefaultPriority ( PyObject*, PyObject* args ) + { return callFunction("Configuration.pushDefaultPriority",&Configuration::pushDefaultPriority,args); } - // HTRY - // METHOD_HEAD("Configuration.hasMenu()") - // char* path = NULL; - // if (not PyArg_ParseTuple(args,"s:Configuration.hasMenu()", &path)) { - // PyErr_SetString ( ConstructorError, "Configuration.hasMenu(): Takes exactly one argument." ); - // return NULL; - // } + static PyObject* PyConfiguration_popDefaultPriority ( PyObject*, PyObject* args ) + { return callFunction("Configuration.popDefaultPriority",&Configuration::popDefaultPriority,args); } - // if (cw->hasMenu( path )) Py_RETURN_TRUE; - // HCATCH - // Py_RETURN_FALSE; - // } + static PyObject* PyConfiguration_getDefaultPriority ( PyObject*, PyObject* args ) + { return callFunction("Configuration.getDefaultPriority",&Configuration::getDefaultPriority,args); } + + + static PyObject* PyConfiguration_getParameter ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Configuration.getParameter",&getParameter2,self,args); + if (not rvalue) rvalue = callMethod("Configuration.getParameter",&getParameter1,self,args); + return rvalue; + } + + + static PyObject* PyConfiguration_addParameter ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Configuration.addParameter",&addParameter4,self,args); + if (not rvalue) rvalue = callMethod("Configuration.addParameter",&addParameter3,self,args); + return rvalue; + } + + + static PyObject* PyConfiguration_getParameters ( PyObject* self, PyObject* args ) + { return callMethod("Configuration.getParameters",&Configuration::getParameters,self,args); } + + + static PyObject* PyConfiguration_getLayout ( PyObject* self, PyObject* args ) + { return callMethod("Configuration.getLayout",&getLayout,self,args); } // --------------------------------------------------------------- // PyConfiguration Attribute Method table. PyMethodDef PyConfiguration_Methods[] = - { - // { "hasMenu" , (PyCFunction)PyConfiguration_hasMenu , METH_VARARGS - // , "Return true if the menu at \"path\" exists." } - {NULL, NULL, 0, NULL} /* sentinel */ + { { "get" , (PyCFunction)PyConfiguration_get , METH_NOARGS |METH_STATIC + , "Get the Configuration database." } + , { "pushDefaultPriority" , (PyCFunction)PyConfiguration_pushDefaultPriority , METH_VARARGS|METH_STATIC + , "Push and set a new priority level." } + , { "popDefaultPriority" , (PyCFunction)PyConfiguration_popDefaultPriority , METH_NOARGS |METH_STATIC + , "Pop and set the previous priority level." } + , { "getDefaultPriority" , (PyCFunction)PyConfiguration_getDefaultPriority , METH_NOARGS |METH_STATIC + , "Get the current priority level." } + , { "getParameter" , (PyCFunction)PyConfiguration_getParameter , METH_VARARGS + , "Return the named parameter (None if not found)." } + , { "addParameter" , (PyCFunction)PyConfiguration_addParameter , METH_VARARGS + , "Create a new parameter." } + , { "getParameters" , (PyCFunction)PyConfiguration_getParameters , METH_NOARGS + , "Return a dictionnary of all the parameters." } + , { "getLayout" , (PyCFunction)PyConfiguration_getLayout , METH_NOARGS + , "Return the LayoutDescription object." } + //, { "hasMenu" , (PyCFunction)PyConfiguration_hasMenu , METH_VARARGS + // , "Return true if the menu at \"path\" exists." } + , {NULL, NULL, 0, NULL} /* sentinel */ }; - // PythonOnlyDeleteMethod(Configuration) - // PyTypeObjectLinkPyType(Configuration) + // --------------------------------------------------------------- + // PyConfiguration Attributes/Properties table. - -#else // Python Module Code Part. - - -// +=================================================================+ -// | "PyConfiguration" Shared Library Code Part | -// +=================================================================+ - - - // LinkCreateMethod(Configuration) - // PyTypeRootObjectDefinitions(Configuration) - - - // static void ConfigurationLoadConstants ( PyObject* dictionnary ) { - // PyObject* constant; - - // LoadObjectConstant( dictionnary, Configuration::NoFlags, "NoFlags" ) - // LoadObjectConstant( dictionnary, Configuration::TopMenu, "TopMenu" ) - // } - - - // extern void PyConfiguration_postModuleInit () - // { - // ConfigurationLoadConstants(PyTypeConfiguration.tp_dict); - // } - -# endif // Shared Library Code Part. + PyGetSetDef PyConfiguration_Getsets[] = + { { (char*)"flags", (getter)PyConfiguration_getFlags, (setter)PyConfiguration_setFlags, (char*)"flags attribute", NULL } + , {NULL, NULL, NULL, NULL} /* sentinel */ + }; } // extern "C". diff --git a/hurricane/src/configuration/PyDataBase.cpp b/hurricane/src/configuration/PyDataBase.cpp new file mode 100644 index 00000000..bc61821e --- /dev/null +++ b/hurricane/src/configuration/PyDataBase.cpp @@ -0,0 +1,90 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | 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 : "./PyDataBase.cpp" | +// +-----------------------------------------------------------------+ + + +#include "hurricane/configuration/PyDataBase.h" +#include "hurricane/Technology.h" +#include "hurricane/Library.h" +#include "hurricane/Cell.h" + + +namespace Isobar3 { + +using namespace Hurricane; + +extern "C" { + + +// Thin wrappers for overloadeds member functions. + + static Cell* getCell2 ( DataBase* db, string rpath, unsigned int flags ) + { return db->getCell( rpath, flags ); } + + static Cell* getCell1 ( DataBase* db, string name ) + { return db->getCell( name ); } + + +// Python methods. + + static PyObject* PyDataBase_create ( PyObject* self, PyObject* args ) + { return callFunction("DataBase.create",&DataBase::create,args); } + + static PyObject* PyDataBase_getDB ( PyObject* self, PyObject* args ) + { return callFunction("DataBase.getDB",&DataBase::getDB,args); } + + static PyObject* PyDataBase_getTechnology ( PyObject* self, PyObject* args ) + { return callMethod("DataBase.getTechnology",&DataBase::getTechnology,self,args); } + + static PyObject* PyDataBase_getRootLibrary ( PyObject* self, PyObject* args ) + { return callMethod("DataBase.getRootLibrary",&DataBase::getRootLibrary,self,args); } + + static PyObject* PyDataBase_getCell ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("DataBase.getCell",&getCell2,self,args); + if (not rvalue) rvalue = callMethod("DataBase.getCell",&getCell1,self,args); + return rvalue; + } + + static PyObject* PyDataBase_clear ( PyObject* self, PyObject* args ) + { return callMethod("DataBase.clear",&DataBase::clear,self,args); } + + static PyObject* PyDataBase_destroy ( PyObject* self, PyObject* args ) + { return callMethod("DataBase.destroy",&DataBase::destroy,self,args); } + + + // --------------------------------------------------------------- + // PyDataBase Method table. + + PyMethodDef PyDataBase_Methods[] = + { { "create" , (PyCFunction)PyDataBase_create , METH_NOARGS|METH_STATIC + , "Create the DataBase (only the first call created it)" } + , { "getDB" , (PyCFunction)PyDataBase_getDB , METH_NOARGS|METH_STATIC + , "Get the DataBase" } + , { "getTechnology" , (PyCFunction)PyDataBase_getTechnology , METH_NOARGS , "Return the Technology" } + , { "getRootLibrary", (PyCFunction)PyDataBase_getRootLibrary, METH_NOARGS , "Return the root library" } + , { "getCell" , (PyCFunction)PyDataBase_getCell , METH_VARARGS, "Return a Cell" } + , { "clear" , (PyCFunction)PyDataBase_clear , METH_NOARGS , "Clear all the cells, keeps technology" } + , { "destroy" , (PyCFunction)PyDataBase_destroy , METH_NOARGS + , "Destroy associated hurricane object The python object remains." } + , {NULL, NULL, 0, NULL} /* sentinel */ + }; + + + PyMethodDef PyDataBaseFlags_Methods [] = { {NULL, NULL, 0, NULL} /* sentinel */ }; + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/PyDbU.cpp b/hurricane/src/configuration/PyDbU.cpp new file mode 100644 index 00000000..f80b5e11 --- /dev/null +++ b/hurricane/src/configuration/PyDbU.cpp @@ -0,0 +1,290 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | 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 : "./PyDbU.cpp" | +// +-----------------------------------------------------------------+ + + +#include "hurricane/configuration/PyDbU.h" + + +namespace Isobar3 { + +using namespace Hurricane; + +extern "C" { + + +// Thin wrappers for overloadeds member functions. + + void setPrecision1 ( long precision ) { DbU::setPrecision( precision ); } + void setGridsPerLambda1 ( double ratio ) { DbU::setGridsPerLambda( ratio ); } + + DbU::Unit fromGridLong ( long u ) { return DbU::fromGrid( (double)u ); } + DbU::Unit fromGridDouble ( double u ) { return DbU::fromGrid( u ); } + DbU::Unit fromLambdaLong ( long u ) { return DbU::fromLambda( (double)u ); } + DbU::Unit fromLambdaDouble ( double u ) { return DbU::fromLambda( u ); } + + double toGridLong ( long u ) { return DbU::toGrid( (double)u ); } + double toGridDouble ( double u ) { return DbU::toGrid( u ); } + double toLambdaLong ( long u ) { return DbU::toLambda( (double)u ); } + double toLambdaDouble ( double u ) { return DbU::toLambda( u ); } + double toPhysicalLong ( long u, long p ) { return DbU::toPhysical( (double)u, (DbU::UnitPower)p ); } + double toPhysicalDouble ( double u, long p ) { return DbU::toPhysical( u, (DbU::UnitPower)p ); } + + DbU::Unit getOnCustomGrid2 ( DbU::Unit u, DbU::Unit step ) + { return DbU::getOnCustomGrid( u, step ); } + + DbU::Unit getOnCustomGrid3 ( DbU::Unit u, DbU::Unit step, long mode ) + { return DbU::getOnCustomGrid( u, step, (DbU::SnapMode)mode ); } + + DbU::Unit getOnPhysicalGrid1 ( DbU::Unit u ) + { return DbU::getOnPhysicalGrid( u ); } + + DbU::Unit getOnPhysicalGrid2 ( DbU::Unit u, long mode ) + { return DbU::getOnPhysicalGrid( u, (DbU::SnapMode)mode ); } + + DbU::Unit getOnRealSnapGrid1 ( DbU::Unit u ) + { return DbU::getOnRealSnapGrid( u ); } + + DbU::Unit getOnRealSnapGrid2 ( DbU::Unit u, long snap ) + { return DbU::getOnRealSnapGrid( u, (DbU::SnapMode)snap ); } + + DbU::Unit getOnSymbolicSnapGrid1 ( DbU::Unit u ) + { return DbU::getOnSymbolicSnapGrid( u ); } + + DbU::Unit getOnSymbolicSnapGrid2 ( DbU::Unit u, long snap ) + { return DbU::getOnSymbolicSnapGrid( u, (DbU::SnapMode)snap ); } + + std::string getValueString1 ( DbU::Unit u ) { return DbU::getValueString( u ); } + std::string getValueString2 ( DbU::Unit u, long mode ) { return DbU::getValueString( u, mode ); } + + void setStringMode1 ( long mode ) { DbU::setStringMode( mode ); } + void setStringMode2 ( long mode, long power ) { DbU::setStringMode( mode, (DbU::UnitPower)power ); } + + +// Python methods. + + static PyObject* PyDbU_fromDb ( PyObject*, PyObject* args ) + { return callFunction("DbU.fromDb",&DbU::fromDb,args); } + + static PyObject* PyDbU_fromGrid ( PyObject*, PyObject* args ) + { + PyObject* rvalue = callFunction("DbU.fromGrid",&fromGridDouble,args); + if (not rvalue) rvalue = callFunction("DbU.fromGrid",&fromGridLong,args); + return rvalue; + } + + static PyObject* PyDbU_fromLambda ( PyObject*, PyObject* args ) + { + PyObject* rvalue = callFunction("DbU.fromLambda",&fromLambdaDouble,args); + if (not rvalue) rvalue = callFunction("DbU.fromLambda",&fromLambdaLong,args); + return rvalue; + } + + static PyObject* PyDbU_fromPhysical ( PyObject*, PyObject* args ) + { return callFunction("DbU.fromPhysical",&DbU::fromPhysical,args); } + + static PyObject* PyDbU_getPrecision ( PyObject*, PyObject* args ) + { return callFunction("DbU.getPrecision",&DbU::getPrecision,args); } + + static PyObject* PyDbU_getMaximalPrecision ( PyObject*, PyObject* args ) + { return callFunction("DbU.getMaximalPrecision",&DbU::getMaximalPrecision,args); } + + static PyObject* PyDbU_getResolution ( PyObject*, PyObject* args ) + { return callFunction("DbU.getResolution",&DbU::getResolution,args); } + + static PyObject* PyDbU_setPrecision ( PyObject*, PyObject* args ) + { return callFunction("DbU.setPrecision",&setPrecision1,args); } + + static PyObject* PyDbU_getPolygonStep ( PyObject*, PyObject* args ) + { return callFunction("DbU.getPolygonStep",&DbU::getPolygonStep,args); } + + static PyObject* PyDbU_setPolygonStep ( PyObject*, PyObject* args ) + { return callFunction("DbU.setPolygonStep",&DbU::setPolygonStep,args); } + + static PyObject* PyDbU_getUnitPower ( PyObject*, PyObject* args ) + { return callFunction("DbU.getUnitPower",&DbU::getUnitPower,args); } + + static PyObject* PyDbU_setPhysicalsPerGrid ( PyObject*, PyObject* args ) + { return callFunction("DbU.setPhysicalsPerGrid",&DbU::setPhysicalsPerGrid,args); } + + static PyObject* PyDbU_getPhysicalsPerGrid ( PyObject*, PyObject* args ) + { return callFunction("DbU.getPhysicalsPerGrid",&DbU::getPhysicalsPerGrid,args); } + + static PyObject* PyDbU_physicalToGrid ( PyObject*, PyObject* args ) + { return callFunction("DbU.physicalToGrid",&DbU::physicalToGrid,args); } + + static PyObject* PyDbU_setGridsPerLambda ( PyObject*, PyObject* args ) + { return callFunction("DbU.setGridsPerLambda",&setGridsPerLambda1,args); } + + static PyObject* PyDbU_getGridsPerLambda ( PyObject*, PyObject* args ) + { return callFunction("DbU.getGridsPerLambda",&DbU::getGridsPerLambda,args); } + + static PyObject* PyDbU_getRealSnapGridStep ( PyObject*, PyObject* args ) + { return callFunction("DbU.getRealSnapGridStep",&DbU::getRealSnapGridStep,args); } + + static PyObject* PyDbU_getOnRealSnapGrid ( PyObject*, PyObject* args ) + { + PyObject* rvalue = callFunction("DbU.getOnRealSnapGrid",&getOnRealSnapGrid2,args); + if (not rvalue) rvalue = callFunction("DbU.getOnRealSnapGrid",&getOnRealSnapGrid1,args); + return rvalue; + } + + static PyObject* PyDbU_setRealSnapGridStep ( PyObject*, PyObject* args ) + { return callFunction("DbU.setRealSnapGridStep",&DbU::setRealSnapGridStep,args); } + + static PyObject* PyDbU_getSymbolicSnapGridStep ( PyObject*, PyObject* args ) + { return callFunction("DbU.getSymbolicSnapGridStep",&DbU::getSymbolicSnapGridStep,args); } + + static PyObject* PyDbU_getOnSymbolicSnapGrid ( PyObject*, PyObject* args ) + { + PyObject* rvalue = callFunction("DbU.getOnSymbolicSnapGrid",&getOnSymbolicSnapGrid2,args); + if (not rvalue) rvalue = callFunction("DbU.getOnSymbolicSnapGrid",&getOnSymbolicSnapGrid1,args); + return rvalue; + } + + static PyObject* PyDbU_setSymbolicSnapGridStep ( PyObject*, PyObject* args ) + { return callFunction("DbU.setSymbolicSnapGridStep",&DbU::setSymbolicSnapGridStep,args); } + + static PyObject* PyDbU_getOnCustomGrid ( PyObject*, PyObject* args ) + { + PyObject* rvalue = callFunction("DbU.getOnCustomGrid",&getOnCustomGrid3,args); + if (not rvalue) rvalue = callFunction("DbU.getOnCustomGrid",&getOnCustomGrid2,args); + return rvalue; + } + + static PyObject* PyDbU_getOnPhysicalGrid ( PyObject*, PyObject* args ) + { + PyObject* rvalue = callFunction("DbU.getOnPhysicalGrid",&getOnPhysicalGrid2,args); + if (not rvalue) rvalue = callFunction("DbU.getOnPhysicalGrid",&getOnPhysicalGrid1,args); + return rvalue; + } + + static PyObject* PyDbU_toDb ( PyObject*, PyObject* args ) + { return callFunction("DbU.toDb",&DbU::toDb,args); } + + static PyObject* PyDbU_toGrid ( PyObject*, PyObject* args ) + { + PyObject* rvalue = callFunction("DbU.toGrid",&toGridDouble,args); + if (not rvalue) rvalue = callFunction("DbU.toGrid",&toGridLong,args); + return rvalue; + } + + static PyObject* PyDbU_toLambda ( PyObject*, PyObject* args ) + { + PyObject* rvalue = callFunction("DbU.toLambda",&toLambdaDouble,args); + if (not rvalue) rvalue = callFunction("DbU.toLambda",&toLambdaLong,args); + return rvalue; + } + + static PyObject* PyDbU_toPhysical ( PyObject*, PyObject* args ) + { + PyObject* rvalue = callFunction("DbU.toPhysical",&toPhysicalDouble,args); + if (not rvalue) rvalue = callFunction("DbU.toPhysical",&toPhysicalLong,args); + return rvalue; + } + + static PyObject* PyDbU_getValueString ( PyObject*, PyObject* args ) + { + PyObject* rvalue = callFunction("DbU.getValueString",&getValueString2,args); + if (not rvalue) rvalue = callFunction("DbU.getValueString",&getValueString1,args); + return rvalue; + } + + static PyObject* PyDbU_setStringMode ( PyObject*, PyObject* args ) + { + PyObject* rvalue = callFunction("DbU.setStringMode",&setStringMode2,args); + if (not rvalue) rvalue = callFunction("DbU.setStringMode",&setStringMode1,args); + return rvalue; + } + + + // --------------------------------------------------------------- + // PyDbU Method table. + + + PyMethodDef PyDbU_Methods[] = + // Translate from user length to DbU. + { { "fromDb" , (PyCFunction)PyDbU_fromDb , METH_VARARGS|METH_STATIC + , "Convert a raw unit into a DbU (C++ DbU::fromDb())." } + , { "fromGrid" , (PyCFunction)PyDbU_fromGrid , METH_VARARGS|METH_STATIC + , "Convert a length in grid step into a DbU (C++ DbU::fromGrid())." } + , { "fromLambda" , (PyCFunction)PyDbU_fromLambda , METH_VARARGS|METH_STATIC + , "Convert a length in lambda into a DbU (C++ DbU::fromLambda())." } + , { "fromPhysical" , (PyCFunction)PyDbU_fromPhysical , METH_VARARGS|METH_STATIC + , "Convert a physical length into a DbU (C++ DbU::fromPhysical())." } + // Precision & Resolution Managment. + , { "getPrecision" , (PyCFunction)PyDbU_getPrecision , METH_NOARGS|METH_STATIC + , "Sets the precision, the fixed point for rounding computations." } + , { "getMaximalPrecision" , (PyCFunction)PyDbU_getMaximalPrecision , METH_NOARGS|METH_STATIC + , "Returns the maximum allowed precision." } + , { "getResolution" , (PyCFunction)PyDbU_getResolution , METH_NOARGS|METH_STATIC + , "Get the smallest manageable unit." } + , { "setPrecision" , (PyCFunction)PyDbU_setPrecision , METH_VARARGS|METH_STATIC + , "Sets the precision, the fixed point for rounding computations." } + // Founder Grid Managment. + , { "getUnitPower" , (PyCFunction)PyDbU_getUnitPower , METH_VARARGS|METH_STATIC + , "Returns the numerical value associated to the symbolic power." } + , { "setPhysicalsPerGrid" , (PyCFunction)PyDbU_setPhysicalsPerGrid , METH_VARARGS|METH_STATIC + , "Set the physical length represented by exactly one unit." } + , { "getPhysicalsPerGrid" , (PyCFunction)PyDbU_getPhysicalsPerGrid , METH_NOARGS|METH_STATIC + , "Returns the physical length represented by exactly one unit." } + , { "physicalToGrid" , (PyCFunction)PyDbU_physicalToGrid , METH_VARARGS|METH_STATIC + , "Compute the number of grid units representing that physical length." } + // Lambda Managment. + , { "setGridsPerLambda" , (PyCFunction)PyDbU_setGridsPerLambda , METH_VARARGS|METH_STATIC + , "Set the numbers of grid units in one lambda." } + , { "getGridsPerLambda" , (PyCFunction)PyDbU_getGridsPerLambda , METH_NOARGS|METH_STATIC + , "Returns the physical length represented by exactly one unit." } + // Snap Grid Managment. + , { "getRealSnapGridStep" , (PyCFunction)PyDbU_getRealSnapGridStep , METH_NOARGS|METH_STATIC + , "Returns the step of the real snap grid." } + , { "getOnRealSnapGrid" , (PyCFunction)PyDbU_getOnRealSnapGrid , METH_VARARGS|METH_STATIC + , "Get a real snap grid position from this one." } + , { "setRealSnapGridStep" , (PyCFunction)PyDbU_setRealSnapGridStep , METH_VARARGS|METH_STATIC + , "Sets the real snap grid step." } + , { "getSymbolicSnapGridStep", (PyCFunction)PyDbU_getSymbolicSnapGridStep, METH_NOARGS|METH_STATIC + , "Returns the step of the symbolic snap grid." } + , { "getOnSymbolicSnapGrid" , (PyCFunction)PyDbU_getOnSymbolicSnapGrid , METH_VARARGS|METH_STATIC + , "Get a symbolic snap grid position from this one." } + , { "setSymbolicSnapGridStep", (PyCFunction)PyDbU_setSymbolicSnapGridStep, METH_VARARGS|METH_STATIC + , "Sets the symbolic snap grid step." } + , { "getOnCustomGrid" , (PyCFunction)PyDbU_getOnCustomGrid , METH_VARARGS|METH_STATIC + , "Get a custom snap grid position from this one." } + , { "getOnPhysicalGrid" , (PyCFunction)PyDbU_getOnPhysicalGrid , METH_VARARGS|METH_STATIC + , "Get a physical grid position from this one." } + // Convert from DbU to various units (grid,lambda,physical). + , { "toDb" , (PyCFunction)PyDbU_toDb , METH_VARARGS|METH_STATIC + , "Convert a DbU into raw unit (C++ DbU::getDb())." } + , { "toGrid" , (PyCFunction)PyDbU_toGrid , METH_VARARGS|METH_STATIC + , "Convert a DbU into grid length (C++ DbU::getGrid())." } + , { "toLambda" , (PyCFunction)PyDbU_toLambda , METH_VARARGS|METH_STATIC + , "Convert a DbU into lambda length (C++ DbU::getLambda())." } + , { "toPhysical" , (PyCFunction)PyDbU_toPhysical , METH_VARARGS|METH_STATIC + , "Convert a DbU into a physcal length (metric system, C++ DbU::getPhysical())." } + , { "getValueString" , (PyCFunction)PyDbU_getValueString , METH_VARARGS|METH_STATIC + , "Convert a DbU into a human readable string." } + , { "setStringMode" , (PyCFunction)PyDbU_setStringMode , METH_VARARGS|METH_STATIC + , "Tells what unit to use when converting a DbU into a string." } + // Polygon Step Managment. + , { "setPolygonStep" , (PyCFunction)PyDbU_setPolygonStep , METH_VARARGS|METH_STATIC + , "Set the approximation step for Polygons." } + , { "getPolygonStep" , (PyCFunction)PyDbU_getPolygonStep , METH_NOARGS|METH_STATIC + , "Returns the approximation step used for Polygons." } + , {NULL, NULL, 0, NULL} /* sentinel */ + }; + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/PyDiffusionLayer.cpp b/hurricane/src/configuration/PyDiffusionLayer.cpp new file mode 100644 index 00000000..87f16f5e --- /dev/null +++ b/hurricane/src/configuration/PyDiffusionLayer.cpp @@ -0,0 +1,53 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | 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 : "./PyDiffusionLayer.cpp" | +// +-----------------------------------------------------------------+ + + +#include "hurricane/configuration/PyName.h" +#include "hurricane/configuration/PyTechnology.h" +#include "hurricane/configuration/PyBasicLayer.h" +#include "hurricane/configuration/PyDiffusionLayer.h" + + +namespace Isobar3 { + +using namespace Hurricane; + +extern "C" { + + +// Python methods. + + static PyObject* PyDiffusionLayer_create ( PyObject* self, PyObject* args ) + { return callFunction("DiffusionLayer.create",&DiffusionLayer::create,args); } + + static PyObject* PyDiffusionLayer_destroy ( PyObject* self, PyObject* args ) + { return callMethod("DiffusionLayer.destroy",&DiffusionLayer::destroy,self,args); } + + + // --------------------------------------------------------------- + // PyDiffusionLayer Attribute Method table. + + PyMethodDef PyDiffusionLayer_Methods[] = + { { "create" , (PyCFunction)PyDiffusionLayer_create , METH_VARARGS|METH_STATIC + , "Create a new DiffusionLayer." } + , { "destroy" , (PyCFunction)PyDiffusionLayer_destroy , METH_NOARGS + , "destroy associated hurricane object, the python object remains." } + , {NULL, NULL, 0, NULL} /* sentinel */ + }; + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/PyHurricane2.cpp b/hurricane/src/configuration/PyHurricane2.cpp deleted file mode 100644 index 57272062..00000000 --- a/hurricane/src/configuration/PyHurricane2.cpp +++ /dev/null @@ -1,70 +0,0 @@ -// -*- C++ -*- -// -// This file is part of the Coriolis Software. -// Copyright (c) Sorbonne Universite 2020-2020, All Rights Reserved -// -// +-----------------------------------------------------------------+ -// | 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 : "./PyHurricane.cpp" | -// +-----------------------------------------------------------------+ - - -#include "hurricane/configuration/PyHurricane2.h" - - -namespace Isobar2 { - - -#if !defined(__PYTHON_MODULE__) - -// +=================================================================+ -// | "PyHurricane" Shared Library Code Part | -// +=================================================================+ - - extern "C" { - - void _deAlloc ( PyVoidPointer* self ) - { - PyTypeManager* manager = PyTypeManager::get( self->ob_type ); - manager->_deAlloc( self ); - } - - } - - - std::map< std::type_index, PyTypeManager* > PyTypeManager::_managerByCppTypes; - std::map< PyTypeObject* , PyTypeManager* > PyTypeManager::_managerByPyTypes; - - - PyTypeManager::~PyTypeManager () { } - - - void PyTypeManager::_setTypeNames ( std::string className, std::string nspace ) - { - size_t cppScope = className.find_last_of( "::" ); - if (cppScope != std::string::npos) className = className.substr( cppScope+1 ); - - _cppTypeName = className; - _pyTypeName = "Py"+_cppTypeName; - if (not nspace.empty()) { - _cppTypeName.insert( 0, nspace+"." ); - _pyTypeName .insert( 0, nspace+"." ); - } - } - - -# else // PyHurricane Shared Library Code Part. - -// +=================================================================+ -// | "PyHurricane" Python Module Code Part | -// +=================================================================+ - - -#endif // End of Python Module Code Part. - -} // Isobar namespace. diff --git a/hurricane/src/configuration/PyHurricane3.cpp b/hurricane/src/configuration/PyHurricane3.cpp new file mode 100644 index 00000000..2586be0a --- /dev/null +++ b/hurricane/src/configuration/PyHurricane3.cpp @@ -0,0 +1,182 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) SU 2021-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | C o n f i g u r a t i o n D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Module : "./PyHurricane3.cpp" | +// +-----------------------------------------------------------------+ + + +#include "hurricane/configuration/PyTypeManager.h" +#include "hurricane/configuration/PyCollection.h" +#include "hurricane/configuration/PyDbU.h" +#include "hurricane/configuration/PyPoint.h" +#include "hurricane/configuration/PyBox.h" +#include "hurricane/configuration/PyDataBase.h" +#include "hurricane/configuration/PyTechnology.h" +#include "hurricane/configuration/PyLayerMask.h" +#include "hurricane/configuration/PyLayer.h" +#include "hurricane/configuration/PyBasicLayer.h" +#include "hurricane/configuration/PyViaLayer.h" +#include "hurricane/configuration/PyRegularLayer.h" +#include "hurricane/configuration/PyDiffusionLayer.h" +#include "hurricane/configuration/PyTransistorLayer.h" + + +namespace Isobar3 { + + using std::cerr; + using std::endl; + using std::string; + + +extern "C" { + + + static PyMethodDef PyHurricane3_Methods[] = + { {NULL, NULL, 0, NULL} /* sentinel */ + }; + + + static PyModuleDef PyHurricane3_ModuleDef = + { PyModuleDef_HEAD_INIT + , .m_name = "Hurricane3" + , .m_doc = "Hurricane database." + , .m_size = -1 + , .m_methods = PyHurricane3_Methods + }; + + + PyMODINIT_FUNC PyInit_Hurricane3 ( void ) + { + cdebug_log(20,0) << "PyInit_Hurricane3() (Python3+template)" << endl; + cerr << "PyInit_Hurricane3() (Python3+template)" << endl; + + PyObject* module = PyModule_Create( &PyHurricane3_ModuleDef ); + if (not module) { + cerr << "[ERROR]\n" + << " Failed to initialize Hurricane3 module." << endl; + return NULL; + } + PyObject* dictionnary = PyModule_GetDict( module ); + + try { + PyTypeManagerNonDBo::create ( module + , PyDbU_Methods + , NULL + , PyTypeManager::NoFlags + ); + PyTypeManagerNonDBo::create( module + , PyPoint_Methods + , NULL + , PyTypeManager::NoFlags + , "" + , PyPoint_NEW + , PyPoint_Init + , tpRichCompareByValue + ); + PyTypeManagerNonDBo::create ( module + , PyBox_Methods + , NULL + , PyTypeManager::NoFlags + , "" + , PyBox_NEW + , PyBox_Init + , tpRichCompareByValue + ); + PyTypeManagerDBo::create( module + , PyDataBase_Methods + , NULL + , PyTypeManager::NoCppDelete + ); + PyTypeManagerDBo::create( module + , PyTechnology_Methods + , NULL + , PyTypeManager::NoCppDelete + ); + PyTypeManagerNonDBo::create( module + , PyLayerMask_Methods + , NULL + , PyTypeManager::NoFlags + , "LayerMask" + , PyLayerMask_NEW + , PyLayerMask_Init + , tpRichCompareLayerMask + , &PyLayerMask_NumberMethods + ); + PyTypeManagerDBo::create( module + , PyLayer_Methods + , NULL + , PyTypeManager::NoCppDelete + ); + PyTypeManagerDerivedDBo::create( module + , PyBasicLayer_Methods + , NULL + , PyTypeManager::NoCppDelete + ); + PyTypeManagerDerivedDBo::create( module + , PyViaLayer_Methods + , NULL + , PyTypeManager::NoCppDelete + ); + PyTypeManagerDerivedDBo::create( module + , PyRegularLayer_Methods + , NULL + , PyTypeManager::NoCppDelete + ); + PyTypeManagerDerivedDBo::create( module + , PyDiffusionLayer_Methods + , NULL + , PyTypeManager::NoCppDelete + ); + PyTypeManagerDerivedDBo::create( module + , PyTransistorLayer_Methods + , NULL + , PyTypeManager::NoCppDelete + ); + PyTypeManagerCollection< Layer>::create( module, PyTypeManager::NoCppDelete ); + PyTypeManagerCollection< BasicLayer>::create( module, PyTypeManager::NoCppDelete ); + PyTypeManagerCollection< ViaLayer>::create( module, PyTypeManager::NoCppDelete ); + PyTypeManagerCollection::create( module, PyTypeManager::NoCppDelete ); + } catch ( const Warning& w ) { + cerr << getString(w) << endl; + throw; + } catch ( const Error& e ) { + cerr << getString(e) << endl; + if (not e.where().empty()) cerr << e.where() << endl; + throw; + } catch ( const Bug& e ) { + cerr << getString(e) << endl; + throw; + } catch ( const Exception& e ) { + cerr << "\nUnknown Hurricane::Exception" << endl; + throw; + } catch ( const std::exception& e ) { + cerr << e.what() << endl; + throw; + } catch ( ... ) { + cerr << "Unmanaged exception, neither a Hurricane::Error nor a std::exception." << endl; + throw; + } + + cdebug_log(20,0) + << "Hurricane3.so loaded " << (void*)&typeid(string) + << " (" << demangle(typeid(string).name()) << ")" << endl; + cerr + << "Hurricane3.so loaded " << (void*)&typeid(string) + << " (" << demangle(typeid(string).name()) << ")" << endl; + + return module; + } + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/PyLayer.cpp b/hurricane/src/configuration/PyLayer.cpp new file mode 100644 index 00000000..bdc73b2d --- /dev/null +++ b/hurricane/src/configuration/PyLayer.cpp @@ -0,0 +1,266 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | 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 : "./PyLayer.cpp" | +// +-----------------------------------------------------------------+ + + +#include "hurricane/configuration/PyName.h" +#include "hurricane/configuration/PyTechnology.h" +#include "hurricane/configuration/PyLayer.h" +#include "hurricane/BasicLayer.h" + + +namespace Isobar3 { + +using namespace Hurricane; + +extern "C" { + + +// Thin wrappers for overloadeds member functions. + + static DbU::Unit getEnclosure1 ( Layer* layer, uint32_t flags ) + { return layer->getEnclosure( flags ); } + + static DbU::Unit getEnclosure2 ( Layer* layer, const BasicLayer* basicLayer, uint32_t flags ) + { return layer->getEnclosure( basicLayer, flags ); } + + static DbU::Unit getExtentionCap0 ( Layer* layer ) + { return layer->getExtentionCap(); } + + static DbU::Unit getExtentionCap1 ( Layer* layer, const BasicLayer* basicLayer ) + { return layer->getExtentionCap( basicLayer ); } + + static DbU::Unit getExtentionWidth0 ( Layer* layer ) + { return layer->getExtentionWidth(); } + + static DbU::Unit getExtentionWidth1 ( Layer* layer, const BasicLayer* basicLayer ) + { return layer->getExtentionWidth( basicLayer ); } + + +// Python methods. + + static PyObject* PyLayer_getTechnology ( PyObject* self, PyObject* args ) + { return callMethod("Layer.getTechnology",&Layer::getTechnology,self,args); } + + static PyObject* PyLayer_getName ( PyObject* self, PyObject* args ) + { return callMethod("Layer.getName",&Layer::getName,self,args); } + + static PyObject* PyLayer_getMask ( PyObject* self, PyObject* args ) + { return callMethod("Layer.getMask",&Layer::getMask,self,args); } + + static PyObject* PyLayer_getExtractMask ( PyObject* self, PyObject* args ) + { return callMethod("Layer.getExtractMask",&Layer::getExtractMask,self,args); } + + static PyObject* PyLayer_getMinimalSize ( PyObject* self, PyObject* args ) + { return callMethod("Layer.getMinimalSize",&Layer::getMinimalSize,self,args); } + + static PyObject* PyLayer_getMinimalSpacing ( PyObject* self, PyObject* args ) + { return callMethod("Layer.getMinimalSpacing",&Layer::getMinimalSpacing,self,args); } + + static PyObject* PyLayer_getBasicLayers ( PyObject* self, PyObject* args ) + { return callMethod("Layer.getBasicLayers",&Layer::getBasicLayers,self,args); } + + static PyObject* PyLayer_getBlockageLayer ( PyObject* self, PyObject* args ) + { return callMethod("Layer.getBlockageLayer",&Layer::getBlockageLayer,self,args); } + + static PyObject* PyLayer_getCut ( PyObject* self, PyObject* args ) + { return callMethod("Layer.getCut",&Layer::getCut,self,args); } + + static PyObject* PyLayer_getTop ( PyObject* self, PyObject* args ) + { return callMethod("Layer.getTop",&Layer::getTop,self,args); } + + static PyObject* PyLayer_getBottom ( PyObject* self, PyObject* args ) + { return callMethod("Layer.getBottom",&Layer::getBottom,self,args); } + + static PyObject* PyLayer_getOpposite ( PyObject* self, PyObject* args ) + { return callMethod("Layer.getOpposite",&Layer::getOpposite,self,args); } + + static PyObject* PyLayer_getMetalAbove ( PyObject* self, PyObject* args ) + { return callMethod("Layer.getMetalAbove",&Layer::getMetalAbove,self,args); } + + static PyObject* PyLayer_getMetalBelow ( PyObject* self, PyObject* args ) + { return callMethod("Layer.getMetalBelow",&Layer::getMetalBelow,self,args); } + + static PyObject* PyLayer_getCutAbove ( PyObject* self, PyObject* args ) + { return callMethod("Layer.getCutAbove",&Layer::getCutAbove,self,args); } + + static PyObject* PyLayer_getCutBelow ( PyObject* self, PyObject* args ) + { return callMethod("Layer.getCutBelow",&Layer::getCutBelow,self,args); } + + static PyObject* PyLayer_getEnclosure ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Layer.getEnclosure",&getEnclosure2,self,args); + if (not rvalue) rvalue = callMethod("Layer.getEnclosure",&getEnclosure1,self,args); + return rvalue; + } + + static PyObject* PyLayer_getExtentionCap ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Layer.getExtensionCap",&getExtentionCap1,self,args); + if (not rvalue) rvalue = callMethod("Layer.getExtensionCap",&getExtentionCap0,self,args); + return rvalue; + } + + static PyObject* PyLayer_getExtentionWidth ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Layer.getExtensionWidth",&getExtentionWidth1,self,args); + if (not rvalue) rvalue = callMethod("Layer.getExtensionWidth",&getExtentionWidth0,self,args); + return rvalue; + } + + static PyObject* PyLayer_getTopEnclosure ( PyObject* self, PyObject* args ) + { return callMethod("Layer.getTopEnclosure",&Layer::getTopEnclosure,self,args); } + + static PyObject* PyLayer_getBottomEnclosure ( PyObject* self, PyObject* args ) + { return callMethod("Layer.getBottomEnclosure",&Layer::getBottomEnclosure,self,args); } + + static PyObject* PyLayer_getMinimalArea ( PyObject* self, PyObject* args ) + { return callMethod("Layer.getMinimalArea",&Layer::getMinimalArea,self,args); } + + static PyObject* PyLayer_above ( PyObject* self, PyObject* args ) + { return callMethod("Layer.above",&Layer::above,self,args); } + + static PyObject* PyLayer_below ( PyObject* self, PyObject* args ) + { return callMethod("Layer.below",&Layer::below,self,args); } + + static PyObject* PyLayer_contains ( PyObject* self, PyObject* args ) + { return callMethod("Layer.contains",&Layer::contains,self,args); } + + static PyObject* PyLayer_intersect ( PyObject* self, PyObject* args ) + { return callMethod("Layer.intersect",&Layer::intersect,self,args); } + + static PyObject* PyLayer_isSymbolic ( PyObject* self, PyObject* args ) + { return callMethod("Layer.isSymbolic",&Layer::isSymbolic,self,args); } + + static PyObject* PyLayer_isBlockage ( PyObject* self, PyObject* args ) + { return callMethod("Layer.isBlockage",&Layer::isBlockage,self,args); } + + static PyObject* PyLayer_setName ( PyObject* self, PyObject* args ) + { return callMethod("Layer.setName",&Layer::setName,self,args); } + + static PyObject* PyLayer_setSymbolic ( PyObject* self, PyObject* args ) + { return callMethod("Layer.setSymbolic",&Layer::setSymbolic,self,args); } + + static PyObject* PyLayer_setBlockage ( PyObject* self, PyObject* args ) + { return callMethod("Layer.setBlockage",&Layer::setBlockage,self,args); } + + static PyObject* PyLayer_setMinimalSize ( PyObject* self, PyObject* args ) + { return callMethod("Layer.setMinimalSize",&Layer::setMinimalSize,self,args); } + + static PyObject* PyLayer_setMinimalSpacing ( PyObject* self, PyObject* args ) + { return callMethod("Layer.setMinimalSpacing",&Layer::setMinimalSpacing,self,args); } + + static PyObject* PyLayer_setEnclosure ( PyObject* self, PyObject* args ) + { return callMethod("Layer.setEnclosure",&Layer::setEnclosure,self,args); } + + static PyObject* PyLayer_setExtentionCap ( PyObject* self, PyObject* args ) + { return callMethod("Layer.setExtentionCap",&Layer::setExtentionCap,self,args); } + + static PyObject* PyLayer_setExtentionWidth ( PyObject* self, PyObject* args ) + { return callMethod("Layer.setExtentionWidth",&Layer::setExtentionWidth,self,args); } + + static PyObject* PyLayer_setMinimalArea ( PyObject* self, PyObject* args ) + { return callMethod("Layer.setMinimalArea",&Layer::setMinimalArea,self,args); } + + static PyObject* PyLayer_destroy ( PyObject* self, PyObject* args ) + { return callMethod("Layer.destroy",&Layer::destroy,self,args); } + + + // --------------------------------------------------------------- + // PyLayer Method table. + + PyMethodDef PyLayer_Methods[] = + { { "getTechnology" , (PyCFunction)PyLayer_getTechnology , METH_NOARGS + , "Returns the technology owning the layer." } + , { "getName" , (PyCFunction)PyLayer_getName , METH_NOARGS + , "Returns the name of the layer." } + , { "getMask" , (PyCFunction)PyLayer_getMask , METH_NOARGS + , "Returns the mask (bits) of the layer." } + , { "getExtractMask" , (PyCFunction)PyLayer_getExtractMask , METH_NOARGS + , "Returns the extract mask of the layer (for GDSII)." } + , { "getMinimalSize" , (PyCFunction)PyLayer_getMinimalSize , METH_NOARGS + , "Returns the minimum width allowed for the layer." } + , { "getMinimalArea" , (PyCFunction)PyLayer_getMinimalArea , METH_NOARGS + , "Returns the minimum area allowed for the layer." } + , { "getMinimalSpacing" , (PyCFunction)PyLayer_getMinimalSpacing , METH_NOARGS + , "Returns the spacing allowed for the layer (edge to edge)." } + , { "getBasicLayers" , (PyCFunction)PyLayer_getBasicLayers , METH_NOARGS + , "Returns the collection of BasicLayer the Layer is built upon." } + , { "getBlockageLayer" , (PyCFunction)PyLayer_getBlockageLayer , METH_NOARGS + , "Returns the associated connector layer." } + , { "getCut" , (PyCFunction)PyLayer_getCut , METH_NOARGS + , "Returns the cut layer (in case of a muti-layer Contact)." } + , { "getTop" , (PyCFunction)PyLayer_getTop , METH_NOARGS + , "Returns the top layer (in case of a muti-layer)." } + , { "getBottom" , (PyCFunction)PyLayer_getBottom , METH_NOARGS + , "Returns the bottom layer (in case of a muti-layer)." } + , { "getOpposite" , (PyCFunction)PyLayer_getOpposite , METH_VARARGS + , "Returns the layer opposite the one given." } + , { "getMetalAbove" , (PyCFunction)PyLayer_getMetalAbove , METH_VARARGS + , "Returns the metal layer above this one." } + , { "getMetalBelow" , (PyCFunction)PyLayer_getMetalBelow , METH_VARARGS + , "Returns the metal layer below this one." } + , { "getCutAbove" , (PyCFunction)PyLayer_getCutAbove , METH_VARARGS + , "Returns the cut layer above this one." } + , { "getCutBelow" , (PyCFunction)PyLayer_getCutBelow , METH_VARARGS + , "Returns the cut layer below this one." } + , { "getEnclosure" , (PyCFunction)PyLayer_getEnclosure , METH_VARARGS + , "Returns the enclosure (global or for one BasicLayer)." } + , { "getTopEnclosure" , (PyCFunction)PyLayer_getTopEnclosure , METH_VARARGS + , "Returns the top layer enclosure." } + , { "getBottomEnclosure" , (PyCFunction)PyLayer_getBottomEnclosure , METH_VARARGS + , "Returns the bottom layer enclosure." } + , { "getExtentionCap" , (PyCFunction)PyLayer_getExtentionCap , METH_VARARGS + , "Returns the extention cap (global or for one BasicLayer)." } + , { "getExtentionWidth" , (PyCFunction)PyLayer_getExtentionWidth , METH_VARARGS + , "Returns the extention width (global or for one BasicLayer)." } + , { "above" , (PyCFunction)PyLayer_above , METH_VARARGS + , "Tells if the layer is above the one passed as argument." } + , { "below" , (PyCFunction)PyLayer_below , METH_VARARGS + , "Tells if the layer is below the one passed as argument." } + , { "contains" , (PyCFunction)PyLayer_contains , METH_VARARGS + , "Tells if the layer fully contains the one passed as argument." } + , { "intersect" , (PyCFunction)PyLayer_intersect , METH_VARARGS + , "Tells if the layer share some BasicLayer with the one passed as argument." } + , { "isSymbolic" , (PyCFunction)PyLayer_isSymbolic , METH_NOARGS + , "Tells if the layer is the symbolic one for this BasicLayer." } + , { "isBlockage" , (PyCFunction)PyLayer_isBlockage , METH_NOARGS + , "Tells if the layer represent blockage." } + , { "setName" , (PyCFunction)PyLayer_setName , METH_VARARGS + , "Allows to change the layer name." } + , { "setSymbolic" , (PyCFunction)PyLayer_setSymbolic , METH_VARARGS + , "Sets the layer as the symbolic one." } + , { "setBlockage" , (PyCFunction)PyLayer_setBlockage , METH_VARARGS + , "Sets the layer as blockage." } + , { "setMinimalSize" , (PyCFunction)PyLayer_setMinimalSize , METH_VARARGS + , "Sets the layer minimal size (width)." } + , { "setMinimalSpacing" , (PyCFunction)PyLayer_setMinimalSpacing , METH_VARARGS + , "Sets the layer minimal spacing (edge to edge)." } + , { "setEnclosure" , (PyCFunction)PyLayer_setEnclosure , METH_VARARGS + , "Sets the enclosure for the given BasicLayer sub-component." } + , { "setExtentionCap" , (PyCFunction)PyLayer_setExtentionCap , METH_VARARGS + , "Sets the extention cap for the given BasiLayer sub-component." } + , { "setExtentionWidth" , (PyCFunction)PyLayer_setExtentionWidth , METH_VARARGS + , "Sets the extention width for the given BasiLayer sub-component." } + , { "setMinimalArea" , (PyCFunction)PyLayer_setMinimalArea , METH_VARARGS + , "Sets the minimum area allowed for the layer." } + , { "destroy" , (PyCFunction)PyLayer_destroy , METH_NOARGS + , "Destroy associated hurricane object The python object remains." } + , {NULL, NULL, 0, NULL} /* sentinel */ + }; + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/PyLayerMask.cpp b/hurricane/src/configuration/PyLayerMask.cpp new file mode 100644 index 00000000..ac65fb05 --- /dev/null +++ b/hurricane/src/configuration/PyLayerMask.cpp @@ -0,0 +1,202 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | 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 : "./PyLayerMask.cpp" | +// +-----------------------------------------------------------------+ + + +#include +#include "hurricane/configuration/PyLayerMask.h" + + +namespace Isobar3 { + +using namespace Hurricane; + + +extern "C" { + + +// Thin wrappers for overloadeds member functions. + + static Layer::Mask* ctorMask0 () + { return new Layer::Mask(); } + + static Layer::Mask* ctorMask1m ( Layer::Mask other ) + { return new Layer::Mask( other ); } + + static Layer::Mask* ctorMask1l ( unsigned long long value ) + { return new Layer::Mask( value ); } + + static Layer::Mask* invert ( Layer::Mask* self ) + { return new Layer::Mask( ~(*self) ); } + + static void inplaceBitand ( Layer::Mask* self, Layer::Mask* other ) + { (*self) &= (*other); } + + static void inplaceBitor ( Layer::Mask* self, Layer::Mask* other ) + { (*self) |= (*other); } + + +// Python methods. + + static PyObject* PyLayerMask_zero ( PyObject* self, PyObject* args ) + { return callMethod("PyLayerMask.zero",&Layer::Mask::zero,self,args); } + + static PyObject* PyLayerMask_set ( PyObject* self, PyObject* args ) + { return callMethod("PyLayerMask.set",&Layer::Mask::set,self,args); } + + static PyObject* PyLayerMask_unset ( PyObject* self, PyObject* args ) + { return callMethod("PyLayerMask.unset",&Layer::Mask::unset,self,args); } + + static PyObject* PyLayerMask_isSet ( PyObject* self, PyObject* args ) + { return callMethod("PyLayerMask.isSet",&Layer::Mask::isSet,self,args); } + + static PyObject* PyLayerMask_contains ( PyObject* self, PyObject* args ) + { return callMethod("PyLayerMask.contains",&Layer::Mask::contains,self,args); } + + static PyObject* PyLayerMask_intersect ( PyObject* self, PyObject* args ) + { return callMethod("PyLayerMask.intersect",&Layer::Mask::intersect,self,args); } + + static PyObject* PyLayerMask_nthbit ( PyObject* self, PyObject* args ) + { return callMethod("PyLayerMask.nthbit",&Layer::Mask::nthbit,self,args); } + + static PyObject* PyLayerMask_fromString ( PyObject*, PyObject* args ) + { return callFunction("PyLayerMask.fromString",&Layer::Mask::fromString,args); } + + PyObject* PyLayerMask_NEW ( PyTypeObject* pyType, PyObject* args, PyObject* kwargs ) + { + PyObject* rvalue = callFunction("Layer::Mask",&ctorMask1m,args); + if (not rvalue) rvalue = callFunction("Layer::Mask",&ctorMask1l,args); + if (not rvalue) rvalue = callFunction("Layer::Mask",&ctorMask0 ,args); + return rvalue; + } + + int PyLayerMask_Init ( PyObject* self, PyObject* args, PyObject* kwargs ) + { + cdebug_log(20,0) << "PyLayerMask_Init(): " << (void*)self << endl; + return 0; + } + + + PyObject* tpRichCompareLayerMask ( PyObject *self, PyObject* other, int op ) + { + if (Py_TYPE(self) != Py_TYPE(other)) { + std::string message = "tpRichCompareLayerMask<" + getString(demangle(typeid(Layer::Mask).name())) + + "> cannot compare to \"" + Py_TYPE(other)->tp_name + "\"."; + PyErr_SetString( PyExc_TypeError, message.c_str() ); + return NULL; + } + Layer::Mask* cself = reinterpret_cast( object1(self ) ); + Layer::Mask* cother = reinterpret_cast( object1(other) ); + + bool result = false; + if ((op == Py_LT) and (*cself < *cother)) result = true; + if ((op == Py_LE) and (*cself <= *cother)) result = true; + if ((op == Py_EQ) and (*cself == *cother)) result = true; + if ((op == Py_NE) and (*cself != *cother)) result = true; + if ((op == Py_GT) and (*cself > *cother)) result = true; + if ((op == Py_GE) and (*cself >= *cother)) result = true; + + if (result) Py_RETURN_TRUE; + Py_RETURN_FALSE; + } + + + // --------------------------------------------------------------- + // PyLayerMask Method table. + + PyMethodDef PyLayerMask_Methods[] = + { { "zero" , (PyCFunction)PyLayerMask_zero , METH_NOARGS + , "Reset all the bits." } + , { "set" , (PyCFunction)PyLayerMask_set , METH_VARARGS + , "Sets to one the bits given in the argument (aka bitwise or)." } + , { "unset" , (PyCFunction)PyLayerMask_unset , METH_VARARGS + , "Sets to zero the bits given in the argument (aka bitwise and with complement)." } + , { "isSet" , (PyCFunction)PyLayerMask_isSet , METH_VARARGS + , "Returns true if some of bits at the mask's position are set (aka bitwise and)." } + , { "contains" , (PyCFunction)PyLayerMask_contains , METH_VARARGS + , "Returns true if all the bits at the mask's position are set (aka bitwise and)." } + , { "intersect" , (PyCFunction)PyLayerMask_intersect , METH_VARARGS + , "Returns true if some of bits at the mask's position are set (aka bitwise and)." } + , { "nthbit" , (PyCFunction)PyLayerMask_nthbit , METH_VARARGS + , "Returns a new mask with only the Nth bit copied." } + , { "fromString" , (PyCFunction)PyLayerMask_fromString, METH_VARARGS|METH_STATIC + , "Build a mask from an hexadecimal string." } + , {NULL, NULL, 0, NULL} /* sentinel */ + }; + + + static int PyLayerMask_nonzero ( PyObject* object ) + { return callPredicate( "Layer::Mask::nonzero", &Layer::Mask::zero,object ); } + + static PyObject* PyLayerMask_invert ( PyObject* object ) + { return callMethod( "Layer::Mask::invert", &invert, object, NULL ); } + + static PyObject* PyLayerMask_bitand ( PyObject* pyLhs, PyObject* pyRhs ) + { return callOperator( "Layer::Mask::bitand", pyLhs, pyRhs ); } + + static PyObject* PyLayerMask_bitxor ( PyObject* pyLhs, PyObject* pyRhs ) + { return callOperator( "Layer::Mask::bitxor", pyLhs, pyRhs ); } + + static PyObject* PyLayerMask_bitor ( PyObject* pyLhs, PyObject* pyRhs ) + { return callOperator( "Layer::Mask::bitor", pyLhs, pyRhs ); } + + static PyObject* PyLayerMask_rshift ( PyObject* self, PyObject* arg ) + { return callBinaryMethod( "Layer::Mask::rshift", &Layer::Mask::rshift, self, arg ); } + + static PyObject* PyLayerMask_lshift ( PyObject* self, PyObject* arg ) + { return callBinaryMethod( "Layer::Mask::lshift", &Layer::Mask::lshift, self, arg ); } + + static PyObject* PyLayerMask_inplaceBitand ( PyObject* pyLhs, PyObject* pyRhs ) + { return callOperator( "Layer::Mask::inplace_bitand", &inplaceBitand, pyLhs, pyRhs ); } + + static PyObject* PyLayerMask_inplaceBitor ( PyObject* pyLhs, PyObject* pyRhs ) + { return callOperator( "Layer::Mask::inplace_bitor", &inplaceBitor, pyLhs, pyRhs ); } + + + PyNumberMethods PyLayerMask_NumberMethods = + { .nb_add = 0 + , .nb_subtract = 0 + , .nb_multiply = 0 + , .nb_remainder = 0 + , .nb_divmod = 0 + , .nb_power = 0 + , .nb_negative = 0 + , .nb_positive = 0 + , .nb_absolute = 0 + , .nb_bool = PyLayerMask_nonzero + , .nb_invert = PyLayerMask_invert + , .nb_lshift = PyLayerMask_lshift + , .nb_rshift = PyLayerMask_rshift + , .nb_and = PyLayerMask_bitand + , .nb_xor = PyLayerMask_bitxor + , .nb_or = PyLayerMask_bitor + , .nb_int = 0 + , .nb_reserved = NULL + , .nb_float = 0 + , .nb_inplace_add = 0 + , .nb_inplace_subtract = 0 + , .nb_inplace_multiply = 0 + , .nb_inplace_remainder = 0 + , .nb_inplace_power = 0 + , .nb_inplace_lshift = 0 + , .nb_inplace_rshift = 0 + , .nb_inplace_and = PyLayerMask_inplaceBitand + , .nb_inplace_xor = 0 + , .nb_inplace_or = PyLayerMask_inplaceBitor + }; + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/PyLayoutDescription.cpp b/hurricane/src/configuration/PyLayoutDescription.cpp new file mode 100644 index 00000000..6e7b7d5c --- /dev/null +++ b/hurricane/src/configuration/PyLayoutDescription.cpp @@ -0,0 +1,131 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2021-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | C o n f i g u r a t i o n D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Module : "./PyLayoutDescription.cpp" | +// +-----------------------------------------------------------------+ + + +#include "hurricane/configuration/PyLayoutDescription.h" +#include "hurricane/configuration/Configuration.h" + + +namespace Cfg { + +using namespace Hurricane; +using namespace Isobar3; + +extern "C" { + + +// Thin wrappers for overloadeds member functions. + + + void addTab ( LayoutDescription* self, std::string tabName, std::string id ) + { self->addTab( tabName, id ); } + + void addSection2 ( LayoutDescription* self, std::string tabName, std::string section ) + { self->addSection( tabName, section ); }; + + + void addSection3 ( LayoutDescription* self + , std::string tabName + , std::string section + , int column + ) + { self->addSection( tabName, section, column ); }; + + void addParameter3 ( LayoutDescription* self + , std::string tabName + , std::string id + , std::string label + ) + { self->addParameter( tabName, id, label ); }; + + + void addParameter4 ( LayoutDescription* self + , std::string tabName + , std::string id + , std::string label + , int column + ) + { self->addParameter( tabName, id, label, column ); }; + + void addParameter5 ( LayoutDescription* self + , std::string tabName + , std::string id + , std::string label + , int column + , int span + ) + { self->addParameter( tabName, id, label, column, span ); }; + + + void addParameter6 ( LayoutDescription* self + , std::string tabName + , std::string id + , std::string label + , int column + , int span + , unsigned int flags + ) + { self->addParameter( tabName, id, label, column, span, flags ); }; + + +// Python methods. + + static PyObject* PyLayoutDescription_addTab ( PyObject* self, PyObject* args ) + { return callMethod("LayoutDescription.addTab",&addTab,self,args); } + + static PyObject* PyLayoutDescription_addRule ( PyObject* self, PyObject* args ) + { return callMethod("LayoutDescription.addRule",&LayoutDescription::addRule,self,args); } + + static PyObject* PyLayoutDescription_addTitle ( PyObject* self, PyObject* args ) + { return callMethod("LayoutDescription.addTitle",&LayoutDescription::addTitle,self,args); } + + static PyObject* PyLayoutDescription_addSection ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("LayoutDescription.addSection",&addSection3,self,args); + if (not rvalue) rvalue = callMethod("LayoutDescription.addSection",&addSection2,self,args); + return rvalue; + } + + static PyObject* PyLayoutDescription_addParameter ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("LayoutDescription.addParameter",&addParameter6,self,args); + if (not rvalue) rvalue = callMethod("LayoutDescription.addParameter",&addParameter5,self,args); + if (not rvalue) rvalue = callMethod("LayoutDescription.addParameter",&addParameter4,self,args); + if (not rvalue) rvalue = callMethod("LayoutDescription.addParameter",&addParameter3,self,args); + return rvalue; + } + + + // --------------------------------------------------------------- + // PyLayoutDescription Method table. + + PyMethodDef PyLayoutDescription_Methods[] = + { { "addTab" , (PyCFunction)PyLayoutDescription_addTab , METH_VARARGS + , "Add a new Tab." } + , { "addRule" , (PyCFunction)PyLayoutDescription_addRule , METH_VARARGS + , "Add a new ruler (separation)." } + , { "addTitle" , (PyCFunction)PyLayoutDescription_addTitle , METH_VARARGS + , "Set the title." } + , { "addSection" , (PyCFunction)PyLayoutDescription_addSection , METH_VARARGS + , "Add a new section." } + , { "addParameter" , (PyCFunction)PyLayoutDescription_addParameter, METH_VARARGS + , "Add a parameter." } + , {NULL, NULL, 0, NULL} /* sentinel */ + }; + + +} // extern "C". + +} // Cfg namespace. diff --git a/hurricane/src/configuration/PyMaterial.cpp b/hurricane/src/configuration/PyMaterial.cpp new file mode 100644 index 00000000..ea883a21 --- /dev/null +++ b/hurricane/src/configuration/PyMaterial.cpp @@ -0,0 +1,60 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | 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 : "./PyMaterial.cpp" | +// +-----------------------------------------------------------------+ + + +#include "hurricane/configuration/PyMaterial.h" + + +namespace Isobar3 { + +using namespace Hurricane; + +extern "C" { + +// Thin wrappers for overloadeds member functions. + + static BasicLayer::Material* ctorMaterial ( long code ) + { return new BasicLayer::Material ( (BasicLayer::Material::Code)code ); } + +// Python methods. + + static PyObject* PyMaterial_getCode ( PyObject* self, PyObject* args ) + { return callMethod("Material.getCode",&BasicLayer::Material::getCode,self,args); } + + PyObject* PyMaterial_NEW ( PyTypeObject* pyType, PyObject* args, PyObject* kwargs ) + { + return callFunction("BasicLayer::Material",&ctorMaterial,args); + } + + int PyMaterial_Init ( PyObject* self, PyObject* args, PyObject* kwargs ) + { + cdebug_log(20,0) << "PyMaterial_Init(): " << (void*)self << endl; + return 0; + } + + + // --------------------------------------------------------------- + // PyMaterial Method table. + + PyMethodDef PyMaterial_Methods[] = + { { "getCode" , (PyCFunction)PyMaterial_getCode, METH_NOARGS + , "Returns the numerical code of the material (enum)." } + , {NULL, NULL, 0, NULL} /* sentinel */ + }; + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/PyParameter.cpp b/hurricane/src/configuration/PyParameter.cpp index 60c7d352..bd1d676d 100644 --- a/hurricane/src/configuration/PyParameter.cpp +++ b/hurricane/src/configuration/PyParameter.cpp @@ -15,90 +15,276 @@ #include "hurricane/configuration/PyParameter.h" +#include "hurricane/configuration/Configuration.h" -namespace Cfg2 { +namespace Cfg { using namespace Hurricane; +using namespace Isobar3; extern "C" { -//#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Parameter,cw,function) +// Thin wrappers for overloadeds member functions. + + static bool checkValueInt ( const Parameter* p, int value ) + { return p->checkValue( value ); } + + static bool checkValueDouble ( const Parameter* p, double value ) + { return p->checkValue( value ); } + + static bool setString1 ( Parameter* self, std::string value ) + { return self->setString(value); } + + static bool setString2 ( Parameter* self, std::string value, unsigned int flags ) + { return self->setString(value,Configuration::getDefaultPriority(),flags); } + + static bool setString3 ( Parameter* self, std::string value, unsigned int flags, Parameter::Priority pri ) + { return self->setString(value,pri,flags); } + + static bool setBool1 ( Parameter* self, bool value ) { return self->setBool(value); } + static bool setInt1 ( Parameter* self, int value ) { return self->setInt(value); } + static bool setDouble1 ( Parameter* self, double value ) { return self->setDouble(value); } + static bool setPercentage1 ( Parameter* self, double value ) { return self->setPercentage(value); } + static bool setPercentage1i ( Parameter* self, int value ) { return self->setPercentage((double)value); } + + static bool setBool2 ( Parameter* self, bool value, Parameter::Priority pri ) { return self->setBool(value,pri); } + static bool setInt2 ( Parameter* self, int value, Parameter::Priority pri ) { return self->setInt(value,pri); } + static bool setDouble2 ( Parameter* self, double value, Parameter::Priority pri ) { return self->setDouble(value,pri); } + static bool setPercentage2 ( Parameter* self, double value, Parameter::Priority pri ) { return self->setPercentage(value,pri); } + static bool setPercentage2i ( Parameter* self, int value, Parameter::Priority pri ) { return self->setPercentage((double)value,pri); } + + static void setMinInt ( Parameter* self, int min ) { self->setMin(min); } + static void setMinDouble ( Parameter* self, double min ) { self->setMin(min); } + static void setMaxInt ( Parameter* self, int max ) { self->setMax(max); } + static void setMaxDouble ( Parameter* self, double max ) { self->setMax(max); } -// +=================================================================+ -// | "PyParameter" Python Module Code Part | -// +=================================================================+ +// Python getters & setters. -#if defined(__PYTHON_MODULE__) + static PyObject* PyParameter_getFlags ( PyObject* self, void* closure ) + { return callMethod("Parameter.getFlags",&Parameter::getFlags,self,NULL); } + + static PyObject* PyParameter_setFlags ( PyObject* self, PyObject* value, void* closure ) + { + callMethod("Parameter.setFlags",&Parameter::setFlags,self,PyTuple_Pack(1,value)); + return 0; + } + + static PyObject* PyParameter_getType ( PyObject* self, void* closure ) + { return callMethod("Parameter.getType",&Parameter::getType,self,NULL); } - // Standart Destroy (Attribute). - // DirectDestroyAttribute(PyParameter_destroy, PyParameter) +// Python methods. + static PyObject* PyParameter_isFile ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.isFile",&Parameter::isFile,self,args); } - // static PyObject* PyParameter_hasMenu ( PyParameter* self, PyObject* args ) - // { - // cdebug_log(20,0) << "PyParameter_hasMenu()" << endl; + static PyObject* PyParameter_isPath ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.isPath",&Parameter::isPath,self,args); } - // HTRY - // METHOD_HEAD("Parameter.hasMenu()") + static PyObject* PyParameter_hasMin ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.hasMin",&Parameter::hasMin,self,args); } - // char* path = NULL; - // if (not PyArg_ParseTuple(args,"s:Parameter.hasMenu()", &path)) { - // PyErr_SetString ( ConstructorError, "Parameter.hasMenu(): Takes exactly one argument." ); - // return NULL; - // } + static PyObject* PyParameter_hasMax ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.hasMax",&Parameter::hasMax,self,args); } - // if (cw->hasMenu( path )) Py_RETURN_TRUE; - // HCATCH + static PyObject* PyParameter_hasNeedRestart ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.hasNeedRestart",&Parameter::hasNeedRestart,self,args); } - // Py_RETURN_FALSE; - // } + static PyObject* PyParameter_hasMustExist ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.hasMustExist",&Parameter::hasMustExist,self,args); } + + static PyObject* PyParameter_hasFlags ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.hasFlags",&Parameter::hasFlags,self,args); } + + static PyObject* PyParameter_getId ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.getId",&Parameter::getId,self,args); } + + static PyObject* PyParameter_getMinInt ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.getMinInt",&Parameter::getMinInt,self,args); } + + static PyObject* PyParameter_getMaxInt ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.getMaxInt",&Parameter::getMaxInt,self,args); } + + static PyObject* PyParameter_getMinDouble ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.getMinDouble",&Parameter::getMinDouble,self,args); } + + static PyObject* PyParameter_getMaxDouble ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.getMaxDouble",&Parameter::getMaxDouble,self,args); } + + static PyObject* PyParameter_checkValue ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Parameter.checkValue",&checkValueInt,self,args); + if (not rvalue) + rvalue = callMethod("Parameter.checkValue",&checkValueDouble,self,args); + return rvalue; + } + + static PyObject* PyParameter_asBool ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.asBool",&Parameter::asBool,self,args); } + + static PyObject* PyParameter_asInt ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.asInt",&Parameter::asInt,self,args); } + + static PyObject* PyParameter_asDouble ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.asDouble",&Parameter::asDouble,self,args); } + + static PyObject* PyParameter_asPercentage ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.asPercentage",&Parameter::asPercentage,self,args); } + + static PyObject* PyParameter_asString ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.asString",&Parameter::asString,self,args); } + + static PyObject* PyParameter_asPercentageString ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.asPercentageString",&Parameter::asPercentageString,self,args); } + + static PyObject* PyParameter_addValue ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.addValue",&Parameter::addValue,self,args); } + + static PyObject* PyParameter_addSlave ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.addSlave",&Parameter::addSlave,self,args); } + + static PyObject* PyParameter_setPriority ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.setPriority",&Parameter::setPriority,self,args); } + + static PyObject* PyParameter_setString ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Parameter.setString",&setString3,self,args); + if (not rvalue) rvalue = callMethod("Parameter.setString",&setString2,self,args); + if (not rvalue) rvalue = callMethod("Parameter.setString",&setString1,self,args); + return rvalue; + } + + static PyObject* PyParameter_setBool ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Parameter.setBool",&setBool2,self,args); + if (not rvalue) rvalue = callMethod("Parameter.setBool",&setBool1,self,args); + return rvalue; + } + + static PyObject* PyParameter_setInt ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Parameter.setInt",&setInt2,self,args); + if (not rvalue) rvalue = callMethod("Parameter.setInt",&setInt1,self,args); + return rvalue; + } + + static PyObject* PyParameter_setDouble ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Parameter.setDouble",&setDouble2,self,args); + if (not rvalue) rvalue = callMethod("Parameter.setDouble",&setDouble1,self,args); + return rvalue; + } + + static PyObject* PyParameter_setPercentage ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Parameter.setPercentage",&setPercentage2 ,self,args); + if (not rvalue) rvalue = callMethod("Parameter.setPercentage",&setPercentage2i,self,args); + if (not rvalue) rvalue = callMethod("Parameter.setPercentage",&setPercentage1 ,self,args); + if (not rvalue) rvalue = callMethod("Parameter.setPercentage",&setPercentage1i,self,args); + return rvalue; + } + + static PyObject* PyParameter_setMin ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Parameter.setMin",&setMinDouble,self,args); + if (not rvalue) rvalue = callMethod("Parameter.setMin",&setMinInt ,self,args); + return rvalue; + } + + static PyObject* PyParameter_setMax ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Parameter.setMax",&setMaxDouble,self,args); + if (not rvalue) rvalue = callMethod("Parameter.setMax",&setMaxInt ,self,args); + return rvalue; + } + + static PyObject* PyParameter_getSlaves ( PyObject* self, PyObject* args ) + { return callMethod("Parameter.getSlaves",&Parameter::getSlaves,self,args); } // --------------------------------------------------------------- - // PyParameter Attribute Method table. + // PyParameter Method table. PyMethodDef PyParameter_Methods[] = - { - // { "hasMenu" , (PyCFunction)PyParameter_hasMenu , METH_VARARGS - // , "Return true if the menu at \"path\" exists." } - {NULL, NULL, 0, NULL} /* sentinel */ + { { "isFile" , (PyCFunction)PyParameter_isFile , METH_NOARGS + , "Tells if this parameter (string) holds a file name." } + , { "isPath" , (PyCFunction)PyParameter_isPath , METH_NOARGS + , "Tells if this parameter (string) holds a path." } + , { "hasMin" , (PyCFunction)PyParameter_hasMin , METH_NOARGS + , "Tells if this parameter (int) has a lower bound." } + , { "hasMax" , (PyCFunction)PyParameter_hasMax , METH_NOARGS + , "Tells if this parameter (int) has a higher bound." } + , { "hasNeedRestart" , (PyCFunction)PyParameter_hasNeedRestart , METH_NOARGS + , "Tells if this parameter needs a restart to be taken into account." } + , { "hasMustExist" , (PyCFunction)PyParameter_hasMustExist , METH_NOARGS + , "Tells if the file/path must exists." } + , { "hasFlags" , (PyCFunction)PyParameter_hasFlags , METH_VARARGS + , "Tells if the file/path must exists." } + , { "getId" , (PyCFunction)PyParameter_getId , METH_VARARGS + , "Return the string identifier of the parameter (unique)." } + , { "getMinInt" , (PyCFunction)PyParameter_getMinInt , METH_VARARGS + , "Return the integer lower bound (if set)." } + , { "getMaxInt" , (PyCFunction)PyParameter_getMaxInt , METH_VARARGS + , "Return the integer upper bound (if set)." } + , { "getMinDouble" , (PyCFunction)PyParameter_getMinDouble , METH_VARARGS + , "Return the float/double lower bound (if set)." } + , { "getMaxDouble" , (PyCFunction)PyParameter_getMaxDouble , METH_VARARGS + , "Return the float/double upper bound (if set)." } + , { "checkValue" , (PyCFunction)PyParameter_checkValue , METH_VARARGS + , "Check if the parameter value is within the defined bounds." } + , { "asBool" , (PyCFunction)PyParameter_asBool , METH_VARARGS + , "Return the parameter value, as a boolean." } + , { "asInt" , (PyCFunction)PyParameter_asInt , METH_VARARGS + , "Return the parameter value, as an integer." } + , { "asDouble" , (PyCFunction)PyParameter_asDouble , METH_VARARGS + , "Return the parameter value, as a float/double." } + , { "asPercentage" , (PyCFunction)PyParameter_asPercentage , METH_VARARGS + , "Return the parameter value, as a percentage (float)." } + , { "asString" , (PyCFunction)PyParameter_asString , METH_VARARGS + , "Return the parameter value, as a string." } + , { "asPercentageString" , (PyCFunction)PyParameter_asPercentageString , METH_VARARGS + , "Return the parameter value expressed in percentage (for double)." } + , { "addValue" , (PyCFunction)PyParameter_addValue , METH_VARARGS + , "Add a new value to parameter of enumerated type." } + , { "addSlave" , (PyCFunction)PyParameter_addSlave , METH_VARARGS + , "Add a new slave to this parameter." } + , { "setPriority" , (PyCFunction)PyParameter_setPriority , METH_VARARGS + , "Set the modification threshold (priority) of the parameter." } + , { "setString" , (PyCFunction)PyParameter_setString , METH_VARARGS + , "Set the parameter value as a string." } + , { "setBool" , (PyCFunction)PyParameter_setBool , METH_VARARGS + , "Set the parameter value as a bool." } + , { "setInt" , (PyCFunction)PyParameter_setInt , METH_VARARGS + , "Set the parameter value as a integer." } + , { "setDouble" , (PyCFunction)PyParameter_setDouble , METH_VARARGS + , "Set the parameter value as a float/double." } + , { "setPercentage" , (PyCFunction)PyParameter_setPercentage , METH_VARARGS + , "Set the parameter value as a float/double, expressed in percentage." } + , { "setMin" , (PyCFunction)PyParameter_setMin , METH_VARARGS + , "Set the parameter lower bound (either float or integer)." } + , { "setMax" , (PyCFunction)PyParameter_setMax , METH_VARARGS + , "Set the parameter upper bound (either float or integer)." } + , { "getSlaves" , (PyCFunction)PyParameter_getSlaves , METH_VARARGS + , "Returns the list of slaved parameters to this one (by ids)." } + , {NULL, NULL, 0, NULL} /* sentinel */ }; - - // PythonOnlyDeleteMethod(Parameter) - // PyTypeObjectLinkPyType(Parameter) + PyMethodDef PyParameterPriority_Methods[] = { {NULL, NULL, 0, NULL} /* sentinel */ }; + PyMethodDef PyParameterType_Methods [] = { {NULL, NULL, 0, NULL} /* sentinel */ }; + PyMethodDef PyParameterFlags_Methods [] = { {NULL, NULL, 0, NULL} /* sentinel */ }; -#else // Python Module Code Part. + // --------------------------------------------------------------- + // PyParameter Attriutes/Properties table. - -// +=================================================================+ -// | "PyParameter" Shared Library Code Part | -// +=================================================================+ - - - // LinkCreateMethod(Parameter) - // PyTypeRootObjectDefinitions(Parameter) - - - // static void ParameterLoadConstants ( PyObject* dictionnary ) { - // PyObject* constant; - - // LoadObjectConstant( dictionnary, Parameter::NoFlags, "NoFlags" ) - // LoadObjectConstant( dictionnary, Parameter::TopMenu, "TopMenu" ) - // } - - - // extern void PyParameter_postModuleInit () - // { - // ParameterLoadConstants(PyTypeParameter.tp_dict); - // } - -# endif // Shared Library Code Part. + PyGetSetDef PyParameter_Getsets[] = + { { (char*)"flags", (getter)PyParameter_getFlags, (setter)PyParameter_setFlags, (char*)"flags attribute", NULL } + , { (char*)"type" , (getter)PyParameter_getType , NULL , (char*)"type attribute" , NULL } + , {NULL, NULL, NULL, NULL} /* sentinel */ + }; } // extern "C". diff --git a/hurricane/src/configuration/PyPoint.cpp b/hurricane/src/configuration/PyPoint.cpp new file mode 100644 index 00000000..7220e0f4 --- /dev/null +++ b/hurricane/src/configuration/PyPoint.cpp @@ -0,0 +1,98 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | 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 : "./PyPoint.cpp" | +// +-----------------------------------------------------------------+ + + +#include "hurricane/configuration/PyPoint.h" + + +namespace Isobar3 { + +using namespace Hurricane; + +extern "C" { + + +// Thin wrappers for overloadeds member functions. + + static Point* ctorPoint0 () + { + // cerr << "Point* ctorPoint()" << endl; + return new Point(); + } + + static Point* ctorPoint1 ( Point* other ) + { + // cerr << "Point* ctorPoint(Point*)" << endl; + return new Point( *other ); + } + + static Point* ctorPoint2 ( DbU::Unit x, DbU::Unit y ) + { + // cerr << "Point* ctorPoint(DbU::Unit,DbU::Unit)" << endl; + return new Point( x, y ); + } + + +// Python methods. + + static PyObject* PyPoint_getX ( PyObject* self, PyObject* args ) + { return callMethod("Point.getX",&Point::getX,self,args); } + + static PyObject* PyPoint_getY ( PyObject* self, PyObject* args ) + { return callMethod("Point.getY",&Point::getY,self,args); } + + static PyObject* PyPoint_setX ( PyObject* self, PyObject* args ) + { return callMethod("Point.setX",&Point::setX,self,args); } + + static PyObject* PyPoint_setY ( PyObject* self, PyObject* args ) + { return callMethod("Point.setY",&Point::setY,self,args); } + + PyObject* PyPoint_NEW ( PyTypeObject* pyType, PyObject* args, PyObject* kwargs ) + { + // cerr << "PyPoint_NEW() args=" << PyTuple_Size(args) + // << " kwargs=" << PyDict_Size(kwargs)<< endl; + PyObject* rvalue = callFunction("Point",&ctorPoint2,args); + // cerr << " after ctorPoint2() rvalue=" << rvalue << endl; + if (not rvalue) rvalue = callFunction("Point",&ctorPoint1,args); + // cerr << " after ctorPoint1() rvalue=" << rvalue << endl; + if (not rvalue) rvalue = callFunction("Point",&ctorPoint0,args); + // cerr << " after ctorPoint0() rvalue=" << rvalue << endl; + return rvalue; + } + + int PyPoint_Init ( PyObject* self, PyObject* args, PyObject* kwargs ) + { + cdebug_log(20,0) << "PyPoint_Init(): " << (void*)self << endl; + return 0; + } + + + // --------------------------------------------------------------- + // PyPoint Method table. + + PyMethodDef PyPoint_Methods[] = + { { "getX" , (PyCFunction)PyPoint_getX , METH_NOARGS , "Return the Point X value." } + , { "getY" , (PyCFunction)PyPoint_getY , METH_NOARGS , "Return the Point Y value." } + , { "setX" , (PyCFunction)PyPoint_setX , METH_VARARGS, "Modify the Point X value." } + , { "setY" , (PyCFunction)PyPoint_setY , METH_VARARGS, "Modify the Point Y value." } + //, { "translate" , (PyCFunction)PyPoint_translate , METH_VARARGS, "Translate the point of dx and dy." } + //, { "manhattanDistance" , (PyCFunction)PyPoint_manhattanDistance, METH_VARARGS, "Compute the Manhattan distance between the two points." } + , {NULL, NULL, 0, NULL} /* sentinel */ + }; + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/PyRegularLayer.cpp b/hurricane/src/configuration/PyRegularLayer.cpp new file mode 100644 index 00000000..b49d2547 --- /dev/null +++ b/hurricane/src/configuration/PyRegularLayer.cpp @@ -0,0 +1,63 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | 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 : "./PyRegularLayer.cpp" | +// +-----------------------------------------------------------------+ + + +#include "hurricane/configuration/PyName.h" +#include "hurricane/configuration/PyTechnology.h" +#include "hurricane/configuration/PyBasicLayer.h" +#include "hurricane/configuration/PyRegularLayer.h" + + +namespace Isobar3 { + +using namespace Hurricane; + +extern "C" { + + +// Python methods. + + static PyObject* PyRegularLayer_create ( PyObject* self, PyObject* args ) + { return callFunction("RegularLayer.create",&RegularLayer::create,args); } + + static PyObject* PyRegularLayer_getBasicLayer ( PyObject* self, PyObject* args ) + { return callMethod("RegularLayer.getBasicLayer",&RegularLayer::getBasicLayer,self,args); } + + static PyObject* PyRegularLayer_setBasicLayer ( PyObject* self, PyObject* args ) + { return callMethod("RegularLayer.setBasicLayer",&RegularLayer::setBasicLayer,self,args); } + + static PyObject* PyRegularLayer_destroy ( PyObject* self, PyObject* args ) + { return callMethod("RegularLayer.destroy",&RegularLayer::destroy,self,args); } + + + // --------------------------------------------------------------- + // PyRegularLayer Attribute Method table. + + PyMethodDef PyRegularLayer_Methods[] = + { { "create" , (PyCFunction)PyRegularLayer_create , METH_VARARGS|METH_STATIC + , "Create a new RegularLayer." } + , { "getBasicLayer" , (PyCFunction)PyRegularLayer_getBasicLayer , METH_NOARGS + , "Get the RegularLayer associated to this RegularLayer." } + , { "setBasicLayer" , (PyCFunction)PyRegularLayer_setBasicLayer , METH_VARARGS + , "Associate a RegularLayer with this RegularLayer." } + , { "destroy" , (PyCFunction)PyRegularLayer_destroy , METH_NOARGS + , "destroy associated hurricane object, the python object remains." } + , {NULL, NULL, 0, NULL} /* sentinel */ + }; + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/PyTechnology.cpp b/hurricane/src/configuration/PyTechnology.cpp new file mode 100644 index 00000000..ec7fc336 --- /dev/null +++ b/hurricane/src/configuration/PyTechnology.cpp @@ -0,0 +1,254 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | 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 : "./PyTechnology.cpp" | +// +-----------------------------------------------------------------+ + + +#include "hurricane/configuration/PyName.h" +#include "hurricane/configuration/PyDataBase.h" +#include "hurricane/configuration/PyTechnology.h" +#include "hurricane/DataBase.h" +#include "hurricane/Technology.h" +#include "hurricane/BasicLayer.h" +#include "hurricane/RegularLayer.h" +#include "hurricane/ViaLayer.h" +#include "hurricane/Library.h" +#include "hurricane/Cell.h" + + +namespace Isobar3 { + +using namespace Hurricane; + +extern "C" { + + +// Thin wrappers for overloadeds member functions. + + static Layer* getLayer2 ( Technology* tech, string name ) + { return tech->getLayer( Name(name) ); } + + static Layer* getLayer1 ( Technology* tech, Layer::Mask mask, bool useSymbolic ) + { return tech->getLayer( mask, useSymbolic ); } + + static bool setSymbolicLayerString ( Technology* tech, string name ) + { return tech->setSymbolicLayer( Name(name) ); } + + static bool setSymbolicLayerLayer ( Technology* tech, Layer* layer ) + { return tech->setSymbolicLayer( layer ); } + + static PhysicalRule* getPhysicalRule3 ( Technology* tech, string ruleName, string layer1, string layer2 ) + { return tech->getPhysicalRule( ruleName, layer1, layer2 ); } + + static PhysicalRule* getPhysicalRule2 ( Technology* tech, string ruleName, string layer1 ) + { return tech->getPhysicalRule( ruleName, layer1 ); } + + static PhysicalRule* getPhysicalRule1 ( Technology* tech, string ruleName ) + { return tech->getPhysicalRule( ruleName ); } + + static PhysicalRule* addPhysicalRule4 ( Technology* tech, string ruleName, string layer1, string layer2, string ref ) + { return tech->addPhysicalRule( ruleName, layer1, layer2, ref ); } + + static PhysicalRule* addPhysicalRule3 ( Technology* tech, string ruleName, string layer1, string ref ) + { return tech->addPhysicalRule( ruleName, layer1, ref ); } + + static PhysicalRule* addPhysicalRule2 ( Technology* tech, string ruleName, string ref ) + { return tech->addPhysicalRule( ruleName, ref ); } + + static BasicLayers getBasicLayers1 ( Technology* tech, Layer::Mask mask ) + { return tech->getBasicLayers( mask ); } + + static BasicLayers getBasicLayers0 ( Technology* tech ) + { return tech->getBasicLayers(); } + + static void setName ( Technology* tech, string name ) + { return tech->setName( Name(name) ); } + + +// Python methods. + + static PyObject* PyTechnology_create ( PyObject* self, PyObject* args ) + { + //Name test; + //pyToC( NULL, &test ); + return callFunction("Technology.create",&Technology::create,args); + } + + static PyObject* PyTechnology_getDataBase ( PyObject* self, PyObject* args ) + { return callMethod("Technology.getDataBase",&Technology::getDataBase,self,args); } + + static PyObject* PyTechnology_getLayer ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Technology.getLayer",&getLayer2,self,args); + if (not rvalue) rvalue = callMethod("Technology.getLayer",&getLayer1,self,args); + return rvalue; + } + + static PyObject* PyTechnology_getBasicLayers ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Technology.getBasicLayers",&getBasicLayers1,self,args); + if (not rvalue) rvalue = callMethod("Technology.getBasicLayers",&getBasicLayers0,self,args); + return rvalue; + } + + static PyObject* PyTechnology_setSymbolicLayer ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Technology.setSymbolicLayer",&setSymbolicLayerLayer ,self,args); + if (not rvalue) rvalue = callMethod("Technology.setSymbolicLayer",&setSymbolicLayerString,self,args); + return rvalue; + } + + static PyObject* PyTechnology_getUnitRule ( PyObject* self, PyObject* args ) + { return callMethod("Technology.getUnitRule",&Technology::getUnitRule,self,args); } + + static PyObject* PyTechnology_getPhysicalRule ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Technology.getPhysicalRule",&getPhysicalRule3,self,args); + if (not rvalue) rvalue = callMethod("Technology.getPhysicalRule",&getPhysicalRule2,self,args); + if (not rvalue) rvalue = callMethod("Technology.getPhysicalRule",&getPhysicalRule1,self,args); + return rvalue; + } + + static PyObject* PyTechnology_addUnitRule ( PyObject* self, PyObject* args ) + { return callMethod("Technology.addUnitRule",&Technology::addUnitRule,self,args); } + + static PyObject* PyTechnology_addPhysicalRule ( PyObject* self, PyObject* args ) + { + PyObject* rvalue = callMethod("Technology.addPhysicalRule",&addPhysicalRule4,self,args); + if (not rvalue) rvalue = callMethod("Technology.addPhysicalRule",&addPhysicalRule3,self,args); + if (not rvalue) rvalue = callMethod("Technology.addPhysicalRule",&addPhysicalRule2,self,args); + return rvalue; + } + + static PyObject* PyTechnology_getDeviceDescriptor ( PyObject* self, PyObject* args ) + { return callMethod("Technology.getDeviceDescriptor",&Technology::getDeviceDescriptor,self,args); } + + static PyObject* PyTechnology_addDeviceDescriptor ( PyObject* self, PyObject* args ) + { return callMethod("Technology.addDeviceDescriptor",&Technology::addDeviceDescriptor,self,args); } + + static PyObject* PyTechnology_getName ( PyObject* self, PyObject* args ) + { return callMethod("Technology.getName",&Technology::getName,self,args); } + + static PyObject* PyTechnology_setName ( PyObject* self, PyObject* args ) + { return callMethod("Technology.setName",&setName,self,args); } + + static PyObject* PyTechnology_isMetal ( PyObject* self, PyObject* args ) + { return callMethod("Technology.isMetal",&Technology::isMetal,self,args); } + + static PyObject* PyTechnology_getBasicLayer ( PyObject* self, PyObject* args ) + { return callMethod("Technology.getBasicLayer",&Technology::getBasicLayer,self,args); } + + static PyObject* PyTechnology_getRegularLayer ( PyObject* self, PyObject* args ) + { return callMethod("Technology.getRegularLayer",&Technology::getRegularLayer,self,args); } + + static PyObject* PyTechnology_getViaLayer ( PyObject* self, PyObject* args ) + { return callMethod("Technology.getViaLayer",&Technology::getViaLayer,self,args); } + + static PyObject* PyTechnology_getLayers ( PyObject* self, PyObject* args ) + { return callMethod("Technology.getLayers",&Technology::getLayers,self,args); } + + static PyObject* PyTechnology_getRegularLayers ( PyObject* self, PyObject* args ) + { return callMethod("Technology.getRegularLayers",&Technology::getRegularLayers,self,args); } + + static PyObject* PyTechnology_getViaLayers ( PyObject* self, PyObject* args ) + { return callMethod("Technology.getViaLayers",&Technology::getViaLayers,self,args); } + + static PyObject* PyTechnology_getMetalAbove ( PyObject* self, PyObject* args ) + { return callMethod("Technology.getMetalAbove",&Technology::getMetalAbove,self,args); } + + static PyObject* PyTechnology_getMetalBelow ( PyObject* self, PyObject* args ) + { return callMethod("Technology.getMetalBelow",&Technology::getMetalBelow,self,args); } + + static PyObject* PyTechnology_getCutAbove ( PyObject* self, PyObject* args ) + { return callMethod("Technology.getCutAbove",&Technology::getCutAbove,self,args); } + + static PyObject* PyTechnology_getCutBelow ( PyObject* self, PyObject* args ) + { return callMethod("Technology.getCutBelow",&Technology::getCutBelow,self,args); } + + static PyObject* PyTechnology_getViaBetween ( PyObject* self, PyObject* args ) + { return callMethod("Technology.getViaBetween",&Technology::getViaBetween,self,args); } + + static PyObject* PyTechnology_getNthMetal ( PyObject* self, PyObject* args ) + { return callMethod("Technology.getNthMetal",&Technology::getNthMetal,self,args); } + + static PyObject* PyTechnology_destroy ( PyObject* self, PyObject* args ) + { return callMethod("Technology.destroy",&Technology::destroy,self,args); } + + + // --------------------------------------------------------------- + // PyTechnology Method table. + + PyMethodDef PyTechnology_Methods[] = + { { "create" , (PyCFunction)PyTechnology_create , METH_VARARGS|METH_STATIC + , "Create the Technology object." } + , { "isMetal" , (PyCFunction)PyTechnology_isMetal , METH_VARARGS + , "Tells if the given layer is of metal kind (Material)." } + , { "getDataBase" , (PyCFunction)PyTechnology_getDataBase , METH_NOARGS + , "Returns the associated DataBase." } + , { "getName" , (PyCFunction)PyTechnology_getName , METH_NOARGS + , "Returns the name of the technology." } + , { "getLayer" , (PyCFunction)PyTechnology_getLayer , METH_VARARGS + , "Returns the layer named name." } + , { "getBasicLayer" , (PyCFunction)PyTechnology_getBasicLayer , METH_VARARGS + , "Returns the BasicLayer named name." } + , { "getRegularLayer" , (PyCFunction)PyTechnology_getRegularLayer , METH_VARARGS + , "Returns the RegularLayer named name." } + , { "getViaLayer" , (PyCFunction)PyTechnology_getViaLayer , METH_VARARGS + , "Returns the ViaLayer named name." } + , { "getLayers" , (PyCFunction)PyTechnology_getLayers , METH_NOARGS + , "Returns the collection of all Layers." } + , { "getBasicLayers" , (PyCFunction)PyTechnology_getBasicLayers , METH_VARARGS + , "Returns the collection of all BasicLayers." } + , { "getRegularLayers" , (PyCFunction)PyTechnology_getRegularLayers , METH_NOARGS + , "Returns the collection of all RegularLayers." } + , { "getViaLayers" , (PyCFunction)PyTechnology_getViaLayers , METH_NOARGS + , "Returns the collection of all BasicLayers." } + , { "getMetalAbove" , (PyCFunction)PyTechnology_getMetalAbove , METH_VARARGS + , "Returns the metal layer immediatly above this one." } + , { "getMetalBelow" , (PyCFunction)PyTechnology_getMetalBelow , METH_VARARGS + , "Returns the metal layer immediatly below this one." } + , { "getCutAbove" , (PyCFunction)PyTechnology_getCutAbove , METH_VARARGS + , "Returns the cut layer immediatly above this one." } + , { "getCutBelow" , (PyCFunction)PyTechnology_getCutBelow , METH_VARARGS + , "Returns the cut layer immediatly below." } + , { "getViaBetween" , (PyCFunction)PyTechnology_getViaBetween , METH_VARARGS + , "Returns the VIA between those two layers (must be adjacent)." } + , { "getNthMetal" , (PyCFunction)PyTechnology_getNthMetal , METH_VARARGS + , "Returns Nth metal (zero is nearest substrate)." } + , { "setName" , (PyCFunction)PyTechnology_setName , METH_VARARGS + , "Allows to change the technology name." } + , { "setSymbolicLayer" , (PyCFunction)PyTechnology_setSymbolicLayer , METH_VARARGS + , "Mark a Layer as the symbolic one (by name or by Layer)." } + , { "getUnitRule" , (PyCFunction)PyTechnology_getUnitRule , METH_VARARGS + , "Returns the Unit Rule named name." } + , { "getPhysicalRule" , (PyCFunction)PyTechnology_getPhysicalRule , METH_VARARGS + , "Returns the Physical Rule named name." } + , { "getLayer" , (PyCFunction)PyTechnology_getLayer , METH_VARARGS + , "Returns the Layer named name." } + , { "addPhysicalRule" , (PyCFunction)PyTechnology_addPhysicalRule , METH_VARARGS + , "Adds a new physical rule." } + , { "addUnitRule" , (PyCFunction)PyTechnology_addUnitRule , METH_VARARGS + , "Adds a new Unit rule." } + , { "getDeviceDescriptor", (PyCFunction)PyTechnology_getDeviceDescriptor , METH_VARARGS + , "Get the DeviceDescriptor ." } + , { "addDeviceDescriptor", (PyCFunction)PyTechnology_addDeviceDescriptor , METH_VARARGS + , "Add (create) the DeviceDescriptor ." } + , { "destroy" , (PyCFunction)PyTechnology_destroy , METH_NOARGS + , "Destroy associated hurricane object The python object remains." } + , {NULL, NULL, 0, NULL} /* sentinel */ + }; + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/PyTransistorLayer.cpp b/hurricane/src/configuration/PyTransistorLayer.cpp new file mode 100644 index 00000000..bca11fe2 --- /dev/null +++ b/hurricane/src/configuration/PyTransistorLayer.cpp @@ -0,0 +1,53 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | 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 : "./PyTransistorLayer.cpp" | +// +-----------------------------------------------------------------+ + + +#include "hurricane/configuration/PyName.h" +#include "hurricane/configuration/PyTechnology.h" +#include "hurricane/configuration/PyBasicLayer.h" +#include "hurricane/configuration/PyTransistorLayer.h" + + +namespace Isobar3 { + +using namespace Hurricane; + +extern "C" { + + +// Python methods. + + static PyObject* PyTransistorLayer_create ( PyObject* self, PyObject* args ) + { return callFunction("TransistorLayer.create",&TransistorLayer::create,args); } + + static PyObject* PyTransistorLayer_destroy ( PyObject* self, PyObject* args ) + { return callMethod("TransistorLayer.destroy",&TransistorLayer::destroy,self,args); } + + + // --------------------------------------------------------------- + // PyTransistorLayer Attribute Method table. + + PyMethodDef PyTransistorLayer_Methods[] = + { { "create" , (PyCFunction)PyTransistorLayer_create , METH_VARARGS|METH_STATIC + , "Create a new TransistorLayer." } + , { "destroy" , (PyCFunction)PyTransistorLayer_destroy , METH_NOARGS + , "destroy associated hurricane object, the python object remains." } + , {NULL, NULL, 0, NULL} /* sentinel */ + }; + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/PyTypeManager.cpp b/hurricane/src/configuration/PyTypeManager.cpp new file mode 100644 index 00000000..0073fcea --- /dev/null +++ b/hurricane/src/configuration/PyTypeManager.cpp @@ -0,0 +1,320 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Universite 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | 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 : "./PyTypeManager.cpp" | +// +-----------------------------------------------------------------+ + + +#include "hurricane/configuration/PyTypeManager.h" + + +namespace Isobar3 { + + + extern "C" { + + PyObject* ConstructorError = NULL; + PyObject* ProxyError = NULL; + PyObject* HurricaneError = NULL; + PyObject* HurricaneWarning = NULL; + + + void _tpDeAlloc ( PyObject* self ) + { PyTypeManager::get( Py_TYPE(self) )->_getTpDeAlloc( self ); } + + + PyObject* _tpStr ( PyObject* self ) + { return PyTypeManager::get( Py_TYPE(self) )->_getTpStr( self ); } + + + long _tpHash ( PyObject* self ) + { return PyTypeManager::get( Py_TYPE(self) )->_getTpHash( self ); } + + + Py_ssize_t _sqLength ( PyObject* self ) + { return PyTypeManager::get( Py_TYPE(self) )->_getSqLength( self ); } + + + PyObject* _sqConcat ( PyObject* a, PyObject* b ) + { return PyTypeManager::get( Py_TYPE(a) )->_getSqConcat( a, b ); } + + + PyObject* _sqRepeat ( PyObject* a, Py_ssize_t count ) + { return PyTypeManager::get( Py_TYPE(a) )->_getSqRepeat( a, count ); } + + + PyObject* _sqItem ( PyObject* self, Py_ssize_t count ) + { return PyTypeManager::get( Py_TYPE(self) )->_getSqItem( self, count ); } + + + int _sqContains ( PyObject* self, PyObject* item ) + { return PyTypeManager::get( Py_TYPE(self) )->_getSqContains( self, item ); } + + + Py_ssize_t _mpLength ( PyObject* self ) + { return PyTypeManager::get( Py_TYPE(self) )->_getMpLength( self ); } + + + PyObject* _mpSubscript ( PyObject* self, PyObject* key ) + { return PyTypeManager::get( Py_TYPE(self) )->_getMpSubscript( self, key ); } + + + PyObject* _tpIter ( PyObject* self ) + { return PyTypeManager::get( Py_TYPE(self) )->_getTpIter( self ); } + + + PyObject* _tpIterNext ( PyObject* self ) + { return PyTypeManager::get( Py_TYPE(self) )->_getTpIterNext( self ); } + + + } + + + BaseArg::~BaseArg () + { } + + +// ------------------------------------------------------------------- +// PyTypeObject & PyObject wrapper / manager. + + + std::map< size_t , PyTypeManager* > PyTypeManager::_managerByCppTypes; + std::map< PyTypeObject*, PyTypeManager* > PyTypeManager::_managerByPyTypes; + + + PyTypeManager::~PyTypeManager () + { } + + + void PyTypeManager::_setTypeNames ( std::string className ) + { + // cerr << "_setTypeNames(): " << className << " -> "; + size_t cppScope = className.find_first_of( "::" ); + if (cppScope != std::string::npos) className = className.substr( cppScope+2 ); + //cerr << "| " << className << endl; + size_t subClass = className.find_last_of( "::" ); + if (subClass != std::string::npos) className = className.replace( subClass-1, 2, "_" ); + //cerr << "| " << className << endl; + + _cppTypeName = className; + _pyTypeName = "Py"+_cppTypeName; + // cerr << _cppTypeName << "/" << _pyTypeName << endl; + } + + + Py_ssize_t PyTypeManager::_getSqLength ( PyObject* ) + { + throw Error( "PyTypeManager::_getSqLength(): Not implemented on <%s>.", _getCppTypeName().c_str() ); + return 0; + } + + + PyObject* PyTypeManager::_getSqConcat ( PyObject*, PyObject* ) + { + throw Error( "PyTypeManager::_getSqConcat(): Not implemented on <%s>.", _getCppTypeName().c_str() ); + return NULL; + } + + + PyObject* PyTypeManager::_getSqRepeat ( PyObject*, Py_ssize_t ) + { + throw Error( "PyTypeManager::_getSqRepeat(): Not implemented on <%s>.", _getCppTypeName().c_str() ); + return NULL; + } + + + PyObject* PyTypeManager::_getSqItem ( PyObject*, Py_ssize_t ) + { + throw Error( "PyTypeManager::_getSqItem(): Not implemented on <%s>.", _getCppTypeName().c_str() ); + return NULL; + } + + + int PyTypeManager::_getSqContains ( PyObject*, PyObject* ) + { + throw Error( "PyTypeManager::_getSqContains(): Not implemented on <%s>.", _getCppTypeName().c_str() ); + return -1; + } + + + Py_ssize_t PyTypeManager::_getMpLength ( PyObject* ) + { + throw Error( "PyTypeManager::_getMpItem(): Not implemented on <%s>.", _getCppTypeName().c_str() ); + return 0; + } + + + PyObject* PyTypeManager::_getMpSubscript ( PyObject*, PyObject* ) + { + throw Error( "PyTypeManager::_getMpSubscript(): Not implemented on <%s>.", _getCppTypeName().c_str() ); + return NULL; + } + + + PyObject* PyTypeManager::_getTpIter ( PyObject* ) + { + throw Error( "PyTypeManager::_getTpIter(): Not implemented on <%s>.", _getCppTypeName().c_str() ); + return NULL; + } + + + PyObject* PyTypeManager::_getTpIterNext ( PyObject* ) + { + throw Error( "PyTypeManager::_getTpIterNext(): Not implemented on <%s>.", _getCppTypeName().c_str() ); + return NULL; + } + + + PyTypeManager* PyTypeManager::_getBaseManager () + { return NULL; } + + + void PyTypeManager::_setupPyType () + { + PyTypeObject* ob_type = _getTypeObject(); + ob_type->tp_name = _getPyTypeName().c_str(); + ob_type->tp_dealloc = (destructor) &::Isobar3::_tpDeAlloc; + ob_type->tp_str = (reprfunc) &::Isobar3::_tpStr; + ob_type->tp_hash = (hashfunc) &::Isobar3::_tpHash; + ob_type->tp_methods = _getMethods(); + ob_type->tp_getset = _getGetsets(); + if (_getBaseManager()) + ob_type->tp_base = _getBaseManager()->_getTypeObject(); + // cerr << "_setupPyType() on \"" << _getPyTypeName() + // << "\" ob_type=" << (void*)ob_type << endl; + } + + + void PyTypeManager::_addToModule ( PyObject* module ) + { + if (PyType_Ready(_getTypeObject()) < 0) { + cerr << "[ERROR] Failed to initialize <" << _getPyTypeName() << ">." << endl; + return; + } + + if (PyModule_Check(module)) { + Py_INCREF( _getTypeObject() ); + PyModule_AddObject( module + , _getCppTypeName().c_str() + , (PyObject*)_getTypeObject() ); + } else if (PyType_Check(module)) { + PyDict_SetItemString( ((PyTypeObject*)module)->tp_dict + , _getCppTypeName().c_str() + , (PyObject*)_getTypeObject() ); + } else { + throw Error( "PyTypeManager::_addToModule(): \"module\" argument is neither a module nor a type" ); + } + } + + +// ------------------------------------------------------------------- +// PyWrapper, C++ function & function member exception wrapper. + + + PyWrapper::~PyWrapper () + { } + + + PyObject* PyWrapper::_call ( PyObject* self, PyObject* args ) + { + throw Error( "PyWrapper::_call(PyObject*,PyObject*): Base class method must never be called." ); + return NULL; + } + + + PyObject* PyWrapper::_call ( PyObject* args ) + { + throw Error( "PyWrapper::_call(PyObject*): Base class method must never be called." ); + return NULL; + } + + + int PyWrapper::_predicate ( PyObject* args ) + { + throw Error( "PyWrapper::_predicate(PyObject*): Base class method must never be called." ); + return 0; + } + + + PyObject* exceptionWrapper ( PyWrapper* wrapper, PyObject* self, PyObject* args ) + { + try { + return wrapper->_call( self, args ); + } catch ( const Warning& w ) { + wrapper->message() += "\n" + getString(w); + } catch ( const Error& e ) { + wrapper->message() += "\n" + getString(e); + if (not e.where().empty()) wrapper->message() += "\n" + e.where(); + } catch ( const Bug& e ) { + wrapper->message() += "\n" + getString(e); + } catch ( const Exception& e ) { + wrapper->message() += "\nUnknown Hurricane::Exception"; + } catch ( const std::exception& e ) { + wrapper->message() += "\n" + std::string(e.what()); + } catch ( ... ) { + wrapper->message() += "\nUnmanaged exception, neither a Hurricane::Error nor" + " a std::exception."; + } + PyErr_SetString( HurricaneError, wrapper->message().c_str() ); + return NULL; + } + + + PyObject* exceptionWrapper ( PyWrapper* wrapper, PyObject* args ) + { + try { + return wrapper->_call( args ); + } catch ( const Warning& w ) { + wrapper->message() += "\n" + getString(w); + } catch ( const Error& e ) { + wrapper->message() += "\n" + getString(e); + if (not e.where().empty()) wrapper->message() += "\n" + e.where(); + } catch ( const Bug& e ) { + wrapper->message() += "\n" + getString(e); + } catch ( const Exception& e ) { + wrapper->message() += "\nUnknown Hurricane::Exception"; + } catch ( const std::exception& e ) { + wrapper->message() += "\n" + std::string(e.what()); + } catch ( ... ) { + wrapper->message() += "\nUnmanaged exception, neither a Hurricane::Error nor" + " a std::exception."; + } + PyErr_SetString( HurricaneError, wrapper->message().c_str() ); + return NULL; + } + + + int exceptionPredicateWrapper ( PyWrapper* wrapper, PyObject* self ) + { + try { + return wrapper->_predicate( self ); + } catch ( const Warning& w ) { + wrapper->message() += "\n" + getString(w); + } catch ( const Error& e ) { + wrapper->message() += "\n" + getString(e); + if (not e.where().empty()) wrapper->message() += "\n" + e.where(); + } catch ( const Bug& e ) { + wrapper->message() += "\n" + getString(e); + } catch ( const Exception& e ) { + wrapper->message() += "\nUnknown Hurricane::Exception"; + } catch ( const std::exception& e ) { + wrapper->message() += "\n" + std::string(e.what()); + } catch ( ... ) { + wrapper->message() += "\nUnmanaged exception, neither a Hurricane::Error nor" + " a std::exception."; + } + PyErr_SetString( HurricaneError, wrapper->message().c_str() ); + return 0; + } + + +} // Isobar namespace. diff --git a/hurricane/src/configuration/PyViaLayer.cpp b/hurricane/src/configuration/PyViaLayer.cpp new file mode 100644 index 00000000..2ec2a313 --- /dev/null +++ b/hurricane/src/configuration/PyViaLayer.cpp @@ -0,0 +1,53 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | 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 : "./PyViaLayer.cpp" | +// +-----------------------------------------------------------------+ + + +#include "hurricane/configuration/PyName.h" +#include "hurricane/configuration/PyTechnology.h" +#include "hurricane/configuration/PyBasicLayer.h" +#include "hurricane/configuration/PyViaLayer.h" + + +namespace Isobar3 { + +using namespace Hurricane; + +extern "C" { + + +// Python methods. + + static PyObject* PyViaLayer_create ( PyObject* self, PyObject* args ) + { return callFunction("ViaLayer.create",&ViaLayer::create,args); } + + static PyObject* PyViaLayer_destroy ( PyObject* self, PyObject* args ) + { return callMethod("ViaLayer.destroy",&ViaLayer::destroy,self,args); } + + + // --------------------------------------------------------------- + // PyViaLayer Attribute Method table. + + PyMethodDef PyViaLayer_Methods[] = + { { "create" , (PyCFunction)PyViaLayer_create , METH_VARARGS|METH_STATIC + , "Create a new ViaLayer." } + , { "destroy" , (PyCFunction)PyViaLayer_destroy , METH_NOARGS + , "destroy associated hurricane object, the python object remains." } + , {NULL, NULL, 0, NULL} /* sentinel */ + }; + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/hurricane/configuration/ConfEditorWidget.h b/hurricane/src/configuration/hurricane/configuration/ConfEditorWidget.h index 51c61f48..5f406410 100644 --- a/hurricane/src/configuration/hurricane/configuration/ConfEditorWidget.h +++ b/hurricane/src/configuration/hurricane/configuration/ConfEditorWidget.h @@ -22,7 +22,7 @@ class QMenu; class QAction; -namespace Cfg2 { +namespace Cfg { class ConfigurationWidget; diff --git a/hurricane/src/configuration/hurricane/configuration/ConfTabWidget.h b/hurricane/src/configuration/hurricane/configuration/ConfTabWidget.h index b9e9e5c0..439e915b 100644 --- a/hurricane/src/configuration/hurricane/configuration/ConfTabWidget.h +++ b/hurricane/src/configuration/hurricane/configuration/ConfTabWidget.h @@ -23,7 +23,7 @@ class QGridLayout; #include "hurricane/configuration/ConfigurationWidget.h" -namespace Cfg2 { +namespace Cfg { class ParameterWidget; diff --git a/hurricane/src/configuration/hurricane/configuration/Configuration.h b/hurricane/src/configuration/hurricane/configuration/Configuration.h index 2f5304ef..100b0889 100644 --- a/hurricane/src/configuration/hurricane/configuration/Configuration.h +++ b/hurricane/src/configuration/hurricane/configuration/Configuration.h @@ -23,7 +23,7 @@ #include "hurricane/configuration/LayoutDescription.h" -namespace Cfg2 { +namespace Cfg { class ConfigurationWidget; class ConfigurationDialog; @@ -36,10 +36,10 @@ namespace Cfg2 { public: class LogEntry { public: - inline LogEntry ( const std::string& id ); - inline const std::string& getId () const; - inline const std::string& getValid () const; - inline void restore () const; + inline LogEntry ( std::string id ); + inline std::string getId () const; + inline std::string getValid () const; + inline void restore () const; private: std::string _id; std::string _valid; @@ -50,37 +50,37 @@ namespace Cfg2 { static Parameter::Priority pushDefaultPriority ( Parameter::Priority ); static Parameter::Priority popDefaultPriority (); static Parameter::Priority getDefaultPriority (); - static void _tokenize ( std::set& tokens, const std::string& line ); + static void _tokenize ( std::set& tokens, std::string line ); public: // Methods. ConfigurationWidget* buildWidget ( unsigned int flags ); ConfigurationDialog* buildDialog (); - inline const std::map& + inline const std::map& getParameters () const; const std::set& getLogs ( unsigned int ilog ) const; inline unsigned int getFlags () const; inline const LayoutDescription& getLayout () const; inline LayoutDescription& getLayout (); - Parameter* getParameter ( const std::string& id - , Parameter::Type type=Parameter::Unknown ) const; - Parameter* addParameter ( const std::string& id - , Parameter::Type type - , const std::string& value + Parameter* getParameter ( std::string id + , Parameter::Type type=Parameter::Unknown ) const; + Parameter* addParameter ( std::string id + , Parameter::Type type + , std::string value , Parameter::Priority priority=Parameter::UseDefault ); inline void setFlags ( unsigned int mask ); inline bool hasLogs ( unsigned int mask ) const; - void addLog ( unsigned int mask, const std::string& id ); - void removeLog ( unsigned int mask, const std::string& id ); + void addLog ( unsigned int mask, std::string id ); + void removeLog ( unsigned int mask, std::string id ); inline void restoreFromLogs ( unsigned int mask ); inline void clearLogs ( unsigned int mask ); void print ( std::ostream& ) const; - bool readFromFile ( const std::string& ); - bool writeToFile ( const std::string&, unsigned int flags, const std::string& tabs="" ) const; - void writeToStream ( std::ostream&, unsigned int flags, const std::string& tabs="" ) const; + bool readFromFile ( std::string ); + bool writeToFile ( std::string, unsigned int flags, std::string tabs="" ) const; + void writeToStream ( std::ostream&, unsigned int flags, std::string tabs="" ) const; private: // Attributes. static Configuration* _singleton; - std::map _parameters; + std::map _parameters; LayoutDescription _layout; unsigned int _flags; std::map< unsigned int, std::set > _logSets; @@ -90,7 +90,7 @@ namespace Cfg2 { // Inline Methods. - inline const std::map& Configuration::getParameters () const + inline const std::map& Configuration::getParameters () const { return _parameters; } inline const LayoutDescription& Configuration::getLayout () const { return _layout; } @@ -132,13 +132,13 @@ namespace Cfg2 { } - inline bool hasParameter ( const std::string& id ) + inline bool hasParameter ( std::string id ) { return (Configuration::get()->getParameter(id,Parameter::Unknown) != NULL); } - inline Parameter* getParamString ( const std::string& id, const std::string& value="" ) + inline Parameter* getParamString ( std::string id, std::string value="" ) { Parameter* parameter = Configuration::get()->getParameter(id,Parameter::String); if ( parameter == NULL ) { @@ -148,7 +148,7 @@ namespace Cfg2 { } - inline Parameter* getParamBool ( const std::string& id, bool value=false ) + inline Parameter* getParamBool ( std::string id, bool value=false ) { Parameter* parameter = Configuration::get()->getParameter(id,Parameter::Bool); if ( parameter == NULL ) { @@ -159,7 +159,7 @@ namespace Cfg2 { } - inline Parameter* getParamInt ( const std::string& id, int value=0 ) + inline Parameter* getParamInt ( std::string id, int value=0 ) { //std::cerr << "getParamInt() " << id << " value:" << value << std::endl; @@ -172,7 +172,7 @@ namespace Cfg2 { } - inline Parameter* getParamEnumerate ( const std::string& id, int value=0 ) + inline Parameter* getParamEnumerate ( std::string id, int value=0 ) { Parameter* parameter = Configuration::get()->getParameter(id,Parameter::Enumerate); if ( parameter == NULL ) { @@ -183,7 +183,7 @@ namespace Cfg2 { } - inline Parameter* getParamDouble ( const std::string& id, double value=0.0 ) + inline Parameter* getParamDouble ( std::string id, double value=0.0 ) { Parameter* parameter = Configuration::get()->getParameter(id,Parameter::Double); if ( parameter == NULL ) { @@ -194,7 +194,7 @@ namespace Cfg2 { } - inline Parameter* getParamPercentage ( const std::string& id, double value=91.0 ) + inline Parameter* getParamPercentage ( std::string id, double value=91.0 ) { Parameter* parameter = Configuration::get()->getParameter(id,Parameter::Percentage); if ( parameter == NULL ) { @@ -205,7 +205,7 @@ namespace Cfg2 { } - inline Configuration::LogEntry::LogEntry ( const std::string& id ) + inline Configuration::LogEntry::LogEntry ( std::string id ) : _id (id) , _valid("") { @@ -214,8 +214,8 @@ namespace Cfg2 { } - inline const std::string& Configuration::LogEntry::getId () const { return _id; } - inline const std::string& Configuration::LogEntry::getValid () const { return _valid; } + inline std::string Configuration::LogEntry::getId () const { return _id; } + inline std::string Configuration::LogEntry::getValid () const { return _valid; } inline void Configuration::LogEntry::restore () const diff --git a/hurricane/src/configuration/hurricane/configuration/ConfigurationDialog.h b/hurricane/src/configuration/hurricane/configuration/ConfigurationDialog.h index c247d9e4..1b15e034 100644 --- a/hurricane/src/configuration/hurricane/configuration/ConfigurationDialog.h +++ b/hurricane/src/configuration/hurricane/configuration/ConfigurationDialog.h @@ -20,7 +20,7 @@ class QPushButton; -namespace Cfg2 { +namespace Cfg { class ConfigurationDialog : public QDialog { diff --git a/hurricane/src/configuration/hurricane/configuration/ConfigurationWidget.h b/hurricane/src/configuration/hurricane/configuration/ConfigurationWidget.h index fd8815b1..64db0ea4 100644 --- a/hurricane/src/configuration/hurricane/configuration/ConfigurationWidget.h +++ b/hurricane/src/configuration/hurricane/configuration/ConfigurationWidget.h @@ -22,7 +22,7 @@ class QPushButton; class QTabWidget; -namespace Cfg2 { +namespace Cfg { class Configuration; class Parameter; diff --git a/hurricane/src/configuration/hurricane/configuration/FilePathEdit.h b/hurricane/src/configuration/hurricane/configuration/FilePathEdit.h index ccb10b84..5138d233 100644 --- a/hurricane/src/configuration/hurricane/configuration/FilePathEdit.h +++ b/hurricane/src/configuration/hurricane/configuration/FilePathEdit.h @@ -22,7 +22,7 @@ class QToolButton; class QFileDialog; -namespace Cfg2 { +namespace Cfg { class FilePathEdit : public QLineEdit diff --git a/hurricane/src/configuration/hurricane/configuration/LayoutDescription.h b/hurricane/src/configuration/hurricane/configuration/LayoutDescription.h index 4463f71c..702c9134 100644 --- a/hurricane/src/configuration/hurricane/configuration/LayoutDescription.h +++ b/hurricane/src/configuration/hurricane/configuration/LayoutDescription.h @@ -21,7 +21,7 @@ #include -namespace Cfg2 { +namespace Cfg { class Configuration; class ConfigurationWidget; @@ -36,20 +36,20 @@ namespace Cfg2 { enum Type { Title=1, Section=2, Rule=3, Parameter=4 }; public: static std::string typeToString ( Type ); - static Type stringToType ( const std::string& ); + static Type stringToType ( std::string ); public: inline static WidgetDescription* rule (); - inline static WidgetDescription* title ( const std::string& title ); - inline static WidgetDescription* section ( const std::string& title, int column ); - inline static WidgetDescription* parameter ( const std::string& id - , const std::string& label + inline static WidgetDescription* title ( std::string title ); + inline static WidgetDescription* section ( std::string title, int column ); + inline static WidgetDescription* parameter ( std::string id + , std::string label , int column , int span , int flags ); inline Type getType () const; - inline const std::string& getId () const; - inline const std::string& getLabel () const; + inline std::string getId () const; + inline std::string getLabel () const; inline int getColumn () const; inline int getSpan () const; inline int getFlags () const; @@ -62,8 +62,8 @@ namespace Cfg2 { int _flags; private: inline WidgetDescription ( Type type - , const std::string& id ="" - , const std::string& label ="" + , std::string id ="" + , std::string label ="" , int column=0 , int span =1 , int flags =0 @@ -73,8 +73,8 @@ namespace Cfg2 { // Inline Functions. inline WidgetDescription::WidgetDescription ( Type type - , const std::string& id - , const std::string& label + , std::string id + , std::string label , int column , int span , int flags ) @@ -84,14 +84,14 @@ namespace Cfg2 { inline WidgetDescription* WidgetDescription::rule () { return new WidgetDescription(Rule); } - inline WidgetDescription* WidgetDescription::title ( const std::string& title ) + inline WidgetDescription* WidgetDescription::title ( std::string title ) { return new WidgetDescription(Title,"",title); } - inline WidgetDescription* WidgetDescription::section ( const std::string& section, int column ) + inline WidgetDescription* WidgetDescription::section ( std::string section, int column ) { return new WidgetDescription(Section,"",section,column); } - inline WidgetDescription* WidgetDescription::parameter ( const std::string& id - , const std::string& label + inline WidgetDescription* WidgetDescription::parameter ( std::string id + , std::string label , int column , int span , int flags @@ -99,8 +99,8 @@ namespace Cfg2 { { return new WidgetDescription(Parameter,id,label,column,span,flags); } inline WidgetDescription::Type WidgetDescription::getType () const { return _type; } - inline const std::string& WidgetDescription::getId () const { return _id; } - inline const std::string& WidgetDescription::getLabel () const { return _label; } + inline std::string WidgetDescription::getId () const { return _id; } + inline std::string WidgetDescription::getLabel () const { return _label; } inline int WidgetDescription::getColumn () const { return _column; } inline int WidgetDescription::getSpan () const { return _span; } inline int WidgetDescription::getFlags () const { return _flags; } @@ -111,10 +111,10 @@ namespace Cfg2 { class TabDescription { public: - inline TabDescription ( LayoutDescription*, const std::string& name, const std::string& id ); + inline TabDescription ( LayoutDescription*, std::string name, std::string id ); void addWidget ( WidgetDescription* ); - inline const std::string& getName () const; - inline const std::string& getId () const; + inline std::string getName () const; + inline std::string getId () const; inline const std::vector& getWidgets () const; private: LayoutDescription* _layout; @@ -125,14 +125,14 @@ namespace Cfg2 { // Inline Methods. - inline TabDescription::TabDescription ( LayoutDescription* layout, const std::string& name, const std::string& id ) + inline TabDescription::TabDescription ( LayoutDescription* layout, std::string name, std::string id ) : _layout(layout), _name(name), _id(id), _widgets() { } - inline const std::string& TabDescription::getName () const + inline std::string TabDescription::getName () const { return _name; } - inline const std::string& TabDescription::getId () const + inline std::string TabDescription::getId () const { return _id; } inline const std::vector& TabDescription::getWidgets () const @@ -148,27 +148,27 @@ namespace Cfg2 { inline static size_t getTimestamp (); public: inline LayoutDescription ( Configuration* ); - WidgetDescription* getWidget ( const std::string& id ); + WidgetDescription* getWidget ( std::string id ); void addWidgetLookup ( WidgetDescription* ); inline void addTab ( TabDescription* ); - inline void addTab ( const std::string& tabName, const std::string& id ); + inline void addTab ( std::string tabName, std::string id ); inline TabDescription* getBackTab (); - TabDescription* getTab ( const std::string& tabName, const std::string& id="no_id" ); + TabDescription* getTab ( std::string tabName, std::string id="no_id" ); inline const std::vector& getTabs () const; - void addRule ( const std::string& tabName ); - void addTitle ( const std::string& tabName - , const std::string& title ); - void addSection ( const std::string& tabName - , const std::string& section + void addRule ( std::string tabName ); + void addTitle ( std::string tabName + , std::string title ); + void addSection ( std::string tabName + , std::string section , int column=0 ); - void addParameter ( const std::string& tabName - , const std::string& id - , const std::string& label - , int column=0 - , int span =1 - , unsigned int flags =0 ); - ConfigurationWidget* buildWidget ( unsigned int flags ); - void writeToStream ( std::ostream&, const std::string& ) const; + void addParameter ( std::string tabName + , std::string id + , std::string label + , int column=0 + , int span =1 + , unsigned int flags =0 ); + ConfigurationWidget* buildWidget ( unsigned int flags ); + void writeToStream ( std::ostream&, std::string ) const; private: static size_t _timestamp; Configuration* _configuration; @@ -187,7 +187,7 @@ namespace Cfg2 { inline void LayoutDescription::addTab ( TabDescription* tab ) { _tabs.push_back(tab); } - inline void LayoutDescription::addTab ( const std::string& tabName, const std::string& id ) + inline void LayoutDescription::addTab ( std::string tabName, std::string id ) { addTab ( new TabDescription(this,tabName,id) ); } inline TabDescription* LayoutDescription::getBackTab () diff --git a/hurricane/src/configuration/hurricane/configuration/LogWidget.h b/hurricane/src/configuration/hurricane/configuration/LogWidget.h index b8425987..0b09edab 100644 --- a/hurricane/src/configuration/hurricane/configuration/LogWidget.h +++ b/hurricane/src/configuration/hurricane/configuration/LogWidget.h @@ -21,7 +21,7 @@ class QLabel; class QPushButton; -namespace Cfg2 { +namespace Cfg { class LogWidget : public QDialog { diff --git a/hurricane/src/configuration/hurricane/configuration/Parameter.h b/hurricane/src/configuration/hurricane/configuration/Parameter.h index 61d67df7..44ee30b7 100644 --- a/hurricane/src/configuration/hurricane/configuration/Parameter.h +++ b/hurricane/src/configuration/hurricane/configuration/Parameter.h @@ -20,9 +20,10 @@ #include #include #include +#include -namespace Cfg2 { +namespace Cfg { class Parameter { @@ -56,7 +57,7 @@ namespace Cfg2 { public: class EnumValue { public: - inline EnumValue ( const std::string&, int ); + inline EnumValue ( std::string, int ); public: std::string _label; int _value; @@ -64,16 +65,16 @@ namespace Cfg2 { public: static std::string typeToString ( Type ); static std::string priorityToString ( Priority ); - static Type stringToType ( const std::string& ); - static Priority stringToPriority ( const std::string& ); + static Type stringToType ( std::string ); + static Priority stringToPriority ( std::string ); static Priority pushDefaultPriority ( Priority ); static Priority popDefaultPriority (); static Priority getDefaultPriority (); public: - Parameter ( const std::string& id - , Type type - , const std::string& value - , Priority priority=UseDefault ); + Parameter ( std::string id + , Type type + , std::string value + , Priority priority=UseDefault ); inline bool isFile () const; inline bool isPath () const; inline bool hasMin () const; @@ -81,7 +82,7 @@ namespace Cfg2 { inline bool hasNeedRestart () const; inline bool hasMustExist () const; inline bool hasFlags ( int mask ) const; - inline const std::string& getId () const; + inline std::string getId () const; inline Type getType () const; inline Priority getPriority () const; inline const std::vector& @@ -95,19 +96,19 @@ namespace Cfg2 { inline double getMaxDouble () const; inline bool checkValue ( int ) const; inline bool checkValue ( double ) const; - inline const std::string& asString () const; + inline std::string asString () const; std::string asPercentageString () const; bool asBool () const; int asInt () const; double asDouble () const; double asPercentage () const; - inline void addValue ( const std::string&, int ); - inline void addSlave ( const std::string& ); + inline void addValue ( std::string, int ); + inline void addSlave ( std::string ); inline void setPriority ( Priority ); inline void setFlags ( int mask ); inline void unsetFlags ( int mask ); - bool setRawString ( const std::string& , Priority priority=UseDefault ); - bool setString ( const std::string& + bool setRawString ( std::string , Priority priority=UseDefault ); + bool setString ( std::string , Priority priority=UseDefault , unsigned int flags =AllRequirements ); @@ -122,10 +123,11 @@ namespace Cfg2 { inline void registerCb ( void* tag, ParameterChangedCb_t ); inline void unregisterCb ( void* tag ); inline void valueChanged (); + inline std::string _getString () const; private: inline void _onValueChanged (); inline bool _updatePriority ( Priority ); - bool _doChange ( unsigned int flags, const std::string&, bool, int, double ); + bool _doChange ( unsigned int flags, std::string, bool, int, double ); private: // Attributes. static std::vector _defaultPriorities; @@ -151,7 +153,7 @@ namespace Cfg2 { inline bool Parameter::hasMax () const { return hasFlags(HasMax); }; inline bool Parameter::hasNeedRestart () const { return hasFlags(NeedRestart); }; inline bool Parameter::hasMustExist () const { return hasFlags(MustExist); }; - inline const std::string& Parameter::getId () const { return _id; } + inline std::string Parameter::getId () const { return _id; } inline Parameter::Type Parameter::getType () const { return _type; } inline Parameter::Priority Parameter::getPriority () const { return _priority; } inline int Parameter::getFlags () const { return _flags; } @@ -160,7 +162,7 @@ namespace Cfg2 { inline int Parameter::getMaxInt () const { return _maxInt; } inline double Parameter::getMinDouble () const { return _minDouble; } inline double Parameter::getMaxDouble () const { return _maxDouble; } - inline const std::string& Parameter::asString () const { return _value; } + inline std::string Parameter::asString () const { return _value; } inline void Parameter::setFlags ( int mask ) { _flags |= mask; } inline void Parameter::unsetFlags ( int mask ) { _flags &= ~mask; } inline void Parameter::setPriority ( Priority priority ) { _priority = priority; } @@ -186,9 +188,9 @@ namespace Cfg2 { inline const std::vector& Parameter::getValues () const { return _values; } inline const std::vector& Parameter::getSlaves () const { return _slaves; } - inline void Parameter::addSlave ( const std::string& id ) { _slaves.push_back ( id ); } + inline void Parameter::addSlave ( std::string id ) { _slaves.push_back ( id ); } - inline void Parameter::addValue ( const std::string& label, int value ) { + inline void Parameter::addValue ( std::string label, int value ) { if ( _type != Enumerate ) { std::cerr << "[ERROR] Cannot add item on parameter <" << _id << ">, not enumerated." << std::endl; @@ -197,7 +199,7 @@ namespace Cfg2 { _values.push_back ( EnumValue(label,value) ); } - inline Parameter::EnumValue::EnumValue ( const std::string& label, int value ) + inline Parameter::EnumValue::EnumValue ( std::string label, int value ) : _label(label), _value(value) { } inline void Parameter::registerCb ( void* tag, ParameterChangedCb_t cb ) @@ -224,4 +226,35 @@ namespace Cfg2 { { for ( size_t icb=0 ; icb<_callbacks.size() ; ++icb ) _callbacks[icb].second( this ); } + inline std::string Parameter::_getString () const + { + std::string s = ""; + return s; + } + + } // Cfg namespace. + + +template<> inline std::string getString ( const Cfg::Parameter* p ) +{ return p->_getString(); } + + +template<> inline std::string getString ( Cfg::Parameter* p ) +{ return p->_getString(); } + + +inline std::ostream& operator<< ( std::ostream& o, const Cfg::Parameter* p ) +{ + if (not p) return o << "NULL [const Parameter*]"; + return o << "&" << getString(p); +} + + +inline std::ostream& operator<< ( std::ostream& o, Cfg::Parameter* p ) +{ + if (not p) return o << "NULL [const Parameter*]"; + return o << "&" << getString(p); +} diff --git a/hurricane/src/configuration/hurricane/configuration/ParameterWidget.h b/hurricane/src/configuration/hurricane/configuration/ParameterWidget.h index 5f35d751..3414da5b 100644 --- a/hurricane/src/configuration/hurricane/configuration/ParameterWidget.h +++ b/hurricane/src/configuration/hurricane/configuration/ParameterWidget.h @@ -20,7 +20,7 @@ class QLabel; -namespace Cfg2 { +namespace Cfg { class Parameter; class ConfTabWidget; @@ -33,7 +33,7 @@ namespace Cfg2 { class ParameterWidget : public QObject { Q_OBJECT; public: - enum Flags { UseSpinBox=0x1, IsFileName=0x2, IsPathName=0x4 }; + enum Flags { UseSpinBox=0x1000, IsFileName=0x2000, IsPathName=0x4000 }; public: ParameterWidget ( ConfTabWidget* parent, Parameter*, const std::string& label, int flags ); virtual ~ParameterWidget (); diff --git a/hurricane/src/configuration/hurricane/configuration/ProxyProperty.h b/hurricane/src/configuration/hurricane/configuration/ProxyProperty.h new file mode 100644 index 00000000..6953d32a --- /dev/null +++ b/hurricane/src/configuration/hurricane/configuration/ProxyProperty.h @@ -0,0 +1,67 @@ + +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) UPMC 2008-2018, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | I s o b a r - Hurricane / Python Interface | +// | | +// | Authors : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/isobar/ProxyProperty.h" | +// +-----------------------------------------------------------------+ + + +#pragma once +#include "hurricane/DBo.h" +#include "hurricane/Property.h" + + +namespace Isobar3 { + +using namespace Hurricane; + + +// ------------------------------------------------------------------- +// Class : "::ProxyProperty" + + class ProxyProperty : public Property { + public: + static const Name& getPropertyName () { return _name; } + static size_t getOffset () { return _offset; }; + static void setOffset ( size_t offset ); + static ProxyProperty* create ( void* shadow=NULL ); + public: + DBo* getOwner () const { return _owner; }; + void* getShadow () const { return _shadow; }; + void* getShadowMember () const { return (void*)((size_t)_shadow+_offset); }; + template + DBoT* getAsType () { return dynamic_cast(_owner); }; + public: + virtual Name getName () const { return getPropertyName(); } + virtual void onCapturedBy ( DBo* owner ); + virtual void onReleasedBy ( DBo* owner ); + virtual void onNotOwned (); + public: + virtual string _getString () const; + virtual Record* _getRecord () const; + virtual string _getTypeName () const { return _TName("Isobar3::ProxyProperty"); }; + + protected: + static Name _name; + static size_t _offset; + DBo* _owner; + void* _shadow; + protected: + ProxyProperty ( void* _shadow ); + virtual void _preDestroy (); + private: + ProxyProperty ( const ProxyProperty& ); + ProxyProperty& operator= ( const ProxyProperty& ); + }; + + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/hurricane/configuration/PyBasicLayer.h b/hurricane/src/configuration/hurricane/configuration/PyBasicLayer.h new file mode 100644 index 00000000..47efb89a --- /dev/null +++ b/hurricane/src/configuration/hurricane/configuration/PyBasicLayer.h @@ -0,0 +1,48 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | C o n f i g u r a t i o n D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/configuration/PyBasicLayer.h" | +// +-----------------------------------------------------------------+ + + +#pragma once +#include "hurricane/configuration/PyTypeManager.h" +#include "hurricane/configuration/PyMaterial.h" +#include "hurricane/BasicLayer.h" + + +namespace Isobar3 { + + +extern "C" { + + + extern PyMethodDef PyBasicLayer_Methods[]; + + +} // extern "C". + + + template<> + inline void pyTypePostInit ( PyTypeObject* typeObject ) + { + PyTypeManagerNonDBo::create( (PyObject*)typeObject + , PyMaterial_Methods + , NULL + , PyTypeManager::NoCppDelete + , "Material" + , PyMaterial_NEW + , PyMaterial_Init + ); + } + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/hurricane/configuration/PyBox.h b/hurricane/src/configuration/hurricane/configuration/PyBox.h new file mode 100644 index 00000000..9a7eedd3 --- /dev/null +++ b/hurricane/src/configuration/hurricane/configuration/PyBox.h @@ -0,0 +1,35 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | C o n f i g u r a t i o n D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/configuration/PyBox.h" | +// +-----------------------------------------------------------------+ + + +#pragma once +#include "hurricane/configuration/PyTypeManager.h" +#include "hurricane/Box.h" + + +namespace Isobar3 { + + +extern "C" { + + + extern PyMethodDef PyBox_Methods[]; + extern PyObject* PyBox_NEW ( PyTypeObject* pyType, PyObject* args, PyObject* kwargs ); + extern int PyBox_Init ( PyObject* self, PyObject* args, PyObject* kwargs ); + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/hurricane/configuration/PyCollection.h b/hurricane/src/configuration/hurricane/configuration/PyCollection.h new file mode 100644 index 00000000..723413a0 --- /dev/null +++ b/hurricane/src/configuration/hurricane/configuration/PyCollection.h @@ -0,0 +1,225 @@ + +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Universite 2021-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | I s o b a r - Hurricane / Python Interface | +// | | +// | Authors : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/isobar/PyCollection.h" | +// +-----------------------------------------------------------------+ + + +#pragma once + +namespace Isobar3 { + + +// ------------------------------------------------------------------- +// PyTypeObject & PyObject for Locator objects. + + + template< typename CppT > + class PyTypeManagerLocator : public PyTypeManagerVTrunk< typename Hurricane::Locator > { + public: + using PyTypeManager::_getTypeObject; + using PyTypeManager::_setMethods; + public: + inline PyTypeManagerLocator ( uint64_t flags ); + virtual ~PyTypeManagerLocator (); + public: + static PyTypeManagerLocator* create ( PyObject* module, uint64_t flags ); + virtual PyObject* _getTpIter ( PyObject* ); + virtual PyObject* _getTpIterNext ( PyObject* ); + virtual void _getTpDeAlloc ( PyObject* ); + virtual long _getTpHash ( PyObject* ); + private: + PyMethodDef* _noMethods; + }; + + + template< typename CppT > + inline PyTypeManagerLocator::PyTypeManagerLocator ( uint64_t flags ) + : PyTypeManagerVTrunk< typename Hurricane::Locator >(NULL,NULL,flags|PyTypeManager::IsIterator) + , _noMethods( NULL ) + { + _getTypeObject()->tp_basicsize = sizeof(PyTwoVoid); + _noMethods = new PyMethodDef; + _noMethods[0].ml_name = NULL; + _noMethods[0].ml_meth = NULL; + _noMethods[0].ml_flags = 0; + _noMethods[0].ml_doc = NULL; + _setMethods( _noMethods ); + } + + + template< typename CppT > + PyTypeManagerLocator::~PyTypeManagerLocator () { } + + + template< typename CppT > + void PyTypeManagerLocator::_getTpDeAlloc ( PyObject* self ) + { + Py_XDECREF( object2(self) ); + typename Hurricane::Locator* plocator = NULL; + pyToC( (PyObject*)self, &plocator ); + delete plocator; + PyObject_DEL( self ); + } + + + template< typename CppT > + PyObject* PyTypeManagerLocator::_getTpIter ( PyObject* self ) + { + return PyObject_SelfIter( self ); + } + + + template< typename CppT > + PyObject* PyTypeManagerLocator::_getTpIterNext ( PyObject* self ) + { + typename Hurricane::Locator * plocator = NULL; + typename Hurricane::Collection* pcollection = NULL; + pyToC( self, &plocator ); + pyToC( (PyObject*)asIPtr(self)->_object2, &pcollection ); + + //std::cerr << "Collection::Iterator::_getTpIterNext() on " << (void*)pcollection << std::endl; + if (plocator and plocator->isValid()) { + PyObject* item = cToPy( plocator->getElement() ); + plocator->progress(); + return item; + } + return NULL; + } + + + template< typename CppT > + long PyTypeManagerLocator::_getTpHash ( PyObject* self ) + { return (long)object1(self); } + + + template< typename CppT > + PyTypeManagerLocator* PyTypeManagerLocator::create ( PyObject* module, uint64_t flags ) + { + // cerr << "PyTypeManagerCollection<" + // << ::Hurricane::demangle(typeid(typename Hurricane::Locator)) << ">::create()" << endl; + PyTypeManagerLocator* manager = new PyTypeManagerLocator( flags ); + + string elementName = ::Hurricane::demangle(typeid(CppT)); + size_t cppScope = elementName.find_last_of( "::" ); + if (cppScope != std::string::npos) elementName = elementName.substr( cppScope+1 ); + + manager->_setTypeNames( "LocatorOf" + elementName ); + manager->_setupPyType(); + PyTypeObject* ob_type = manager->_getTypeObject(); + ob_type->tp_iter = PyObject_SelfIter; + ob_type->tp_iternext = (iternextfunc)&::Isobar3::_tpIterNext; + + PyTypeManager::add< typename Hurricane::Locator >( module, manager ); + + return manager; + } + + +// ------------------------------------------------------------------- +// PyTypeObject & PyObject for vector objects. + + + template< typename CppT > + class PyTypeManagerCollection : public PyTypeManagerVTrunk< Hurricane::Collection > { + public: + using PyTypeManager::_getTypeObject; + using PyTypeManager::_setMethods; + public: + inline PyTypeManagerCollection ( uint64_t flags ); + virtual ~PyTypeManagerCollection (); + public: + static PyTypeManagerCollection* create ( PyObject* module, uint64_t flags ); + virtual void _getTpDeAlloc ( PyObject* ); + virtual long _getTpHash ( PyObject* ); + virtual PyObject* _getTpIter ( PyObject* ); + private: + PyMethodDef* _noMethods; + }; + + + template< typename CppT > + inline PyTypeManagerCollection::PyTypeManagerCollection ( uint64_t flags ) + : PyTypeManagerVTrunk< Hurricane::Collection >(NULL,NULL,flags) + , _noMethods( NULL ) + { + _noMethods = new PyMethodDef; + _noMethods[0].ml_name = NULL; + _noMethods[0].ml_meth = NULL; + _noMethods[0].ml_flags = 0; + _noMethods[0].ml_doc = NULL; + _setMethods( _noMethods ); + } + + + template< typename CppT > + PyTypeManagerCollection::~PyTypeManagerCollection () { } + + + template< typename CppT > + void PyTypeManagerCollection::_getTpDeAlloc ( PyObject* self ) + { + Hurricane::Collection* pcollection = NULL; + pyToC( self, &pcollection ); + //std::cerr << "PyCollection::_getTpDeAlloc() on " << (void*)pcollection << std::endl; + delete pcollection; + PyObject_DEL( self ); + } + + + template< typename CppT > + long PyTypeManagerCollection::_getTpHash ( PyObject *self ) + { return (long)object1(self); } + + + template< typename CppT > + PyObject* PyTypeManagerCollection::_getTpIter ( PyObject* self ) + { + Hurricane::Collection* pcollection = NULL; + pyToC( self, &pcollection ); + PyTwoVoid* pyLocator = (PyTwoVoid*)cToPy( pcollection->getLocator() ); + pyLocator->_object2 = self; + Py_INCREF( self ); + //std::cerr << "Collection::_getTpIter() on " << (void*)pcollection << std::endl; + return (PyObject*)pyLocator; + } + + + template< typename CppT > + PyTypeManagerCollection* PyTypeManagerCollection::create ( PyObject* module, uint64_t flags ) + { + // cerr << "PyTypeManagerCollection<" + // << ::Hurricane::demangle(typeid(Hurricane::Collection)) << ">::create()" << endl; + PyTypeManagerCollection* manager = new PyTypeManagerCollection( flags ); + + string elementName = ::Hurricane::demangle(typeid(CppT)); + size_t cppScope = elementName.find_last_of( "::" ); + if (cppScope != std::string::npos) elementName = elementName.substr( cppScope+1 ); + + manager->_setTypeNames( "CollectionOf" + elementName ); + manager->_setupPyType(); + PyTypeObject* ob_type = manager->_getTypeObject(); + ob_type->tp_iter = (getiterfunc)&::Isobar3::_tpIter; + + std::cerr << "Add to manager: <" + << ::Hurricane::demangle(typeid( Hurricane::Collection )) << ">" << std::endl; + PyTypeManager::add< Hurricane::Collection > + ( module, manager, typeid(Hurricane::Collection).hash_code() ); + PyTypeManagerLocator::create( module, flags ); + + return manager; + } + + +} // Isobar3 namespace. + diff --git a/hurricane/src/configuration/hurricane/configuration/PyConfiguration.h b/hurricane/src/configuration/hurricane/configuration/PyConfiguration.h index ae14dff5..57961b6c 100644 --- a/hurricane/src/configuration/hurricane/configuration/PyConfiguration.h +++ b/hurricane/src/configuration/hurricane/configuration/PyConfiguration.h @@ -15,11 +15,11 @@ #pragma once -#include "hurricane/configuration/PyHurricane2.h" +#include "hurricane/configuration/PyTypeManager.h" #include "hurricane/configuration/Configuration.h" -namespace Cfg2 { +namespace Cfg { extern "C" { @@ -28,19 +28,8 @@ extern "C" { // ------------------------------------------------------------------- // Functions & Types exported to "PyConfiguration.cpp". - extern PyTypeObject PyTypeConfiguration; - extern PyMethodDef PyConfiguration_Methods[]; - - -// extern PyObject* PyConfiguration_create ( PyObject* self, PyObject* args ); -// extern PyObject* PyConfiguration_Link ( Hurricane::Configuration* object ); -// extern void PyConfiguration_LinkPyType (); -// extern void PyConfiguration_postModuleInit (); - - -// #define IsPyConfiguration(v) ( (v)->ob_type == &PyTypeConfiguration ) -// #define PYCELLVIEWER(v) ( (PyConfiguration*)(v) ) -// #define PYCELLVIEWER_O(v) ( PYCELLVIEWER(v)->_object ) + extern PyMethodDef PyConfiguration_Methods[]; + extern PyGetSetDef PyConfiguration_Getsets[]; } // extern "C". diff --git a/hurricane/src/configuration/hurricane/configuration/PyDataBase.h b/hurricane/src/configuration/hurricane/configuration/PyDataBase.h new file mode 100644 index 00000000..b735e6ee --- /dev/null +++ b/hurricane/src/configuration/hurricane/configuration/PyDataBase.h @@ -0,0 +1,66 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | C o n f i g u r a t i o n D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/configuration/PyDataBase.h" | +// +-----------------------------------------------------------------+ + + +#pragma once +#include "hurricane/configuration/PyTypeManager.h" +#include "hurricane/DataBase.h" + + +namespace Isobar3 { + + +extern "C" { + + + extern PyMethodDef PyDataBase_Methods[]; + extern PyMethodDef PyDataBaseFlags_Methods[]; + + +} // extern "C". + +} // Isobar3 namespace. + + +template<> +inline PyObject* cToPy( Hurricane::DataBase::Flags flags ) +{ return Py_BuildValue( "i", flags ); } + + +namespace Isobar3 { + + + template<> + inline void pyTypePostInit ( PyTypeObject* typeObject ) + { + PyTypeManagerNonDBo::create( (PyObject*)typeObject + , PyDataBaseFlags_Methods + , NULL + , PyTypeManager::NoCppDelete + , "Flags" ); + } + + + template<> + inline void pyTypePostInit ( PyTypeObject* typeObject ) + { + // Parameter::Flags enum. + addConstant( typeObject, "NoFlags" , Hurricane::DataBase::NoFlags ); + addConstant( typeObject, "CreateLib" , Hurricane::DataBase::CreateLib ); + addConstant( typeObject, "WarnCreateLib", Hurricane::DataBase::WarnCreateLib ); + } + + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/hurricane/configuration/PyDbU.h b/hurricane/src/configuration/hurricane/configuration/PyDbU.h new file mode 100644 index 00000000..8362bcf9 --- /dev/null +++ b/hurricane/src/configuration/hurricane/configuration/PyDbU.h @@ -0,0 +1,78 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | C o n f i g u r a t i o n D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/configuration/PyDbU.h" | +// +-----------------------------------------------------------------+ + + +#pragma once +#include "hurricane/configuration/PyTypeManager.h" +#include "hurricane/DbU.h" + + +namespace Isobar3 { + + +extern "C" { + + + extern PyMethodDef PyDbU_Methods[]; + + +} // extern "C". + + + template<> + inline void pyTypePostInit ( PyTypeObject* typeObject ) + { + addConstant( typeObject, "SnapModeInferior" , Hurricane::DbU::Inferior ); + addConstant( typeObject, "SnapModeSuperior" , Hurricane::DbU::Superior ); + addConstant( typeObject, "SnapModeNearest" , Hurricane::DbU::Nearest ); + addConstant( typeObject, "UnitPowerPico" , Hurricane::DbU::Pico ); + addConstant( typeObject, "UnitPowerNano" , Hurricane::DbU::Nano ); + addConstant( typeObject, "UnitPowerMicro" , Hurricane::DbU::Micro ); + addConstant( typeObject, "UnitPowerMilli" , Hurricane::DbU::Milli ); + addConstant( typeObject, "UnitPowerUnity" , Hurricane::DbU::Unity ); + addConstant( typeObject, "UnitPowerKilo" , Hurricane::DbU::Kilo ); + addConstant( typeObject, "StringModeDb" , Hurricane::DbU::Db ); + addConstant( typeObject, "StringModeGrid" , Hurricane::DbU::Grid ); + addConstant( typeObject, "StringModeSymbolic" , Hurricane::DbU::Symbolic ); + addConstant( typeObject, "StringModePhysical" , Hurricane::DbU::Physical ); + addConstant( typeObject, "StringModeSmartTrucate", Hurricane::DbU::SmartTruncate ); + } + +} // Isobar3 namespace. + + +inline bool pyToC ( PyObject* pyArg, Hurricane::DbU::UnitPower* arg ) +{ + if (not PyLong_Check(pyArg)) return false; + long power = PyLong_AsLong( pyArg ); + switch ( power ) { + case Hurricane::DbU::Pico: + case Hurricane::DbU::Nano: + case Hurricane::DbU::Micro: + case Hurricane::DbU::Milli: + case Hurricane::DbU::Unity: + case Hurricane::DbU::Kilo: + *arg = (Hurricane::DbU::UnitPower)power; + break; + default: + return false; + } + return true; +} + + +template<> +inline PyObject* cToPy( Hurricane::DbU::UnitPower power ) +{ return Py_BuildValue( "i", power ); } diff --git a/hurricane/src/configuration/hurricane/configuration/PyDiffusionLayer.h b/hurricane/src/configuration/hurricane/configuration/PyDiffusionLayer.h new file mode 100644 index 00000000..b58aed61 --- /dev/null +++ b/hurricane/src/configuration/hurricane/configuration/PyDiffusionLayer.h @@ -0,0 +1,32 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | C o n f i g u r a t i o n D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/configuration/PyDiffusionLayer.h" | +// +-----------------------------------------------------------------+ + + +#pragma once +#include "hurricane/configuration/PyTypeManager.h" +#include "hurricane/DiffusionLayer.h" + + +namespace Isobar3 { + +extern "C" { + + + extern PyMethodDef PyDiffusionLayer_Methods[]; + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/hurricane/configuration/PyHurricane2.h b/hurricane/src/configuration/hurricane/configuration/PyHurricane2.h deleted file mode 100644 index 8022263c..00000000 --- a/hurricane/src/configuration/hurricane/configuration/PyHurricane2.h +++ /dev/null @@ -1,479 +0,0 @@ -// -*- C++ -*- -// -// This file is part of the Coriolis Software. -// Copyright (c) UPMC 2008-2020, All Rights Reserved -// -// +-----------------------------------------------------------------+ -// | C O R I O L I S | -// | I s o b a r - Hurricane / Python Interface | -// | | -// | Authors : Jean-Paul CHAPUT | -// | Damien DUPUIS | -// | E-mail : Jean-Paul.Chaput@lip6.fr | -// | =============================================================== | -// | C++ Header : "./hurricane/isobar/PyHurricane.h" | -// +-----------------------------------------------------------------+ - - -#pragma once - -// Enable Python debugging. -// #define DEBUG 1 - -#include "Python.h" -#include -#include -#include -#include -#include -#include -#include -#include "hurricane/Bug.h" -#include "hurricane/Error.h" -#include "hurricane/Warning.h" -#include "hurricane/DbU.h" -#include "hurricane/isobar/ProxyProperty.h" - -namespace Isobar2 { - - - using namespace std; - using Hurricane::demangle; - using Hurricane::DbU; - using Hurricane::Bug; - using Hurricane::Error; - using Hurricane::Warning; - using Hurricane::Exception; - using Hurricane::DBo; - - - extern "C" { - - extern PyObject* ConstructorError; - extern PyObject* ProxyError; - extern PyObject* HurricaneError; - extern PyObject* HurricaneWarning; - - } - - - inline int PyAny_AsInt ( PyObject* object ) - { - long value = 0; - if (PyObject_IsInstance(object,(PyObject*)&PyInt_Type )) value = PyInt_AsLong ( object ); - else if (PyObject_IsInstance(object,(PyObject*)&PyLong_Type)) value = PyLong_AsLong( object ); - return (int)value; - } - - - inline uint32_t PyAny_AsUInt32 ( PyObject* object ) - { - int64_t value = 0; - if (PyObject_IsInstance(object,(PyObject*)&PyInt_Type )) value = PyInt_AsLong ( object ); - else if (PyObject_IsInstance(object,(PyObject*)&PyLong_Type)) value = PyLong_AsLong( object ); - return (uint32_t)value; - } - - - template< typename T = DbU::Unit, typename enable_if< is_same::value, T >::type = 0 > - inline T PyAny_AsLong ( PyObject* object ) - { - T value = 0; - if (PyObject_IsInstance(object,(PyObject*)&PyInt_Type )) value = PyInt_AsLong ( object ); - else if (PyObject_IsInstance(object,(PyObject*)&PyLong_Type)) value = PyLong_AsLong( object ); - return value; - } - - - template< typename T = DbU::Unit, typename enable_if< is_same::value, T >::type = 0 > - inline T PyAny_AsLong ( PyObject* object ) - { - T value = 0; - if (PyObject_IsInstance(object,(PyObject*)&PyInt_Type )) value = PyInt_AsLong ( object ); - else if (PyObject_IsInstance(object,(PyObject*)&PyLong_Type)) value = PyLong_AsLongLong( object ); - - //if (value > numeric_limits::max()) { - // throw Error( "PyAny_AsLong(): Suspiciously big int %s, db:%lli" - // , DbU::getValueString(value).c_str(), value - // ); - //} - return value; - } - - - template< typename T = DbU::Unit, typename enable_if< is_same::value, T >::type = 0 > - inline PyObject* PyDbU_FromLong ( T unit ) { return PyLong_FromLong( unit ); } - - - template< typename T = DbU::Unit, typename enable_if< is_same::value, T >::type = 0 > - inline PyObject* PyDbU_FromLong ( T unit ) { return PyLong_FromLongLong( unit ); } - - - template< typename T , typename enable_if::value,int>::type = 0 > - static int getPyHash ( T* cppObject ) { return cppObject->getId(); } - - - template< typename T , typename enable_if::value,int>::type = 0 > - static int getPyHash ( T* cppObject ) { return (long)cppObject; } - - - typedef struct { - PyObject_HEAD - void* _object; - } PyVoidPointer; - - - - class PyTypeManager { - public: - static const uint64_t NoFlags = 0; - static const uint64_t IsDBo = (1 << 0); - public: - inline PyTypeManager ( PyMethodDef*, uint64_t flags ); - virtual ~PyTypeManager (); - public: - inline bool _isDBo () const; - inline const std::string& _getCppTypeName () const; - inline const std::string& _getPyTypeName () const; - inline PyTypeObject* _getTypeObject (); - inline PyMethodDef* _getMethods (); - void _setTypeNames ( std::string className, std::string nspace ); - virtual void _addToModule ( PyObject* ) { }; - virtual void _deAlloc ( PyVoidPointer* ) { }; - public: - static inline PyTypeManager* get ( PyTypeObject* ); - template static inline PyTypeManager* _get (); - template static inline PyObject* link ( CppT* ); - template static inline void addToModule ( PyObject* ); - template static PyTypeManager* add ( PyObject*, PyMethodDef*, uint64_t flags ); - private: - uint64_t _flags; - std::string _pyTypeName; - std::string _cppTypeName; - PyTypeObject _typeObject; - PyMethodDef* _methods; - private: - static std::map< std::type_index, PyTypeManager* > _managerByCppTypes; - static std::map< PyTypeObject* , PyTypeManager* > _managerByPyTypes; - }; - - - template - class PyTypeManagerAny : public PyTypeManager { - public: - inline PyTypeManagerAny ( PyMethodDef*, uint64_t flags ); - virtual ~PyTypeManagerAny (); - public: - static inline PyTypeManagerAny* create ( PyMethodDef*, uint64_t flags, std::string nspace="" ); - inline PyObject* _link ( CppT* ); - virtual void _addToModule ( PyObject* ); - }; - - - template - class PyTypeManagerDBo : public PyTypeManagerAny { - public: - inline PyTypeManagerDBo ( PyMethodDef*, uint64_t flags ); - virtual ~PyTypeManagerDBo (); - public: - virtual void _deAlloc ( PyVoidPointer* ); - }; - - - template - class PyTypeManagerNonDBo : public PyTypeManagerAny { - public: - inline PyTypeManagerNonDBo ( PyMethodDef*, uint64_t flags ); - virtual ~PyTypeManagerNonDBo (); - public: - virtual void _deAlloc ( PyVoidPointer* ); - }; - - - inline PyTypeManager* PyTypeManager::get ( PyTypeObject* obType ) - {return _managerByPyTypes[ obType ]; } - - - template inline PyTypeManager* PyTypeManager::_get () - { return _managerByCppTypes[ std::type_index(typeid(CppT)) ]; } - - - inline PyTypeManager::PyTypeManager ( PyMethodDef *methods, uint64_t flags ) - : _flags (flags) - , _pyTypeName () - , _cppTypeName() - , _typeObject({ PyObject_HEAD_INIT(&PyType_Type) - 0 /* ob_size. */ - , NULL /* tp_name. */ - , sizeof(PyVoidPointer) /* tp_basicsize. */ - , 0 /* tp_itemsize. */ - /* methods. */ - , 0 /* tp_dealloc. */ - , 0 /* tp_print. */ - , 0 /* tp_getattr. */ - , 0 /* tp_setattr. */ - , 0 /* tp_compare. */ - , 0 /* tp_repr. */ - , 0 /* tp_as_number. */ - , 0 /* tp_as_sequence. */ - , 0 /* tp_as_mapping. */ - , 0 /* tp_hash. */ - , 0 /* tp_call. */ - , 0 /* tp_str */ - , 0 /* tp_getattro. */ - , 0 /* tp_setattro. */ - , 0 /* tp_as_buffer. */ - , Py_TPFLAGS_DEFAULT - | Py_TPFLAGS_BASETYPE /* tp_flags. */ - , "#SELF_TYPE objects" /* tp_doc. */ - }) - , _methods (methods) - { } - - - inline bool PyTypeManager::_isDBo () const - { return _flags & IsDBo; } - - - inline const std::string& PyTypeManager::_getCppTypeName () const - { return _cppTypeName; } - - - inline const std::string& PyTypeManager::_getPyTypeName () const - { return _pyTypeName; } - - - inline PyTypeObject* PyTypeManager::_getTypeObject () - { return &_typeObject; } - - - inline PyMethodDef* PyTypeManager::_getMethods () - { return _methods; } - - - template< typename CppT > - inline PyObject* PyTypeManager::link ( CppT* object ) - { return static_cast< PyTypeManagerAny* >(_get())->_link( object ); } - - - template< typename CppT > - inline void PyTypeManager::addToModule ( PyObject* module ) - { _get()->_addToModule( module ); } - - - template< typename CppT > - PyTypeManager* PyTypeManager::add ( PyObject* module, PyMethodDef* methods, uint64_t flags ) - { - PyTypeManagerAny* manager = PyTypeManagerAny::create( methods, flags ); - _managerByCppTypes[ std::type_index(typeid(CppT)) ] = manager; - _managerByPyTypes [ manager->_getTypeObject() ] = manager; - manager->_addToModule( module ); - return manager; - } - - extern "C" { - - extern void _deAlloc ( PyVoidPointer* ); - - } - - - template< typename CppT > - inline PyTypeManagerAny::PyTypeManagerAny ( PyMethodDef* methods, uint64_t flags ) - : PyTypeManager(methods,flags) - { } - - - template< typename CppT > - PyTypeManagerAny::~PyTypeManagerAny () { } - - - template< typename CppT > - inline PyTypeManagerAny* PyTypeManagerAny::create ( PyMethodDef* methods, uint64_t flags, std::string nspace ) - { - if (std::is_base_of::value) flags |= PyTypeManager::IsDBo; - - PyTypeManagerAny* manager = NULL; - if (flags & PyTypeManager::IsDBo) manager = new PyTypeManagerDBo ( methods, flags ); - else manager = new PyTypeManagerNonDBo( methods, flags ); - - manager->_setTypeNames( demangle(typeid(CppT)), nspace ); - - PyTypeObject* ob_type = manager->_getTypeObject(); - ob_type->tp_name = manager->_getPyTypeName().c_str(); - ob_type->tp_dealloc = (destructor)&::Isobar2::_deAlloc; - ob_type->tp_methods = manager->_getMethods(); - - return manager; - } - - - template< typename CppT > - void PyTypeManagerAny::_addToModule ( PyObject* module ) - { - if (PyType_Ready(_getTypeObject()) < 0) { - cerr << "[ERROR] Failed to initialize <" << _getPyTypeName() << ">." << endl; - return; - } - - Py_INCREF( _getTypeObject() ); - PyModule_AddObject( module, _getCppTypeName().c_str(), (PyObject*)_getTypeObject() ); - } - - - template< typename CppT > - PyObject* PyTypeManagerAny::_link ( CppT* object ) - { - if (not object) Py_RETURN_NONE; - - PyVoidPointer* pyObject = NULL; - pyObject = PyObject_NEW( PyVoidPointer, _getTypeObject() ); - if (pyObject == NULL) return NULL; - - pyObject->_object = object; - cdebug_log(20,0) << _getPyTypeName() << "_Link(" << (void*)pyObject << ") " - << (void*)object << ":" << object << endl; - - return (PyObject*)pyObject; - } - - - template< typename CppT > - inline PyTypeManagerDBo::PyTypeManagerDBo ( PyMethodDef* methods, uint64_t flags ) - : PyTypeManagerAny(methods,flags) - { } - - - template< typename CppT > - PyTypeManagerDBo::~PyTypeManagerDBo () { } - - - template< typename CppT > - void PyTypeManagerDBo::_deAlloc ( PyVoidPointer* self ) - { - DBo* object = reinterpret_cast( self->_object ); - cdebug_log(20,0) << "PyTypeManager_DeAlloc(" << (void*)self << ") " - << (void*)(self->_object) << ":" << object << endl; - - Isobar::ProxyProperty* proxy = - static_cast( object->getProperty( Isobar::ProxyProperty::getPropertyName() ) ); - - if (not proxy) { - ostringstream message; - message << "deleting a Python object with no Proxy attached "; - PyErr_SetString( ProxyError, message.str().c_str() ); - } - object->remove ( proxy ); - - PyObject_DEL( self ); - } - - - template< typename CppT > - inline PyTypeManagerNonDBo::PyTypeManagerNonDBo ( PyMethodDef* methods, uint64_t flags ) - : PyTypeManagerAny(methods,flags) - { } - - - template< typename CppT > - PyTypeManagerNonDBo::~PyTypeManagerNonDBo () { } - - - template< typename CppT > - void PyTypeManagerNonDBo::_deAlloc ( PyVoidPointer* self ) - { - delete reinterpret_cast( self->_object ); - PyObject_DEL( self ); - } - - - typedef std::function PyStaticFunction; - - - class PyFunctionWrapper { - public: - inline PyFunctionWrapper (); - virtual PyObject* call ( PyObject* ) = 0; - }; - - inline PyFunctionWrapper::PyFunctionWrapper() { } - - - template< typename CppT > - class PyFunctionWrapperAny : public PyFunctionWrapper { - public: - inline PyFunctionWrapperAny( CppT* (*function)(void) ); - virtual PyObject* call ( PyObject* ); - private: - CppT* (*_function)(void); - }; - - - template< typename CppT > - inline PyFunctionWrapperAny::PyFunctionWrapperAny( CppT* (*function)(void) ) - : PyFunctionWrapper(), _function(function) - { } - - - template< typename CppT > - inline PyObject* PyFunctionWrapperAny::call ( PyObject* ) - { - std::cerr << "call called" << endl; - return PyTypeManager::link( _function() ); - } - - - inline PyObject* staticMethod ( const char* methodName - , PyFunctionWrapper* wrapper - , PyObject* args ) - { - cdebug_log(30,0) << methodName << endl; - std::cerr << "staticMethod called on " << methodName << endl; - PyObject* robject = NULL; - try { - robject = wrapper->call( args ); - } - catch ( const Warning& w ) { - std::string message = getString(w); - PyErr_Warn( HurricaneWarning, const_cast(message.c_str()) ); - } - catch ( const Error& e ) { - std::string message = getString(e); - if (not e.where().empty()) message += "n" + e.where(); - PyErr_SetString( HurricaneError, message.c_str() ); - } - catch ( const Bug& e ) { - std::string message = getString(e); - PyErr_SetString( HurricaneError, message.c_str() ); - } - catch ( const Exception& e ) { - std::string message = "Unknown Hurricane::Exception"; - PyErr_SetString( HurricaneError, message.c_str() ); - } - catch ( const std::exception& e ) { - std::string message = std::string(e.what()); - PyErr_SetString( HurricaneError, message.c_str() ); - } - catch ( ... ) { - std::string message = "Unmanaged exception, neither a Hurricane::Error nor a std::exception."; - PyErr_SetString( HurricaneError, message.c_str() ); - } - - return robject; - } - - -extern "C" { - - - extern PyObject* ConstructorError; - extern PyObject* ProxyError; - extern PyObject* HurricaneError; - extern PyObject* HurricaneWarning; - extern PyObject* CoriolisError; - - - -} // extern "C". - -} // Isobar namespace. diff --git a/hurricane/src/configuration/hurricane/configuration/PyHurricane3.h b/hurricane/src/configuration/hurricane/configuration/PyHurricane3.h new file mode 100644 index 00000000..a9c81d14 --- /dev/null +++ b/hurricane/src/configuration/hurricane/configuration/PyHurricane3.h @@ -0,0 +1,1655 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2008-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | I s o b a r - Hurricane / Python Interface | +// | | +// | Authors : Jean-Paul CHAPUT | +// | Damien DUPUIS | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/isobar/PyHurricane.h" | +// +-----------------------------------------------------------------+ + + +// Enable Python debugging. +// #define DEBUG 1 + +#pragma once +#include "Python.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include "hurricane/Bug.h" +#include "hurricane/Error.h" +#include "hurricane/Warning.h" +#include "hurricane/DbU.h" +#include "hurricane/configuration/ProxyProperty.h" + +namespace Isobar3 { + + + using namespace std; + using Hurricane::DbU; + using Hurricane::Bug; + using Hurricane::Error; + using Hurricane::Warning; + using Hurricane::Exception; + using Hurricane::DBo; + + +extern "C" { + + + extern PyObject* ConstructorError; + extern PyObject* ProxyError; + extern PyObject* HurricaneError; + extern PyObject* HurricaneWarning; + extern PyObject* CoriolisError; + + + typedef struct { + PyObject_HEAD + void* _object; + } PyVoidPointer; + + + typedef struct { + PyObject_HEAD + void* _object; // pointer to iterator. + PyVoidPointer* _container; + } PyIteratorPointer; + + + extern void _tpDeAlloc ( PyObject* ); + extern PyObject* _tpStr ( PyObject* ); + extern long _tpHash ( PyObject* ); + extern PyObject* _tpRichCompare ( PyObject*, PyObject*, int ); + extern Py_ssize_t _sqLength ( PyVoidPointer* ); + extern PyObject* _sqConcat ( PyVoidPointer* , PyVoidPointer* ); + extern PyObject* _sqRepeat ( PyVoidPointer* , Py_ssize_t ); + extern PyObject* _sqItem ( PyVoidPointer* , Py_ssize_t ); + extern int _sqContains ( PyObject*, PyObject* ); + extern Py_ssize_t _mpLength ( PyObject* ); + extern PyObject* _mpSubscript ( PyObject*, PyObject* ); + extern Py_ssize_t _mpLength ( PyObject* ); + extern PyObject* _tpIter ( PyObject* ); + extern PyObject* _tpIterNext ( PyObject* ); + + +} // "C" linkage. + + +// ------------------------------------------------------------------- +// PyTypeObject post-creation default hook. + + + inline void addConstant ( PyTypeObject* typeObject, std::string name, long value ) + { + PyObject* constant = PyLong_FromLong( value ); + PyDict_SetItemString( typeObject->tp_dict, name.c_str(), constant ); + Py_DECREF( constant ); + } + + + template< typename CppT > + inline void pyTypePostInit ( PyTypeObject* typeObject ) + { + //cerr << "pyTypePostInit() default for <" + // << demangle(typeid(CppT).name()) << ">." << endl; + } + + +// ------------------------------------------------------------------- +// Basic PyTypeObject & PyObject wrapper / manager. + + + inline PyVoidPointer* asVPtr ( PyObject* o ) { return reinterpret_cast(o); } + inline PyIteratorPointer* asIPtr ( PyObject* o ) { return reinterpret_cast(o); } + inline PyIteratorPointer* asIPtr ( PyVoidPointer* o ) { return reinterpret_cast(o); } + + + class PyTypeManager { + public: + typedef std::map ManagerByCppTypes; + typedef std::map ManagerByPyTypes; + public: + static const uint64_t NoFlags = 0; + static const uint64_t IsDBo = (1 << 0); + static const uint64_t IsIterator = (1 << 0); + static const uint64_t NoCppDelete = (1 << 1); + public: + inline PyTypeManager ( PyMethodDef*, PyGetSetDef*, uint64_t flags ); + virtual ~PyTypeManager (); + public: + inline bool _isDBo () const; + inline bool _isIterator () const; + inline std::string _getCppTypeName () const; + inline std::string _getPyTypeName () const; + inline PyTypeObject* _getTypeObject (); + inline PyMethodDef* _getMethods (); + inline PyGetSetDef* _getGetsets (); + void _setTypeNames ( std::string className ); + void _addToModule ( PyObject* ); + virtual void _getTpDeAlloc ( PyVoidPointer* ) = 0; + virtual PyObject* _getTpStr ( PyVoidPointer* ) = 0; + virtual long _getTpHash ( PyVoidPointer* ) = 0; + virtual PyObject* _getTpRichCompare ( PyObject*, PyObject*, int ); + virtual Py_ssize_t _getSqLength ( PyVoidPointer* ); + virtual PyObject* _getSqConcat ( PyVoidPointer*, PyVoidPointer* ); + virtual PyObject* _getSqRepeat ( PyVoidPointer*, Py_ssize_t ); + virtual PyObject* _getSqItem ( PyVoidPointer*, Py_ssize_t ); + virtual int _getSqContains ( PyObject*, PyObject* ); + virtual Py_ssize_t _getMpLength ( PyObject* ); + virtual PyObject* _getMpSubscript ( PyObject*, PyObject* ); + virtual PyObject* _getTpIter ( PyObject* ); + virtual PyObject* _getTpIterNext ( PyObject* ); + virtual void _setupPyType (); + inline void _setMethods ( PyMethodDef* ); + public: + static inline ManagerByCppTypes& getManagerByCppTypes (); + inline uint64_t flags () const; + static inline PyTypeManager* get ( PyTypeObject* ); + template static inline PyTypeManager* _get (); + template static inline PyObject* link ( CppT* ); + template static void add ( PyObject*, PyTypeManager* ); + private: + uint64_t _flags; + std::string _pyTypeName; + std::string _cppTypeName; + PyTypeObject _typeObject; + PyMethodDef* _methods; + PyGetSetDef* _getsets; + private: + static ManagerByCppTypes _managerByCppTypes; + static ManagerByPyTypes _managerByPyTypes; + }; + + + inline PyTypeManager* PyTypeManager::get ( PyTypeObject* obType ) + { + auto element = _managerByPyTypes.find( obType ); + if (element == _managerByPyTypes.end()) + throw Error( "PyTypeManager::get(PyTypeObject*): Unregistered type <%s>." + , obType->tp_name ); + return (*element).second; + } + + + template inline PyTypeManager* PyTypeManager::_get () + { + auto element = _managerByCppTypes.find( std::type_index(typeid(CppT)) ); + if (element == _managerByCppTypes.end()) + throw Error( "PyTypeManager::_get(): Unregistered type <%s>." + , demangle(typeid(CppT).name()).c_str() ); + return (*element).second; + } + + + inline PyTypeManager::PyTypeManager ( PyMethodDef *methods, PyGetSetDef* getsets, uint64_t flags ) + : _flags (flags) + , _pyTypeName () + , _cppTypeName() + , _typeObject { PyVarObject_HEAD_INIT(&PyType_Type,0) + .tp_name = NULL + , .tp_basicsize = sizeof(PyVoidPointer) + , .tp_itemsize = 0 + , .tp_dealloc = NULL + , .tp_print = NULL + , .tp_getattr = NULL + , .tp_setattr = NULL + , .tp_as_async = NULL + , .tp_repr = NULL + , .tp_as_number = NULL + , .tp_as_sequence = NULL + , .tp_as_mapping = NULL + , .tp_hash = NULL + , .tp_call = NULL + , .tp_str = NULL + , .tp_getattro = NULL + , .tp_setattro = NULL + , .tp_as_buffer = NULL + , .tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE + , .tp_doc = "Created through PyTypeManager" + } + , _methods (methods) + , _getsets (getsets) + { + if (_isIterator()) _typeObject.tp_basicsize = sizeof(PyIteratorPointer); + } + + + inline bool PyTypeManager::_isDBo () const { return _flags & IsDBo; } + inline bool PyTypeManager::_isIterator () const { return _flags & IsIterator; } + inline std::string PyTypeManager::_getCppTypeName () const { return _cppTypeName; } + inline std::string PyTypeManager::_getPyTypeName () const { return _pyTypeName; } + inline PyTypeObject* PyTypeManager::_getTypeObject () { return &_typeObject; } + inline PyMethodDef* PyTypeManager::_getMethods () { return _methods; } + inline PyGetSetDef* PyTypeManager::_getGetsets () { return _getsets; } + inline uint64_t PyTypeManager::flags () const { return _flags; } + inline void PyTypeManager::_setMethods ( PyMethodDef* methods ) { _methods=methods; } + inline PyTypeManager::ManagerByCppTypes& + PyTypeManager::getManagerByCppTypes () { return _managerByCppTypes; } + + + template< typename CppT > + void PyTypeManager::add ( PyObject* module, PyTypeManager* manager ) + { + if (ProxyProperty::getOffset() == (size_t)-1) + ProxyProperty::setOffset( offsetof( PyVoidPointer, _object )); + + // std::cerr << "PyTypeManager::add<" << demangle(typeid(CppT).name()) + // << "> hash=" << std::type_index(typeid(CppT)).hash_code() + // << " manager=" << manager << std::endl; + _managerByCppTypes[ std::type_index(typeid(CppT)) ] = manager; + _managerByPyTypes [ manager->_getTypeObject() ] = manager; + manager->_addToModule( module ); + pyTypePostInit( manager->_getTypeObject() ); + // std::cerr << "_managerByCppTypes.size()=" << _managerByCppTypes.size() << std::endl; + } + + +// ------------------------------------------------------------------- +// PyTypeObject & PyObject wrapper / manager. + + + template + class PyTypeManagerVTrunk : public PyTypeManager { + public: + inline PyTypeManagerVTrunk ( PyMethodDef*, PyGetSetDef*, uint64_t flags ); + virtual ~PyTypeManagerVTrunk (); + public: + virtual PyObject* _getTpStr ( PyVoidPointer* ); + virtual PyObject* _link ( CppT* ); + }; + + + template< typename CppT > + inline PyTypeManagerVTrunk::PyTypeManagerVTrunk ( PyMethodDef* methods, PyGetSetDef* getsets, uint64_t flags ) + : PyTypeManager(methods,getsets,flags) + { } + + + template< typename CppT > + PyTypeManagerVTrunk::~PyTypeManagerVTrunk () { } + + + template< typename CppT > + PyObject* PyTypeManagerVTrunk::_getTpStr ( PyVoidPointer *self ) + { + CppT* object = reinterpret_cast( self->_object ); + if (not object) { + std::ostringstream repr; + repr << "<" << _getPyTypeName() << " [" << (void*)self << " <-> NULL] unbound>"; + return PyUnicode_FromString( repr.str().c_str() ); + } + return PyUnicode_FromString(getString(object).c_str() ); + } + + + template< typename CppT > + PyObject* PyTypeManagerVTrunk::_link ( CppT* object ) + { + if (not object) Py_RETURN_NONE; + + PyVoidPointer* pyObject = NULL; + if (_isIterator()) + pyObject = (PyVoidPointer*)PyObject_NEW( PyIteratorPointer, _getTypeObject() ); + else + pyObject = PyObject_NEW( PyVoidPointer, _getTypeObject() ); + if (pyObject == NULL) return NULL; + + pyObject->_object = (void*)object; + cdebug_log(20,0) << "PyTypeManager::_link(): " << _getPyTypeName() << " " + << (void*)pyObject << ") " << (void*)object << ":" << object << endl; + + return (PyObject*)pyObject; + } + + +// PyTypeManager methods requiring PyTypeManagerVTrunk. + + template< typename CppT > + inline PyObject* PyTypeManager::link ( CppT* object ) + { + // std::cerr << "PyTypeManager::link() " << demangle(typeid(CppT).name()) + // << "* object = " << (void*)object << ":" << object << std::endl; + if (not object) Py_RETURN_NONE; + PyTypeManagerVTrunk* manager = dynamic_cast< PyTypeManagerVTrunk* >( _get() ); + // std::cerr << "_get()=" << _get() << endl; + // std::cerr << demangle(typeid(PyTypeManagerVTrunk*).name()) << endl; + if (not manager) + throw Error( "PyTypeManager::link(): No manager for type <%s>." + , demangle(typeid(CppT).name()).c_str() ); + return manager->_link( object ); + } + + +// ------------------------------------------------------------------- +// PyTypeObject & PyObject for non-DBo objects. + + + template + class PyTypeManagerNonDBo : public PyTypeManagerVTrunk { + public: + inline PyTypeManagerNonDBo ( PyMethodDef*, PyGetSetDef*, uint64_t flags ); + virtual ~PyTypeManagerNonDBo (); + public: + static PyTypeManagerNonDBo* create ( PyObject* module + , PyMethodDef* methods + , PyGetSetDef* getsets + , uint64_t flags ); + virtual void _getTpDeAlloc ( PyVoidPointer* ); + virtual long _getTpHash ( PyVoidPointer* ); + virtual PyObject* _getTpRichCompare ( PyObject*, PyObject*, int ); + }; + + + template< typename CppT > + inline PyTypeManagerNonDBo::PyTypeManagerNonDBo ( PyMethodDef* methods, PyGetSetDef* getsets, uint64_t flags ) + : PyTypeManagerVTrunk(methods,getsets,flags) + { } + + + template< typename CppT > + PyTypeManagerNonDBo::~PyTypeManagerNonDBo () { } + + + template< typename CppT > + void PyTypeManagerNonDBo::_getTpDeAlloc ( PyVoidPointer* self ) + { + if (not (PyTypeManager::flags() & PyTypeManager::NoCppDelete)) + delete reinterpret_cast( self->_object ); + PyObject_DEL( self ); + } + + + template< typename CppT > + long PyTypeManagerNonDBo::_getTpHash ( PyVoidPointer *self ) + { return (long)(self->_object); } + + + template< typename CppT > + PyObject* PyTypeManagerNonDBo::_getTpRichCompare ( PyObject *self, PyObject* other, int op ) + { + if (Py_TYPE(self) != Py_TYPE(other)) { + std::string message = "PyTypeManagerNonDBo<" + getString(demangle(typeid(CppT).name())) + + "> cannot compare to \"" + Py_TYPE(other)->tp_name + "\"."; + PyErr_SetString( PyExc_TypeError, message.c_str() ); + return NULL; + } + CppT* cself = reinterpret_cast( asVPtr(self )->_object ); + CppT* cother = reinterpret_cast( asVPtr(other)->_object ); + + bool result = false; + if ((op == Py_LT) and (cself < cother)) result = true; + if ((op == Py_LE) and (cself <= cother)) result = true; + if ((op == Py_EQ) and (cself == cother)) result = true; + if ((op == Py_NE) and (cself != cother)) result = true; + if ((op == Py_GT) and (cself > cother)) result = true; + if ((op == Py_GE) and (cself >= cother)) result = true; + + if (result) Py_RETURN_TRUE; + Py_RETURN_FALSE; + } + + + template< typename CppT > + PyTypeManagerNonDBo* PyTypeManagerNonDBo::create ( PyObject* module + , PyMethodDef* methods + , PyGetSetDef* getsets + , uint64_t flags ) + { + PyTypeManagerNonDBo* manager = new PyTypeManagerNonDBo( methods, getsets, flags ); + manager->_setTypeNames( ::Hurricane::demangle(typeid(CppT)) ); + manager->_setupPyType(); + PyTypeManager::add( module, manager ); + return manager; + } + + +// ------------------------------------------------------------------- +// PyTypeObject & PyObject for DBo objects. + + + template + class PyTypeManagerDBo : public PyTypeManagerVTrunk { + public: + using PyTypeManager::_getTypeObject; + inline PyTypeManagerDBo ( PyMethodDef*, PyGetSetDef*, uint64_t flags ); + virtual ~PyTypeManagerDBo (); + public: + static PyTypeManagerDBo* create ( PyObject* module + , PyMethodDef* methods + , PyGetSetDef* getsets + , uint64_t flags ); + + virtual PyObject* _link ( CppT* ); + virtual void _getTpDeAlloc ( PyVoidPointer* ); + virtual long _getTpHash ( PyVoidPointer* ); + virtual PyObject* _getTpRichCompare ( PyObject*, PyObject*, int ); + }; + + + template< typename CppT > + inline PyTypeManagerDBo::PyTypeManagerDBo ( PyMethodDef* methods, PyGetSetDef* getsets, uint64_t flags ) + : PyTypeManagerVTrunk(methods,getsets,flags|PyTypeManager::IsDBo) + { } + + + template< typename CppT > + PyTypeManagerDBo::~PyTypeManagerDBo () { } + + + template< typename CppT > + PyObject* PyTypeManagerDBo::_link( CppT* object ) + { + if (not object) Py_RETURN_NONE; + + PyVoidPointer* pyObject = NULL; + ProxyProperty* proxy = static_cast + ( object->getProperty ( ProxyProperty::getPropertyName() ) ); + + if (not proxy) { + pyObject = PyObject_NEW( PyVoidPointer, _getTypeObject() ); + if (not pyObject) return NULL; + + proxy = ProxyProperty::create( (void*)pyObject ); + pyObject->_object = (void*)object; + object->put( proxy ); + } else { + pyObject = (PyVoidPointer*)proxy->getShadow (); + Py_INCREF( pyObject ); + } + cdebug_log(20,0) << "PyTypeManagerDBo<" << demangle(typeid(CppT).name()) << ">() " + << (void*)pyObject << " <-> " + << (void*)object << ":" << object << endl; + return (PyObject*)pyObject; + } + + + template< typename CppT > + void PyTypeManagerDBo::_getTpDeAlloc ( PyVoidPointer* self ) + { + DBo* object = reinterpret_cast( self->_object ); + cdebug_log(20,0) << "PyTypeManager_DeAlloc(" << (void*)self << ") " + << (void*)(self->_object) << ":" << object << endl; + + Isobar3::ProxyProperty* proxy = + static_cast( object->getProperty( Isobar3::ProxyProperty::getPropertyName() ) ); + + if (not proxy) { + ostringstream message; + message << "deleting a Python object with no Proxy attached "; + PyErr_SetString( ProxyError, message.str().c_str() ); + } + object->remove ( proxy ); + + PyObject_DEL( self ); + } + + + template< typename CppT > + long PyTypeManagerDBo::_getTpHash ( PyVoidPointer *self ) + { + DBo* object = reinterpret_cast( self->_object ); + return object->getId(); + } + + + template< typename CppT > + PyObject* PyTypeManagerDBo::_getTpRichCompare ( PyObject *self, PyObject* other, int op ) + { + if (Py_TYPE(self) != Py_TYPE(other)) { + std::string message = "PyTypeManagerDBo<" + getString(demangle(typeid(CppT).name())) + + "> cannot compare to \"" + Py_TYPE(other)->tp_name + "\"."; + PyErr_SetString( PyExc_TypeError, message.c_str() ); + return NULL; + } + CppT* cself = reinterpret_cast( asVPtr(self )->_object ); + CppT* cother = reinterpret_cast( asVPtr(other)->_object ); + + bool result = false; + if ((op == Py_LT) and (cself->getId() < cother->getId())) result = true; + if ((op == Py_LE) and (cself->getId() <= cother->getId())) result = true; + if ((op == Py_EQ) and (cself->getId() == cother->getId())) result = true; + if ((op == Py_NE) and (cself->getId() != cother->getId())) result = true; + if ((op == Py_GT) and (cself->getId() > cother->getId())) result = true; + if ((op == Py_GE) and (cself->getId() >= cother->getId())) result = true; + + if (result) Py_RETURN_TRUE; + Py_RETURN_FALSE; + } + + + template< typename CppT > + PyTypeManagerDBo* PyTypeManagerDBo::create ( PyObject* module + , PyMethodDef* methods + , PyGetSetDef* getsets + , uint64_t flags ) + { + if (std::is_base_of::value) + throw ::Hurricane::Error( "PyManagerDBo::create(): The C++ class <%s> is *not* derived from DBo." + , ::Hurricane::demangle(typeid(CppT).name()) ); + + PyTypeManagerDBo* manager = new PyTypeManagerDBo ( methods, getsets, flags ); + manager->_setTypeNames( ::Hurricane::demangle(typeid(CppT)) ); + manager->_setupPyType(); + PyTypeManager::add( module, manager ); + return manager; + } + + +// ------------------------------------------------------------------- +// Top level link template. + + + template< typename CppT > + inline PyObject* objectLink ( CppT object ) + { + std::string message = "Overload for Isobar3::objectLink< " + + demangle(typeid(CppT).name()) + " >() is missing."; + // std::cerr << message << std::endl; + PyErr_SetString( HurricaneError, message.c_str() ); + return NULL; + } + + + template< typename CppT + , typename std::enable_if< !std::is_same::value + && !std::is_same::value + && !std::is_same::value + && !std::is_same::value,bool>::type = true > + inline PyObject* objectLink ( CppT* object ) + { return PyTypeManager::link( object ); } + + + template< typename CppT + , typename std::enable_if< !std::is_same::value + && !std::is_same::value + && !std::is_same::value + && !std::is_same::value,bool>::type = true > + inline PyObject* objectLink ( const CppT* object ) + { return PyTypeManager::link( const_cast( object )); } + + + template<> + inline PyObject* objectLink ( bool b ) + { if (b) Py_RETURN_TRUE; Py_RETURN_FALSE; } + + + template<> inline PyObject* objectLink< std::string> ( std::string s ) { return PyUnicode_FromString( s.c_str() ); } + template<> inline PyObject* objectLink ( const std::string s ) { return PyUnicode_FromString( s.c_str() ); } + template<> inline PyObject* objectLink ( const std::string* s ) { return PyUnicode_FromString( s->c_str() ); } + + template<> inline PyObject* objectLink< int > ( int i ) { return PyLong_FromLong( i ); } + template<> inline PyObject* objectLink ( const int i ) { return PyLong_FromLong( i ); } + template<> inline PyObject* objectLink ( const int* i ) { return PyLong_FromLong( *i ); } + + template<> inline PyObject* objectLink< long > ( long l ) { return PyLong_FromLong( l ); } + template<> inline PyObject* objectLink ( const long l ) { return PyLong_FromLong( l ); } + template<> inline PyObject* objectLink ( const long* l ) { return PyLong_FromLong( *l ); } + + template<> inline PyObject* objectLink< float > ( float f ) { return PyFloat_FromDouble( f ); } + template<> inline PyObject* objectLink ( const float f ) { return PyFloat_FromDouble( f ); } + template<> inline PyObject* objectLink ( const float* f ) { return PyFloat_FromDouble( *f ); } + + template<> inline PyObject* objectLink< double > ( double d ) { return PyFloat_FromDouble( d ); } + template<> inline PyObject* objectLink ( const double d ) { return PyFloat_FromDouble( d ); } + template<> inline PyObject* objectLink ( const double* d ) { return PyFloat_FromDouble( *d ); } + + +// Forward declaration for PyVector.h + template< typename CppT > inline PyObject* objectLink ( const typename std::vector::iterator* ); + template< typename CppT > inline PyObject* objectLink ( const std::vector& ); + +// Forward declaration for PyMap.h + template< typename CppK, typename CppT > inline PyObject* objectLink ( const typename std::map::iterator* ); + template< typename CppK, typename CppT > inline PyObject* objectLink ( const std::map& vobject ); + +// Forward declaration for PyCollection.h + template< typename CppT > inline PyObject* objectLink ( const typename Hurricane::Locator* ); + template< typename CppT > inline PyObject* objectLink ( const Hurricane::Collection* ); + + +} // Isobar3 namespace. + + +namespace Isobar3 { + +// ------------------------------------------------------------------- +// Wrap C++ function call to pass arguments through a tuple<>. + + +// Flavor for "return by value" (seems to match std::is_object<>) + template< typename TR, typename... TArgs + , typename std::enable_if< !std::is_reference::value + && !std::is_pointer ::value + && !std::is_void ::value,bool>::type = true > + inline PyObject* _callFunctionReturn ( TR(* func)(TArgs...), TArgs... args ) + { + TR value = func( args... ); + return objectLink( value ); + } + + +// Flavor for "return by reference". + template< typename TR, typename... TArgs + , typename std::enable_if< std::is_reference::value + && !std::is_pointer ::value + && !std::is_void ::value,bool>::type = true > + inline PyObject* _callFunctionReturn ( TR(* func)(TArgs...), TArgs... args ) + { + TR rvalue = func( args... ); + return objectLink( rvalue ); + } + + +// Flavor for "return by pointer". + template< typename TR, typename... TArgs + , typename std::enable_if::value,bool>::type = true > + inline PyObject* _callFunctionReturn ( TR(* func)(TArgs...), TArgs... args ) + { + TR pvalue = func( args... ); + return objectLink( pvalue ); + } + + +// Flavor for "return void". + template< typename TR, typename... TArgs + , typename std::enable_if::value,bool>::type = true > + inline PyObject* _callFunctionReturn ( TR(* func)(TArgs...), TArgs... args ) + { + func( args... ); + Py_RETURN_NONE; + } + + + template< typename TR > + PyObject* _callFunction ( TR(* func)(), std::tuple<> args ) + { return _callFunctionReturn( func ); } + + + template< typename TR, typename TA0 > + PyObject* _callFunction ( TR(* func)(TA0), std::tuple args ) + { return _callFunctionReturn( func, std::get<0>(args) ); } + + + template< typename TR, typename TA0, typename TA1 > + PyObject* _callFunction ( TR(* func)(TA0,TA1), std::tuple args ) + { return _callFunctionReturn( func, std::get<0>(args), std::get<1>(args) ); } + + + template< typename TR, typename TA0, typename TA1, typename TA2 > + PyObject* _callFunction ( TR(* func)(TA0,TA1,TA2), std::tuple args ) + { return _callFunctionReturn( func, std::get<0>(args), std::get<1>(args), std::get<2>(args) ); } + + + template< typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 > + PyObject* _callFunction ( TR(* func)(TA0,TA1,TA2,TA3), std::tuple args ) + { return _callFunctionReturn( func, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) + , std::get<3>(args) ); } + + + template< typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 > + PyObject* _callFunction ( TR(* func)(TA0,TA1,TA2,TA3,TA4), std::tuple args ) + { return _callFunctionReturn( func, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) + , std::get<3>(args) + , std::get<4>(args) ); } + + + template< typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 > + PyObject* _callFunction ( TR(* func)(TA0,TA1,TA2,TA3,TA4,TA5), std::tuple args ) + { return _callFunctionReturn( func, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) + , std::get<3>(args) + , std::get<4>(args) + , std::get<5>(args) ); } + + + template< typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 > + PyObject* _callFunction ( TR(* func)(TA0,TA1,TA2,TA3,TA4,TA5,TA6), std::tuple args ) + { return _callFunctionReturn( func, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) + , std::get<3>(args) + , std::get<4>(args) + , std::get<5>(args) + , std::get<6>(args) ); } + + + template< typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 + , typename TA7 > + PyObject* _callFunction ( TR(* func)(TA0,TA1,TA2,TA3,TA4,TA5,TA6,TA7), std::tuple args ) + { return _callFunctionReturn( func, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) + , std::get<3>(args) + , std::get<4>(args) + , std::get<5>(args) + , std::get<6>(args) + , std::get<7>(args) ); } + + + template< typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 + , typename TA7 + , typename TA8 > + PyObject* _callFunction ( TR(* func)(TA0,TA1,TA2,TA3,TA4,TA5,TA6,TA7,TA8), std::tuple args ) + { return _callFunctionReturn( func, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) + , std::get<3>(args) + , std::get<4>(args) + , std::get<5>(args) + , std::get<6>(args) + , std::get<7>(args) + , std::get<8>(args) ); } + + + template< typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 + , typename TA7 + , typename TA8 + , typename TA9 > + PyObject* _callFunction ( TR(* func)(TA0,TA1,TA2,TA3,TA4,TA5,TA6,TA7,TA8,TA9), std::tuple args ) + { return _callFunctionReturn( func, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) + , std::get<3>(args) + , std::get<4>(args) + , std::get<5>(args) + , std::get<6>(args) + , std::get<7>(args) + , std::get<8>(args) + , std::get<9>(args) ); } + + +// ------------------------------------------------------------------- +// Wrap C++ member method call to pass arguments through a tuple<>. + + +// Flavor for "return by value" (seems to match std::is_object<>) + template< typename TC, typename TR, typename... TArgs + , typename std::enable_if< !std::is_reference::value + && !std::is_pointer ::value + && !std::is_void ::value,bool>::type = true > + inline PyObject* _callMethodReturn ( TR(TC::* method)(TArgs...), TC* cppObject, TArgs... args ) + { + // std::cerr << "_callMethodReturn() By value, TR=<" << demangle(typeid(TR).name()) << ">" << std::endl; + TR value = (cppObject->*method)( args... ); + return objectLink( value ); + } + + +// Flavor for "return by reference" + template< typename TC, typename TR, typename... TArgs + , typename std::enable_if< std::is_reference::value + && !std::is_pointer ::value + && !std::is_void ::value,bool>::type = true > + inline PyObject* _callMethodReturn ( TR(TC::* method)(TArgs...), TC* cppObject, TArgs... args ) + { + // std::cerr << "_callMethodReturn() By reference, TR=<" << demangle(typeid(TR).name()) << ">" << std::endl; + TR rvalue = (cppObject->*method)( args... ); + return objectLink( rvalue ); + } + + +// Flavor for "return by pointer". + template< typename TC, typename TR, typename... TArgs + , typename std::enable_if::value,bool>::type = true > + inline PyObject* _callMethodReturn ( TR(TC::* method)(TArgs...), TC* cppObject, TArgs... args ) + { + TR pvalue = (cppObject->*method)( args... ); + return objectLink( pvalue ); + } + + +// Flavor for "return void". + template< typename TC, typename TR, typename... TArgs + , typename std::enable_if::value,bool>::type = true > + inline PyObject* _callMethodReturn ( TR(TC::* method)(TArgs...), TC* cppObject, TArgs... args ) + { + (cppObject->*method)( args... ); + Py_RETURN_NONE; + } + + + template< typename TC, typename TR > + inline PyObject* _callMethod ( TR(TC::* method)(), TC* cppObject, std::tuple<> ) + { return _callMethodReturn( method, cppObject ); } + + + template< typename TC, typename TR, typename TA0 > + inline PyObject* _callMethod ( TR(TC::* method)(TA0), TC* cppObject, std::tuple args ) + { return _callMethodReturn( method, cppObject, std::get<0>(args) ); } + + + template< typename TC, typename TR, typename TA0, typename TA1 > + PyObject* _callMethod ( TR(TC::* method)(TA0,TA1), TC* cppObject, std::tuple args ) + { return _callMethodReturn( method, cppObject, std::get<0>(args), std::get<1>(args) ); } + + + template< typename TC, typename TR, typename TA0, typename TA1, typename TA2 > + inline PyObject* _callMethod ( TR(TC::* method)(TA0,TA1,TA2), TC* cppObject, std::tuple args ) + { return _callMethodReturn( method, cppObject, std::get<0>(args), std::get<1>(args), std::get<2>(args) ); } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 > + inline PyObject* _callMethod ( TR(TC::* method)(TA0,TA1,TA2,TA3) + , TC* cppObject, std::tuple args ) + { + return _callMethodReturn( method, cppObject, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) + , std::get<3>(args) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 > + inline PyObject* _callMethod ( TR(TC::* method)(TA0,TA1,TA2,TA3,TA4) + , TC* cppObject, std::tuple args ) + { + return _callMethodReturn( method, cppObject, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) + , std::get<3>(args) + , std::get<4>(args) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 > + inline PyObject* _callMethod ( TR(TC::* method)(TA0,TA1,TA2,TA3,TA4,TA5) + , TC* cppObject, std::tuple args ) + { + return _callMethodReturn( method, cppObject, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) + , std::get<3>(args) + , std::get<4>(args) + , std::get<5>(args) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 > + inline PyObject* _callMethod ( TR(TC::* method)(TA0,TA1,TA2,TA3,TA4,TA5,TA6) + , TC* cppObject, std::tuple args ) + { + return _callMethodReturn( method, cppObject, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) + , std::get<3>(args) + , std::get<4>(args) + , std::get<5>(args) + , std::get<6>(args) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 + , typename TA7 > + inline PyObject* _callMethod ( TR(TC::* method)(TA0,TA1,TA2,TA3,TA4,TA5,TA6,TA7) + , TC* cppObject, std::tuple args ) + { + return _callMethodReturn( method, cppObject, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) + , std::get<3>(args) + , std::get<4>(args) + , std::get<5>(args) + , std::get<6>(args) + , std::get<7>(args) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 + , typename TA7 + , typename TA8 > + inline PyObject* _callMethod ( TR(TC::* method)(TA0,TA1,TA2,TA3,TA4,TA5,TA6,TA7,TA8) + , TC* cppObject, std::tuple args ) + { + return _callMethodReturn( method, cppObject, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) + , std::get<3>(args) + , std::get<4>(args) + , std::get<5>(args) + , std::get<6>(args) + , std::get<7>(args) + , std::get<8>(args) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 + , typename TA7 + , typename TA8 + , typename TA9 > + inline PyObject* _callMethod ( TR(TC::* method)(TA0,TA1,TA2,TA3,TA4,TA5,TA6,TA7,TA8,TA9) + , TC* cppObject, std::tuple args ) + { + return _callMethodReturn( method, cppObject, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) + , std::get<3>(args) + , std::get<4>(args) + , std::get<5>(args) + , std::get<6>(args) + , std::get<7>(args) + , std::get<8>(args) + , std::get<9>(args) ); + } + + +// ------------------------------------------------------------------- +// Wrap C++ member method call as function to pass arguments through a tuple<>. + + +// Flavor for "return by value" (seems to match std::is_object<>) + template< typename TC, typename TR, typename... TArgs + , typename std::enable_if< !std::is_reference::value + && !std::is_pointer ::value + && !std::is_void ::value,bool>::type = true > + inline PyObject* _callFMethodReturn ( TR(* fmethod)(TC*,TArgs...), TC* cppObject, TArgs... args ) + { + TR value = fmethod( cppObject, args... ); + return objectLink( value ); + } + + +// Flavor for "return by reference" + template< typename TC, typename TR, typename... TArgs + , typename std::enable_if< std::is_reference::value + && !std::is_pointer ::value + && !std::is_void ::value,bool>::type = true > + inline PyObject* _callFMethodReturn ( TR(* fmethod)(TC*,TArgs...), TC* cppObject, TArgs... args ) + { + TR rvalue = fmethod( cppObject, args... ); + return objectLink( rvalue ); + } + + +// Flavor for "return by pointer". + template< typename TC, typename TR, typename... TArgs + , typename std::enable_if::value,bool>::type = true > + inline PyObject* _callFMethodReturn ( TR(* fmethod)(TC*,TArgs...), TC* cppObject, TArgs... args ) + { + TR pvalue = fmethod( cppObject, args... ); + return objectLink( pvalue ); + } + + +// Flavor for "return void". + template< typename TC, typename TR, typename... TArgs + , typename std::enable_if::value,bool>::type = true > + inline PyObject* _callFMethodReturn ( TR(* fmethod)(TC*,TArgs...), TC* cppObject, TArgs... args ) + { + fmethod( cppObject, args... ); + Py_RETURN_NONE; + } + + + template< typename TC, typename TR > + inline PyObject* _callMethod ( TR(* fmethod)(TC*), TC* cppObject, std::tuple<> ) + { return _callFMethodReturn( fmethod, cppObject ); } + + + template< typename TC, typename TR, typename TA0 > + inline PyObject* _callMethod ( TR(* fmethod)(TC*,TA0), TC* cppObject, std::tuple args ) + { return _callFMethodReturn( fmethod, cppObject, std::get<0>(args) ); } + + + template< typename TC, typename TR, typename TA0, typename TA1 > + inline PyObject* _callMethod ( TR(* fmethod)(TC*,TA0,TA1), TC* cppObject, std::tuple args ) + { return _callFMethodReturn( fmethod, cppObject, std::get<0>(args), std::get<1>(args) ); } + + + template< typename TC, typename TR, typename TA0, typename TA1, typename TA2 > + inline PyObject* _callMethod ( TR(* fmethod)(TC*,TA0,TA1,TA2), TC* cppObject, std::tuple args ) + { + // cerr << "_callMethod3 (function)" << endl; + PyObject* object = _callFMethodReturn( fmethod, cppObject, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) ); + // cerr << "done" << endl; + return object; + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 > + inline PyObject* _callMethod ( TR(* fmethod)(TC*,TA0,TA1,TA2,TA3) + , TC* cppObject, std::tuple args ) + { + // cerr << "_callMethod4 (function)" << endl; + return _callFMethodReturn( fmethod, cppObject, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) + , std::get<3>(args) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 > + inline PyObject* _callMethod ( TR(* fmethod)(TC*,TA0,TA1,TA2,TA3,TA4) + , TC* cppObject, std::tuple args ) + { + // cerr << "_callMethod5 (function)" << endl; + return _callFMethodReturn( fmethod, cppObject, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) + , std::get<3>(args) + , std::get<4>(args) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 > + inline PyObject* _callMethod ( TR(* fmethod)(TC*,TA0,TA1,TA2,TA3,TA4,TA5) + , TC* cppObject, std::tuple args ) + { + //std::cerr << "_callMethod6 (function)" << std::endl; + return _callFMethodReturn( fmethod, cppObject, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) + , std::get<3>(args) + , std::get<4>(args) + , std::get<5>(args) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 > + inline PyObject* _callMethod ( TR(* fmethod)(TC*,TA0,TA1,TA2,TA3,TA4,TA5,TA6) + , TC* cppObject, std::tuple args ) + { + // cerr << "_callMethod7 (function)" << endl; + return _callFMethodReturn( fmethod, cppObject, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) + , std::get<3>(args) + , std::get<4>(args) + , std::get<5>(args) + , std::get<6>(args) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 + , typename TA7 > + inline PyObject* _callMethod ( TR(* fmethod)(TC*,TA0,TA1,TA2,TA3,TA4,TA5,TA6,TA7) + , TC* cppObject, std::tuple args ) + { + // cerr << "_callMethod8 (function)" << endl; + return _callFMethodReturn( fmethod, cppObject, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) + , std::get<3>(args) + , std::get<4>(args) + , std::get<5>(args) + , std::get<6>(args) + , std::get<7>(args) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 + , typename TA7 + , typename TA8 > + inline PyObject* _callMethod ( TR(* fmethod)(TC*,TA0,TA1,TA2,TA3,TA4,TA5,TA6,TA7,TA8) + , TC* cppObject, std::tuple args ) + { + // cerr << "_callMethod9 (function)" << endl; + return _callFMethodReturn( fmethod, cppObject, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) + , std::get<3>(args) + , std::get<4>(args) + , std::get<5>(args) + , std::get<6>(args) + , std::get<7>(args) + , std::get<8>(args) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 + , typename TA7 + , typename TA8 + , typename TA9 > + inline PyObject* _callMethod ( TR(* fmethod)(TC*,TA0,TA1,TA2,TA3,TA4,TA5,TA6,TA7,TA8,TA9) + , TC* cppObject, std::tuple args ) + { + // cerr << "_callMethod10 (function)" << endl; + return _callFMethodReturn( fmethod, cppObject, std::get<0>(args) + , std::get<1>(args) + , std::get<2>(args) + , std::get<3>(args) + , std::get<4>(args) + , std::get<5>(args) + , std::get<6>(args) + , std::get<7>(args) + , std::get<8>(args) + , std::get<9>(args) ); + } + + +// ------------------------------------------------------------------- +// Standard Python to C types converters. + + + template + inline bool pyAs ( PyObject* pyArg, T& arg ) + { + std::cerr << "Isobar3.pyAs(): Unsupported type \"" << demangle(typeid(T).name()) << "\"" << endl; + return false; + } + + + template<> + inline bool pyAs ( PyObject* pyArg, std::string& arg ) + { + if (not PyUnicode_Check(pyArg)) return false; + PyObject* pyBytes = PyUnicode_AsASCIIString( pyArg ); + arg = PyBytes_AsString( pyBytes ); + Py_DECREF( pyBytes ); + return true; + } + + + template<> + inline bool pyAs ( PyObject* pyArg, bool& arg ) + { + if (not PyBool_Check(pyArg)) return false; + arg = (pyArg == Py_True); + return true; + } + + + template<> + inline bool pyAs ( PyObject* pyArg, int& arg ) + { + if (PyLong_Check(pyArg)) { arg = PyLong_AsLong( pyArg ); } + else return false; + return true; + } + + + template<> + inline bool pyAs ( PyObject* pyArg, unsigned int& arg ) + { + if (PyLong_Check(pyArg)) { arg = PyLong_AsLong( pyArg ); } + else return false; + return true; + } + + + template<> + inline bool pyAs ( PyObject* pyArg, unsigned long& arg ) + { + if (not PyLong_Check(pyArg)) return false; + arg = PyLong_AsLong( pyArg ); + return true; + } + + + template<> + inline bool pyAs ( PyObject* pyArg, long& arg ) + { + if (not PyLong_Check(pyArg)) return false; + arg = PyLong_AsLong( pyArg ); + return true; + } + + + template<> + inline bool pyAs ( PyObject* pyArg, float& arg ) + { + if (not PyFloat_Check(pyArg)) return false; + arg = PyFloat_AsDouble( pyArg ); + return true; + } + + + template<> + inline bool pyAs ( PyObject* pyArg, double& arg ) + { + if (not PyFloat_Check(pyArg)) return false; + arg = PyFloat_AsDouble( pyArg ); + return true; + } + + + template + inline bool pyAs ( PyObject* pyArg, T*& arg ) + { + PyTypeManager* manager = PyTypeManager::_get(); + if (not manager) { + std::cerr << "Isobar3.pyAs(): Unsupported type \"" << typeid(T).name() << "\"" << endl; + return false; + } + // std::cerr << "pyAs< " << demangle(typeid(T).name()) << " >() called." << std::endl; + arg = (T*)( asVPtr( pyArg )->_object ); + return true; + } + + + template + inline bool pyAs ( PyVoidPointer* pyArg, T*& arg ) + { return pyAs( (PyObject*)pyArg, arg ); } + + + template + inline bool pyArgAs ( PyObject* arg, T& cppArg, std::string nth, std::string& message ) + { + // std::cerr << "pyArgAs<" << demangle(typeid(T).name()) << ">" << endl; + if (not pyAs(arg,cppArg)) { + // std::cerr << "conversion failed" << std::endl; + message += "\n " + getString(nth) + " argument is not convertible to \"" + demangle(typeid(T).name()) + "\"."; + PyErr_SetString( ConstructorError, message.c_str() ); + return false; + } + return true; + } + + +// ------------------------------------------------------------------- +// Convert a table of PyObject*[] into a tuple of C++ objects. +// Recursive tuple construction. + + template< size_t N > + std::tuple<> pyArgsAs ( PyObject* pyArgs[], bool& success, std::string& message, size_t count=0 ) + { return std::tuple<>(); } + + + template< size_t N, typename T, typename... Tail > + std::tuple pyArgsAs ( PyObject* pyArgs[], bool& success, std::string& message, size_t count=0 ) + { + const std::string nth[] = { "First", "Second" , "Third", "Fourth", "Fifth" + , "Sixth", "Seventh", "Eight", "Ninth" , "Tenth" }; + + T cppValue; + success = success and pyArgAs( pyArgs[count], cppValue, nth[count], message ); + return std::tuple_cat( make_tuple(cppValue), pyArgsAs(pyArgs,success,message,count+1) ); + } + + +// ------------------------------------------------------------------- +// C++ Function Wrapper. + + + template< typename TR, typename... TArgs > + class PyFunctionWrapper { + public: + typedef TR(* FunctionType )(TArgs...); + public: + inline PyFunctionWrapper ( std::string fname, FunctionType method ) + : _funcName(fname), _method(method) { }; + inline std::string funcName () const { return _funcName; }; + virtual PyObject* call ( PyObject* fargs ); + private: + std::string _funcName; + FunctionType _method; + }; + + + template< typename TR, typename... TArgs > + PyObject* PyFunctionWrapper::call ( PyObject* fargs ) + { + PyErr_Clear(); + + bool success = true; + PyObject* rvalue = NULL; + std::string message = funcName() + "(): "; + try { + size_t nargs = std::tuple_size< std::tuple >::value; + if (nargs >= 10) + throw Error( "Isobar3::PyFunctionWrapper<>() support 10 arguments at most (%d requesteds).", nargs ); + + std::tuple cppArgs; + if (nargs) { + std::string format; + for ( size_t i=0 ; i >::value,TArgs...>( args, success, message ); + } else { + size_t pynargs = (size_t)PyTuple_Size( fargs ); + message += " Invalid number of parameters, got " + + getString(pynargs) + " (expected " + getString(nargs) + ")."; + PyErr_SetString( ConstructorError, message.c_str() ); + success = false; + } + } + if (success) { + rvalue = _callFunction( _method, cppArgs ); + // std::cerr << "_call() " << demangle(typeid(FunctionType).name()) << "* (with " << nargs << " parameters) rvalue = " << (void*)rvalue << std::endl; + } else { + message += "\n Prototype \"" + demangle(typeid(FunctionType).name()) + "\"."; + PyErr_SetString( ConstructorError, message.c_str() ); + } + } catch ( const Warning& w ) { + success = false; + message += "\n" + getString(w); + } catch ( const Error& e ) { + success = false; + message += "\n" + getString(e); + if (not e.where().empty()) message += "\n" + e.where(); + } catch ( const Bug& e ) { + success = false; + message += "\n" + getString(e); + } catch ( const Exception& e ) { + success = false; + message += "\nUnknown Hurricane::Exception"; + } catch ( const std::exception& e ) { + success = false; + message += "\n" + std::string(e.what()); + } catch ( ... ) { + success = false; + message += "\nUnmanaged exception, neither a Hurricane::Error nor" + " a std::exception."; + } + if (not success) + PyErr_SetString( HurricaneError, message.c_str() ); + return rvalue; + } + + +// ------------------------------------------------------------------- +// C++ Method Wrappers. + + template< typename TC, typename TR, typename... TArgs > + class PyMethodWrapper { + public: + typedef TR(TC::* OMethodType )(TArgs...); + typedef TR(* FMethodType )(TC*,TArgs...); + public: + inline PyMethodWrapper ( std::string fname, OMethodType method ) + : _funcName(fname) + , _oMethod(method) + , _fMethod(NULL) + { }; + inline PyMethodWrapper ( std::string fname, FMethodType method ) + : _funcName(fname) + , _oMethod(NULL) + , _fMethod(method) + { }; + inline std::string funcName () const { return _funcName; }; + inline PyObject* call ( PyVoidPointer* self, PyObject* fargs ); + PyObject* _call ( TC* cppObject, PyObject* fargs ); + private: + std::string _funcName; + OMethodType _oMethod; + FMethodType _fMethod; + }; + + + template< typename TC, typename TR, typename... TArgs > + inline PyObject* PyMethodWrapper::call ( PyVoidPointer* self, PyObject* fargs ) + { + PyErr_Clear(); + + size_t nargs = std::tuple_size< std::tuple >::value; + if (nargs >= 10) + throw Error( "Isobar3::PyMethodWrapper<>() support 10 arguments at most (%d requesteds).", nargs ); + + bool success = true; + std::string message = funcName() + "(): "; + try { + TC* cppObject = static_cast( self->_object ); + PyObject* rvalue = NULL; + std::tuple cppArgs; + if (nargs) { + std::string format; + for ( size_t i=0 ; i >::value,TArgs...>( args, success, message ); + } else { + size_t pynargs = (size_t)PyTuple_Size( fargs ); + message += "Invalid number of parameters, got " + + getString(pynargs) + " (expected " + getString(nargs) + ")."; + PyErr_SetString( ConstructorError, message.c_str() ); + success = false; + } + } + if (success) { + if (_oMethod) { + rvalue = _callMethod( _oMethod, cppObject, cppArgs ); + // std::cerr << "_call() " << demangle(typeid(OMethodType).name()) << "* (with " << nargs << " parameters) rvalue=" << (void*)rvalue << std::endl; + } + if (_fMethod) { + rvalue = _callMethod( _fMethod, cppObject, cppArgs ); + // std::cerr << "_call() " << demangle(typeid(FMethodType).name()) << "* (with " << nargs << " parameters) rvalue=" << (void*)rvalue << std::endl; + } + } else { + if (_oMethod) message += "\n Prototype \"" + demangle(typeid(OMethodType).name()) + "\"."; + if (_fMethod) message += "\n Prototype \"" + demangle(typeid(FMethodType).name()) + "\"."; + PyErr_SetString( ConstructorError, message.c_str() ); + } + return rvalue; + } catch ( const Warning& w ) { + success = false; + message += "\n" + getString(w); + } catch ( const Error& e ) { + success = false; + message += "\n" + getString(e); + if (not e.where().empty()) message += "\n" + e.where(); + } catch ( const Bug& e ) { + success = false; + message += "\n" + getString(e); + } catch ( const Exception& e ) { + success = false; + message += "\nUnknown Hurricane::Exception"; + } catch ( const std::exception& e ) { + success = false; + message += "\n" + std::string(e.what()); + } catch ( ... ) { + success = false; + message += "\nUnmanaged exception, neither a Hurricane::Error nor" + " a std::exception."; + } + if (not success) + PyErr_SetString( HurricaneError, message.c_str() ); + return NULL; + } + + +// ------------------------------------------------------------------- +// Method wrapper function encapsulation. + + + template< typename TR, typename... TArgs > + inline PyObject* callFunction ( std::string fname, TR(* func )(TArgs...), PyObject* args ) + { + cdebug_log(30,0) << "[Python]" << fname << "()" << endl; + PyObject* rvalue = PyFunctionWrapper( fname, func ).call( args ); + // std::cerr << "callFunction() rvalue=" << rvalue << std::endl; + return rvalue; + } + + + template< typename TC, typename TR, typename... TArgs > + inline PyObject* callMethod ( std::string fname, TR(TC::* method )(TArgs...), PyVoidPointer* self, PyObject* args ) + { + cdebug_log(30,0) << "[Python]" << fname << "()" << endl; + return PyMethodWrapper( fname, method ).call( self, args ); + } + + + template< typename TC, typename TR, typename... TArgs > + inline PyObject* callMethod ( std::string fname, TR(TC::* method )(TArgs...) const, PyVoidPointer* self, PyObject* args ) + { + return callMethod( fname, (TR(TC::*)(TArgs...))(method), self, args ); + } + + + template< typename TC, typename TR, typename... TArgs > + inline PyObject* callMethod ( std::string fname, TR(* fmethod )(TC*,TArgs...), PyVoidPointer* self, PyObject* args ) + { + cdebug_log(30,0) << "[Python]" << fname << "()" << endl; + return PyMethodWrapper( fname, fmethod ).call( self, args ); + } + + + template< typename TC, typename TR, typename... TArgs > + inline PyObject* callMethod ( std::string fname, TR(* fmethod )(const TC*,TArgs...), PyVoidPointer* self, PyObject* args ) + { + return callMethod( fname, (TR(*)(TC*,TArgs...))(fmethod), self, args ); + } + + +} // End of Isobar3 namespace. + + +#include "hurricane/configuration/PyVector.h" +#include "hurricane/configuration/PyMap.h" diff --git a/hurricane/src/configuration/hurricane/configuration/PyLayer.h b/hurricane/src/configuration/hurricane/configuration/PyLayer.h new file mode 100644 index 00000000..f395e24b --- /dev/null +++ b/hurricane/src/configuration/hurricane/configuration/PyLayer.h @@ -0,0 +1,33 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | C o n f i g u r a t i o n D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/configuration/PyLayer.h" | +// +-----------------------------------------------------------------+ + + +#pragma once +#include "hurricane/configuration/PyTypeManager.h" +#include "hurricane/Layer.h" + + +namespace Isobar3 { + + +extern "C" { + + + extern PyMethodDef PyLayer_Methods[]; + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/hurricane/configuration/PyLayerMask.h b/hurricane/src/configuration/hurricane/configuration/PyLayerMask.h new file mode 100644 index 00000000..d1e0fb12 --- /dev/null +++ b/hurricane/src/configuration/hurricane/configuration/PyLayerMask.h @@ -0,0 +1,37 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | C o n f i g u r a t i o n D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/configuration/PyLayerMask.h" | +// +-----------------------------------------------------------------+ + + +#pragma once +#include "hurricane/configuration/PyTypeManager.h" +#include "hurricane/Layer.h" + + +namespace Isobar3 { + + +extern "C" { + + + extern PyMethodDef PyLayerMask_Methods[]; + extern PyNumberMethods PyLayerMask_NumberMethods; + extern PyObject* PyLayerMask_NEW ( PyTypeObject* pyType, PyObject* args, PyObject* kwargs ); + extern int PyLayerMask_Init ( PyObject* self, PyObject* args, PyObject* kwargs ); + extern PyObject* tpRichCompareLayerMask ( PyObject *self, PyObject* other, int op ); + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/hurricane/configuration/PyLayoutDescription.h b/hurricane/src/configuration/hurricane/configuration/PyLayoutDescription.h new file mode 100644 index 00000000..06a32abf --- /dev/null +++ b/hurricane/src/configuration/hurricane/configuration/PyLayoutDescription.h @@ -0,0 +1,33 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) UPMC 2020-2020, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | C o n f i g u r a t i o n D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/configuration/PyLayoutDescription.h"| +// +-----------------------------------------------------------------+ + + +#pragma once +#include "hurricane/configuration/PyTypeManager.h" +#include "hurricane/configuration/LayoutDescription.h" + + +namespace Cfg { + + +extern "C" { + + + extern PyMethodDef PyLayoutDescription_Methods[]; + + +} // extern "C". + +} // Cfg namespace. diff --git a/hurricane/src/configuration/hurricane/configuration/PyMap.h b/hurricane/src/configuration/hurricane/configuration/PyMap.h new file mode 100644 index 00000000..3324bb3f --- /dev/null +++ b/hurricane/src/configuration/hurricane/configuration/PyMap.h @@ -0,0 +1,291 @@ + +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Universite 2021-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | I s o b a r - Hurricane / Python Interface | +// | | +// | Authors : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/isobar/PyMap.h" | +// +-----------------------------------------------------------------+ + + +#pragma once + +namespace Isobar3 { + + +// ------------------------------------------------------------------- +// PyTypeObject & PyObject for map::iterator objects. + + + template< typename CppK, typename CppT > + class PyTypeManagerMapIterator : public PyTypeManagerVTrunk< typename std::map::iterator > { + public: + using PyTypeManager::_getTypeObject; + using PyTypeManager::_setMethods; + public: + inline PyTypeManagerMapIterator ( uint64_t flags ); + virtual ~PyTypeManagerMapIterator (); + public: + static PyTypeManagerMapIterator* create ( PyObject* module, uint64_t flags ); + virtual PyObject* _getTpIter ( PyObject* ); + virtual PyObject* _getTpIterNext ( PyObject* ); + virtual void _getTpDeAlloc ( PyObject* ); + virtual long _getTpHash ( PyObject* ); + private: + PyMethodDef* _noMethods; + }; + + + template< typename CppK, typename CppT > + inline PyTypeManagerMapIterator::PyTypeManagerMapIterator ( uint64_t flags ) + : PyTypeManagerVTrunk< typename std::map::iterator >(NULL,NULL,flags|PyTypeManager::IsIterator) + , _noMethods( NULL ) + { + _getTypeObject()->tp_basicsize = sizeof(PyTwoVoid); + _noMethods = new PyMethodDef; + _noMethods[0].ml_name = NULL; + _noMethods[0].ml_meth = NULL; + _noMethods[0].ml_flags = 0; + _noMethods[0].ml_doc = NULL; + _setMethods( _noMethods ); + } + + + template< typename CppK, typename CppT > + PyTypeManagerMapIterator::~PyTypeManagerMapIterator () { } + + + template< typename CppK, typename CppT > + void PyTypeManagerMapIterator::_getTpDeAlloc ( PyObject* self ) + { + Py_XDECREF( object2(self) ); + typename std::map::iterator* piterator = NULL; + pyToC( self, &piterator ); + delete piterator; + PyObject_DEL( self ); + } + + + template< typename CppK, typename CppT > + PyObject* PyTypeManagerMapIterator::_getTpIter ( PyObject* self ) + { + // std::cerr << "************************************************** " << (void*)self << std::endl; + // std::cerr << "PyTypeManagerMapIterator::_getTpIter() on " << (void*)self << std::endl; + return PyObject_SelfIter( self ); + } + + + template< typename CppK, typename CppT > + PyObject* PyTypeManagerMapIterator::_getTpIterNext ( PyObject* self ) + { + typename std::map::iterator* piterator = NULL; + typename std::map* pmap = NULL; + pyToC( self, &piterator ); + pyToC( object2(self), &pmap ); + + if ((*piterator) != pmap->end()) { + PyObject* pyKey = cToPy( &((**piterator).first ) ); + PyObject* pyValue = NULL; + if (std::is_pointer::value) pyValue = cToPy( (**piterator).second ); + else pyValue = cToPy( &((**piterator).second) ); + (*piterator)++; + return PyTuple_Pack( 2, pyKey, pyValue ); + } + return NULL; + } + + + template< typename CppK, typename CppT > + long PyTypeManagerMapIterator::_getTpHash ( PyObject *self ) + { return (long)(object1(self)); } + + + template< typename CppK, typename CppT > + PyTypeManagerMapIterator* PyTypeManagerMapIterator::create ( PyObject* module, uint64_t flags ) + { + // cerr << "PyTypeManagerMap<" + // << ::Hurricane::demangle(typeid(typename std::map::iterator)) << ">::create()" << endl; + PyTypeManagerMapIterator* manager = new PyTypeManagerMapIterator( flags ); + + string elementName = ::Hurricane::demangle(typeid(CppT)); + size_t cppScope = elementName.find_last_of( "::" ); + if (cppScope != std::string::npos) elementName = elementName.substr( cppScope+1 ); + string keyName = ::Hurricane::demangle(typeid(CppK)); + cppScope = keyName.find_last_of( "::" ); + if (cppScope != std::string::npos) keyName = keyName.substr( cppScope+1 ); + + manager->_setTypeNames( "MapIteratorOf" + elementName + "By" + keyName ); + manager->_setupPyType(); + PyTypeObject* ob_type = manager->_getTypeObject(); + ob_type->tp_iter = PyObject_SelfIter; + ob_type->tp_iternext = (iternextfunc)&::Isobar3::_tpIterNext; + + PyTypeManager::add< typename std::map::iterator >( module, manager ); + + return manager; + } + + +// ------------------------------------------------------------------- +// PyTypeObject & PyObject for map objects. + + + template< typename CppK, typename CppT > + class PyTypeManagerMap : public PyTypeManagerVTrunk< std::map > { + public: + using PyTypeManager::_getTypeObject; + using PyTypeManager::_setMethods; + public: + inline PyTypeManagerMap ( uint64_t flags ); + virtual ~PyTypeManagerMap (); + public: + static PyTypeManagerMap* create ( PyObject* module, uint64_t flags ); + virtual int _getSqContains ( PyObject*, PyObject* ); + virtual Py_ssize_t _getMpLength ( PyObject* ); + virtual PyObject* _getMpSubscript ( PyObject*, PyObject* ); + virtual void _getTpDeAlloc ( PyObject* ); + virtual long _getTpHash ( PyObject* ); + virtual PyObject* _getTpIter ( PyObject* ); + private: + PyMethodDef* _noMethods; + PyMappingMethods _mappingMethods; + PySequenceMethods _sequenceMethods; + }; + + + template< typename CppK, typename CppT > + inline PyTypeManagerMap::PyTypeManagerMap ( uint64_t flags ) + : PyTypeManagerVTrunk< std::map >(NULL,NULL,flags) + , _noMethods ( NULL ) + , _mappingMethods { (lenfunc) _mpLength // mp_length (lenfunc). + , (binaryfunc) _mpSubscript // mp_subsript (binaryfunc). + , NULL // mp_ass_subscript (objobjargproc). + } + , _sequenceMethods{} + { + _noMethods = new PyMethodDef; + _noMethods[0].ml_name = NULL; + _noMethods[0].ml_meth = NULL; + _noMethods[0].ml_flags = 0; + _noMethods[0].ml_doc = NULL; + _setMethods( _noMethods ); + _sequenceMethods.sq_contains = (objobjproc)_sqContains; + } + + + template< typename CppK, typename CppT > + PyTypeManagerMap::~PyTypeManagerMap () { } + + + template< typename CppK, typename CppT > + void PyTypeManagerMap::_getTpDeAlloc ( PyObject* self ) + { + PyObject_DEL( self ); + } + + + template< typename CppK, typename CppT > + int PyTypeManagerMap::_getSqContains ( PyObject* self, PyObject* pyKey ) + { + std::map* pmap = NULL; + if (not pyToC(self,&pmap)) { + std::string message = "PyTypeManagerMap::_getMpSubscript(): pyToC<> failed. \"."; + PyErr_SetString( PyExc_KeyError, message.c_str() ); + return -1; + } + CppK key; + if (not pyToC( pyKey, &key )) return 0; + if ((*pmap).find(key) == (*pmap).end()) return 0; + return 1; + } + + + template< typename CppK, typename CppT > + Py_ssize_t PyTypeManagerMap::_getMpLength ( PyObject* self ) + { + std::map* pmap = reinterpret_cast< std::map* >( object1(self) ); + return pmap->size(); + } + + + template< typename CppK, typename CppT > + PyObject* PyTypeManagerMap::_getMpSubscript ( PyObject* self, PyObject* pyKey ) + { + std::map* pmap = NULL; + if (not pyToC(self,&pmap)) { + std::string message = "PyTypeManagerMap::_getMpSubscript(): pyToC<> failed. \"."; + PyErr_SetString( PyExc_KeyError, message.c_str() ); + return NULL; + } + CppK key; + if (not pyToC( pyKey, &key )) { + std::string message = "PyTypeManagerMap::_getMpSubscript(): Unable to convert key."; + PyErr_SetString( HurricaneError, message.c_str() ); + return NULL; + } + // std::cerr << "_getMpSubscript() pmap=" << (void*)pmap << " key=\"" << key << "\"" << std::endl; + if ((*pmap).find(key) == (*pmap).end()) { + std::string message = "PyTypeManagerMap::_getMpSubscript(): No item with key \"" + + getString(key) + "\"."; + PyErr_SetString( PyExc_KeyError, message.c_str() ); + return NULL; + } + return cToPy( (*pmap)[key] ); + } + + + template< typename CppK, typename CppT > + long PyTypeManagerMap::_getTpHash ( PyObject* self ) + { return (long)(object1(self)); } + + + template< typename CppK, typename CppT > + PyObject* PyTypeManagerMap::_getTpIter ( PyObject* self ) + { + std::map* pmap = NULL; + pyToC( self, &pmap ); + PyTwoVoid* pyIterator = (PyTwoVoid*)cToPy + ( new typename std::map::iterator(pmap->begin()) ); + object2(pyIterator) = self; + Py_INCREF( self ); + return (PyObject*)pyIterator; + } + + + template< typename CppK, typename CppT > + PyTypeManagerMap* PyTypeManagerMap::create ( PyObject* module, uint64_t flags ) + { + // cerr << "PyTypeManagerMap<" + // << ::Hurricane::demangle(typeid(std::map)) << ">::create()" << endl; + PyTypeManagerMap* manager = new PyTypeManagerMap( flags ); + + string elementName = ::Hurricane::demangle(typeid(CppT)); + size_t cppScope = elementName.find_last_of( "::" ); + if (cppScope != std::string::npos) elementName = elementName.substr( cppScope+1 ); + string keyName = ::Hurricane::demangle(typeid(CppK)); + cppScope = keyName.find_last_of( "::" ); + if (cppScope != std::string::npos) keyName = keyName.substr( cppScope+1 ); + + manager->_setTypeNames( "Map<" + keyName + "," + elementName + ">" ); + manager->_setupPyType(); + PyTypeObject* ob_type = manager->_getTypeObject(); + ob_type->tp_as_sequence = &(manager->_sequenceMethods); + ob_type->tp_as_mapping = &(manager->_mappingMethods); + ob_type->tp_iter = (getiterfunc)&::Isobar3::_tpIter; + + PyTypeManager::add< std::map >( module, manager ); + PyTypeManagerMapIterator::create( module, flags ); + + return manager; + } + + +} // Isobar3 namespace. + diff --git a/hurricane/src/configuration/hurricane/configuration/PyMaterial.h b/hurricane/src/configuration/hurricane/configuration/PyMaterial.h new file mode 100644 index 00000000..6ed245d1 --- /dev/null +++ b/hurricane/src/configuration/hurricane/configuration/PyMaterial.h @@ -0,0 +1,58 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | C o n f i g u r a t i o n D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/configuration/PyMaterial.h" | +// +-----------------------------------------------------------------+ + + +#pragma once +#include "hurricane/configuration/PyTypeManager.h" +#include "hurricane/BasicLayer.h" + + +namespace Isobar3 { + + +extern "C" { + + + extern PyMethodDef PyMaterial_Methods[]; + extern PyObject* PyMaterial_NEW ( PyTypeObject* pyType, PyObject* args, PyObject* kwargs ); + extern int PyMaterial_Init ( PyObject* self, PyObject* args, PyObject* kwargs ); + + +} // extern "C". + +} // Isobar3 namespace. + + +namespace Isobar3 { + + + template<> + inline void pyTypePostInit ( PyTypeObject* typeObject ) + { + addConstant( typeObject, "nWell" , BasicLayer::Material::nWell ); + addConstant( typeObject, "pWell" , BasicLayer::Material::pWell ); + addConstant( typeObject, "nImplant", BasicLayer::Material::nImplant ); + addConstant( typeObject, "pImplant", BasicLayer::Material::pImplant ); + addConstant( typeObject, "active" , BasicLayer::Material::active ); + addConstant( typeObject, "poly" , BasicLayer::Material::poly ); + addConstant( typeObject, "cut" , BasicLayer::Material::cut ); + addConstant( typeObject, "metal" , BasicLayer::Material::metal ); + addConstant( typeObject, "blockage", BasicLayer::Material::blockage ); + addConstant( typeObject, "info" , BasicLayer::Material::info ); + addConstant( typeObject, "other" , BasicLayer::Material::other ); + } + + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/hurricane/configuration/PyName.h b/hurricane/src/configuration/hurricane/configuration/PyName.h new file mode 100644 index 00000000..eb84e240 --- /dev/null +++ b/hurricane/src/configuration/hurricane/configuration/PyName.h @@ -0,0 +1,38 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | C o n f i g u r a t i o n D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/configuration/PyName.h" | +// +-----------------------------------------------------------------+ + + +#pragma once +#include "hurricane/configuration/PyTypeManager.h" +#include "hurricane/Name.h" + + +inline PyObject* cToPy ( Hurricane::Name name ) +{ return PyUnicode_FromString( getString(name).c_str() ); } + + +inline bool pyToC ( PyObject* pyArg, const Hurricane::Name* arg ) +{ +//std::cerr << "pyToC() called." << std::endl; + if (not PyUnicode_Check(pyArg)) return false; + PyObject* pyBytes = PyUnicode_AsASCIIString( pyArg ); + *(const_cast(arg)) = Hurricane::Name( PyBytes_AsString( pyBytes )); + Py_DECREF( pyBytes ); + return true; +} + + +inline bool pyToC ( PyObject* pyArg, Hurricane::Name* arg ) +{ return pyToC( pyArg, const_cast(arg) ); } diff --git a/hurricane/src/configuration/hurricane/configuration/PyParameter.h b/hurricane/src/configuration/hurricane/configuration/PyParameter.h index 3371d9c5..5444c75a 100644 --- a/hurricane/src/configuration/hurricane/configuration/PyParameter.h +++ b/hurricane/src/configuration/hurricane/configuration/PyParameter.h @@ -15,41 +15,157 @@ #pragma once -#include "hurricane/configuration/PyHurricane2.h" +#include "hurricane/configuration/PyTypeManager.h" #include "hurricane/configuration/Parameter.h" +#include "hurricane/configuration/ParameterWidget.h" -namespace Cfg2 { +namespace Cfg { extern "C" { -// ------------------------------------------------------------------- -// Python Object : "PyParameter". - typedef struct { - PyObject_HEAD - Parameter* _object; - } PyParameter; - - -// ------------------------------------------------------------------- -// Functions & Types exported to "PyConfiguration.cpp". - - extern PyTypeObject PyTypeParameter; extern PyMethodDef PyParameter_Methods[]; - -// extern PyObject* PyParameter_create ( PyObject* self, PyObject* args ); -// extern PyObject* PyParameter_Link ( Hurricane::Parameter* object ); -// extern void PyParameter_LinkPyType (); -// extern void PyParameter_postModuleInit (); - - -// #define IsPyParameter(v) ( (v)->ob_type == &PyTypeParameter ) -// #define PYCELLVIEWER(v) ( (PyParameter*)(v) ) -// #define PYCELLVIEWER_O(v) ( PYCELLVIEWER(v)->_object ) + extern PyMethodDef PyParameterPriority_Methods[]; + extern PyMethodDef PyParameterType_Methods[]; + extern PyMethodDef PyParameterFlags_Methods[]; + extern PyGetSetDef PyParameter_Getsets[]; } // extern "C". -} // Cfc namespace. +} // Cfg namespace. + + +inline bool pyToC ( PyObject* pyArg, Cfg::Parameter::Type* arg ) +{ + if (not PyLong_Check(pyArg)) return false; + long type = PyLong_AsLong( pyArg ); + switch ( type ) { + case Cfg::Parameter::Unknown: + case Cfg::Parameter::String: + case Cfg::Parameter::Bool: + case Cfg::Parameter::Int: + case Cfg::Parameter::Enumerate: + case Cfg::Parameter::Double: + case Cfg::Parameter::Percentage: + *arg = (Cfg::Parameter::Type)type; + break; + default: + return false; + } + return true; +} + + +inline bool pyToC ( PyObject* pyArg, Cfg::Parameter::Priority* arg ) +{ + if (not PyLong_Check(pyArg)) return false; + long priority = PyLong_AsLong( pyArg ); + switch ( priority ) { + case Cfg::Parameter::UseDefault: + case Cfg::Parameter::ApplicationBuiltin: + case Cfg::Parameter::ConfigurationFile: + case Cfg::Parameter::UserFile: + case Cfg::Parameter::CommandLine: + case Cfg::Parameter::Interactive: + *arg = (Cfg::Parameter::Priority)priority; + break; + default: + return false; + } + return true; +} + + +template<> +inline PyObject* cToPy( Cfg::Parameter::Type type ) +{ return Py_BuildValue( "i", type ); } + + +template<> +inline PyObject* cToPy( Cfg::Parameter::Priority pri ) +{ return Py_BuildValue( "i", pri ); } + + +template<> +inline PyObject* cToPy( Cfg::Parameter::Flags flags ) +{ return Py_BuildValue( "i", flags ); } + + +namespace Isobar3 { + + + template<> + inline void pyTypePostInit ( PyTypeObject* typeObject ) + { + // std::cerr << "pyTypePostInit()" << std::endl; + PyTypeManagerNonDBo::create( (PyObject*)typeObject + , Cfg::PyParameterPriority_Methods + , NULL + , PyTypeManager::NoCppDelete + , "Priority" + ); + PyTypeManagerNonDBo::create( (PyObject*)typeObject + , Cfg::PyParameterType_Methods + , NULL + , PyTypeManager::NoCppDelete + , "Type" + ); + PyTypeManagerNonDBo::create( (PyObject*)typeObject + , Cfg::PyParameterFlags_Methods + , NULL + , PyTypeManager::NoCppDelete + , "Flags" + ); + } + + + template<> + inline void pyTypePostInit ( PyTypeObject* typeObject ) + { + // Parameter::Priority enum. + addConstant( typeObject, "UseDefault" , Cfg::Parameter::UseDefault ); + addConstant( typeObject, "ApplicationBuiltin", Cfg::Parameter::ApplicationBuiltin ); + addConstant( typeObject, "ConfigurationFile" , Cfg::Parameter::ConfigurationFile ); + addConstant( typeObject, "UserFile" , Cfg::Parameter::UserFile ); + addConstant( typeObject, "CommandLine" , Cfg::Parameter::CommandLine ); + addConstant( typeObject, "Interactive" , Cfg::Parameter::Interactive ); + } + + + template<> + inline void pyTypePostInit ( PyTypeObject* typeObject ) + { + // Parameter::Type enum. + addConstant( typeObject, "Unknown" , Cfg::Parameter::Unknown ); + addConstant( typeObject, "String" , Cfg::Parameter::String ); + addConstant( typeObject, "Bool" , Cfg::Parameter::Bool ); + addConstant( typeObject, "Int" , Cfg::Parameter::Int ); + addConstant( typeObject, "Enumerate" , Cfg::Parameter::Enumerate ); + addConstant( typeObject, "Double" , Cfg::Parameter::Double ); + addConstant( typeObject, "Percentage", Cfg::Parameter::Percentage ); + } + + + template<> + inline void pyTypePostInit ( PyTypeObject* typeObject ) + { + // Parameter::Flags enum. + addConstant( typeObject, "HasMin" , Cfg::Parameter::HasMin ); + addConstant( typeObject, "HasMax" , Cfg::Parameter::HasMax ); + addConstant( typeObject, "IsFile" , Cfg::Parameter::IsFile ); + addConstant( typeObject, "IsPath" , Cfg::Parameter::IsPath ); + addConstant( typeObject, "NeedRestart" , Cfg::Parameter::NeedRestart ); + addConstant( typeObject, "MustExist" , Cfg::Parameter::MustExist ); + addConstant( typeObject, "TypeCheck" , Cfg::Parameter::TypeCheck ); + addConstant( typeObject, "FromString" , Cfg::Parameter::FromString ); + addConstant( typeObject, "AllRequirements", Cfg::Parameter::AllRequirements ); + addConstant( typeObject, "UseSpinBox" , Cfg::ParameterWidget::UseSpinBox ); + addConstant( typeObject, "IsFileName" , Cfg::ParameterWidget::IsFileName ); + addConstant( typeObject, "IsPathName" , Cfg::ParameterWidget::IsPathName ); + } + + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/hurricane/configuration/PyPoint.h b/hurricane/src/configuration/hurricane/configuration/PyPoint.h new file mode 100644 index 00000000..2ec8b888 --- /dev/null +++ b/hurricane/src/configuration/hurricane/configuration/PyPoint.h @@ -0,0 +1,35 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | C o n f i g u r a t i o n D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/configuration/PyPoint.h" | +// +-----------------------------------------------------------------+ + + +#pragma once +#include "hurricane/configuration/PyTypeManager.h" +#include "hurricane/Point.h" + + +namespace Isobar3 { + + +extern "C" { + + + extern PyMethodDef PyPoint_Methods[]; + extern PyObject* PyPoint_NEW ( PyTypeObject* pyType, PyObject* args, PyObject* kwargs ); + extern int PyPoint_Init ( PyObject* self, PyObject* args, PyObject* kwargs ); + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/hurricane/configuration/PyRegularLayer.h b/hurricane/src/configuration/hurricane/configuration/PyRegularLayer.h new file mode 100644 index 00000000..bd77656a --- /dev/null +++ b/hurricane/src/configuration/hurricane/configuration/PyRegularLayer.h @@ -0,0 +1,32 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | C o n f i g u r a t i o n D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/configuration/PyRegularLayer.h" | +// +-----------------------------------------------------------------+ + + +#pragma once +#include "hurricane/configuration/PyTypeManager.h" +#include "hurricane/RegularLayer.h" + + +namespace Isobar3 { + +extern "C" { + + + extern PyMethodDef PyRegularLayer_Methods[]; + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/hurricane/configuration/PyTechnology.h b/hurricane/src/configuration/hurricane/configuration/PyTechnology.h new file mode 100644 index 00000000..95b762f8 --- /dev/null +++ b/hurricane/src/configuration/hurricane/configuration/PyTechnology.h @@ -0,0 +1,33 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | C o n f i g u r a t i o n D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/configuration/PyTechnology.h" | +// +-----------------------------------------------------------------+ + + +#pragma once +#include "hurricane/configuration/PyTypeManager.h" +#include "hurricane/Technology.h" + + +namespace Isobar3 { + + +extern "C" { + + + extern PyMethodDef PyTechnology_Methods[]; + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/hurricane/configuration/PyTransistorLayer.h b/hurricane/src/configuration/hurricane/configuration/PyTransistorLayer.h new file mode 100644 index 00000000..1b24fa7c --- /dev/null +++ b/hurricane/src/configuration/hurricane/configuration/PyTransistorLayer.h @@ -0,0 +1,32 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | C o n f i g u r a t i o n D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/configuration/PyTransistorLayer.h" | +// +-----------------------------------------------------------------+ + + +#pragma once +#include "hurricane/configuration/PyTypeManager.h" +#include "hurricane/TransistorLayer.h" + + +namespace Isobar3 { + +extern "C" { + + + extern PyMethodDef PyTransistorLayer_Methods[]; + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/configuration/hurricane/configuration/PyTypeManager.h b/hurricane/src/configuration/hurricane/configuration/PyTypeManager.h new file mode 100644 index 00000000..8da5a6d3 --- /dev/null +++ b/hurricane/src/configuration/hurricane/configuration/PyTypeManager.h @@ -0,0 +1,2139 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2008-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | I s o b a r - Hurricane / Python Interface | +// | | +// | Authors : Jean-Paul CHAPUT | +// | Damien DUPUIS | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/isobar/PyTypeManager.h" | +// +-----------------------------------------------------------------+ + + +// Enable Python debugging. +// #define DEBUG 1 + +#pragma once +#include "Python.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include "hurricane/Bug.h" +#include "hurricane/Error.h" +#include "hurricane/Warning.h" +#include "hurricane/configuration/ProxyProperty.h" + +namespace Isobar3 { + + + using namespace std; + using Hurricane::Bug; + using Hurricane::Error; + using Hurricane::Warning; + using Hurricane::Exception; + using Hurricane::DBo; + + +extern "C" { + + + extern PyObject* ConstructorError; + extern PyObject* ProxyError; + extern PyObject* HurricaneError; + extern PyObject* HurricaneWarning; + extern PyObject* CoriolisError; + + + typedef struct { + PyObject_HEAD + void* _object1; + } PyOneVoid; + + + typedef struct { + PyObject_HEAD + void* _object1; // pointer to iterator. + PyObject* _object2; // pointer to container. + } PyTwoVoid; + + + extern void _tpDeAlloc ( PyObject* ); + extern PyObject* _tpStr ( PyObject* ); + extern long _tpHash ( PyObject* ); + extern Py_ssize_t _sqLength ( PyObject* ); + extern PyObject* _sqConcat ( PyObject* , PyObject* ); + extern PyObject* _sqRepeat ( PyObject* , Py_ssize_t ); + extern PyObject* _sqItem ( PyObject* , Py_ssize_t ); + extern int _sqContains ( PyObject*, PyObject* ); + extern Py_ssize_t _mpLength ( PyObject* ); + extern PyObject* _mpSubscript ( PyObject*, PyObject* ); + extern Py_ssize_t _mpLength ( PyObject* ); + extern PyObject* _tpIter ( PyObject* ); + extern PyObject* _tpIterNext ( PyObject* ); + + +} // "C" linkage. + + + inline PyOneVoid* asVPtr ( PyObject* o ) { return reinterpret_cast(o); } + inline PyTwoVoid* asIPtr ( PyObject* o ) { return reinterpret_cast(o); } + inline void*& object1 ( PyObject* o ) { return asVPtr(o)->_object1; } + inline void*& object1 ( PyOneVoid* o ) { return o->_object1; } + inline void*& object1 ( PyTwoVoid* o ) { return o->_object1; } + inline PyObject*& object2 ( PyObject* o ) { return asIPtr(o)->_object2; } + inline PyObject*& object2 ( PyTwoVoid* o ) { return o->_object2; } + + +// ------------------------------------------------------------------- +// PyTypeObject post-creation default hook. + + + inline void addConstant ( PyTypeObject* typeObject, std::string name, long value ) + { + PyObject* constant = PyLong_FromLong( value ); + PyDict_SetItemString( typeObject->tp_dict, name.c_str(), constant ); + Py_DECREF( constant ); + } + + + template< typename CppT > + inline void pyTypePostInit ( PyTypeObject* typeObject ) + { + //cerr << "pyTypePostInit() default for <" + // << demangle(typeid(CppT).name()) << ">." << endl; + } + + +// ------------------------------------------------------------------- +// PyTypeObject tp_richcompare various flavors. + + + template< typename CppT > + PyObject* tpRichCompareByPtr ( PyObject *self, PyObject* other, int op ) + { + if (Py_TYPE(self) != Py_TYPE(other)) { + std::string message = "tpRichCompareByPtr<" + getString(demangle(typeid(CppT).name())) + + "> cannot compare to \"" + Py_TYPE(other)->tp_name + "\"."; + PyErr_SetString( PyExc_TypeError, message.c_str() ); + return NULL; + } + CppT* cself = reinterpret_cast( object1(self ) ); + CppT* cother = reinterpret_cast( object1(other) ); + + bool result = false; + if ((op == Py_LT) and (cself < cother)) result = true; + if ((op == Py_LE) and (cself <= cother)) result = true; + if ((op == Py_EQ) and (cself == cother)) result = true; + if ((op == Py_NE) and (cself != cother)) result = true; + if ((op == Py_GT) and (cself > cother)) result = true; + if ((op == Py_GE) and (cself >= cother)) result = true; + + if (result) Py_RETURN_TRUE; + Py_RETURN_FALSE; + } + + + template< typename CppT > + PyObject* tpRichCompareByValue ( PyObject *self, PyObject* other, int op ) + { + if (Py_TYPE(self) != Py_TYPE(other)) { + std::string message = "tpRichCompareByValue<" + getString(demangle(typeid(CppT).name())) + + "> cannot compare to \"" + Py_TYPE(other)->tp_name + "\"."; + PyErr_SetString( PyExc_TypeError, message.c_str() ); + return NULL; + } + CppT* cself = reinterpret_cast( object1(self ) ); + CppT* cother = reinterpret_cast( object1(other) ); + + bool result = false; + if ((op == Py_LT) and ( cself < cother )) result = true; + if ((op == Py_LE) and ( cself <= cother )) result = true; + if ((op == Py_EQ) and ((*cself) == (*cother))) result = true; + if ((op == Py_NE) and ((*cself) != (*cother))) result = true; + if ((op == Py_GT) and ( cself > cother )) result = true; + if ((op == Py_GE) and ( cself >= cother )) result = true; + + if (result) Py_RETURN_TRUE; + Py_RETURN_FALSE; + } + + + template< typename CppT > + PyObject* tpRichCompareByDBo ( PyObject *self, PyObject* other, int op ) + { + if (Py_TYPE(self) != Py_TYPE(other)) { + std::string message = "getTpRichCompareByDBo<" + getString(demangle(typeid(CppT).name())) + + "> cannot compare to \"" + Py_TYPE(other)->tp_name + "\"."; + PyErr_SetString( PyExc_TypeError, message.c_str() ); + return NULL; + } + CppT* cself = reinterpret_cast( object1(self ) ); + CppT* cother = reinterpret_cast( object1(other) ); + + bool result = false; + if ((op == Py_LT) and (cself->getId() < cother->getId())) result = true; + if ((op == Py_LE) and (cself->getId() <= cother->getId())) result = true; + if ((op == Py_EQ) and (cself->getId() == cother->getId())) result = true; + if ((op == Py_NE) and (cself->getId() != cother->getId())) result = true; + if ((op == Py_GT) and (cself->getId() > cother->getId())) result = true; + if ((op == Py_GE) and (cself->getId() >= cother->getId())) result = true; + + if (result) Py_RETURN_TRUE; + Py_RETURN_FALSE; + } + + +// ------------------------------------------------------------------- +// Basic PyTypeObject & PyObject wrapper / manager. + + + class PyTypeManager { + public: + typedef std::map ManagerByCppTypes; + typedef std::map ManagerByPyTypes; + public: + static const uint64_t NoFlags = 0; + static const uint64_t IsDBo = (1 << 0); + static const uint64_t IsIterator = (1 << 1); + static const uint64_t NoCppDelete = (1 << 3); + public: + inline PyTypeManager ( PyMethodDef*, PyGetSetDef*, uint64_t flags ); + virtual ~PyTypeManager (); + public: + inline bool _isDBo () const; + inline bool _isIterator () const; + inline std::string _getCppTypeName () const; + inline std::string _getPyTypeName () const; + inline std::string _getTypeInfo () const; + inline PyTypeObject* _getTypeObject (); + inline PyMethodDef* _getMethods (); + inline PyGetSetDef* _getGetsets (); + void _setTypeNames ( std::string className ); + void _addToModule ( PyObject* ); + virtual void _getTpDeAlloc ( PyObject* ) = 0; + virtual PyObject* _getTpStr ( PyObject* ) = 0; + virtual long _getTpHash ( PyObject* ) = 0; + virtual Py_ssize_t _getSqLength ( PyObject* ); + virtual PyObject* _getSqConcat ( PyObject*, PyObject* ); + virtual PyObject* _getSqRepeat ( PyObject*, Py_ssize_t ); + virtual PyObject* _getSqItem ( PyObject*, Py_ssize_t ); + virtual int _getSqContains ( PyObject*, PyObject* ); + virtual Py_ssize_t _getMpLength ( PyObject* ); + virtual PyObject* _getMpSubscript ( PyObject*, PyObject* ); + virtual PyObject* _getTpIter ( PyObject* ); + virtual PyObject* _getTpIterNext ( PyObject* ); + virtual PyTypeManager* _getBaseManager (); + virtual void _setupPyType (); + inline void _setMethods ( PyMethodDef* ); + inline void _setTypeInfo ( std::string ); + public: + static inline ManagerByCppTypes& getManagerByCppTypes (); + inline uint64_t flags () const; + static inline PyTypeManager* get ( PyTypeObject* ); + template static inline bool hasType (); + template static inline PyTypeManager* _get (); + template static inline PyObject* link ( CppT* ); + template static void add ( PyObject*, PyTypeManager*, size_t hashCode=0 ); + private: + uint64_t _flags; + std::string _pyTypeName; + std::string _cppTypeName; + std::string _typeInfo; + PyTypeObject _typeObject; + PyMethodDef* _methods; + PyGetSetDef* _getsets; + private: + static ManagerByCppTypes _managerByCppTypes; + static ManagerByPyTypes _managerByPyTypes; + }; + + + inline PyTypeManager* PyTypeManager::get ( PyTypeObject* obType ) + { + auto element = _managerByPyTypes.find( obType ); + if (element == _managerByPyTypes.end()) + throw Error( "PyTypeManager::get(PyTypeObject*): Unregistered type <%s>." + , obType->tp_name ); + return (*element).second; + } + + + template inline bool PyTypeManager::hasType () + { + auto element = _managerByCppTypes.find( typeid(CppT).hash_code() ); + return (element != _managerByCppTypes.end()); + } + + + template inline PyTypeManager* PyTypeManager::_get () + { + auto element = _managerByCppTypes.find( typeid(CppT).hash_code() ); + if (element == _managerByCppTypes.end()) { + std::cerr << "PyTypeManager::_get(): Unregistered type <" + << demangle(typeid(CppT).name()) << ">." << std::endl; + for ( auto item : _managerByCppTypes ) { + std::cerr << "| " << std::setw(30) << std::right << item.first + << ":" << item.second->_getTypeInfo() << std::endl; + } + throw Error( "PyTypeManager::_get(): Unregistered type <%s>." + , demangle(typeid(CppT).name()).c_str() ); + } + return (*element).second; + } + + + inline PyTypeManager::PyTypeManager ( PyMethodDef *methods, PyGetSetDef* getsets, uint64_t flags ) + : _flags (flags) + , _pyTypeName () + , _cppTypeName () + , _typeInfo () + , _typeObject { PyVarObject_HEAD_INIT(&PyType_Type,0) + .tp_name = NULL + , .tp_basicsize = sizeof(PyOneVoid) + , .tp_itemsize = 0 + , .tp_dealloc = NULL +#if PY_VERSION_HEX < 0x03080000 + , .tp_print = NULL +#endif + , .tp_getattr = NULL + , .tp_setattr = NULL + , .tp_as_async = NULL + , .tp_repr = NULL + , .tp_as_number = NULL + , .tp_as_sequence = NULL + , .tp_as_mapping = NULL + , .tp_hash = NULL + , .tp_call = NULL + , .tp_str = NULL + , .tp_getattro = NULL + , .tp_setattro = NULL + , .tp_as_buffer = NULL + , .tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE + , .tp_doc = "Created through PyTypeManager" + } + , _methods (methods) + , _getsets (getsets) + { + if (_isIterator()) _typeObject.tp_basicsize = sizeof(PyTwoVoid); + } + + + inline bool PyTypeManager::_isDBo () const { return _flags & IsDBo; } + inline bool PyTypeManager::_isIterator () const { return _flags & IsIterator; } + inline std::string PyTypeManager::_getCppTypeName () const { return _cppTypeName; } + inline std::string PyTypeManager::_getPyTypeName () const { return _pyTypeName; } + inline PyTypeObject* PyTypeManager::_getTypeObject () { return &_typeObject; } + inline PyMethodDef* PyTypeManager::_getMethods () { return _methods; } + inline PyGetSetDef* PyTypeManager::_getGetsets () { return _getsets; } + inline uint64_t PyTypeManager::flags () const { return _flags; } + inline void PyTypeManager::_setMethods ( PyMethodDef* methods ) { _methods=methods; } + inline PyTypeManager::ManagerByCppTypes& + PyTypeManager::getManagerByCppTypes () { return _managerByCppTypes; } + inline std::string PyTypeManager::_getTypeInfo () const { return _typeInfo; } + inline void PyTypeManager::_setTypeInfo ( std::string ti ) { _typeInfo=ti; } + + + template< typename CppT > + void PyTypeManager::add ( PyObject* module, PyTypeManager* manager, size_t hashCode ) + { + if (ProxyProperty::getOffset() == (size_t)-1) + ProxyProperty::setOffset( offsetof( PyOneVoid, _object1 )); + + // std::cerr << "PyTypeManager::add<" << demangle(typeid(CppT).name()) + // << "> hash=" << std::type_index(typeid(CppT)).hash_code() + // << " manager=" << manager << std::endl; + if (not hashCode) hashCode = typeid(CppT).hash_code(); + _managerByCppTypes[ hashCode ] = manager; + _managerByPyTypes [ manager->_getTypeObject() ] = manager; + manager->_addToModule( module ); + pyTypePostInit( manager->_getTypeObject() ); + // std::cerr << "_managerByCppTypes.size()=" << _managerByCppTypes.size() << std::endl; + } + + +// ------------------------------------------------------------------- +// PyTypeObject & PyObject wrapper / manager. + + + template + class PyTypeManagerVTrunk : public PyTypeManager { + public: + inline PyTypeManagerVTrunk ( PyMethodDef*, PyGetSetDef*, uint64_t flags ); + virtual ~PyTypeManagerVTrunk (); + public: + template + inline bool _canDynamicCast ( BaseT* ) const; + virtual PyObject* _getTpStr ( PyObject* ); + virtual PyObject* _link ( CppT* ); + }; + + + template< typename CppT > + inline PyTypeManagerVTrunk::PyTypeManagerVTrunk ( PyMethodDef* methods, PyGetSetDef* getsets, uint64_t flags ) + : PyTypeManager(methods,getsets,flags) + { + _setTypeInfo( ::Hurricane::demangle( typeid(CppT).name() )); + } + + + template< typename CppT > + PyTypeManagerVTrunk::~PyTypeManagerVTrunk () { } + + + template< typename CppT > + template< typename BaseT > + bool PyTypeManagerVTrunk::_canDynamicCast ( BaseT *cppObject ) const + { return (dynamic_cast(cppObject) != NULL); } + + + template< typename CppT > + PyObject* PyTypeManagerVTrunk::_getTpStr ( PyObject *self ) + { + CppT* object = reinterpret_cast( object1(self) ); + if (not object) { + std::ostringstream repr; + repr << "<" << _getPyTypeName() << " [" << (void*)self << " <-> NULL] unbound>"; + return PyUnicode_FromString( repr.str().c_str() ); + } + return PyUnicode_FromString(getString(object).c_str() ); + } + + + template< typename CppT > + PyObject* PyTypeManagerVTrunk::_link ( CppT* object ) + { + if (not object) Py_RETURN_NONE; + + PyOneVoid* pyObject = NULL; + if (_isIterator()) + pyObject = (PyOneVoid*)PyObject_NEW( PyTwoVoid, _getTypeObject() ); + else + pyObject = PyObject_NEW( PyOneVoid, _getTypeObject() ); + if (pyObject == NULL) return NULL; + + object1(pyObject) = (void*)object; + cdebug_log(20,0) << "PyTypeManager::_link(): " << _getPyTypeName() << " " + << (void*)pyObject << ") " << (void*)object << ":" << object << std::endl; + + return (PyObject*)pyObject; + } + + +// PyTypeManager methods requiring PyTypeManagerVTrunk. + + template< typename CppT > + inline PyObject* PyTypeManager::link ( CppT* object ) + { + // std::cerr << "PyTypeManager::link() " << demangle(typeid(CppT).name()) + // << "* object = " << (void*)object << ":" << object << std::endl; + if (not object) Py_RETURN_NONE; + PyTypeManagerVTrunk* manager = dynamic_cast< PyTypeManagerVTrunk* >( _get() ); + // std::cerr << "_get()=" << _get() << endl; + // std::cerr << demangle(typeid(PyTypeManagerVTrunk*).name()) << endl; + if (not manager) + throw Error( "PyTypeManager::link(): No manager for type <%s>." + , demangle(typeid(CppT).name()).c_str() ); + return manager->_link( object ); + } + + +// ------------------------------------------------------------------- +// PyTypeObject & PyObject for non-DBo objects. + + + template + class PyTypeManagerNonDBo : public PyTypeManagerVTrunk { + public: + inline PyTypeManagerNonDBo ( PyMethodDef*, PyGetSetDef*, uint64_t flags ); + virtual ~PyTypeManagerNonDBo (); + public: + static PyTypeManagerNonDBo* create ( PyObject* module + , PyMethodDef* methods + , PyGetSetDef* getsets + , uint64_t flags + , std::string objectName="" + , newfunc tpNew =NULL + , initproc tpInit=NULL + , richcmpfunc tpRichCompare=tpRichCompareByPtr + , PyNumberMethods* tpAsNumber=NULL + ); + virtual void _getTpDeAlloc ( PyObject* ); + virtual long _getTpHash ( PyObject* ); + }; + + + template< typename CppT > + inline PyTypeManagerNonDBo::PyTypeManagerNonDBo ( PyMethodDef* methods, PyGetSetDef* getsets, uint64_t flags ) + : PyTypeManagerVTrunk(methods,getsets,flags) + { } + + + template< typename CppT > + PyTypeManagerNonDBo::~PyTypeManagerNonDBo () { } + + + template< typename CppT > + void PyTypeManagerNonDBo::_getTpDeAlloc ( PyObject* self ) + { + if (not (PyTypeManager::flags() & PyTypeManager::NoCppDelete)) + delete reinterpret_cast( object1(self) ); + PyObject_DEL( self ); + } + + + template< typename CppT > + long PyTypeManagerNonDBo::_getTpHash ( PyObject *self ) + { return (long)(object1(self)); } + + + template< typename CppT > + PyTypeManagerNonDBo* PyTypeManagerNonDBo::create ( PyObject* module + , PyMethodDef* methods + , PyGetSetDef* getsets + , uint64_t flags + , std::string objectName + , newfunc tpNew + , initproc tpInit + , richcmpfunc tpRichCompare + , PyNumberMethods* tpAsNumber ) + { + PyTypeManagerNonDBo* manager = new PyTypeManagerNonDBo( methods, getsets, flags ); + if (objectName.empty()) objectName = ::Hurricane::demangle(typeid(CppT)); + manager->_setTypeNames( objectName ); + manager->_setupPyType(); + PyTypeObject* ob_type = manager->_getTypeObject(); + if (tpNew ) ob_type->tp_new = tpNew; + if (tpInit) ob_type->tp_init = tpInit; + if (tpRichCompare) ob_type->tp_richcompare = tpRichCompare; + if (tpAsNumber) ob_type->tp_as_number = tpAsNumber; + PyTypeManager::add( module, manager ); + return manager; + } + + +// ------------------------------------------------------------------- +// PyTypeObject & PyObject for DBo objects. + + + template + class PyTypeManagerDBo : public PyTypeManagerVTrunk { + public: + using PyTypeManager::_getTypeObject; + inline PyTypeManagerDBo ( PyMethodDef*, PyGetSetDef*, uint64_t flags ); + virtual ~PyTypeManagerDBo (); + public: + static PyTypeManagerDBo* create ( PyObject* module + , PyMethodDef* methods + , PyGetSetDef* getsets + , uint64_t flags + , richcmpfunc tpRichCompare=tpRichCompareByDBo + ); + virtual PyObject* _link ( CppT* ); + virtual void _getTpDeAlloc ( PyObject* ); + virtual long _getTpHash ( PyObject* ); + }; + + + template< typename CppT > + inline PyTypeManagerDBo::PyTypeManagerDBo ( PyMethodDef* methods, PyGetSetDef* getsets, uint64_t flags ) + : PyTypeManagerVTrunk(methods,getsets,flags|PyTypeManager::IsDBo) + { } + + + template< typename CppT > + PyTypeManagerDBo::~PyTypeManagerDBo () { } + + + template< typename CppT > + PyObject* PyTypeManagerDBo::_link( CppT* object ) + { + if (not object) Py_RETURN_NONE; + + PyOneVoid* pyObject = NULL; + ProxyProperty* proxy = static_cast + ( object->getProperty ( ProxyProperty::getPropertyName() ) ); + + if (not proxy) { + pyObject = PyObject_NEW( PyOneVoid, _getTypeObject() ); + if (not pyObject) return NULL; + + proxy = ProxyProperty::create( (void*)pyObject ); + object1(pyObject) = (void*)object; + object->put( proxy ); + } else { + pyObject = (PyOneVoid*)proxy->getShadow (); + Py_INCREF( pyObject ); + } + cdebug_log(20,0) << "PyTypeManagerDBo<" << demangle(typeid(CppT).name()) << ">() " + << (void*)pyObject << " <-> " + << (void*)object << ":" << object << endl; + return (PyObject*)pyObject; + } + + + template< typename CppT > + void PyTypeManagerDBo::_getTpDeAlloc ( PyObject* self ) + { + DBo* object = reinterpret_cast( object1(self) ); + cdebug_log(20,0) << "PyTypeManager_DeAlloc(" << (void*)self << ") " + << object1(self) << ":" << object << endl; + + Isobar3::ProxyProperty* proxy = + static_cast( object->getProperty( Isobar3::ProxyProperty::getPropertyName() ) ); + + if (not proxy) { + ostringstream message; + message << "deleting a Python object with no Proxy attached "; + PyErr_SetString( ProxyError, message.str().c_str() ); + } + object->remove ( proxy ); + + PyObject_DEL( self ); + } + + + template< typename CppT > + long PyTypeManagerDBo::_getTpHash ( PyObject *self ) + { + DBo* object = reinterpret_cast( object1(self) ); + return object->getId(); + } + + + template< typename CppT > + PyTypeManagerDBo* PyTypeManagerDBo::create ( PyObject* module + , PyMethodDef* methods + , PyGetSetDef* getsets + , uint64_t flags + , richcmpfunc tpRichCompare ) + { + if (std::is_base_of::value) + throw ::Hurricane::Error( "PyManagerDBo::create(): The C++ class <%s> is *not* derived from DBo." + , ::Hurricane::demangle(typeid(CppT).name()).c_str() ); + + PyTypeManagerDBo* manager = new PyTypeManagerDBo ( methods, getsets, flags ); + manager->_setTypeNames( ::Hurricane::demangle(typeid(CppT)) ); + manager->_setupPyType(); + PyTypeObject* ob_type = manager->_getTypeObject(); + if (tpRichCompare) ob_type->tp_richcompare = tpRichCompare; + PyTypeManager::add( module, manager ); + return manager; + } + + +// ------------------------------------------------------------------- +// PyTypeObject & PyObject for DBo objects with inheritance. + + + template + class PyTypeManagerDerivedDBo : public PyTypeManagerDBo { + public: + using PyTypeManager::_getTypeObject; + inline PyTypeManagerDerivedDBo ( PyMethodDef*, PyGetSetDef*, uint64_t flags ); + virtual ~PyTypeManagerDerivedDBo (); + public: + static PyTypeManagerDerivedDBo* create ( PyObject* module + , PyMethodDef* methods + , PyGetSetDef* getsets + , uint64_t flags + , richcmpfunc tpRichCompare=tpRichCompareByDBo + ); + virtual PyTypeManager* _getBaseManager (); + private: + PyTypeManager* _baseManager; + }; + + + template< typename CppT, typename BaseT > + inline PyTypeManagerDerivedDBo::PyTypeManagerDerivedDBo ( PyMethodDef* methods, PyGetSetDef* getsets, uint64_t flags ) + : PyTypeManagerDBo(methods,getsets,flags|PyTypeManager::IsDBo) + , _baseManager(NULL) + { } + + + template< typename CppT, typename BaseT > + PyTypeManagerDerivedDBo::~PyTypeManagerDerivedDBo () { } + + + template< typename CppT, typename BaseT > + PyTypeManager* PyTypeManagerDerivedDBo::_getBaseManager () + { return _baseManager; } + + + template< typename CppT, typename BaseT > + PyTypeManagerDerivedDBo* PyTypeManagerDerivedDBo::create ( PyObject* module + , PyMethodDef* methods + , PyGetSetDef* getsets + , uint64_t flags + , richcmpfunc tpRichCompare ) + { + // if (not std::is_base_of::value) + // throw ::Hurricane::Error( "PyManagerDerivedDBo::create(): The C++ class <%s> is *not* derived from DBo." + // , ::Hurricane::demangle(typeid(CppT).name()).c_str() ); + if (not std::is_base_of::value) + throw ::Hurricane::Error( "PyManagerDerivedDBo::create(): The C++ class <%s> is *not* derived from <%s>." + , ::Hurricane::demangle(typeid(CppT ).name()).c_str() + , ::Hurricane::demangle(typeid(BaseT).name()).c_str() + ); + PyTypeManager* baseManager = PyTypeManager::_get(); + if (not baseManager) + throw ::Hurricane::Error( "PyManagerDerivedDBo::create(): The Python base class <%s> for <%s> has not been registered first." + , ::Hurricane::demangle(typeid(BaseT).name()).c_str() + , ::Hurricane::demangle(typeid(CppT ).name()).c_str() + ); + + PyTypeManagerDerivedDBo* manager = new PyTypeManagerDerivedDBo( methods, getsets, flags ); + manager->_baseManager = baseManager; + manager->_setTypeNames( ::Hurricane::demangle(typeid(CppT)) ); + manager->_setupPyType(); + PyTypeObject* ob_type = manager->_getTypeObject(); + if (tpRichCompare) ob_type->tp_richcompare = tpRichCompare; + ob_type->tp_base = baseManager->_getTypeObject(); + PyTypeManager::add( module, manager ); + return manager; + } + + +} // Isobar3 namespace. + + +// ------------------------------------------------------------------- +// Top level link template. + + +template< typename CppT > +inline PyObject* cToPy ( CppT object ) +{ + if (not Isobar3::PyTypeManager::hasType()) { + std::string message = "Overload for Isobar3::cToPy< " + + Hurricane::demangle(typeid(CppT).name()) + " >() Type not registered in the manager."; + PyErr_SetString( Isobar3::HurricaneError, message.c_str() ); + return NULL; + } + return Isobar3::PyTypeManager::link( new CppT (object) ); +} + + +template< typename CppT + , typename std::enable_if< !std::is_same::value + && !std::is_same::value + && !std::is_same::value + && !std::is_same::value,bool>::type = true > +inline PyObject* cToPy ( CppT* object ) +{ return Isobar3::PyTypeManager::link( object ); } + + +template< typename CppT + , typename std::enable_if< !std::is_same::value + && !std::is_same::value + && !std::is_same::value + && !std::is_same::value,bool>::type = true > +inline PyObject* cToPy ( const CppT* object ) +{ return Isobar3::PyTypeManager::link( const_cast( object )); } + + +template<> +inline PyObject* cToPy ( bool b ) +{ if (b) Py_RETURN_TRUE; Py_RETURN_FALSE; } + + +template<> inline PyObject* cToPy< std::string> ( std::string s ) { return PyUnicode_FromString( s.c_str() ); } +template<> inline PyObject* cToPy ( const std::string s ) { return PyUnicode_FromString( s.c_str() ); } +template<> inline PyObject* cToPy ( const std::string* s ) { return PyUnicode_FromString( s->c_str() ); } + +template<> inline PyObject* cToPy< int > ( int i ) { return PyLong_FromLong( i ); } +template<> inline PyObject* cToPy ( const int i ) { return PyLong_FromLong( i ); } +template<> inline PyObject* cToPy ( const int* i ) { return PyLong_FromLong( *i ); } + +template<> inline PyObject* cToPy< long > ( long l ) { return PyLong_FromLong( l ); } +template<> inline PyObject* cToPy ( const long l ) { return PyLong_FromLong( l ); } +template<> inline PyObject* cToPy ( const long* l ) { return PyLong_FromLong( *l ); } + +template<> inline PyObject* cToPy< float > ( float f ) { return PyFloat_FromDouble( f ); } +template<> inline PyObject* cToPy ( const float f ) { return PyFloat_FromDouble( f ); } +template<> inline PyObject* cToPy ( const float* f ) { return PyFloat_FromDouble( *f ); } + +template<> inline PyObject* cToPy< double > ( double d ) { return PyFloat_FromDouble( d ); } +template<> inline PyObject* cToPy ( const double d ) { return PyFloat_FromDouble( d ); } +template<> inline PyObject* cToPy ( const double* d ) { return PyFloat_FromDouble( *d ); } + + +// Forward declaration for PyVector.h +template< typename CppT > +inline PyObject* cToPy ( const typename std::vector::iterator* pit ) +{ return Isobar3::PyTypeManager::link< typename std::vector::iterator > + ( std::addressof(const_cast< typename std::vector::iterator* >(pit)) ); } + + +template< typename CppT > +inline PyObject* cToPy ( const std::vector& vobject ) +{ return Isobar3::PyTypeManager::link< std::vector >( std::addressof(const_cast< std::vector& >(vobject)) ); } + + +// Forward declaration for PyMap.h +template< typename CppK, typename CppT > +inline PyObject* cToPy ( const typename std::map::iterator* pit ) +{ return Isobar3::PyTypeManager::link< typename std::map::iterator > + ( std::addressof(const_cast< typename std::map::iterator* >(pit)) ); } + + +template< typename CppK, typename CppT > +inline PyObject* cToPy ( const std::map& vobject ) +{ + return Isobar3::PyTypeManager::link< std::map > + ( std::addressof(const_cast< std::map& >(vobject)) ); +} + + +// Forward declaration for PyCollection.h +template< typename CppT > +inline PyObject* cToPy ( const typename Hurricane::Locator* plocator ) +{ return Isobar3::PyTypeManager::link< typename Hurricane::Locator > + ( std::addressof(const_cast< typename Hurricane::Locator* >(plocator)) ); } + + +template< typename CppT > +inline PyObject* cToPy ( Hurricane::GenericCollection collection ) +{ + Hurricane::Collection* clone = collection.getClone(); + return Isobar3::PyTypeManager::link< Hurricane::Collection >( clone ); +} + + +namespace Isobar3 { + +// ------------------------------------------------------------------- +// Convert a template list of type into a runtime vector of objects +// of different types, with a base class (simpler std::any<>). +// +// * BaseArg : Common base to all templated arguments, so a table +// can be alloctated. +// * Arg : Template to hold an argument of type T. The stored +// attribute is ValueT, which is T sripped of it's +// const/volatile/reference qualifiers. +// Note: There is a limitation on possible T types, +// it must have a default constructor. +// * Args : A tailored fixed size array corresponding to their +// list of template types (in same sequential order). + + + class BaseArg { + public: + inline BaseArg () {}; + virtual ~BaseArg (); + }; + + + template< typename T > + class Arg : public BaseArg { + public: + typedef typename remove_cv< remove_reference >::type::type ValueT; + public: + inline Arg () : BaseArg(), _element() { } + inline Arg ( T element ) : BaseArg(), _element(element) { } + virtual ~Arg (); + inline ValueT& as () { return _element; } + inline T as_exact () { return _element; } + private: + ValueT _element; + }; + + + template< typename T > Arg::~Arg () + { } + + + template< typename... Ts > + class Args { + public: + Args (); + ~Args (); + inline size_t size () const { return sizeof...(Ts); } + bool parse ( PyObject* pyArgs[], std::string message ); + BaseArg* operator[] ( size_t index ) { return _args[index]; } + template T at ( size_t ); + private: + BaseArg** _args; + }; + + + template< size_t index > void init_args ( BaseArg** args ) + { } + + + template< size_t index, typename T, typename... Tail > + void init_args ( BaseArg** args ) + { + args[index] = new Arg (); + init_args( args ); + } + + + template< typename... Ts > + Args::Args () + : _args(NULL) + { + if (size()) { + _args = new BaseArg* [ size() ]; + init_args<0,Ts...>( _args ); + } + } + + + template< typename... Ts > + Args::~Args () + { + if (not _args) return; + for ( size_t i=0 ; i + template + T Args::at ( size_t index ) + { return dynamic_cast< Arg* >( _args[index] )->as(); } + + + template + typename Arg::ValueT& as ( BaseArg* arg ) + { return dynamic_cast< Arg* >(arg)->as(); } + + + template + T as_exact ( BaseArg* arg ) + { return dynamic_cast< Arg* >(arg)->as_exact(); } + + +// Args::parse() is delayed until pyToC<> is defined. + + +// ------------------------------------------------------------------- +// Wrap C++ function call to pass arguments through a Args<>. + + +// Flavor for "return by value" (seems to match std::is_object<>) + template< typename TR, typename... TArgsF, typename... TArgsW + , typename std::enable_if< !std::is_reference::value + && !std::is_pointer ::value + && !std::is_void ::value,bool>::type = true > + inline PyObject* _callFunctionReturn ( TR(* func)(TArgsF...), TArgsW... args ) + { + TR value = func( args... ); + return cToPy( value ); + } + + +// Flavor for "return by reference". + template< typename TR, typename... TArgsF, typename... TArgsW + , typename std::enable_if< std::is_reference::value + && !std::is_pointer ::value + && !std::is_void ::value,bool>::type = true > + inline PyObject* _callFunctionReturn ( TR(* func)(TArgsF...), TArgsW... args ) + { + TR rvalue = func( args... ); + return cToPy( rvalue ); + } + + +// Flavor for "return by pointer". + template< typename TR, typename... TArgsF, typename... TArgsW + , typename std::enable_if::value,bool>::type = true > + inline PyObject* _callFunctionReturn ( TR(* func)(TArgsF...), TArgsW... args ) + { + TR pvalue = func( args... ); + return cToPy( pvalue ); + } + + +// Flavor for "return void". + template< typename TR, typename... TArgsF, typename... TArgsW + , typename std::enable_if::value,bool>::type = true > + inline PyObject* _callFunctionReturn ( TR(* func)(TArgsF...), TArgsW... args ) + { + func( args... ); + Py_RETURN_NONE; + } + + + template< typename TR > + PyObject* _callFunction ( TR(* func)(), Args<>& args ) + { return _callFunctionReturn( func ); } + + + template< typename TR, typename TA0 > + PyObject* _callFunction ( TR(* func)(TA0), Args& args ) + { return _callFunctionReturn( func, as( args[0] )); } + + + template< typename TR, typename TA0, typename TA1 > + PyObject* _callFunction ( TR(* func)(TA0,TA1), Args& args ) + { return _callFunctionReturn( func, as( args[0] ), as( args[1] ) ); } + + + template< typename TR, typename TA0, typename TA1, typename TA2 > + PyObject* _callFunction ( TR(* func)(TA0,TA1,TA2), Args& args ) + { return _callFunctionReturn( func, as( args[0] ), as( args[1] ), as( args[2] ) ); } + + + template< typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 > + PyObject* _callFunction ( TR(* func)(TA0,TA1,TA2,TA3), Args& args ) + { return _callFunctionReturn( func, as( args[0] ) + , as( args[1] ) + , as( args[2] ) + , as( args[3] ) ); } + + + template< typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 > + PyObject* _callFunction ( TR(* func)(TA0,TA1,TA2,TA3,TA4), Args& args ) + { return _callFunctionReturn( func, as( args[0] ) + , as( args[1] ) + , as( args[2] ) + , as( args[3] ) + , as( args[4] ) ); } + + + template< typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 > + PyObject* _callFunction ( TR(* func)(TA0,TA1,TA2,TA3,TA4,TA5), Args& args ) + { return _callFunctionReturn( func, as( args[0] ) + , as( args[1] ) + , as( args[2] ) + , as( args[3] ) + , as( args[4] ) + , as( args[5] ) ); } + + + template< typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 > + PyObject* _callFunction ( TR(* func)(TA0,TA1,TA2,TA3,TA4,TA5,TA6), Args& args ) + { return _callFunctionReturn( func, as( args[0] ) + , as( args[1] ) + , as( args[2] ) + , as( args[3] ) + , as( args[4] ) + , as( args[5] ) + , as( args[6] ) ); } + + + template< typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 + , typename TA7 > + PyObject* _callFunction ( TR(* func)(TA0,TA1,TA2,TA3,TA4,TA5,TA6,TA7), Args& args ) + { return _callFunctionReturn( func, as( args[0] ) + , as( args[1] ) + , as( args[2] ) + , as( args[3] ) + , as( args[4] ) + , as( args[5] ) + , as( args[6] ) + , as( args[7] ) ); } + + + template< typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 + , typename TA7 + , typename TA8 > + PyObject* _callFunction ( TR(* func)(TA0,TA1,TA2,TA3,TA4,TA5,TA6,TA7,TA8), Args& args ) + { return _callFunctionReturn( func, as( args[0] ) + , as( args[1] ) + , as( args[2] ) + , as( args[3] ) + , as( args[4] ) + , as( args[5] ) + , as( args[6] ) + , as( args[7] ) + , as( args[8] ) ); } + + + template< typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 + , typename TA7 + , typename TA8 + , typename TA9 > + PyObject* _callFunction ( TR(* func)(TA0,TA1,TA2,TA3,TA4,TA5,TA6,TA7,TA8,TA9), Args& args ) + { return _callFunctionReturn( func, as( args[0] ) + , as( args[1] ) + , as( args[2] ) + , as( args[3] ) + , as( args[4] ) + , as( args[5] ) + , as( args[6] ) + , as( args[7] ) + , as( args[8] ) + , as( args[9] ) ); } + + +// ------------------------------------------------------------------- +// Wrap C++ member method call to pass arguments through a tuple<>. + + +// Flavor for "return by value" (seems to match std::is_object<>) + template< typename TC, typename TR, typename... TArgsF, typename... TArgsW + , typename std::enable_if< !std::is_reference::value + && !std::is_pointer ::value + && !std::is_void ::value,bool>::type = true > + inline PyObject* _callMethodReturn ( TR(TC::* method)(TArgsF...), TC* cppObject, TArgsW... args ) + { + // std::cerr << "_callMethodReturn() By value, TR=<" << demangle(typeid(TR).name()) << ">" << std::endl; + TR value = (cppObject->*method)( args... ); + return cToPy( value ); + } + + +// Flavor for "return by reference" + template< typename TC, typename TR, typename... TArgsF, typename... TArgsW + , typename std::enable_if< std::is_reference::value + && !std::is_pointer ::value + && !std::is_void ::value,bool>::type = true > + inline PyObject* _callMethodReturn ( TR(TC::* method)(TArgsF...), TC* cppObject, TArgsW... args ) + { + // std::cerr << "_callMethodReturn() By reference, TR=<" << demangle(typeid(TR).name()) << ">" << std::endl; + TR rvalue = (cppObject->*method)( args... ); + return cToPy( rvalue ); + } + + +// Flavor for "return by pointer". + template< typename TC, typename TR, typename... TArgsF, typename... TArgsW + , typename std::enable_if::value,bool>::type = true > + inline PyObject* _callMethodReturn ( TR(TC::* method)(TArgsF...), TC* cppObject, TArgsW... args ) + { + TR pvalue = (cppObject->*method)( args... ); + return cToPy( pvalue ); + } + + +// Flavor for "return void". + template< typename TC, typename TR, typename... TArgsF, typename... TArgsW + , typename std::enable_if::value,bool>::type = true > + inline PyObject* _callMethodReturn ( TR(TC::* method)(TArgsF...), TC* cppObject, TArgsW... args ) + { + (cppObject->*method)( args... ); + Py_RETURN_NONE; + } + + + template< typename TC, typename TR > + inline PyObject* _callMethod ( TR(TC::* method)(), TC* cppObject, Args<>& ) + { return _callMethodReturn( method, cppObject ); } + + + template< typename TC, typename TR, typename TA0 > + inline PyObject* _callMethod ( TR(TC::* method)(TA0), TC* cppObject, Args& args ) + { return _callMethodReturn( method, cppObject, as( args[0] ) ); } + + + template< typename TC, typename TR, typename TA0, typename TA1 > + PyObject* _callMethod ( TR(TC::* method)(TA0,TA1), TC* cppObject, Args& args ) + { return _callMethodReturn( method, cppObject, as( args[0] ), as( args[1] ) ); } + + + template< typename TC, typename TR, typename TA0, typename TA1, typename TA2 > + inline PyObject* _callMethod ( TR(TC::* method)(TA0,TA1,TA2), TC* cppObject, Args& args ) + { return _callMethodReturn( method, cppObject, as( args[0] ), as( args[1] ), as( args[2] ) ); } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 > + inline PyObject* _callMethod ( TR(TC::* method)(TA0,TA1,TA2,TA3) + , TC* cppObject, Args& args ) + { + return _callMethodReturn( method, cppObject, as( args[0] ) + , as( args[1] ) + , as( args[2] ) + , as( args[3] ) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 > + inline PyObject* _callMethod ( TR(TC::* method)(TA0,TA1,TA2,TA3,TA4) + , TC* cppObject, Args& args ) + { + return _callMethodReturn( method, cppObject, as( args[0] ) + , as( args[0] ) + , as( args[0] ) + , as( args[0] ) + , as( args[0] ) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 > + inline PyObject* _callMethod ( TR(TC::* method)(TA0,TA1,TA2,TA3,TA4,TA5) + , TC* cppObject, Args& args ) + { + return _callMethodReturn( method, cppObject, as( args[0] ) + , as( args[1] ) + , as( args[2] ) + , as( args[3] ) + , as( args[4] ) + , as( args[5] ) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 > + inline PyObject* _callMethod ( TR(TC::* method)(TA0,TA1,TA2,TA3,TA4,TA5,TA6) + , TC* cppObject, Args& args ) + { + return _callMethodReturn( method, cppObject, as( args[0] ) + , as( args[1] ) + , as( args[2] ) + , as( args[3] ) + , as( args[4] ) + , as( args[5] ) + , as( args[6] ) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 + , typename TA7 > + inline PyObject* _callMethod ( TR(TC::* method)(TA0,TA1,TA2,TA3,TA4,TA5,TA6,TA7) + , TC* cppObject, Args& args ) + { + return _callMethodReturn( method, cppObject, as( args[0] ) + , as( args[1] ) + , as( args[2] ) + , as( args[3] ) + , as( args[4] ) + , as( args[5] ) + , as( args[6] ) + , as( args[7] ) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 + , typename TA7 + , typename TA8 > + inline PyObject* _callMethod ( TR(TC::* method)(TA0,TA1,TA2,TA3,TA4,TA5,TA6,TA7,TA8) + , TC* cppObject, Args& args ) + { + return _callMethodReturn( method, cppObject, as( args[0] ) + , as( args[1] ) + , as( args[2] ) + , as( args[3] ) + , as( args[4] ) + , as( args[5] ) + , as( args[6] ) + , as( args[7] ) + , as( args[8] ) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 + , typename TA7 + , typename TA8 + , typename TA9 > + inline PyObject* _callMethod ( TR(TC::* method)(TA0,TA1,TA2,TA3,TA4,TA5,TA6,TA7,TA8,TA9) + , TC* cppObject, Args& args ) + { + return _callMethodReturn( method, cppObject, as( args[0] ) + , as( args[1] ) + , as( args[2] ) + , as( args[3] ) + , as( args[4] ) + , as( args[5] ) + , as( args[6] ) + , as( args[7] ) + , as( args[8] ) + , as( args[9] ) ); + } + + +// ------------------------------------------------------------------- +// Wrap C++ member method call as function to pass arguments through a tuple<>. + + +// Flavor for "return by value" (seems to match std::is_object<>) + template< typename TC, typename TR, typename... TArgsF, typename... TArgsW + , typename std::enable_if< !std::is_reference::value + && !std::is_pointer ::value + && !std::is_void ::value,bool>::type = true > + inline PyObject* _callFMethodReturn ( TR(* fmethod)(TC*,TArgsF...), TC* cppObject, TArgsW... args ) + { + TR value = fmethod( cppObject, args... ); + return cToPy( value ); + } + + +// Flavor for "return by reference" + template< typename TC, typename TR, typename... TArgsF, typename... TArgsW + , typename std::enable_if< std::is_reference::value + && !std::is_pointer ::value + && !std::is_void ::value,bool>::type = true > + inline PyObject* _callFMethodReturn ( TR(* fmethod)(TC*,TArgsF...), TC* cppObject, TArgsW... args ) + { + TR rvalue = fmethod( cppObject, args... ); + return cToPy( rvalue ); + } + + +// Flavor for "return by pointer". + template< typename TC, typename TR, typename... TArgsF, typename... TArgsW + , typename std::enable_if::value,bool>::type = true > + inline PyObject* _callFMethodReturn ( TR(* fmethod)(TC*,TArgsF...), TC* cppObject, TArgsW... args ) + { + TR pvalue = fmethod( cppObject, args... ); + return cToPy( pvalue ); + } + + +// Flavor for "return void". + template< typename TC, typename TR, typename... TArgsF, typename... TArgsW + , typename std::enable_if::value,bool>::type = true > + inline PyObject* _callFMethodReturn ( TR(* fmethod)(TC*,TArgsF...), TC* cppObject, TArgsW... args ) + { + fmethod( cppObject, args... ); + Py_RETURN_NONE; + } + + + template< typename TC, typename TR > + inline PyObject* _callMethod ( TR(* fmethod)(TC*), TC* cppObject, Args<>& ) + { return _callFMethodReturn( fmethod, cppObject ); } + + + template< typename TC, typename TR, typename TA0 > + inline PyObject* _callMethod ( TR(* fmethod)(TC*,TA0), TC* cppObject, Args& args ) + { return _callFMethodReturn( fmethod, cppObject, as(args[0]) ); } + + + template< typename TC, typename TR, typename TA0, typename TA1 > + inline PyObject* _callMethod ( TR(* fmethod)(TC*,TA0,TA1), TC* cppObject, Args& args ) + { return _callFMethodReturn( fmethod, cppObject, as(args[0]), as(args[1]) ); } + + + template< typename TC, typename TR, typename TA0, typename TA1, typename TA2 > + inline PyObject* _callMethod ( TR(* fmethod)(TC*,TA0,TA1,TA2), TC* cppObject, Args& args ) + { + // cerr << "_callMethod3 (function)" << endl; + PyObject* object = _callFMethodReturn( fmethod, cppObject, as(args[0]) + , as(args[1]) + , as(args[2]) ); + // cerr << "done" << endl; + return object; + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 > + inline PyObject* _callMethod ( TR(* fmethod)(TC*,TA0,TA1,TA2,TA3) + , TC* cppObject, Args& args ) + { + // cerr << "_callMethod4 (function)" << endl; + return _callFMethodReturn( fmethod, cppObject, as(args[0]) + , as(args[1]) + , as(args[2]) + , as(args[3]) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 > + inline PyObject* _callMethod ( TR(* fmethod)(TC*,TA0,TA1,TA2,TA3,TA4) + , TC* cppObject, Args& args ) + { + // cerr << "_callMethod5 (function)" << endl; + return _callFMethodReturn( fmethod, cppObject, as(args[0]) + , as(args[1]) + , as(args[2]) + , as(args[3]) + , as(args[4]) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 > + inline PyObject* _callMethod ( TR(* fmethod)(TC*,TA0,TA1,TA2,TA3,TA4,TA5) + , TC* cppObject, Args& args ) + { + //std::cerr << "_callMethod6 (function)" << std::endl; + return _callFMethodReturn( fmethod, cppObject, as(args[0]) + , as(args[1]) + , as(args[2]) + , as(args[3]) + , as(args[4]) + , as(args[5]) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 > + inline PyObject* _callMethod ( TR(* fmethod)(TC*,TA0,TA1,TA2,TA3,TA4,TA5,TA6) + , TC* cppObject, Args& args ) + { + // cerr << "_callMethod7 (function)" << endl; + return _callFMethodReturn( fmethod, cppObject, as(args[0]) + , as(args[1]) + , as(args[2]) + , as(args[3]) + , as(args[4]) + , as(args[5]) + , as(args[6]) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 + , typename TA7 > + inline PyObject* _callMethod ( TR(* fmethod)(TC*,TA0,TA1,TA2,TA3,TA4,TA5,TA6,TA7) + , TC* cppObject, Args& args ) + { + // cerr << "_callMethod8 (function)" << endl; + return _callFMethodReturn( fmethod, cppObject, as( args[0] ) + , as( args[1] ) + , as( args[2] ) + , as( args[3] ) + , as( args[4] ) + , as( args[5] ) + , as( args[6] ) + , as( args[7] ) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 + , typename TA7 + , typename TA8 > + inline PyObject* _callMethod ( TR(* fmethod)(TC*,TA0,TA1,TA2,TA3,TA4,TA5,TA6,TA7,TA8) + , TC* cppObject, Args& args ) + { + // cerr << "_callMethod9 (function)" << endl; + return _callFMethodReturn( fmethod, cppObject, as( args[0] ) + , as( args[1] ) + , as( args[2] ) + , as( args[3] ) + , as( args[4] ) + , as( args[5] ) + , as( args[6] ) + , as( args[7] ) + , as( args[8] ) ); + } + + + template< typename TC + , typename TR + , typename TA0 + , typename TA1 + , typename TA2 + , typename TA3 + , typename TA4 + , typename TA5 + , typename TA6 + , typename TA7 + , typename TA8 + , typename TA9 > + inline PyObject* _callMethod ( TR(* fmethod)(TC*,TA0,TA1,TA2,TA3,TA4,TA5,TA6,TA7,TA8,TA9) + , TC* cppObject, Args& args ) + { + // cerr << "_callMethod10 (function)" << endl; + return _callFMethodReturn( fmethod, cppObject, as( args[0] ) + , as( args[1] ) + , as( args[2] ) + , as( args[3] ) + , as( args[4] ) + , as( args[5] ) + , as( args[6] ) + , as( args[7] ) + , as( args[8] ) + , as( args[9] ) ); + } + + +} // Isobar3 namespace. + +// ------------------------------------------------------------------- +// Standard Python to C types converters. + + +template< typename T + , typename std::enable_if< !std::is_pointer::value, bool >::type = true > +inline bool pyToC ( PyObject* pyArg, T* arg ) +{ + typedef typename std::remove_cv::type NonConstT; + Isobar3::PyTypeManager* manager = Isobar3::PyTypeManager::_get(); + if (not manager) { + std::cerr << "Isobar3::pyToC<>(const T*): Unsupported type." << std::endl; + return false; + } + if (Py_TYPE(pyArg) != manager->_getTypeObject()) return false; + *(const_cast< NonConstT* >(arg)) = *(( T* )( Isobar3::object1( pyArg ))); + return true; +} + + +template +inline bool pyToC ( PyObject* pyArg, T** arg ) +{ + Isobar3::PyTypeManager* manager = Isobar3::PyTypeManager::_get(); + if (not manager) { + std::cerr << "Isobar3::pyToC(T*&): Unsupported type \"" << typeid(T).name() << "\"" << std::endl; + return false; + } + // std::cerr << "pyToC< " << demangle(typeid(T).name()) << " >() called." << std::endl; + *arg = (T*)( Isobar3::object1( pyArg )); + return true; +} + + +inline bool pyToC ( PyObject* pyArg, std::string* arg ) +{ + if (not PyUnicode_Check(pyArg)) return false; + PyObject* pyBytes = PyUnicode_AsASCIIString( pyArg ); + *arg = PyBytes_AsString( pyBytes ); + Py_DECREF( pyBytes ); + return true; +} + + +inline bool pyToC ( PyObject* pyArg, bool* arg ) +{ + if (not PyBool_Check(pyArg)) return false; + *arg = (pyArg == Py_True); + return true; +} + + +inline bool pyToC ( PyObject* pyArg, int* arg ) +{ + if (PyLong_Check(pyArg)) { *arg = PyLong_AsLong( pyArg ); } + else return false; + return true; +} + + +inline bool pyToC ( PyObject* pyArg, unsigned int* arg ) +{ + if (PyLong_Check(pyArg)) { *arg = PyLong_AsLong( pyArg ); } + else return false; + return true; +} + + +inline bool pyToC ( PyObject* pyArg, unsigned long* arg ) +{ + if (not PyLong_Check(pyArg)) return false; + *arg = PyLong_AsLong( pyArg ); + return true; +} + + +inline bool pyToC ( PyObject* pyArg, unsigned long long* arg ) +{ + if (not PyLong_Check(pyArg)) return false; + *arg = PyLong_AsLongLong( pyArg ); + return true; +} + + +inline bool pyToC ( PyObject* pyArg, long* arg ) +{ + if (not PyLong_Check(pyArg)) return false; + *arg = PyLong_AsLong( pyArg ); + return true; +} + + +inline bool pyToC ( PyObject* pyArg, float* arg ) +{ + if (not PyFloat_Check(pyArg)) return false; + *arg = PyFloat_AsDouble( pyArg ); + return true; +} + + +inline bool pyToC ( PyObject* pyArg, double* arg ) +{ + if (not PyFloat_Check(pyArg)) return false; + *arg = PyFloat_AsDouble( pyArg ); + return true; +} + + +namespace Isobar3 { + +// Complete Args template definition. + + template< size_t index > + void parse_pyobjects ( PyObject* [], BaseArg**, bool&, std::string, size_t count=0 ) + { } + + + template< size_t index, typename T, typename... Tail > + void parse_pyobjects ( PyObject* pyArgs[] + , BaseArg** args + , bool& success + , std::string message + , size_t count=0 ) + { + const std::string nth[] = { "First", "Second" , "Third", "Fourth", "Fifth" + , "Sixth", "Seventh", "Eight", "Ninth" , "Tenth" }; + + //std::cerr << "Calling pyToC<" << demangle(typeid(typename Arg::ValueT).name()) << ">" << std::endl; + //std::cerr << "Calling pyToC<" << demangle(typeid(&(as( args[count]))).name()) << ">" << std::endl; + //success = success and pyToC< typename Arg::ValueT >( pyArgs[count] + // , &(as( args[count])) ); + success = success and pyToC( pyArgs[count], &(as( args[count])) ); + //std::cerr << "success=" << success << std::endl; + if (not success) { + message += "\n " + getString(nth) + " X argument is not convertible to \"" + Hurricane::demangle(typeid(T).name()) + "\"."; + PyErr_SetString( Isobar3::ConstructorError, message.c_str() ); + } else { + parse_pyobjects( pyArgs, args, success, message, count+1 ); + } + } + + + template< typename... Ts > + bool Args::parse ( PyObject* pyArgs[], string message ) + { + bool success = true; + parse_pyobjects<0,Ts...>( pyArgs, _args, success, message ); + return success; + } + + +// ------------------------------------------------------------------- +// C++ Exception Wrapper. + + + class PyWrapper { + public: + inline PyWrapper (); + virtual ~PyWrapper (); + inline std::string& message (); + inline PyObject* call ( PyObject* self, PyObject* args ); + inline PyObject* call ( PyObject* args ); + inline int predicate ( PyObject* self ); + virtual PyObject* _call ( PyObject* self, PyObject* args ); + virtual PyObject* _call ( PyObject* args ); + virtual int _predicate ( PyObject* self ); + inline void setMessage ( std::string header ); + private: + std::string _message; + }; + + + extern PyObject* exceptionWrapper ( PyWrapper* wrapper, PyObject* self, PyObject* args ); + extern PyObject* exceptionWrapper ( PyWrapper* wrapper, PyObject* args ); + extern int exceptionPredicateWrapper ( PyWrapper* wrapper, PyObject* self ); + + inline PyWrapper::PyWrapper () : _message("Wrapper(): Base class.") {} + inline std::string& PyWrapper::message () { return _message; } + inline void PyWrapper::setMessage ( std::string header ) { _message = header; } + inline PyObject* PyWrapper::call ( PyObject* self, PyObject* args ) { return exceptionWrapper( this, self, args ); } + inline PyObject* PyWrapper::call ( PyObject* args ) { return exceptionWrapper( this, args ); } + inline int PyWrapper::predicate ( PyObject* self ) { return exceptionPredicateWrapper( this, self ); } + + +// ------------------------------------------------------------------- +// C++ Function Wrapper. + + + template< typename TR, typename... TArgs > + class PyFunctionWrapper : public PyWrapper { + public: + typedef TR(* FunctionType )(TArgs...); + public: + inline PyFunctionWrapper ( std::string fname, FunctionType method ) + : PyWrapper(), _funcName(fname), _method(method) { }; + inline std::string funcName () const { return _funcName; }; + virtual PyObject* _call ( PyObject* fargs ); + private: + std::string _funcName; + FunctionType _method; + }; + + + template< typename TR, typename... TArgs > + PyObject* PyFunctionWrapper::_call ( PyObject* fargs ) + { + PyErr_Clear(); + //std::cerr << "_call() " << demangle(typeid(FunctionType).name()) << std::endl; + + setMessage( funcName() + "(): " ); + bool success = true; + size_t nargs = sizeof...(TArgs); + if (nargs >= 10) + throw Error( "Isobar3::PyFunctionWrapper<>() support 10 arguments at most (%d requesteds).", nargs ); + + Args cppArgs; + if (nargs) { + //cerr << "Converting " << nargs << " arguments." << endl; + std::string format; + for ( size_t i=0 ; i( _method, cppArgs ); + } + + message() += "\n Prototype \"" + demangle(typeid(FunctionType).name()) + "\"."; + PyErr_SetString( HurricaneError, message().c_str() ); + return NULL; + } + + +// ------------------------------------------------------------------- +// C++ Method Wrappers, variadic number of arguments. + + template< typename TC, typename TR, typename... TArgs > + class PyMethodWrapper : public PyWrapper { + public: + typedef TR(TC::* OMethodType )(TArgs...); + typedef TR(* FMethodType )(TC*,TArgs...); + public: + inline PyMethodWrapper ( std::string fname, OMethodType method ) + : PyWrapper() + , _funcName(fname) + , _oMethod(method) + , _fMethod(NULL) + { }; + inline PyMethodWrapper ( std::string fname, FMethodType method ) + : PyWrapper() + , _funcName(fname) + , _oMethod(NULL) + , _fMethod(method) + { }; + inline std::string funcName () const { return _funcName; }; + virtual PyObject* _call ( PyObject* self, PyObject* fargs ); + private: + std::string _funcName; + OMethodType _oMethod; + FMethodType _fMethod; + }; + + + template< typename TC, typename TR, typename... TArgs > + inline PyObject* PyMethodWrapper::_call ( PyObject* self, PyObject* fargs ) + { + PyErr_Clear(); + size_t nargs = sizeof...(TArgs); + if (nargs >= 10) + throw Error( "Isobar3::PyMethodWrapper<>() support 10 arguments at most (%d requesteds).", nargs ); + + setMessage( funcName() + "(): " ); + bool success = true; + TC* cppObject = static_cast( object1(self) ); + PyObject* rvalue = NULL; + Args cppArgs; + if (nargs) { + std::string format; + for ( size_t i=0 ; i + class PyMBinaryWrapper : public PyWrapper { + public: + typedef TC(TC::* OMethodType )(TArg); + public: + inline PyMBinaryWrapper ( std::string fname, OMethodType mbinary ) + : PyWrapper() + , _funcName(fname) + , _oMethod(mbinary) + { }; + inline std::string funcName () const { return _funcName; }; + virtual PyObject* _call ( PyObject* self, PyObject* arg ); + private: + std::string _funcName; + OMethodType _oMethod; + }; + + + template< typename TC, typename TArg > + inline PyObject* PyMBinaryWrapper::_call ( PyObject* pyObject, PyObject* pyArg ) + { + PyErr_Clear(); + setMessage( funcName() + "(): " ); + + TC object; + TArg arg; + pyToC( pyObject, &object ); + if (not pyToC( pyArg, &arg )) { + message() += "\n Argument is not convertible to \"" + Hurricane::demangle(typeid(TArg).name()) + "\"."; + PyErr_SetString( Isobar3::ConstructorError, message().c_str() ); + return NULL; + } + TC result = (object.*_oMethod)( arg ); + return cToPy( result ); + } + + +// ------------------------------------------------------------------- +// C++ Method Wrappers, operator function. + + template< typename TC, template class OperatorT > + class PyOperatorWrapper : public PyWrapper { + public: + inline PyOperatorWrapper ( std::string fname ) + : PyWrapper() + , _funcName (fname) + { }; + inline std::string funcName () const { return _funcName; }; + virtual PyObject* _call ( PyObject* self, PyObject* arg ); + private: + std::string _funcName; + }; + + + template< typename TC, template class OperatorT > + inline PyObject* PyOperatorWrapper::_call ( PyObject* pyObject, PyObject* pyArg ) + { + PyErr_Clear(); + setMessage( funcName() + "(): " ); + + TC lhs; + TC rhs; + pyToC( pyObject, &lhs ); + if (not pyToC( pyArg, &rhs )) { + string message = "PyOperatorWrapper():"; + message += "\n RHS argument is not convertible to \"" + Hurricane::demangle(typeid(TC).name()) + "\"."; + PyErr_SetString( Isobar3::ConstructorError, message.c_str() ); + return NULL; + } + TC result = OperatorT()( lhs, rhs ); + return cToPy( result ); + } + + +// ------------------------------------------------------------------- +// C++ Method Wrappers, in-place operator function. + + template< typename TC, typename TArg > + class PyInPlaceOperatorWrapper : public PyWrapper { + public: + typedef void(* OInPlaceType )(TC*,TArg*); + public: + inline PyInPlaceOperatorWrapper ( std::string fname, OInPlaceType minplace ) + : PyWrapper() + , _funcName(fname) + , _oInPlace(minplace) + { }; + inline std::string funcName () const { return _funcName; }; + virtual PyObject* _call ( PyObject* self, PyObject* arg ); + private: + std::string _funcName; + OInPlaceType _oInPlace; + }; + + + template< typename TC, typename TArg > + inline PyObject* PyInPlaceOperatorWrapper::_call ( PyObject* pyObject, PyObject* pyArg ) + { + PyErr_Clear(); + setMessage( funcName() + "(): " ); + + TC* object = NULL; + TArg* arg = NULL; + pyToC( pyObject, &object ); + if (not pyToC( pyArg, &arg )) { + string message = "PyInPlaceOperatorWrapper():"; + message += "\n Argument is not convertible to \"" + Hurricane::demangle(typeid(TArg).name()) + "\"."; + PyErr_SetString( Isobar3::ConstructorError, message.c_str() ); + return NULL; + } + _oInPlace( object, arg ); + Py_INCREF( pyObject ); + return pyObject; + } + + +// ------------------------------------------------------------------- +// C++ Method Wrappers, predicate function. + + template< typename TC > + class PyPredicateWrapper : public PyWrapper { + public: + typedef bool(TC::* OPredicateType )(void) const; + public: + inline PyPredicateWrapper ( std::string fname, OPredicateType pred ) + : PyWrapper() + , _funcName(fname) + , _oPredicate(pred) + { }; + inline std::string funcName () const { return _funcName; }; + virtual int _predicate ( PyObject* self ); + private: + std::string _funcName; + OPredicateType _oPredicate; + }; + + + template< typename TC > + inline int PyPredicateWrapper::_predicate ( PyObject* self ) + { + PyErr_Clear(); + setMessage( funcName() + "(): " ); + + TC object; + if (not pyToC( self, &object )) { + string message = "PyPredicateWrapper():"; + message += "\n Object is not convertible to \"" + Hurricane::demangle(typeid(TC).name()) + "\"."; + PyErr_SetString( Isobar3::ConstructorError, message.c_str() ); + return -1; + } + return (object.*_oPredicate)() ? 1 : 0; + } + + +// ------------------------------------------------------------------- +// Method wrapper function encapsulation. + + + template< typename TR, typename... TArgs > + inline PyObject* callFunction ( std::string fname, TR(* func )(TArgs...), PyObject* args ) + { + cdebug_log(30,0) << "[Python]" << fname << "()" << endl; + PyObject* rvalue = PyFunctionWrapper( fname, func ).call( args ); + // std::cerr << "callFunction() rvalue=" << rvalue << std::endl; + return rvalue; + } + + + template< typename TC, typename TR, typename... TArgs > + inline PyObject* callMethod ( std::string fname, TR(TC::* method )(TArgs...), PyObject* self, PyObject* args ) + { + cdebug_log(30,0) << "[Python]" << fname << "()" << endl; + return PyMethodWrapper( fname, method ).call( (PyObject*)self, args ); + } + + + template< typename TC, typename TR, typename... TArgs > + inline PyObject* callMethod ( std::string fname, TR(TC::* method )(TArgs...) const, PyObject* self, PyObject* args ) + { + return callMethod( fname, (TR(TC::*)(TArgs...))(method), self, args ); + } + + + template< typename TC, typename TR, typename... TArgs > + inline PyObject* callMethod ( std::string fname, TR(* fmethod )(TC*,TArgs...), PyObject* self, PyObject* args ) + { + cdebug_log(30,0) << "[Python]" << fname << "()" << endl; + return PyMethodWrapper( fname, fmethod ).call( (PyObject*)self, args ); + } + + + template< typename TC, typename TR, typename... TArgs > + inline PyObject* callMethod ( std::string fname, TR(* fmethod )(const TC*,TArgs...), PyObject* self, PyObject* args ) + { + return callMethod( fname, (TR(*)(TC*,TArgs...))(fmethod), self, args ); + } + + + template< typename TC, typename TArg > + inline PyObject* callBinaryMethod ( std::string fname, TC(TC::* mbinary)(TArg), PyObject* pyObject, PyObject* pyArg ) + { + return PyMBinaryWrapper( fname, mbinary).call( pyObject, pyArg ); + } + + + template< typename TC, typename TArg > + inline PyObject* callBinaryMethod ( std::string fname, TC(TC::* mbinary)(TArg) const, PyObject* pyObject, PyObject* pyArg ) + { + return callBinaryMethod( fname, (TC(TC::* )(TArg))mbinary, pyObject, pyArg ); + } + + + template< typename TC, template class OperatorT > + inline PyObject* callOperator ( std::string fname, PyObject* pyObject, PyObject* pyArg ) + { + return PyOperatorWrapper( fname ).call( pyObject, pyArg ); + } + + + template< typename TC, typename TArg > + inline PyObject* callOperator ( std::string fname, void(* minplace)(TC*,TArg*), PyObject* pyObject, PyObject* pyArg ) + { + return PyInPlaceOperatorWrapper( fname, minplace ).call( pyObject, pyArg ); + } + + + template< typename TC > + inline int callPredicate ( std::string fname, bool(TC::* predicate)() const, PyObject* pyObject ) + { + return PyPredicateWrapper( fname, predicate ).predicate( pyObject ); + } + + +} // End of Isobar3 namespace. + + +#include "hurricane/configuration/PyVector.h" +#include "hurricane/configuration/PyMap.h" diff --git a/hurricane/src/configuration/hurricane/configuration/PyVector.h b/hurricane/src/configuration/hurricane/configuration/PyVector.h new file mode 100644 index 00000000..e0bc6a3f --- /dev/null +++ b/hurricane/src/configuration/hurricane/configuration/PyVector.h @@ -0,0 +1,256 @@ + +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Universite 2021-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | I s o b a r - Hurricane / Python Interface | +// | | +// | Authors : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/isobar/PyVector.h" | +// +-----------------------------------------------------------------+ + + +#pragma once + +namespace Isobar3 { + + +// ------------------------------------------------------------------- +// PyTypeObject & PyObject for vector::iterator objects. + + + template< typename CppT > + class PyTypeManagerVectorIterator : public PyTypeManagerVTrunk< typename std::vector::iterator > { + public: + using PyTypeManager::_getTypeObject; + using PyTypeManager::_setMethods; + public: + inline PyTypeManagerVectorIterator ( uint64_t flags ); + virtual ~PyTypeManagerVectorIterator (); + public: + static PyTypeManagerVectorIterator* create ( PyObject* module, uint64_t flags ); + virtual PyObject* _getTpIter ( PyObject* ); + virtual PyObject* _getTpIterNext ( PyObject* ); + virtual void _getTpDeAlloc ( PyObject* ); + virtual long _getTpHash ( PyObject* ); + private: + PyMethodDef* _noMethods; + }; + + + template< typename CppT > + inline PyTypeManagerVectorIterator::PyTypeManagerVectorIterator ( uint64_t flags ) + : PyTypeManagerVTrunk< typename std::vector::iterator >(NULL,NULL,flags|PyTypeManager::IsIterator) + , _noMethods( NULL ) + { + _getTypeObject()->tp_basicsize = sizeof(PyTwoVoid); + _noMethods = new PyMethodDef; + _noMethods[0].ml_name = NULL; + _noMethods[0].ml_meth = NULL; + _noMethods[0].ml_flags = 0; + _noMethods[0].ml_doc = NULL; + _setMethods( _noMethods ); + } + + + template< typename CppT > + PyTypeManagerVectorIterator::~PyTypeManagerVectorIterator () { } + + + template< typename CppT > + void PyTypeManagerVectorIterator::_getTpDeAlloc ( PyObject* self ) + { + Py_XDECREF( object2(self) ); + typename std::vector::iterator* piterator = NULL; + pyToC( self, &piterator ); + delete piterator; + PyObject_DEL( self ); + } + + + template< typename CppT > + PyObject* PyTypeManagerVectorIterator::_getTpIter ( PyObject* self ) + { + // std::cerr << "************************************************** " << (void*)self << std::endl; + // std::cerr << "PyTypeManagerVectorIterator::_getTpIter() on " << (void*)self << std::endl; + return PyObject_SelfIter( self ); + } + + + template< typename CppT > + PyObject* PyTypeManagerVectorIterator::_getTpIterNext ( PyObject* self ) + { + // std::cerr << "************************************************** " << (void*)self << std::endl; + // std::cerr << "PyTypeManagerVectorIterator::_getTpIterNext() on " << (void*)self << std::endl; + typename std::vector::iterator* piterator = NULL; + typename std::vector* pvector = NULL; + pyToC( self, &piterator ); + pyToC( object2(self), &pvector ); + + if ((*piterator) != pvector->end()) { + PyObject* item = cToPy( **piterator ); + (*piterator)++; + return item; + } + // std::cerr << " End reached" << std::endl; + return NULL; + } + + + template< typename CppT > + long PyTypeManagerVectorIterator::_getTpHash ( PyObject *self ) + { return (long)(object1(self)); } + + + template< typename CppT > + PyTypeManagerVectorIterator* PyTypeManagerVectorIterator::create ( PyObject* module, uint64_t flags ) + { + // cerr << "PyTypeManagerVector<" + // << ::Hurricane::demangle(typeid(typename std::vector::iterator)) << ">::create()" << endl; + PyTypeManagerVectorIterator* manager = new PyTypeManagerVectorIterator( flags ); + + string elementName = ::Hurricane::demangle(typeid(CppT)); + size_t cppScope = elementName.find_last_of( "::" ); + if (cppScope != std::string::npos) elementName = elementName.substr( cppScope+1 ); + + manager->_setTypeNames( "VectorIteratorOf" + elementName ); + manager->_setupPyType(); + PyTypeObject* ob_type = manager->_getTypeObject(); + ob_type->tp_iter = PyObject_SelfIter; + ob_type->tp_iternext = (iternextfunc)&::Isobar3::_tpIterNext; + + PyTypeManager::add< typename std::vector::iterator >( module, manager ); + + return manager; + } + + +// ------------------------------------------------------------------- +// PyTypeObject & PyObject for vector objects. + + + template< typename CppT > + class PyTypeManagerVector : public PyTypeManagerVTrunk< std::vector > { + public: + using PyTypeManager::_getTypeObject; + using PyTypeManager::_setMethods; + public: + inline PyTypeManagerVector ( uint64_t flags ); + virtual ~PyTypeManagerVector (); + public: + static PyTypeManagerVector* create ( PyObject* module, uint64_t flags ); + virtual Py_ssize_t _getSqLength ( PyObject* ); + virtual PyObject* _getSqItem ( PyObject*, Py_ssize_t ); + virtual void _getTpDeAlloc ( PyObject* ); + virtual long _getTpHash ( PyObject* ); + virtual PyObject* _getTpIter ( PyObject* ); + private: + PyMethodDef* _noMethods; + PySequenceMethods _sequenceMethods; + }; + + + template< typename CppT > + inline PyTypeManagerVector::PyTypeManagerVector ( uint64_t flags ) + : PyTypeManagerVTrunk< std::vector >(NULL,NULL,flags) + , _noMethods ( NULL ) + , _sequenceMethods{ (lenfunc) _sqLength // sq_length (lenfunc). + , (binaryfunc) _sqConcat // sq_concat (binaryfunc). + , (ssizeargfunc)_sqRepeat // sq_repeat (ssizeargfunc). + , (ssizeargfunc)_sqItem // sq_item (ssizeargfunc). + , NULL // sq_sq_ass_item (ssizeobjargproc). + , NULL // sq_contains (objobjproc). + , NULL // sq_inplace_concat (binaryfunc). + , NULL // sq_inplace_repeat (ssizeargfunc). + } + { + _noMethods = new PyMethodDef; + _noMethods[0].ml_name = NULL; + _noMethods[0].ml_meth = NULL; + _noMethods[0].ml_flags = 0; + _noMethods[0].ml_doc = NULL; + _setMethods( _noMethods ); + } + + + template< typename CppT > + PyTypeManagerVector::~PyTypeManagerVector () { } + + + template< typename CppT > + void PyTypeManagerVector::_getTpDeAlloc ( PyObject* self ) + { + PyObject_DEL( self ); + } + + + template< typename CppT > + Py_ssize_t PyTypeManagerVector::_getSqLength ( PyObject* self ) + { + std::vector* pvector = NULL; + pyToC( self, &pvector ); + return pvector->size(); + } + + + template< typename CppT > + PyObject* PyTypeManagerVector::_getSqItem ( PyObject* self, Py_ssize_t index ) + { + std::vector* pvector = NULL; + pyToC( self, &pvector ); + return cToPy( (*pvector)[index] ); + } + + + template< typename CppT > + long PyTypeManagerVector::_getTpHash ( PyObject *self ) + { return (long)( object1(self) ); } + + + template< typename CppT > + PyObject* PyTypeManagerVector::_getTpIter ( PyObject* self ) + { + // std::cerr << "************************************************** " << (void*)self << std::endl; + // std::cerr << "PyTypeManagerVector::_getTpIter() on " << (void*)self << std::endl; + std::vector* pvector = NULL; + pyToC( self, &pvector ); + PyTwoVoid* pyIterator = (PyTwoVoid*)cToPy + ( new typename std::vector::iterator(pvector->begin()) ); + object2(pyIterator) = self; + Py_INCREF( self ); + // std::cerr << "First iterator:" << (void*)pyIterator << std::endl; + return (PyObject*)pyIterator; + } + + + template< typename CppT > + PyTypeManagerVector* PyTypeManagerVector::create ( PyObject* module, uint64_t flags ) + { + // cerr << "PyTypeManagerVector<" + // << ::Hurricane::demangle(typeid(std::vector)) << ">::create()" << endl; + PyTypeManagerVector* manager = new PyTypeManagerVector( flags ); + + string elementName = ::Hurricane::demangle(typeid(CppT)); + size_t cppScope = elementName.find_last_of( "::" ); + if (cppScope != std::string::npos) elementName = elementName.substr( cppScope+1 ); + + manager->_setTypeNames( "VectorOf" + elementName ); + manager->_setupPyType(); + PyTypeObject* ob_type = manager->_getTypeObject(); + ob_type->tp_as_sequence = &(manager->_sequenceMethods); + ob_type->tp_iter = (getiterfunc)&::Isobar3::_tpIter; + + PyTypeManager::add< std::vector >( module, manager ); + PyTypeManagerVectorIterator::create( module, flags ); + + return manager; + } + + +} // Isobar3 namespace. + diff --git a/hurricane/src/configuration/hurricane/configuration/PyViaLayer.h b/hurricane/src/configuration/hurricane/configuration/PyViaLayer.h new file mode 100644 index 00000000..228e917f --- /dev/null +++ b/hurricane/src/configuration/hurricane/configuration/PyViaLayer.h @@ -0,0 +1,32 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Université 2020-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | C o n f i g u r a t i o n D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/configuration/PyViaLayer.h" | +// +-----------------------------------------------------------------+ + + +#pragma once +#include "hurricane/configuration/PyTypeManager.h" +#include "hurricane/ViaLayer.h" + + +namespace Isobar3 { + +extern "C" { + + + extern PyMethodDef PyViaLayer_Methods[]; + + +} // extern "C". + +} // Isobar3 namespace. diff --git a/hurricane/src/hurricane/Backtrace.cpp b/hurricane/src/hurricane/Backtrace.cpp index 8540f73c..9b742bcf 100644 --- a/hurricane/src/hurricane/Backtrace.cpp +++ b/hurricane/src/hurricane/Backtrace.cpp @@ -90,7 +90,8 @@ #include #include #include -#include +//#include +#include #include namespace boptions = boost::program_options; #include "hurricane/Backtrace.h" @@ -431,7 +432,6 @@ namespace Hurricane { : _stack() { if (not enabled) return; - if (_inConstructor) { _stack.push_back( "[BUG] Backtrace::Backtrace(): An error occurred in the backtace *istself*." ); _stack.push_back( "" ); @@ -458,18 +458,27 @@ namespace Hurricane { #endif #if (defined __linux__ || defined __FreeBSD__) - boost::regex re ( "(?[^(]+)\\((?[^+]+)\\+(?[^)]+)\\) \\[(?.+)]" ); - boost::cmatch match; - string homeDir = getHome(); + //std::regex re ( "([^(]+)\\(([^+]+)\\+([^)]+)\\) \\[(.+)]", std::regex::extended ); + //std::cmatch match; + regex_t re; + regmatch_t match[5]; + string homeDir = getHome(); + regcomp( &re, "([^(]+)\\(([^+]+)\\+([^)]+)\\) \\[(.+)]", REG_EXTENDED ); for ( size_t i=0 ; i" << demangled << ""; #ifdef HAVE_LIBBFD @@ -492,13 +501,14 @@ namespace Hurricane { _stack.push_back( symbols[i] ); } } + regfree( &re ); #else -# ifdef __APPLE__ - boost::regex re ( "(\\d+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+\\+\\s+(\\d+)" ); - boost::cmatch match; +#ifdef __APPLE__ + std::regex re ( "(\\d+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+\\+\\s+(\\d+)" ); + std::cmatch match; for ( size_t i=0 ; i namespace Hurricane { @@ -157,7 +158,7 @@ namespace Hurricane { } - DBo::~DBo () throw(Error) + DBo::~DBo () noexcept(false) { if (_idCount) --_idCount; else { diff --git a/hurricane/src/hurricane/DbU.cpp b/hurricane/src/hurricane/DbU.cpp index ff8f9c75..aadb214a 100644 --- a/hurricane/src/hurricane/DbU.cpp +++ b/hurricane/src/hurricane/DbU.cpp @@ -159,7 +159,9 @@ namespace Hurricane { _resolution = 1; while ( precision-- ) _resolution /= 10; - if (not (flags & NoTechnoUpdate) and DataBase::getDB()->getTechnology()) + if (not (flags & NoTechnoUpdate) + and DataBase::getDB() + and DataBase::getDB()->getTechnology()) DataBase::getDB()->getTechnology()->_onDbuChange ( scale ); setSymbolicSnapGridStep ( DbU::lambda( 1.0) ); @@ -209,7 +211,9 @@ namespace Hurricane { _gridsPerLambda = gridsPerLambda; - if (not (flags & NoTechnoUpdate) and DataBase::getDB()->getTechnology()) + if (not (flags & NoTechnoUpdate) + and DataBase::getDB() + and DataBase::getDB()->getTechnology()) DataBase::getDB()->getTechnology()->_onDbuChange ( scale ); setSymbolicSnapGridStep ( DbU::lambda(1) ); diff --git a/hurricane/src/hurricane/Entity.cpp b/hurricane/src/hurricane/Entity.cpp index 38bf0a24..ffe49007 100644 --- a/hurricane/src/hurricane/Entity.cpp +++ b/hurricane/src/hurricane/Entity.cpp @@ -38,7 +38,7 @@ namespace Hurricane { { } - Entity::~Entity() throw(Error) + Entity::~Entity() { } diff --git a/hurricane/src/hurricane/Error.cpp b/hurricane/src/hurricane/Error.cpp index e57d52e8..0e26f62d 100644 --- a/hurricane/src/hurricane/Error.cpp +++ b/hurricane/src/hurricane/Error.cpp @@ -32,7 +32,6 @@ #include #include -#include #include "hurricane/Error.h" diff --git a/hurricane/src/hurricane/Go.cpp b/hurricane/src/hurricane/Go.cpp index 913b170e..f7615dea 100644 --- a/hurricane/src/hurricane/Go.cpp +++ b/hurricane/src/hurricane/Go.cpp @@ -38,7 +38,7 @@ Go::Go() { } -Go::~Go() throw(Error) +Go::~Go() { } bool Go::autoMaterializationIsDisabled() diff --git a/hurricane/src/hurricane/Hook.cpp b/hurricane/src/hurricane/Hook.cpp index afa4890b..ab1646c6 100644 --- a/hurricane/src/hurricane/Hook.cpp +++ b/hurricane/src/hurricane/Hook.cpp @@ -196,11 +196,11 @@ Hook::Hook() { } -Hook::~Hook() throw(Error) -// *********************** +Hook::~Hook() noexcept(false) +// ************************** { if (_nextHook != this) - throw Error("Abnormal deletion of hook : always attached"); + throw Error("Abnormal deletion of hook : still attached"); } Hook* Hook::getNextHook() const diff --git a/hurricane/src/hurricane/SharedPath.cpp b/hurricane/src/hurricane/SharedPath.cpp index 12dc8b31..f1aad421 100644 --- a/hurricane/src/hurricane/SharedPath.cpp +++ b/hurricane/src/hurricane/SharedPath.cpp @@ -102,10 +102,11 @@ static char NAME_SEPARATOR = '.'; SharedPath::SharedPath(Instance* headInstance, SharedPath* tailSharedPath) // *********************************************************************** - : _headInstance(headInstance), - _tailSharedPath(tailSharedPath), - _quarkMap(), - _nextOfInstanceSharedPathMap(NULL) + : _hash(0) + , _headInstance(headInstance) + , _tailSharedPath(tailSharedPath) + , _quarkMap() + , _nextOfInstanceSharedPathMap(NULL) { if (!_headInstance) throw Error("Can't create " + _TName("SharedPath") + " : null head instance"); @@ -126,6 +127,7 @@ SharedPath::SharedPath(Instance* headInstance, SharedPath* tailSharedPath) , getString(_tailSharedPath->getOwnerCell ()).c_str() ); + _hash = (_headInstance->getId() << 1) + ((_tailSharedPath) ? _tailSharedPath->getHash() << 1: 0); _headInstance->_getSharedPathMap()._insert(this); cdebug_log(0,0) << "SharedPath::SharedPath() pathHash:" << getHash() << " \"" << this << "\"" << endl; @@ -187,7 +189,8 @@ string SharedPath::getName() const unsigned long SharedPath::getHash() const // *************************************** -{ return (_headInstance->getId() << 1) + ((_tailSharedPath) ? _tailSharedPath->getHash() << 1: 0); } +//{ return (_headInstance->getId() << 1) + ((_tailSharedPath) ? _tailSharedPath->getHash() << 1: 0); } +{ return _hash; } string SharedPath::getJsonString(unsigned long flags) const // ******************************************************** @@ -245,6 +248,10 @@ void SharedPath::setNameSeparator(char nameSeparator) NAME_SEPARATOR = nameSeparator; } +std::string SharedPath::_getTypeName () const +// ****************************************** +{ return _TName("SharedPath"); } + string SharedPath::_getString() const // ********************************** { diff --git a/hurricane/src/hurricane/hurricane/BasicLayer.h b/hurricane/src/hurricane/hurricane/BasicLayer.h index 07658ba1..427801e8 100644 --- a/hurricane/src/hurricane/hurricane/BasicLayer.h +++ b/hurricane/src/hurricane/hurricane/BasicLayer.h @@ -84,8 +84,8 @@ namespace Hurricane { static BasicLayer* create ( Technology* technology , const Name& name , const Material& material - , unsigned gds2Layer - , unsigned gds2Datatype + , unsigned gds2Layer = 0 + , unsigned gds2Datatype = 0 , const DbU::Unit& minimalSize = 0 , const DbU::Unit& minimalSpacing = 0 ); diff --git a/hurricane/src/hurricane/hurricane/DBo.h b/hurricane/src/hurricane/hurricane/DBo.h index 39051717..1db5455f 100644 --- a/hurricane/src/hurricane/hurricane/DBo.h +++ b/hurricane/src/hurricane/hurricane/DBo.h @@ -1,6 +1,6 @@ // -*- C++ -*- // -// Copyright (c) BULL S.A. 2000-2018, All Rights Reserved +// Copyright (c) BULL S.A. 2000-2021, All Rights Reserved // // This file is part of Hurricane. // @@ -29,13 +29,11 @@ // +-----------------------------------------------------------------+ -#ifndef HURRICANE_DBO_H -#define HURRICANE_DBO_H - -#include "hurricane/Error.h" -#include "hurricane/DBos.h" -#include "hurricane/Name.h" -#include "hurricane/Properties.h" +#pragma once +#include "hurricane/Error.h" +#include "hurricane/DBos.h" +#include "hurricane/Name.h" +#include "hurricane/Properties.h" namespace Hurricane { @@ -83,7 +81,7 @@ namespace Hurricane { void toJsonSignature ( JsonWriter* ) const; protected: DBo (); - virtual ~DBo () throw(Error); + virtual ~DBo () noexcept(false); virtual void _postCreate (); virtual void _preDestroy (); private: @@ -136,5 +134,3 @@ namespace Hurricane { } // Hurricane namespace. INSPECTOR_P_SUPPORT(Hurricane::DBo); - -#endif // HURRICANE_DBO_H diff --git a/hurricane/src/hurricane/hurricane/Entity.h b/hurricane/src/hurricane/hurricane/Entity.h index 3316a36b..a2d2553d 100644 --- a/hurricane/src/hurricane/hurricane/Entity.h +++ b/hurricane/src/hurricane/hurricane/Entity.h @@ -17,9 +17,7 @@ // not, see . // **************************************************************************************************** -#ifndef HURRICANE_ENTITY -#define HURRICANE_ENTITY - +#pragma once #include #include "hurricane/DBo.h" #include "hurricane/Entities.h" @@ -48,7 +46,7 @@ namespace Hurricane { Quark* _getQuark ( SharedPath* sharedPath = NULL ) const; protected: Entity (); - virtual ~Entity () throw(Error); + virtual ~Entity (); virtual void _postCreate (); virtual void _preDestroy (); }; @@ -91,9 +89,6 @@ namespace Hurricane { INSPECTOR_P_SUPPORT(Hurricane::Entity); - -#endif // HURRICANE_ENTITY - // **************************************************************************************************** // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved // **************************************************************************************************** diff --git a/hurricane/src/hurricane/hurricane/Go.h b/hurricane/src/hurricane/hurricane/Go.h index fc253a44..b0112e04 100644 --- a/hurricane/src/hurricane/hurricane/Go.h +++ b/hurricane/src/hurricane/hurricane/Go.h @@ -17,9 +17,7 @@ // not, see . // **************************************************************************************************** -#ifndef HURRICANE_GO -#define HURRICANE_GO - +#pragma once #include "hurricane/Entity.h" #include "hurricane/Gos.h" #include "hurricane/Transformation.h" @@ -56,7 +54,7 @@ class Go : public Entity { // ************ protected: Go(); - protected: virtual ~Go() throw(Error); + protected: virtual ~Go(); // Predicates // ********** @@ -101,9 +99,6 @@ class Go : public Entity { INSPECTOR_P_SUPPORT(Hurricane::Go); -#endif // HURRICANE_GO - - // **************************************************************************************************** // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved // **************************************************************************************************** diff --git a/hurricane/src/hurricane/hurricane/Hook.h b/hurricane/src/hurricane/hurricane/Hook.h index ebafd20d..aba5b647 100644 --- a/hurricane/src/hurricane/hurricane/Hook.h +++ b/hurricane/src/hurricane/hurricane/Hook.h @@ -17,9 +17,7 @@ // not, see . // **************************************************************************************************** -#ifndef HURRICANE_HOOK -#define HURRICANE_HOOK - +#pragma once #include "hurricane/Error.h" #include "hurricane/Hooks.h" @@ -54,7 +52,7 @@ class Hook { // Destructor // ********** - protected: virtual ~Hook() throw(Error); + protected: virtual ~Hook() noexcept(false); // Operators // ********* @@ -115,9 +113,6 @@ class Hook { INSPECTOR_P_SUPPORT(Hurricane::Hook); -#endif // HURRICANE_HOOK - - // **************************************************************************************************** // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved // **************************************************************************************************** diff --git a/hurricane/src/hurricane/hurricane/IntervalTree.h b/hurricane/src/hurricane/hurricane/IntervalTree.h index b026cbf0..7d4673b2 100644 --- a/hurricane/src/hurricane/hurricane/IntervalTree.h +++ b/hurricane/src/hurricane/hurricane/IntervalTree.h @@ -40,6 +40,8 @@ #include "hurricane/Interval.h" #include "hurricane/RbTree.h" +#include + namespace Hurricane { diff --git a/hurricane/src/hurricane/hurricane/IntrusiveMap.h b/hurricane/src/hurricane/hurricane/IntrusiveMap.h index 7ca44572..0b750c3d 100644 --- a/hurricane/src/hurricane/hurricane/IntrusiveMap.h +++ b/hurricane/src/hurricane/hurricane/IntrusiveMap.h @@ -1,7 +1,7 @@ // **************************************************************************************************** // File: ./hurricane/IntrusiveMap.h // Authors: R. Escassut -// Copyright (c) BULL S.A. 2000-2018, All Rights Reserved +// Copyright (c) BULL S.A. 2000-2021, All Rights Reserved // // This file is part of Hurricane. // @@ -17,9 +17,7 @@ // not, see . // **************************************************************************************************** -#ifndef HURRICANE_INTRUSIVE_MAP -#define HURRICANE_INTRUSIVE_MAP - +#pragma once #include #include @@ -988,7 +986,6 @@ inline void jsonWrite ( JsonWriter* w, const std::string& key, Hurricane::Intru for ( Element* element : intrusiveMap->getElements() ) jsonWrite( w, element ); w->endArray(); } -#endif // HURRICANE_INTRUSIVE_MAP // **************************************************************************************************** diff --git a/hurricane/src/hurricane/hurricane/IntrusiveSet.h b/hurricane/src/hurricane/hurricane/IntrusiveSet.h index 4da23905..7e52b20b 100644 --- a/hurricane/src/hurricane/hurricane/IntrusiveSet.h +++ b/hurricane/src/hurricane/hurricane/IntrusiveSet.h @@ -17,9 +17,7 @@ // not, see . // **************************************************************************************************** -#ifndef HURRICANE_INTRUSIVE_SET -#define HURRICANE_INTRUSIVE_SET - +#pragma once #include #include @@ -497,9 +495,6 @@ inline Hurricane::Record* getRecord ( Hurricane::IntrusiveSet& intrusiveSe { return intrusiveSet._getRecord(); } -#endif // HURRICANE_INTRUSIVE_SET - - // **************************************************************************************************** // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved // **************************************************************************************************** diff --git a/hurricane/src/hurricane/hurricane/Mask.h b/hurricane/src/hurricane/hurricane/Mask.h index a471a7bf..481c4fa6 100644 --- a/hurricane/src/hurricane/hurricane/Mask.h +++ b/hurricane/src/hurricane/hurricane/Mask.h @@ -66,7 +66,7 @@ namespace Hurricane { inline bool operator < ( const Mask mask ) const; inline bool operator > ( const Mask mask ) const; inline operator IntType () const; - static inline Mask fromString ( const string& ); + static inline Mask fromString ( std::string ); // Hurricane Managment. inline string _getTypeName () const; inline string _getString () const; @@ -194,11 +194,11 @@ namespace Hurricane { template - size_t Mask::_width = sizeof(IntType)<<2; + size_t Mask::_width = sizeof(IntType)<<1; template - inline Mask Mask::fromString ( const string& s ) + inline Mask Mask::fromString ( std::string s ) { IntType value; istringstream iss ( s ); diff --git a/hurricane/src/hurricane/hurricane/Observer.h b/hurricane/src/hurricane/hurricane/Observer.h index bb573d6b..04d8a025 100644 --- a/hurricane/src/hurricane/hurricane/Observer.h +++ b/hurricane/src/hurricane/hurricane/Observer.h @@ -14,9 +14,7 @@ // +-----------------------------------------------------------------+ -#ifndef HURRICANE_OBSERVER_H -#define HURRICANE_OBSERVER_H - +#pragma once #include #include #include "hurricane/Error.h" @@ -168,5 +166,3 @@ namespace Hurricane { } // Hurricane namespace. - -#endif diff --git a/hurricane/src/hurricane/hurricane/PhysicalRule.h b/hurricane/src/hurricane/hurricane/PhysicalRule.h index 4d12b80f..d8307ff5 100644 --- a/hurricane/src/hurricane/hurricane/PhysicalRule.h +++ b/hurricane/src/hurricane/hurricane/PhysicalRule.h @@ -115,7 +115,7 @@ namespace Hurricane { inline bool PhysicalRule::isDouble () const { return _doubleValue != 0; } inline bool PhysicalRule::isDbU () const { return not _stepsValue.empty(); } inline bool PhysicalRule::isSymmetric () const { return _symmetric; } - inline bool PhysicalRule::hasSteps () const { return not _stepsValue.size() > 1; } + inline bool PhysicalRule::hasSteps () const { return not (_stepsValue.size() > 1); } inline double PhysicalRule::getDoubleValue () const { return _doubleValue; } inline void PhysicalRule::setSymmetric ( bool state ) { _symmetric = state; } inline void PhysicalRule::addValue ( double value ) { _doubleValue = value; } diff --git a/hurricane/src/hurricane/hurricane/Point.h b/hurricane/src/hurricane/hurricane/Point.h index 7021fdb7..3d5fba0f 100644 --- a/hurricane/src/hurricane/hurricane/Point.h +++ b/hurricane/src/hurricane/hurricane/Point.h @@ -71,8 +71,8 @@ class Point { // Updators // ******** - public: void setX(const DbU::Unit& x) {_x = x;}; - public: void setY(const DbU::Unit& y) {_y = y;}; + public: void setX(DbU::Unit x) {_x = x;}; + public: void setY(DbU::Unit y) {_y = y;}; public: Point& translate(const DbU::Unit& dx, const DbU::Unit& dy); public: Point getTranslated(const DbU::Unit& dx, const DbU::Unit& dy) const; diff --git a/hurricane/src/hurricane/hurricane/Property.h b/hurricane/src/hurricane/hurricane/Property.h index 6a6797ad..b48d010e 100644 --- a/hurricane/src/hurricane/hurricane/Property.h +++ b/hurricane/src/hurricane/hurricane/Property.h @@ -1,6 +1,6 @@ // -*- C++ -*- // -// Copyright (c) BULL S.A. 2000-2018, All Rights Reserved +// Copyright (c) BULL S.A. 2000-2021, All Rights Reserved // // This file is part of Hurricane. // @@ -29,13 +29,11 @@ // +-----------------------------------------------------------------+ -#ifndef HURRICANE_PROPERTY_H -#define HURRICANE_PROPERTY_H - -#include "hurricane/Name.h" -#include "hurricane/Properties.h" -#include "hurricane/DBo.h" -#include "hurricane/Error.h" +#pragma once +#include "hurricane/Name.h" +#include "hurricane/Properties.h" +#include "hurricane/DBo.h" +#include "hurricane/Error.h" namespace Hurricane { @@ -597,6 +595,3 @@ namespace Hurricane { INSPECTOR_P_SUPPORT(Hurricane::Property); - - -#endif // HURRICANE_PROPERTY_H diff --git a/hurricane/src/hurricane/hurricane/SharedPath.h b/hurricane/src/hurricane/hurricane/SharedPath.h index 4e799bf8..3be0dd79 100644 --- a/hurricane/src/hurricane/hurricane/SharedPath.h +++ b/hurricane/src/hurricane/hurricane/SharedPath.h @@ -1,25 +1,35 @@ -// **************************************************************************************************** -// File: ./hurricane/SharedPath.h -// Authors: R. Escassut +// -*- C++ -*- +// // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved // // This file is part of Hurricane. // -// Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU -// Lesser General Public License as published by the Free Software Foundation, either version 3 of the +// Hurricane is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. // -// Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU +// Hurricane is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- +// TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU // General Public License for more details. // -// You should have received a copy of the Lesser GNU General Public License along with Hurricane. If -// not, see . -// **************************************************************************************************** +// You should have received a copy of the Lesser GNU General Public +// License along with Hurricane. If not, see +// . +// +// +-----------------------------------------------------------------+ +// | H U R R I C A N E | +// | V L S I B a c k e n d D a t a - B a s e | +// | | +// | Authors : Remy Escassut | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/RoutingPad.h" | +// +-----------------------------------------------------------------+ -#ifndef HURRICANE_SHARED_PATH -#define HURRICANE_SHARED_PATH +#pragma once #include "hurricane/Instances.h" #include "hurricane/SharedPathes.h" #include "hurricane/Quark.h" @@ -28,112 +38,77 @@ namespace Hurricane { -class Cell; -class Entity; + class Cell; + class Entity; +// ------------------------------------------------------------------- +// Class : "SharedPath". -// **************************************************************************************************** -// SharedPath declaration -// **************************************************************************************************** - -class SharedPath { -// ************* - -// Types -// ***** - - public: class QuarkMap : public IntrusiveMap { - // *************************************************************** - - public: typedef IntrusiveMap Inherit; - - public: QuarkMap(); - - public: virtual const Entity* _getKey(Quark* quark) const; - public: virtual unsigned _getHashValue(const Entity* entity) const; - public: virtual Quark* _getNextElement(Quark* quark) const; - public: virtual void _setNextElement(Quark* quark, Quark* nextQuark) const; + class SharedPath { + public: + class QuarkMap : public IntrusiveMap { + public: + typedef IntrusiveMap Inherit; + public: + QuarkMap (); + virtual const Entity* _getKey ( Quark* ) const; + virtual unsigned _getHashValue ( const Entity* ) const; + virtual Quark* _getNextElement ( Quark* ) const; + virtual void _setNextElement ( Quark* , Quark* nextQuark ) const; }; -// Attributes -// ********** + public: + SharedPath ( Instance* headInstance, SharedPath* tailSharedPath = NULL ); + ~SharedPath (); + private: + SharedPath ( const SharedPath& ) = delete; + SharedPath& operator= ( const SharedPath& ) = delete; + public: + static char getNameSeparator (); + static void setNameSeparator ( char nameSeparator ); + public: + unsigned long getHash () const; + inline Instance* getHeadInstance () const; + inline SharedPath* getTailSharedPath () const; + SharedPath* getHeadSharedPath () const; + Instance* getTailInstance () const; + std::string getName () const; + std::string getJsonString ( unsigned long flags ) const; + Cell* getOwnerCell () const; + Cell* getMasterCell () const; + Instances getInstances () const; + Transformation getTransformation ( const Transformation& transformation=Transformation() ) const; + public: + std::string _getTypeName () const; + std::string _getString () const; + Record* _getRecord () const; + inline Quark* _getQuark (const Entity* entity ) const; + inline Quarks _getQuarks () const; + inline QuarkMap& _getQuarkMap (); + inline SharedPath* _getNextOfInstanceSharedPathMap () const; + inline void _setNextOfInstanceSharedPathMap ( SharedPath* sharedPath ); + private: + // Attributes. + unsigned long _hash; + Instance* _headInstance; + SharedPath* _tailSharedPath; + QuarkMap _quarkMap; + SharedPath* _nextOfInstanceSharedPathMap; + }; - private: Instance* _headInstance; - private: SharedPath* _tailSharedPath; - private: QuarkMap _quarkMap; - private: SharedPath* _nextOfInstanceSharedPathMap; - -// Constructors -// ************ - - public: SharedPath(Instance* headInstance, SharedPath* tailSharedPath = NULL); - - private: SharedPath(const SharedPath& sharedPath); - // not implemented to forbid copy construction - -// Destructor -// ********** - - public: ~SharedPath(); - -// Operators -// ********* - - private: SharedPath& operator=(const SharedPath& sharedPath); - // not implemented to forbid assignment - -// Accessors -// ********* - - public: static char getNameSeparator(); - - public: unsigned long getHash() const; - public: Instance* getHeadInstance() const {return _headInstance;}; - public: SharedPath* getTailSharedPath() const {return _tailSharedPath;}; - public: SharedPath* getHeadSharedPath() const; - public: Instance* getTailInstance() const; - public: string getName() const; - public: string getJsonString(unsigned long flags) const; - public: Cell* getOwnerCell() const; - public: Cell* getMasterCell() const; - public: Instances getInstances() const; - public: Transformation getTransformation(const Transformation& transformation = Transformation()) const; - -// Updators -// ******** - - public: static void setNameSeparator(char nameSeparator); - -// Accessors -// ********* - - public: string _getTypeName() const { return _TName("SharedPath"); }; - public: string _getString() const; - public: Record* _getRecord() const; - - public: Quark* _getQuark(const Entity* entity) const {return _quarkMap.getElement(entity);}; - public: Quarks _getQuarks() const {return _quarkMap.getElements();}; - public: QuarkMap& _getQuarkMap() {return _quarkMap;}; - public: SharedPath* _getNextOfInstanceSharedPathMap() const {return _nextOfInstanceSharedPathMap;}; - - public: void _setNextOfInstanceSharedPathMap(SharedPath* sharedPath) {_nextOfInstanceSharedPathMap = sharedPath;}; - -}; + + inline Instance* SharedPath::getHeadInstance () const { return _headInstance; } + inline SharedPath* SharedPath::getTailSharedPath () const { return _tailSharedPath; } + inline Quark* SharedPath::_getQuark (const Entity* entity ) const { return _quarkMap.getElement(entity); } + inline Quarks SharedPath::_getQuarks () const { return _quarkMap.getElements(); } + inline SharedPath::QuarkMap& SharedPath::_getQuarkMap () { return _quarkMap; } + inline SharedPath* SharedPath::_getNextOfInstanceSharedPathMap () const { return _nextOfInstanceSharedPathMap; } + inline void SharedPath::_setNextOfInstanceSharedPathMap ( SharedPath* sharedPath ) { _nextOfInstanceSharedPathMap = sharedPath; } - -} // End of Hurricane namespace. +} // Hurricane namespace. INSPECTOR_P_SUPPORT(Hurricane::SharedPath); - - - -#endif // HURRICANE_SHARED_PATH - - -// **************************************************************************************************** -// Copyright (c) BULL S.A. 2000-2018, All Rights Reserved -// **************************************************************************************************** diff --git a/hurricane/src/hurricane/hurricane/Timer.h b/hurricane/src/hurricane/hurricane/Timer.h index 52d81ff1..93daeae9 100644 --- a/hurricane/src/hurricane/hurricane/Timer.h +++ b/hurricane/src/hurricane/hurricane/Timer.h @@ -34,23 +34,21 @@ //! author="Igor Markov 06/22/97 " // freely inspired from abktimer from UCLApack .... just no windows. -#ifndef HURRICANE_TIMER_H -#define HURRICANE_TIMER_H +#pragma once +#include +#include +#include +#include +#include -#include -#include -#include -#include -#include - -#include +#include #if defined(sun) extern "C" int getrusage ( int who, struct rusage *rusage ); #elif defined(linux) #endif -#include "hurricane/Error.h" -#include "hurricane/Slot.h" +#include "hurricane/Error.h" +#include "hurricane/Slot.h" namespace Hurricane { @@ -182,5 +180,3 @@ namespace Hurricane { GETSTRING_VALUE_SUPPORT(Hurricane::Timer); IOSTREAM_VALUE_SUPPORT(Hurricane::Timer); - -#endif // HURRICANE_TIMER_H diff --git a/hurricane/src/isobar/CMakeLists.txt b/hurricane/src/isobar/CMakeLists.txt index 2f5e2015..d3529fac 100644 --- a/hurricane/src/isobar/CMakeLists.txt +++ b/hurricane/src/isobar/CMakeLists.txt @@ -4,9 +4,9 @@ include_directories( ${HURRICANE_SOURCE_DIR}/src/hurricane ${HURRICANE_SOURCE_DIR}/src/viewer ${HURRICANE_SOURCE_DIR}/src/isobar + ${HURRICANE_SOURCE_DIR}/src/configuration3 ${Boost_INCLUDE_DIRS} - ${CONFIGURATION_INCLUDE_DIR} - ${PYTHON_INCLUDE_PATH} + ${Python_INCLUDE_DIRS} ) set( pyCpps ProxyProperty.cpp PyBreakpoint.cpp diff --git a/hurricane/src/isobar/PyDbU.cpp b/hurricane/src/isobar/PyDbU.cpp index 9c3609e8..8f361895 100644 --- a/hurricane/src/isobar/PyDbU.cpp +++ b/hurricane/src/isobar/PyDbU.cpp @@ -575,9 +575,8 @@ extern "C" { PyTypeObject PyTypeDbU = - { PyObject_HEAD_INIT(NULL) - 0 /* ob_size. */ - , "Hurricane.DbU" /* tp_name. */ + { PyVarObject_HEAD_INIT(NULL,0) + "Hurricane.DbU" /* tp_name. */ , sizeof(PyDbU) /* tp_basicsize. */ , 0 /* tp_itemsize. */ /* methods. */ diff --git a/hurricane/src/isobar/PyHurricane.cpp b/hurricane/src/isobar/PyHurricane.cpp index 8a7b0706..f07d73d5 100644 --- a/hurricane/src/isobar/PyHurricane.cpp +++ b/hurricane/src/isobar/PyHurricane.cpp @@ -258,10 +258,7 @@ using namespace Hurricane; return _types[i]->_id; if (object->ob_type == _types[i]->_pyType) return _types[i]->_id; - if (&PyLong_Type == _types[i]->_pyType) { - cerr << "PyLong_Type, now check for PyInt_Type" << endl; - if (object->ob_type == &PyInt_Type) return _types[i]->_id; - } + if (&PyLong_Type == _types[i]->_pyType) return _types[i]->_id; } return ( "unknown" ); // return 'X' @@ -311,9 +308,7 @@ using namespace Hurricane; ConverterState::ObjectType* baseType; for ( unsigned i=0 ; i < __cs.getTypes().size() ; i++ ) { - PyTypeObject* obType = object->ob_type; - if (obType == &PyInt_Type) obType = &PyLong_Type; - + PyTypeObject* obType = Py_TYPE( object ); baseType = __cs.getTypes()[i]->PyBase( obType ); if (PyCallable_Check(object) or baseType) { *pArg = object; @@ -511,10 +506,25 @@ extern "C" { }; + static PyModuleDef PyHurricane_ModuleDef = + { PyModuleDef_HEAD_INIT + , "Hurricane" /* m_name */ + , "Hurricane Database." + /* m_doc */ + , -1 /* m_size */ + , PyHurricane_Methods /* m_methods */ + , NULL /* m_reload */ + , NULL /* m_traverse */ + , NULL /* m_clear */ + , NULL /* m_free */ + }; + + // --------------------------------------------------------------- // Module Initialization : "initHurricane ()" - DL_EXPORT(void) initHurricane () { + PyMODINIT_FUNC PyInit_Hurricane ( void ) + { //trace_on(); cdebug_log(20,0) << "initHurricane()" << endl; @@ -699,7 +709,7 @@ extern "C" { __cs.addType( "float" , &PyFloat_Type , "" , true ); __cs.addType( "int" , &PyLong_Type , "" , true ); __cs.addType( "bool" , &PyBool_Type , "" , true ); - __cs.addType( "string" , &PyString_Type , "" , true ); + __cs.addType( "string" , &PyUnicode_Type , "" , true ); __cs.addType( "list" , &PyList_Type , "" , true ); // Do not change the "function" string. It's hardwired to callable (function) objects. __cs.addType( "function" , NULL , "" , true ); @@ -756,11 +766,11 @@ extern "C" { __cs.addType( "2prule" , &PyTypeTwoLayersPhysicalRule , "" , false, "prule" ); - PyObject* module = Py_InitModule ( "Hurricane", PyHurricane_Methods ); + PyObject* module = PyModule_Create( &PyHurricane_ModuleDef ); if ( module == NULL ) { cerr << "[ERROR]\n" << " Failed to initialize Hurricane module." << endl; - return; + return NULL; } Py_INCREF ( &PyTypeDbU ); @@ -877,6 +887,8 @@ extern "C" { PyQuery_postModuleInit(); cdebug_log(20,0) << "Hurricane.so loaded " << (void*)&typeid(string) << endl; + + return module; } diff --git a/hurricane/src/isobar/PyInstance.cpp b/hurricane/src/isobar/PyInstance.cpp index cc2f376f..d464cbb8 100644 --- a/hurricane/src/isobar/PyInstance.cpp +++ b/hurricane/src/isobar/PyInstance.cpp @@ -38,11 +38,6 @@ extern "C" { #define ACCESS_CLASS(_pyObject) &(_pyObject->_baseObject) #define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Instance,instance,function) -#define LOAD_CONSTANT(CONSTANT_VALUE,CONSTANT_NAME) \ - constant = PyInt_FromLong ( (long)CONSTANT_VALUE ); \ - PyDict_SetItemString ( dictionnary, CONSTANT_NAME, constant ); \ - Py_DECREF ( constant ); - // +=================================================================+ // | "PyInstance" Python Module Code Part | diff --git a/hurricane/src/isobar/PyInterval.cpp b/hurricane/src/isobar/PyInterval.cpp index 7163b835..3aa1e737 100644 --- a/hurricane/src/isobar/PyInterval.cpp +++ b/hurricane/src/isobar/PyInterval.cpp @@ -74,7 +74,9 @@ extern "C" { else if (__cs.getObjectIds() == INTS2_ARG) { interval = new Interval ( PyAny_AsLong(arg0) , PyAny_AsLong(arg1) ); } else if (__cs.getObjectIds() == INTV_ARG ) { interval = new Interval ( *PYINTERVAL_O(arg0) ); } else { - PyErr_SetString(ConstructorError, "invalid number of parameters for Interval constructor." ); + string message = "PyInterval_NEW(): Invalid types or number of parameters (\"" + + __cs.getObjectIds() + "\")."; + PyErr_SetString( ConstructorError, message.c_str() ); return NULL; } HCATCH diff --git a/hurricane/src/isobar/PyLayerMask.cpp b/hurricane/src/isobar/PyLayerMask.cpp index 27cf4b1a..4ea7ac7d 100644 --- a/hurricane/src/isobar/PyLayerMask.cpp +++ b/hurricane/src/isobar/PyLayerMask.cpp @@ -225,31 +225,26 @@ extern "C" { 0 // binaryfunc nb_add; , 0 // binaryfunc nb_subtract; , 0 // binaryfunc nb_multiply; - , 0 // binaryfunc nb_divide; , 0 // binaryfunc nb_remainder; , 0 // binaryfunc nb_divmod; , 0 // ternaryfunc nb_power; , 0 // unaryfunc nb_negative; , 0 // unaryfunc nb_positive; , 0 // unaryfunc nb_absolute; - , (inquiry) PyLayerMask_nonzero // inquiry nb_nonzero; -- Used by PyObject_IsTrue + , (inquiry) PyLayerMask_nonzero // inquiry nb_bool; -- Used by PyObject_IsTrue , (unaryfunc) PyLayerMask_invert // unaryfunc nb_invert; , (binaryfunc)PyLayerMask_lshift // binaryfunc nb_lshift; , (binaryfunc)PyLayerMask_rshift // binaryfunc nb_rshift; , (binaryfunc)PyLayerMask_and // binaryfunc nb_and; , (binaryfunc)PyLayerMask_xor // binaryfunc nb_xor; , (binaryfunc)PyLayerMask_or // binaryfunc nb_or; - , 0 // coercion nb_coerce; -- Used by the coerce() function , 0 // unaryfunc nb_int; - , 0 // unaryfunc nb_long; + , NULL // void* nb_reserved; , 0 // unaryfunc nb_float; - , 0 // unaryfunc nb_oct; - , 0 // unaryfunc nb_hex; // Added in release 2.0 , 0 // binaryfunc nb_inplace_add; , 0 // binaryfunc nb_inplace_subtract; , 0 // binaryfunc nb_inplace_multiply; - , 0 // binaryfunc nb_inplace_divide; , 0 // binaryfunc nb_inplace_remainder; , 0 // ternaryfunc nb_inplace_power; , 0 // binaryfunc nb_inplace_lshift; @@ -264,6 +259,8 @@ extern "C" { , 0 // binaryfunc nb_inplace_true_divide; // Added in release 2.5 , 0 // unaryfunc nb_index; + , 0 // binaryfunc nb_matrix_multiply; + , 0 // binaryfunc nb_inplce_matrix_multiply; }; @@ -292,15 +289,19 @@ extern "C" { } - static int PyLayerMask_Cmp ( PyLayerMask *self, PyObject* other ) + static PyObject* PyLayerMask_Cmp ( PyLayerMask *self, PyObject* other, int op ) { - if ( not IsPyLayerMask(other) ) return -1; + if ( not IsPyLayerMask(other) ) Py_RETURN_FALSE; PyLayerMask* otherPyObject = (PyLayerMask*)other; - if ( self->_object == otherPyObject->_object ) return 0; - if ( self->_object < otherPyObject->_object ) return -1; + if ((op == Py_LT) and (self->_object < otherPyObject->_object)) Py_RETURN_TRUE; + if ((op == Py_LE) and (self->_object <= otherPyObject->_object)) Py_RETURN_TRUE; + if ((op == Py_EQ) and (self->_object == otherPyObject->_object)) Py_RETURN_TRUE; + if ((op == Py_NE) and (self->_object != otherPyObject->_object)) Py_RETURN_TRUE; + if ((op == Py_GT) and (self->_object > otherPyObject->_object)) Py_RETURN_TRUE; + if ((op == Py_GE) and (self->_object >= otherPyObject->_object)) Py_RETURN_TRUE; - return 1; + Py_RETURN_FALSE; } @@ -314,14 +315,14 @@ extern "C" { { cdebug_log(20,0) << "PyLayerMask_LinkType()" << endl; - PyTypeLayerMask.tp_new = PyLayerMask_new; - PyTypeLayerMask.tp_dealloc = (destructor) PyLayerMask_DeAlloc; - PyTypeLayerMask.tp_compare = (cmpfunc) PyLayerMask_Cmp; - PyTypeLayerMask.tp_repr = (reprfunc) PyLayerMask_Repr; - PyTypeLayerMask.tp_str = (reprfunc) PyLayerMask_Str; - PyTypeLayerMask.tp_hash = (hashfunc) PyLayerMask_Hash; - PyTypeLayerMask.tp_methods = PyLayerMask_Methods; - PyTypeLayerMask.tp_as_number = &PyLayerMask_NumberMethods; + PyTypeLayerMask.tp_new = PyLayerMask_new; + PyTypeLayerMask.tp_dealloc = (destructor) PyLayerMask_DeAlloc; + PyTypeLayerMask.tp_richcompare = (richcmpfunc)PyLayerMask_Cmp; + PyTypeLayerMask.tp_repr = (reprfunc) PyLayerMask_Repr; + PyTypeLayerMask.tp_str = (reprfunc) PyLayerMask_Str; + PyTypeLayerMask.tp_hash = (hashfunc) PyLayerMask_Hash; + PyTypeLayerMask.tp_methods = PyLayerMask_Methods; + PyTypeLayerMask.tp_as_number = &PyLayerMask_NumberMethods; } @@ -350,9 +351,8 @@ extern "C" { // PyLayer Object Definitions. PyTypeObject PyTypeLayerMask = - { PyObject_HEAD_INIT(NULL) - 0 /* ob_size. */ - , "Hurricane.Layer.Mask" /* tp_name. */ + { PyVarObject_HEAD_INIT(NULL,0) + "Hurricane.Layer.Mask" /* tp_name. */ , sizeof(PyLayerMask) /* tp_basicsize. */ , 0 /* tp_itemsize. */ /* methods. */ diff --git a/hurricane/src/isobar/PyMaterial.cpp b/hurricane/src/isobar/PyMaterial.cpp index 30b8b37e..590e9d64 100644 --- a/hurricane/src/isobar/PyMaterial.cpp +++ b/hurricane/src/isobar/PyMaterial.cpp @@ -129,15 +129,19 @@ extern "C" { // | "PyMaterial" Object Methods | // +-------------------------------------------------------------+ - static int PyMaterial_Cmp ( PyMaterial *self, PyObject* other ) + static PyObject* PyMaterial_Cmp ( PyMaterial *self, PyObject* other, int op ) { - if (not IsPyMaterial(other) ) return -1; + if (not IsPyMaterial(other) ) Py_RETURN_FALSE; PyMaterial* otherPyObject = (PyMaterial *)other; - if (self->_object->getCode() == otherPyObject->_object->getCode()) return 0; - if (self->_object->getCode() < otherPyObject->_object->getCode()) return -1; + if ((op == Py_LT) and (self->_object->getCode() < otherPyObject->_object->getCode())) Py_RETURN_TRUE; + if ((op == Py_LE) and (self->_object->getCode() <= otherPyObject->_object->getCode())) Py_RETURN_TRUE; + if ((op == Py_EQ) and (self->_object->getCode() == otherPyObject->_object->getCode())) Py_RETURN_TRUE; + if ((op == Py_NE) and (self->_object->getCode() != otherPyObject->_object->getCode())) Py_RETURN_TRUE; + if ((op == Py_GT) and (self->_object->getCode() > otherPyObject->_object->getCode())) Py_RETURN_TRUE; + if ((op == Py_GE) and (self->_object->getCode() >= otherPyObject->_object->getCode())) Py_RETURN_TRUE; - return 1; + Py_RETURN_FALSE; } DirectHashMethod (PyMaterial_Hash , Material) @@ -148,13 +152,13 @@ extern "C" { extern void PyMaterial_LinkPyType() { cdebug_log(20,0) << "PyMaterial_LinkType()" << endl; - PyTypeMaterial.tp_new = PyMaterial_new; - PyTypeMaterial.tp_dealloc = (destructor) PyMaterial_DeAlloc; - PyTypeMaterial.tp_repr = (reprfunc) PyMaterial_Repr; - PyTypeMaterial.tp_str = (reprfunc) PyMaterial_Str; - PyTypeMaterial.tp_compare = (cmpfunc) PyMaterial_Cmp; - PyTypeMaterial.tp_hash = (hashfunc) PyMaterial_Hash; - PyTypeMaterial.tp_methods = PyMaterial_Methods; + PyTypeMaterial.tp_new = PyMaterial_new; + PyTypeMaterial.tp_dealloc = (destructor) PyMaterial_DeAlloc; + PyTypeMaterial.tp_repr = (reprfunc) PyMaterial_Repr; + PyTypeMaterial.tp_str = (reprfunc) PyMaterial_Str; + PyTypeMaterial.tp_richcompare = (richcmpfunc)PyMaterial_Cmp; + PyTypeMaterial.tp_hash = (hashfunc) PyMaterial_Hash; + PyTypeMaterial.tp_methods = PyMaterial_Methods; } diff --git a/hurricane/src/isobar/PyNet.cpp b/hurricane/src/isobar/PyNet.cpp index 4f20bc04..2f49042a 100644 --- a/hurricane/src/isobar/PyNet.cpp +++ b/hurricane/src/isobar/PyNet.cpp @@ -41,11 +41,6 @@ extern "C" { #define ACCESS_CLASS(_pyObject) &(_pyObject->_baseObject) #define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Net,net,function) -#define LOAD_CONSTANT(CONSTANT_VALUE,CONSTANT_NAME) \ - constant = PyInt_FromLong ( (long)CONSTANT_VALUE ); \ - PyDict_SetItemString ( dictionnary, CONSTANT_NAME, constant ); \ - Py_DECREF ( constant ); - // +=================================================================+ // | "PyNet" Python Module Code Part | diff --git a/hurricane/src/isobar/PyNetDirection.cpp b/hurricane/src/isobar/PyNetDirection.cpp index 42d45203..448adf87 100644 --- a/hurricane/src/isobar/PyNetDirection.cpp +++ b/hurricane/src/isobar/PyNetDirection.cpp @@ -69,12 +69,12 @@ extern "C" { extern void PyNetDirection_LinkPyType() { cdebug_log(20,0) << "PyNetDirection_LinkType()" << endl; - PyTypeNetDirection.tp_dealloc = (destructor) PyNetDirection_DeAlloc; - PyTypeNetDirection.tp_compare = (cmpfunc) PyNetDirection_Cmp; - PyTypeNetDirection.tp_repr = (reprfunc) PyNetDirection_Repr; - PyTypeNetDirection.tp_str = (reprfunc) PyNetDirection_Str; - PyTypeNetDirection.tp_hash = (hashfunc) PyNetDirection_Hash; - PyTypeNetDirection.tp_methods = PyNetDirection_Methods; + PyTypeNetDirection.tp_dealloc = (destructor) PyNetDirection_DeAlloc; + PyTypeNetDirection.tp_richcompare = (richcmpfunc)PyNetDirection_Cmp; + PyTypeNetDirection.tp_repr = (reprfunc) PyNetDirection_Repr; + PyTypeNetDirection.tp_str = (reprfunc) PyNetDirection_Str; + PyTypeNetDirection.tp_hash = (hashfunc) PyNetDirection_Hash; + PyTypeNetDirection.tp_methods = PyNetDirection_Methods; } diff --git a/hurricane/src/isobar/PyNetType.cpp b/hurricane/src/isobar/PyNetType.cpp index 621ff026..b105d1f9 100644 --- a/hurricane/src/isobar/PyNetType.cpp +++ b/hurricane/src/isobar/PyNetType.cpp @@ -68,12 +68,12 @@ extern "C" { extern void PyNetType_LinkPyType() { cdebug_log(20,0) << "PyNetType_LinkType()" << endl; - PyTypeNetType.tp_dealloc = (destructor) PyNetType_DeAlloc; - PyTypeNetType.tp_compare = (cmpfunc) PyNetType_Cmp; - PyTypeNetType.tp_repr = (reprfunc) PyNetType_Repr; - PyTypeNetType.tp_str = (reprfunc) PyNetType_Str; - PyTypeNetType.tp_hash = (hashfunc) PyNetType_Hash; - PyTypeNetType.tp_methods = PyNetType_Methods; + PyTypeNetType.tp_dealloc = (destructor) PyNetType_DeAlloc; + PyTypeNetType.tp_richcompare = (richcmpfunc)PyNetType_Cmp; + PyTypeNetType.tp_repr = (reprfunc) PyNetType_Repr; + PyTypeNetType.tp_str = (reprfunc) PyNetType_Str; + PyTypeNetType.tp_hash = (hashfunc) PyNetType_Hash; + PyTypeNetType.tp_methods = PyNetType_Methods; } diff --git a/hurricane/src/isobar/PyOccurrence.cpp b/hurricane/src/isobar/PyOccurrence.cpp index 8879b601..58a3b4fc 100644 --- a/hurricane/src/isobar/PyOccurrence.cpp +++ b/hurricane/src/isobar/PyOccurrence.cpp @@ -253,14 +253,14 @@ extern "C" { { cdebug_log(20,0) << "PyOccurrence_LinkType()" << endl; - PyTypeOccurrence.tp_dealloc = (destructor) PyOccurrence_DeAlloc; - PyTypeOccurrence.tp_compare = (cmpfunc) PyOccurrence_Cmp; - PyTypeOccurrence.tp_repr = (reprfunc) PyOccurrence_Repr; - PyTypeOccurrence.tp_str = (reprfunc) PyOccurrence_Str; - PyTypeOccurrence.tp_hash = (hashfunc) PyOccurrence_Hash; - PyTypeOccurrence.tp_new = (newfunc) PyOccurrence_NEW; - PyTypeOccurrence.tp_init = (initproc) PyOccurrence_Init; - PyTypeOccurrence.tp_methods = PyOccurrence_Methods; + PyTypeOccurrence.tp_dealloc = (destructor) PyOccurrence_DeAlloc; + PyTypeOccurrence.tp_richcompare = (richcmpfunc)PyOccurrence_Cmp; + PyTypeOccurrence.tp_repr = (reprfunc) PyOccurrence_Repr; + PyTypeOccurrence.tp_str = (reprfunc) PyOccurrence_Str; + PyTypeOccurrence.tp_hash = (hashfunc) PyOccurrence_Hash; + PyTypeOccurrence.tp_new = (newfunc) PyOccurrence_NEW; + PyTypeOccurrence.tp_init = (initproc) PyOccurrence_Init; + PyTypeOccurrence.tp_methods = PyOccurrence_Methods; } //PyTypeObjectLinkPyTypeNewInit(Occurrence) diff --git a/hurricane/src/isobar/PyOrientation.cpp b/hurricane/src/isobar/PyOrientation.cpp index f0af3e90..83b29a4d 100644 --- a/hurricane/src/isobar/PyOrientation.cpp +++ b/hurricane/src/isobar/PyOrientation.cpp @@ -73,12 +73,12 @@ extern "C" { extern void PyOrientation_LinkPyType() { cdebug_log(20,0) << "PyOrientation_LinkType()" << endl; - PyTypeOrientation.tp_dealloc = (destructor) PyOrientation_DeAlloc; - PyTypeOrientation.tp_compare = (cmpfunc) PyOrientation_Cmp; - PyTypeOrientation.tp_repr = (reprfunc) PyOrientation_Repr; - PyTypeOrientation.tp_str = (reprfunc) PyOrientation_Str; - PyTypeOrientation.tp_hash = (hashfunc) PyOrientation_Hash; - PyTypeOrientation.tp_methods = PyOrientation_Methods; + PyTypeOrientation.tp_dealloc = (destructor) PyOrientation_DeAlloc; + PyTypeOrientation.tp_richcompare = (richcmpfunc)PyOrientation_Cmp; + PyTypeOrientation.tp_repr = (reprfunc) PyOrientation_Repr; + PyTypeOrientation.tp_str = (reprfunc) PyOrientation_Str; + PyTypeOrientation.tp_hash = (hashfunc) PyOrientation_Hash; + PyTypeOrientation.tp_methods = PyOrientation_Methods; } diff --git a/hurricane/src/isobar/PyPinDirection.cpp b/hurricane/src/isobar/PyPinDirection.cpp index 15b67f66..f8cf11d7 100644 --- a/hurricane/src/isobar/PyPinDirection.cpp +++ b/hurricane/src/isobar/PyPinDirection.cpp @@ -69,12 +69,12 @@ extern "C" { extern void PyPinDirection_LinkPyType() { cdebug_log(20,0) << "PyPinDirection_LinkType()" << endl; - PyTypePinDirection.tp_dealloc = (destructor) PyPinDirection_DeAlloc; - PyTypePinDirection.tp_compare = (cmpfunc) PyPinDirection_Cmp; - PyTypePinDirection.tp_repr = (reprfunc) PyPinDirection_Repr; - PyTypePinDirection.tp_str = (reprfunc) PyPinDirection_Str; - PyTypePinDirection.tp_hash = (hashfunc) PyPinDirection_Hash; - PyTypePinDirection.tp_methods = PyPinDirection_Methods; + PyTypePinDirection.tp_dealloc = (destructor) PyPinDirection_DeAlloc; + PyTypePinDirection.tp_richcompare = (richcmpfunc)PyPinDirection_Cmp; + PyTypePinDirection.tp_repr = (reprfunc) PyPinDirection_Repr; + PyTypePinDirection.tp_str = (reprfunc) PyPinDirection_Str; + PyTypePinDirection.tp_hash = (hashfunc) PyPinDirection_Hash; + PyTypePinDirection.tp_methods = PyPinDirection_Methods; } diff --git a/hurricane/src/isobar/PyPinPlacementStatus.cpp b/hurricane/src/isobar/PyPinPlacementStatus.cpp index 38252882..de798fcd 100644 --- a/hurricane/src/isobar/PyPinPlacementStatus.cpp +++ b/hurricane/src/isobar/PyPinPlacementStatus.cpp @@ -69,12 +69,12 @@ extern "C" { extern void PyPinPlacementStatus_LinkPyType() { cdebug_log(20,0) << "PyPinPlacementStatus_LinkType()" << endl; - PyTypePinPlacementStatus.tp_dealloc = (destructor) PyPinPlacementStatus_DeAlloc; - PyTypePinPlacementStatus.tp_compare = (cmpfunc) PyPinPlacementStatus_Cmp; - PyTypePinPlacementStatus.tp_repr = (reprfunc) PyPinPlacementStatus_Repr; - PyTypePinPlacementStatus.tp_str = (reprfunc) PyPinPlacementStatus_Str; - PyTypePinPlacementStatus.tp_hash = (hashfunc) PyPinPlacementStatus_Hash; - PyTypePinPlacementStatus.tp_methods = PyPinPlacementStatus_Methods; + PyTypePinPlacementStatus.tp_dealloc = (destructor) PyPinPlacementStatus_DeAlloc; + PyTypePinPlacementStatus.tp_richcompare = (richcmpfunc)PyPinPlacementStatus_Cmp; + PyTypePinPlacementStatus.tp_repr = (reprfunc) PyPinPlacementStatus_Repr; + PyTypePinPlacementStatus.tp_str = (reprfunc) PyPinPlacementStatus_Str; + PyTypePinPlacementStatus.tp_hash = (hashfunc) PyPinPlacementStatus_Hash; + PyTypePinPlacementStatus.tp_methods = PyPinPlacementStatus_Methods; } diff --git a/hurricane/src/isobar/PyPlacementStatus.cpp b/hurricane/src/isobar/PyPlacementStatus.cpp index 55060fc2..dfec930f 100644 --- a/hurricane/src/isobar/PyPlacementStatus.cpp +++ b/hurricane/src/isobar/PyPlacementStatus.cpp @@ -73,12 +73,12 @@ extern "C" { extern void PyPlacementStatus_LinkPyType() { cdebug_log(20,0) << "PyPlacementStatus_LinkType()" << endl; - PyTypePlacementStatus.tp_dealloc = (destructor) PyPlacementStatus_DeAlloc; - PyTypePlacementStatus.tp_compare = (cmpfunc) PyPlacementStatus_Cmp; - PyTypePlacementStatus.tp_repr = (reprfunc) PyPlacementStatus_Repr; - PyTypePlacementStatus.tp_str = (reprfunc) PyPlacementStatus_Str; - PyTypePlacementStatus.tp_hash = (hashfunc) PyPlacementStatus_Hash; - PyTypePlacementStatus.tp_methods = PyPlacementStatus_Methods; + PyTypePlacementStatus.tp_dealloc = (destructor) PyPlacementStatus_DeAlloc; + PyTypePlacementStatus.tp_richcompare = (richcmpfunc)PyPlacementStatus_Cmp; + PyTypePlacementStatus.tp_repr = (reprfunc) PyPlacementStatus_Repr; + PyTypePlacementStatus.tp_str = (reprfunc) PyPlacementStatus_Str; + PyTypePlacementStatus.tp_hash = (hashfunc) PyPlacementStatus_Hash; + PyTypePlacementStatus.tp_methods = PyPlacementStatus_Methods; } diff --git a/hurricane/src/isobar/PyQuery.cpp b/hurricane/src/isobar/PyQuery.cpp index da3b6342..e7f50a9d 100644 --- a/hurricane/src/isobar/PyQuery.cpp +++ b/hurricane/src/isobar/PyQuery.cpp @@ -86,7 +86,10 @@ extern "C" { void BaseQuery::goCallback ( Go* go ) { if (PyCallable_Check(_goCallback)) { - PyObject_CallFunctionObjArgs( _goCallback, _self, PyEntity_NEW(go), NULL ); + if (not PyObject_CallFunctionObjArgs( _goCallback, _self, PyEntity_NEW(go), NULL )) { + PyErr_Print(); + PyErr_Clear(); + } } } diff --git a/hurricane/src/isobar/PyQueryMask.cpp b/hurricane/src/isobar/PyQueryMask.cpp index 383d10a0..9e6927f1 100644 --- a/hurricane/src/isobar/PyQueryMask.cpp +++ b/hurricane/src/isobar/PyQueryMask.cpp @@ -225,31 +225,26 @@ extern "C" { 0 // binaryfunc nb_add; , 0 // binaryfunc nb_subtract; , 0 // binaryfunc nb_multiply; - , 0 // binaryfunc nb_divide; , 0 // binaryfunc nb_remainder; , 0 // binaryfunc nb_divmod; , 0 // ternaryfunc nb_power; , 0 // unaryfunc nb_negative; , 0 // unaryfunc nb_positive; , 0 // unaryfunc nb_absolute; - , (inquiry) PyQueryMask_nonzero // inquiry nb_nonzero; -- Used by PyObject_IsTrue + , (inquiry) PyQueryMask_nonzero // inquiry nb_bool; -- Used by PyObject_IsTrue , (unaryfunc) PyQueryMask_invert // unaryfunc nb_invert; , (binaryfunc)PyQueryMask_lshift // binaryfunc nb_lshift; , (binaryfunc)PyQueryMask_rshift // binaryfunc nb_rshift; , (binaryfunc)PyQueryMask_and // binaryfunc nb_and; , (binaryfunc)PyQueryMask_xor // binaryfunc nb_xor; , (binaryfunc)PyQueryMask_or // binaryfunc nb_or; - , 0 // coercion nb_coerce; -- Used by the coerce() function , 0 // unaryfunc nb_int; - , 0 // unaryfunc nb_long; + , NULL // void* nb_reserved; , 0 // unaryfunc nb_float; - , 0 // unaryfunc nb_oct; - , 0 // unaryfunc nb_hex; // Added in release 2.0 , 0 // binaryfunc nb_inplace_add; , 0 // binaryfunc nb_inplace_subtract; , 0 // binaryfunc nb_inplace_multiply; - , 0 // binaryfunc nb_inplace_divide; , 0 // binaryfunc nb_inplace_remainder; , 0 // ternaryfunc nb_inplace_power; , 0 // binaryfunc nb_inplace_lshift; @@ -264,6 +259,8 @@ extern "C" { , 0 // binaryfunc nb_inplace_true_divide; // Added in release 2.5 , 0 // unaryfunc nb_index; + , 0 // binaryfunc nb_matrix_mutiply; + , 0 // binaryfunc nb_inplace_matrix_mutiply; }; @@ -314,14 +311,14 @@ extern "C" { { cdebug_log(20,0) << "PyQueryMask_LinkType()" << endl; - PyTypeQueryMask.tp_new = PyQueryMask_new; - PyTypeQueryMask.tp_dealloc = (destructor) PyQueryMask_DeAlloc; - PyTypeQueryMask.tp_compare = (cmpfunc) PyQueryMask_Cmp; - PyTypeQueryMask.tp_repr = (reprfunc) PyQueryMask_Repr; - PyTypeQueryMask.tp_str = (reprfunc) PyQueryMask_Str; - PyTypeQueryMask.tp_hash = (hashfunc) PyQueryMask_Hash; - PyTypeQueryMask.tp_methods = PyQueryMask_Methods; - PyTypeQueryMask.tp_as_number = &PyQueryMask_NumberMethods; + PyTypeQueryMask.tp_new = PyQueryMask_new; + PyTypeQueryMask.tp_dealloc = (destructor) PyQueryMask_DeAlloc; + PyTypeQueryMask.tp_richcompare = (richcmpfunc)PyQueryMask_Cmp; + PyTypeQueryMask.tp_repr = (reprfunc) PyQueryMask_Repr; + PyTypeQueryMask.tp_str = (reprfunc) PyQueryMask_Str; + PyTypeQueryMask.tp_hash = (hashfunc) PyQueryMask_Hash; + PyTypeQueryMask.tp_methods = PyQueryMask_Methods; + PyTypeQueryMask.tp_as_number = &PyQueryMask_NumberMethods; } @@ -350,9 +347,8 @@ extern "C" { // PyQuery Object Definitions. PyTypeObject PyTypeQueryMask = - { PyObject_HEAD_INIT(NULL) - 0 /* ob_size. */ - , "Hurricane.Query.Mask" /* tp_name. */ + { PyVarObject_HEAD_INIT(NULL,0) + "Hurricane.Query.Mask" /* tp_name. */ , sizeof(PyQueryMask) /* tp_basicsize. */ , 0 /* tp_itemsize. */ /* methods. */ diff --git a/hurricane/src/isobar/hurricane/isobar/PyDataBase.h b/hurricane/src/isobar/hurricane/isobar/PyDataBase.h index d746c2d1..a3b27aa6 100644 --- a/hurricane/src/isobar/hurricane/isobar/PyDataBase.h +++ b/hurricane/src/isobar/hurricane/isobar/PyDataBase.h @@ -44,7 +44,7 @@ namespace Isobar { extern void PyDataBase_LinkPyType (); -#define IsPyDataBase(v) ( (v)->ob_type == &PyTypeDataBase ) +#define IsPyDataBase(v) ( Py_TYPE(v) == &PyTypeDataBase ) #define PYDATABASE(v) ( (PyDataBase*)(v) ) #define PYDATABASE_O(v) ( PYDATABASE(v)->_object ) diff --git a/hurricane/src/isobar/hurricane/isobar/PyHurricane.h b/hurricane/src/isobar/hurricane/isobar/PyHurricane.h index a9a350d6..ef985fe7 100644 --- a/hurricane/src/isobar/hurricane/isobar/PyHurricane.h +++ b/hurricane/src/isobar/hurricane/isobar/PyHurricane.h @@ -33,6 +33,28 @@ #include "hurricane/DbU.h" #include "hurricane/isobar/ProxyProperty.h" + +inline long PyInt_AsLong ( PyObject* object ) +{ return PyLong_AsLong(object); } + + +inline bool PyString_Check ( PyObject* object ) +{ return PyUnicode_Check(object); } + + +inline std::string PyString_AsString ( PyObject* object ) +{ + PyObject* pyBytes = PyUnicode_AsASCIIString( object ); + std::string s = PyBytes_AsString( pyBytes ); + Py_DECREF( pyBytes ); + return s; +} + + +inline PyObject* PyString_FromString ( const char* s ) +{ return PyUnicode_FromString( s ); } + + namespace Isobar { @@ -116,8 +138,7 @@ namespace Isobar { inline int PyAny_AsInt ( PyObject* object ) { long value = 0; - if (PyObject_IsInstance(object,(PyObject*)&PyInt_Type )) value = PyInt_AsLong ( object ); - else if (PyObject_IsInstance(object,(PyObject*)&PyLong_Type)) value = PyLong_AsLong( object ); + if (PyObject_IsInstance(object,(PyObject*)&PyLong_Type)) value = PyLong_AsLong( object ); return (int)value; } @@ -125,8 +146,7 @@ namespace Isobar { inline uint32_t PyAny_AsUInt32 ( PyObject* object ) { int64_t value = 0; - if (PyObject_IsInstance(object,(PyObject*)&PyInt_Type )) value = PyInt_AsLong ( object ); - else if (PyObject_IsInstance(object,(PyObject*)&PyLong_Type)) value = PyLong_AsLong( object ); + if (PyObject_IsInstance(object,(PyObject*)&PyLong_Type)) value = PyLong_AsLong( object ); return (uint32_t)value; } @@ -135,8 +155,7 @@ namespace Isobar { inline T PyAny_AsLong ( PyObject* object ) { T value = 0; - if (PyObject_IsInstance(object,(PyObject*)&PyInt_Type )) value = PyInt_AsLong ( object ); - else if (PyObject_IsInstance(object,(PyObject*)&PyLong_Type)) value = PyLong_AsLong( object ); + if (PyObject_IsInstance(object,(PyObject*)&PyLong_Type)) value = PyLong_AsLong( object ); return value; } @@ -145,8 +164,7 @@ namespace Isobar { inline T PyAny_AsLong ( PyObject* object ) { T value = 0; - if (PyObject_IsInstance(object,(PyObject*)&PyInt_Type )) value = PyInt_AsLong ( object ); - else if (PyObject_IsInstance(object,(PyObject*)&PyLong_Type)) value = PyLong_AsLongLong( object ); + if (PyObject_IsInstance(object,(PyObject*)&PyLong_Type)) value = PyLong_AsLongLong( object ); //if (value > numeric_limits::max()) { // throw Error( "PyAny_AsLong(): Suspiciously big int %s, db:%lli" @@ -240,12 +258,12 @@ extern "C" { #define LOAD_CONSTANT(CONSTANT_VALUE,CONSTANT_NAME) \ - constant = PyInt_FromLong ( (long)CONSTANT_VALUE ); \ + constant = PyLong_FromLong ( (long)CONSTANT_VALUE ); \ PyDict_SetItemString ( dictionnary, CONSTANT_NAME, constant ); \ Py_DECREF ( constant ); #define LoadObjectConstant(DICTIONARY,CONSTANT_VALUE,CONSTANT_NAME) \ - constant = PyInt_FromLong ( (long)CONSTANT_VALUE ); \ + constant = PyLong_FromLong ( (long)CONSTANT_VALUE ); \ PyDict_SetItemString ( DICTIONARY, CONSTANT_NAME, constant ); \ Py_DECREF ( constant ); @@ -756,7 +774,7 @@ extern "C" { cdebug_log(20,0) << "Py"#SELF_TYPE"_getName()" << endl; \ HTRY \ METHOD_HEAD (#SELF_TYPE".getName()") \ - return PyString_FromString(getString(SELF->getName()).c_str()); \ + return PyUnicode_FromString(getString(SELF->getName()).c_str()); \ HCATCH \ return NULL; \ } @@ -845,7 +863,7 @@ extern "C" { #define DirectVoidMethod(SELF_TYPE, SELF_OBJECT, FUNC_NAME) \ static PyObject* Py##SELF_TYPE##_##FUNC_NAME(Py##SELF_TYPE* self) \ { \ - cdebug_log(20,0) << "Py" #SELF_TYPE "_" #FUNC_NAME "()" << endl; \ + cdebug_log(20,0) << "Py" #SELF_TYPE "_" #FUNC_NAME "()" << endl; \ HTRY \ METHOD_HEAD(#SELF_TYPE "." #FUNC_NAME "()") \ SELF_OBJECT->FUNC_NAME(); \ @@ -1085,16 +1103,16 @@ extern "C" { if (self->ACCESS_OBJECT == NULL) { \ ostringstream repr; \ repr << "<" #PY_SELF_TYPE " [" << (void*)self << " <-> NULL] unbound>"; \ - return PyString_FromString( repr.str().c_str() ); \ + return PyUnicode_FromString( repr.str().c_str() ); \ } \ SELF_TYPE* object = dynamic_cast(self->ACCESS_OBJECT); \ if (object == NULL) \ - return PyString_FromString( "" ); \ + return PyUnicode_FromString( "" ); \ \ ostringstream repr; \ repr << "[" << (void*)self << "<->" << (void*)object << " " << getString(object) << "]"; \ \ - return PyString_FromString(repr.str().c_str() ); \ + return PyUnicode_FromString(repr.str().c_str() ); \ } @@ -1109,13 +1127,13 @@ extern "C" { if (self->ACCESS_OBJECT == NULL) { \ ostringstream repr; \ repr << "<" #PY_SELF_TYPE " [" << (void*)self << " <-> NULL] unbound>"; \ - return PyString_FromString( repr.str().c_str() ); \ + return PyUnicode_FromString( repr.str().c_str() ); \ } \ SELF_TYPE* object = dynamic_cast(self->ACCESS_OBJECT); \ if (object == NULL) \ - return PyString_FromString("" ); \ + return PyUnicode_FromString("" ); \ \ - return PyString_FromString(getString(object).c_str() ); \ + return PyUnicode_FromString(getString(object).c_str() ); \ } @@ -1124,16 +1142,20 @@ extern "C" { // ------------------------------------------------------------------- // Attribute Method For Cmp, compare pointer value (unicity) -# define DirectCmpByPtrMethod(PY_FUNC_NAME,IS_PY_OBJECT,PY_SELF_TYPE) \ - static int PY_FUNC_NAME ( PY_SELF_TYPE *self, PyObject* other ) \ - { \ - if (not IS_PY_OBJECT(other)) return -1; \ - \ - PY_SELF_TYPE* otherPyObject = (PY_SELF_TYPE*)other; \ - if (self->ACCESS_OBJECT == otherPyObject->ACCESS_OBJECT) return 0; \ - if (self->ACCESS_OBJECT < otherPyObject->ACCESS_OBJECT) return -1; \ - \ - return 1; \ +# define DirectCmpByPtrMethod(PY_FUNC_NAME,IS_PY_OBJECT,PY_SELF_TYPE) \ + static PyObject* PY_FUNC_NAME ( PY_SELF_TYPE *self, PyObject* other, int op ) \ + { \ + if (not IS_PY_OBJECT(other)) Py_RETURN_FALSE; \ + \ + PY_SELF_TYPE* otherPyObject = (PY_SELF_TYPE*)other; \ + if ((op == Py_LT) and (self->ACCESS_OBJECT < otherPyObject->ACCESS_OBJECT)) Py_RETURN_TRUE; \ + if ((op == Py_LE) and (self->ACCESS_OBJECT <= otherPyObject->ACCESS_OBJECT)) Py_RETURN_TRUE; \ + if ((op == Py_EQ) and (self->ACCESS_OBJECT == otherPyObject->ACCESS_OBJECT)) Py_RETURN_TRUE; \ + if ((op == Py_NE) and (self->ACCESS_OBJECT != otherPyObject->ACCESS_OBJECT)) Py_RETURN_TRUE; \ + if ((op == Py_GT) and (self->ACCESS_OBJECT > otherPyObject->ACCESS_OBJECT)) Py_RETURN_TRUE; \ + if ((op == Py_GE) and (self->ACCESS_OBJECT >= otherPyObject->ACCESS_OBJECT)) Py_RETURN_TRUE; \ + \ + Py_RETURN_FALSE; \ } @@ -1142,16 +1164,20 @@ extern "C" { // ------------------------------------------------------------------- // Attribute Method For Cmp, compare object contents -# define DirectCmpByValueMethod(PY_FUNC_NAME,IS_PY_OBJECT,PY_SELF_TYPE) \ - static int PY_FUNC_NAME ( PY_SELF_TYPE *self, PyObject* other ) \ - { \ - if (not IS_PY_OBJECT(other)) return -1; \ - \ - PY_SELF_TYPE* otherPyObject = (PY_SELF_TYPE*)other; \ - if (*(self->ACCESS_OBJECT) == *(otherPyObject->ACCESS_OBJECT)) return 0; \ - if ( self->ACCESS_OBJECT < otherPyObject->ACCESS_OBJECT ) return -1; \ - \ - return 1; \ +# define DirectCmpByValueMethod(PY_FUNC_NAME,IS_PY_OBJECT,PY_SELF_TYPE) \ + static PyObject* PY_FUNC_NAME ( PY_SELF_TYPE *self, PyObject* other, int op ) \ + { \ + if (not IS_PY_OBJECT(other)) Py_RETURN_FALSE; \ + \ + PY_SELF_TYPE* otherPyObject = (PY_SELF_TYPE*)other; \ + if ((op == Py_LT) and (self->ACCESS_OBJECT < otherPyObject->ACCESS_OBJECT)) Py_RETURN_TRUE; \ + if ((op == Py_LE) and (self->ACCESS_OBJECT <= otherPyObject->ACCESS_OBJECT)) Py_RETURN_TRUE; \ + if ((op == Py_EQ) and *(self->ACCESS_OBJECT) == *(otherPyObject->ACCESS_OBJECT)) Py_RETURN_TRUE; \ + if ((op == Py_NE) and (self->ACCESS_OBJECT != otherPyObject->ACCESS_OBJECT)) Py_RETURN_TRUE; \ + if ((op == Py_GT) and (self->ACCESS_OBJECT > otherPyObject->ACCESS_OBJECT)) Py_RETURN_TRUE; \ + if ((op == Py_GE) and (self->ACCESS_OBJECT >= otherPyObject->ACCESS_OBJECT)) Py_RETURN_TRUE; \ + \ + Py_RETURN_FALSE; \ } @@ -1327,12 +1353,12 @@ extern "C" { extern void Py##PY_SELF_TYPE##_LinkPyType() { \ cdebug_log(20,0) << "Py" #PY_SELF_TYPE "_LinkType()" << endl; \ \ - PyType##PY_SELF_TYPE.tp_dealloc = (destructor) Py##PY_SELF_TYPE##_DeAlloc; \ - PyType##PY_SELF_TYPE.tp_compare = (cmpfunc) Py##PY_SELF_TYPE##_Cmp; \ - PyType##PY_SELF_TYPE.tp_repr = (reprfunc) Py##PY_SELF_TYPE##_Repr; \ - PyType##PY_SELF_TYPE.tp_str = (reprfunc) Py##PY_SELF_TYPE##_Str; \ - PyType##PY_SELF_TYPE.tp_hash = (hashfunc) Py##PY_SELF_TYPE##_Hash; \ - PyType##PY_SELF_TYPE.tp_methods = Py##PY_SELF_TYPE##_Methods; \ + PyType##PY_SELF_TYPE.tp_dealloc = (destructor) Py##PY_SELF_TYPE##_DeAlloc; \ + PyType##PY_SELF_TYPE.tp_richcompare = (richcmpfunc)Py##PY_SELF_TYPE##_Cmp; \ + PyType##PY_SELF_TYPE.tp_repr = (reprfunc) Py##PY_SELF_TYPE##_Repr; \ + PyType##PY_SELF_TYPE.tp_str = (reprfunc) Py##PY_SELF_TYPE##_Str; \ + PyType##PY_SELF_TYPE.tp_hash = (hashfunc) Py##PY_SELF_TYPE##_Hash; \ + PyType##PY_SELF_TYPE.tp_methods = Py##PY_SELF_TYPE##_Methods; \ } @@ -1344,14 +1370,14 @@ extern "C" { extern void Py##PY_SELF_TYPE##_LinkPyType() { \ cdebug_log(20,0) << "Py" #PY_SELF_TYPE "_LinkType()" << endl; \ \ - PyType##PY_SELF_TYPE.tp_dealloc = (destructor) Py##PY_SELF_TYPE##_DeAlloc; \ - PyType##PY_SELF_TYPE.tp_compare = (cmpfunc) Py##PY_SELF_TYPE##_Cmp; \ - PyType##PY_SELF_TYPE.tp_repr = (reprfunc) Py##PY_SELF_TYPE##_Repr; \ - PyType##PY_SELF_TYPE.tp_str = (reprfunc) Py##PY_SELF_TYPE##_Str; \ - PyType##PY_SELF_TYPE.tp_hash = (hashfunc) Py##PY_SELF_TYPE##_Hash; \ - PyType##PY_SELF_TYPE.tp_new = (newfunc) Py##PY_SELF_TYPE##_NEW; \ - PyType##PY_SELF_TYPE.tp_init = (initproc) Py##PY_SELF_TYPE##_Init; \ - PyType##PY_SELF_TYPE.tp_methods = Py##PY_SELF_TYPE##_Methods; \ + PyType##PY_SELF_TYPE.tp_dealloc = (destructor) Py##PY_SELF_TYPE##_DeAlloc; \ + PyType##PY_SELF_TYPE.tp_richcompare = (richcmpfunc)Py##PY_SELF_TYPE##_Cmp; \ + PyType##PY_SELF_TYPE.tp_repr = (reprfunc) Py##PY_SELF_TYPE##_Repr; \ + PyType##PY_SELF_TYPE.tp_str = (reprfunc) Py##PY_SELF_TYPE##_Str; \ + PyType##PY_SELF_TYPE.tp_hash = (hashfunc) Py##PY_SELF_TYPE##_Hash; \ + PyType##PY_SELF_TYPE.tp_new = (newfunc) Py##PY_SELF_TYPE##_NEW; \ + PyType##PY_SELF_TYPE.tp_init = (initproc) Py##PY_SELF_TYPE##_Init; \ + PyType##PY_SELF_TYPE.tp_methods = Py##PY_SELF_TYPE##_Methods; \ } @@ -1370,14 +1396,14 @@ extern "C" { extern void Py##SELF_TYPE##_LinkPyType() { \ cdebug_log(20,0) << "Py" #SELF_TYPE "_LinkType()" << endl; \ \ - PyType##SELF_TYPE.tp_dealloc = (destructor) Py##SELF_TYPE##_DeAlloc; \ - PyType##SELF_TYPE.tp_compare = (cmpfunc) Py##SELF_TYPE##_Cmp; \ - PyType##SELF_TYPE.tp_repr = (reprfunc) Py##SELF_TYPE##_Repr; \ - PyType##SELF_TYPE.tp_str = (reprfunc) Py##SELF_TYPE##_Str; \ - PyType##SELF_TYPE.tp_hash = (hashfunc) Py##SELF_TYPE##_Hash; \ - PyType##SELF_TYPE.tp_new = (newfunc) Py##SELF_TYPE##_NEW; \ - PyType##SELF_TYPE.tp_init = (initproc) Py##SELF_TYPE##_Init; \ - PyType##SELF_TYPE.tp_methods = Py##SELF_TYPE##_Methods; \ + PyType##SELF_TYPE.tp_dealloc = (destructor) Py##SELF_TYPE##_DeAlloc; \ + PyType##SELF_TYPE.tp_richcompare = (richcmpfunc)Py##SELF_TYPE##_Cmp; \ + PyType##SELF_TYPE.tp_repr = (reprfunc) Py##SELF_TYPE##_Repr; \ + PyType##SELF_TYPE.tp_str = (reprfunc) Py##SELF_TYPE##_Str; \ + PyType##SELF_TYPE.tp_hash = (hashfunc) Py##SELF_TYPE##_Hash; \ + PyType##SELF_TYPE.tp_new = (newfunc) Py##SELF_TYPE##_NEW; \ + PyType##SELF_TYPE.tp_init = (initproc) Py##SELF_TYPE##_Init; \ + PyType##SELF_TYPE.tp_methods = Py##SELF_TYPE##_Methods; \ } @@ -1390,18 +1416,17 @@ extern "C" { { \ cdebug_log(20,0) << "Py" #PY_SELF_TYPE "Locator_LinkType()" << endl; \ \ - PyType##PY_SELF_TYPE##Locator.tp_dealloc = (destructor)Py##PY_SELF_TYPE##Locator_DeAlloc; \ - PyType##PY_SELF_TYPE##Locator.tp_compare = (cmpfunc) Py##PY_SELF_TYPE##Locator_Cmp; \ - PyType##PY_SELF_TYPE##Locator.tp_repr = (reprfunc) Py##PY_SELF_TYPE##Locator_Repr; \ - PyType##PY_SELF_TYPE##Locator.tp_str = (reprfunc) Py##PY_SELF_TYPE##Locator_Str; \ - PyType##PY_SELF_TYPE##Locator.tp_methods = Py##PY_SELF_TYPE##Locator_Methods; \ + PyType##PY_SELF_TYPE##Locator.tp_dealloc = (destructor) Py##PY_SELF_TYPE##Locator_DeAlloc; \ + PyType##PY_SELF_TYPE##Locator.tp_richcompare = (richcmpfunc)Py##PY_SELF_TYPE##Locator_Cmp; \ + PyType##PY_SELF_TYPE##Locator.tp_repr = (reprfunc) Py##PY_SELF_TYPE##Locator_Repr; \ + PyType##PY_SELF_TYPE##Locator.tp_str = (reprfunc) Py##PY_SELF_TYPE##Locator_Str; \ + PyType##PY_SELF_TYPE##Locator.tp_methods = Py##PY_SELF_TYPE##Locator_Methods; \ } #define PyTypeObjectDefinitions(SELF_TYPE) \ PyTypeObject PyType##SELF_TYPE = \ - { PyObject_HEAD_INIT(NULL) \ - 0 /* ob_size. */ \ - , "Hurricane."#SELF_TYPE /* tp_name. */ \ + { PyVarObject_HEAD_INIT(NULL,0) \ + "Hurricane."#SELF_TYPE /* tp_name. */ \ , sizeof(Py##SELF_TYPE) /* tp_basicsize. */ \ , 0 /* tp_itemsize. */ \ /* methods. */ \ @@ -1426,9 +1451,8 @@ extern "C" { #define PyTypeObjectDefinitionsOfModule(MODULE,SELF_TYPE) \ PyTypeObject PyType##SELF_TYPE = \ - { PyObject_HEAD_INIT(NULL) \ - 0 /* ob_size. */ \ - , #MODULE "." #SELF_TYPE /* tp_name. */ \ + { PyVarObject_HEAD_INIT(NULL,0) \ + #MODULE "." #SELF_TYPE /* tp_name. */ \ , sizeof(Py##SELF_TYPE) /* tp_basicsize. */ \ , 0 /* tp_itemsize. */ \ /* methods. */ \ @@ -1453,9 +1477,8 @@ extern "C" { #define PyTypeRootObjectDefinitions(SELF_TYPE) \ PyTypeObject PyType##SELF_TYPE = \ - { PyObject_HEAD_INIT(&PyType_Type) \ - 0 /* ob_size. */ \ - , "Hurricane.Py" #SELF_TYPE /* tp_name. */ \ + { PyVarObject_HEAD_INIT(&PyType_Type,0) \ + "Hurricane.Py" #SELF_TYPE /* tp_name. */ \ , sizeof(Py##SELF_TYPE) /* tp_basicsize. */ \ , 0 /* tp_itemsize. */ \ /* methods. */ \ @@ -1481,9 +1504,8 @@ extern "C" { #define PyTypeInheritedObjectDefinitions(SELF_TYPE, INHERITED_TYPE) \ PyTypeObject PyType##SELF_TYPE = \ - { PyObject_HEAD_INIT(DEFERRED_ADDRESS(&PyType##INHERITED_TYPE)) \ - 0 /* ob_size. */ \ - , "Hurricane." #SELF_TYPE /* tp_name. */ \ + { PyVarObject_HEAD_INIT(DEFERRED_ADDRESS(&PyType##INHERITED_TYPE),0) \ + "Hurricane." #SELF_TYPE /* tp_name. */ \ , sizeof(Py##SELF_TYPE) /* tp_basicsize. */ \ , 0 /* tp_itemsize. */ \ /* methods. */ \ @@ -1520,9 +1542,8 @@ extern "C" { #define PyTypeCollectionObjectDefinitions(SELF_TYPE) \ PyTypeObject PyType##SELF_TYPE = \ - { PyObject_HEAD_INIT(NULL) \ - 0 /* ob_size. */ \ - , "Hurricane."#SELF_TYPE /* tp_name. */ \ + { PyVarObject_HEAD_INIT(NULL,0) \ + "Hurricane."#SELF_TYPE /* tp_name. */ \ , sizeof(Py ##SELF_TYPE) /* tp_basicsize. */ \ , 0 /* tp_itemsize. */ \ /* methods. */ \ @@ -1548,9 +1569,8 @@ extern "C" { #define PyTypeVectorObjectDefinitions(SELF_TYPE) \ PyTypeObject PyType##SELF_TYPE = \ - { PyObject_HEAD_INIT(NULL) \ - 0 /* ob_size. */ \ - , "Hurricane."#SELF_TYPE /* tp_name. */ \ + { PyVarObject_HEAD_INIT(NULL,0) \ + "Hurricane."#SELF_TYPE /* tp_name. */ \ , sizeof(Py ##SELF_TYPE) /* tp_basicsize. */ \ , 0 /* tp_itemsize. */ \ /* methods. */ \ @@ -1581,7 +1601,7 @@ extern "C" { if ( PyType_Ready( &PyType##TYPE ) < 0 ) { \ cerr << "[ERROR]\n" \ << " Failed to initialize ." << endl; \ - return; \ + return NULL; \ } @@ -1590,7 +1610,7 @@ extern "C" { if ( PyType_Ready( &PyType##TYPE ) < 0 ) { \ cerr << "[ERROR]\n" \ << " Failed to initialize ." << endl; \ - return; \ + return NULL; \ } @@ -1605,26 +1625,31 @@ extern "C" { catch ( const Warning& w ) { \ std::string message = getString(w); \ PyErr_Warn ( HurricaneWarning, const_cast(message.c_str()) ); \ + std::cerr << message << std::endl; \ } \ catch ( const Error& e ) { \ std::string message = getString(e); \ if (not e.where().empty()) message += "\n" + e.where(); \ PyErr_SetString ( HurricaneError, message.c_str() ); \ + std::cerr << message << std::endl; \ return NULL; \ } \ catch ( const Bug& e ) { \ std::string message = getString(e); \ PyErr_SetString ( HurricaneError, message.c_str() ); \ + std::cerr << message << std::endl; \ return NULL; \ } \ catch ( const Exception& e ) { \ std::string message = "Unknown Hurricane::Exception"; \ PyErr_SetString ( HurricaneError, message.c_str() ); \ + std::cerr << message << std::endl; \ return NULL; \ } \ catch ( const std::exception& e ) { \ std::string message = std::string(e.what()); \ PyErr_SetString ( HurricaneError, message.c_str() ); \ + std::cerr << message << std::endl; \ return NULL; \ } \ catch ( ... ) { \ @@ -1632,6 +1657,7 @@ extern "C" { "Unmanaged exception, neither a Hurricane::Error nor" \ " a std::exception."; \ PyErr_SetString ( HurricaneError, message.c_str() ); \ + std::cerr << message << std::endl; \ return NULL; \ } \ diff --git a/hurricane/src/utilities/CMakeLists.txt b/hurricane/src/utilities/CMakeLists.txt new file mode 100644 index 00000000..aeafc835 --- /dev/null +++ b/hurricane/src/utilities/CMakeLists.txt @@ -0,0 +1,19 @@ + + + include_directories ( ${HURRICANE_SOURCE_DIR}/src/utilities + ) + + set ( includes hurricane/utilities/Path.h + hurricane/utilities/Dots.h + ) + set ( cpps Path.cpp + Dots.cpp + ) + + add_library ( utils ${cpps} ) + set_target_properties ( utils PROPERTIES VERSION 1.0 SOVERSION 1 ) + + install ( TARGETS utils DESTINATION lib${LIB_SUFFIX} ) + install ( FILES ${includes} + DESTINATION include/coriolis2/hurricane/utilities ) + diff --git a/hurricane/src/utilities/Dots.cpp b/hurricane/src/utilities/Dots.cpp new file mode 100644 index 00000000..3c498c36 --- /dev/null +++ b/hurricane/src/utilities/Dots.cpp @@ -0,0 +1,54 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Uiversité 2013-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | V L S I B a c k e n d D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Module : "./Dots.cpp" | +// +-----------------------------------------------------------------+ + + +#include "hurricane/utilities/Dots.h" + + +namespace Utilities { + + + void Dots::dot () + { + ++_count; + if (_count % _divider == 0) { + unsigned int position = _count / _divider; + if (position == 1) { + if (not (_flags & FirstDot)) + CR(); + else + _flags &= ~FirstDot; + if (enabled()) + _ostream << _indent; + } + + _flush( '.' ); + + if (position + _indent.size() >= _width) { + reset( NoFlags ); + } + } + } + + + void Dots::finish ( unsigned int flags ) + { + CR(); + + if (flags & Reset) reset( flags ); + } + + +} // Utilities namespace. diff --git a/hurricane/src/utilities/Path.cpp b/hurricane/src/utilities/Path.cpp new file mode 100644 index 00000000..1c701a5b --- /dev/null +++ b/hurricane/src/utilities/Path.cpp @@ -0,0 +1,318 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Uiversité 2013-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | V L S I B a c k e n d D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Module : "./Path.cpp" | +// +-----------------------------------------------------------------+ + + +#include +#include +#include +#include +#include +#include +#include +#include "hurricane/utilities/Path.h" + + +namespace Utilities { + + using namespace std; + + + int Path::_toUnistd ( unsigned int mode ) + { + int unimode = 0; + if (mode & PermRead ) unimode |= R_OK; + if (mode & PermWrite ) unimode |= W_OK; + if (mode & PermExecute) unimode |= X_OK; + return unimode; + } + + + int Path::_toMode_T ( unsigned int mode ) + { + int unimode = 0; + if (mode & s_isuid ) unimode |= S_ISUID; + if (mode & s_isgid ) unimode |= S_ISGID; + if (mode & s_isvtx ) unimode |= S_ISVTX; + if (mode & s_irusr ) unimode |= S_IRUSR; + if (mode & s_iwusr ) unimode |= S_IWUSR; + if (mode & s_ixusr ) unimode |= S_IXUSR; + if (mode & s_irgrp ) unimode |= S_IRGRP; + if (mode & s_iwgrp ) unimode |= S_IWGRP; + if (mode & s_ixgrp ) unimode |= S_IXGRP; + if (mode & s_iroth ) unimode |= S_IROTH; + if (mode & s_iwoth ) unimode |= S_IWOTH; + if (mode & s_ixoth ) unimode |= S_IXOTH; + return unimode; + } + + + void Path::_split ( const string& path, vector& elements, unsigned int& flags ) + { + if (path.empty()) return; + + size_t begin = 0; + if (path[0] == '/') { + flags |= Absolute; + begin = 1; + } + + size_t end = path.find_first_of( '/', begin ); + while ( end != string::npos ) { + elements.push_back(path.substr(begin,end-begin)); + begin = end+1; + end = path.find_first_of( '/', begin ); + } + elements.push_back(path.substr(begin)); + } + + + void Path::_normalize () + { + if ( (size() == 1) and (_elements[0] == ".") ) return; + + _flags |= Invalidated; + + if (not _elements.empty() and (_elements[0] == "~")) { + char* home = getenv( "HOME" ); + if (home) { + vector vhome; + unsigned int vflags = 0; + _split( home, vhome, vflags ); + _flags |= vflags; + _elements.insert( _elements.begin(), vhome.begin(), vhome.end() ); + } + } + + vector::iterator ie = _elements.begin(); + while ( ie != _elements.end() ) { + if ( ((*ie) == ".") or (*ie).empty()) { + _elements.erase(ie); + } else { + ++ie; + } + } + + ie = _elements.begin(); + while ( ie != _elements.end() ) { + if ( ((*ie) == "..") and (ie != _elements.begin()) ) { + --ie; + _elements.erase(ie,ie+2); + } else { + ++ie; + } + } + + if (not _elements.empty() and (_elements.back().find_last_of('.') != string::npos)) + _flags |= Extension; + + // cout << "_normalize(" << path << ")" << endl; + // cout << " Absolute: " << boolalpha << (bool)(_flags & Absolute) << endl; + // for ( size_t i=0 ; i<_elements.size() ; ++i ) { + // cout << " " << i << ": <" << _elements[i] << '>' << endl; + // } + } + + + void Path::_normalize ( const string& path ) + { + _split( path, _elements, _flags ); + _normalize(); + } + + + string Path::ext () const + { + if (not (_flags&Extension)) return ""; + return _elements.back().substr(_elements.back().find_last_of('.')+1); + } + + + bool Path::mkdir ( unsigned int mode ) const + { + int status = ::mkdir( c_str(), _toMode_T(mode) ); + return (status == 0); + } + + + vector Path::listdir () const + { + vector entries; + + if (isdir()) { + DIR* fdir = NULL; + struct dirent* fentry = NULL; + fdir = opendir( toString().c_str() ); + if (fdir) { + while ( (fentry = readdir(fdir)) != NULL ) { + string name = fentry->d_name; + if ( (name == ".") or (name == "..") ) continue; + + entries.push_back( join(name) ); + } + } + } + return entries; + } + + + const string& Path::toString () const + { + if (_flags & Invalidated) { + _pathcache.clear(); + + for ( size_t i=0 ; i size()) or (begin > end)) return Path(); + if (end > size()) end = size()-1; + + Path sub; + for ( size_t i=begin; i().swap( _elements ); + _elements = other._elements; + _flags = other._flags; + _pathcache = other._pathcache; + return *this; + } + + + Path Path::cwd () + { + static char curdir [4096]; + if (::getcwd( curdir, 4096 ) == NULL) { + strcpy( curdir, "/cwd/has/failed"); + } + + return Path(curdir); + } + + +} // Utilities namespace. diff --git a/hurricane/src/utilities/hurricane/utilities/Dots.h b/hurricane/src/utilities/hurricane/utilities/Dots.h new file mode 100644 index 00000000..b56203b2 --- /dev/null +++ b/hurricane/src/utilities/hurricane/utilities/Dots.h @@ -0,0 +1,89 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Uiversité 2013-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | V L S I B a c k e n d D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/utilities/Dots.h" | +// +-----------------------------------------------------------------+ + + +#pragma once +#include +#include + + +namespace Utilities { + + + class Dots { + public: + enum Flag { NoFlags=0x00, FirstDot=0x01, Reset=0x02, Disabled=0x04 }; + public: + inline Dots ( std::ostream& + , const std::string& indent + , unsigned int width =70 + , unsigned int divider= 1 ); + inline void setWidth ( unsigned int ); + inline void setDivider ( unsigned int ); + inline void reset ( unsigned int flags ); + inline void CR (); + void dot (); + void finish ( unsigned int flags ); + inline bool enabled (); + inline void enable (); + inline void disable (); + private: + inline void _flush ( char ); + private: + std::ostream& _ostream; + std::string _indent; + unsigned int _width; + unsigned int _divider; + unsigned int _count; + unsigned int _flags; + }; + + + inline Dots::Dots ( std::ostream& o, const std::string& indent, unsigned int width, unsigned int divider ) + : _ostream(o) + , _indent (indent) + , _width (width) + , _divider(divider) + , _count (0) + , _flags (FirstDot) + { } + + inline void Dots::setWidth ( unsigned int w ) { _width=w; } + inline void Dots::setDivider ( unsigned int d ) { _divider=d; } + inline bool Dots::enabled () { return not (_flags & Disabled); } + inline void Dots::enable () { _flags &= ~Disabled; } + inline void Dots::disable () { _flags |= Disabled; } + + inline void Dots::_flush ( char c ) + { + if (not enabled()) return; + + _ostream << c; + _ostream.flush(); + } + + inline void Dots::CR () + { + _flush('\n'); + } + + inline void Dots::reset ( unsigned int flags ) + { + _flags = flags | ((not enabled()) ? Disabled : NoFlags); + _count = 0; + } + + +} // Utilities namespace. diff --git a/hurricane/src/utilities/hurricane/utilities/Path.h b/hurricane/src/utilities/hurricane/utilities/Path.h new file mode 100644 index 00000000..7ea8676b --- /dev/null +++ b/hurricane/src/utilities/hurricane/utilities/Path.h @@ -0,0 +1,204 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) Sorbonne Uiversité 2013-2021, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | V L S I B a c k e n d D a t a - B a s e | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./hurricane/utilities/Path.h" | +// +-----------------------------------------------------------------+ + + +#pragma once +#include +#include +#include +#include +#include + + +namespace Utilities { + + + class Path { + public: + enum Flag { NoFlag = 0x00000000 + , Absolute = 0x00000001 + , Extension = 0x00000002 + , PermRead = 0x00000004 + , PermWrite = 0x00000008 + , PermExecute = 0x00000010 + , PermAll = PermRead|PermWrite|PermExecute + , Invalidated = 0x00000020 + }; + enum Mode_T { s_ifmt = S_IFMT // 0x00170000 + , s_ifsock = S_IFSOCK // 0x00140000 + , s_iflnk = S_IFLNK // 0x00120000 + , s_ifreg = S_IFREG // 0x00100000 + , s_ifblk = S_IFBLK // 0x00060000 + , s_ifdir = S_IFDIR // 0x00040000 + , s_ifchr = S_IFCHR // 0x00020000 + , s_ififo = S_IFIFO // 0x00010000 + , s_isuid = S_ISUID // 0x00004000 + , s_isgid = S_ISGID // 0x00002000 + , s_isvtx = S_ISVTX // 0x00001000 + , s_irusr = S_IWUSR // 0x00000400 + , s_iwusr = S_IWUSR // 0x00000200 + , s_ixusr = S_IXUSR // 0x00000100 + , s_irwxu = s_irusr|s_iwusr|s_ixusr + , s_irgrp = S_IRGRP // 0x00000040 + , s_iwgrp = S_IWGRP // 0x00000020 + , s_ixgrp = S_IXGRP // 0x00000010 + , s_irwxg = s_irgrp|s_iwgrp|s_ixgrp + , s_iroth = S_IROTH // 0x00000004 + , s_iwoth = S_IWOTH // 0x00000002 + , s_ixoth = S_IXOTH // 0x00000001 + , s_irwxo = s_iroth|s_iwoth|s_ixoth + }; + public: + class Stat { + public: + inline Stat (); + inline Stat ( const Stat& ); + inline dev_t dev () const; + inline ino_t ino () const; + inline mode_t mode () const; + inline nlink_t nlink () const; + inline uid_t uid () const; + inline gid_t gid () const; + inline dev_t rdev () const; + inline off_t size () const; + inline blksize_t blksize() const; + inline blkcnt_t blocks () const; + inline time_t atime () const; + inline time_t mtime () const; + inline time_t ctime () const; + inline struct stat* c_stat (); + private: + struct stat _stat; + }; + public: + static Path cwd (); + public: + inline Path ( const std::string& path="" ); + inline Path ( const char* ); + inline Path ( const Path& ); + inline bool absolute () const; + inline bool extension () const; + bool exists () const; + bool access ( unsigned int mode ) const; + unsigned int mode () const; + Stat stat () const; + inline bool isfile () const; + inline bool isdir () const; + inline bool islink () const; + inline bool empty () const; + inline size_t size () const; + inline Path head () const; + inline Path tail () const; + Path basename ( const std::string& ext="" ) const; + Path dirname () const; + Path stem () const; + Path subpath ( size_t begin, size_t end ) const; + Path join ( const Path& tail ) const; + std::string ext () const; + bool mkdir ( unsigned int mode=s_irwxu|s_irwxg|s_irwxo ) const; + std::vector listdir () const; + const std::string& toString () const; + inline const char* c_str () const; + Path& operator= ( const Path& ); + Path& operator/= ( const Path& ); + inline Path& operator/= ( const char* ); + inline Path& operator/= ( const std::string& ); + private: + static int _toUnistd ( unsigned int mode ); + static int _toMode_T ( unsigned int mode ); + static void _split ( const std::string&, std::vector&, unsigned int& ); + void _normalize (); + void _normalize ( const std::string& ); + private: + mutable unsigned int _flags; + std::vector _elements; + mutable std::string _pathcache; + }; + + + inline Path::Stat::Stat () + { + _stat.st_dev = 0; + _stat.st_ino = 0; + _stat.st_mode = 0; + _stat.st_nlink = 0; + _stat.st_uid = 0; + _stat.st_gid = 0; + _stat.st_rdev = 0; + _stat.st_size = 0; + _stat.st_blksize = 0; + _stat.st_blocks = 0; + _stat.st_atime = 0; + _stat.st_mtime = 0; + _stat.st_ctime = 0; + } + + inline Path::Stat::Stat ( const Stat& other ) + { + _stat.st_dev = other._stat.st_dev; + _stat.st_ino = other._stat.st_ino; + _stat.st_mode = other._stat.st_mode; + _stat.st_nlink = other._stat.st_nlink; + _stat.st_uid = other._stat.st_uid; + _stat.st_gid = other._stat.st_gid; + _stat.st_rdev = other._stat.st_rdev; + _stat.st_size = other._stat.st_size; + _stat.st_blksize = other._stat.st_blksize; + _stat.st_blocks = other._stat.st_blocks; + _stat.st_atime = other._stat.st_atime; + _stat.st_mtime = other._stat.st_mtime; + _stat.st_ctime = other._stat.st_ctime; + } + + inline dev_t Path::Stat::dev () const { return _stat.st_dev; } + inline ino_t Path::Stat::ino () const { return _stat.st_ino; } + inline mode_t Path::Stat::mode () const { return _stat.st_mode; } + inline nlink_t Path::Stat::nlink () const { return _stat.st_nlink; } + inline uid_t Path::Stat::uid () const { return _stat.st_uid; } + inline gid_t Path::Stat::gid () const { return _stat.st_gid; } + inline dev_t Path::Stat::rdev () const { return _stat.st_rdev; } + inline off_t Path::Stat::size () const { return _stat.st_size; } + inline blksize_t Path::Stat::blksize() const { return _stat.st_blksize; } + inline blkcnt_t Path::Stat::blocks () const { return _stat.st_blocks; } + inline time_t Path::Stat::atime () const { return _stat.st_atime; } + inline time_t Path::Stat::mtime () const { return _stat.st_mtime; } + inline time_t Path::Stat::ctime () const { return _stat.st_ctime; } + inline struct stat* Path::Stat::c_stat () { return &_stat; } + + + inline Path::Path ( const char* path ) : _flags(Invalidated), _elements(), _pathcache() { _normalize(path); } + inline Path::Path ( const std::string& path ) : _flags(Invalidated), _elements(), _pathcache() { _normalize(path); } + inline Path::Path ( const Path& path ) : _flags(path._flags), _elements(path._elements), _pathcache(path._pathcache) {} + + inline bool Path::isfile () const { return mode() & s_ifmt; } + inline bool Path::isdir () const { return mode() & s_ifdir; } + inline bool Path::islink () const { return mode() & s_iflnk; } + inline bool Path::absolute () const { return _flags&Absolute; } + inline bool Path::extension () const { return _flags&Extension; } + inline bool Path::empty () const { return _elements.empty(); } + inline size_t Path::size () const { return _elements.size(); } + inline Path Path::head () const { return (size() > 1) ? subpath(0,size()-1) : *this; } + inline Path Path::tail () const { return (size() > 1) ? subpath(1,size()) : *this; } + inline const char* Path::c_str () const { return Path::toString().c_str(); } + inline Path& Path::operator/= ( const std::string& tail ) { (*this) /= Path(tail); return *this; } + inline Path& Path::operator/= ( const char* tail ) { (*this) /= Path(tail); return *this; } + + inline Path operator/ ( const Path& rop, const Path& lop ) { return rop.join(lop); } + inline Path operator/ ( const std::string& rop, const Path& lop ) { return Path(rop) / lop; } + inline Path operator/ ( const Path& rop, const char* lop ) { return rop / Path(lop); } + inline Path operator/ ( const Path& rop, const std::string& lop ) { return rop / Path(lop); } + + +} // Utilities namespace. diff --git a/hurricane/src/viewer/CMakeLists.txt b/hurricane/src/viewer/CMakeLists.txt index 79b996d6..9fc3030c 100644 --- a/hurricane/src/viewer/CMakeLists.txt +++ b/hurricane/src/viewer/CMakeLists.txt @@ -2,13 +2,15 @@ # include ( ${QT_USE_FILE} ) - include_directories ( ${HURRICANE_SOURCE_DIR}/src/hurricane + include_directories ( ${HURRICANE_SOURCE_DIR}/src/utilities + ${HURRICANE_SOURCE_DIR}/src/configuration + ${HURRICANE_SOURCE_DIR}/src/hurricane ${HURRICANE_SOURCE_DIR}/src/isobar ${HURRICANE_SOURCE_DIR}/src/viewer - ${CONFIGURATION_INCLUDE_DIR} ${QtX_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} - ${PYTHON_INCLUDE_PATH} + ${Python_INCLUDE_DIRS} + ${CMAKE_INSTALL_PREFIX}/include ) set( mocIncludes hurricane/viewer/HApplication.h @@ -135,10 +137,10 @@ set( depLibs hurricane isobar + utils + configuration ${UTILITIES_LIBRARY} - ${CONFIGURATION_LIBRARY} ${LIBXML2_LIBRARIES} - ${Boost_LIBRARIES} ${QtX_LIBRARIES} ) diff --git a/hurricane/src/viewer/CellImage.cpp b/hurricane/src/viewer/CellImage.cpp index cd342014..628718e2 100644 --- a/hurricane/src/viewer/CellImage.cpp +++ b/hurricane/src/viewer/CellImage.cpp @@ -2,14 +2,14 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2012-2012, All Rights Reserved +// Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | H U R R I C A N E | // | V L S I B a c k e n d D a t a - B a s e | // | | // | Author : Jean-Paul CHAPUT | -// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +// | E-mail : Jean-Paul.Chaput@lip6.fr | // | =============================================================== | // | C++ Module : "./CellImage.cpp" | // +-----------------------------------------------------------------+ @@ -21,7 +21,7 @@ #include #include #include -#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/DataBase.h" #include "hurricane/Cell.h" #include "hurricane/viewer/Graphics.h" diff --git a/hurricane/src/viewer/CellPrinter.cpp b/hurricane/src/viewer/CellPrinter.cpp index e93bea1e..31ebe9e7 100644 --- a/hurricane/src/viewer/CellPrinter.cpp +++ b/hurricane/src/viewer/CellPrinter.cpp @@ -1,7 +1,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC 2012-2018, All Rights Reserved +// Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | H U R R I C A N E | @@ -20,7 +20,7 @@ #include #include #include -#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/DataBase.h" #include "hurricane/BasicLayer.h" #include "hurricane/Technology.h" diff --git a/hurricane/src/viewer/CellViewer.cpp b/hurricane/src/viewer/CellViewer.cpp index 309a9ee3..750bcc24 100644 --- a/hurricane/src/viewer/CellViewer.cpp +++ b/hurricane/src/viewer/CellViewer.cpp @@ -1,7 +1,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC 2008-2018, All Rights Reserved +// Copyright (c) Sorbonne Université 2008-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | H U R R I C A N E | @@ -30,8 +30,8 @@ #include #include -#include "vlsisapd/utilities/Path.h" -#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/utilities/Path.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/DebugSession.h" #include "hurricane/DataBase.h" #include "hurricane/Library.h" diff --git a/hurricane/src/viewer/CellWidget.cpp b/hurricane/src/viewer/CellWidget.cpp index 2a09127d..1c480ae8 100644 --- a/hurricane/src/viewer/CellWidget.cpp +++ b/hurricane/src/viewer/CellWidget.cpp @@ -27,7 +27,7 @@ #include #include -#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/SharedName.h" #include "hurricane/DataBase.h" #include "hurricane/Technology.h" @@ -1615,7 +1615,7 @@ namespace Hurricane { { PaletteItem* item = (_palette) ? _palette->find(name) : NULL; //DbU::Unit unity = symbolicMode() ? DbU::lambda(1.0) : DbU::grid(10.0); - DbU::Unit unity = DbU::lambda(1.0); + //DbU::Unit unity = DbU::lambda(1.0); if (not item) return false; return item->isItemVisible(); //and (Graphics::getThreshold(name) < getScale()*unity); @@ -1634,7 +1634,7 @@ namespace Hurricane { bool CellWidget::isDrawableExtension ( const Name& extensionName ) { PaletteItem* item = (_palette) ? _palette->find(extensionName) : NULL; - DbU::Unit unity = DbU::lambda(1.0); + //DbU::Unit unity = DbU::lambda(1.0); if (not item) return false; return item->isItemVisible(); // and (Graphics::getThreshold(extensionName) < getScale()*unity); @@ -1846,7 +1846,7 @@ namespace Hurricane { _drawingPlanes.setBrush( Graphics::getBrush(("grid"), getDarkening() )); Box redrawBox = screenToDbuBox( redrawArea ).inflate( DbU::lambda(1.0) ); - bool detailedGrid = _underDetailedGridThreshold(); + //bool detailedGrid = _underDetailedGridThreshold(); DbU::Unit gridStep = ((symbolicMode()) ? 1 : 10) * _snapGridStep(); DbU::Unit superGridStep = gridStep*10; diff --git a/hurricane/src/viewer/ControllerWidget.cpp b/hurricane/src/viewer/ControllerWidget.cpp index a9e4c002..729045d9 100644 --- a/hurricane/src/viewer/ControllerWidget.cpp +++ b/hurricane/src/viewer/ControllerWidget.cpp @@ -1,7 +1,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC 2008-2018, All Rights Reserved +// Copyright (c) Sorbonne Université 2008-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -20,8 +20,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/hurricane/src/viewer/JsonConfiguration.cpp b/hurricane/src/viewer/JsonConfiguration.cpp index db1bddf0..38387425 100644 --- a/hurricane/src/viewer/JsonConfiguration.cpp +++ b/hurricane/src/viewer/JsonConfiguration.cpp @@ -1,7 +1,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC 2016-2018, All Rights Reserved +// Copyright (c) Sorbonne Université 2016-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -14,7 +14,7 @@ // +-----------------------------------------------------------------+ -#include "vlsisapd/configuration/LayoutDescription.h" +#include "hurricane/configuration/LayoutDescription.h" #include "hurricane/Error.h" #include "hurricane/viewer/JsonConfiguration.h" diff --git a/hurricane/src/viewer/PyDrawingStyle.cpp b/hurricane/src/viewer/PyDrawingStyle.cpp index 5e06d587..f0f4e908 100644 --- a/hurricane/src/viewer/PyDrawingStyle.cpp +++ b/hurricane/src/viewer/PyDrawingStyle.cpp @@ -67,7 +67,7 @@ extern "C" { pattern = ds->getPattern().c_str(); HCATCH - return PyString_FromString(pattern); + return PyUnicode_FromString(pattern); } diff --git a/hurricane/src/viewer/PyHApplication.cpp b/hurricane/src/viewer/PyHApplication.cpp index 18f4c09f..e537881b 100644 --- a/hurricane/src/viewer/PyHApplication.cpp +++ b/hurricane/src/viewer/PyHApplication.cpp @@ -83,12 +83,9 @@ extern "C" { return NULL; } char* strCopy = NULL; - char* strData = NULL; - Py_ssize_t strSize = 0; - - PyString_AsStringAndSize(pyStr, &strData, &strSize); - strCopy = new char[(size_t)strSize+1]; - strncpy(strCopy, strData, (size_t)strSize+1); + string strData = PyString_AsString( pyStr ); + strCopy = new char[ strData.size()+1 ]; + strncpy( strCopy, strData.c_str(), strData.size()+1 ); vargv.push_back(strCopy); } diff --git a/hurricane/src/viewer/PyHSVr.cpp b/hurricane/src/viewer/PyHSVr.cpp index 070636a4..8e233e6d 100644 --- a/hurricane/src/viewer/PyHSVr.cpp +++ b/hurricane/src/viewer/PyHSVr.cpp @@ -82,14 +82,14 @@ extern "C" { HSVr* hsvr = self->_object; if ( hsvr == NULL ) - return PyString_FromString(""); + return PyUnicode_FromString(""); ostringstream s; s << "getHue() << " " << hsvr->getSaturation() << " " << hsvr->getValue() << ">"; - return PyString_FromString(s.str().c_str()); + return PyUnicode_FromString(s.str().c_str()); } diff --git a/hurricane/src/viewer/PyViewer.cpp b/hurricane/src/viewer/PyViewer.cpp index 9829d6f2..53b09889 100644 --- a/hurricane/src/viewer/PyViewer.cpp +++ b/hurricane/src/viewer/PyViewer.cpp @@ -59,10 +59,25 @@ extern "C" { }; + static PyModuleDef PyViewer_ModuleDef = + { PyModuleDef_HEAD_INIT + , "Viewer" /* m_name */ + , "Coriolis Graphical Interface." + /* m_doc */ + , -1 /* m_size */ + , PyViewer_Methods /* m_methods */ + , NULL /* m_reload */ + , NULL /* m_traverse */ + , NULL /* m_clear */ + , NULL /* m_free */ + }; + + // --------------------------------------------------------------- // Module Initialization : "initViewer ()" - DL_EXPORT(void) initViewer () { + PyMODINIT_FUNC PyInit_Viewer ( void ) + { cdebug_log(20,0) << "initViewer()" << endl; PyHSVr_LinkPyType (); @@ -96,11 +111,11 @@ extern "C" { __cs.addType ( "graphics" , &PyTypeGraphics , "" , false ); __cs.addType ( "cellView" , &PyTypeCellViewer , "" , false ); - PyObject* module = Py_InitModule ( "Viewer", PyViewer_Methods ); + PyObject* module = PyModule_Create( &PyViewer_ModuleDef ); if ( module == NULL ) { cerr << "[ERROR]\n" << " Failed to initialize Viewer module." << endl; - return; + return NULL; } Py_INCREF ( &PyTypeDisplayStyle ); @@ -116,6 +131,8 @@ extern "C" { PyCellViewer_postModuleInit(); cdebug_log(20,0) << "Viewer.so loaded " << (void*)&typeid(string) << endl; + + return module; } diff --git a/hurricane/src/viewer/Script.cpp b/hurricane/src/viewer/Script.cpp index c0c8b487..db1903cc 100644 --- a/hurricane/src/viewer/Script.cpp +++ b/hurricane/src/viewer/Script.cpp @@ -195,7 +195,7 @@ namespace Isobar { vector::iterator ipath = _pathes.begin(); for ( ; ipath != _pathes.end() ; ++ipath ) { - PyObject* element = PyString_FromString( const_cast((*ipath).c_str()) ); + PyObject* element = PyUnicode_FromString( const_cast((*ipath).c_str()) ); PyList_Insert( path, 0, element ); } @@ -302,7 +302,7 @@ namespace Isobar { { if (_pyKw == NULL) _pyKw = PyDict_New(); - PyObject* pyKey = PyString_FromString( key ); + PyObject* pyKey = PyUnicode_FromString( key ); if (PyDict_Contains(_pyKw,pyKey) == 1) { cerr << Error( "Script::addKwArgument(): Attempt to add twice key %s (nothing done)." , key ) << endl; diff --git a/hurricane/src/viewer/SelectCommand.cpp b/hurricane/src/viewer/SelectCommand.cpp index b2dd2797..c1fd1c5c 100644 --- a/hurricane/src/viewer/SelectCommand.cpp +++ b/hurricane/src/viewer/SelectCommand.cpp @@ -18,9 +18,6 @@ #include #include #include - -//#include - #include "hurricane/Path.h" #include "hurricane/Entity.h" #include "hurricane/Net.h" @@ -132,9 +129,6 @@ namespace Hurricane { { cdebug_log(18,0) << "Occurrences_GetNets::Locator::progress()" << endl; - //boost::regex pattern ( "onymous" ); - //boost::smatch match; - for ( ; _primaryLoc->isValid() ; _primaryLoc->progress() ) { Occurrence element = _primaryLoc->getElement(); @@ -144,9 +138,6 @@ namespace Hurricane { Net* net = component->getNet(); Occurrence netOccurrence ( net, element.getPath() ); - //if ( _hideAnonymous - // and boost::regex_search(getString(net->getName()),match,pattern,boost::match_extra) ) - // continue; if ( _hideAnonymous and QString(getString(net->getName()).c_str()).contains("onymous") ) continue; diff --git a/hurricane/src/viewer/StratusScript.cpp b/hurricane/src/viewer/StratusScript.cpp index 8f7aec6b..42dd3285 100644 --- a/hurricane/src/viewer/StratusScript.cpp +++ b/hurricane/src/viewer/StratusScript.cpp @@ -1,27 +1,26 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC 2008-2013, All Rights Reserved +// Copyright (c) Sorbonne Université 2008-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | // | V L S I B a c k e n d D a t a - B a s e | // | | // | Author : Jean-Paul CHAPUT | -// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +// | E-mail : Jean-Paul.Chaput@lip6.fr | // | =============================================================== | // | C++ Module : "./StratusScript.cpp" | // +-----------------------------------------------------------------+ -#include -#include +#include +#include using namespace std; -#include "vlsisapd/utilities/Path.h" -#include "hurricane/Warning.h" -#include "hurricane/viewer/StratusScript.h" +#include "hurricane/utilities/Path.h" +#include "hurricane/Warning.h" +#include "hurricane/viewer/StratusScript.h" namespace Hurricane { diff --git a/hurricane/src/viewer/StratusWidget.cpp b/hurricane/src/viewer/StratusWidget.cpp index f95ea55d..7de1b513 100644 --- a/hurricane/src/viewer/StratusWidget.cpp +++ b/hurricane/src/viewer/StratusWidget.cpp @@ -2,7 +2,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC 2008-2013, All Rights Reserved +// Copyright (c) Sorbonne Université 2008-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -28,7 +28,7 @@ using namespace std; #include #include #include -#include "vlsisapd/utilities/Path.h" +#include "hurricane/utilities/Path.h" #include "hurricane/Warning.h" #include "hurricane/viewer/Script.h" #include "hurricane/viewer/Graphics.h" diff --git a/hurricane/src/viewer/hurricane/viewer/JsonConfiguration.h b/hurricane/src/viewer/hurricane/viewer/JsonConfiguration.h index c3f41b09..55af078f 100644 --- a/hurricane/src/viewer/hurricane/viewer/JsonConfiguration.h +++ b/hurricane/src/viewer/hurricane/viewer/JsonConfiguration.h @@ -1,7 +1,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC 2016-2018, All Rights Reserved +// Copyright (c) Sorbonne Université 2016-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -14,11 +14,9 @@ // +-----------------------------------------------------------------+ -#ifndef HURRICANE_JSON_CONFIGURATION_H -#define HURRICANE_JSON_CONFIGURATION_H - -#include "vlsisapd/configuration/Parameter.h" -#include "vlsisapd/configuration/Configuration.h" +#pragma once +#include "hurricane/configuration/Parameter.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/Commons.h" @@ -126,5 +124,3 @@ namespace Hurricane { } // Hurricane namespace. - -#endif // HURRICANE_JSON_CONFIGURATION_H diff --git a/hurricane/src/viewer/hurricane/viewer/JsonParameter.h b/hurricane/src/viewer/hurricane/viewer/JsonParameter.h index 1b4dd06d..ebcbeac0 100644 --- a/hurricane/src/viewer/hurricane/viewer/JsonParameter.h +++ b/hurricane/src/viewer/hurricane/viewer/JsonParameter.h @@ -1,7 +1,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC 2016-2018, All Rights Reserved +// Copyright (c) Sorbonne Université 2016-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -14,11 +14,9 @@ // +-----------------------------------------------------------------+ -#ifndef HURRICANE_JSON_PARAMETER_H -#define HURRICANE_JSON_PARAMETER_H - -#include "vlsisapd/configuration/Parameter.h" -#include "vlsisapd/configuration/Configuration.h" +#pragma once +#include "hurricane/configuration/Parameter.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/Commons.h" @@ -62,5 +60,3 @@ namespace Hurricane { } // Hurricane namespace. - -#endif // HURRICANE_JSON_PARAMETER_H diff --git a/hurricane/src/viewer/hurricane/viewer/Script.h b/hurricane/src/viewer/hurricane/viewer/Script.h index 63ff5480..da8413c0 100644 --- a/hurricane/src/viewer/hurricane/viewer/Script.h +++ b/hurricane/src/viewer/hurricane/viewer/Script.h @@ -48,7 +48,7 @@ namespace Isobar { static Script* create ( const std::string& name="" ); void destroy (); inline std::string getUserModuleName () const; - inline const char* getFileName () const; + inline std::string getFileName () const; inline PyObject* getSysModule (); inline PyObject* getHurricaneModule (); inline PyObject* getUserModule (); @@ -93,8 +93,14 @@ namespace Isobar { inline PyObject* Script::getHurricaneModule () { return _hurricaneModule; } inline PyObject* Script::getUserModule () { return _userModule; } - inline const char* Script::getFileName () const - { return (_userModule) ? PyModule_GetFilename(_userModule) : getUserModuleName().c_str(); } + inline std::string Script::getFileName () const + { + if (not _userModule) return getUserModuleName(); + PyObject* pyBytes = PyUnicode_AsASCIIString( PyModule_GetFilenameObject(_userModule) ); + std::string fileName = PyBytes_AsString( pyBytes ); + Py_DECREF( pyBytes ); + return fileName; + } inline PyObject* Script::_importHurricane ( unsigned int flags ) { return _hurricaneModule = _importModule("Hurricane",flags); } diff --git a/ispd/CMakeLists.txt b/ispd/CMakeLists.txt index b4d8b602..508ca426 100644 --- a/ispd/CMakeLists.txt +++ b/ispd/CMakeLists.txt @@ -5,20 +5,21 @@ cmake_minimum_required(VERSION 2.4.0) + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) + list(INSERT CMAKE_MODULE_PATH 0 "$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) setup_project_paths(CORIOLIS) set_cmake_policies() #setup_apple() - setup_boost(program_options filesystem python regex) + setup_boost(program_options) find_package(LibXml2 REQUIRED) set(QT_USE_QTXML "true") find_package(Qt4 REQUIRED) - find_package(PythonLibs 2 REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) - find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) find_package(KNIK REQUIRED) diff --git a/karakaze/CMakeLists.txt b/karakaze/CMakeLists.txt index 2652ca00..e9ecd1c2 100644 --- a/karakaze/CMakeLists.txt +++ b/karakaze/CMakeLists.txt @@ -5,6 +5,7 @@ cmake_minimum_required(VERSION 2.8.9) set(ignoreVariables "${BUILD_DOC}" "${CMAKE_INSTALL_DIR}") + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) list(INSERT CMAKE_MODULE_PATH 0 "$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) @@ -14,7 +15,7 @@ check_distribution() setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") - find_package(PythonLibs 2 REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/karakaze/python/CMakeLists.txt b/karakaze/python/CMakeLists.txt index 4261991a..5a7d67e4 100644 --- a/karakaze/python/CMakeLists.txt +++ b/karakaze/python/CMakeLists.txt @@ -1,4 +1,4 @@ - install ( FILES ./__init__.py DESTINATION ${PYTHON_SITE_PACKAGES}/karakaze ) - install ( FILES ./oceane.py DESTINATION ${PYTHON_SITE_PACKAGES}/karakaze ) - install ( FILES ./analogdesign.py DESTINATION ${PYTHON_SITE_PACKAGES}/karakaze ) + install ( FILES ./__init__.py DESTINATION ${Python_CORIOLISLIB}/karakaze ) + install ( FILES ./oceane.py DESTINATION ${Python_CORIOLISLIB}/karakaze ) + install ( FILES ./analogdesign.py DESTINATION ${Python_CORIOLISLIB}/karakaze ) diff --git a/karakaze/python/analogdesign.py b/karakaze/python/analogdesign.py index 19669aef..6b295c1f 100644 --- a/karakaze/python/analogdesign.py +++ b/karakaze/python/analogdesign.py @@ -1,7 +1,7 @@ # -*- Mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2016-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2016-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -18,36 +18,19 @@ from Hurricane import * from Hurricane import DataBase import CRL import helpers -from helpers import isderived -from helpers import trace +from helpers import isderived, trace from helpers.io import ErrorMessage as Error -from Analog import Device -from Analog import TransistorFamily -from Analog import Transistor -from Analog import CommonDrain -from Analog import CommonGatePair -from Analog import CommonSourcePair -from Analog import CrossCoupledPair -from Analog import DifferentialPair -from Analog import LevelShifter -from Analog import SimpleCurrentMirror -from Analog import CapacitorFamily -from Analog import MultiCapacitor -from Analog import CapacitorFamily -from Analog import MultiCapacitor -from Analog import ResistorFamily -from Analog import Resistor -from Analog import LayoutGenerator -from Analog import Matrix -from Bora import ParameterRange -from Bora import StepParameterRange -from Bora import MatrixParameterRange -from Bora import SlicingNode -from Bora import HSlicingNode -from Bora import VSlicingNode -from Bora import DSlicingNode -from Bora import RHSlicingNode -from Bora import RVSlicingNode +from Analog import Device, TransistorFamily, Transistor, \ + CommonDrain, CommonGatePair, CommonSourcePair, \ + CrossCoupledPair, DifferentialPair, LevelShifter, \ + SimpleCurrentMirror, CapacitorFamily, \ + MultiCapacitor, CapacitorFamily, MultiCapacitor, \ + ResistorFamily, Resistor, LayoutGenerator, \ + Matrix +from Bora import ParameterRange, StepParameterRange, \ + MatrixParameterRange, SlicingNode, HSlicingNode, \ + VSlicingNode, DSlicingNode, RHSlicingNode, \ + RVSlicingNode import karakaze.oceane import Anabatic import Katana @@ -83,26 +66,23 @@ def toLength ( value ): return float(value) * 1e+6 def readMatrix ( rows ): if not isinstance(rows,list): - print '[ERROR] readMatrix(): First level is not a list.' - sys.exit( 1 ) - rowCount = len(rows) - - for row in range(len(rows)): - column = rows[row] - if not isinstance(column,list): - print '[ERROR] readMatrix(): Column %d is not a list.' % row + print( '[ERROR] readMatrix(): First level is not a list.' ) sys.exit( 1 ) - if row == 0: - columnCount = len(column) - matrix = Matrix( rowCount, columnCount ) - else: - if columnCount != len(column): - print '[ERROR] readMatrix(): Column %d size discrepency (sould be %d).' % (len(column),columnCount) - sys.exit( 1 ) - - for column in range(len(column)): - matrix.setValue( row, column, rows[row][column] ) - + rowCount = len(rows) + for row in range(len(rows)): + column = rows[row] + if not isinstance(column,list): + print( '[ERROR] readMatrix(): Column {} is not a list.'.format(row) ) + sys.exit( 1 ) + if row == 0: + columnCount = len(column) + matrix = Matrix( rowCount, columnCount ) + else: + if columnCount != len(column): + print( '[ERROR] readMatrix(): Column {} size discrepency (sould be {}).'.format(len(column),columnCount)) + sys.exit( 1 ) + for column in range(len(column)): + matrix.setValue( row, column, rows[row][column] ) return matrix @@ -126,12 +106,10 @@ class AnalogDesign ( object ): self.parameters = karakaze.oceane.Parameters() return - def setCellName ( self, name ): self.cellName = name return - def beginCell ( self, cellName ): self.setCellName( cellName ) UpdateSession.open() @@ -141,49 +119,46 @@ class AnalogDesign ( object ): self.generator = LayoutGenerator() return - def endCell ( self ): UpdateSession.close() return - def checkBeginCell ( self, function ): if not self.cell: - raise Error( 3, [ 'AnalogDesign: \"AnalogDevice.beginCell()\" must be called *before* \"%s\".' \ - % function - ] ) + raise Error( 3, [ 'AnalogDesign: \"AnalogDevice.beginCell()\" must be called *before* \"%s\".' \ + % function + ] ) return - def checkConnexion ( self, count, net, connexion ): if not isinstance(connexion,tuple): - raise Error( 3, [ 'AnalogDesign.doNets(): \"self.netSpecs\" in \"%s\", connexion [%d] is *not* a tuple.' \ - % (net.getName(),count) - , '%s' % str(connexion) ] ) + raise Error( 3, [ 'AnalogDesign.doNets(): \"self.netSpecs\" in \"%s\", connexion [%d] is *not* a tuple.' \ + % (net.getName(),count) + , '%s' % str(connexion) ] ) if len(connexion) != 2: - raise Error( 3, [ 'AnalogDesign.doNets(): \"self.devicesSpecs\" in \"%s\", connexion [%d] has %d items instead of 2 .' \ - % (net.getName(),count,len(connexion)) - , '%s' % str(connexion) ] ) + raise Error( 3, [ 'AnalogDesign.doNets(): \"self.devicesSpecs\" in \"%s\", connexion [%d] has %d items instead of 2 .' \ + % (net.getName(),count,len(connexion)) + , '%s' % str(connexion) ] ) if not isinstance(connexion[0],str): - raise Error( 3, [ 'AnalogDesign.doNets(): \"self.devicesSpecs\" in \"%s\", connexion [%d], field [0] (instance) is *not* a string.' \ - % (net.getName(),count) - , '%s' % str(connexion) ] ) + raise Error( 3, [ 'AnalogDesign.doNets(): \"self.devicesSpecs\" in \"%s\", connexion [%d], field [0] (instance) is *not* a string.' \ + % (net.getName(),count) + , '%s' % str(connexion) ] ) if not isinstance(connexion[1],str): - raise Error( 3, [ 'AnalogDesign.doNets(): \"self.devicesSpecs\" in \"%s\", connexion [%d], field [1] (terminal) is *not* a string.' \ - % (net.getName(),count) - , '%s' % str(connexion) ] ) + raise Error( 3, [ 'AnalogDesign.doNets(): \"self.devicesSpecs\" in \"%s\", connexion [%d], field [1] (terminal) is *not* a string.' \ + % (net.getName(),count) + , '%s' % str(connexion) ] ) return def checkRail( self, net, metal, npitch, cellName, instanceName ): #Net verification missing if not isinstance(metal,str): - raise Error( 3, [ 'AnalogDesign.checkRail(): \"metal\" is *not* a string.' ] ) + raise Error( 3, [ 'AnalogDesign.checkRail(): \"metal\" is *not* a string.' ] ) if not isinstance(npitch,int): - raise Error( 3, [ 'AnalogDesign.checkRail(): \"NPitch\" is *not* an int.' ] ) + raise Error( 3, [ 'AnalogDesign.checkRail(): \"NPitch\" is *not* an int.' ] ) if not isinstance(cellName,str): - raise Error( 3, [ 'AnalogDesign.checkRail(): \"cellName\" is *not* a string.' ] ) + raise Error( 3, [ 'AnalogDesign.checkRail(): \"cellName\" is *not* a string.' ] ) if not isinstance(instanceName,str): - raise Error( 3, [ 'AnalogDesign.checkRail(): \"instanceName\" is *not* a string.' ] ) + raise Error( 3, [ 'AnalogDesign.checkRail(): \"instanceName\" is *not* a string.' ] ) return def connect ( self, instanceName, masterNetName, net ): @@ -211,134 +186,125 @@ class AnalogDesign ( object ): device.getParameter('S.w').setValue(int(state.getWPitch())) return - def getNet ( self, netName, create=True ): net = None - if self.netCache.has_key(netName): - net = self.netCache[netName] + if netName in self.netCache: + net = self.netCache[netName] elif create: - net = Net.create( self.cell, netName ) - self.netCache[ netName ] = net + net = Net.create( self.cell, netName ) + self.netCache[ netName ] = net return net - def doNets ( self ): self.checkBeginCell( 'AnalogDesign.doNets()' ) if not hasattr(self,'netSpecs'): - raise Error( 3, 'AnalogDesign.doNets(): Mandatory attribute \"self.netSpecs\" has not been defined.' ) + raise Error( 3, 'AnalogDesign.doNets(): Mandatory attribute \"self.netSpecs\" has not been defined.' ) if not isinstance(self.netSpecs,dict): - raise Error( 3, 'AnalogDesign.doNets(): Attribute \"self.netSpecs\" *must* be a Python dict.' ) + raise Error( 3, 'AnalogDesign.doNets(): Attribute \"self.netSpecs\" *must* be a Python dict.' ) for netName, netType in self.netTypes.items(): - if not isinstance(netName,str): - raise Error( 3, 'AnalogDesign.doNets(): Dict key (net name) of \"self.netTypes\" *must* be a string (%s).' % str(netName) ) - - net = self.getNet( netName ) - isExternal = False - if netType.has_key('isExternal'): isExternal = netType['isExternal'] + if not isinstance(netName,str): + raise Error( 3, 'AnalogDesign.doNets(): Dict key (net name) of \"self.netTypes\" *must* be a string (%s).' % str(netName) ) + net = self.getNet( netName ) + isExternal = False + if 'isExternal' in netType: isExternal = netType['isExternal'] for netName, connexions in self.netSpecs.items(): - if not isinstance(netName,str): - raise Error( 3, 'AnalogDesign.doNets(): Dict key (net name) of \"self.netSpecs\" *must* be a string (%s).' % str(netName) ) - - net = self.getNet( netName ) - state = NetRoutingExtension.create( net, NetRoutingState.AutomaticGlobalRoute|NetRoutingState.Analog ) - count = 1 - for connexion in connexions: - if isinstance(connexion,tuple): - self.checkConnexion( count, net, connexion ) - self.connect( connexion[0], connexion[1], net ) - count += 1 - else: - if isinstance(connexion,dict): state.setWPitch(long(connexion['W'])) - + if not isinstance(netName,str): + raise Error( 3, 'AnalogDesign.doNets(): Dict key (net name) of \"self.netSpecs\" *must* be a string (%s).' % str(netName) ) + net = self.getNet( netName ) + state = NetRoutingExtension.create( net, NetRoutingState.AutomaticGlobalRoute|NetRoutingState.Analog ) + count = 1 + for connexion in connexions: + if isinstance(connexion,tuple): + self.checkConnexion( count, net, connexion ) + self.connect( connexion[0], connexion[1], net ) + count += 1 + else: + if isinstance(connexion,dict): state.setWPitch(long(connexion['W'])) return - def checkDSpec ( self, count, dspec ): if not isinstance(dspec,list): - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], is *not* a list.' % count - , '%s' % str(dspec) ]) + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], is *not* a list.' % count + , '%s' % str(dspec) ]) if not isderived(dspec[0],Device): - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [0] is *not* a Device class.' % count - , '%s' % str(dspec) ]) + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [0] is *not* a Device class.' % count + , '%s' % str(dspec) ]) specSize = 0 if isderived(dspec[0],TransistorFamily): specSize = 12 elif isderived(dspec[0], CapacitorFamily): specSize = 7 elif isderived(dspec[0], ResistorFamily): specSize = 8 else: - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], has unsupported device type.' \ - % (count) - , '%s' % str(dspec) ]) + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], has unsupported device type.' \ + % (count) + , '%s' % str(dspec) ]) if len(dspec) < specSize: - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], has %d items instead of 12 .' \ - % (count,len(dspec)) - , '%s' % str(dspec) ]) + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], has %d items instead of 12 .' \ + % (count,len(dspec)) + , '%s' % str(dspec) ]) if not isinstance(dspec[1],str): - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [1] (model name) is *not* a string.' % count - , '%s' % str(dspec) ]) + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [1] (model name) is *not* a string.' % count + , '%s' % str(dspec) ]) if not isinstance(dspec[2],str): - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [2] (layout style) is *not* a string.' % count - , '%s' % str(dspec) ]) + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [2] (layout style) is *not* a string.' % count + , '%s' % str(dspec) ]) if isderived(dspec[0],TransistorFamily): - if dspec[3] not in [NMOS, PMOS]: - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [3] (type) must be either NMOS or PMOS.' % count - , '%s' % str(dspec) ]) - if not isinstance(dspec[4],float): - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [4] (WE) is *not* a float.' % count - , '%s' % str(dspec) ]) - if not isinstance(dspec[5],float): - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [5] (LE) is *not* a float.' % count - , '%s' % str(dspec) ]) - if not isinstance(dspec[6],int): - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [6] (M) is *not* an int.' % count - , '%s' % str(dspec) ]) - if (not dspec[7] is None) and (not isinstance(dspec[7],int)): - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [7] (Mint) is neither an int nor None.' % count - , '%s' % str(dspec) ]) - if not isinstance(dspec[8],int): - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [8] (external dummies) is *not* an int.' % count - , '%s' % str(dspec) ]) - if not isinstance(dspec[9],bool): - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [9] (source first) is *not* a boolean.' % count - , '%s' % str(dspec) ]) - if not isinstance(dspec[10],int): - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [10] (bulk) is *not* an int.' % count - , '%s' % str(dspec) ]) - else: - if dspec[10] > 0xf: - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [10] (bulk) is greater than 0xf.' % count - , '%s' % str(dspec) ]) - if not isinstance(dspec[11],bool): - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [11] (bulk connected) is *not* a boolean.' % count - , '%s' % str(dspec) ]) - + if dspec[3] not in [NMOS, PMOS]: + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [3] (type) must be either NMOS or PMOS.' % count + , '%s' % str(dspec) ]) + if not isinstance(dspec[4],float): + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [4] (WE) is *not* a float.' % count + , '%s' % str(dspec) ]) + if not isinstance(dspec[5],float): + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [5] (LE) is *not* a float.' % count + , '%s' % str(dspec) ]) + if not isinstance(dspec[6],int): + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [6] (M) is *not* an int.' % count + , '%s' % str(dspec) ]) + if (not dspec[7] is None) and (not isinstance(dspec[7],int)): + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [7] (Mint) is neither an int nor None.' % count + , '%s' % str(dspec) ]) + if not isinstance(dspec[8],int): + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [8] (external dummies) is *not* an int.' % count + , '%s' % str(dspec) ]) + if not isinstance(dspec[9],bool): + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [9] (source first) is *not* a boolean.' % count + , '%s' % str(dspec) ]) + if not isinstance(dspec[10],int): + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [10] (bulk) is *not* an int.' % count + , '%s' % str(dspec) ]) + else: + if dspec[10] > 0xf: + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [10] (bulk) is greater than 0xf.' % count + , '%s' % str(dspec) ]) + if not isinstance(dspec[11],bool): + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [11] (bulk connected) is *not* a boolean.' % count + , '%s' % str(dspec) ]) elif isderived(dspec[0], CapacitorFamily): - if dspec[3] not in [PIP, MIM, MOM]: - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [3] (type) must be either PIP, MIM or MOM.' % count - , '%s' % str(dspec) ]) - if isinstance(dspec[4],float): pass - elif isinstance(dspec[4],tuple): pass - else: - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [4] (Cs) should either be *one* float or a *list* of floats.' % count - , '%s' % str(dspec) ]) - + if dspec[3] not in [PIP, MIM, MOM]: + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [3] (type) must be either PIP, MIM or MOM.' % count + , '%s' % str(dspec) ]) + if isinstance(dspec[4],float): pass + elif isinstance(dspec[4],tuple): pass + else: + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [4] (Cs) should either be *one* float or a *list* of floats.' % count + , '%s' % str(dspec) ]) elif isderived(dspec[0],ResistorFamily): - if dspec[3] not in [RPOLYH, RPOLY2PH]: - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [3] (type) must be either RPOLYH or RPOLY2PH.' % count - , '%s' % str(dspec) ]) - if isinstance(dspec[5],float): pass - else: - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [4] (resistance) must be a float.' % count - , '%s' % str(dspec) ]) - + if dspec[3] not in [RPOLYH, RPOLY2PH]: + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [3] (type) must be either RPOLYH or RPOLY2PH.' % count + , '%s' % str(dspec) ]) + if isinstance(dspec[5],float): pass + else: + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [4] (resistance) must be a float.' % count + , '%s' % str(dspec) ]) else: - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], spec list do not match any known pattern.' % count - , '%s' % str(dspec) ]) + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], spec list do not match any known pattern.' % count + , '%s' % str(dspec) ]) return def checkDSpecDigital ( self, count, dspec ): @@ -346,8 +312,8 @@ class AnalogDesign ( object ): # raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [0] (model name) is *not* a string.' % count # , '%s' % str(dspec) ]) if not isinstance(dspec[1],str): - raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [1] (model name) is *not* a string.' % count - , '%s' % str(dspec) ]) + raise Error( 3, [ 'AnalogDesign.doDevices(): \"self.devicesSpecs\" entry [%d], field [1] (model name) is *not* a string.' % count + , '%s' % str(dspec) ]) return def readParameters ( self, path ): @@ -381,9 +347,9 @@ class AnalogDesign ( object ): dspec[4] = Cparameters.C * 1e+12 trace( 110, '\t- \"%s\" : C:%fpF\n' % (Cname ,dspec[4]) ) elif issubclass(dspec[0],ResistorFamily): - print WarningMessage( 'Resistor devices are not supported yet by Oceane parser (instance:"{}").'.format(dspec[1]) ) + print( WarningMessage( 'Resistor devices are not supported yet by Oceane parser (instance:"{}").'.format(dspec[1]) )) else: - print WarningMessage( 'Unsupported analog device type {0} (instance:"{1}").'.format(dspec[0],dspec[1]) ) + print( WarningMessage( 'Unsupported analog device type {0} (instance:"{1}").'.format(dspec[0],dspec[1]) )) trace( 110, '-,' ) return @@ -414,51 +380,51 @@ class AnalogDesign ( object ): trace( 110, '\t==============================================================\n' ) trace( 110, '\tBuilding \"%s\"\n' % dspec[1] ) if isderived(dspec[0],TransistorFamily): - device = dspec[0].create( self.library, dspec[1], dspec[3], dspec[11] ) - device.getParameter( 'Layout Styles' ).setValue( dspec[2] ) - device.getParameter( 'W' ).setValue( toDbU(dspec[4]) ) - device.getParameter( 'L' ).setValue( toDbU(dspec[5]) ) - device.getParameter( 'M' ).setValue( dspec[6] ) - device.setSourceFirst( dspec[9] ) - device.setBulkType ( dspec[10] ) - - if (len(dspec) > 12): device.getParameter( 'NERC' ).setValue(int (dspec[12])) - if (len(dspec) > 13): device.getParameter( 'NIRC' ).setValue(int (dspec[13])) - if (len(dspec) > 14): - for wiringSpec in dspec[14].split(' '): - fields = wiringSpec.split('.') - if len(fields) > 1: - device.getParameter( fields[0]+'.t' ).setValue( fields[1] ) - - if not (dspec[7] is None): device.setMint ( dspec[7] ) - if dspec[8]: device.setExternalDummy( dspec[8] ) + device = dspec[0].create( self.library, dspec[1], dspec[3], dspec[11] ) + device.getParameter( 'Layout Styles' ).setValue( dspec[2] ) + device.getParameter( 'W' ).setValue( toDbU(dspec[4]) ) + device.getParameter( 'L' ).setValue( toDbU(dspec[5]) ) + device.getParameter( 'M' ).setValue( dspec[6] ) + device.setSourceFirst( dspec[9] ) + device.setBulkType ( dspec[10] ) + + if (len(dspec) > 12): device.getParameter( 'NERC' ).setValue(int (dspec[12])) + if (len(dspec) > 13): device.getParameter( 'NIRC' ).setValue(int (dspec[13])) + if (len(dspec) > 14): + for wiringSpec in dspec[14].split(' '): + fields = wiringSpec.split('.') + if len(fields) > 1: + device.getParameter( fields[0]+'.t' ).setValue( fields[1] ) + + if not (dspec[7] is None): device.setMint ( dspec[7] ) + if dspec[8]: device.setExternalDummy( dspec[8] ) elif isderived(dspec[0],CapacitorFamily): - if isinstance(dspec[4],float): capaValues = (dspec[4],) - elif isinstance(dspec[4],tuple): capaValues = dspec[4] - else: - raise ErrorMessage( 1, 'AnalogDesign.doDevice(): Invalid type for capacities values "%s".' \ - % str(dspec[4]) ) - - device = dspec[0].create( self.library, dspec[1], dspec[3], len(capaValues) ) - device.getParameter( 'Layout Styles' ).setValue( dspec[2] ) - device.getParameter( 'matrix' ).setMatrix( dspec[5] ) - device.setDummy( dspec[6] ) - for i in range(len(capaValues)): - device.getParameter( 'capacities' ).setValue( i, capaValues[i] ) + if isinstance(dspec[4],float): capaValues = (dspec[4],) + elif isinstance(dspec[4],tuple): capaValues = dspec[4] + else: + raise ErrorMessage( 1, 'AnalogDesign.doDevice(): Invalid type for capacities values "%s".' \ + % str(dspec[4]) ) + + device = dspec[0].create( self.library, dspec[1], dspec[3], len(capaValues) ) + device.getParameter( 'Layout Styles' ).setValue( dspec[2] ) + device.getParameter( 'matrix' ).setMatrix( dspec[5] ) + device.setDummy( dspec[6] ) + for i in range(len(capaValues)): + device.getParameter( 'capacities' ).setValue( i, capaValues[i] ) elif isderived(dspec[0],ResistorFamily): - print dspec - device = dspec[0].create( self.library, dspec[1], dspec[3] ) - device.getParameter( 'R' ).setValue( dspec[4] ) - device.getParameter( 'W' ).setValue( toDbU(dspec[5]) ) - device.getParameter( 'L' ).setValue( toDbU(dspec[6]) ) - device.getParameter( 'bends' ).setValue( dspec[7] ) - trace( 100, '\tW:{0}\n'.format(dspec[5]) ) - trace( 100, '\tpW:{0}\n'.format(device.getParameter('W')) ) - trace( 100, '\tbends:{0}\n'.format(dspec[7]) ) + print( dspec ) + device = dspec[0].create( self.library, dspec[1], dspec[3] ) + device.getParameter( 'R' ).setValue( dspec[4] ) + device.getParameter( 'W' ).setValue( toDbU(dspec[5]) ) + device.getParameter( 'L' ).setValue( toDbU(dspec[6]) ) + device.getParameter( 'bends' ).setValue( dspec[7] ) + trace( 100, '\tW:{0}\n'.format(dspec[5]) ) + trace( 100, '\tpW:{0}\n'.format(device.getParameter('W')) ) + trace( 100, '\tbends:{0}\n'.format(dspec[7]) ) else: - raise ErrorMessage( 1, 'AnalogDesign.doDevice(): Unknown/unsupported device "%s".' % str(dspec[0]) ) + raise ErrorMessage( 1, 'AnalogDesign.doDevice(): Unknown/unsupported device "%s".' % str(dspec[0]) ) self.generator.setDevice ( device ) self.generator.drawLayout() @@ -472,107 +438,103 @@ class AnalogDesign ( object ): trace( 100, '\tAdd Instance:{0}\n'.format(dspec[1]) ) return - def doDevices ( self ): trace( 110, ',+', '\tAnalogDesign.doDevices()\n' ) if not hasattr(self,'devicesSpecs'): - raise Error( 3, 'AnalogDesign.doDevices(): Mandatory attribute \"self.devicesSpecs\" has not been defined.' ) + raise Error( 3, 'AnalogDesign.doDevices(): Mandatory attribute \"self.devicesSpecs\" has not been defined.' ) if not isinstance(self.devicesSpecs,list): - raise Error( 3, 'AnalogDesign.doDevices(): Attribute \"self.devicesSpecs\" *must* be a Python list.' ) + raise Error( 3, 'AnalogDesign.doDevices(): Attribute \"self.devicesSpecs\" *must* be a Python list.' ) count = 1 for dspec in self.devicesSpecs: - self.doDevice( count, dspec ) - count += 1 + self.doDevice( count, dspec ) + count += 1 trace( 110, '-,' ) return - def showNode ( self, node ): lines = [ '{' ] for key, value in node.items(): - if key == 'children': - lines += [ "%20s { ... }" % "'children':" ] - else: - skey = "'%s':" % str(key) - lines += [ "%20s %s" % (skey,str(value)) ] + if key == 'children': + lines += [ "%20s { ... }" % "'children':" ] + else: + skey = "'%s':" % str(key) + lines += [ "%20s %s" % (skey,str(value)) ] lines += [ '}' ] return lines - def checkNode ( self, node, isRoot ): if not isinstance(node,dict): - raise Error( 3, [ 'AnalogDesign.doSlicingTree(): Node element is *not* a dict.' - ] + self.showNode(node) ) - if not node.has_key('type'): - raise Error( 3, [ 'AnalogDesign.doSlicingTree(): Missing mandatory \"type\" key/element.' - ] + self.showNode(node) ) + raise Error( 3, [ 'AnalogDesign.doSlicingTree(): Node element is *not* a dict.' + ] + self.showNode(node) ) + if not 'type' in node: + raise Error( 3, [ 'AnalogDesign.doSlicingTree(): Missing mandatory \"type\" key/element.' + ] + self.showNode(node) ) nodeType = node['type'] if nodeType not in [VNode, HNode, DNode]: - raise Error( 3, [ 'AnalogDesign.doSlicingTree(): \"type\" must be one of VNode, HNode or DNode.' - ] + self.showNode(node) ) + raise Error( 3, [ 'AnalogDesign.doSlicingTree(): \"type\" must be one of VNode, HNode or DNode.' + ] + self.showNode(node) ) if nodeType == DNode: - if not node.has_key('device'): - raise Error( 3, [ 'AnalogDesign.doSlicingTree(): Missing mandatory \"device\" key/element.' - ] + self.showNode(node) ) - if not isinstance(node['device'],str): - raise Error( 3, [ 'AnalogDesign.doSlicingTree(): \"device\" value *must* be of type str.' - ] + self.showNode(node) ) - if not node.has_key('span'): - raise Error( 3, [ 'AnalogDesign.doSlicingTree(): Missing mandatory \"span\" key/element.' - ] + self.showNode(node) ) - if not isinstance(node['span'],tuple) \ - or len(node['span']) != 3 \ - or not isinstance(node['span'][0],float) \ - or not isinstance(node['span'][1],float) \ - or not isinstance(node['span'][2],float): - raise Error( 3, [ 'AnalogDesign.doSlicingTree(): \"span\" value *must* be a tuple of 3 floats.' - ] + self.showNode(node) ) - if not node.has_key('NF'): - raise Error( 3, [ 'AnalogDesign.doSlicingTree(): Missing mandatory \"NF\" key/element.' - ] + self.showNode(node) ) - if not isinstance(node['NF'],int): - raise Error( 3, [ 'AnalogDesign.doSlicingTree(): \"NF\" value *must* be of type int.' - ] + self.showNode(node) ) + if not 'device' in node: + raise Error( 3, [ 'AnalogDesign.doSlicingTree(): Missing mandatory \"device\" key/element.' + ] + self.showNode(node) ) + if not isinstance(node['device'],str): + raise Error( 3, [ 'AnalogDesign.doSlicingTree(): \"device\" value *must* be of type str.' + ] + self.showNode(node) ) + if not 'span' in node: + raise Error( 3, [ 'AnalogDesign.doSlicingTree(): Missing mandatory \"span\" key/element.' + ] + self.showNode(node) ) + if not isinstance(node['span'],tuple) \ + or len(node['span']) != 3 \ + or not isinstance(node['span'][0],float) \ + or not isinstance(node['span'][1],float) \ + or not isinstance(node['span'][2],float): + raise Error( 3, [ 'AnalogDesign.doSlicingTree(): \"span\" value *must* be a tuple of 3 floats.' + ] + self.showNode(node) ) + if not 'NF' in node: + raise Error( 3, [ 'AnalogDesign.doSlicingTree(): Missing mandatory \"NF\" key/element.' + ] + self.showNode(node) ) + if not isinstance(node['NF'],int): + raise Error( 3, [ 'AnalogDesign.doSlicingTree(): \"NF\" value *must* be of type int.' + ] + self.showNode(node) ) else: - if isRoot: - if not node.has_key('toleranceRatioH'): - raise Error( 3, [ 'AnalogDesign.doSlicingTree(): Missing mandatory \"toleranceRationH\" key/element in root node.' - ] + self.showNode(node) ) - if not node.has_key('toleranceRatioW'): - raise Error( 3, [ 'AnalogDesign.doSlicingTree(): Missing mandatory \"toleranceRationW\" key/element in root node.' - ] + self.showNode(node) ) - if not node.has_key('toleranceBandH'): - raise Error( 3, [ 'AnalogDesign.doSlicingTree(): Missing mandatory \"toleranceBandH\" key/element in root node.' - ] + self.showNode(node) ) - if not node.has_key('toleranceBandW'): - raise Error( 3, [ 'AnalogDesign.doSlicingTree(): Missing mandatory \"toleranceBandW\" key/element in root node.' - ] + self.showNode(node) ) - if not node.has_key('children'): - print Error( 3, [ 'AnalogDesign.doSlicingTree(): Suspicious root node without children.' - ] + self.showNode(node) ) - if node.has_key('children'): - if not isinstance(node['children'],list): - raise Error( 3, [ 'AnalogDesign.doSlicingTree(): \"children\" value *must* be of type list.' ] - + self.showNode(node) ) + if isRoot: + if not 'toleranceRatioH' in node: + raise Error( 3, [ 'AnalogDesign.doSlicingTree(): Missing mandatory \"toleranceRationH\" key/element in root node.' + ] + self.showNode(node) ) + if not 'toleranceRatioW' in node: + raise Error( 3, [ 'AnalogDesign.doSlicingTree(): Missing mandatory \"toleranceRationW\" key/element in root node.' + ] + self.showNode(node) ) + if not 'toleranceBandH' in node: + raise Error( 3, [ 'AnalogDesign.doSlicingTree(): Missing mandatory \"toleranceBandH\" key/element in root node.' + ] + self.showNode(node) ) + if not 'toleranceBandW' in node: + raise Error( 3, [ 'AnalogDesign.doSlicingTree(): Missing mandatory \"toleranceBandW\" key/element in root node.' + ] + self.showNode(node) ) + if not 'children' in node: + print( Error( 3, [ 'AnalogDesign.doSlicingTree(): Suspicious root node without children.' + ] + self.showNode(node) )) + if 'children' in node: + if not isinstance(node['children'],list): + raise Error( 3, [ 'AnalogDesign.doSlicingTree(): \"children\" value *must* be of type list.' ] + + self.showNode(node) ) - if node.has_key('symmetries'): - symmetries = node['symmetries'] - if not isinstance(symmetries,list): - raise Error( 3, [ 'AnalogDesign.doSlicingTree(): \"symmetries\" value *must* be of type list.' - ] + self.showNode(node) ) - for i in range(len(symmetries)): - if not isinstance(symmetries[i],tuple) \ - or len(symmetries[i]) != 2 \ - or not isinstance(symmetries[i][0],int) \ - or not isinstance(symmetries[i][1],int): - raise Error( 3, [ 'AnalogDesign.doSlicingTree(): \"symmetries\" entry [%d] *must* be a tuple of 2 int.' % i ] - + self.showNode(node) ) + if 'symmetries' in node: + symmetries = node['symmetries'] + if not isinstance(symmetries,list): + raise Error( 3, [ 'AnalogDesign.doSlicingTree(): \"symmetries\" value *must* be of type list.' + ] + self.showNode(node) ) + for i in range(len(symmetries)): + if not isinstance(symmetries[i],tuple) \ + or len(symmetries[i]) != 2 \ + or not isinstance(symmetries[i][0],int) \ + or not isinstance(symmetries[i][1],int): + raise Error( 3, [ 'AnalogDesign.doSlicingTree(): \"symmetries\" entry [%d] *must* be a tuple of 2 int.' % i ] + + self.showNode(node) ) return - def beginSlicingTree ( self ): trace( 110, ',+', '\tAnalogDesign.beginSlicingTree()\n' ) return @@ -597,13 +559,13 @@ class AnalogDesign ( object ): trace( 110, ',+', '\tSlicingTree.pushNode() %s ' % str(node) ) parent = None if len(self.stack): - parent = self.topNode() - parent.push_back( node ) - trace( 110, '(parent id:%d)\n' % parent.getId() ) + parent = self.topNode() + parent.push_back( node ) + trace( 110, '(parent id:%d)\n' % parent.getId() ) else: - trace( 110, '(Root)\n' ) - self.slicingTree = node - node.setCell( self.cell ) + trace( 110, '(Root)\n' ) + self.slicingTree = node + node.setCell( self.cell ) self.stack.append( (node,[],[]) ) self.dupTolerances( node ) @@ -621,22 +583,20 @@ class AnalogDesign ( object ): def popNode ( self ): for childIndex, copyIndex in self.topSymmetries(): - self.topNode().addSymmetry( childIndex, copyIndex ) + self.topNode().addSymmetry( childIndex, copyIndex ) for type, net1, net2 in self.topSymmetriesNet(): - if (net2 == None): - self.topNode().addSymmetryNet( type, net1 ) - else: - self.topNode().addSymmetryNet( type, net1, net2 ) + if (net2 == None): + self.topNode().addSymmetryNet( type, net1 ) + else: + self.topNode().addSymmetryNet( type, net1, net2 ) trace( 110, '-,', '\tSlicingTree.popNode() %s\n' % str(self.topNode()) ) - if len(self.stack) == 1: - trace( 110, '\tAnalogDesign.endSlicingTree()\n' ) - trace( 110, '-,', '\tSlicingTree %s stack size:%d\n' % (self.cell.getName(), len(self.stack)) ) - #self.topNode().setCell( self.cell ) - self.topNode().updateNetConstraints() - self.topNode().updateGlobalSize() - + trace( 110, '\tAnalogDesign.endSlicingTree()\n' ) + trace( 110, '-,', '\tSlicingTree %s stack size:%d\n' % (self.cell.getName(), len(self.stack)) ) + #self.topNode().setCell( self.cell ) + self.topNode().updateNetConstraints() + self.topNode().updateGlobalSize() del self.stack[-1] return @@ -682,18 +642,18 @@ class AnalogDesign ( object ): def updatePlacement ( self, *args ): if self.slicingTree: - bora = Bora.BoraEngine.get( self.cell ) - if not bora: bora = Bora.BoraEngine.create( self.cell ) - - signatureMatched = True - if len(args) == 2: bora.updatePlacement( toDbU(args[0]), toDbU(args[1]) ) - elif len(args) == 1: bora.updatePlacement( args[0] ) - else: signatureMatched = False - - #if signatureMatched: - # katana = Katana.KatanaEngine.get( self.cell ) - # if katana: - # katana.loadGlobalRouting( Anabatic.EngineLoadGrByNet ) - # katana.runNegociate( Katana.Flags.PairSymmetrics ); - # #katana.destroy() + bora = Bora.BoraEngine.get( self.cell ) + if not bora: bora = Bora.BoraEngine.create( self.cell ) + + signatureMatched = True + if len(args) == 2: bora.updatePlacement( toDbU(args[0]), toDbU(args[1]) ) + elif len(args) == 1: bora.updatePlacement( args[0] ) + else: signatureMatched = False + + #if signatureMatched: + # katana = Katana.KatanaEngine.get( self.cell ) + # if katana: + # katana.loadGlobalRouting( Anabatic.EngineLoadGrByNet ) + # katana.runNegociate( Katana.Flags.PairSymmetrics ); + # #katana.destroy() return diff --git a/karakaze/python/oceane.py b/karakaze/python/oceane.py index 56da7952..dcdee237 100644 --- a/karakaze/python/oceane.py +++ b/karakaze/python/oceane.py @@ -38,12 +38,12 @@ class Parameters ( object ): def addTransistor ( self, name, index ): lname = name.lower() - if self.transistors.has_key(lname): - print 'Duplicated transistor "%s" (ignored).' % lname + if lname in self.transistors: + print( 'Duplicated transistor "%s" (ignored).' % lname ) else: - if self.indexToName.has_key(index): - print 'Transistors "%s" and "%s" have the same index %d (ignored).' % \ - (self.indexToName[index],lname,index) + if index in self.indexToName: + print( 'Transistors "%s" and "%s" have the same index %d (ignored).' % \ + (self.indexToName[index],lname,index)) self.transistors[ lname ] = Parameters.Transistor( lname ) self.indexToName[ index ] = lname @@ -54,15 +54,15 @@ class Parameters ( object ): transistor = None if isinstance(ref,str): lname = ref.lower() - if self.transistors.has_key(lname): + if lname in self.transistors: transistor = self.transistors[lname] else: - print 'No transistor named "%s".' % ref + print( 'No transistor named "%s".' % ref ) if isinstance(ref,int): - if self.indexToName.has_key(ref): + if ref in self.indexToName: transistor = self.transistors[self.indexToName[ref]] else: - print 'No transistor with index %d.' % ref + print( 'No transistor with index %d.' % ref ) return transistor #def getTransistorL ( self, ref ): return self.getTransistor(ref)[0] @@ -72,10 +72,10 @@ class Parameters ( object ): def addCapacitor ( self, name, value ): lname = name.lower() - if self.capacitors.has_key(lname): - print 'Duplicated capacitor "%s" (ignored).' % lname + if lname in self.capacitors: + print( 'Duplicated capacitor "%s" (ignored).' % lname ) else: - #print 'Add capacitor "%s"' % lname + #print( 'Add capacitor "%s"' % lname ) self.capacitors[ lname ] = Parameters.Capacitor( lname ) self.capacitors[ lname ].C = value @@ -85,17 +85,17 @@ class Parameters ( object ): def getCapacitor ( self, ref ): capacitor = None lname = ref.lower() - if self.capacitors.has_key(lname): + if lname in self.capacitors: capacitor = self.capacitors[lname] else: - print 'No capacitor named "%s".' % ref + print( 'No capacitor named "%s".' % ref ) return capacitor def addResistor ( self, name, value ): lname = name.lower() - if self.resistors.has_key(lname): - print 'Duplicated resistor "%s" (ignored).' % lname + if lname in self.resistors: + print( 'Duplicated resistor "%s" (ignored).' % lname ) else: self.resistors[ lname ] = Parameters.Resistor( lname ) self.resistors[ lname ].R = value @@ -106,10 +106,10 @@ class Parameters ( object ): def getResistor ( self, ref ): resistor = None lname = ref.lower() - if self.capactors.has_key(lname): + if lname in self.capactors: resistor = self.capactors[lname] else: - print 'No resistor named "%s".' % ref + print( 'No resistor named "%s".' % ref ) return resistor @@ -127,7 +127,7 @@ class Parameters ( object ): m = reSpecTran.match( line[:-1] ) if m: i = int(m.group('index')) - #print 'Found transistor %d:<%s>' % (i, m.group('name')) + #print( 'Found transistor %d:<%s>' % (i, m.group('name')) ) self.addTransistor( m.group('name'), i ) continue @@ -135,7 +135,7 @@ class Parameters ( object ): if m: i = int (m.group('index')) L = float(m.group('float')) - #print ' %d:L: %g' % (int(m.group('index')), L) + #print( ' %d:L: %g' % (int(m.group('index')), L) ) self.getTransistor(i).L = L continue @@ -143,7 +143,7 @@ class Parameters ( object ): if m: i = int (m.group('index')) W = float(m.group('float')) - #print ' %d:W: %g' % (int(m.group('index')), W) + #print( ' %d:W: %g' % (int(m.group('index')), W) ) self.getTransistor(i).W = W continue @@ -151,7 +151,7 @@ class Parameters ( object ): if m: i = int(m.group('index')) M = int(m.group('int' )) - #print ' %d:M: %d' % (int(m.group('index')), M) + #print( ' %d:M: %d' % (int(m.group('index')), M) ) self.getTransistor(i).M = M self.getTransistor(i).W = M * self.getTransistor(i).W diff --git a/katabatic/CMakeLists.txt b/katabatic/CMakeLists.txt index d0a1b7db..c87080a7 100644 --- a/katabatic/CMakeLists.txt +++ b/katabatic/CMakeLists.txt @@ -5,6 +5,7 @@ option(BUILD_DOC "Build the documentation (doxygen)" OFF) option(CHECK_DATABASE "Run database in full check mode (very slow)" OFF) + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) cmake_minimum_required(VERSION 2.8.9) @@ -15,13 +16,12 @@ setup_project_paths(CORIOLIS) set_cmake_policies() - setup_boost(program_options filesystem python regex) + setup_boost(program_options) setup_qt() - find_package(PythonLibs 2 REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(FLUTE REQUIRED) - find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) find_package(KNIK REQUIRED) diff --git a/katabatic/doc/html/AutoContactHTee_8h_source.html b/katabatic/doc/html/AutoContactHTee_8h_source.html index 4081ecf0..a7742837 100644 --- a/katabatic/doc/html/AutoContactHTee_8h_source.html +++ b/katabatic/doc/html/AutoContactHTee_8h_source.html @@ -65,7 +65,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/AutoContactTerminal_8h_source.html b/katabatic/doc/html/AutoContactTerminal_8h_source.html index 67755d38..ccfc520e 100644 --- a/katabatic/doc/html/AutoContactTerminal_8h_source.html +++ b/katabatic/doc/html/AutoContactTerminal_8h_source.html @@ -66,7 +66,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/AutoContactTurn_8h_source.html b/katabatic/doc/html/AutoContactTurn_8h_source.html index 173319fe..ca049fbe 100644 --- a/katabatic/doc/html/AutoContactTurn_8h_source.html +++ b/katabatic/doc/html/AutoContactTurn_8h_source.html @@ -66,7 +66,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/AutoContactVTee_8h_source.html b/katabatic/doc/html/AutoContactVTee_8h_source.html index 240b1a7c..76135e78 100644 --- a/katabatic/doc/html/AutoContactVTee_8h_source.html +++ b/katabatic/doc/html/AutoContactVTee_8h_source.html @@ -65,7 +65,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/AutoContact_8h_source.html b/katabatic/doc/html/AutoContact_8h_source.html index 11aea44a..23f60d9f 100644 --- a/katabatic/doc/html/AutoContact_8h_source.html +++ b/katabatic/doc/html/AutoContact_8h_source.html @@ -44,7 +44,7 @@ $(function() {
    AutoContact.h
    -
    1 // -*- C++ -*-
    2 //
    3 // This file is part of the Coriolis Software.
    4 // Copyright (c) UPMC 2008-2018, All Rights Reserved
    5 //
    6 // +-----------------------------------------------------------------+
    7 // | C O R I O L I S |
    8 // | K a t a b a t i c - Routing Toolbox |
    9 // | |
    10 // | Author : Jean-Paul CHAPUT |
    11 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    12 // | =============================================================== |
    13 // | C++ Header : "./katabatic/AutoContact.h" |
    14 // +-----------------------------------------------------------------+
    15 
    16 
    17 #ifndef KATABATIC_AUTOCONTACT_H
    18 #define KATABATIC_AUTOCONTACT_H
    19 
    20 #include <vector>
    21 #include <map>
    22 #include "hurricane/Contact.h"
    23 #include "hurricane/ExtensionGo.h"
    24 #include "katabatic/Constants.h"
    25 #include "katabatic/AutoSegment.h"
    26 #include "katabatic/GCell.h"
    27 
    28 
    29 namespace Katabatic {
    30 
    31 
    32  using std::cerr;
    33  using std::endl;
    34  using Hurricane::tab;
    35  using Hurricane::Name;
    36  using Hurricane::Net;
    39  using Hurricane::Layer;
    40  using Hurricane::Contact;
    41  using Hurricane::ExtensionGo;
    42 
    43  class GCell;
    44  class KatabaticEngine;
    45  class AutoHorizontal;
    46  class AutoVertical;
    47  class AutoContact;
    48 
    49 
    50  typedef std::map<Contact*,AutoContact*> AutoContactLut;
    51 
    52 
    53 // -------------------------------------------------------------------
    54 // Class : "Katabatic::AutoContact".
    55 
    56  enum AutoContactFlag { CntFixed = 0x00000001
    57  , CntTerminal = 0x00000002
    58  , CntTurn = 0x00000004
    59  , CntHTee = 0x00000008
    60  , CntVTee = 0x00000010
    61  , CntInvalidated = 0x00000020
    62  , CntInvalidatedCache = 0x00000040
    63  , CntInCreationStage = 0x00000080
    64  , CntBadTopology = 0x00000100
    65  , CntIgnoreAnchor = 0x00000200
    66  , CntWeakTerminal = 0x00000400
    67  , CntUserNativeConstraints = 0x00000800
    68  };
    69 
    70  class AutoContact {
    71  public:
    72  static AutoContact* createFrom ( Contact* );
    73  public:
    74  // Wrapped Contact Accessors.
    75  inline Hook* getBodyHook ();
    76  inline Hook* getAnchorHook ();
    77  inline Component* getAnchor () const;
    78  inline Net* getNet () const;
    79  inline const Layer* getLayer () const;
    80  inline DbU::Unit getX () const;
    81  inline DbU::Unit getY () const;
    82  inline DbU::Unit getDx () const;
    83  inline DbU::Unit getDy () const;
    84  inline Point getCenter () const;
    85  inline Point getPosition () const;
    86  inline DbU::Unit getWidth () const;
    87  inline DbU::Unit getHalfWidth () const;
    88  inline DbU::Unit getHeight () const;
    89  inline DbU::Unit getHalfHeight () const;
    90  inline Components getSlaveComponents () const;
    91  // Wrapped Contact Modifiers.
    92  inline void setLayer ( const Layer* );
    93  inline void setWidth ( DbU::Unit );
    94  inline void setHeight ( DbU::Unit );
    95  inline void setSizes ( DbU::Unit width, DbU::Unit height );
    96  inline void setX ( DbU::Unit );
    97  inline void setY ( DbU::Unit );
    98  inline void setPosition ( DbU::Unit width, DbU::Unit height );
    99  inline void setPosition ( const Point& );
    100  inline void setDx ( DbU::Unit );
    101  inline void setDy ( DbU::Unit );
    102  inline void setOffset ( DbU::Unit dx, DbU::Unit dy );
    103  virtual void translate ( const DbU::Unit& tx, const DbU::Unit& ty );
    104  // Predicates.
    105  inline bool isInCreationStage () const;
    106  inline bool isInvalidated () const;
    107  inline bool isInvalidatedCache () const;
    108  inline bool isTerminal () const;
    109  inline bool isTurn () const;
    110  bool isTee ( unsigned int direction ) const;
    111  inline bool isHTee () const;
    112  inline bool isVTee () const;
    113  inline bool isFixed () const;
    114  inline bool isUserNativeConstraints () const;
    115  inline bool hasBadTopology () const;
    116  bool canDestroy ( unsigned int flags=0 ) const;
    117  bool canMoveUp ( const AutoSegment* moved ) const;
    118  // Accessors.
    119  inline Contact* base () const;
    120  static size_t getAllocateds ();
    121  static const Name& getStaticName ();
    122  virtual const Name& getName () const;
    123  inline size_t getId () const;
    124  virtual Box getBoundingBox () const;
    125  inline GCell* getGCell () const;
    126  virtual AutoSegment* getOpposite ( const AutoSegment* ) const = 0;
    127  virtual AutoSegment* getPerpandicular ( const AutoSegment* ) const = 0;
    128  virtual AutoSegment* getSegment ( unsigned int ) const = 0;
    129  unsigned int getMinDepth () const;
    130  unsigned int getMaxDepth () const;
    131  void getLengths ( DbU::Unit* lengths, AutoSegment::DepthLengthSet& );
    132  virtual Box getNativeConstraintBox () const;
    133  Interval getNativeUConstraints ( unsigned int direction ) const;
    134  Interval getUConstraints ( unsigned int direction ) const;
    135  inline DbU::Unit getCBXMin () const;
    136  inline DbU::Unit getCBXMax () const;
    137  inline DbU::Unit getCBYMin () const;
    138  inline DbU::Unit getCBYMax () const;
    139  inline Box getConstraintBox () const;
    140  Box& intersectConstraintBox ( Box& box ) const;
    141  // Collections.
    142  AutoSegments getAutoSegments ();
    143  // Modifiers.
    144  void invalidate ( unsigned int flags=0 );
    145  virtual void cacheDetach ( AutoSegment* ) = 0;
    146  virtual void cacheAttach ( AutoSegment* ) = 0;
    147  virtual void updateCache () = 0;
    148  virtual void updateGeometry () = 0;
    149  virtual void updateTopology () = 0;
    150  void showTopologyError ( const std::string&, unsigned int flags=0 );
    151  virtual void checkTopology ();
    152  inline void setFlags ( unsigned int );
    153  inline void unsetFlags ( unsigned int );
    154  void setGCell ( GCell* );
    155  inline void setCBXMin ( DbU::Unit xMin );
    156  inline void setCBXMax ( DbU::Unit xMax );
    157  inline void setCBYMin ( DbU::Unit yMin );
    158  inline void setCBYMax ( DbU::Unit yMax );
    159  void setConstraintBox ( const Box& box );
    160  bool restrictConstraintBox ( DbU::Unit constraintMin
    161  , DbU::Unit constraintMax
    162  , unsigned int flags=KbWarnOnError );
    163  void restoreNativeConstraintBox ();
    164  void migrateConstraintBox ( AutoContact* other );
    165  void destroy ();
    166  // Inspector Management.
    167  Record* _getRecord () const;
    168  virtual string _getString () const;
    169  virtual string _getTypeName () const;
    170 
    171  private:
    172  // Internal: Attributes.
    173  static size_t _maxId;
    174  static size_t _allocateds;
    175  static const Name _goName;
    176 
    177  protected:
    178  size_t _id;
    179  Contact* _contact;
    180  GCell* _gcell;
    181  unsigned int _flags;
    182  int _dxMin:8;
    183  int _dxMax:8;
    184  int _dyMin:8;
    185  int _dyMax:8;
    186 
    187  protected:
    188  // Constructors & Destructors.
    189  AutoContact ( GCell*, Contact* );
    190  virtual ~AutoContact ();
    191  static void _preCreate ( GCell*, Net*, const Layer* );
    192  virtual void _postCreate ();
    193  virtual void _preDestroy ();
    194  private:
    195  AutoContact ( const AutoContact& );
    196  AutoContact& operator= ( const AutoContact& );
    197 
    198  protected:
    199  inline int _getDeltaMin ( DbU::Unit x, DbU::Unit xMin );
    200  inline int _getDeltaMax ( DbU::Unit x, DbU::Unit xMin, DbU::Unit xMax );
    201  static void _getTopology ( Contact*, Component*& anchor, Horizontal**&, Vertical**&, size_t );
    202  virtual void _invalidate ( unsigned int flags ) = 0;
    203  };
    204 
    205 
    206 // Wrapped Contact Inline Functions.
    207  inline Hook* AutoContact::getBodyHook () { return _contact->getBodyHook(); }
    208  inline Hook* AutoContact::getAnchorHook () { return _contact->getAnchorHook(); }
    209  inline Component* AutoContact::getAnchor () const { return _contact->getAnchor(); }
    210  inline Net* AutoContact::getNet () const { return _contact->getNet(); }
    211  inline const Layer* AutoContact::getLayer () const { return _contact->getLayer(); }
    212  inline DbU::Unit AutoContact::getX () const { return _contact->getX(); }
    213  inline DbU::Unit AutoContact::getY () const { return _contact->getY(); }
    214  inline DbU::Unit AutoContact::getDx () const { return _contact->getDx(); }
    215  inline DbU::Unit AutoContact::getDy () const { return _contact->getDy(); }
    216  inline Point AutoContact::getCenter () const { return _contact->getCenter(); }
    217  inline Point AutoContact::getPosition () const { return _contact->getPosition(); }
    218  inline DbU::Unit AutoContact::getWidth () const { return _contact->getWidth(); }
    219  inline DbU::Unit AutoContact::getHalfWidth () const { return _contact->getHalfWidth(); }
    220  inline DbU::Unit AutoContact::getHeight () const { return _contact->getHeight(); }
    221  inline DbU::Unit AutoContact::getHalfHeight () const { return _contact->getHalfHeight(); }
    222  inline Components AutoContact::getSlaveComponents () const { return _contact->getSlaveComponents(); }
    223  inline void AutoContact::setLayer ( const Layer* layer ) { _contact->setLayer(layer); }
    224  inline void AutoContact::setWidth ( DbU::Unit w ) { _contact->setWidth(w); }
    225  inline void AutoContact::setHeight ( DbU::Unit h ) { _contact->setHeight(h); }
    226  inline void AutoContact::setSizes ( DbU::Unit w, DbU::Unit h ) { _contact->setSizes(w,h); }
    227  inline void AutoContact::setX ( DbU::Unit x ) { _contact->setX(x); }
    228  inline void AutoContact::setY ( DbU::Unit y ) { _contact->setY(y); }
    229  inline void AutoContact::setPosition ( DbU::Unit x, DbU::Unit y ) { _contact->setPosition(x,y); }
    230  inline void AutoContact::setPosition ( const Point& p ) { _contact->setPosition(p); }
    231  inline void AutoContact::setDx ( DbU::Unit dx ) { _contact->setDx(dx); }
    232  inline void AutoContact::setDy ( DbU::Unit dy ) { _contact->setDy(dy); }
    233  inline void AutoContact::setOffset ( DbU::Unit dx, DbU::Unit dy ) { _contact->setOffset(dx,dy); }
    234 // AutoContact Inline Functions.
    235  inline bool AutoContact::isInCreationStage () const { return _flags&CntInCreationStage; }
    236  inline bool AutoContact::isInvalidated () const { return _flags&CntInvalidated; }
    237  inline bool AutoContact::isInvalidatedCache () const { return _flags&CntInvalidatedCache; }
    238  inline bool AutoContact::isTurn () const { return _flags&CntTurn; }
    239  inline bool AutoContact::isFixed () const { return _flags&CntFixed; }
    240  inline bool AutoContact::isUserNativeConstraints () const { return _flags&CntUserNativeConstraints; }
    241  inline bool AutoContact::isTerminal () const { return _flags&CntTerminal; }
    242  inline bool AutoContact::isHTee () const { return _flags&CntHTee; }
    243  inline bool AutoContact::isVTee () const { return _flags&CntVTee; }
    244  inline bool AutoContact::hasBadTopology () const { return _flags&CntBadTopology; }
    245  inline size_t AutoContact::getId () const { return _id; }
    246  inline Contact* AutoContact::base () const { return _contact; }
    247  inline GCell* AutoContact::getGCell () const { return _gcell; }
    249  inline void AutoContact::setCBXMin ( DbU::Unit xMin ) { _dxMin = _getDeltaMin(xMin,_gcell->getX()); }
    250  inline void AutoContact::setCBXMax ( DbU::Unit xMax ) { _dxMax = _getDeltaMax(xMax,_gcell->getX(),_gcell->getXMax()); }
    251  inline void AutoContact::setCBYMin ( DbU::Unit yMin ) { _dyMin = _getDeltaMin(yMin,_gcell->getY()); }
    252  inline void AutoContact::setCBYMax ( DbU::Unit yMax ) { _dyMax = _getDeltaMax(yMax,_gcell->getY(),_gcell->getYMax()); }
    253  inline void AutoContact::setFlags ( unsigned int flags ) { _flags|= flags; }
    254  inline void AutoContact::unsetFlags ( unsigned int flags ) { _flags&=~flags; }
    255  inline int AutoContact::_getDeltaMin ( DbU::Unit x, DbU::Unit xMin ) { if (x<xMin) return 0; return (int)DbU::toLambda(x-xMin); }
    256  inline int AutoContact::_getDeltaMax ( DbU::Unit x, DbU::Unit xMin, DbU::Unit xMax ) { if (x>xMax) x=xMax; return (int)DbU::toLambda(x-xMin); }
    257 
    259  { return isFixed() ? _contact->getX() : DbU::fromLambda(_dxMin) + _gcell->getX(); }
    260 
    262  { return isFixed() ? _contact->getX() : DbU::fromLambda(_dxMax) + _gcell->getX(); }
    263 
    265  { return isFixed() ? _contact->getY() : DbU::fromLambda(_dyMin) + _gcell->getY(); }
    266 
    268  { return isFixed() ? _contact->getY() : DbU::fromLambda(_dyMax) + _gcell->getY(); }
    269 
    270 // -------------------------------------------------------------------
    271 // Class : "Katabatic::LocatorHelper".
    272 
    274  public:
    275  inline LocatorHelper ( AutoContact*, unsigned int flags=0 );
    276  inline bool isValid () const;
    277  inline AutoSegment* getSegment () const;
    278  inline void progress ();
    279  private:
    280  inline unsigned int _min () const;
    281  inline unsigned int _max () const;
    282  private:
    283  unsigned int _flags;
    284  unsigned int _index;
    285  AutoContact* _contact;
    286  };
    287 
    288 
    289  inline LocatorHelper::LocatorHelper ( AutoContact* contact, unsigned int flags )
    290  : _flags(flags), _index(_min()), _contact(contact)
    291  {
    292  cdebug_tabw(145,1);
    293  cdebug_log(145,0) << "CTOR LocatorHelper " << contact->_getString() << endl;
    294  cdebug_log(145,0) << "+ _min():" << _min() << endl;
    295  cdebug_log(145,0) << "+ _max():" << _max() << endl;
    296  cdebug_log(145,0) << "+ getSegment(_min()):" << _contact->getSegment(_min()) << endl;
    297  if (not _contact->getSegment(_index)) progress();
    298  cdebug_tabw(145,-1);
    299  }
    300 
    301  inline bool LocatorHelper::isValid () const
    302  { return _index < _max(); }
    303 
    304  inline unsigned int LocatorHelper::_min () const
    305  { return (_flags & (KbHorizontal|KbWithPerpands)) ? 0 : 2; }
    306 
    307  inline unsigned int LocatorHelper::_max () const
    308  { return ((_flags & KbHorizontal) and not (_flags & KbWithPerpands)) ? 2 : 4; }
    309 
    311  {
    312  cdebug_log(145,0) << "LocatorHelper::getSegment(" << _index << ") - " << _contact->getSegment(_index) << endl;
    313  return (_index < _max()) ? _contact->getSegment(_index) : NULL;
    314  }
    315 
    316  inline void LocatorHelper::progress ()
    317  {
    318  cdebug_tabw(145,1);
    319  ++_index;
    320  cdebug_log(145,0) << "LocatorHelper::progress() [" << _index << "] " << _contact->getSegment(_index) << endl;
    321  while ((_index < _max()) and (_contact->getSegment(_index) == NULL)) {
    322  ++_index;
    323  cdebug_log(145,0) << "LocatorHelper::progress() [" << _index << "] " << _contact->getSegment(_index) << endl;
    324  }
    325  cdebug_tabw(145,-1);
    326  }
    327 
    328 
    329 // -------------------------------------------------------------------
    330 // Helper Functions.
    331 
    332 
    333  template<typename Type>inline void order ( Type& a, Type& b ) { if (a>b) std::swap(a,b); }
    334 
    335  inline DbU::Unit setInBound ( DbU::Unit lower, DbU::Unit upper, DbU::Unit& value )
    336  {
    337  if ( lower > value ) value = lower;
    338  if ( upper < value ) value = upper;
    339 
    340  return value;
    341  }
    342 
    343  inline size_t abssub ( size_t a, size_t b ) { return (a>b) ? a-b : b-a; }
    344 
    345 
    346 } // Katabatic namespace.
    347 
    348 
    349 INSPECTOR_P_SUPPORT(Katabatic::AutoContact);
    350 
    351 
    352 #endif // KATABATIC_AUTOCONTACT_H
    Definition: AutoContact.h:63
    +
    1 // -*- C++ -*-
    2 //
    3 // This file is part of the Coriolis Software.
    4 // Copyright (c) UPMC 2008-2018, All Rights Reserved
    5 //
    6 // +-----------------------------------------------------------------+
    7 // | C O R I O L I S |
    8 // | K a t a b a t i c - Routing Toolbox |
    9 // | |
    10 // | Author : Jean-Paul CHAPUT |
    11 // | E-mail : Jean-Paul.Chaput@lip6.fr |
    12 // | =============================================================== |
    13 // | C++ Header : "./katabatic/AutoContact.h" |
    14 // +-----------------------------------------------------------------+
    15 
    16 
    17 #ifndef KATABATIC_AUTOCONTACT_H
    18 #define KATABATIC_AUTOCONTACT_H
    19 
    20 #include <vector>
    21 #include <map>
    22 #include "hurricane/Contact.h"
    23 #include "hurricane/ExtensionGo.h"
    24 #include "katabatic/Constants.h"
    25 #include "katabatic/AutoSegment.h"
    26 #include "katabatic/GCell.h"
    27 
    28 
    29 namespace Katabatic {
    30 
    31 
    32  using std::cerr;
    33  using std::endl;
    34  using Hurricane::tab;
    35  using Hurricane::Name;
    36  using Hurricane::Net;
    39  using Hurricane::Layer;
    40  using Hurricane::Contact;
    41  using Hurricane::ExtensionGo;
    42 
    43  class GCell;
    44  class KatabaticEngine;
    45  class AutoHorizontal;
    46  class AutoVertical;
    47  class AutoContact;
    48 
    49 
    50  typedef std::map<Contact*,AutoContact*> AutoContactLut;
    51 
    52 
    53 // -------------------------------------------------------------------
    54 // Class : "Katabatic::AutoContact".
    55 
    56  enum AutoContactFlag { CntFixed = 0x00000001
    57  , CntTerminal = 0x00000002
    58  , CntTurn = 0x00000004
    59  , CntHTee = 0x00000008
    60  , CntVTee = 0x00000010
    61  , CntInvalidated = 0x00000020
    62  , CntInvalidatedCache = 0x00000040
    63  , CntInCreationStage = 0x00000080
    64  , CntBadTopology = 0x00000100
    65  , CntIgnoreAnchor = 0x00000200
    66  , CntWeakTerminal = 0x00000400
    67  , CntUserNativeConstraints = 0x00000800
    68  };
    69 
    70  class AutoContact {
    71  public:
    72  static AutoContact* createFrom ( Contact* );
    73  public:
    74  // Wrapped Contact Accessors.
    75  inline Hook* getBodyHook ();
    76  inline Hook* getAnchorHook ();
    77  inline Component* getAnchor () const;
    78  inline Net* getNet () const;
    79  inline const Layer* getLayer () const;
    80  inline DbU::Unit getX () const;
    81  inline DbU::Unit getY () const;
    82  inline DbU::Unit getDx () const;
    83  inline DbU::Unit getDy () const;
    84  inline Point getCenter () const;
    85  inline Point getPosition () const;
    86  inline DbU::Unit getWidth () const;
    87  inline DbU::Unit getHalfWidth () const;
    88  inline DbU::Unit getHeight () const;
    89  inline DbU::Unit getHalfHeight () const;
    90  inline Components getSlaveComponents () const;
    91  // Wrapped Contact Modifiers.
    92  inline void setLayer ( const Layer* );
    93  inline void setWidth ( DbU::Unit );
    94  inline void setHeight ( DbU::Unit );
    95  inline void setSizes ( DbU::Unit width, DbU::Unit height );
    96  inline void setX ( DbU::Unit );
    97  inline void setY ( DbU::Unit );
    98  inline void setPosition ( DbU::Unit width, DbU::Unit height );
    99  inline void setPosition ( const Point& );
    100  inline void setDx ( DbU::Unit );
    101  inline void setDy ( DbU::Unit );
    102  inline void setOffset ( DbU::Unit dx, DbU::Unit dy );
    103  virtual void translate ( const DbU::Unit& tx, const DbU::Unit& ty );
    104  // Predicates.
    105  inline bool isInCreationStage () const;
    106  inline bool isInvalidated () const;
    107  inline bool isInvalidatedCache () const;
    108  inline bool isTerminal () const;
    109  inline bool isTurn () const;
    110  bool isTee ( unsigned int direction ) const;
    111  inline bool isHTee () const;
    112  inline bool isVTee () const;
    113  inline bool isFixed () const;
    114  inline bool isUserNativeConstraints () const;
    115  inline bool hasBadTopology () const;
    116  bool canDestroy ( unsigned int flags=0 ) const;
    117  bool canMoveUp ( const AutoSegment* moved ) const;
    118  // Accessors.
    119  inline Contact* base () const;
    120  static size_t getAllocateds ();
    121  static const Name& getStaticName ();
    122  virtual const Name& getName () const;
    123  inline size_t getId () const;
    124  virtual Box getBoundingBox () const;
    125  inline GCell* getGCell () const;
    126  virtual AutoSegment* getOpposite ( const AutoSegment* ) const = 0;
    127  virtual AutoSegment* getPerpandicular ( const AutoSegment* ) const = 0;
    128  virtual AutoSegment* getSegment ( unsigned int ) const = 0;
    129  unsigned int getMinDepth () const;
    130  unsigned int getMaxDepth () const;
    131  void getLengths ( DbU::Unit* lengths, AutoSegment::DepthLengthSet& );
    132  virtual Box getNativeConstraintBox () const;
    133  Interval getNativeUConstraints ( unsigned int direction ) const;
    134  Interval getUConstraints ( unsigned int direction ) const;
    135  inline DbU::Unit getCBXMin () const;
    136  inline DbU::Unit getCBXMax () const;
    137  inline DbU::Unit getCBYMin () const;
    138  inline DbU::Unit getCBYMax () const;
    139  inline Box getConstraintBox () const;
    140  Box& intersectConstraintBox ( Box& box ) const;
    141  // Collections.
    142  AutoSegments getAutoSegments ();
    143  // Modifiers.
    144  void invalidate ( unsigned int flags=0 );
    145  virtual void cacheDetach ( AutoSegment* ) = 0;
    146  virtual void cacheAttach ( AutoSegment* ) = 0;
    147  virtual void updateCache () = 0;
    148  virtual void updateGeometry () = 0;
    149  virtual void updateTopology () = 0;
    150  void showTopologyError ( const std::string&, unsigned int flags=0 );
    151  virtual void checkTopology ();
    152  inline void setFlags ( unsigned int );
    153  inline void unsetFlags ( unsigned int );
    154  void setGCell ( GCell* );
    155  inline void setCBXMin ( DbU::Unit xMin );
    156  inline void setCBXMax ( DbU::Unit xMax );
    157  inline void setCBYMin ( DbU::Unit yMin );
    158  inline void setCBYMax ( DbU::Unit yMax );
    159  void setConstraintBox ( const Box& box );
    160  bool restrictConstraintBox ( DbU::Unit constraintMin
    161  , DbU::Unit constraintMax
    162  , unsigned int flags=KbWarnOnError );
    163  void restoreNativeConstraintBox ();
    164  void migrateConstraintBox ( AutoContact* other );
    165  void destroy ();
    166  // Inspector Management.
    167  Record* _getRecord () const;
    168  virtual string _getString () const;
    169  virtual string _getTypeName () const;
    170 
    171  private:
    172  // Internal: Attributes.
    173  static size_t _maxId;
    174  static size_t _allocateds;
    175  static const Name _goName;
    176 
    177  protected:
    178  size_t _id;
    179  Contact* _contact;
    180  GCell* _gcell;
    181  unsigned int _flags;
    182  int _dxMin:8;
    183  int _dxMax:8;
    184  int _dyMin:8;
    185  int _dyMax:8;
    186 
    187  protected:
    188  // Constructors & Destructors.
    189  AutoContact ( GCell*, Contact* );
    190  virtual ~AutoContact ();
    191  static void _preCreate ( GCell*, Net*, const Layer* );
    192  virtual void _postCreate ();
    193  virtual void _preDestroy ();
    194  private:
    195  AutoContact ( const AutoContact& );
    196  AutoContact& operator= ( const AutoContact& );
    197 
    198  protected:
    199  inline int _getDeltaMin ( DbU::Unit x, DbU::Unit xMin );
    200  inline int _getDeltaMax ( DbU::Unit x, DbU::Unit xMin, DbU::Unit xMax );
    201  static void _getTopology ( Contact*, Component*& anchor, Horizontal**&, Vertical**&, size_t );
    202  virtual void _invalidate ( unsigned int flags ) = 0;
    203  };
    204 
    205 
    206 // Wrapped Contact Inline Functions.
    207  inline Hook* AutoContact::getBodyHook () { return _contact->getBodyHook(); }
    208  inline Hook* AutoContact::getAnchorHook () { return _contact->getAnchorHook(); }
    209  inline Component* AutoContact::getAnchor () const { return _contact->getAnchor(); }
    210  inline Net* AutoContact::getNet () const { return _contact->getNet(); }
    211  inline const Layer* AutoContact::getLayer () const { return _contact->getLayer(); }
    212  inline DbU::Unit AutoContact::getX () const { return _contact->getX(); }
    213  inline DbU::Unit AutoContact::getY () const { return _contact->getY(); }
    214  inline DbU::Unit AutoContact::getDx () const { return _contact->getDx(); }
    215  inline DbU::Unit AutoContact::getDy () const { return _contact->getDy(); }
    216  inline Point AutoContact::getCenter () const { return _contact->getCenter(); }
    217  inline Point AutoContact::getPosition () const { return _contact->getPosition(); }
    218  inline DbU::Unit AutoContact::getWidth () const { return _contact->getWidth(); }
    219  inline DbU::Unit AutoContact::getHalfWidth () const { return _contact->getHalfWidth(); }
    220  inline DbU::Unit AutoContact::getHeight () const { return _contact->getHeight(); }
    221  inline DbU::Unit AutoContact::getHalfHeight () const { return _contact->getHalfHeight(); }
    222  inline Components AutoContact::getSlaveComponents () const { return _contact->getSlaveComponents(); }
    223  inline void AutoContact::setLayer ( const Layer* layer ) { _contact->setLayer(layer); }
    224  inline void AutoContact::setWidth ( DbU::Unit w ) { _contact->setWidth(w); }
    225  inline void AutoContact::setHeight ( DbU::Unit h ) { _contact->setHeight(h); }
    226  inline void AutoContact::setSizes ( DbU::Unit w, DbU::Unit h ) { _contact->setSizes(w,h); }
    227  inline void AutoContact::setX ( DbU::Unit x ) { _contact->setX(x); }
    228  inline void AutoContact::setY ( DbU::Unit y ) { _contact->setY(y); }
    229  inline void AutoContact::setPosition ( DbU::Unit x, DbU::Unit y ) { _contact->setPosition(x,y); }
    230  inline void AutoContact::setPosition ( const Point& p ) { _contact->setPosition(p); }
    231  inline void AutoContact::setDx ( DbU::Unit dx ) { _contact->setDx(dx); }
    232  inline void AutoContact::setDy ( DbU::Unit dy ) { _contact->setDy(dy); }
    233  inline void AutoContact::setOffset ( DbU::Unit dx, DbU::Unit dy ) { _contact->setOffset(dx,dy); }
    234 // AutoContact Inline Functions.
    235  inline bool AutoContact::isInCreationStage () const { return _flags&CntInCreationStage; }
    236  inline bool AutoContact::isInvalidated () const { return _flags&CntInvalidated; }
    237  inline bool AutoContact::isInvalidatedCache () const { return _flags&CntInvalidatedCache; }
    238  inline bool AutoContact::isTurn () const { return _flags&CntTurn; }
    239  inline bool AutoContact::isFixed () const { return _flags&CntFixed; }
    240  inline bool AutoContact::isUserNativeConstraints () const { return _flags&CntUserNativeConstraints; }
    241  inline bool AutoContact::isTerminal () const { return _flags&CntTerminal; }
    242  inline bool AutoContact::isHTee () const { return _flags&CntHTee; }
    243  inline bool AutoContact::isVTee () const { return _flags&CntVTee; }
    244  inline bool AutoContact::hasBadTopology () const { return _flags&CntBadTopology; }
    245  inline size_t AutoContact::getId () const { return _id; }
    246  inline Contact* AutoContact::base () const { return _contact; }
    247  inline GCell* AutoContact::getGCell () const { return _gcell; }
    249  inline void AutoContact::setCBXMin ( DbU::Unit xMin ) { _dxMin = _getDeltaMin(xMin,_gcell->getX()); }
    250  inline void AutoContact::setCBXMax ( DbU::Unit xMax ) { _dxMax = _getDeltaMax(xMax,_gcell->getX(),_gcell->getXMax()); }
    251  inline void AutoContact::setCBYMin ( DbU::Unit yMin ) { _dyMin = _getDeltaMin(yMin,_gcell->getY()); }
    252  inline void AutoContact::setCBYMax ( DbU::Unit yMax ) { _dyMax = _getDeltaMax(yMax,_gcell->getY(),_gcell->getYMax()); }
    253  inline void AutoContact::setFlags ( unsigned int flags ) { _flags|= flags; }
    254  inline void AutoContact::unsetFlags ( unsigned int flags ) { _flags&=~flags; }
    255  inline int AutoContact::_getDeltaMin ( DbU::Unit x, DbU::Unit xMin ) { if (x<xMin) return 0; return (int)DbU::toLambda(x-xMin); }
    256  inline int AutoContact::_getDeltaMax ( DbU::Unit x, DbU::Unit xMin, DbU::Unit xMax ) { if (x>xMax) x=xMax; return (int)DbU::toLambda(x-xMin); }
    257 
    259  { return isFixed() ? _contact->getX() : DbU::fromLambda(_dxMin) + _gcell->getX(); }
    260 
    262  { return isFixed() ? _contact->getX() : DbU::fromLambda(_dxMax) + _gcell->getX(); }
    263 
    265  { return isFixed() ? _contact->getY() : DbU::fromLambda(_dyMin) + _gcell->getY(); }
    266 
    268  { return isFixed() ? _contact->getY() : DbU::fromLambda(_dyMax) + _gcell->getY(); }
    269 
    270 // -------------------------------------------------------------------
    271 // Class : "Katabatic::LocatorHelper".
    272 
    274  public:
    275  inline LocatorHelper ( AutoContact*, unsigned int flags=0 );
    276  inline bool isValid () const;
    277  inline AutoSegment* getSegment () const;
    278  inline void progress ();
    279  private:
    280  inline unsigned int _min () const;
    281  inline unsigned int _max () const;
    282  private:
    283  unsigned int _flags;
    284  unsigned int _index;
    285  AutoContact* _contact;
    286  };
    287 
    288 
    289  inline LocatorHelper::LocatorHelper ( AutoContact* contact, unsigned int flags )
    290  : _flags(flags), _index(_min()), _contact(contact)
    291  {
    292  cdebug_tabw(145,1);
    293  cdebug_log(145,0) << "CTOR LocatorHelper " << contact->_getString() << endl;
    294  cdebug_log(145,0) << "+ _min():" << _min() << endl;
    295  cdebug_log(145,0) << "+ _max():" << _max() << endl;
    296  cdebug_log(145,0) << "+ getSegment(_min()):" << _contact->getSegment(_min()) << endl;
    297  if (not _contact->getSegment(_index)) progress();
    298  cdebug_tabw(145,-1);
    299  }
    300 
    301  inline bool LocatorHelper::isValid () const
    302  { return _index < _max(); }
    303 
    304  inline unsigned int LocatorHelper::_min () const
    305  { return (_flags & (KbHorizontal|KbWithPerpands)) ? 0 : 2; }
    306 
    307  inline unsigned int LocatorHelper::_max () const
    308  { return ((_flags & KbHorizontal) and not (_flags & KbWithPerpands)) ? 2 : 4; }
    309 
    311  {
    312  cdebug_log(145,0) << "LocatorHelper::getSegment(" << _index << ") - " << _contact->getSegment(_index) << endl;
    313  return (_index < _max()) ? _contact->getSegment(_index) : NULL;
    314  }
    315 
    316  inline void LocatorHelper::progress ()
    317  {
    318  cdebug_tabw(145,1);
    319  ++_index;
    320  cdebug_log(145,0) << "LocatorHelper::progress() [" << _index << "] " << _contact->getSegment(_index) << endl;
    321  while ((_index < _max()) and (_contact->getSegment(_index) == NULL)) {
    322  ++_index;
    323  cdebug_log(145,0) << "LocatorHelper::progress() [" << _index << "] " << _contact->getSegment(_index) << endl;
    324  }
    325  cdebug_tabw(145,-1);
    326  }
    327 
    328 
    329 // -------------------------------------------------------------------
    330 // Helper Functions.
    331 
    332 
    333  template<typename Type>inline void order ( Type& a, Type& b ) { if (a>b) std::swap(a,b); }
    334 
    335  inline DbU::Unit setInBound ( DbU::Unit lower, DbU::Unit upper, DbU::Unit& value )
    336  {
    337  if ( lower > value ) value = lower;
    338  if ( upper < value ) value = upper;
    339 
    340  return value;
    341  }
    342 
    343  inline size_t abssub ( size_t a, size_t b ) { return (a>b) ? a-b : b-a; }
    344 
    345 
    346 } // Katabatic namespace.
    347 
    348 
    349 INSPECTOR_P_SUPPORT(Katabatic::AutoContact);
    350 
    351 
    352 #endif // KATABATIC_AUTOCONTACT_H
    Definition: AutoContact.h:63
    Net * getNet() const
    Definition: AutoContact.h:210
    DbU::Unit getY() const
    Definition: GCell.h:245
    static size_t getAllocateds()
    Definition: AutoContact.cpp:153
    @@ -57,23 +57,24 @@ $(function() {
    static const Name & getStaticName()
    Definition: AutoContact.cpp:157
    virtual void checkTopology()
    Definition: AutoContact.cpp:400
    void setOffset(DbU::Unit dx, DbU::Unit dy)
    Definition: AutoContact.h:233
    -
    void setX(const DbU::Unit &x)
    Net * getNet() const
    +
    void setSizes(DbU::Unit width, DbU::Unit height)
    AutoContactFlag
    Definition: AutoContact.h:56
    Hook * getAnchorHook()
    Definition: AutoContact.h:208
    DbU::Unit getDx() const
    Definition: AutoContact.h:214
    +
    void setLayer(const Layer *)
    DbU::Unit getCBXMin() const
    Definition: AutoContact.h:258
    Definition: AutoContact.h:56
    DbU::Unit getWidth() const
    Definition: AutoContact.h:218
    bool isInCreationStage() const
    Definition: AutoContact.h:235
    Definition: AutoContact.h:58
    +
    DbU::Unit getDy() const
    DbU::Unit getCBYMax() const
    Definition: AutoContact.h:267
    void setCBXMax(DbU::Unit xMax)
    Definition: AutoContact.h:250
    virtual DbU::Unit getX() const=0
    bool isFixed() const
    Definition: AutoContact.h:239
    -
    void setDx(const DbU::Unit &dx)
    virtual const Layer * getLayer() const=0
    @@ -87,25 +88,23 @@ $(function() {
    LocatorHelper(AutoContact *, unsigned int flags=0)
    Definition: AutoContact.h:289
    virtual Box getNativeConstraintBox() const
    Definition: AutoContact.cpp:261
    Definition: AutoContact.h:59
    -
    void setWidth(const DbU::Unit &width)
    -
    void setOffset(const DbU::Unit &dx, const DbU::Unit &dy)
    Point getCenter() const
    Definition: AutoContact.h:216
    void setLayer(const Layer *)
    Definition: AutoContact.h:223
    bool canMoveUp(const AutoSegment *moved) const
    Definition: AutoContact.cpp:413
    -
    void setY(const DbU::Unit &y)
    void setWidth(DbU::Unit)
    Definition: AutoContact.h:224
    void setDx(DbU::Unit)
    Definition: AutoContact.h:231
    DbU::Unit getHalfHeight() const
    +
    void setPosition(DbU::Unit x, DbU::Unit y)
    void setCBYMax(DbU::Unit yMax)
    Definition: AutoContact.h:252
    +
    void setHeight(DbU::Unit)
    bool isInvalidated() const
    Definition: AutoContact.h:236
    virtual void translate(const DbU::Unit &tx, const DbU::Unit &ty)
    Definition: AutoContact.cpp:532
    Routing Global Cell.
    Definition: GCell.h:74
    -
    void setSizes(const DbU::Unit &width, const DbU::Unit &height)
    bool isHTee() const
    Definition: AutoContact.h:242
    Component * getAnchor() const
    Abstract base class for AutoSegment.
    Definition: AutoSegment.h:104
    @@ -114,26 +113,32 @@ $(function() {
    Interval getUConstraints(unsigned int direction) const
    Definition: AutoContact.cpp:283
    DbU::Unit getHeight() const
    Definition: AutoContact.h:220
    void migrateConstraintBox(AutoContact *other)
    Definition: AutoContact.cpp:511
    +
    DbU::Unit getDx() const
    void setY(DbU::Unit)
    Definition: AutoContact.h:228
    +
    void setDx(DbU::Unit)
    void setSizes(DbU::Unit width, DbU::Unit height)
    Definition: AutoContact.h:226
    virtual DbU::Unit getY() const=0
    unsigned int getMaxDepth() const
    Definition: AutoContact.cpp:205
    Box getConstraintBox() const
    Definition: AutoContact.h:248
    virtual AutoSegment * getPerpandicular(const AutoSegment *) const =0
    Definition: AutoContact.cpp:183
    +
    void setWidth(DbU::Unit)
    virtual Box getBoundingBox() const
    Definition: AutoContact.cpp:528
    Definition: AutoContact.h:64
    The namespace dedicated to Katabatic.
    Definition: Katabatic.dox:13
    virtual void updateTopology()=0
    Locator Helper Collection&#39;s Locators.
    Definition: AutoContact.h:273
    -
    const DbU::Unit & getWidth() const
    Hook * getAnchorHook()
    DbU::Unit getY() const
    Definition: AutoContact.h:213
    +
    void setOffset(DbU::Unit dx, DbU::Unit dy)
    Component * getAnchor() const
    Definition: AutoContact.h:209
    +
    DbU::Unit getWidth() const
    const Layer * getLayer() const
    Definition: AutoContact.h:211
    DbU::Unit getDy() const
    Definition: AutoContact.h:215
    DbU::Unit getXMax() const
    Definition: GCell.h:246
    +
    void setDy(DbU::Unit)
    +
    void setY(DbU::Unit)
    bool isTurn() const
    Definition: AutoContact.h:238
    void setHeight(DbU::Unit)
    Definition: AutoContact.h:225
    @@ -141,23 +146,21 @@ $(function() {
    Definition: AutoContact.h:62
    DbU::Unit getHalfHeight() const
    Definition: AutoContact.h:221
    Definition: Constants.h:27
    +
    void setX(DbU::Unit)
    size_t getId() const
    Definition: AutoContact.h:245
    unsigned int getMinDepth() const
    Definition: AutoContact.cpp:187
    bool isVTee() const
    Definition: AutoContact.h:243
    Definition: AutoContact.h:60
    DbU::Unit getYMax() const
    Definition: GCell.h:247
    bool canDestroy(unsigned int flags=0) const
    Definition: AutoContact.cpp:161
    -
    void setDy(const DbU::Unit &dy)
    Definition: AutoContact.h:57
    bool isTee(unsigned int direction) const
    Definition: AutoContact.cpp:406
    -
    const DbU::Unit & getDy() const
    DbU::Unit getX() const
    Definition: AutoContact.h:212
    DbU::Unit getCBYMin() const
    Definition: AutoContact.h:264
    bool hasBadTopology() const
    Definition: AutoContact.h:244
    Box & intersectConstraintBox(Box &box) const
    Definition: AutoContact.cpp:507
    virtual const Name & getName() const
    Definition: AutoContact.cpp:175
    Components getSlaveComponents() const
    Definition: AutoContact.h:222
    -
    const DbU::Unit & getHeight() const
    bool restrictConstraintBox(DbU::Unit constraintMin, DbU::Unit constraintMax, unsigned int flags=KbWarnOnError)
    Definition: AutoContact.cpp:453
    Abstract base class for AutoContact.
    Definition: AutoContact.h:70
    void setCBYMin(DbU::Unit yMin)
    Definition: AutoContact.h:251
    @@ -172,26 +175,23 @@ $(function() {
    Hook * getBodyHook()
    Definition: AutoContact.h:207
    void setCBXMin(DbU::Unit xMin)
    Definition: AutoContact.h:249
    virtual void updateGeometry()=0
    -
    void setLayer(const Layer *layer)
    +
    DbU::Unit getHeight() const
    void setGCell(GCell *)
    Definition: AutoContact.cpp:314
    virtual AutoSegment * getOpposite(const AutoSegment *) const =0
    DbU::Unit getHalfWidth() const
    Definition: AutoContact.h:219
    void setX(DbU::Unit)
    Definition: AutoContact.h:227
    static double toLambda(Unit u)
    -
    const DbU::Unit & getDx() const
    -
    void setPosition(const DbU::Unit &x, const DbU::Unit &y)
    GCell * getGCell() const
    Definition: AutoContact.h:247
    bool isValid() const
    Definition: AutoContact.h:301
    Contact * base() const
    Definition: AutoContact.h:246
    -
    void setHeight(const DbU::Unit &height)


    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/AutoHorizontal_8h_source.html b/katabatic/doc/html/AutoHorizontal_8h_source.html index 9084c931..73b1ad4e 100644 --- a/katabatic/doc/html/AutoHorizontal_8h_source.html +++ b/katabatic/doc/html/AutoHorizontal_8h_source.html @@ -84,7 +84,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/AutoSegment_8h_source.html b/katabatic/doc/html/AutoSegment_8h_source.html index fe7ba4ac..3462df47 100644 --- a/katabatic/doc/html/AutoSegment_8h_source.html +++ b/katabatic/doc/html/AutoSegment_8h_source.html @@ -257,7 +257,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/AutoSegments_8h_source.html b/katabatic/doc/html/AutoSegments_8h_source.html index 8aab7b8c..1468aa7a 100644 --- a/katabatic/doc/html/AutoSegments_8h_source.html +++ b/katabatic/doc/html/AutoSegments_8h_source.html @@ -101,7 +101,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/AutoVertical_8h_source.html b/katabatic/doc/html/AutoVertical_8h_source.html index ea0d98cb..a4cb7f7b 100644 --- a/katabatic/doc/html/AutoVertical_8h_source.html +++ b/katabatic/doc/html/AutoVertical_8h_source.html @@ -84,7 +84,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/ChipTools_8h_source.html b/katabatic/doc/html/ChipTools_8h_source.html index 4f80b359..abf6b3ee 100644 --- a/katabatic/doc/html/ChipTools_8h_source.html +++ b/katabatic/doc/html/ChipTools_8h_source.html @@ -71,7 +71,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/Constants_8h_source.html b/katabatic/doc/html/Constants_8h_source.html index 8ecd4190..422986f8 100644 --- a/katabatic/doc/html/Constants_8h_source.html +++ b/katabatic/doc/html/Constants_8h_source.html @@ -74,7 +74,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/GCellGrid_8h_source.html b/katabatic/doc/html/GCellGrid_8h_source.html index f1672da1..b5acb9c2 100644 --- a/katabatic/doc/html/GCellGrid_8h_source.html +++ b/katabatic/doc/html/GCellGrid_8h_source.html @@ -78,7 +78,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/GCell_8h_source.html b/katabatic/doc/html/GCell_8h_source.html index 4e977b94..9a8c6958 100644 --- a/katabatic/doc/html/GCell_8h_source.html +++ b/katabatic/doc/html/GCell_8h_source.html @@ -144,7 +144,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/GCells_8h_source.html b/katabatic/doc/html/GCells_8h_source.html index 181f3224..65ef5163 100644 --- a/katabatic/doc/html/GCells_8h_source.html +++ b/katabatic/doc/html/GCells_8h_source.html @@ -59,7 +59,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/Grid_8h_source.html b/katabatic/doc/html/Grid_8h_source.html index f69fb46b..5f2d8972 100644 --- a/katabatic/doc/html/Grid_8h_source.html +++ b/katabatic/doc/html/Grid_8h_source.html @@ -77,7 +77,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/KatabaticEngine_8h_source.html b/katabatic/doc/html/KatabaticEngine_8h_source.html index 31eb9ac2..50da42f3 100644 --- a/katabatic/doc/html/KatabaticEngine_8h_source.html +++ b/katabatic/doc/html/KatabaticEngine_8h_source.html @@ -122,7 +122,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/Observer_8h_source.html b/katabatic/doc/html/Observer_8h_source.html index edcd189b..87f64cb7 100644 --- a/katabatic/doc/html/Observer_8h_source.html +++ b/katabatic/doc/html/Observer_8h_source.html @@ -62,7 +62,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/Session_8h_source.html b/katabatic/doc/html/Session_8h_source.html index 7c7ba3ea..5c82738f 100644 --- a/katabatic/doc/html/Session_8h_source.html +++ b/katabatic/doc/html/Session_8h_source.html @@ -100,7 +100,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/annotated.html b/katabatic/doc/html/annotated.html index 3545b1ba..d4d10884 100644 --- a/katabatic/doc/html/annotated.html +++ b/katabatic/doc/html/annotated.html @@ -82,7 +82,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoContact-members.html b/katabatic/doc/html/classKatabatic_1_1AutoContact-members.html index 83d97420..8e624bd9 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoContact-members.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoContact-members.html @@ -126,7 +126,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoContact.html b/katabatic/doc/html/classKatabatic_1_1AutoContact.html index 20dd6066..114d5bad 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoContact.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoContact.html @@ -478,7 +478,7 @@ Notes - Differences from Katabatic 2

    Base class method proxy.

    -

    References Contact::getDx().

    +

    References Contact::getDx().

    @@ -506,7 +506,7 @@ Notes - Differences from Katabatic 2

    Base class method proxy.

    -

    References Contact::getDy().

    +

    References Contact::getDy().

    @@ -588,7 +588,7 @@ Notes - Differences from Katabatic 2

    Base class method proxy.

    -

    References Contact::getWidth().

    +

    References Contact::getWidth().

    @@ -644,7 +644,7 @@ Notes - Differences from Katabatic 2

    Base class method proxy.

    -

    References Contact::getHeight().

    +

    References Contact::getHeight().

    @@ -729,7 +729,7 @@ Notes - Differences from Katabatic 2

    Base class method proxy.

    -

    References Contact::setLayer().

    +

    References Contact::setLayer().

    Referenced by AutoSegment::reduceDoglegLayer(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), AutoContactHTee::updateTopology(), and AutoContactTerminal::updateTopology().

    @@ -760,7 +760,7 @@ Notes - Differences from Katabatic 2

    Base class method proxy.

    -

    References Contact::setWidth().

    +

    References Contact::setWidth().

    @@ -789,7 +789,7 @@ Notes - Differences from Katabatic 2

    Base class method proxy.

    -

    References Contact::setHeight().

    +

    References Contact::setHeight().

    @@ -828,7 +828,7 @@ Notes - Differences from Katabatic 2

    Base class method proxy.

    -

    References Contact::setSizes().

    +

    References Contact::setSizes().

    @@ -857,7 +857,7 @@ Notes - Differences from Katabatic 2

    Base class method proxy.

    -

    References Contact::setX().

    +

    References Contact::setX().

    Referenced by AutoVertical::_postCreate(), AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), AutoContactHTee::updateGeometry(), and AutoContactTerminal::updateGeometry().

    @@ -888,7 +888,7 @@ Notes - Differences from Katabatic 2

    Base class method proxy.

    -

    References Contact::setY().

    +

    References Contact::setY().

    Referenced by AutoHorizontal::_postCreate(), AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), AutoContactHTee::updateGeometry(), and AutoContactTerminal::updateGeometry().

    @@ -929,7 +929,7 @@ Notes - Differences from Katabatic 2

    Base class method proxy.

    -

    References Contact::setPosition().

    +

    References Contact::setPosition().

    @@ -958,7 +958,7 @@ Notes - Differences from Katabatic 2

    Base class method proxy.

    -

    References Contact::setPosition().

    +

    References Contact::setPosition().

    @@ -987,7 +987,7 @@ Notes - Differences from Katabatic 2

    Base class method proxy.

    -

    References Contact::setDx().

    +

    References Contact::setDx().

    @@ -1016,7 +1016,7 @@ Notes - Differences from Katabatic 2

    Base class method proxy.

    -

    References Contact::setDy().

    +

    References Contact::setDy().

    @@ -1055,7 +1055,7 @@ Notes - Differences from Katabatic 2

    Base class method proxy.

    -

    References Contact::setOffset().

    +

    References Contact::setOffset().

    @@ -2433,7 +2433,7 @@ Notes - Differences from Katabatic 2
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoContactHTee-members.html b/katabatic/doc/html/classKatabatic_1_1AutoContactHTee-members.html index aab1584f..d84953c1 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoContactHTee-members.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoContactHTee-members.html @@ -127,7 +127,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoContactHTee.html b/katabatic/doc/html/classKatabatic_1_1AutoContactHTee.html index 16928f8f..16e0ee42 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoContactHTee.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoContactHTee.html @@ -276,7 +276,7 @@ Additional Inherited Members
    Returns
    The created AutoContactHTee.

    Create a new AutoContactHTee.

    -

    References Katabatic::CntInCreationStage, and Contact::create().

    +

    References Katabatic::CntInCreationStage, and Contact::create().

    Referenced by GCellTopology::_do_xG(), GCellTopology::_do_xG_1M1_1M2(), and GCellTopology::_do_xG_xM1_xM3().

    @@ -454,7 +454,7 @@ Update H-Tee Topology
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoContactTerminal-members.html b/katabatic/doc/html/classKatabatic_1_1AutoContactTerminal-members.html index 2f8283e9..f844f7a5 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoContactTerminal-members.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoContactTerminal-members.html @@ -128,7 +128,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoContactTerminal.html b/katabatic/doc/html/classKatabatic_1_1AutoContactTerminal.html index c6d5ae6d..184d3c6f 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoContactTerminal.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoContactTerminal.html @@ -384,7 +384,7 @@ Additional Inherited Members

    Create a new AutoContactTerminal anchored on rp. (x,y) gives the absolute position.

    The anchor component rp is most often a Hurricane::RoutingPad (occurrencing a Hurricane::Segment) or directly a Hurricane::Segment, in case of RoutingPad layer promotion.

    -

    References Katabatic::CntInCreationStage, Contact::create(), Component::getPosition(), and DbU::getValueString().

    +

    References Katabatic::CntInCreationStage, Contact::create(), Component::getPosition(), and DbU::getValueString().

    @@ -594,7 +594,7 @@ Update Terminal Topology
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoContactTurn-members.html b/katabatic/doc/html/classKatabatic_1_1AutoContactTurn-members.html index bcacd688..00f0e701 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoContactTurn-members.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoContactTurn-members.html @@ -127,7 +127,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoContactTurn.html b/katabatic/doc/html/classKatabatic_1_1AutoContactTurn.html index 7eeeb7fb..4e0ee62f 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoContactTurn.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoContactTurn.html @@ -276,7 +276,7 @@ Additional Inherited Members
    Returns
    The created AutoContactTurn.

    Create a new AutoContactTurn.

    -

    References Katabatic::CntInCreationStage, and Contact::create().

    +

    References Katabatic::CntInCreationStage, and Contact::create().

    Referenced by GCellTopology::_do_1G_1M3(), GCellTopology::_do_1G_xM1(), GCellTopology::_do_xG(), GCellTopology::_do_xG_1M1_1M2(), GCellTopology::_do_xG_1Pad(), GCellTopology::_do_xG_xM1_xM3(), GCellTopology::_do_xG_xM3(), AutoHorizontal::_makeDogleg(), AutoVertical::_makeDogleg(), GCellTopology::doRp_Access(), GCellTopology::doRp_StairCaseH(), GCellTopology::doRp_StairCaseV(), and anonymous_namespace{LoadGrByNet.cpp}::singleGCell().

    @@ -456,7 +456,7 @@ Update Turn Topology
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoContactVTee-members.html b/katabatic/doc/html/classKatabatic_1_1AutoContactVTee-members.html index fa11fe1e..87781eab 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoContactVTee-members.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoContactVTee-members.html @@ -127,7 +127,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoContactVTee.html b/katabatic/doc/html/classKatabatic_1_1AutoContactVTee.html index f9b83c93..ee8ae3dc 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoContactVTee.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoContactVTee.html @@ -276,7 +276,7 @@ Additional Inherited Members
    Returns
    The created AutoContactVTee.

    Create a new AutoContactVTee.

    -

    References Katabatic::CntInCreationStage, and Contact::create().

    +

    References Katabatic::CntInCreationStage, and Contact::create().

    Referenced by GCellTopology::_do_xG(), GCellTopology::_do_xG_xM1_xM3(), GCellTopology::_do_xG_xM2(), and GCellTopology::_do_xG_xM3().

    @@ -446,7 +446,7 @@ Additional Inherited Members
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoHorizontal-members.html b/katabatic/doc/html/classKatabatic_1_1AutoHorizontal-members.html index 18181ac5..f22d52d4 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoHorizontal-members.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoHorizontal-members.html @@ -182,7 +182,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoHorizontal.html b/katabatic/doc/html/classKatabatic_1_1AutoHorizontal.html index ea39f0d9..207af76b 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoHorizontal.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoHorizontal.html @@ -1233,7 +1233,7 @@ moveULeft() for an Horizontal
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoSegment-members.html b/katabatic/doc/html/classKatabatic_1_1AutoSegment-members.html index dd4d7bb5..984445c4 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoSegment-members.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoSegment-members.html @@ -182,7 +182,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoSegment.html b/katabatic/doc/html/classKatabatic_1_1AutoSegment.html index e95a6f65..d81f94c0 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoSegment.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoSegment.html @@ -4367,7 +4367,7 @@ Reduce Example
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoSegments__Aligneds-members.html b/katabatic/doc/html/classKatabatic_1_1AutoSegments__Aligneds-members.html index 14de1852..9eac41b5 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoSegments__Aligneds-members.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoSegments__Aligneds-members.html @@ -62,7 +62,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoSegments__Aligneds.html b/katabatic/doc/html/classKatabatic_1_1AutoSegments__Aligneds.html index 30a165ab..dfeb41e7 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoSegments__Aligneds.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoSegments__Aligneds.html @@ -205,7 +205,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoSegments__AnchorOnGCell-members.html b/katabatic/doc/html/classKatabatic_1_1AutoSegments__AnchorOnGCell-members.html index 1945be55..81689a8e 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoSegments__AnchorOnGCell-members.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoSegments__AnchorOnGCell-members.html @@ -62,7 +62,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoSegments__AnchorOnGCell.html b/katabatic/doc/html/classKatabatic_1_1AutoSegments__AnchorOnGCell.html index 96e0a9aa..78b319ec 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoSegments__AnchorOnGCell.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoSegments__AnchorOnGCell.html @@ -209,7 +209,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoSegments__InDirection-members.html b/katabatic/doc/html/classKatabatic_1_1AutoSegments__InDirection-members.html index 4ecb9aeb..97ca7a3f 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoSegments__InDirection-members.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoSegments__InDirection-members.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoSegments__InDirection.html b/katabatic/doc/html/classKatabatic_1_1AutoSegments__InDirection.html index 2728848d..baf8cc57 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoSegments__InDirection.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoSegments__InDirection.html @@ -164,7 +164,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoSegments__IsAccountable-members.html b/katabatic/doc/html/classKatabatic_1_1AutoSegments__IsAccountable-members.html index d41314b1..ade5d557 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoSegments__IsAccountable-members.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoSegments__IsAccountable-members.html @@ -56,7 +56,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoSegments__IsAccountable.html b/katabatic/doc/html/classKatabatic_1_1AutoSegments__IsAccountable.html index 9ab57e17..569648cf 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoSegments__IsAccountable.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoSegments__IsAccountable.html @@ -134,7 +134,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoSegments__OnContact-members.html b/katabatic/doc/html/classKatabatic_1_1AutoSegments__OnContact-members.html index 95659d9e..9113a1ca 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoSegments__OnContact-members.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoSegments__OnContact-members.html @@ -62,7 +62,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoSegments__OnContact.html b/katabatic/doc/html/classKatabatic_1_1AutoSegments__OnContact.html index 57486d40..d8f966fb 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoSegments__OnContact.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoSegments__OnContact.html @@ -215,7 +215,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoSegments__Perpandiculars-members.html b/katabatic/doc/html/classKatabatic_1_1AutoSegments__Perpandiculars-members.html index d7dd68d0..2dcba9fb 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoSegments__Perpandiculars-members.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoSegments__Perpandiculars-members.html @@ -62,7 +62,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoSegments__Perpandiculars.html b/katabatic/doc/html/classKatabatic_1_1AutoSegments__Perpandiculars.html index 2e4def84..bff8a250 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoSegments__Perpandiculars.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoSegments__Perpandiculars.html @@ -195,7 +195,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoVertical-members.html b/katabatic/doc/html/classKatabatic_1_1AutoVertical-members.html index f84c4467..ef6b821f 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoVertical-members.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoVertical-members.html @@ -182,7 +182,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1AutoVertical.html b/katabatic/doc/html/classKatabatic_1_1AutoVertical.html index e6ad2965..847e7c9a 100644 --- a/katabatic/doc/html/classKatabatic_1_1AutoVertical.html +++ b/katabatic/doc/html/classKatabatic_1_1AutoVertical.html @@ -1233,7 +1233,7 @@ moveULeft() for an Horizontal
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1BaseGrid-members.html b/katabatic/doc/html/classKatabatic_1_1BaseGrid-members.html index 05d820e6..fbc82771 100644 --- a/katabatic/doc/html/classKatabatic_1_1BaseGrid-members.html +++ b/katabatic/doc/html/classKatabatic_1_1BaseGrid-members.html @@ -63,7 +63,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1BaseGrid.html b/katabatic/doc/html/classKatabatic_1_1BaseGrid.html index 8d45605d..069cd680 100644 --- a/katabatic/doc/html/classKatabatic_1_1BaseGrid.html +++ b/katabatic/doc/html/classKatabatic_1_1BaseGrid.html @@ -439,7 +439,7 @@ Protected Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1BaseGrid_1_1Axis-members.html b/katabatic/doc/html/classKatabatic_1_1BaseGrid_1_1Axis-members.html index 66883367..ff0f545b 100644 --- a/katabatic/doc/html/classKatabatic_1_1BaseGrid_1_1Axis-members.html +++ b/katabatic/doc/html/classKatabatic_1_1BaseGrid_1_1Axis-members.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1BaseGrid_1_1Axis.html b/katabatic/doc/html/classKatabatic_1_1BaseGrid_1_1Axis.html index 0cc081e4..694c295b 100644 --- a/katabatic/doc/html/classKatabatic_1_1BaseGrid_1_1Axis.html +++ b/katabatic/doc/html/classKatabatic_1_1BaseGrid_1_1Axis.html @@ -212,7 +212,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1BaseObserver-members.html b/katabatic/doc/html/classKatabatic_1_1BaseObserver-members.html index 3dee0c0b..d94d3312 100644 --- a/katabatic/doc/html/classKatabatic_1_1BaseObserver-members.html +++ b/katabatic/doc/html/classKatabatic_1_1BaseObserver-members.html @@ -53,7 +53,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1BaseObserver.html b/katabatic/doc/html/classKatabatic_1_1BaseObserver.html index 7403f4df..a3cac117 100644 --- a/katabatic/doc/html/classKatabatic_1_1BaseObserver.html +++ b/katabatic/doc/html/classKatabatic_1_1BaseObserver.html @@ -107,7 +107,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1ChipTools-members.html b/katabatic/doc/html/classKatabatic_1_1ChipTools-members.html index 13c8f357..0a367b90 100644 --- a/katabatic/doc/html/classKatabatic_1_1ChipTools-members.html +++ b/katabatic/doc/html/classKatabatic_1_1ChipTools-members.html @@ -64,7 +64,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1ChipTools.html b/katabatic/doc/html/classKatabatic_1_1ChipTools.html index dbf858b5..6d29554c 100644 --- a/katabatic/doc/html/classKatabatic_1_1ChipTools.html +++ b/katabatic/doc/html/classKatabatic_1_1ChipTools.html @@ -99,7 +99,7 @@ Public Member Functions @@ -412,7 +412,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1GCell-members.html b/katabatic/doc/html/classKatabatic_1_1GCell-members.html index 576fff0a..5c1e91ca 100644 --- a/katabatic/doc/html/classKatabatic_1_1GCell-members.html +++ b/katabatic/doc/html/classKatabatic_1_1GCell-members.html @@ -113,7 +113,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1GCell.html b/katabatic/doc/html/classKatabatic_1_1GCell.html index 56d8986d..8cdf8cdc 100644 --- a/katabatic/doc/html/classKatabatic_1_1GCell.html +++ b/katabatic/doc/html/classKatabatic_1_1GCell.html @@ -1914,7 +1914,7 @@ GCell Implantation
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1GCellDensitySet-members.html b/katabatic/doc/html/classKatabatic_1_1GCellDensitySet-members.html index 90bae86b..89905109 100644 --- a/katabatic/doc/html/classKatabatic_1_1GCellDensitySet-members.html +++ b/katabatic/doc/html/classKatabatic_1_1GCellDensitySet-members.html @@ -62,7 +62,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1GCellDensitySet.html b/katabatic/doc/html/classKatabatic_1_1GCellDensitySet.html index 6b8bba76..6189e007 100644 --- a/katabatic/doc/html/classKatabatic_1_1GCellDensitySet.html +++ b/katabatic/doc/html/classKatabatic_1_1GCellDensitySet.html @@ -341,7 +341,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1GCellGrid-members.html b/katabatic/doc/html/classKatabatic_1_1GCellGrid-members.html index 72bd2bb0..72d1c6cd 100644 --- a/katabatic/doc/html/classKatabatic_1_1GCellGrid-members.html +++ b/katabatic/doc/html/classKatabatic_1_1GCellGrid-members.html @@ -95,7 +95,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1GCellGrid.html b/katabatic/doc/html/classKatabatic_1_1GCellGrid.html index 85b0b722..cbd6b5cd 100644 --- a/katabatic/doc/html/classKatabatic_1_1GCellGrid.html +++ b/katabatic/doc/html/classKatabatic_1_1GCellGrid.html @@ -550,7 +550,7 @@ Static Protected Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1GCell_1_1CompareByDensity-members.html b/katabatic/doc/html/classKatabatic_1_1GCell_1_1CompareByDensity-members.html index 74893237..ec0be0db 100644 --- a/katabatic/doc/html/classKatabatic_1_1GCell_1_1CompareByDensity-members.html +++ b/katabatic/doc/html/classKatabatic_1_1GCell_1_1CompareByDensity-members.html @@ -53,7 +53,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1GCell_1_1CompareByDensity.html b/katabatic/doc/html/classKatabatic_1_1GCell_1_1CompareByDensity.html index 898785c9..75ca7815 100644 --- a/katabatic/doc/html/classKatabatic_1_1GCell_1_1CompareByDensity.html +++ b/katabatic/doc/html/classKatabatic_1_1GCell_1_1CompareByDensity.html @@ -91,7 +91,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1GCell_1_1CompareByIndex-members.html b/katabatic/doc/html/classKatabatic_1_1GCell_1_1CompareByIndex-members.html index 1fafad25..4d8e6199 100644 --- a/katabatic/doc/html/classKatabatic_1_1GCell_1_1CompareByIndex-members.html +++ b/katabatic/doc/html/classKatabatic_1_1GCell_1_1CompareByIndex-members.html @@ -52,7 +52,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1GCell_1_1CompareByIndex.html b/katabatic/doc/html/classKatabatic_1_1GCell_1_1CompareByIndex.html index a7c2fbcb..35446f2d 100644 --- a/katabatic/doc/html/classKatabatic_1_1GCell_1_1CompareByIndex.html +++ b/katabatic/doc/html/classKatabatic_1_1GCell_1_1CompareByIndex.html @@ -62,7 +62,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1GCell_1_1Key-members.html b/katabatic/doc/html/classKatabatic_1_1GCell_1_1Key-members.html index e2491fb8..ff41be99 100644 --- a/katabatic/doc/html/classKatabatic_1_1GCell_1_1Key-members.html +++ b/katabatic/doc/html/classKatabatic_1_1GCell_1_1Key-members.html @@ -56,7 +56,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1GCell_1_1Key.html b/katabatic/doc/html/classKatabatic_1_1GCell_1_1Key.html index fc132232..ee8a187f 100644 --- a/katabatic/doc/html/classKatabatic_1_1GCell_1_1Key.html +++ b/katabatic/doc/html/classKatabatic_1_1GCell_1_1Key.html @@ -201,7 +201,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1Grid-members.html b/katabatic/doc/html/classKatabatic_1_1Grid-members.html index d11f29a1..6f84b955 100644 --- a/katabatic/doc/html/classKatabatic_1_1Grid-members.html +++ b/katabatic/doc/html/classKatabatic_1_1Grid-members.html @@ -74,7 +74,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1Grid.html b/katabatic/doc/html/classKatabatic_1_1Grid.html index 34c89b38..9598415f 100644 --- a/katabatic/doc/html/classKatabatic_1_1Grid.html +++ b/katabatic/doc/html/classKatabatic_1_1Grid.html @@ -481,7 +481,7 @@ class Katabatic::Grid< GCellT >
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1KatabaticEngine-members.html b/katabatic/doc/html/classKatabatic_1_1KatabaticEngine-members.html index 32b609d8..0e855148 100644 --- a/katabatic/doc/html/classKatabatic_1_1KatabaticEngine-members.html +++ b/katabatic/doc/html/classKatabatic_1_1KatabaticEngine-members.html @@ -109,7 +109,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1KatabaticEngine.html b/katabatic/doc/html/classKatabatic_1_1KatabaticEngine.html index 0f831c22..61b15d5c 100644 --- a/katabatic/doc/html/classKatabatic_1_1KatabaticEngine.html +++ b/katabatic/doc/html/classKatabatic_1_1KatabaticEngine.html @@ -1424,7 +1424,7 @@ KatabaticEngine Implementation Details
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1LocatorHelper-members.html b/katabatic/doc/html/classKatabatic_1_1LocatorHelper-members.html index 33d23b17..9ecb0082 100644 --- a/katabatic/doc/html/classKatabatic_1_1LocatorHelper-members.html +++ b/katabatic/doc/html/classKatabatic_1_1LocatorHelper-members.html @@ -56,7 +56,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1LocatorHelper.html b/katabatic/doc/html/classKatabatic_1_1LocatorHelper.html index 11f5e51d..e37b0f68 100644 --- a/katabatic/doc/html/classKatabatic_1_1LocatorHelper.html +++ b/katabatic/doc/html/classKatabatic_1_1LocatorHelper.html @@ -215,7 +215,7 @@ Implementation Details
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1Observable-members.html b/katabatic/doc/html/classKatabatic_1_1Observable-members.html index d5b9a868..99abd434 100644 --- a/katabatic/doc/html/classKatabatic_1_1Observable-members.html +++ b/katabatic/doc/html/classKatabatic_1_1Observable-members.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1Observable.html b/katabatic/doc/html/classKatabatic_1_1Observable.html index cec77b86..faebda0a 100644 --- a/katabatic/doc/html/classKatabatic_1_1Observable.html +++ b/katabatic/doc/html/classKatabatic_1_1Observable.html @@ -219,7 +219,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1Observer-members.html b/katabatic/doc/html/classKatabatic_1_1Observer-members.html index ce2ee89e..17dfec7e 100644 --- a/katabatic/doc/html/classKatabatic_1_1Observer-members.html +++ b/katabatic/doc/html/classKatabatic_1_1Observer-members.html @@ -55,7 +55,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1Observer.html b/katabatic/doc/html/classKatabatic_1_1Observer.html index 05efaccf..2df5ffb3 100644 --- a/katabatic/doc/html/classKatabatic_1_1Observer.html +++ b/katabatic/doc/html/classKatabatic_1_1Observer.html @@ -142,7 +142,7 @@ Observer Implementation Notes
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1Session-members.html b/katabatic/doc/html/classKatabatic_1_1Session-members.html index 8df13473..535a41bc 100644 --- a/katabatic/doc/html/classKatabatic_1_1Session-members.html +++ b/katabatic/doc/html/classKatabatic_1_1Session-members.html @@ -86,7 +86,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classKatabatic_1_1Session.html b/katabatic/doc/html/classKatabatic_1_1Session.html index 6a65406d..b501622a 100644 --- a/katabatic/doc/html/classKatabatic_1_1Session.html +++ b/katabatic/doc/html/classKatabatic_1_1Session.html @@ -1149,7 +1149,7 @@ Revalidate AutoSegments. Just before this stage, they are on the correct axis an
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classanonymous__namespace_02LoadGrByNet_8cpp_03_1_1GCellTopology-members.html b/katabatic/doc/html/classanonymous__namespace_02LoadGrByNet_8cpp_03_1_1GCellTopology-members.html index e16bc880..bcc5663d 100644 --- a/katabatic/doc/html/classanonymous__namespace_02LoadGrByNet_8cpp_03_1_1GCellTopology-members.html +++ b/katabatic/doc/html/classanonymous__namespace_02LoadGrByNet_8cpp_03_1_1GCellTopology-members.html @@ -66,7 +66,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classanonymous__namespace_02LoadGrByNet_8cpp_03_1_1GCellTopology.html b/katabatic/doc/html/classanonymous__namespace_02LoadGrByNet_8cpp_03_1_1GCellTopology.html index 864916c3..f6663e3f 100644 --- a/katabatic/doc/html/classanonymous__namespace_02LoadGrByNet_8cpp_03_1_1GCellTopology.html +++ b/katabatic/doc/html/classanonymous__namespace_02LoadGrByNet_8cpp_03_1_1GCellTopology.html @@ -97,7 +97,7 @@ Private Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/classes.html b/katabatic/doc/html/classes.html index 8ea794f0..efd588a9 100644 --- a/katabatic/doc/html/classes.html +++ b/katabatic/doc/html/classes.html @@ -82,7 +82,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/dir_46a5d811a0c60e95b7acaa92d73c003a.html b/katabatic/doc/html/dir_46a5d811a0c60e95b7acaa92d73c003a.html index 52d0c56f..4323affa 100644 --- a/katabatic/doc/html/dir_46a5d811a0c60e95b7acaa92d73c003a.html +++ b/katabatic/doc/html/dir_46a5d811a0c60e95b7acaa92d73c003a.html @@ -49,7 +49,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/katabatic/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html index e7a77b02..b027adea 100644 --- a/katabatic/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ b/katabatic/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -53,7 +53,7 @@ Directories
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/files.html b/katabatic/doc/html/files.html index b5c98025..5b112bb9 100644 --- a/katabatic/doc/html/files.html +++ b/katabatic/doc/html/files.html @@ -67,7 +67,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions.html b/katabatic/doc/html/functions.html index 5daf0a95..34a77f28 100644 --- a/katabatic/doc/html/functions.html +++ b/katabatic/doc/html/functions.html @@ -106,7 +106,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_0x7e.html b/katabatic/doc/html/functions_0x7e.html index 85ca2f2e..d39eddf1 100644 --- a/katabatic/doc/html/functions_0x7e.html +++ b/katabatic/doc/html/functions_0x7e.html @@ -51,7 +51,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_a.html b/katabatic/doc/html/functions_a.html index 2b8d8bfc..e60aa075 100644 --- a/katabatic/doc/html/functions_a.html +++ b/katabatic/doc/html/functions_a.html @@ -94,7 +94,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_b.html b/katabatic/doc/html/functions_b.html index d36d6d69..b246e97f 100644 --- a/katabatic/doc/html/functions_b.html +++ b/katabatic/doc/html/functions_b.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_c.html b/katabatic/doc/html/functions_c.html index 9362a8d3..af851329 100644 --- a/katabatic/doc/html/functions_c.html +++ b/katabatic/doc/html/functions_c.html @@ -130,7 +130,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_d.html b/katabatic/doc/html/functions_d.html index f18b49f0..95c7f28d 100644 --- a/katabatic/doc/html/functions_d.html +++ b/katabatic/doc/html/functions_d.html @@ -84,7 +84,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_e.html b/katabatic/doc/html/functions_e.html index c8852062..4e7164be 100644 --- a/katabatic/doc/html/functions_e.html +++ b/katabatic/doc/html/functions_e.html @@ -51,7 +51,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_enum.html b/katabatic/doc/html/functions_enum.html index 67245951..b2b3ef64 100644 --- a/katabatic/doc/html/functions_enum.html +++ b/katabatic/doc/html/functions_enum.html @@ -46,7 +46,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_eval.html b/katabatic/doc/html/functions_eval.html index 5b7d2b08..e0fc75ce 100644 --- a/katabatic/doc/html/functions_eval.html +++ b/katabatic/doc/html/functions_eval.html @@ -64,7 +64,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_f.html b/katabatic/doc/html/functions_f.html index 7c9cd929..9f33f0a1 100644 --- a/katabatic/doc/html/functions_f.html +++ b/katabatic/doc/html/functions_f.html @@ -48,7 +48,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func.html b/katabatic/doc/html/functions_func.html index c7e594da..69ce2ecd 100644 --- a/katabatic/doc/html/functions_func.html +++ b/katabatic/doc/html/functions_func.html @@ -106,7 +106,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func_0x7e.html b/katabatic/doc/html/functions_func_0x7e.html index 22361656..f19c2d5c 100644 --- a/katabatic/doc/html/functions_func_0x7e.html +++ b/katabatic/doc/html/functions_func_0x7e.html @@ -51,7 +51,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func_a.html b/katabatic/doc/html/functions_func_a.html index dbe1dcef..d0dabdc2 100644 --- a/katabatic/doc/html/functions_func_a.html +++ b/katabatic/doc/html/functions_func_a.html @@ -85,7 +85,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func_b.html b/katabatic/doc/html/functions_func_b.html index e52d87d0..464215ed 100644 --- a/katabatic/doc/html/functions_func_b.html +++ b/katabatic/doc/html/functions_func_b.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func_c.html b/katabatic/doc/html/functions_func_c.html index e4637313..56df3a57 100644 --- a/katabatic/doc/html/functions_func_c.html +++ b/katabatic/doc/html/functions_func_c.html @@ -130,7 +130,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func_d.html b/katabatic/doc/html/functions_func_d.html index 6e4dde86..13d1cd57 100644 --- a/katabatic/doc/html/functions_func_d.html +++ b/katabatic/doc/html/functions_func_d.html @@ -81,7 +81,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func_e.html b/katabatic/doc/html/functions_func_e.html index 757391ef..7a5d2533 100644 --- a/katabatic/doc/html/functions_func_e.html +++ b/katabatic/doc/html/functions_func_e.html @@ -51,7 +51,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func_f.html b/katabatic/doc/html/functions_func_f.html index e0f767c9..cc447d98 100644 --- a/katabatic/doc/html/functions_func_f.html +++ b/katabatic/doc/html/functions_func_f.html @@ -48,7 +48,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func_g.html b/katabatic/doc/html/functions_func_g.html index 267577d0..e1a4be12 100644 --- a/katabatic/doc/html/functions_func_g.html +++ b/katabatic/doc/html/functions_func_g.html @@ -622,7 +622,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func_h.html b/katabatic/doc/html/functions_func_h.html index e9e20187..cb4bb033 100644 --- a/katabatic/doc/html/functions_func_h.html +++ b/katabatic/doc/html/functions_func_h.html @@ -51,7 +51,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func_i.html b/katabatic/doc/html/functions_func_i.html index 98c34290..764df136 100644 --- a/katabatic/doc/html/functions_func_i.html +++ b/katabatic/doc/html/functions_func_i.html @@ -169,7 +169,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func_k.html b/katabatic/doc/html/functions_func_k.html index 897d8a00..50b7bc00 100644 --- a/katabatic/doc/html/functions_func_k.html +++ b/katabatic/doc/html/functions_func_k.html @@ -48,7 +48,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func_l.html b/katabatic/doc/html/functions_func_l.html index fa5bda37..bcd3e6d2 100644 --- a/katabatic/doc/html/functions_func_l.html +++ b/katabatic/doc/html/functions_func_l.html @@ -60,7 +60,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func_m.html b/katabatic/doc/html/functions_func_m.html index 22c5a9c5..0a7df38b 100644 --- a/katabatic/doc/html/functions_func_m.html +++ b/katabatic/doc/html/functions_func_m.html @@ -73,7 +73,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func_n.html b/katabatic/doc/html/functions_func_n.html index 74ba7840..9b5173f4 100644 --- a/katabatic/doc/html/functions_func_n.html +++ b/katabatic/doc/html/functions_func_n.html @@ -49,7 +49,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func_o.html b/katabatic/doc/html/functions_func_o.html index 3b72b751..431d533d 100644 --- a/katabatic/doc/html/functions_func_o.html +++ b/katabatic/doc/html/functions_func_o.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func_p.html b/katabatic/doc/html/functions_func_p.html index a1df0d71..24121784 100644 --- a/katabatic/doc/html/functions_func_p.html +++ b/katabatic/doc/html/functions_func_p.html @@ -51,7 +51,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func_r.html b/katabatic/doc/html/functions_func_r.html index a8a1e809..5304f0f6 100644 --- a/katabatic/doc/html/functions_func_r.html +++ b/katabatic/doc/html/functions_func_r.html @@ -88,7 +88,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func_s.html b/katabatic/doc/html/functions_func_s.html index c7c88d9b..5c632624 100644 --- a/katabatic/doc/html/functions_func_s.html +++ b/katabatic/doc/html/functions_func_s.html @@ -165,7 +165,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func_t.html b/katabatic/doc/html/functions_func_t.html index 531a5581..7362ee44 100644 --- a/katabatic/doc/html/functions_func_t.html +++ b/katabatic/doc/html/functions_func_t.html @@ -58,7 +58,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func_u.html b/katabatic/doc/html/functions_func_u.html index e9c3da9f..6befeba6 100644 --- a/katabatic/doc/html/functions_func_u.html +++ b/katabatic/doc/html/functions_func_u.html @@ -93,7 +93,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_func_x.html b/katabatic/doc/html/functions_func_x.html index 4478bfb4..438acbe2 100644 --- a/katabatic/doc/html/functions_func_x.html +++ b/katabatic/doc/html/functions_func_x.html @@ -48,7 +48,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_g.html b/katabatic/doc/html/functions_g.html index d91761ce..750a72cc 100644 --- a/katabatic/doc/html/functions_g.html +++ b/katabatic/doc/html/functions_g.html @@ -622,7 +622,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_h.html b/katabatic/doc/html/functions_h.html index 8bdc48d1..1cb6a36c 100644 --- a/katabatic/doc/html/functions_h.html +++ b/katabatic/doc/html/functions_h.html @@ -51,7 +51,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_i.html b/katabatic/doc/html/functions_i.html index 2906f707..3bb7d332 100644 --- a/katabatic/doc/html/functions_i.html +++ b/katabatic/doc/html/functions_i.html @@ -169,7 +169,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_k.html b/katabatic/doc/html/functions_k.html index 279c808c..125684a2 100644 --- a/katabatic/doc/html/functions_k.html +++ b/katabatic/doc/html/functions_k.html @@ -48,7 +48,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_l.html b/katabatic/doc/html/functions_l.html index 9abe4fe9..2334bac4 100644 --- a/katabatic/doc/html/functions_l.html +++ b/katabatic/doc/html/functions_l.html @@ -60,7 +60,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_m.html b/katabatic/doc/html/functions_m.html index 6b548a7f..4cb5fe2a 100644 --- a/katabatic/doc/html/functions_m.html +++ b/katabatic/doc/html/functions_m.html @@ -85,7 +85,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_n.html b/katabatic/doc/html/functions_n.html index 3ce4b1c2..5d4a97bf 100644 --- a/katabatic/doc/html/functions_n.html +++ b/katabatic/doc/html/functions_n.html @@ -52,7 +52,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_o.html b/katabatic/doc/html/functions_o.html index 32aecb47..f56f883a 100644 --- a/katabatic/doc/html/functions_o.html +++ b/katabatic/doc/html/functions_o.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_p.html b/katabatic/doc/html/functions_p.html index 9a962b74..9ccc3a4a 100644 --- a/katabatic/doc/html/functions_p.html +++ b/katabatic/doc/html/functions_p.html @@ -51,7 +51,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_r.html b/katabatic/doc/html/functions_r.html index 8f44637d..b87583e7 100644 --- a/katabatic/doc/html/functions_r.html +++ b/katabatic/doc/html/functions_r.html @@ -88,7 +88,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_s.html b/katabatic/doc/html/functions_s.html index df214f0b..6f5316a4 100644 --- a/katabatic/doc/html/functions_s.html +++ b/katabatic/doc/html/functions_s.html @@ -168,7 +168,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_t.html b/katabatic/doc/html/functions_t.html index cc704f04..f8237e51 100644 --- a/katabatic/doc/html/functions_t.html +++ b/katabatic/doc/html/functions_t.html @@ -58,7 +58,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_type.html b/katabatic/doc/html/functions_type.html index 93b7d66c..3dfc0921 100644 --- a/katabatic/doc/html/functions_type.html +++ b/katabatic/doc/html/functions_type.html @@ -49,7 +49,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_u.html b/katabatic/doc/html/functions_u.html index b8985929..57092675 100644 --- a/katabatic/doc/html/functions_u.html +++ b/katabatic/doc/html/functions_u.html @@ -93,7 +93,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/functions_x.html b/katabatic/doc/html/functions_x.html index c9e948fa..6f820400 100644 --- a/katabatic/doc/html/functions_x.html +++ b/katabatic/doc/html/functions_x.html @@ -48,7 +48,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/graph_legend.html b/katabatic/doc/html/graph_legend.html index ab7e663e..4c713a67 100644 --- a/katabatic/doc/html/graph_legend.html +++ b/katabatic/doc/html/graph_legend.html @@ -74,7 +74,7 @@ A yellow dashed arrow denotes a relation between a template instance and the tem
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/group__LoadGlobalRouting.html b/katabatic/doc/html/group__LoadGlobalRouting.html index dfa9f750..23658a77 100644 --- a/katabatic/doc/html/group__LoadGlobalRouting.html +++ b/katabatic/doc/html/group__LoadGlobalRouting.html @@ -377,7 +377,7 @@ doRp_Access()

    The GCell into which the AutoContactTerminal is created may be under the pads area. However, it will be right on the border of the GCell. The global router vertexes of GCell under the pad area are marked as blocked so will never be used for routing.

    Remark: The segments and contacts added to ensure the layer connexity are not
    put into the Katabatic database. They are plain Hurricane objects, invisibles from it.
    -

    References Contact::create(), Horizontal::create(), Vertical::create(), AutoContactTerminal::create(), Hook::detach(), Component::getBodyHook(), RoutingPad::getBoundingBox(), RoutingPad::getCenter(), Session::getContactLayer(), Grid< GCellT >::getGCell(), KatabaticEngine::getGCellGrid(), Box::getHeight(), Session::getKatabatic(), RoutingPad::getLayer(), Component::getNet(), RoutingPad::getOccurrence(), Transformation::getOrientation(), Occurrence::getPath(), Session::getRoutingLayer(), Path::getTransformation(), Box::getWidth(), Box::getXMax(), Box::getXMin(), Box::getYMax(), Box::getYMin(), anonymous_namespace{LoadGrByNet.cpp}::HAccess, Katabatic::KbHorizontal, Point::setX(), and Point::setY().

    +

    References Contact::create(), Horizontal::create(), Vertical::create(), AutoContactTerminal::create(), Hook::detach(), Component::getBodyHook(), RoutingPad::getBoundingBox(), RoutingPad::getCenter(), Session::getContactLayer(), Grid< GCellT >::getGCell(), KatabaticEngine::getGCellGrid(), Box::getHeight(), Session::getKatabatic(), RoutingPad::getLayer(), Component::getNet(), RoutingPad::getOccurrence(), Transformation::getOrientation(), Occurrence::getPath(), Session::getRoutingLayer(), Path::getTransformation(), Box::getWidth(), Box::getXMax(), Box::getXMin(), Box::getYMax(), Box::getYMin(), anonymous_namespace{LoadGrByNet.cpp}::HAccess, Katabatic::KbHorizontal, Point::setX(), and Point::setY().

    Referenced by GCellTopology::_do_xG_1Pad().

    @@ -866,7 +866,7 @@ _do_xG_xM3()
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/group__grpSynthHierarchy.html b/katabatic/doc/html/group__grpSynthHierarchy.html index a13f8a92..ec87c741 100644 --- a/katabatic/doc/html/group__grpSynthHierarchy.html +++ b/katabatic/doc/html/group__grpSynthHierarchy.html @@ -114,7 +114,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/hierarchy.html b/katabatic/doc/html/hierarchy.html index edceb7aa..e664f19f 100644 --- a/katabatic/doc/html/hierarchy.html +++ b/katabatic/doc/html/hierarchy.html @@ -85,7 +85,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/index.html b/katabatic/doc/html/index.html index 8d8a1164..81df0ec2 100644 --- a/katabatic/doc/html/index.html +++ b/katabatic/doc/html/index.html @@ -48,7 +48,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/modules.html b/katabatic/doc/html/modules.html index b2f0b678..b5d30d25 100644 --- a/katabatic/doc/html/modules.html +++ b/katabatic/doc/html/modules.html @@ -55,7 +55,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/namespaceKatabatic.html b/katabatic/doc/html/namespaceKatabatic.html index b33ebde9..06d2cd06 100644 --- a/katabatic/doc/html/namespaceKatabatic.html +++ b/katabatic/doc/html/namespaceKatabatic.html @@ -615,7 +615,7 @@ Enumerations
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/namespaceanonymous__namespace_02AutoSegment_8cpp_03.html b/katabatic/doc/html/namespaceanonymous__namespace_02AutoSegment_8cpp_03.html index b9d721c0..96c1831e 100644 --- a/katabatic/doc/html/namespaceanonymous__namespace_02AutoSegment_8cpp_03.html +++ b/katabatic/doc/html/namespaceanonymous__namespace_02AutoSegment_8cpp_03.html @@ -45,7 +45,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/namespaceanonymous__namespace_02ChipTools_8cpp_03.html b/katabatic/doc/html/namespaceanonymous__namespace_02ChipTools_8cpp_03.html index 5485653f..36561442 100644 --- a/katabatic/doc/html/namespaceanonymous__namespace_02ChipTools_8cpp_03.html +++ b/katabatic/doc/html/namespaceanonymous__namespace_02ChipTools_8cpp_03.html @@ -45,7 +45,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/namespaceanonymous__namespace_02GCell_8cpp_03.html b/katabatic/doc/html/namespaceanonymous__namespace_02GCell_8cpp_03.html index f5c569ec..4c233389 100644 --- a/katabatic/doc/html/namespaceanonymous__namespace_02GCell_8cpp_03.html +++ b/katabatic/doc/html/namespaceanonymous__namespace_02GCell_8cpp_03.html @@ -45,7 +45,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/namespaceanonymous__namespace_02KatabaticEngine_8cpp_03.html b/katabatic/doc/html/namespaceanonymous__namespace_02KatabaticEngine_8cpp_03.html index b7832bdf..a068970f 100644 --- a/katabatic/doc/html/namespaceanonymous__namespace_02KatabaticEngine_8cpp_03.html +++ b/katabatic/doc/html/namespaceanonymous__namespace_02KatabaticEngine_8cpp_03.html @@ -45,7 +45,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/namespaceanonymous__namespace_02LoadGrByNet_8cpp_03.html b/katabatic/doc/html/namespaceanonymous__namespace_02LoadGrByNet_8cpp_03.html index acc36a55..3750d3e0 100644 --- a/katabatic/doc/html/namespaceanonymous__namespace_02LoadGrByNet_8cpp_03.html +++ b/katabatic/doc/html/namespaceanonymous__namespace_02LoadGrByNet_8cpp_03.html @@ -83,7 +83,7 @@ Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/namespaceanonymous__namespace_02Session_8cpp_03.html b/katabatic/doc/html/namespaceanonymous__namespace_02Session_8cpp_03.html index d3f5783b..855e9245 100644 --- a/katabatic/doc/html/namespaceanonymous__namespace_02Session_8cpp_03.html +++ b/katabatic/doc/html/namespaceanonymous__namespace_02Session_8cpp_03.html @@ -45,7 +45,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/namespacemembers.html b/katabatic/doc/html/namespacemembers.html index 7cfbfcf7..de7c4e91 100644 --- a/katabatic/doc/html/namespacemembers.html +++ b/katabatic/doc/html/namespacemembers.html @@ -333,7 +333,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/namespacemembers_enum.html b/katabatic/doc/html/namespacemembers_enum.html index 2215ef41..42d2a368 100644 --- a/katabatic/doc/html/namespacemembers_enum.html +++ b/katabatic/doc/html/namespacemembers_enum.html @@ -58,7 +58,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/namespacemembers_eval.html b/katabatic/doc/html/namespacemembers_eval.html index 9495651d..de305467 100644 --- a/katabatic/doc/html/namespacemembers_eval.html +++ b/katabatic/doc/html/namespacemembers_eval.html @@ -269,7 +269,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/namespacemembers_func.html b/katabatic/doc/html/namespacemembers_func.html index 0dcdc8d3..ba866686 100644 --- a/katabatic/doc/html/namespacemembers_func.html +++ b/katabatic/doc/html/namespacemembers_func.html @@ -49,7 +49,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/namespacemembers_type.html b/katabatic/doc/html/namespacemembers_type.html index e234c458..1a1f230c 100644 --- a/katabatic/doc/html/namespacemembers_type.html +++ b/katabatic/doc/html/namespacemembers_type.html @@ -70,7 +70,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/html/namespaces.html b/katabatic/doc/html/namespaces.html index 6e179cf7..2bc8c183 100644 --- a/katabatic/doc/html/namespaces.html +++ b/katabatic/doc/html/namespaces.html @@ -56,7 +56,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/katabatic/doc/latex/refman.tex b/katabatic/doc/latex/refman.tex index 7541edda..c3336a7f 100644 --- a/katabatic/doc/latex/refman.tex +++ b/katabatic/doc/latex/refman.tex @@ -34,7 +34,7 @@ \vspace*{1cm} {\large Generated by Doxygen 1.8.14}\\ \vspace*{0.5cm} - {\small Thu Nov 12 2020 13:59:30}\\ + {\small Fri Oct 1 2021 19:23:14}\\ \end{center} \end{titlepage} diff --git a/katabatic/doc/man/man3/Katabatic.3 b/katabatic/doc/man/man3/Katabatic.3 index e515a96f..e8bca3eb 100644 --- a/katabatic/doc/man/man3/Katabatic.3 +++ b/katabatic/doc/man/man3/Katabatic.3 @@ -1,4 +1,4 @@ -.TH "Katabatic" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "Katabatic" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_AutoContact.3 b/katabatic/doc/man/man3/Katabatic_AutoContact.3 index 44de623e..7ef2cabe 100644 --- a/katabatic/doc/man/man3/Katabatic_AutoContact.3 +++ b/katabatic/doc/man/man3/Katabatic_AutoContact.3 @@ -1,4 +1,4 @@ -.TH "AutoContact" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "AutoContact" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_AutoContactHTee.3 b/katabatic/doc/man/man3/Katabatic_AutoContactHTee.3 index dc774fad..69e4dfca 100644 --- a/katabatic/doc/man/man3/Katabatic_AutoContactHTee.3 +++ b/katabatic/doc/man/man3/Katabatic_AutoContactHTee.3 @@ -1,4 +1,4 @@ -.TH "AutoContactHTee" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "AutoContactHTee" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_AutoContactTerminal.3 b/katabatic/doc/man/man3/Katabatic_AutoContactTerminal.3 index c012830a..a0d357f5 100644 --- a/katabatic/doc/man/man3/Katabatic_AutoContactTerminal.3 +++ b/katabatic/doc/man/man3/Katabatic_AutoContactTerminal.3 @@ -1,4 +1,4 @@ -.TH "AutoContactTerminal" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "AutoContactTerminal" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_AutoContactTurn.3 b/katabatic/doc/man/man3/Katabatic_AutoContactTurn.3 index 589f2873..b7be61f0 100644 --- a/katabatic/doc/man/man3/Katabatic_AutoContactTurn.3 +++ b/katabatic/doc/man/man3/Katabatic_AutoContactTurn.3 @@ -1,4 +1,4 @@ -.TH "AutoContactTurn" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "AutoContactTurn" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_AutoContactVTee.3 b/katabatic/doc/man/man3/Katabatic_AutoContactVTee.3 index 3095f32b..6ce0361a 100644 --- a/katabatic/doc/man/man3/Katabatic_AutoContactVTee.3 +++ b/katabatic/doc/man/man3/Katabatic_AutoContactVTee.3 @@ -1,4 +1,4 @@ -.TH "AutoContactVTee" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "AutoContactVTee" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_AutoHorizontal.3 b/katabatic/doc/man/man3/Katabatic_AutoHorizontal.3 index d8414070..34deff0c 100644 --- a/katabatic/doc/man/man3/Katabatic_AutoHorizontal.3 +++ b/katabatic/doc/man/man3/Katabatic_AutoHorizontal.3 @@ -1,4 +1,4 @@ -.TH "AutoHorizontal" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "AutoHorizontal" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_AutoSegment.3 b/katabatic/doc/man/man3/Katabatic_AutoSegment.3 index b87def1b..0b053af7 100644 --- a/katabatic/doc/man/man3/Katabatic_AutoSegment.3 +++ b/katabatic/doc/man/man3/Katabatic_AutoSegment.3 @@ -1,4 +1,4 @@ -.TH "AutoSegment" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "AutoSegment" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_AutoSegments_Aligneds.3 b/katabatic/doc/man/man3/Katabatic_AutoSegments_Aligneds.3 index de93d17a..e0edc88c 100644 --- a/katabatic/doc/man/man3/Katabatic_AutoSegments_Aligneds.3 +++ b/katabatic/doc/man/man3/Katabatic_AutoSegments_Aligneds.3 @@ -1,4 +1,4 @@ -.TH "AutoSegments_Aligneds" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "AutoSegments_Aligneds" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_AutoSegments_AnchorOnGCell.3 b/katabatic/doc/man/man3/Katabatic_AutoSegments_AnchorOnGCell.3 index 4cea2dc6..b4ddc4cf 100644 --- a/katabatic/doc/man/man3/Katabatic_AutoSegments_AnchorOnGCell.3 +++ b/katabatic/doc/man/man3/Katabatic_AutoSegments_AnchorOnGCell.3 @@ -1,4 +1,4 @@ -.TH "AutoSegments_AnchorOnGCell" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "AutoSegments_AnchorOnGCell" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_AutoSegments_InDirection.3 b/katabatic/doc/man/man3/Katabatic_AutoSegments_InDirection.3 index 3ff3cea6..ab8f39db 100644 --- a/katabatic/doc/man/man3/Katabatic_AutoSegments_InDirection.3 +++ b/katabatic/doc/man/man3/Katabatic_AutoSegments_InDirection.3 @@ -1,4 +1,4 @@ -.TH "AutoSegments_InDirection" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "AutoSegments_InDirection" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_AutoSegments_IsAccountable.3 b/katabatic/doc/man/man3/Katabatic_AutoSegments_IsAccountable.3 index 0c435145..a32ebea8 100644 --- a/katabatic/doc/man/man3/Katabatic_AutoSegments_IsAccountable.3 +++ b/katabatic/doc/man/man3/Katabatic_AutoSegments_IsAccountable.3 @@ -1,4 +1,4 @@ -.TH "AutoSegments_IsAccountable" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "AutoSegments_IsAccountable" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_AutoSegments_OnContact.3 b/katabatic/doc/man/man3/Katabatic_AutoSegments_OnContact.3 index de8430c3..e6c799b1 100644 --- a/katabatic/doc/man/man3/Katabatic_AutoSegments_OnContact.3 +++ b/katabatic/doc/man/man3/Katabatic_AutoSegments_OnContact.3 @@ -1,4 +1,4 @@ -.TH "AutoSegments_OnContact" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "AutoSegments_OnContact" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_AutoSegments_Perpandiculars.3 b/katabatic/doc/man/man3/Katabatic_AutoSegments_Perpandiculars.3 index 08989cdd..d9040d1c 100644 --- a/katabatic/doc/man/man3/Katabatic_AutoSegments_Perpandiculars.3 +++ b/katabatic/doc/man/man3/Katabatic_AutoSegments_Perpandiculars.3 @@ -1,4 +1,4 @@ -.TH "AutoSegments_Perpandiculars" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "AutoSegments_Perpandiculars" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_AutoVertical.3 b/katabatic/doc/man/man3/Katabatic_AutoVertical.3 index 90da3588..faaf1af1 100644 --- a/katabatic/doc/man/man3/Katabatic_AutoVertical.3 +++ b/katabatic/doc/man/man3/Katabatic_AutoVertical.3 @@ -1,4 +1,4 @@ -.TH "AutoVertical" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "AutoVertical" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_BaseGrid.3 b/katabatic/doc/man/man3/Katabatic_BaseGrid.3 index 8111db07..d19aeb78 100644 --- a/katabatic/doc/man/man3/Katabatic_BaseGrid.3 +++ b/katabatic/doc/man/man3/Katabatic_BaseGrid.3 @@ -1,4 +1,4 @@ -.TH "BaseGrid" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "BaseGrid" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_BaseGrid_Axis.3 b/katabatic/doc/man/man3/Katabatic_BaseGrid_Axis.3 index d55bcd71..84927402 100644 --- a/katabatic/doc/man/man3/Katabatic_BaseGrid_Axis.3 +++ b/katabatic/doc/man/man3/Katabatic_BaseGrid_Axis.3 @@ -1,4 +1,4 @@ -.TH "BaseGrid::Axis" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "BaseGrid::Axis" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_BaseObserver.3 b/katabatic/doc/man/man3/Katabatic_BaseObserver.3 index 5ce0b117..2cffea06 100644 --- a/katabatic/doc/man/man3/Katabatic_BaseObserver.3 +++ b/katabatic/doc/man/man3/Katabatic_BaseObserver.3 @@ -1,4 +1,4 @@ -.TH "BaseObserver" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "BaseObserver" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_ChipTools.3 b/katabatic/doc/man/man3/Katabatic_ChipTools.3 index f423013d..ce1646f9 100644 --- a/katabatic/doc/man/man3/Katabatic_ChipTools.3 +++ b/katabatic/doc/man/man3/Katabatic_ChipTools.3 @@ -1,4 +1,4 @@ -.TH "ChipTools" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "ChipTools" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_GCell.3 b/katabatic/doc/man/man3/Katabatic_GCell.3 index 87edadd1..a6a6b272 100644 --- a/katabatic/doc/man/man3/Katabatic_GCell.3 +++ b/katabatic/doc/man/man3/Katabatic_GCell.3 @@ -1,4 +1,4 @@ -.TH "GCell" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "GCell" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_GCellDensitySet.3 b/katabatic/doc/man/man3/Katabatic_GCellDensitySet.3 index 9c5a2b26..b2c98268 100644 --- a/katabatic/doc/man/man3/Katabatic_GCellDensitySet.3 +++ b/katabatic/doc/man/man3/Katabatic_GCellDensitySet.3 @@ -1,4 +1,4 @@ -.TH "GCellDensitySet" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "GCellDensitySet" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_GCellGrid.3 b/katabatic/doc/man/man3/Katabatic_GCellGrid.3 index 99bb2818..3f76a314 100644 --- a/katabatic/doc/man/man3/Katabatic_GCellGrid.3 +++ b/katabatic/doc/man/man3/Katabatic_GCellGrid.3 @@ -1,4 +1,4 @@ -.TH "GCellGrid" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "GCellGrid" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_GCell_CompareByDensity.3 b/katabatic/doc/man/man3/Katabatic_GCell_CompareByDensity.3 index 786ec134..49fe2f37 100644 --- a/katabatic/doc/man/man3/Katabatic_GCell_CompareByDensity.3 +++ b/katabatic/doc/man/man3/Katabatic_GCell_CompareByDensity.3 @@ -1,4 +1,4 @@ -.TH "GCell::CompareByDensity" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "GCell::CompareByDensity" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_GCell_CompareByIndex.3 b/katabatic/doc/man/man3/Katabatic_GCell_CompareByIndex.3 index 19047d43..8ce56112 100644 --- a/katabatic/doc/man/man3/Katabatic_GCell_CompareByIndex.3 +++ b/katabatic/doc/man/man3/Katabatic_GCell_CompareByIndex.3 @@ -1,4 +1,4 @@ -.TH "GCell::CompareByIndex" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "GCell::CompareByIndex" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_GCell_Key.3 b/katabatic/doc/man/man3/Katabatic_GCell_Key.3 index 37f06b4f..e5597599 100644 --- a/katabatic/doc/man/man3/Katabatic_GCell_Key.3 +++ b/katabatic/doc/man/man3/Katabatic_GCell_Key.3 @@ -1,4 +1,4 @@ -.TH "GCell::Key" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "GCell::Key" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_Grid.3 b/katabatic/doc/man/man3/Katabatic_Grid.3 index 7336241e..23350c3a 100644 --- a/katabatic/doc/man/man3/Katabatic_Grid.3 +++ b/katabatic/doc/man/man3/Katabatic_Grid.3 @@ -1,4 +1,4 @@ -.TH "Grid< GCellT >" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "Grid< GCellT >" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_KatabaticEngine.3 b/katabatic/doc/man/man3/Katabatic_KatabaticEngine.3 index 4e3b36d2..e9463e8a 100644 --- a/katabatic/doc/man/man3/Katabatic_KatabaticEngine.3 +++ b/katabatic/doc/man/man3/Katabatic_KatabaticEngine.3 @@ -1,4 +1,4 @@ -.TH "KatabaticEngine" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "KatabaticEngine" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_LocatorHelper.3 b/katabatic/doc/man/man3/Katabatic_LocatorHelper.3 index 5f0ca14e..bb12c8f1 100644 --- a/katabatic/doc/man/man3/Katabatic_LocatorHelper.3 +++ b/katabatic/doc/man/man3/Katabatic_LocatorHelper.3 @@ -1,4 +1,4 @@ -.TH "LocatorHelper" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "LocatorHelper" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_Observable.3 b/katabatic/doc/man/man3/Katabatic_Observable.3 index bf3392a9..4e4dd9a1 100644 --- a/katabatic/doc/man/man3/Katabatic_Observable.3 +++ b/katabatic/doc/man/man3/Katabatic_Observable.3 @@ -1,4 +1,4 @@ -.TH "Observable" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "Observable" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_Observer.3 b/katabatic/doc/man/man3/Katabatic_Observer.3 index 73df72bb..9f5c6aea 100644 --- a/katabatic/doc/man/man3/Katabatic_Observer.3 +++ b/katabatic/doc/man/man3/Katabatic_Observer.3 @@ -1,4 +1,4 @@ -.TH "Observer< T >" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "Observer< T >" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/Katabatic_Session.3 b/katabatic/doc/man/man3/Katabatic_Session.3 index d85bea44..428d0594 100644 --- a/katabatic/doc/man/man3/Katabatic_Session.3 +++ b/katabatic/doc/man/man3/Katabatic_Session.3 @@ -1,4 +1,4 @@ -.TH "Session" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "Session" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/LoadGlobalRouting.3 b/katabatic/doc/man/man3/LoadGlobalRouting.3 index 9eb50bd4..d7d23f90 100644 --- a/katabatic/doc/man/man3/LoadGlobalRouting.3 +++ b/katabatic/doc/man/man3/LoadGlobalRouting.3 @@ -1,4 +1,4 @@ -.TH "LoadGlobalRouting" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "LoadGlobalRouting" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/anonymous_namespace{AutoSegment.cpp}.3 b/katabatic/doc/man/man3/anonymous_namespace{AutoSegment.cpp}.3 index 80d20138..ff9ab083 100644 --- a/katabatic/doc/man/man3/anonymous_namespace{AutoSegment.cpp}.3 +++ b/katabatic/doc/man/man3/anonymous_namespace{AutoSegment.cpp}.3 @@ -1,4 +1,4 @@ -.TH "anonymous_namespace{AutoSegment.cpp}" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "anonymous_namespace{AutoSegment.cpp}" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/anonymous_namespace{ChipTools.cpp}.3 b/katabatic/doc/man/man3/anonymous_namespace{ChipTools.cpp}.3 index 2882bbd4..10dcc2bb 100644 --- a/katabatic/doc/man/man3/anonymous_namespace{ChipTools.cpp}.3 +++ b/katabatic/doc/man/man3/anonymous_namespace{ChipTools.cpp}.3 @@ -1,4 +1,4 @@ -.TH "anonymous_namespace{ChipTools.cpp}" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "anonymous_namespace{ChipTools.cpp}" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/anonymous_namespace{GCell.cpp}.3 b/katabatic/doc/man/man3/anonymous_namespace{GCell.cpp}.3 index cbab2416..e2e35f8e 100644 --- a/katabatic/doc/man/man3/anonymous_namespace{GCell.cpp}.3 +++ b/katabatic/doc/man/man3/anonymous_namespace{GCell.cpp}.3 @@ -1,4 +1,4 @@ -.TH "anonymous_namespace{GCell.cpp}" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "anonymous_namespace{GCell.cpp}" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/anonymous_namespace{KatabaticEngine.cpp}.3 b/katabatic/doc/man/man3/anonymous_namespace{KatabaticEngine.cpp}.3 index 91ba2c2f..3a545b08 100644 --- a/katabatic/doc/man/man3/anonymous_namespace{KatabaticEngine.cpp}.3 +++ b/katabatic/doc/man/man3/anonymous_namespace{KatabaticEngine.cpp}.3 @@ -1,4 +1,4 @@ -.TH "anonymous_namespace{KatabaticEngine.cpp}" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "anonymous_namespace{KatabaticEngine.cpp}" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/anonymous_namespace{LoadGrByNet.cpp}.3 b/katabatic/doc/man/man3/anonymous_namespace{LoadGrByNet.cpp}.3 index 4f3145ea..987bd9fe 100644 --- a/katabatic/doc/man/man3/anonymous_namespace{LoadGrByNet.cpp}.3 +++ b/katabatic/doc/man/man3/anonymous_namespace{LoadGrByNet.cpp}.3 @@ -1,4 +1,4 @@ -.TH "anonymous_namespace{LoadGrByNet.cpp}" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "anonymous_namespace{LoadGrByNet.cpp}" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/anonymous_namespace{LoadGrByNet.cpp}_GCellTopology.3 b/katabatic/doc/man/man3/anonymous_namespace{LoadGrByNet.cpp}_GCellTopology.3 index fd9d5635..e75ad20a 100644 --- a/katabatic/doc/man/man3/anonymous_namespace{LoadGrByNet.cpp}_GCellTopology.3 +++ b/katabatic/doc/man/man3/anonymous_namespace{LoadGrByNet.cpp}_GCellTopology.3 @@ -1,4 +1,4 @@ -.TH "GCellTopology" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "GCellTopology" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/anonymous_namespace{Session.cpp}.3 b/katabatic/doc/man/man3/anonymous_namespace{Session.cpp}.3 index 864cc05a..cb814021 100644 --- a/katabatic/doc/man/man3/anonymous_namespace{Session.cpp}.3 +++ b/katabatic/doc/man/man3/anonymous_namespace{Session.cpp}.3 @@ -1,4 +1,4 @@ -.TH "anonymous_namespace{Session.cpp}" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "anonymous_namespace{Session.cpp}" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/man/man3/grpSynthHierarchy.3 b/katabatic/doc/man/man3/grpSynthHierarchy.3 index f67036db..20e9cf11 100644 --- a/katabatic/doc/man/man3/grpSynthHierarchy.3 +++ b/katabatic/doc/man/man3/grpSynthHierarchy.3 @@ -1,4 +1,4 @@ -.TH "grpSynthHierarchy" 3 "Thu Nov 12 2020" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- +.TH "grpSynthHierarchy" 3 "Fri Oct 1 2021" "Version 1.0" "Katabatic - Routing Toolbox" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/katabatic/doc/rtf/refman.rtf b/katabatic/doc/rtf/refman.rtf index 2688e3d4..9ab166b1 100644 --- a/katabatic/doc/rtf/refman.rtf +++ b/katabatic/doc/rtf/refman.rtf @@ -86,7 +86,7 @@ 1.0 \par }}Katabatic - Routing Toolbox} {\comment Generated byDoxgyen. } -{\creatim \yr2020\mo11\dy12\hr13\min59\sec30} +{\creatim \yr2021\mo10\dy1\hr19\min23\sec14} }\pard\plain \sectd\pgnlcrm {\footer \s29\widctlpar\tqc\tx4320\tqr\tx8640\qr\adjustright \fs20\cgrid {\chpgn}} @@ -99,7 +99,7 @@ \par\par\par\par\par\par\par\par\par\par\par\par \pard\plain \s16\qc\sa60\widctlpar\outlinelevel1\adjustright \f1\cgrid {\field\fldedit {\*\fldinst AUTHOR \\*MERGEFORMAT}{\fldrslt AUTHOR}}\par -Version 1.0\par{\field\fldedit {\*\fldinst CREATEDATE \\*MERGEFORMAT}{\fldrslt Thu Nov 12 2020 }}\par +Version 1.0\par{\field\fldedit {\*\fldinst CREATEDATE \\*MERGEFORMAT}{\fldrslt Fri Oct 1 2021 }}\par \page\page\vertalt \pard\plain \s1\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs36\kerning36\cgrid Table of Contents\par diff --git a/katabatic/src/CMakeLists.txt b/katabatic/src/CMakeLists.txt index 890d1f9a..0e296c92 100644 --- a/katabatic/src/CMakeLists.txt +++ b/katabatic/src/CMakeLists.txt @@ -12,7 +12,7 @@ endif ( CHECK_DETERMINISM ) ${CONFIGURATION_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${QtX_INCLUDE_DIR} - ${PYTHON_INCLUDE_PATH} + ${Python_INCLUDE_DIRS} ) set( includes katabatic/Constants.h katabatic/Observer.h @@ -73,7 +73,7 @@ endif ( CHECK_DETERMINISM ) ${QtX_LIBRARIES} ${Boost_LIBRARIES} ${LIBXML2_LIBRARIES} - ${PYTHON_LIBRARIES} -lutil + ${Python_LIBRARIES} -lutil ) add_library( katabatic ${cpps} ) diff --git a/katabatic/src/Configuration.cpp b/katabatic/src/Configuration.cpp index 90865687..8d19c0ee 100644 --- a/katabatic/src/Configuration.cpp +++ b/katabatic/src/Configuration.cpp @@ -17,7 +17,7 @@ #include #include #include -#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/Warning.h" #include "hurricane/Error.h" #include "hurricane/Technology.h" diff --git a/katabatic/src/PyKatabatic.cpp b/katabatic/src/PyKatabatic.cpp index d9979cd8..8ddffedf 100644 --- a/katabatic/src/PyKatabatic.cpp +++ b/katabatic/src/PyKatabatic.cpp @@ -1,7 +1,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2012-2018, All Rights Reserved +// Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -48,19 +48,27 @@ extern "C" { }; + static PyModuleDef PyKatabatic_ModuleDef = + { PyModuleDef_HEAD_INIT + , .m_name = "Katabatic" + , .m_doc = "Detailed router low-level database." + , .m_size = -1 + , .m_methods = PyKatabatic_Methods + }; // --------------------------------------------------------------- - // Module Initialization : "initKatabatic ()" + // Module Initialization : "PyInit_Katabatic ()" - DL_EXPORT(void) initKatabatic () { - cdebug_log(38,0) << "initKatabatic()" << endl; + PyMODINIT_FUNC PyInit_Katabatic ( void ) + { + cdebug_log(38,0) << "Py_Init_Katabatic()" << endl; - PyObject* module = Py_InitModule ( "Katabatic", PyKatabatic_Methods ); + PyObject* module = PyModule_Create( &PyKatabatic_ModuleDef ); if ( module == NULL ) { cerr << "[ERROR]\n" << " Failed to initialize Katabatic module." << endl; - return; + return NULL; } PyObject* dictionnary = PyModule_GetDict(module); @@ -71,6 +79,8 @@ extern "C" { LoadObjectConstant(dictionnary,EngineLayerAssignByLength,"EngineLayerAssignByLength"); LoadObjectConstant(dictionnary,EngineLayerAssignByTrunk ,"EngineLayerAssignByTrunk" ); LoadObjectConstant(dictionnary,EngineNoNetLayerAssign ,"EngineNoNetLayerAssign" ); + + return module; } diff --git a/katana/CMakeLists.txt b/katana/CMakeLists.txt index 488a8326..72aaa9b1 100644 --- a/katana/CMakeLists.txt +++ b/katana/CMakeLists.txt @@ -5,6 +5,7 @@ option(BUILD_DOC "Build the documentation (doxygen)" OFF) option(CHECK_DATABASE "Run database in full check mode (very slow)" OFF) + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) cmake_minimum_required(VERSION 2.8.9) @@ -15,16 +16,15 @@ setup_project_paths(CORIOLIS) set_cmake_policies() - setup_boost(program_options filesystem python regex) + setup_boost(program_options) setup_qt() find_package(Libexecinfo REQUIRED) find_package(LibXml2 REQUIRED) - find_package(PythonLibs 2 REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(FLUTE REQUIRED) - find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) find_package(ANABATIC REQUIRED) diff --git a/katana/python/CMakeLists.txt b/katana/python/CMakeLists.txt index 5932bc3e..9e6c90dc 100644 --- a/katana/python/CMakeLists.txt +++ b/katana/python/CMakeLists.txt @@ -1,2 +1,2 @@ - install ( FILES katanaInit.py DESTINATION ${PYTHON_SITE_PACKAGES}/katana ) + install ( FILES katanaInit.py DESTINATION ${Python_CORIOLISLIB}/katana ) diff --git a/katana/python/katanaInit.py b/katana/python/katanaInit.py index e9c60392..eec3dd3d 100644 --- a/katana/python/katanaInit.py +++ b/katana/python/katanaInit.py @@ -1,29 +1,28 @@ #!/usr/bin/env python try: - import sys - import os.path - import helpers.io - from helpers.io import ErrorMessage - from helpers.io import WarningMessage - import Viewer -except Exception, e: - helpers.io.catch( e ) - sys.exit( 1 ) + import sys + import os.path + import helpers.io + from helpers.io import ErrorMessage + from helpers.io import WarningMessage + import Viewer +except Exception as e: + helpers.io.catch( e ) + sys.exit( 1 ) def katanaHook ( **kw ): katana = None - if kw.has_key('katana'): - katana = kw['katana'] + if 'katana' in kw: + katana = kw['katana'] else: - print ErrorMessage( 3, 'katanaHook(): Must be run from a KatanaEngine.' ) - return - + print( ErrorMessage( 3, 'katanaHook(): Must be run from a KatanaEngine.' )) + return try: - userInit = os.path.join( os.getcwd(), 'coriolis2/katana.py' ) - if (os.path.exists(userInit)): - execfile( userInit ) - except Exception, e: - helpers.io.catch( e ) + userInit = os.path.join( os.getcwd(), 'coriolis2/katana.py' ) + if (os.path.exists(userInit)): + exec( open(userInit).read() ) + except Exception as e: + helpers.io.catch( e ) return diff --git a/katana/src/CMakeLists.txt b/katana/src/CMakeLists.txt index fa989cdb..7694045b 100644 --- a/katana/src/CMakeLists.txt +++ b/katana/src/CMakeLists.txt @@ -10,7 +10,7 @@ ${FLUTE_INCLUDE_DIR} ${WtX_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} - ${PYTHON_INCLUDE_PATH} + ${Python_INCLUDE_DIRS} ) set( includes katana/Constants.h katana/Block.h @@ -108,7 +108,7 @@ ${QtX_LIBRARIES} ${Boost_LIBRARIES} ${LIBXML2_LIBRARIES} - ${PYTHON_LIBRARIES} -lutil + ${Python_LIBRARIES} -lutil ${LIBEXECINFO_LIBRARIES} ) diff --git a/katana/src/Configuration.cpp b/katana/src/Configuration.cpp index 9c26768c..8ffbc1bc 100644 --- a/katana/src/Configuration.cpp +++ b/katana/src/Configuration.cpp @@ -15,7 +15,7 @@ #include -#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/Cell.h" #include "crlcore/Utilities.h" #include "katana/Configuration.h" diff --git a/katana/src/GlobalRoute.cpp b/katana/src/GlobalRoute.cpp index 5f319646..353e5817 100644 --- a/katana/src/GlobalRoute.cpp +++ b/katana/src/GlobalRoute.cpp @@ -15,7 +15,7 @@ #include "flute.h" -#include "vlsisapd/utilities/Dots.h" +#include "hurricane/utilities/Dots.h" #include "hurricane/Warning.h" #include "hurricane/Breakpoint.h" #include "hurricane/RoutingPad.h" diff --git a/katana/src/GraphicKatanaEngine.cpp b/katana/src/GraphicKatanaEngine.cpp index 85e9dd73..a55d6b70 100644 --- a/katana/src/GraphicKatanaEngine.cpp +++ b/katana/src/GraphicKatanaEngine.cpp @@ -153,7 +153,7 @@ namespace Katana { float edgeOccupancy = edge->getEstimateOccupancy() + (float)edge->getRealOccupancy(); -#define EDGE_OVERLOAD_DISPLAY 1 +#define NORMAL_DENSITY_DISPLAY 1 #if NORMAL_DENSITY_DISPLAY if ((unsigned int)edgeOccupancy <= edge->getCapacity()) occupancy = (uint32_t)( 255.0 * (edgeOccupancy / (float)edge->getCapacity()) ); diff --git a/katana/src/KatanaEngine.cpp b/katana/src/KatanaEngine.cpp index 4399a163..de12c297 100644 --- a/katana/src/KatanaEngine.cpp +++ b/katana/src/KatanaEngine.cpp @@ -19,7 +19,7 @@ #include #include #include "flute.h" -#include "vlsisapd/utilities/Path.h" +#include "hurricane/utilities/Path.h" #include "hurricane/DebugSession.h" #include "hurricane/UpdateSession.h" #include "hurricane/Bug.h" @@ -583,12 +583,12 @@ namespace Katana { for ( Edge* edge : gcell->getEdges( Flags::NorthSide) ) { if (edge->getReservedCapacity() < vReservedMin) { - edge->reserveCapacity( vReservedMin ); + edge->reserveCapacity( vReservedMin - edge->getReservedCapacity() ); } } for ( Edge* edge : gcell->getEdges( Flags::EastSide) ) { if (edge->getReservedCapacity() < hReservedMin) - edge->reserveCapacity( hReservedMin ); + edge->reserveCapacity( hReservedMin - edge->getReservedCapacity() ); } } } diff --git a/katana/src/PowerRails.cpp b/katana/src/PowerRails.cpp index 23a62662..e6b45a77 100644 --- a/katana/src/PowerRails.cpp +++ b/katana/src/PowerRails.cpp @@ -797,8 +797,7 @@ namespace { { _globalNets.setBlockage( katana->getBlockageNet() ); - Technology* technology = DataBase::getDB()->getTechnology(); - RoutingGauge* rg = _katana->getConfiguration()->getRoutingGauge(); + RoutingGauge* rg = _katana->getConfiguration()->getRoutingGauge(); for ( RoutingLayerGauge* lg : rg->getLayerGauges() ) { cdebug_log(159,0) << "Gauge: [" << lg->getDepth() << "] " << lg << endl; diff --git a/katana/src/PyKatana.cpp b/katana/src/PyKatana.cpp index fdf6d796..a6003603 100644 --- a/katana/src/PyKatana.cpp +++ b/katana/src/PyKatana.cpp @@ -2,14 +2,14 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2012-2013, All Rights Reserved +// Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | 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@asim.lip6.fr | +// | E-mail : Jean-Paul.Chaput@lip6.fr | // | =============================================================== | // | C++ Module : "./PyKatana.cpp" | // +-----------------------------------------------------------------+ @@ -61,13 +61,23 @@ extern "C" { }; + static PyModuleDef PyKatana_ModuleDef = + { PyModuleDef_HEAD_INIT + , .m_name = "Katana" + , .m_doc = "The detailed router." + , .m_size = -1 + , .m_methods = PyKatana_Methods + }; + + // --------------------------------------------------------------- - // Module Initialization : "initKatana ()" + // Module Initialization : "PyInit_Katana ()" - DL_EXPORT(void) initKatana () { - cdebug_log(40,0) << "initKatana()" << endl; + PyMODINIT_FUNC PyInit_Katana ( void ) + { + cdebug_log(40,0) << "PyInit_Katana()" << endl; PyKatanaFlags_LinkPyType(); PyKatanaEngine_LinkPyType(); @@ -78,11 +88,11 @@ extern "C" { PYTYPE_READY_SUB( GraphicKatanaEngine, GraphicTool ); - PyObject* module = Py_InitModule( "Katana", PyKatana_Methods ); + PyObject* module = PyModule_Create( &PyKatana_ModuleDef ); if (module == NULL) { cerr << "[ERROR]\n" << " Failed to initialize Katana module." << endl; - return; + return NULL; } Py_INCREF( &PyTypeKatanaEngine ); @@ -98,6 +108,7 @@ extern "C" { // LoadObjectConstant( dictionnary, KtLoadGlobalRouting , "KtLoadGlobalRouting" ); PyKatanaEngine_postModuleInit(); + return module; } diff --git a/katana/src/PyKatanaFlags.cpp b/katana/src/PyKatanaFlags.cpp index 13d85f89..a7cbc8db 100644 --- a/katana/src/PyKatanaFlags.cpp +++ b/katana/src/PyKatanaFlags.cpp @@ -69,12 +69,12 @@ extern "C" { 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; + PyTypeKatanaFlags.tp_dealloc = (destructor) PyKatanaFlags_DeAlloc; + PyTypeKatanaFlags.tp_richcompare = (richcmpfunc)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; } diff --git a/katana/src/RoutingEvent.cpp b/katana/src/RoutingEvent.cpp index 84312727..0bf5d10c 100644 --- a/katana/src/RoutingEvent.cpp +++ b/katana/src/RoutingEvent.cpp @@ -19,7 +19,7 @@ #include #include #include -#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/Bug.h" #include "hurricane/Breakpoint.h" #include "hurricane/UpdateSession.h" diff --git a/katana/src/SegmentFsm.cpp b/katana/src/SegmentFsm.cpp index fa5124bf..e0e53e0c 100644 --- a/katana/src/SegmentFsm.cpp +++ b/katana/src/SegmentFsm.cpp @@ -432,7 +432,8 @@ namespace Katana { if (_type & EventLevel5) eventLevel = 5; event->setRipedByLocal( _type&RipedByLocal ); - RoutingEvent* fork = event->reschedule( queue, eventLevel ); + //RoutingEvent* fork = + event->reschedule( queue, eventLevel ); cdebug_tabw(159,-1); DebugSession::close(); diff --git a/kite/CMakeLists.txt b/kite/CMakeLists.txt index b9eac3cb..92af0de1 100644 --- a/kite/CMakeLists.txt +++ b/kite/CMakeLists.txt @@ -5,6 +5,7 @@ option(BUILD_DOC "Build the documentation (doxygen)" OFF) option(CHECK_DATABASE "Run database in full check mode (very slow)" OFF) + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) cmake_minimum_required(VERSION 2.8.9) @@ -15,14 +16,13 @@ setup_project_paths(CORIOLIS) set_cmake_policies() - setup_boost(program_options filesystem python regex) + setup_boost(program_options) setup_qt() find_package(LibXml2 REQUIRED) - find_package(PythonLibs 2 REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(FLUTE REQUIRED) - find_package(VLSISAPD REQUIRED) find_package(LEFDEF REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/kite/doc/html/Constants_8h_source.html b/kite/doc/html/Constants_8h_source.html index c9903c7f..0a398b23 100644 --- a/kite/doc/html/Constants_8h_source.html +++ b/kite/doc/html/Constants_8h_source.html @@ -60,7 +60,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/DataNegociate_8h_source.html b/kite/doc/html/DataNegociate_8h_source.html index e83c883b..f7bb02b4 100644 --- a/kite/doc/html/DataNegociate_8h_source.html +++ b/kite/doc/html/DataNegociate_8h_source.html @@ -96,7 +96,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/HorizontalTrack_8h_source.html b/kite/doc/html/HorizontalTrack_8h_source.html index c9810dee..e76d005b 100644 --- a/kite/doc/html/HorizontalTrack_8h_source.html +++ b/kite/doc/html/HorizontalTrack_8h_source.html @@ -59,7 +59,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/KiteEngine_8h_source.html b/kite/doc/html/KiteEngine_8h_source.html index 59c6faa2..098b319e 100644 --- a/kite/doc/html/KiteEngine_8h_source.html +++ b/kite/doc/html/KiteEngine_8h_source.html @@ -79,7 +79,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/Manipulator_8h_source.html b/kite/doc/html/Manipulator_8h_source.html index e6cb8516..9092f5f4 100644 --- a/kite/doc/html/Manipulator_8h_source.html +++ b/kite/doc/html/Manipulator_8h_source.html @@ -94,7 +94,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/NegociateWindow_8h_source.html b/kite/doc/html/NegociateWindow_8h_source.html index 14e916c6..07b37d55 100644 --- a/kite/doc/html/NegociateWindow_8h_source.html +++ b/kite/doc/html/NegociateWindow_8h_source.html @@ -83,7 +83,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/RoutingEventHistory_8h_source.html b/kite/doc/html/RoutingEventHistory_8h_source.html index 856a2421..6f3775da 100644 --- a/kite/doc/html/RoutingEventHistory_8h_source.html +++ b/kite/doc/html/RoutingEventHistory_8h_source.html @@ -60,7 +60,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/RoutingEventLoop_8h_source.html b/kite/doc/html/RoutingEventLoop_8h_source.html index 197bcc78..955d56eb 100644 --- a/kite/doc/html/RoutingEventLoop_8h_source.html +++ b/kite/doc/html/RoutingEventLoop_8h_source.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/RoutingEventQueue_8h_source.html b/kite/doc/html/RoutingEventQueue_8h_source.html index 27dd5f28..069cb7a1 100644 --- a/kite/doc/html/RoutingEventQueue_8h_source.html +++ b/kite/doc/html/RoutingEventQueue_8h_source.html @@ -66,7 +66,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/RoutingEvent_8h_source.html b/kite/doc/html/RoutingEvent_8h_source.html index f784a68e..e4c5fecd 100644 --- a/kite/doc/html/RoutingEvent_8h_source.html +++ b/kite/doc/html/RoutingEvent_8h_source.html @@ -110,7 +110,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/RoutingPlane_8h_source.html b/kite/doc/html/RoutingPlane_8h_source.html index b60a85d7..8bda819b 100644 --- a/kite/doc/html/RoutingPlane_8h_source.html +++ b/kite/doc/html/RoutingPlane_8h_source.html @@ -82,7 +82,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/SegmentFsm_8h_source.html b/kite/doc/html/SegmentFsm_8h_source.html index 7b29412a..6016f22b 100644 --- a/kite/doc/html/SegmentFsm_8h_source.html +++ b/kite/doc/html/SegmentFsm_8h_source.html @@ -126,7 +126,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/Session_8h_source.html b/kite/doc/html/Session_8h_source.html index ec8ca7eb..0b46ca48 100644 --- a/kite/doc/html/Session_8h_source.html +++ b/kite/doc/html/Session_8h_source.html @@ -79,7 +79,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/TrackElement_8h_source.html b/kite/doc/html/TrackElement_8h_source.html index 0c02a32c..b4ec9b92 100644 --- a/kite/doc/html/TrackElement_8h_source.html +++ b/kite/doc/html/TrackElement_8h_source.html @@ -132,7 +132,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/TrackFixedSegment_8h_source.html b/kite/doc/html/TrackFixedSegment_8h_source.html index 67ecbb24..7ef6ed6c 100644 --- a/kite/doc/html/TrackFixedSegment_8h_source.html +++ b/kite/doc/html/TrackFixedSegment_8h_source.html @@ -73,7 +73,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/TrackMarker_8h_source.html b/kite/doc/html/TrackMarker_8h_source.html index 485a6a92..8eab85fd 100644 --- a/kite/doc/html/TrackMarker_8h_source.html +++ b/kite/doc/html/TrackMarker_8h_source.html @@ -65,7 +65,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/TrackSegment_8h_source.html b/kite/doc/html/TrackSegment_8h_source.html index 11567e18..83df7e66 100644 --- a/kite/doc/html/TrackSegment_8h_source.html +++ b/kite/doc/html/TrackSegment_8h_source.html @@ -107,7 +107,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/Track_8h_source.html b/kite/doc/html/Track_8h_source.html index 4f4c7ff2..fdfc55d3 100644 --- a/kite/doc/html/Track_8h_source.html +++ b/kite/doc/html/Track_8h_source.html @@ -115,7 +115,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/VerticalTrack_8h_source.html b/kite/doc/html/VerticalTrack_8h_source.html index 9af82ac7..044a9d1d 100644 --- a/kite/doc/html/VerticalTrack_8h_source.html +++ b/kite/doc/html/VerticalTrack_8h_source.html @@ -59,7 +59,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/annotated.html b/kite/doc/html/annotated.html index be5d5761..e36250ec 100644 --- a/kite/doc/html/annotated.html +++ b/kite/doc/html/annotated.html @@ -71,7 +71,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1DataNegociate-members.html b/kite/doc/html/classKite_1_1DataNegociate-members.html index f9a8945e..8d969613 100644 --- a/kite/doc/html/classKite_1_1DataNegociate-members.html +++ b/kite/doc/html/classKite_1_1DataNegociate-members.html @@ -86,7 +86,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1DataNegociate.html b/kite/doc/html/classKite_1_1DataNegociate.html index 0924a8b3..1a08e146 100644 --- a/kite/doc/html/classKite_1_1DataNegociate.html +++ b/kite/doc/html/classKite_1_1DataNegociate.html @@ -814,7 +814,7 @@ Modifications History
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1HorizontalTrack-members.html b/kite/doc/html/classKite_1_1HorizontalTrack-members.html index 6a9d995e..f65716fe 100644 --- a/kite/doc/html/classKite_1_1HorizontalTrack-members.html +++ b/kite/doc/html/classKite_1_1HorizontalTrack-members.html @@ -111,7 +111,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1HorizontalTrack.html b/kite/doc/html/classKite_1_1HorizontalTrack.html index cd51d960..d195095d 100644 --- a/kite/doc/html/classKite_1_1HorizontalTrack.html +++ b/kite/doc/html/classKite_1_1HorizontalTrack.html @@ -313,7 +313,7 @@ Additional Inherited Members
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1KiteEngine-members.html b/kite/doc/html/classKite_1_1KiteEngine-members.html index 05b15494..564a5395 100644 --- a/kite/doc/html/classKite_1_1KiteEngine-members.html +++ b/kite/doc/html/classKite_1_1KiteEngine-members.html @@ -114,7 +114,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1KiteEngine.html b/kite/doc/html/classKite_1_1KiteEngine.html index 488f91fd..3ecaee3d 100644 --- a/kite/doc/html/classKite_1_1KiteEngine.html +++ b/kite/doc/html/classKite_1_1KiteEngine.html @@ -397,7 +397,7 @@ Static Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1Manipulator-members.html b/kite/doc/html/classKite_1_1Manipulator-members.html index 148af299..7f5ca0ac 100644 --- a/kite/doc/html/classKite_1_1Manipulator-members.html +++ b/kite/doc/html/classKite_1_1Manipulator-members.html @@ -88,7 +88,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1Manipulator.html b/kite/doc/html/classKite_1_1Manipulator.html index 88e99684..9cd33c58 100644 --- a/kite/doc/html/classKite_1_1Manipulator.html +++ b/kite/doc/html/classKite_1_1Manipulator.html @@ -768,7 +768,7 @@ One Dogleg (max)
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1NegociateWindow-members.html b/kite/doc/html/classKite_1_1NegociateWindow-members.html index 04fb6675..abf6c37f 100644 --- a/kite/doc/html/classKite_1_1NegociateWindow-members.html +++ b/kite/doc/html/classKite_1_1NegociateWindow-members.html @@ -74,7 +74,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1NegociateWindow.html b/kite/doc/html/classKite_1_1NegociateWindow.html index 4aab01a5..39fc32f4 100644 --- a/kite/doc/html/classKite_1_1NegociateWindow.html +++ b/kite/doc/html/classKite_1_1NegociateWindow.html @@ -623,7 +623,7 @@ Static Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1RoutingEvent-members.html b/kite/doc/html/classKite_1_1RoutingEvent-members.html index a43408ce..db13f2f3 100644 --- a/kite/doc/html/classKite_1_1RoutingEvent-members.html +++ b/kite/doc/html/classKite_1_1RoutingEvent-members.html @@ -97,7 +97,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1RoutingEvent.html b/kite/doc/html/classKite_1_1RoutingEvent.html index 7d3421e1..489b263a 100644 --- a/kite/doc/html/classKite_1_1RoutingEvent.html +++ b/kite/doc/html/classKite_1_1RoutingEvent.html @@ -1313,7 +1313,7 @@ Static Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1RoutingEventHistory-members.html b/kite/doc/html/classKite_1_1RoutingEventHistory-members.html index 23bab423..5f1063c2 100644 --- a/kite/doc/html/classKite_1_1RoutingEventHistory-members.html +++ b/kite/doc/html/classKite_1_1RoutingEventHistory-members.html @@ -60,7 +60,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1RoutingEventHistory.html b/kite/doc/html/classKite_1_1RoutingEventHistory.html index c4355ae7..3a5cbfa3 100644 --- a/kite/doc/html/classKite_1_1RoutingEventHistory.html +++ b/kite/doc/html/classKite_1_1RoutingEventHistory.html @@ -259,7 +259,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1RoutingEventLoop-members.html b/kite/doc/html/classKite_1_1RoutingEventLoop-members.html index bffe5759..3883af6a 100644 --- a/kite/doc/html/classKite_1_1RoutingEventLoop-members.html +++ b/kite/doc/html/classKite_1_1RoutingEventLoop-members.html @@ -58,7 +58,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1RoutingEventLoop.html b/kite/doc/html/classKite_1_1RoutingEventLoop.html index 857c6056..db55cda5 100644 --- a/kite/doc/html/classKite_1_1RoutingEventLoop.html +++ b/kite/doc/html/classKite_1_1RoutingEventLoop.html @@ -244,7 +244,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1RoutingEventQueue-members.html b/kite/doc/html/classKite_1_1RoutingEventQueue-members.html index 7713914d..a1b7da55 100644 --- a/kite/doc/html/classKite_1_1RoutingEventQueue-members.html +++ b/kite/doc/html/classKite_1_1RoutingEventQueue-members.html @@ -65,7 +65,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1RoutingEventQueue.html b/kite/doc/html/classKite_1_1RoutingEventQueue.html index b4070e65..53c5fb68 100644 --- a/kite/doc/html/classKite_1_1RoutingEventQueue.html +++ b/kite/doc/html/classKite_1_1RoutingEventQueue.html @@ -408,7 +408,7 @@ Implementation Details
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1RoutingEvent_1_1Key-members.html b/kite/doc/html/classKite_1_1RoutingEvent_1_1Key-members.html index 21ee4836..0f3247d7 100644 --- a/kite/doc/html/classKite_1_1RoutingEvent_1_1Key-members.html +++ b/kite/doc/html/classKite_1_1RoutingEvent_1_1Key-members.html @@ -53,7 +53,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1RoutingEvent_1_1Key.html b/kite/doc/html/classKite_1_1RoutingEvent_1_1Key.html index 4ed6289c..1cc7ee4f 100644 --- a/kite/doc/html/classKite_1_1RoutingEvent_1_1Key.html +++ b/kite/doc/html/classKite_1_1RoutingEvent_1_1Key.html @@ -105,7 +105,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1RoutingPlane-members.html b/kite/doc/html/classKite_1_1RoutingPlane-members.html index e0fa9969..2decaeba 100644 --- a/kite/doc/html/classKite_1_1RoutingPlane-members.html +++ b/kite/doc/html/classKite_1_1RoutingPlane-members.html @@ -73,7 +73,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1RoutingPlane.html b/kite/doc/html/classKite_1_1RoutingPlane.html index bc532984..f177f23c 100644 --- a/kite/doc/html/classKite_1_1RoutingPlane.html +++ b/kite/doc/html/classKite_1_1RoutingPlane.html @@ -677,7 +677,7 @@ Fig 1: Horizontal RoutingPlane
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1SegmentAction-members.html b/kite/doc/html/classKite_1_1SegmentAction-members.html index 0a44f159..635bdf14 100644 --- a/kite/doc/html/classKite_1_1SegmentAction-members.html +++ b/kite/doc/html/classKite_1_1SegmentAction-members.html @@ -82,7 +82,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1SegmentAction.html b/kite/doc/html/classKite_1_1SegmentAction.html index efa41ffe..90e30be8 100644 --- a/kite/doc/html/classKite_1_1SegmentAction.html +++ b/kite/doc/html/classKite_1_1SegmentAction.html @@ -397,7 +397,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1SegmentFsm-members.html b/kite/doc/html/classKite_1_1SegmentFsm-members.html index ca7fcd6c..9a77ff70 100644 --- a/kite/doc/html/classKite_1_1SegmentFsm-members.html +++ b/kite/doc/html/classKite_1_1SegmentFsm-members.html @@ -88,7 +88,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1SegmentFsm.html b/kite/doc/html/classKite_1_1SegmentFsm.html index 757dee0c..e647e3aa 100644 --- a/kite/doc/html/classKite_1_1SegmentFsm.html +++ b/kite/doc/html/classKite_1_1SegmentFsm.html @@ -926,7 +926,7 @@ Candidates Track Ordering
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1SegmentObserver-members.html b/kite/doc/html/classKite_1_1SegmentObserver-members.html index 9c6b938c..4d3d6db0 100644 --- a/kite/doc/html/classKite_1_1SegmentObserver-members.html +++ b/kite/doc/html/classKite_1_1SegmentObserver-members.html @@ -55,7 +55,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1SegmentObserver.html b/kite/doc/html/classKite_1_1SegmentObserver.html index 050a7f65..4f884a9d 100644 --- a/kite/doc/html/classKite_1_1SegmentObserver.html +++ b/kite/doc/html/classKite_1_1SegmentObserver.html @@ -109,7 +109,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1Session-members.html b/kite/doc/html/classKite_1_1Session-members.html index 1cadec58..3fdd0adc 100644 --- a/kite/doc/html/classKite_1_1Session-members.html +++ b/kite/doc/html/classKite_1_1Session-members.html @@ -99,7 +99,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1Session.html b/kite/doc/html/classKite_1_1Session.html index e86b68f8..e21c27dc 100644 --- a/kite/doc/html/classKite_1_1Session.html +++ b/kite/doc/html/classKite_1_1Session.html @@ -666,7 +666,7 @@ The Lookup Mechanism
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1Track-members.html b/kite/doc/html/classKite_1_1Track-members.html index 5b47214d..29e44c10 100644 --- a/kite/doc/html/classKite_1_1Track-members.html +++ b/kite/doc/html/classKite_1_1Track-members.html @@ -111,7 +111,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1Track.html b/kite/doc/html/classKite_1_1Track.html index 1fbfd0ad..72d79493 100644 --- a/kite/doc/html/classKite_1_1Track.html +++ b/kite/doc/html/classKite_1_1Track.html @@ -1633,7 +1633,7 @@ Fig 3: Track::getBeginIndex()
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1TrackElement-members.html b/kite/doc/html/classKite_1_1TrackElement-members.html index ecb928c9..fcd18521 100644 --- a/kite/doc/html/classKite_1_1TrackElement-members.html +++ b/kite/doc/html/classKite_1_1TrackElement-members.html @@ -118,7 +118,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1TrackElement.html b/kite/doc/html/classKite_1_1TrackElement.html index 6d9717c1..32590672 100644 --- a/kite/doc/html/classKite_1_1TrackElement.html +++ b/kite/doc/html/classKite_1_1TrackElement.html @@ -2191,7 +2191,7 @@ TrackElement Abstract
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1TrackFixedSegment-members.html b/kite/doc/html/classKite_1_1TrackFixedSegment-members.html index a338f954..3182ef5a 100644 --- a/kite/doc/html/classKite_1_1TrackFixedSegment-members.html +++ b/kite/doc/html/classKite_1_1TrackFixedSegment-members.html @@ -119,7 +119,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1TrackFixedSegment.html b/kite/doc/html/classKite_1_1TrackFixedSegment.html index 58d77850..b8e06bcd 100644 --- a/kite/doc/html/classKite_1_1TrackFixedSegment.html +++ b/kite/doc/html/classKite_1_1TrackFixedSegment.html @@ -572,7 +572,7 @@ Static Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1TrackMarker-members.html b/kite/doc/html/classKite_1_1TrackMarker-members.html index f9fe4919..8aebb8c7 100644 --- a/kite/doc/html/classKite_1_1TrackMarker-members.html +++ b/kite/doc/html/classKite_1_1TrackMarker-members.html @@ -59,7 +59,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1TrackMarker.html b/kite/doc/html/classKite_1_1TrackMarker.html index 6643da0f..b8f50272 100644 --- a/kite/doc/html/classKite_1_1TrackMarker.html +++ b/kite/doc/html/classKite_1_1TrackMarker.html @@ -282,7 +282,7 @@ Static Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1TrackSegment-members.html b/kite/doc/html/classKite_1_1TrackSegment-members.html index 2970c503..337df93d 100644 --- a/kite/doc/html/classKite_1_1TrackSegment-members.html +++ b/kite/doc/html/classKite_1_1TrackSegment-members.html @@ -120,7 +120,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1TrackSegment.html b/kite/doc/html/classKite_1_1TrackSegment.html index 65d9ec54..f7013c55 100644 --- a/kite/doc/html/classKite_1_1TrackSegment.html +++ b/kite/doc/html/classKite_1_1TrackSegment.html @@ -1691,7 +1691,7 @@ Global, Weak Global and Local Segments
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1VerticalTrack-members.html b/kite/doc/html/classKite_1_1VerticalTrack-members.html index 9676c46c..aa6f5e07 100644 --- a/kite/doc/html/classKite_1_1VerticalTrack-members.html +++ b/kite/doc/html/classKite_1_1VerticalTrack-members.html @@ -111,7 +111,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classKite_1_1VerticalTrack.html b/kite/doc/html/classKite_1_1VerticalTrack.html index b1720738..8122d904 100644 --- a/kite/doc/html/classKite_1_1VerticalTrack.html +++ b/kite/doc/html/classKite_1_1VerticalTrack.html @@ -314,7 +314,7 @@ Additional Inherited Members
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/classes.html b/kite/doc/html/classes.html index a20b5ec6..2b2b11df 100644 --- a/kite/doc/html/classes.html +++ b/kite/doc/html/classes.html @@ -79,7 +79,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/dir_2916ee297f5e79ec495d393dfe8ba769.html b/kite/doc/html/dir_2916ee297f5e79ec495d393dfe8ba769.html index 17eb03dc..d10d1d11 100644 --- a/kite/doc/html/dir_2916ee297f5e79ec495d393dfe8ba769.html +++ b/kite/doc/html/dir_2916ee297f5e79ec495d393dfe8ba769.html @@ -49,7 +49,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/kite/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html index ba5b0719..dcca0c31 100644 --- a/kite/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ b/kite/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -53,7 +53,7 @@ Directories
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/files.html b/kite/doc/html/files.html index 2ca12e52..17b31ba2 100644 --- a/kite/doc/html/files.html +++ b/kite/doc/html/files.html @@ -68,7 +68,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions.html b/kite/doc/html/functions.html index 531be0b5..a035ef21 100644 --- a/kite/doc/html/functions.html +++ b/kite/doc/html/functions.html @@ -53,7 +53,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_0x7e.html b/kite/doc/html/functions_0x7e.html index 84aa3e6d..7cab86cc 100644 --- a/kite/doc/html/functions_0x7e.html +++ b/kite/doc/html/functions_0x7e.html @@ -51,7 +51,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_a.html b/kite/doc/html/functions_a.html index bfb05748..aac6d6c1 100644 --- a/kite/doc/html/functions_a.html +++ b/kite/doc/html/functions_a.html @@ -84,7 +84,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_b.html b/kite/doc/html/functions_b.html index f8007ebd..166360b6 100644 --- a/kite/doc/html/functions_b.html +++ b/kite/doc/html/functions_b.html @@ -64,7 +64,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_c.html b/kite/doc/html/functions_c.html index 4b1ebba9..07352e21 100644 --- a/kite/doc/html/functions_c.html +++ b/kite/doc/html/functions_c.html @@ -104,7 +104,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_d.html b/kite/doc/html/functions_d.html index 0a8b993b..b02f5b96 100644 --- a/kite/doc/html/functions_d.html +++ b/kite/doc/html/functions_d.html @@ -74,7 +74,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_e.html b/kite/doc/html/functions_e.html index ff4428b0..f79e8540 100644 --- a/kite/doc/html/functions_e.html +++ b/kite/doc/html/functions_e.html @@ -91,7 +91,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_enum.html b/kite/doc/html/functions_enum.html index dcbeda99..87636bc5 100644 --- a/kite/doc/html/functions_enum.html +++ b/kite/doc/html/functions_enum.html @@ -64,7 +64,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_eval.html b/kite/doc/html/functions_eval.html index 511b194f..8d4eb2c8 100644 --- a/kite/doc/html/functions_eval.html +++ b/kite/doc/html/functions_eval.html @@ -312,7 +312,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_f.html b/kite/doc/html/functions_f.html index 29688864..c6ff3f13 100644 --- a/kite/doc/html/functions_f.html +++ b/kite/doc/html/functions_f.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_func.html b/kite/doc/html/functions_func.html index 024fe67e..8dfbc43b 100644 --- a/kite/doc/html/functions_func.html +++ b/kite/doc/html/functions_func.html @@ -53,7 +53,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_func_0x7e.html b/kite/doc/html/functions_func_0x7e.html index f895f826..4fb9d89a 100644 --- a/kite/doc/html/functions_func_0x7e.html +++ b/kite/doc/html/functions_func_0x7e.html @@ -51,7 +51,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_func_a.html b/kite/doc/html/functions_func_a.html index 6288fbc9..bbc7aecf 100644 --- a/kite/doc/html/functions_func_a.html +++ b/kite/doc/html/functions_func_a.html @@ -66,7 +66,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_func_b.html b/kite/doc/html/functions_func_b.html index 331a3ca3..07e95c73 100644 --- a/kite/doc/html/functions_func_b.html +++ b/kite/doc/html/functions_func_b.html @@ -49,7 +49,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_func_c.html b/kite/doc/html/functions_func_c.html index 48a46d6f..46cbbe9c 100644 --- a/kite/doc/html/functions_func_c.html +++ b/kite/doc/html/functions_func_c.html @@ -98,7 +98,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_func_d.html b/kite/doc/html/functions_func_d.html index 5016375f..81b530aa 100644 --- a/kite/doc/html/functions_func_d.html +++ b/kite/doc/html/functions_func_d.html @@ -71,7 +71,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_func_e.html b/kite/doc/html/functions_func_e.html index 42993807..8e3b744d 100644 --- a/kite/doc/html/functions_func_e.html +++ b/kite/doc/html/functions_func_e.html @@ -55,7 +55,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_func_f.html b/kite/doc/html/functions_func_f.html index 94da616f..398ed061 100644 --- a/kite/doc/html/functions_func_f.html +++ b/kite/doc/html/functions_func_f.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_func_g.html b/kite/doc/html/functions_func_g.html index 283be023..0a4ec56c 100644 --- a/kite/doc/html/functions_func_g.html +++ b/kite/doc/html/functions_func_g.html @@ -454,7 +454,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_func_h.html b/kite/doc/html/functions_func_h.html index da39fab5..e84fd62d 100644 --- a/kite/doc/html/functions_func_h.html +++ b/kite/doc/html/functions_func_h.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_func_i.html b/kite/doc/html/functions_func_i.html index 1933a7b2..bfb19ad8 100644 --- a/kite/doc/html/functions_func_i.html +++ b/kite/doc/html/functions_func_i.html @@ -171,7 +171,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_func_l.html b/kite/doc/html/functions_func_l.html index 731f6465..f8bae224 100644 --- a/kite/doc/html/functions_func_l.html +++ b/kite/doc/html/functions_func_l.html @@ -51,7 +51,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_func_m.html b/kite/doc/html/functions_func_m.html index 30c96062..1ddbdbe3 100644 --- a/kite/doc/html/functions_func_m.html +++ b/kite/doc/html/functions_func_m.html @@ -59,7 +59,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_func_n.html b/kite/doc/html/functions_func_n.html index 6500b6db..a39383f8 100644 --- a/kite/doc/html/functions_func_n.html +++ b/kite/doc/html/functions_func_n.html @@ -48,7 +48,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_func_o.html b/kite/doc/html/functions_func_o.html index e3a5f36d..8283168c 100644 --- a/kite/doc/html/functions_func_o.html +++ b/kite/doc/html/functions_func_o.html @@ -48,7 +48,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_func_p.html b/kite/doc/html/functions_func_p.html index 4deef3a9..731a1e0d 100644 --- a/kite/doc/html/functions_func_p.html +++ b/kite/doc/html/functions_func_p.html @@ -64,7 +64,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_func_r.html b/kite/doc/html/functions_func_r.html index 5def813f..ab1e4109 100644 --- a/kite/doc/html/functions_func_r.html +++ b/kite/doc/html/functions_func_r.html @@ -104,7 +104,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_func_s.html b/kite/doc/html/functions_func_s.html index daaa0286..44acac33 100644 --- a/kite/doc/html/functions_func_s.html +++ b/kite/doc/html/functions_func_s.html @@ -136,7 +136,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_func_u.html b/kite/doc/html/functions_func_u.html index fe2862b4..d193324d 100644 --- a/kite/doc/html/functions_func_u.html +++ b/kite/doc/html/functions_func_u.html @@ -60,7 +60,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_g.html b/kite/doc/html/functions_g.html index 44845a14..8b50d47f 100644 --- a/kite/doc/html/functions_g.html +++ b/kite/doc/html/functions_g.html @@ -454,7 +454,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_h.html b/kite/doc/html/functions_h.html index 0d2a80ba..ebbb38d9 100644 --- a/kite/doc/html/functions_h.html +++ b/kite/doc/html/functions_h.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_i.html b/kite/doc/html/functions_i.html index 11ccfe1e..eff6ca5b 100644 --- a/kite/doc/html/functions_i.html +++ b/kite/doc/html/functions_i.html @@ -183,7 +183,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_l.html b/kite/doc/html/functions_l.html index 49b222a1..400c1ee8 100644 --- a/kite/doc/html/functions_l.html +++ b/kite/doc/html/functions_l.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_m.html b/kite/doc/html/functions_m.html index d5c5170b..38b9ec9a 100644 --- a/kite/doc/html/functions_m.html +++ b/kite/doc/html/functions_m.html @@ -75,7 +75,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_n.html b/kite/doc/html/functions_n.html index 6d72869e..9cead260 100644 --- a/kite/doc/html/functions_n.html +++ b/kite/doc/html/functions_n.html @@ -66,7 +66,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_o.html b/kite/doc/html/functions_o.html index 35a7059b..a6ceaf4f 100644 --- a/kite/doc/html/functions_o.html +++ b/kite/doc/html/functions_o.html @@ -65,7 +65,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_p.html b/kite/doc/html/functions_p.html index 39c8f237..ac3aed18 100644 --- a/kite/doc/html/functions_p.html +++ b/kite/doc/html/functions_p.html @@ -79,7 +79,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_r.html b/kite/doc/html/functions_r.html index 03e8556a..f107431a 100644 --- a/kite/doc/html/functions_r.html +++ b/kite/doc/html/functions_r.html @@ -124,7 +124,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_s.html b/kite/doc/html/functions_s.html index b15b962a..09f34610 100644 --- a/kite/doc/html/functions_s.html +++ b/kite/doc/html/functions_s.html @@ -170,7 +170,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_t.html b/kite/doc/html/functions_t.html index d0d09a69..a75796df 100644 --- a/kite/doc/html/functions_t.html +++ b/kite/doc/html/functions_t.html @@ -58,7 +58,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_u.html b/kite/doc/html/functions_u.html index c12e34b2..e582d6e1 100644 --- a/kite/doc/html/functions_u.html +++ b/kite/doc/html/functions_u.html @@ -63,7 +63,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/functions_vars.html b/kite/doc/html/functions_vars.html index 0e4ba313..98f5f9ed 100644 --- a/kite/doc/html/functions_vars.html +++ b/kite/doc/html/functions_vars.html @@ -46,7 +46,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/graph_legend.html b/kite/doc/html/graph_legend.html index 77f4244f..8b423e32 100644 --- a/kite/doc/html/graph_legend.html +++ b/kite/doc/html/graph_legend.html @@ -74,7 +74,7 @@ A yellow dashed arrow denotes a relation between a template instance and the tem
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/group__AlgorithmOverview.html b/kite/doc/html/group__AlgorithmOverview.html index 2bb63beb..2e75c39a 100644 --- a/kite/doc/html/group__AlgorithmOverview.html +++ b/kite/doc/html/group__AlgorithmOverview.html @@ -82,7 +82,7 @@ Compute the Tracks in which the - Generated by doxygen 1.8.14 on Thu Nov 12 2020 + Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page diff --git a/kite/doc/html/group__grpSynthHierarchy.html b/kite/doc/html/group__grpSynthHierarchy.html index da9d9b9a..1e657354 100644 --- a/kite/doc/html/group__grpSynthHierarchy.html +++ b/kite/doc/html/group__grpSynthHierarchy.html @@ -108,7 +108,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/hierarchy.html b/kite/doc/html/hierarchy.html index 28b8cdf3..b8bd0427 100644 --- a/kite/doc/html/hierarchy.html +++ b/kite/doc/html/hierarchy.html @@ -76,7 +76,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/index.html b/kite/doc/html/index.html index fd031030..6cb0390a 100644 --- a/kite/doc/html/index.html +++ b/kite/doc/html/index.html @@ -55,7 +55,7 @@ The internal description which details how - Generated by doxygen 1.8.14 on Thu Nov 12 2020 + Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page diff --git a/kite/doc/html/modules.html b/kite/doc/html/modules.html index 7d555007..f7812acf 100644 --- a/kite/doc/html/modules.html +++ b/kite/doc/html/modules.html @@ -56,7 +56,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/namespaceKite.html b/kite/doc/html/namespaceKite.html index ca10da1b..ed35f3ca 100644 --- a/kite/doc/html/namespaceKite.html +++ b/kite/doc/html/namespaceKite.html @@ -199,7 +199,7 @@ Enumerations
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/namespaceanonymous__namespace_02AutoSegment_8cpp_03.html b/kite/doc/html/namespaceanonymous__namespace_02AutoSegment_8cpp_03.html index 1a1bf4f7..f26e9e73 100644 --- a/kite/doc/html/namespaceanonymous__namespace_02AutoSegment_8cpp_03.html +++ b/kite/doc/html/namespaceanonymous__namespace_02AutoSegment_8cpp_03.html @@ -45,7 +45,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/namespaceanonymous__namespace_02ChipTools_8cpp_03.html b/kite/doc/html/namespaceanonymous__namespace_02ChipTools_8cpp_03.html index 223dfc4c..3c34f35b 100644 --- a/kite/doc/html/namespaceanonymous__namespace_02ChipTools_8cpp_03.html +++ b/kite/doc/html/namespaceanonymous__namespace_02ChipTools_8cpp_03.html @@ -45,7 +45,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/namespaceanonymous__namespace_02GCell_8cpp_03.html b/kite/doc/html/namespaceanonymous__namespace_02GCell_8cpp_03.html index c33516b6..1d920b52 100644 --- a/kite/doc/html/namespaceanonymous__namespace_02GCell_8cpp_03.html +++ b/kite/doc/html/namespaceanonymous__namespace_02GCell_8cpp_03.html @@ -45,7 +45,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/namespaceanonymous__namespace_02KatabaticEngine_8cpp_03.html b/kite/doc/html/namespaceanonymous__namespace_02KatabaticEngine_8cpp_03.html index 5920daa6..c2ca288d 100644 --- a/kite/doc/html/namespaceanonymous__namespace_02KatabaticEngine_8cpp_03.html +++ b/kite/doc/html/namespaceanonymous__namespace_02KatabaticEngine_8cpp_03.html @@ -45,7 +45,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/namespaceanonymous__namespace_02LoadGrByNet_8cpp_03.html b/kite/doc/html/namespaceanonymous__namespace_02LoadGrByNet_8cpp_03.html index 62fbd240..243d658a 100644 --- a/kite/doc/html/namespaceanonymous__namespace_02LoadGrByNet_8cpp_03.html +++ b/kite/doc/html/namespaceanonymous__namespace_02LoadGrByNet_8cpp_03.html @@ -53,7 +53,7 @@ Classes
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/namespaceanonymous__namespace_02Manipulator_8cpp_03.html b/kite/doc/html/namespaceanonymous__namespace_02Manipulator_8cpp_03.html index d02da413..72f76cc7 100644 --- a/kite/doc/html/namespaceanonymous__namespace_02Manipulator_8cpp_03.html +++ b/kite/doc/html/namespaceanonymous__namespace_02Manipulator_8cpp_03.html @@ -45,7 +45,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/namespaceanonymous__namespace_02NegociateWindow_8cpp_03.html b/kite/doc/html/namespaceanonymous__namespace_02NegociateWindow_8cpp_03.html index 3d635e93..4230a2d1 100644 --- a/kite/doc/html/namespaceanonymous__namespace_02NegociateWindow_8cpp_03.html +++ b/kite/doc/html/namespaceanonymous__namespace_02NegociateWindow_8cpp_03.html @@ -45,7 +45,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/namespaceanonymous__namespace_02RoutingPlane_8cpp_03.html b/kite/doc/html/namespaceanonymous__namespace_02RoutingPlane_8cpp_03.html index 791daae4..c612e9b7 100644 --- a/kite/doc/html/namespaceanonymous__namespace_02RoutingPlane_8cpp_03.html +++ b/kite/doc/html/namespaceanonymous__namespace_02RoutingPlane_8cpp_03.html @@ -45,7 +45,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/namespaceanonymous__namespace_02SegmentFsm_8cpp_03.html b/kite/doc/html/namespaceanonymous__namespace_02SegmentFsm_8cpp_03.html index 8b9dc3c6..e3ab9499 100644 --- a/kite/doc/html/namespaceanonymous__namespace_02SegmentFsm_8cpp_03.html +++ b/kite/doc/html/namespaceanonymous__namespace_02SegmentFsm_8cpp_03.html @@ -45,7 +45,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/namespaceanonymous__namespace_02Session_8cpp_03.html b/kite/doc/html/namespaceanonymous__namespace_02Session_8cpp_03.html index 303576c9..9c0ff9fd 100644 --- a/kite/doc/html/namespaceanonymous__namespace_02Session_8cpp_03.html +++ b/kite/doc/html/namespaceanonymous__namespace_02Session_8cpp_03.html @@ -45,7 +45,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/namespaceanonymous__namespace_02TrackElement_8cpp_03.html b/kite/doc/html/namespaceanonymous__namespace_02TrackElement_8cpp_03.html index b065d555..45c450a1 100644 --- a/kite/doc/html/namespaceanonymous__namespace_02TrackElement_8cpp_03.html +++ b/kite/doc/html/namespaceanonymous__namespace_02TrackElement_8cpp_03.html @@ -45,7 +45,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/namespaceanonymous__namespace_02Track_8cpp_03.html b/kite/doc/html/namespaceanonymous__namespace_02Track_8cpp_03.html index 3c0e97c4..f6cb803f 100644 --- a/kite/doc/html/namespaceanonymous__namespace_02Track_8cpp_03.html +++ b/kite/doc/html/namespaceanonymous__namespace_02Track_8cpp_03.html @@ -45,7 +45,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/namespacemembers.html b/kite/doc/html/namespacemembers.html index e9d8d98d..42babab0 100644 --- a/kite/doc/html/namespacemembers.html +++ b/kite/doc/html/namespacemembers.html @@ -76,7 +76,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/namespacemembers_enum.html b/kite/doc/html/namespacemembers_enum.html index 04d1b1c0..f2d18203 100644 --- a/kite/doc/html/namespacemembers_enum.html +++ b/kite/doc/html/namespacemembers_enum.html @@ -46,7 +46,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/namespacemembers_eval.html b/kite/doc/html/namespacemembers_eval.html index c5ed922f..3e14da19 100644 --- a/kite/doc/html/namespacemembers_eval.html +++ b/kite/doc/html/namespacemembers_eval.html @@ -70,7 +70,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/namespacemembers_type.html b/kite/doc/html/namespacemembers_type.html index 885c43a3..bf66b42f 100644 --- a/kite/doc/html/namespacemembers_type.html +++ b/kite/doc/html/namespacemembers_type.html @@ -46,7 +46,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/namespaces.html b/kite/doc/html/namespaces.html index d0ed7140..14ff1927 100644 --- a/kite/doc/html/namespaces.html +++ b/kite/doc/html/namespaces.html @@ -62,7 +62,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/pageNotes.html b/kite/doc/html/pageNotes.html index 55433a81..7a30b6e7 100644 --- a/kite/doc/html/pageNotes.html +++ b/kite/doc/html/pageNotes.html @@ -150,7 +150,7 @@ Evaluation with Cadence NanoRoute
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/html/pages.html b/kite/doc/html/pages.html index 25838ab4..f1f7f7dd 100644 --- a/kite/doc/html/pages.html +++ b/kite/doc/html/pages.html @@ -50,7 +50,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/kite/doc/latex/refman.tex b/kite/doc/latex/refman.tex index ee427045..cf81868b 100644 --- a/kite/doc/latex/refman.tex +++ b/kite/doc/latex/refman.tex @@ -34,7 +34,7 @@ \vspace*{1cm} {\large Generated by Doxygen 1.8.14}\\ \vspace*{0.5cm} - {\small Thu Nov 12 2020 13:59:42}\\ + {\small Fri Oct 1 2021 19:23:15}\\ \end{center} \end{titlepage} diff --git a/kite/doc/man/man3/AlgorithmOverview.3 b/kite/doc/man/man3/AlgorithmOverview.3 index f59a2966..f0cce0b6 100644 --- a/kite/doc/man/man3/AlgorithmOverview.3 +++ b/kite/doc/man/man3/AlgorithmOverview.3 @@ -1,4 +1,4 @@ -.TH "AlgorithmOverview" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "AlgorithmOverview" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite.3 b/kite/doc/man/man3/Kite.3 index 39ba7d03..b77dcd42 100644 --- a/kite/doc/man/man3/Kite.3 +++ b/kite/doc/man/man3/Kite.3 @@ -1,4 +1,4 @@ -.TH "Kite" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "Kite" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite_DataNegociate.3 b/kite/doc/man/man3/Kite_DataNegociate.3 index d6e5006c..8685913f 100644 --- a/kite/doc/man/man3/Kite_DataNegociate.3 +++ b/kite/doc/man/man3/Kite_DataNegociate.3 @@ -1,4 +1,4 @@ -.TH "DataNegociate" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "DataNegociate" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite_HorizontalTrack.3 b/kite/doc/man/man3/Kite_HorizontalTrack.3 index 45ea5a4a..fc9beb8a 100644 --- a/kite/doc/man/man3/Kite_HorizontalTrack.3 +++ b/kite/doc/man/man3/Kite_HorizontalTrack.3 @@ -1,4 +1,4 @@ -.TH "HorizontalTrack" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "HorizontalTrack" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite_KiteEngine.3 b/kite/doc/man/man3/Kite_KiteEngine.3 index 54cd6eeb..aafdbfb6 100644 --- a/kite/doc/man/man3/Kite_KiteEngine.3 +++ b/kite/doc/man/man3/Kite_KiteEngine.3 @@ -1,4 +1,4 @@ -.TH "KiteEngine" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "KiteEngine" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite_Manipulator.3 b/kite/doc/man/man3/Kite_Manipulator.3 index fe16ac22..cd670756 100644 --- a/kite/doc/man/man3/Kite_Manipulator.3 +++ b/kite/doc/man/man3/Kite_Manipulator.3 @@ -1,4 +1,4 @@ -.TH "Manipulator" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "Manipulator" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite_NegociateWindow.3 b/kite/doc/man/man3/Kite_NegociateWindow.3 index 2337c9a3..47d96273 100644 --- a/kite/doc/man/man3/Kite_NegociateWindow.3 +++ b/kite/doc/man/man3/Kite_NegociateWindow.3 @@ -1,4 +1,4 @@ -.TH "NegociateWindow" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "NegociateWindow" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite_RoutingEvent.3 b/kite/doc/man/man3/Kite_RoutingEvent.3 index 6b37e81e..b2a12255 100644 --- a/kite/doc/man/man3/Kite_RoutingEvent.3 +++ b/kite/doc/man/man3/Kite_RoutingEvent.3 @@ -1,4 +1,4 @@ -.TH "RoutingEvent" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "RoutingEvent" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite_RoutingEventHistory.3 b/kite/doc/man/man3/Kite_RoutingEventHistory.3 index ab7cc2a3..9ca62d5c 100644 --- a/kite/doc/man/man3/Kite_RoutingEventHistory.3 +++ b/kite/doc/man/man3/Kite_RoutingEventHistory.3 @@ -1,4 +1,4 @@ -.TH "RoutingEventHistory" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "RoutingEventHistory" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite_RoutingEventLoop.3 b/kite/doc/man/man3/Kite_RoutingEventLoop.3 index 86a7fac8..9f6eaeca 100644 --- a/kite/doc/man/man3/Kite_RoutingEventLoop.3 +++ b/kite/doc/man/man3/Kite_RoutingEventLoop.3 @@ -1,4 +1,4 @@ -.TH "RoutingEventLoop" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "RoutingEventLoop" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite_RoutingEventQueue.3 b/kite/doc/man/man3/Kite_RoutingEventQueue.3 index e627e733..7c2dab15 100644 --- a/kite/doc/man/man3/Kite_RoutingEventQueue.3 +++ b/kite/doc/man/man3/Kite_RoutingEventQueue.3 @@ -1,4 +1,4 @@ -.TH "RoutingEventQueue" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "RoutingEventQueue" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite_RoutingEvent_Key.3 b/kite/doc/man/man3/Kite_RoutingEvent_Key.3 index 39168964..9afaaa3e 100644 --- a/kite/doc/man/man3/Kite_RoutingEvent_Key.3 +++ b/kite/doc/man/man3/Kite_RoutingEvent_Key.3 @@ -1,4 +1,4 @@ -.TH "RoutingEvent::Key" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "RoutingEvent::Key" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite_RoutingPlane.3 b/kite/doc/man/man3/Kite_RoutingPlane.3 index d3cbb2a4..84c79342 100644 --- a/kite/doc/man/man3/Kite_RoutingPlane.3 +++ b/kite/doc/man/man3/Kite_RoutingPlane.3 @@ -1,4 +1,4 @@ -.TH "RoutingPlane" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "RoutingPlane" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite_SegmentAction.3 b/kite/doc/man/man3/Kite_SegmentAction.3 index 5c640492..b9f26a63 100644 --- a/kite/doc/man/man3/Kite_SegmentAction.3 +++ b/kite/doc/man/man3/Kite_SegmentAction.3 @@ -1,4 +1,4 @@ -.TH "SegmentAction" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "SegmentAction" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite_SegmentFsm.3 b/kite/doc/man/man3/Kite_SegmentFsm.3 index a9b91727..ce00a7a2 100644 --- a/kite/doc/man/man3/Kite_SegmentFsm.3 +++ b/kite/doc/man/man3/Kite_SegmentFsm.3 @@ -1,4 +1,4 @@ -.TH "SegmentFsm" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "SegmentFsm" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite_SegmentObserver.3 b/kite/doc/man/man3/Kite_SegmentObserver.3 index bc2f65cc..d1f1c97e 100644 --- a/kite/doc/man/man3/Kite_SegmentObserver.3 +++ b/kite/doc/man/man3/Kite_SegmentObserver.3 @@ -1,4 +1,4 @@ -.TH "SegmentObserver" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "SegmentObserver" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite_Session.3 b/kite/doc/man/man3/Kite_Session.3 index 771dce4d..6f4d3fee 100644 --- a/kite/doc/man/man3/Kite_Session.3 +++ b/kite/doc/man/man3/Kite_Session.3 @@ -1,4 +1,4 @@ -.TH "Session" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "Session" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite_Track.3 b/kite/doc/man/man3/Kite_Track.3 index 61aa13a2..0714508a 100644 --- a/kite/doc/man/man3/Kite_Track.3 +++ b/kite/doc/man/man3/Kite_Track.3 @@ -1,4 +1,4 @@ -.TH "Track" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "Track" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite_TrackElement.3 b/kite/doc/man/man3/Kite_TrackElement.3 index c0c48845..b19653a5 100644 --- a/kite/doc/man/man3/Kite_TrackElement.3 +++ b/kite/doc/man/man3/Kite_TrackElement.3 @@ -1,4 +1,4 @@ -.TH "TrackElement" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "TrackElement" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite_TrackFixedSegment.3 b/kite/doc/man/man3/Kite_TrackFixedSegment.3 index 3fb11cf5..c50dbbcc 100644 --- a/kite/doc/man/man3/Kite_TrackFixedSegment.3 +++ b/kite/doc/man/man3/Kite_TrackFixedSegment.3 @@ -1,4 +1,4 @@ -.TH "TrackFixedSegment" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "TrackFixedSegment" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite_TrackMarker.3 b/kite/doc/man/man3/Kite_TrackMarker.3 index ac6aa50f..4ca8b09b 100644 --- a/kite/doc/man/man3/Kite_TrackMarker.3 +++ b/kite/doc/man/man3/Kite_TrackMarker.3 @@ -1,4 +1,4 @@ -.TH "TrackMarker" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "TrackMarker" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite_TrackSegment.3 b/kite/doc/man/man3/Kite_TrackSegment.3 index dca0161d..b3fbf333 100644 --- a/kite/doc/man/man3/Kite_TrackSegment.3 +++ b/kite/doc/man/man3/Kite_TrackSegment.3 @@ -1,4 +1,4 @@ -.TH "TrackSegment" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "TrackSegment" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/Kite_VerticalTrack.3 b/kite/doc/man/man3/Kite_VerticalTrack.3 index 29fc8e8f..25d46bc9 100644 --- a/kite/doc/man/man3/Kite_VerticalTrack.3 +++ b/kite/doc/man/man3/Kite_VerticalTrack.3 @@ -1,4 +1,4 @@ -.TH "VerticalTrack" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "VerticalTrack" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/anonymous_namespace{AutoSegment.cpp}.3 b/kite/doc/man/man3/anonymous_namespace{AutoSegment.cpp}.3 index f9d7cab6..307da45d 100644 --- a/kite/doc/man/man3/anonymous_namespace{AutoSegment.cpp}.3 +++ b/kite/doc/man/man3/anonymous_namespace{AutoSegment.cpp}.3 @@ -1,4 +1,4 @@ -.TH "anonymous_namespace{AutoSegment.cpp}" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "anonymous_namespace{AutoSegment.cpp}" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/anonymous_namespace{ChipTools.cpp}.3 b/kite/doc/man/man3/anonymous_namespace{ChipTools.cpp}.3 index 46e936d0..cb3c025e 100644 --- a/kite/doc/man/man3/anonymous_namespace{ChipTools.cpp}.3 +++ b/kite/doc/man/man3/anonymous_namespace{ChipTools.cpp}.3 @@ -1,4 +1,4 @@ -.TH "anonymous_namespace{ChipTools.cpp}" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "anonymous_namespace{ChipTools.cpp}" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/anonymous_namespace{GCell.cpp}.3 b/kite/doc/man/man3/anonymous_namespace{GCell.cpp}.3 index 1df4cc57..0e1ea8b9 100644 --- a/kite/doc/man/man3/anonymous_namespace{GCell.cpp}.3 +++ b/kite/doc/man/man3/anonymous_namespace{GCell.cpp}.3 @@ -1,4 +1,4 @@ -.TH "anonymous_namespace{GCell.cpp}" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "anonymous_namespace{GCell.cpp}" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/anonymous_namespace{KatabaticEngine.cpp}.3 b/kite/doc/man/man3/anonymous_namespace{KatabaticEngine.cpp}.3 index 15de6cb4..8c43e27a 100644 --- a/kite/doc/man/man3/anonymous_namespace{KatabaticEngine.cpp}.3 +++ b/kite/doc/man/man3/anonymous_namespace{KatabaticEngine.cpp}.3 @@ -1,4 +1,4 @@ -.TH "anonymous_namespace{KatabaticEngine.cpp}" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "anonymous_namespace{KatabaticEngine.cpp}" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/anonymous_namespace{LoadGrByNet.cpp}.3 b/kite/doc/man/man3/anonymous_namespace{LoadGrByNet.cpp}.3 index ff8f6b9e..70b1f916 100644 --- a/kite/doc/man/man3/anonymous_namespace{LoadGrByNet.cpp}.3 +++ b/kite/doc/man/man3/anonymous_namespace{LoadGrByNet.cpp}.3 @@ -1,4 +1,4 @@ -.TH "anonymous_namespace{LoadGrByNet.cpp}" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "anonymous_namespace{LoadGrByNet.cpp}" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/anonymous_namespace{Manipulator.cpp}.3 b/kite/doc/man/man3/anonymous_namespace{Manipulator.cpp}.3 index 1dcf96d6..1e618bfd 100644 --- a/kite/doc/man/man3/anonymous_namespace{Manipulator.cpp}.3 +++ b/kite/doc/man/man3/anonymous_namespace{Manipulator.cpp}.3 @@ -1,4 +1,4 @@ -.TH "anonymous_namespace{Manipulator.cpp}" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "anonymous_namespace{Manipulator.cpp}" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/anonymous_namespace{NegociateWindow.cpp}.3 b/kite/doc/man/man3/anonymous_namespace{NegociateWindow.cpp}.3 index d0d92811..a01d8a41 100644 --- a/kite/doc/man/man3/anonymous_namespace{NegociateWindow.cpp}.3 +++ b/kite/doc/man/man3/anonymous_namespace{NegociateWindow.cpp}.3 @@ -1,4 +1,4 @@ -.TH "anonymous_namespace{NegociateWindow.cpp}" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "anonymous_namespace{NegociateWindow.cpp}" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/anonymous_namespace{RoutingPlane.cpp}.3 b/kite/doc/man/man3/anonymous_namespace{RoutingPlane.cpp}.3 index 24e9b705..a0b195c8 100644 --- a/kite/doc/man/man3/anonymous_namespace{RoutingPlane.cpp}.3 +++ b/kite/doc/man/man3/anonymous_namespace{RoutingPlane.cpp}.3 @@ -1,4 +1,4 @@ -.TH "anonymous_namespace{RoutingPlane.cpp}" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "anonymous_namespace{RoutingPlane.cpp}" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/anonymous_namespace{SegmentFsm.cpp}.3 b/kite/doc/man/man3/anonymous_namespace{SegmentFsm.cpp}.3 index aa500e05..1ec264b4 100644 --- a/kite/doc/man/man3/anonymous_namespace{SegmentFsm.cpp}.3 +++ b/kite/doc/man/man3/anonymous_namespace{SegmentFsm.cpp}.3 @@ -1,4 +1,4 @@ -.TH "anonymous_namespace{SegmentFsm.cpp}" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "anonymous_namespace{SegmentFsm.cpp}" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/anonymous_namespace{Session.cpp}.3 b/kite/doc/man/man3/anonymous_namespace{Session.cpp}.3 index 8f3289e2..62573138 100644 --- a/kite/doc/man/man3/anonymous_namespace{Session.cpp}.3 +++ b/kite/doc/man/man3/anonymous_namespace{Session.cpp}.3 @@ -1,4 +1,4 @@ -.TH "anonymous_namespace{Session.cpp}" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "anonymous_namespace{Session.cpp}" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/anonymous_namespace{Track.cpp}.3 b/kite/doc/man/man3/anonymous_namespace{Track.cpp}.3 index eec8a6bf..08c038a5 100644 --- a/kite/doc/man/man3/anonymous_namespace{Track.cpp}.3 +++ b/kite/doc/man/man3/anonymous_namespace{Track.cpp}.3 @@ -1,4 +1,4 @@ -.TH "anonymous_namespace{Track.cpp}" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "anonymous_namespace{Track.cpp}" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/anonymous_namespace{TrackElement.cpp}.3 b/kite/doc/man/man3/anonymous_namespace{TrackElement.cpp}.3 index bb4180f3..f5d5ae68 100644 --- a/kite/doc/man/man3/anonymous_namespace{TrackElement.cpp}.3 +++ b/kite/doc/man/man3/anonymous_namespace{TrackElement.cpp}.3 @@ -1,4 +1,4 @@ -.TH "anonymous_namespace{TrackElement.cpp}" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "anonymous_namespace{TrackElement.cpp}" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/grpSynthHierarchy.3 b/kite/doc/man/man3/grpSynthHierarchy.3 index 88ff105b..b37c1ff0 100644 --- a/kite/doc/man/man3/grpSynthHierarchy.3 +++ b/kite/doc/man/man3/grpSynthHierarchy.3 @@ -1,4 +1,4 @@ -.TH "grpSynthHierarchy" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "grpSynthHierarchy" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/man/man3/pageNotes.3 b/kite/doc/man/man3/pageNotes.3 index ecccccbd..1ed5c6b1 100644 --- a/kite/doc/man/man3/pageNotes.3 +++ b/kite/doc/man/man3/pageNotes.3 @@ -1,4 +1,4 @@ -.TH "pageNotes" 3 "Thu Nov 12 2020" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- +.TH "pageNotes" 3 "Fri Oct 1 2021" "Version 1.0" "Kite - Detailed Router" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/kite/doc/rtf/refman.rtf b/kite/doc/rtf/refman.rtf index 5e8d88a1..6a74ecc8 100644 --- a/kite/doc/rtf/refman.rtf +++ b/kite/doc/rtf/refman.rtf @@ -86,7 +86,7 @@ 1.0 \par }}Kite - Detailed Router} {\comment Generated byDoxgyen. } -{\creatim \yr2020\mo11\dy12\hr13\min59\sec42} +{\creatim \yr2021\mo10\dy1\hr19\min23\sec15} }\pard\plain \sectd\pgnlcrm {\footer \s29\widctlpar\tqc\tx4320\tqr\tx8640\qr\adjustright \fs20\cgrid {\chpgn}} @@ -99,7 +99,7 @@ \par\par\par\par\par\par\par\par\par\par\par\par \pard\plain \s16\qc\sa60\widctlpar\outlinelevel1\adjustright \f1\cgrid {\field\fldedit {\*\fldinst AUTHOR \\*MERGEFORMAT}{\fldrslt AUTHOR}}\par -Version 1.0\par{\field\fldedit {\*\fldinst CREATEDATE \\*MERGEFORMAT}{\fldrslt Thu Nov 12 2020 }}\par +Version 1.0\par{\field\fldedit {\*\fldinst CREATEDATE \\*MERGEFORMAT}{\fldrslt Fri Oct 1 2021 }}\par \page\page\vertalt \pard\plain \s1\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs36\kerning36\cgrid Table of Contents\par diff --git a/kite/python/CMakeLists.txt b/kite/python/CMakeLists.txt index ced0049d..0b416ba5 100644 --- a/kite/python/CMakeLists.txt +++ b/kite/python/CMakeLists.txt @@ -1,2 +1,2 @@ - install ( FILES kiteInit.py DESTINATION ${PYTHON_SITE_PACKAGES}/kite ) + install ( FILES kiteInit.py DESTINATION ${Python_CORIOLISLIB}/kite ) diff --git a/kite/python/kiteInit.py b/kite/python/kiteInit.py index ba214c74..9e11666f 100644 --- a/kite/python/kiteInit.py +++ b/kite/python/kiteInit.py @@ -1,39 +1,37 @@ -#!/usr/bin/env python try: - import sys - import os.path - from helpers.io import ErrorMessage - from helpers.io import WarningMessage - import Viewer -except ImportError, e: - serror = str(e) - if serror.startswith('No module named'): - module = serror.split()[-1] - print '[ERROR] The <%s> python module or symbol cannot be loaded.' % module - print ' Please check the integrity of the package.' - if str(e).find('cannot open shared object file'): - library = serror.split(':')[0] - print '[ERROR] The <%s> shared library cannot be loaded.' % library - print ' Under RHEL 6, you must be under devtoolset-2.' - print ' (scl enable devtoolset-2 bash)' - sys.exit(1) -except Exception, e: - print '[ERROR] A strange exception occurred while loading the basic Coriolis/Python' - print ' modules. Something may be wrong at Python/C API level.\n' - print ' %s' % e - sys.exit(2) + import sys + import os.path + from helpers.io import ErrorMessage + from helpers.io import WarningMessage + import Viewer +except ImportError as e: + serror = str(e) + if serror.startswith('No module named'): + module = serror.split()[-1] + print( '[ERROR] The <%s> python module or symbol cannot be loaded.' % module ) + print( ' Please check the integrity of the package.' ) + if str(e).find('cannot open shared object file'): + library = serror.split(':')[0] + print( '[ERROR] The <%s> shared library cannot be loaded.' % library ) + print( ' Under RHEL 6, you must be under devtoolset-2.' ) + print( ' (scl enable devtoolset-2 bash)' ) + sys.exit(1) +except Exception as e: + print( '[ERROR] A strange exception occurred while loading the basic Coriolis/Python' ) + print( ' modules. Something may be wrong at Python/C API level.\n' ) + print( ' %s' % e ) + sys.exit(2) def kiteHook ( **kw ): kite = None - if kw.has_key('kite'): + if 'kite' in kw: kite = kw['kite'] else: - print ErrorMessage( 3, 'kiteHook(): Must be run from a KiteEngine.' ) + print( ErrorMessage( 3, 'kiteHook(): Must be run from a KiteEngine.' )) return - userInit = os.path.join( os.getcwd(), '.coriolis2/kite.py' ) if (os.path.exists(userInit)): - execfile( userInit ) + exec( open(userInit).read() ) return diff --git a/kite/src/CMakeLists.txt b/kite/src/CMakeLists.txt index 1940c6f2..12bc3bbd 100644 --- a/kite/src/CMakeLists.txt +++ b/kite/src/CMakeLists.txt @@ -10,7 +10,7 @@ ${FLUTE_INCLUDE_DIR} ${WtX_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} - ${PYTHON_INCLUDE_PATH} + ${Python_INCLUDE_DIRS} ) set( includes kite/Constants.h kite/TrackCost.h @@ -94,7 +94,7 @@ ${QtX_LIBRARIES} ${Boost_LIBRARIES} ${LIBXML2_LIBRARIES} - ${PYTHON_LIBRARIES} -lutil + ${Python_LIBRARIES} -lutil ${LIBEXECINFO_LIBRARIES} ) diff --git a/kite/src/Configuration.cpp b/kite/src/Configuration.cpp index 2fc2c3f5..f0d0356b 100644 --- a/kite/src/Configuration.cpp +++ b/kite/src/Configuration.cpp @@ -15,7 +15,7 @@ #include -#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/Cell.h" #include "crlcore/Utilities.h" #include "kite/Configuration.h" diff --git a/kite/src/KiteEngine.cpp b/kite/src/KiteEngine.cpp index 010613bd..68b97e25 100644 --- a/kite/src/KiteEngine.cpp +++ b/kite/src/KiteEngine.cpp @@ -18,7 +18,7 @@ #include #include #include -#include "vlsisapd/utilities/Path.h" +#include "hurricane/utilities/Path.h" #include "hurricane/DebugSession.h" #include "hurricane/UpdateSession.h" #include "hurricane/Bug.h" diff --git a/kite/src/PyKite.cpp b/kite/src/PyKite.cpp index 8a5d6553..de666c33 100644 --- a/kite/src/PyKite.cpp +++ b/kite/src/PyKite.cpp @@ -2,14 +2,14 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2012-2013, All Rights Reserved +// Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | 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@asim.lip6.fr | +// | E-mail : Jean-Paul.Chaput@lip6.fr | // | =============================================================== | // | C++ Module : "./PyKite.cpp" | // +-----------------------------------------------------------------+ @@ -60,13 +60,21 @@ extern "C" { }; + static PyModuleDef PyKite_ModuleDef = + { PyModuleDef_HEAD_INIT + , .m_name = "Kite" + , .m_doc = "Detailed router." + , .m_size = -1 + , .m_methods = PyKite_Methods + }; // --------------------------------------------------------------- - // Module Initialization : "initKite ()" + // Module Initialization : "PyInit_Kite ()" - DL_EXPORT(void) initKite () { - cdebug_log(40,0) << "initKite()" << endl; + PyMODINIT_FUNC PyInit_Kite ( void ) + { + cdebug_log(40,0) << "PyInit_Kite()" << endl; PyKiteEngine_LinkPyType(); PyGraphicKiteEngine_LinkPyType(); @@ -74,12 +82,11 @@ extern "C" { PYTYPE_READY_SUB( KiteEngine , ToolEngine ); PYTYPE_READY_SUB( GraphicKiteEngine, GraphicTool ); - - PyObject* module = Py_InitModule( "Kite", PyKite_Methods ); + PyObject* module = PyModule_Create( &PyKite_ModuleDef ); if (module == NULL) { cerr << "[ERROR]\n" << " Failed to initialize Kite module." << endl; - return; + return NULL; } Py_INCREF( &PyTypeKiteEngine ); @@ -92,6 +99,8 @@ extern "C" { LoadObjectConstant( dictionnary, KtBuildGlobalRouting, "KtBuildGlobalRouting" ); LoadObjectConstant( dictionnary, KtLoadGlobalRouting , "KtLoadGlobalRouting" ); + + return module; } diff --git a/kite/src/RoutingEvent.cpp b/kite/src/RoutingEvent.cpp index 81076aa4..fd862897 100644 --- a/kite/src/RoutingEvent.cpp +++ b/kite/src/RoutingEvent.cpp @@ -18,7 +18,7 @@ #include #include #include -#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/Bug.h" #include "hurricane/DebugSession.h" #include "hurricane/Breakpoint.h" diff --git a/knik/CMakeLists.txt b/knik/CMakeLists.txt index e91ca784..caea467d 100644 --- a/knik/CMakeLists.txt +++ b/knik/CMakeLists.txt @@ -6,6 +6,7 @@ cmake_minimum_required(VERSION 2.8.9) set(ignoreVariables "${BUILD_DOC} ${CMAKE_INSTALL_DIR}") + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) @@ -13,11 +14,10 @@ print_cmake_module_path() set_cmake_policies() - setup_boost(program_options filesystem python regex) + setup_boost(program_options) setup_qt() find_package(FLUTE REQUIRED) - find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/knik/src/MatrixVertex.cpp b/knik/src/MatrixVertex.cpp index 5e17a269..50f2a745 100644 --- a/knik/src/MatrixVertex.cpp +++ b/knik/src/MatrixVertex.cpp @@ -1,6 +1,6 @@ #include -#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/configuration/Configuration.h" #include "hurricane/Cell.h" #include "hurricane/Box.h" #include "crlcore/AllianceFramework.h" diff --git a/lefdef/CMakeLists.txt b/lefdef/CMakeLists.txt index 9e9d4bbf..4f36865b 100644 --- a/lefdef/CMakeLists.txt +++ b/lefdef/CMakeLists.txt @@ -5,6 +5,7 @@ cmake_minimum_required(VERSION 2.8.9) set(ignoreVariables "${BUILD_DOC} ${CMAKE_INSTALL_DIR}") + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) diff --git a/lefdef/src/lef/lef/CMakeLists.txt b/lefdef/src/lef/lef/CMakeLists.txt index 3cb07de1..62181c71 100644 --- a/lefdef/src/lef/lef/CMakeLists.txt +++ b/lefdef/src/lef/lef/CMakeLists.txt @@ -62,7 +62,6 @@ DEPENDS ${LefParserGrammar} COMMAND ${BISON_EXECUTABLE} -v -p lefyy -d ${LefParserGrammar} -o lef.tab.cpp COMMAND cp lef.tab.hpp ${LEFDEF_SOURCE_DIR}/src/lef/lef/lef.tab.h - #COMMAND mv lef.tab.cpp ${LEFDEF_SOURCE_DIR}/src/lef/lef/lef.tab.cpp COMMENT "Generating LEF parser (bison)" ) set_source_files_properties ( lef.tab.cpp GENERATED ) diff --git a/mauka/CMakeLists.txt b/mauka/CMakeLists.txt index aa2d705a..9e3e2fbe 100644 --- a/mauka/CMakeLists.txt +++ b/mauka/CMakeLists.txt @@ -4,6 +4,7 @@ project(MAUKA) cmake_minimum_required(VERSION 2.8.9) + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) @@ -11,12 +12,11 @@ print_cmake_module_path() set_cmake_policies() - setup_boost(program_options filesystem regex python) + setup_boost(program_options) setup_qt() - find_package(PythonLibs 2 REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) - find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) find_package(NIMBUS REQUIRED) diff --git a/metis/CMakeLists.txt b/metis/CMakeLists.txt index 8af4e88f..0ff95e81 100644 --- a/metis/CMakeLists.txt +++ b/metis/CMakeLists.txt @@ -4,6 +4,7 @@ project(METIS) cmake_minimum_required(VERSION 2.8.9) + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) @@ -13,9 +14,8 @@ set_cmake_policies() setup_boost() - find_package(PythonLibs 2 REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) - find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) find_package(NIMBUS REQUIRED) diff --git a/nimbus/CMakeLists.txt b/nimbus/CMakeLists.txt index ae8e9238..0b549ca9 100644 --- a/nimbus/CMakeLists.txt +++ b/nimbus/CMakeLists.txt @@ -4,18 +4,18 @@ project(NIMBUS) cmake_minimum_required(VERSION 2.8.9) + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) setup_project_paths(CORIOLIS) set_cmake_policies() - setup_boost(program_options filesystem python regex) + setup_boost(program_options) setup_qt() - find_package(PythonLibs 2 REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) - find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) find_package(Doxygen) diff --git a/oroshi/CMakeLists.txt b/oroshi/CMakeLists.txt index dd8b8635..61b35bf0 100644 --- a/oroshi/CMakeLists.txt +++ b/oroshi/CMakeLists.txt @@ -2,7 +2,7 @@ project(OROSHI) - cmake_minimum_required(VERSION 2.4.0) + cmake_minimum_required(VERSION 2.8.0) option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) set(ignoreVariables "${CMAKE_INSTALL_DIR}") @@ -13,15 +13,14 @@ set_cmake_policies() setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") - setup_boost(program_options filesystem python) + setup_boost(program_options) if (USE_LIBBFD) find_package(Libbfd) endif() - find_package(PythonLibs 2 REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) - find_package(VLSISAPD REQUIRED) find_package(CORIOLIS REQUIRED) find_package(Doxygen) setup_qt() diff --git a/oroshi/doc/html/annotated.html b/oroshi/doc/html/annotated.html index ba3797ca..5f4d832a 100644 --- a/oroshi/doc/html/annotated.html +++ b/oroshi/doc/html/annotated.html @@ -60,7 +60,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/oroshi/doc/html/classes.html b/oroshi/doc/html/classes.html index 902cab2b..4d88659e 100644 --- a/oroshi/doc/html/classes.html +++ b/oroshi/doc/html/classes.html @@ -61,7 +61,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/oroshi/doc/html/classpython_1_1capacitormatrix_1_1CapacitorStack-members.html b/oroshi/doc/html/classpython_1_1capacitormatrix_1_1CapacitorStack-members.html index 9897188c..27ce5ef8 100644 --- a/oroshi/doc/html/classpython_1_1capacitormatrix_1_1CapacitorStack-members.html +++ b/oroshi/doc/html/classpython_1_1capacitormatrix_1_1CapacitorStack-members.html @@ -106,7 +106,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/oroshi/doc/html/classpython_1_1capacitormatrix_1_1CapacitorStack.html b/oroshi/doc/html/classpython_1_1capacitormatrix_1_1CapacitorStack.html index 366c2c24..283ea2d2 100644 --- a/oroshi/doc/html/classpython_1_1capacitormatrix_1_1CapacitorStack.html +++ b/oroshi/doc/html/classpython_1_1capacitormatrix_1_1CapacitorStack.html @@ -706,7 +706,7 @@ Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/oroshi/doc/html/classpython_1_1capacitorrouted_1_1RoutMatchedCapacitor-members.html b/oroshi/doc/html/classpython_1_1capacitorrouted_1_1RoutMatchedCapacitor-members.html index 0069ed33..05d516f2 100644 --- a/oroshi/doc/html/classpython_1_1capacitorrouted_1_1RoutMatchedCapacitor-members.html +++ b/oroshi/doc/html/classpython_1_1capacitorrouted_1_1RoutMatchedCapacitor-members.html @@ -260,7 +260,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/oroshi/doc/html/classpython_1_1capacitorrouted_1_1RoutMatchedCapacitor.html b/oroshi/doc/html/classpython_1_1capacitorrouted_1_1RoutMatchedCapacitor.html index 2fc1280b..a2cba48e 100644 --- a/oroshi/doc/html/classpython_1_1capacitorrouted_1_1RoutMatchedCapacitor.html +++ b/oroshi/doc/html/classpython_1_1capacitorrouted_1_1RoutMatchedCapacitor.html @@ -941,7 +941,7 @@ Layout
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/oroshi/doc/html/classpython_1_1capacitorunit_1_1CapacitorUnit-members.html b/oroshi/doc/html/classpython_1_1capacitorunit_1_1CapacitorUnit-members.html index 7c5493cd..57d420d6 100644 --- a/oroshi/doc/html/classpython_1_1capacitorunit_1_1CapacitorUnit-members.html +++ b/oroshi/doc/html/classpython_1_1capacitorunit_1_1CapacitorUnit-members.html @@ -94,7 +94,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/oroshi/doc/html/classpython_1_1capacitorunit_1_1CapacitorUnit.html b/oroshi/doc/html/classpython_1_1capacitorunit_1_1CapacitorUnit.html index 7d143fc6..47051529 100644 --- a/oroshi/doc/html/classpython_1_1capacitorunit_1_1CapacitorUnit.html +++ b/oroshi/doc/html/classpython_1_1capacitorunit_1_1CapacitorUnit.html @@ -1561,7 +1561,7 @@ An exception is raised if the entered capacitor type is unknown.
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/oroshi/doc/html/classpython_1_1capacitorvrtracks_1_1VerticalRoutingTracks-members.html b/oroshi/doc/html/classpython_1_1capacitorvrtracks_1_1VerticalRoutingTracks-members.html index b7b474ed..d1a702a3 100644 --- a/oroshi/doc/html/classpython_1_1capacitorvrtracks_1_1VerticalRoutingTracks-members.html +++ b/oroshi/doc/html/classpython_1_1capacitorvrtracks_1_1VerticalRoutingTracks-members.html @@ -150,7 +150,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/oroshi/doc/html/classpython_1_1capacitorvrtracks_1_1VerticalRoutingTracks.html b/oroshi/doc/html/classpython_1_1capacitorvrtracks_1_1VerticalRoutingTracks.html index 4d6d75d0..eaf2cc3e 100644 --- a/oroshi/doc/html/classpython_1_1capacitorvrtracks_1_1VerticalRoutingTracks.html +++ b/oroshi/doc/html/classpython_1_1capacitorvrtracks_1_1VerticalRoutingTracks.html @@ -312,7 +312,7 @@ Layout
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/oroshi/doc/html/classpython_1_1stack_1_1Stack-members.html b/oroshi/doc/html/classpython_1_1stack_1_1Stack-members.html index 9352180c..97a966ec 100644 --- a/oroshi/doc/html/classpython_1_1stack_1_1Stack-members.html +++ b/oroshi/doc/html/classpython_1_1stack_1_1Stack-members.html @@ -56,7 +56,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/oroshi/doc/html/classpython_1_1stack_1_1Stack.html b/oroshi/doc/html/classpython_1_1stack_1_1Stack.html index f92a8f6d..191d9936 100644 --- a/oroshi/doc/html/classpython_1_1stack_1_1Stack.html +++ b/oroshi/doc/html/classpython_1_1stack_1_1Stack.html @@ -314,7 +314,7 @@ Stack Implementation Details
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/oroshi/doc/html/dir_7837fde3ab9c1fb2fc5be7b717af8d79.html b/oroshi/doc/html/dir_7837fde3ab9c1fb2fc5be7b717af8d79.html index 5da8fb1c..c71e89c6 100644 --- a/oroshi/doc/html/dir_7837fde3ab9c1fb2fc5be7b717af8d79.html +++ b/oroshi/doc/html/dir_7837fde3ab9c1fb2fc5be7b717af8d79.html @@ -49,7 +49,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/oroshi/doc/html/functions.html b/oroshi/doc/html/functions.html index d6240f67..b88bdcd6 100644 --- a/oroshi/doc/html/functions.html +++ b/oroshi/doc/html/functions.html @@ -283,7 +283,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/oroshi/doc/html/functions_func.html b/oroshi/doc/html/functions_func.html index ec3ea231..b1fc1dde 100644 --- a/oroshi/doc/html/functions_func.html +++ b/oroshi/doc/html/functions_func.html @@ -283,7 +283,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/oroshi/doc/html/graph_legend.html b/oroshi/doc/html/graph_legend.html index 44cd4069..17df788f 100644 --- a/oroshi/doc/html/graph_legend.html +++ b/oroshi/doc/html/graph_legend.html @@ -74,7 +74,7 @@ A yellow dashed arrow denotes a relation between a template instance and the tem
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/oroshi/doc/html/hierarchy.html b/oroshi/doc/html/hierarchy.html index 2d107987..f74ed441 100644 --- a/oroshi/doc/html/hierarchy.html +++ b/oroshi/doc/html/hierarchy.html @@ -57,7 +57,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/oroshi/doc/html/index.html b/oroshi/doc/html/index.html index 45cd8881..fdf3a8d9 100644 --- a/oroshi/doc/html/index.html +++ b/oroshi/doc/html/index.html @@ -45,7 +45,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/oroshi/doc/latex/refman.tex b/oroshi/doc/latex/refman.tex index 8afd5521..5e2ee813 100644 --- a/oroshi/doc/latex/refman.tex +++ b/oroshi/doc/latex/refman.tex @@ -34,7 +34,7 @@ \vspace*{1cm} {\large Generated by Doxygen 1.8.14}\\ \vspace*{0.5cm} - {\small Thu Nov 12 2020 13:59:55}\\ + {\small Fri Oct 1 2021 19:23:16}\\ \end{center} \end{titlepage} diff --git a/oroshi/doc/man/man3/python_capacitormatrix_CapacitorStack.3 b/oroshi/doc/man/man3/python_capacitormatrix_CapacitorStack.3 index f2ee82b2..1e731d56 100644 --- a/oroshi/doc/man/man3/python_capacitormatrix_CapacitorStack.3 +++ b/oroshi/doc/man/man3/python_capacitormatrix_CapacitorStack.3 @@ -1,4 +1,4 @@ -.TH "CapacitorStack" 3 "Thu Nov 12 2020" "Version 1.0" "Oroshi - Analog Devices Layout" \" -*- nroff -*- +.TH "CapacitorStack" 3 "Fri Oct 1 2021" "Version 1.0" "Oroshi - Analog Devices Layout" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/oroshi/doc/man/man3/python_capacitorrouted_RoutMatchedCapacitor.3 b/oroshi/doc/man/man3/python_capacitorrouted_RoutMatchedCapacitor.3 index 76a1a058..7a008f2a 100644 --- a/oroshi/doc/man/man3/python_capacitorrouted_RoutMatchedCapacitor.3 +++ b/oroshi/doc/man/man3/python_capacitorrouted_RoutMatchedCapacitor.3 @@ -1,4 +1,4 @@ -.TH "RoutMatchedCapacitor" 3 "Thu Nov 12 2020" "Version 1.0" "Oroshi - Analog Devices Layout" \" -*- nroff -*- +.TH "RoutMatchedCapacitor" 3 "Fri Oct 1 2021" "Version 1.0" "Oroshi - Analog Devices Layout" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/oroshi/doc/man/man3/python_capacitorunit_CapacitorUnit.3 b/oroshi/doc/man/man3/python_capacitorunit_CapacitorUnit.3 index 6b8c06ce..162b5c70 100644 --- a/oroshi/doc/man/man3/python_capacitorunit_CapacitorUnit.3 +++ b/oroshi/doc/man/man3/python_capacitorunit_CapacitorUnit.3 @@ -1,4 +1,4 @@ -.TH "CapacitorUnit" 3 "Thu Nov 12 2020" "Version 1.0" "Oroshi - Analog Devices Layout" \" -*- nroff -*- +.TH "CapacitorUnit" 3 "Fri Oct 1 2021" "Version 1.0" "Oroshi - Analog Devices Layout" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/oroshi/doc/man/man3/python_capacitorvrtracks_VerticalRoutingTracks.3 b/oroshi/doc/man/man3/python_capacitorvrtracks_VerticalRoutingTracks.3 index 0b567eed..73876e09 100644 --- a/oroshi/doc/man/man3/python_capacitorvrtracks_VerticalRoutingTracks.3 +++ b/oroshi/doc/man/man3/python_capacitorvrtracks_VerticalRoutingTracks.3 @@ -1,4 +1,4 @@ -.TH "VerticalRoutingTracks" 3 "Thu Nov 12 2020" "Version 1.0" "Oroshi - Analog Devices Layout" \" -*- nroff -*- +.TH "VerticalRoutingTracks" 3 "Fri Oct 1 2021" "Version 1.0" "Oroshi - Analog Devices Layout" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/oroshi/doc/man/man3/python_stack_Stack.3 b/oroshi/doc/man/man3/python_stack_Stack.3 index a3674ff1..1e83c1e7 100644 --- a/oroshi/doc/man/man3/python_stack_Stack.3 +++ b/oroshi/doc/man/man3/python_stack_Stack.3 @@ -1,4 +1,4 @@ -.TH "Stack" 3 "Thu Nov 12 2020" "Version 1.0" "Oroshi - Analog Devices Layout" \" -*- nroff -*- +.TH "Stack" 3 "Fri Oct 1 2021" "Version 1.0" "Oroshi - Analog Devices Layout" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/oroshi/doc/rtf/refman.rtf b/oroshi/doc/rtf/refman.rtf index 4387538c..c735a671 100644 --- a/oroshi/doc/rtf/refman.rtf +++ b/oroshi/doc/rtf/refman.rtf @@ -86,7 +86,7 @@ 1.0 \par }}Oroshi - Analog Devices Layout} {\comment Generated byDoxgyen. } -{\creatim \yr2020\mo11\dy12\hr13\min59\sec55} +{\creatim \yr2021\mo10\dy1\hr19\min23\sec16} }\pard\plain \sectd\pgnlcrm {\footer \s29\widctlpar\tqc\tx4320\tqr\tx8640\qr\adjustright \fs20\cgrid {\chpgn}} @@ -99,7 +99,7 @@ \par\par\par\par\par\par\par\par\par\par\par\par \pard\plain \s16\qc\sa60\widctlpar\outlinelevel1\adjustright \f1\cgrid {\field\fldedit {\*\fldinst AUTHOR \\*MERGEFORMAT}{\fldrslt AUTHOR}}\par -Version 1.0\par{\field\fldedit {\*\fldinst CREATEDATE \\*MERGEFORMAT}{\fldrslt Thu Nov 12 2020 }}\par +Version 1.0\par{\field\fldedit {\*\fldinst CREATEDATE \\*MERGEFORMAT}{\fldrslt Fri Oct 1 2021 }}\par \page\page\vertalt \pard\plain \s1\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs36\kerning36\cgrid Table of Contents\par diff --git a/oroshi/python/CMakeLists.txt b/oroshi/python/CMakeLists.txt index 20145413..98c2c131 100644 --- a/oroshi/python/CMakeLists.txt +++ b/oroshi/python/CMakeLists.txt @@ -18,7 +18,7 @@ resistor.py ) - install( FILES ${pythonFiles} DESTINATION ${PYTHON_SITE_PACKAGES}/oroshi ) + install( FILES ${pythonFiles} DESTINATION ${Python_CORIOLISLIB}/oroshi ) #if(BUILD_DOC) diff --git a/oroshi/python/__init__.py b/oroshi/python/__init__.py index af7a1b63..0178f575 100644 --- a/oroshi/python/__init__.py +++ b/oroshi/python/__init__.py @@ -32,6 +32,6 @@ def adjustOnGrid ( unit, mode='upper' ): elif mode == 'lower': return DbU.getOnPhysicalGrid(unit, DbU.SnapModeInferior) elif mode == 'near' : return DbU.getOnPhysicalGrid(unit, DbU.SnapModeNearest ) else: - print '[ERROR] oroshi.adjustOnGrid(): "%s" is not a valid mode.' % mode - print ' ("upper", "lower" or "near")' + print( '[ERROR] oroshi.adjustOnGrid(): "{}" is not a valid mode.'.format(mode) ) + print( ' ("upper", "lower" or "near")' ) return 0 diff --git a/oroshi/python/dtr.py b/oroshi/python/dtr.py index 1db8c94a..bafa81c0 100644 --- a/oroshi/python/dtr.py +++ b/oroshi/python/dtr.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import print_function from Hurricane import DbU from helpers import trace @@ -99,7 +98,7 @@ class Rules ( object ): return def addAttr ( self, attribute ): - if self.__dict__.has_key(attribute): return + if attribute in self.__dict__: return #print( 'Rules.addAttr(): {}'.format(attribute) ) value = None @@ -120,7 +119,7 @@ class Rules ( object ): else: value = rule.getValue() #print( 'Accessed value (DbU):{}'.format(DbU.getValueString(value)) ) - except Exception, e: + except Exception as e: print( e ) if not value is None: diff --git a/oroshi/python/paramsmatrix.py b/oroshi/python/paramsmatrix.py index 70e01146..0ecb2660 100644 --- a/oroshi/python/paramsmatrix.py +++ b/oroshi/python/paramsmatrix.py @@ -70,16 +70,16 @@ class ParamsMatrix ( object ): def setStacks ( self, stacks ): if not isinstance(stacks,list): - print Error( 3, 'ParamsMatrix::setGlobalParams(): argument must be of type.' ) + print( Error( 3, 'ParamsMatrix::setGlobalParams(): argument must be of type.' )) return if not len(stacks): - print Error( 3, 'ParamsMatrix::setGlobalParams(): There must be at least one Stack.' ) + print( Error( 3, 'ParamsMatrix::setGlobalParams(): There must be at least one Stack.' )) return mtIds = [] if len(stacks[0].metaTransistors) == 0: - print Error( 3, 'ParamsMatrix::setGlobalParams(): Stack without any meta-transistor.' ) + print( Error( 3, 'ParamsMatrix::setGlobalParams(): Stack without any meta-transistor.' )) return else: for gateName in stacks[0].metaTransistors.keys(): @@ -88,15 +88,15 @@ class ParamsMatrix ( object ): for i in range(1,len(stacks)): if len(stacks[0].metaTransistors) != len(stacks[i].metaTransistors): - print Error( 3, 'ParamsMatrix::setGlobalParams(): Stacks %d and %d' \ - ' have different numbers of meta-transistor.' % (0,i) ) + print( Error( 3, 'ParamsMatrix::setGlobalParams(): Stacks {} and {}' \ + ' have different numbers of meta-transistor.'.format(0,i) )) return for id in mtIds: gateName = ParamsMatrix.idToGate( id ) - if not stacks[i].metaTransistors.has_key(gateName): - print Error( 3, 'ParamsMatrix::setGlobalParams(): Stack %d ' \ - ' is missing meta-transistor "%s".' % (i,gateName) ) + if not gateName in stacks[i].metaTransistors: + print( Error( 3, 'ParamsMatrix::setGlobalParams(): Stack {} ' \ + ' is missing meta-transistor "{}".'.format(i,gateName) )) return # Thoses parameters must be the same in all the stacks. diff --git a/oroshi/python/stack.py b/oroshi/python/stack.py index a19c2fd1..22df423b 100644 --- a/oroshi/python/stack.py +++ b/oroshi/python/stack.py @@ -73,7 +73,7 @@ class Wiring ( object ): self.wTrack = 1 if len(chain) >= 3: self.wTrack = int(chain[2]) length = len(side) - for i in range( 0, length/2, 2 ): + for i in range( 0, length//2, 2 ): track = -2 if side[i+1] != 'X': track = int( side[i+1] ) @@ -237,22 +237,22 @@ class Bulk ( object ): , metal1 , self.axis , width - , xsource-self.stack.wire1Width/2 - , xtarget+self.stack.wire1Width/2 ) + , xsource-self.stack.wire1Width//2 + , xtarget+self.stack.wire1Width//2 ) width = self.stack.minWidth_cut0 + 2* self.stack.minEnclosure_active_cut0 Horizontal.create( bulkNet , active , self.axis , width - , self.usource-width/2 - , self.utarget+width/2 ) + , self.usource-width//2 + , self.utarget+width//2 ) width += 2* self.stack.minEnclosure_bImplant_active Horizontal.create( bulkNet , self.stack.bImplantLayer , self.axis , width - , self.usource-width/2 - , self.utarget+width/2 ) + , self.usource-width//2 + , self.utarget+width//2 ) for xcontact, enabled in self.ucontactsBulk: if enabled: @@ -288,17 +288,17 @@ class Bulk ( object ): cutBb = Box( xcontact, self.axis, xcontact, self.axis ) - metal1EnclBb = Box( cutBb ).inflate( self.stack.minEnclosure_metal1_cut1 + self.stack.minWidth_cut1/2 ) + metal1EnclBb = Box( cutBb ).inflate( self.stack.minEnclosure_metal1_cut1 + self.stack.minWidth_cut1//2 ) Pad.create( bulkNet, metal1, metal1EnclBb ) - metal2EnclBb = Box( cutBb ).inflate( self.stack.minEnclosure_metal2_cut1 + self.stack.minWidth_cut1/2 ) + metal2EnclBb = Box( cutBb ).inflate( self.stack.minEnclosure_metal2_cut1 + self.stack.minWidth_cut1//2 ) if self.stack.isVH: - metal2EnclBb.merge( Box( cutBb ).inflate( self.stack.minEnclosure_metal2_cut2 + self.stack.minWidth_cut2/2 ) ) + metal2EnclBb.merge( Box( cutBb ).inflate( self.stack.minEnclosure_metal2_cut2 + self.stack.minWidth_cut2//2 ) ) Pad.create( bulkNet, metal2, metal2EnclBb ) if self.stack.isVH: - metal3EnclBb = Box( cutBb ).inflate( self.stack.minEnclosure_metal3_cut2 + self.stack.minWidth_cut2/2 ) + metal3EnclBb = Box( cutBb ).inflate( self.stack.minEnclosure_metal3_cut2 + self.stack.minWidth_cut2//2 ) Pad.create( bulkNet, metal3, metal3EnclBb ) if self.flags & (Stack.EastBulk | Stack.WestBulk): @@ -310,22 +310,22 @@ class Bulk ( object ): , metal1 , self.axis , metal1Width - , self.usource-self.stack.wire1Width/2 - , self.utarget+self.stack.wire1Width/2 ) + , self.usource-self.stack.wire1Width//2 + , self.utarget+self.stack.wire1Width//2 ) width = self.stack.minWidth_cut0 + 2*self.stack.minEnclosure_active_cut0 Vertical.create( bulkNet , active , self.axis , width - , self.usource-width/2 - , self.utarget+width/2 ) + , self.usource-width//2 + , self.utarget+width//2 ) width += 2*self.stack.minEnclosure_bImplant_active Vertical.create( bulkNet , self.stack.bImplantLayer , self.axis , width - , self.usource-width/2 - , self.utarget+width/2 ) + , self.usource-width//2 + , self.utarget+width//2 ) for icontact in range(len(self.ucontacts)): if (icontact == 0 and self.stack.hasSouthBulk()) \ @@ -480,7 +480,7 @@ class Stack ( object ): def __setattr__ ( self, attribute, value ): if hasattr(Stack.rules,attribute): - print '[ERROR] Stack.%s attribute is read-only (ignored).' % attribute + print( '[ERROR] Stack.{} attribute is read-only (ignored).'.format(attribute) ) return self.__dict__[attribute] = value return @@ -502,7 +502,7 @@ class Stack ( object ): return getattr(Stack.rules,attribute) - if self.__dict__.has_key(attribute): return self.__dict__[attribute] + if attribute in self.__dict__: return self.__dict__[attribute] return None @@ -559,7 +559,7 @@ class Stack ( object ): # Modes 9 & 10 are not clear to me, but we shouldn't need it ever. if geomod in [0, 4, 6, 8] and nf%2 == 0: - print '[WARNING] Stack.toGeomod(): In geomod %i, NF must be odd (%i)' % (geomod,nf) + print( '[WARNING] Stack.toGeomod(): In geomod {}, NF must be odd ({})'.format(geomod,nf)) return geomod @@ -578,7 +578,7 @@ class Stack ( object ): def __init__ ( self, device, NERC, NIRC ): self.dimensioned = False self.device = device - self.w = oroshi.adjustOnGrid(device.getW() / device.getM()) + self.w = oroshi.adjustOnGrid(device.getW() // device.getM()) self.L = oroshi.adjustOnGrid(device.getL()) self.NDs = device.getExternalDummy() # Number of Dummies at each end of the stack. self.NFs = device.getM() * self.metaTnb() + self.NDs*2 # Total number of Fingers (including dummies). @@ -733,7 +733,7 @@ class Stack ( object ): # MIN means "minimize the number of sources", so according to the # number of transistor fingers, it is almost equivalent to # "drain first". - if not self.metaTransistors.has_key(gateName): + if not gateName in self.metaTransistors: MIN = 0 if self.wirings[i-1].isDrain(): MIN = 1 @@ -769,14 +769,14 @@ class Stack ( object ): if mt['MIN']: mt['style.NDend'] = 2 mt['style.NSend'] = 0 - mt['style.NDint'] = (nf/2 - 1)*2 + mt['style.NDint'] = (nf//2 - 1)*2 mt['style.NSint'] = nf if mt['leftMost'] or mt['rightMost']: geoFlags |= Stack.DrainIsolated else: geoFlags |= Stack.DrainShared else: mt['style.NDend'] = 0 mt['style.NSend'] = 2 - mt['style.NSint'] = (nf/2 - 1)*2 + mt['style.NSint'] = (nf//2 - 1)*2 mt['style.NDint'] = nf if mt['leftMost'] or mt['rightMost']: geoFlags |= Stack.SourceIsolated else: geoFlags |= Stack.SourceShared @@ -840,7 +840,7 @@ class Stack ( object ): def getLastTopWTracks ( self ): return self.topWTracks[self.topTracksNb()-2] def getLastBotWTracks ( self ): return self.botWTracks[self.botTracksNb()-2] def getHorizontalWidth ( self, trackSpan ): return (self.horPitch * (trackSpan - 1)) - def getHorizontalAxis ( self, trackSpan ): return self.getHorizontalWidth(trackSpan)/2 + def getHorizontalAxis ( self, trackSpan ): return self.getHorizontalWidth(trackSpan)//2 def getWiringWidth ( self, wiring, isTopConnect ): if isTopConnect: return self.horPitch * (self.topWTracks[wiring.topTrack] - 1) @@ -850,13 +850,13 @@ class Stack ( object ): def DMCI ( self ): if not self.dimensioned: self.computeDimensions() return self.sideActiveWidth \ - - self.L/2 \ + - self.L//2 \ - self.metal1ToGate \ - - self.eDiffMetal1Width/2 + - self.eDiffMetal1Width//2 def DMCG ( self ): if not self.dimensioned: self.computeDimensions() - return (self.gatePitch - self.L)/2 + return (self.gatePitch - self.L)//2 def DMCGT ( self ): return 0.0 @@ -866,7 +866,7 @@ class Stack ( object ): def DGI ( self ): if not self.dimensioned: self.computeDimensions() - return self.sideActiveWidth - self.L/2 + return self.sideActiveWidth - self.L//2 ## [internal] Compute Stack dimensions from the technological rules. @@ -962,29 +962,29 @@ class Stack ( object ): + self.iDiffMetal1Width \ + max( self.L, gateVia1Side+2*overlap ) self.gatePitch = max( pitch1, pitch2, pitch3 ) - self.metal1ToGate = (self.gatePitch - self.L - self.iDiffMetal1Width) / 2 + self.metal1ToGate = (self.gatePitch - self.L - self.iDiffMetal1Width) // 2 self.sideActiveWidth = self.minEnclosure_active_cut0 \ - self.minEnclosure_metal1_cut0 \ + self.eDiffMetal1Width \ + self.metal1ToGate \ - + self.L/2 + + self.L//2 - hTrackDistance1 = self.minWidth_cut0/2 + self.minSpacing_cut0_active - hTrackDistance2 = self.minWidth_cut0/2 + self.minEnclosure_poly_cut0 + self.minSpacing_poly_active + hTrackDistance1 = self.minWidth_cut0//2 + self.minSpacing_cut0_active + hTrackDistance2 = self.minWidth_cut0//2 + self.minEnclosure_poly_cut0 + self.minSpacing_poly_active self.hTrackDistance = max( hTrackDistance1, hTrackDistance2 ) - vBulkDistance1 = self.minWidth_cut0/2 \ + vBulkDistance1 = self.minWidth_cut0//2 \ + self.minEnclosure_active_cut0 \ + self.minEnclosure_tImplant_active \ + self.minEnclosure_bImplant_active - vBulkDistance2 = self.minWidth_cut0/2 \ + vBulkDistance2 = self.minWidth_cut0//2 \ + self.minEnclosure_active_cut0 \ + self.minSpacing_nImplant_pImplant self.vBulkDistance = max( vBulkDistance1, vBulkDistance2 ) activeHeight = self.w + 2*self.hTrackDistance - self.ypitches = activeHeight / self.horPitch + self.ypitches = activeHeight // self.horPitch if activeHeight % self.horPitch: self.ypitches += 1 if (self.ypitches + self.tracksNbPitch()) % 2: self.ypitches += 1 @@ -993,7 +993,7 @@ class Stack ( object ): if self.flags & Stack.WestBulk: deviceMinWidth += self.vBulkDistance + self.verPitch if self.flags & Stack.EastBulk: deviceMinWidth += self.vBulkDistance + self.verPitch - self.xpitches = deviceMinWidth / self.verPitch + self.xpitches = deviceMinWidth // self.verPitch if self.xpitches % 2: self.xpitches += 1 else: @@ -1002,7 +1002,7 @@ class Stack ( object ): self.activeOffsetY = self.getBotTrackY(0) + self.getHorizontalWidth(self.botWTracks[0]) \ + self.hTrackDistance \ - + (self.ypitches*self.horPitch - activeHeight)/2 \ + + (self.ypitches*self.horPitch - activeHeight)//2 \ self.bbHeight = self.getLastTopTrackY() @@ -1010,7 +1010,7 @@ class Stack ( object ): diffusionRealWidth = self.bbWidth if self.flags & Stack.WestBulk: diffusionRealWidth -= self.vBulkDistance + self.verPitch if self.flags & Stack.EastBulk: diffusionRealWidth -= self.vBulkDistance + self.verPitch - self.activeOffsetX = self.minEnclosure_tImplant_active + (diffusionRealWidth - diffusionWidth)/2 + self.activeOffsetX = self.minEnclosure_tImplant_active + (diffusionRealWidth - diffusionWidth)//2 if self.flags & Stack.WestBulk: self.activeOffsetX += self.vBulkDistance + self.verPitch self.boundingBox = Box( 0, 0, self.bbWidth, self.bbHeight ) @@ -1043,13 +1043,13 @@ class Stack ( object ): self.bulks[1] = Bulk( self, southBulkY, westBulkX, eastBulkX, Stack.SouthBulk ) self.DMCI = oroshi.toUnity( self.sideActiveWidth - - self.L/2 + - self.L//2 - self.metal1ToGate - - self.eDiffMetal1Width/2 ) - self.DMCG = oroshi.toUnity( (self.gatePitch - self.L)/2 ) + - self.eDiffMetal1Width//2 ) + self.DMCG = oroshi.toUnity( (self.gatePitch - self.L)//2 ) self.DMCGT = 0 self.DGG = oroshi.toUnity( self.gatePitch - self.L ) - self.DGI = oroshi.toUnity( self.sideActiveWidth - self.L/2 ) + self.DGI = oroshi.toUnity( self.sideActiveWidth - self.L//2 ) trace( 100, '+' ) trace( 100, '\t +----------------------------------+\n' ) @@ -1107,30 +1107,30 @@ class Stack ( object ): width = self.eDiffMetal1Width axis = self.activeOffsetX \ + self.sideActiveWidth \ - - self.L/2 \ + - self.L//2 \ - self.metal1ToGate \ - - width/2 + - width//2 elif i == self.NFs: # Rightmost diffusion area. NRC = self.NERC width = self.eDiffMetal1Width axis = self.activeOffsetX \ + self.sideActiveWidth \ + self.gatePitch*(self.NFs - 1) \ - + self.L/2 \ + + self.L//2 \ + self.metal1ToGate \ - + width/2 + + width//2 else: # Middle diffusion areas. NRC = self.NIRC width = self.iDiffMetal1Width axis = self.activeOffsetX \ + self.sideActiveWidth \ - - self.gatePitch/2 \ + - self.gatePitch//2 \ + self.gatePitch*i self.drawSourceDrain( axis, self.wirings[2*i], width, NRC ) - capSpacing = self.minSpacing_metal2 + self.minWidth_metal2/2 - capSpacing = max( capSpacing, self.minSpacing_metal3 + self.minWidth_metal3/2 ) + capSpacing = self.minSpacing_metal2 + self.minWidth_metal2//2 + capSpacing = max( capSpacing, self.minSpacing_metal3 + self.minWidth_metal3//2 ) metal2 = DataBase.getDB().getTechnology().getLayer( 'metal2' ) metal3 = DataBase.getDB().getTechnology().getLayer( 'metal3' ) @@ -1196,14 +1196,14 @@ class Stack ( object ): active = DataBase.getDB().getTechnology().getLayer( 'active' ) width = self.w length = (self.NFs - 1) * self.gatePitch + 2*self.sideActiveWidth - axis = width / 2 + axis = width // 2 xoffset = self.activeOffsetX yoffset = self.activeOffsetY segment = Horizontal.create( activeNet, active, yoffset+axis, width, xoffset, xoffset+length ) width = width + 2*self.minEnclosure_tImplant_active length = length + 2*self.minEnclosure_tImplant_active - axis = width / 2 + axis = width // 2 xoffset = self.activeOffsetX - self.minEnclosure_tImplant_active yoffset = self.activeOffsetY - self.minEnclosure_tImplant_active segment = Horizontal.create( tImplantNet @@ -1244,9 +1244,9 @@ class Stack ( object ): contactHeight = self.minWidth_cut0 + 2*self.minEnclosure_poly_cut0 contactWidth = max( contactHeight, self.L ) - contactsNb = (contactWidth - 2*self.minEnclosure_poly_cut0) / self.gateVia1Pitch + contactsNb = (contactWidth - 2*self.minEnclosure_poly_cut0) // self.gateVia1Pitch if contactsNb: - contactPitch = contactWidth / contactsNb + contactPitch = contactWidth // contactsNb else: contactsNb = 1 contactPitch = self.L @@ -1259,22 +1259,22 @@ class Stack ( object ): isTopConnect = connector[2] yoffset = connector[1] - xcontact = axis - self.L/2 + contactPitch/2 - contactBb = Box( axis, yoffset ).inflate( contactWidth/2, contactHeight/2) + xcontact = axis - self.L//2 + contactPitch//2 + contactBb = Box( axis, yoffset ).inflate( contactWidth//2, contactHeight//2) width = gateVia1Side + 2*gateVia1Overlap + self.getWiringWidth(wiring, isTopConnect) - y = yoffset + self.getWiringWidth(wiring, isTopConnect)/2 + y = yoffset + self.getWiringWidth(wiring, isTopConnect)//2 rowHeight = self.horPitch if isTopConnect: - contactBb = Box( axis, yoffset ).inflate( contactWidth/2, contactHeight/2+self.getWiringWidth(wiring, isTopConnect)) + contactBb = Box( axis, yoffset ).inflate( contactWidth//2, contactHeight//2+self.getWiringWidth(wiring, isTopConnect)) Pad.create( wiring.net, gate, contactBb ) # GateExtension Contact Horizontal.create( wiring.net , metal1 , y , width - , xcontact - gateVia1Side/2 - gateVia1Overlap - , xcontact + (contactsNb-1)*contactPitch + gateVia1Side/2 + gateVia1Overlap )# M1 area + , xcontact - gateVia1Side//2 - gateVia1Overlap + , xcontact + (contactsNb-1)*contactPitch + gateVia1Side//2 + gateVia1Overlap )# M1 area cut1Bb = Box() @@ -1284,13 +1284,13 @@ class Stack ( object ): else: rangeWidth = range(self.botWTracks[wiring.botTrack]) for j in rangeWidth: - contactBb = Box( xcontact, yoffset ).inflate( self.minWidth_cut0/2 ) + contactBb = Box( xcontact, yoffset ).inflate( self.minWidth_cut0//2 ) Pad.create( wiring.net, cut0, contactBb ) - contactBb = Box( xcontact, yoffset ).inflate( self.minWidth_cut1/2 ) + contactBb = Box( xcontact, yoffset ).inflate( self.minWidth_cut1//2 ) Pad.create( wiring.net, cut1, contactBb ) cut1Bb.merge( contactBb ) if self.isVH: - contactBb = Box( xcontact, yoffset ).inflate( self.minWidth_cut2/2 ) + contactBb = Box( xcontact, yoffset ).inflate( self.minWidth_cut2//2 ) Pad.create( wiring.net, cut2, contactBb ) cut2Bb.merge( contactBb ) yoffset += rowHeight @@ -1324,12 +1324,12 @@ class Stack ( object ): cut0 = DataBase.getDB().getTechnology().getLayer( 'cut0' ) cut1 = DataBase.getDB().getTechnology().getLayer( 'cut1' ) cut2 = DataBase.getDB().getTechnology().getLayer( 'cut2' ) - rows = max( 1, (self.w - 2*self.minEnclosure_active_cut0) / self.contactDiffPitch ) - ypitch = self.w / rows - yoffset = self.activeOffsetY + ypitch/2 + rows = max( 1, (self.w - 2*self.minEnclosure_active_cut0) // self.contactDiffPitch ) + ypitch = self.w // rows + yoffset = self.activeOffsetY + ypitch//2 xpitch = self.contactDiffPitch ypitch2 = self.horPitch - xoffset = axis - (self.contactDiffPitch * (cols - 1))/2 + xoffset = axis - (self.contactDiffPitch * (cols - 1))//2 if self.w < 2*self.minEnclosure_active_cut0 + self.minWidth_cut0: active = DataBase.getDB().getTechnology().getLayer( 'active' ) @@ -1377,11 +1377,11 @@ class Stack ( object ): , xoffset + xpitch *(cols - 1) , ytarget + ypitch2*(self.topWTracks[wiring.topTrack] - 1) ) - metal2EnclBb = Box( cutBb ).inflate( self.minEnclosure_metal2_cut1 + self.minWidth_cut1/2 ) - metal2EnclBb.merge( Box( cutBb ).inflate( self.minEnclosure_metal2_cut2 + self.minWidth_cut2/2 ) ) + metal2EnclBb = Box( cutBb ).inflate( self.minEnclosure_metal2_cut1 + self.minWidth_cut1//2 ) + metal2EnclBb.merge( Box( cutBb ).inflate( self.minEnclosure_metal2_cut2 + self.minWidth_cut2//2 ) ) Pad.create( wiring.net, metal2, metal2EnclBb ) - metal3EnclBb = Box( cutBb ).inflate( self.minEnclosure_metal3_cut2 + self.minWidth_cut2/2 ) + metal3EnclBb = Box( cutBb ).inflate( self.minEnclosure_metal3_cut2 + self.minWidth_cut2//2 ) Pad.create( wiring.net, metal3, metal3EnclBb ) ytarget += ypitch2*(self.topWTracks[wiring.topTrack]-1) @@ -1417,11 +1417,11 @@ class Stack ( object ): , xoffset + xpitch *(cols - 1) , ysource + ypitch2*(self.botWTracks[wiring.botTrack] - 1) ) - metal2EnclBb = Box( cutBb ).inflate( self.minEnclosure_metal2_cut1 + self.minWidth_cut1/2 ) - metal2EnclBb.merge( Box( cutBb ).inflate( self.minEnclosure_metal2_cut2 + self.minWidth_cut2/2 ) ) + metal2EnclBb = Box( cutBb ).inflate( self.minEnclosure_metal2_cut1 + self.minWidth_cut1//2 ) + metal2EnclBb.merge( Box( cutBb ).inflate( self.minEnclosure_metal2_cut2 + self.minWidth_cut2//2 ) ) Pad.create( wiring.net, metal2, metal2EnclBb ) - metal3EnclBb = Box( cutBb ).inflate( self.minEnclosure_metal3_cut2 + self.minWidth_cut2/2 ) + metal3EnclBb = Box( cutBb ).inflate( self.minEnclosure_metal3_cut2 + self.minWidth_cut2//2 ) Pad.create( wiring.net, metal3, metal3EnclBb ) else: ysource = yoffset diff --git a/oroshi/python/wip_csp.py b/oroshi/python/wip_csp.py index 39305982..311259f0 100644 --- a/oroshi/python/wip_csp.py +++ b/oroshi/python/wip_csp.py @@ -14,7 +14,7 @@ try: import oroshi import oroshi.paramsmatrix import oroshi.stack -except Exception, e: +except Exception as e: helpers.io.catch( e ) @@ -26,7 +26,7 @@ def checkCoherency ( device, bbMode ): W = device.getParameter( 'W' ).getValue() M = device.getParameter( 'M' ).getValue() - mMax = W / rules.transistorMinW + mMax = W // rules.transistorMinW if M > mMax: message += \ ' W/M ratio must be greater than transistor minimal width (%s)\n' \ @@ -76,7 +76,7 @@ def layout ( device, bbMode ): westWirings = westWirings + 'S.b1.{Sw} ' mintWirings = '' - for i in range( (M / device.getMint())*2 ): + for i in range( (M // device.getMint())*2 ): if (i + remain) % 2: mintWirings += 'G.b0.{Gw} D2.t1.{D2w} G.b0.{Gw} S.b1.{Sw} ' else: mintWirings += 'G.b0.{Gw} D1.t0.{D1w} G.b0.{Gw} S.b1.{Sw} ' diff --git a/oroshi/python/wip_dp.py b/oroshi/python/wip_dp.py index f915e816..30cc3ebf 100644 --- a/oroshi/python/wip_dp.py +++ b/oroshi/python/wip_dp.py @@ -14,7 +14,7 @@ try: import oroshi import oroshi.paramsmatrix import oroshi.stack -except Exception, e: +except Exception as e: helpers.io.catch( e ) @@ -26,7 +26,7 @@ def checkCoherency ( device, bbMode ): W = device.getParameter( 'W' ).getValue() M = device.getParameter( 'M' ).getValue() - mMax = W / rules.transistorMinW + mMax = W // rules.transistorMinW if M > mMax: message += \ ' W/M ratio must be greater than transistor minimal width (%s)\n' \ @@ -79,7 +79,7 @@ def layout ( device, bbMode ): mintWirings = '' - for i in range( (M / device.getMint())*2 ): + for i in range( (M // device.getMint())*2 ): if (i + remain) % 2: mintWirings += 'G2.t0.{G2w} D2.t1.{D2w} G2.t0.{G2w} S.b2.{Sw} ' else: mintWirings += 'G1.b0.{G1w} D1.b1.{D1w} G1.b0.{G1w} S.b2.{Sw} ' diff --git a/oroshi/python/wip_transistor.py b/oroshi/python/wip_transistor.py index a5dd63eb..8b008ea5 100644 --- a/oroshi/python/wip_transistor.py +++ b/oroshi/python/wip_transistor.py @@ -15,7 +15,7 @@ try: import oroshi import oroshi.paramsmatrix import oroshi.stack -except Exception, e: +except Exception as e: helpers.io.catch( e ) @@ -28,7 +28,7 @@ def checkCoherency ( device, bbMode ): w = device.getParameter( 'W' ).getValue() M = device.getParameter( 'M' ).getValue() - mMax = w / rules.transistorMinW + mMax = w // rules.transistorMinW if M > mMax: message += \ ' W/M ratio must be greater than transistor minimal width (%s)\n' \ @@ -36,7 +36,7 @@ def checkCoherency ( device, bbMode ): % DbU.getValueString(rules.transistorMinW) return (False, message) - except Exception, e: + except Exception as e: helpers.io.catch( e ) return (False, message) @@ -96,7 +96,7 @@ def layout ( device, bbMode ): trace( 100, '++' ) paramsMatrix.trace() - except Exception, e: + except Exception as e: helpers.io.catch( e ) trace( 100, '---' ) diff --git a/solstice/CMakeLists.txt b/solstice/CMakeLists.txt index 62eabe4f..99ae70f4 100644 --- a/solstice/CMakeLists.txt +++ b/solstice/CMakeLists.txt @@ -6,16 +6,16 @@ cmake_minimum_required(VERSION 2.8.9) set(ignoreVariables "${BUILD_DOC} ${CMAKE_INSTALL_DIR}") + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) setup_project_paths(CORIOLIS) set_cmake_policies() - setup_boost(program_options filesystem python regex) + setup_boost(program_options) setup_qt() - find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) find_package(EQUINOX REQUIRED) diff --git a/stratus1/CMakeLists.txt b/stratus1/CMakeLists.txt index 9ad4ef38..4ff8d5ae 100644 --- a/stratus1/CMakeLists.txt +++ b/stratus1/CMakeLists.txt @@ -6,8 +6,9 @@ #option(BUILD_DOC "Build the documentation (latex2html)" OFF) set(ignoreVariables "${BUILD_DOC}" "${CMAKE_INSTALL_DIR}") + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) - cmake_minimum_required(VERSION 2.4.0) + cmake_minimum_required(VERSION 2.8.0) list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) setup_project_paths(CORIOLIS) @@ -18,11 +19,10 @@ cmake_policy(SET CMP0002 OLD) setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") - find_package(PythonLibs 2 REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) - find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) - find_package(CORIOLIS REQUIRED) + find_package(CORIOLIS REQUIRED) add_subdirectory(src) add_subdirectory(etc) diff --git a/stratus1/src/dpgen/CMakeLists.txt b/stratus1/src/dpgen/CMakeLists.txt index 53f37ae8..887c6002 100644 --- a/stratus1/src/dpgen/CMakeLists.txt +++ b/stratus1/src/dpgen/CMakeLists.txt @@ -13,4 +13,4 @@ ${CMAKE_CURRENT_SOURCE_DIR}/ROM_encours.py ) - install ( FILES ${pysources} DESTINATION ${PYTHON_SITE_PACKAGES}/stratus ) + install ( FILES ${pysources} DESTINATION ${Python_CORIOLISLIB}/stratus ) diff --git a/stratus1/src/dpgen/ROM_encours.py b/stratus1/src/dpgen/ROM_encours.py index d833a94c..f25e2b2d 100644 --- a/stratus1/src/dpgen/ROM_encours.py +++ b/stratus1/src/dpgen/ROM_encours.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -113,13 +112,13 @@ class dpgen_ROM ( Model ) : elif nword == 512 : adrange = 9 elif nword == 1024 : adrange = 10 else : - print "Error : DPGEN_ROM" - print "The word number (nword := %d) ", nword, "can only takes values : 64, 128, 256, 512 or 1024.\n" + print( "Error : DPGEN_ROM" ) + print( "The word number (nword := %d) ", nword, "can only takes values : 64, 128, 256, 512 or 1024.\n" ) sys.exit ( 3 ) if nbit % 4 != 0 or nbit > 64 or nbit < 4 : - print "Error : DPGEN_ROM\n" - print "The bus width (nbit := %d) ", nbit, "must be multiple of 4 and no larger than 64.\n" + print( "Error : DPGEN_ROM\n" ) + print( "The bus width (nbit := %d) ", nbit, "must be multiple of 4 and no larger than 64.\n" ) sys.exit ( 3 ) ck = LogicIn ( "ck", 1 ) @@ -689,8 +688,8 @@ class dpgen_ROM ( Model ) : # if nword > 128 : y2 = ( nbit + 9 ) * HCELL # else : y2 = ( nbit + 8 ) * HCELL # -# if type == 0 : x2 = ( nword / 64 * 50 ) + 150 -# else : x2 = ( nword / 64 * 50 ) + 170 +# if type == 0 : x2 = ( nword // 64 * 50 ) + 150 +# else : x2 = ( nword // 64 * 50 ) + 170 # # # alimentations verticales ALU3 # LV_name.PHSEG ( CALU3,12, "vdd", 10, 0, 10, y2) @@ -698,19 +697,19 @@ class dpgen_ROM ( Model ) : # LV_name.PHSEG ( CALU3, 2, "vss", 30, 0, 30, y2) # # for j in range ( 0, nword, 64 ) : -# LV_name.PHSEG ( CALU3, 2, "vss", 55 + ( 50 * j / 64 ), 0, 55 + ( 50 * j / 64 ), y2 ) -# LV_name.PHSEG ( CALU3, 2, "vss", 80 + ( 50 * j / 64 ), 0, 80 + ( 50 * j / 64 ), y2 ) +# LV_name.PHSEG ( CALU3, 2, "vss", 55 + ( 50 * j // 64 ), 0, 55 + ( 50 * j // 64 ), y2 ) +# LV_name.PHSEG ( CALU3, 2, "vss", 80 + ( 50 * j // 64 ), 0, 80 + ( 50 * j // 64 ), y2 ) # # if type == 0 : -# LV_name.PHSEG ( CALU3, 2, "vss", 125 + ( nword / 64 * 50 ), 0, 125 + ( nword / 64 * 50 ), y1 ) -# LV_name.PHSEG ( CALU3, 2, "vdd", 135 + ( nword / 64 * 50 ), 0, 135 + ( nword / 64 * 50 ), y1 ) -# LV_name.PHSEG ( CALU3, 2, "vdd", 145 + ( nword / 64 * 50 ), 0, 145 + ( nword / 64 * 50 ), y1 ) +# LV_name.PHSEG ( CALU3, 2, "vss", 125 + ( nword // 64 * 50 ), 0, 125 + ( nword // 64 * 50 ), y1 ) +# LV_name.PHSEG ( CALU3, 2, "vdd", 135 + ( nword // 64 * 50 ), 0, 135 + ( nword // 64 * 50 ), y1 ) +# LV_name.PHSEG ( CALU3, 2, "vdd", 145 + ( nword // 64 * 50 ), 0, 145 + ( nword // 64 * 50 ), y1 ) # # else : -# LV_name.PHSEG ( CALU3, 2, "vss", 135 + ( nword / 64 * 50 ), 0, 135 + ( nword / 64 * 50 ), y1 ) -# LV_name.PHSEG ( CALU3, 2, "vdd", 145 + ( nword / 64 * 50 ), 0, 145 + ( nword / 64 * 50 ), y1 ) -# LV_name.PHSEG ( CALU3, 2, "vss", 155 + ( nword / 64 * 50 ), 0, 155 + ( nword / 64 * 50 ), y2 ) -# LV_name.PHSEG ( CALU3, 2, "vdd", 165 + ( nword / 64 * 50 ), 0, 165 + ( nword / 64 * 50 ), y2 ) +# LV_name.PHSEG ( CALU3, 2, "vss", 135 + ( nword // 64 * 50 ), 0, 135 + ( nword // 64 * 50 ), y1 ) +# LV_name.PHSEG ( CALU3, 2, "vdd", 145 + ( nword // 64 * 50 ), 0, 145 + ( nword // 64 * 50 ), y1 ) +# LV_name.PHSEG ( CALU3, 2, "vss", 155 + ( nword // 64 * 50 ), 0, 155 + ( nword // 64 * 50 ), y2 ) +# LV_name.PHSEG ( CALU3, 2, "vdd", 165 + ( nword // 64 * 50 ), 0, 165 + ( nword // 64 * 50 ), y2 ) # # # alimemtations horizontales ALU2 # for i in range ( 0, nbit, 4 ) : @@ -805,7 +804,7 @@ def ROM_VHDL () : global LV_ModelName global nword - print "ROM behavior not yet implemented" + print( "ROM behavior not yet implemented" ) # fileName = LV_ModelName + ".vbe" # diff --git a/stratus1/src/dpgen/dpgen_ADSB2F.py b/stratus1/src/dpgen/dpgen_ADSB2F.py index 7beed9c4..07596295 100644 --- a/stratus1/src/dpgen/dpgen_ADSB2F.py +++ b/stratus1/src/dpgen/dpgen_ADSB2F.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM diff --git a/stratus1/src/dpgen/dpgen_Nul.py b/stratus1/src/dpgen/dpgen_Nul.py index 98928c86..2b23d9a3 100644 --- a/stratus1/src/dpgen/dpgen_Nul.py +++ b/stratus1/src/dpgen/dpgen_Nul.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -252,7 +251,7 @@ class DpgenNul ( Model ) : sModel = "a2_x4" thisMap['q'] = self._nul - if thisMap.has_key('nq') : del thisMap['nq'] + if 'nq' in thisMap : del thisMap['nq'] else : sModel = "no2_x4" thisMap['nq'] = self._nul @@ -263,7 +262,7 @@ class DpgenNul ( Model ) : if depth % 2 : sModel = "a2_x2" else : sModel = "o2_x2" - if thisMap.has_key('nq') : del thisMap['nq'] + if 'nq' in thisMap : del thisMap['nq'] thisMap['q'] = nul[cell_index] thisMap['vdd'] = self._vdd diff --git a/stratus1/src/dpgen/dpgen_RAM.py b/stratus1/src/dpgen/dpgen_RAM.py index 1ac62b94..5e62c971 100644 --- a/stratus1/src/dpgen/dpgen_RAM.py +++ b/stratus1/src/dpgen/dpgen_RAM.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -62,12 +61,12 @@ class DpgenRam ( Model ) : self._nmot = self._param['nword'] if self._nbit % 2 == 1 or self._nbit > 64 or self._nbit < 2 : - print "Error in DpgenRam : the bit number must be even and no larger than 64\n" + print( "Error in DpgenRam : the bit number must be even and no larger than 64\n" ) sys.exit ( 3 ) if self._nmot % 8 != 0 or self._nmot > 256 or self._nmot < 32 : - print "Error in instanciaton of DpgenRam" - print "The word number (nword = %d) " % self._nmot, "must be multiple of 8, at least 32 and no larger than 256.\n" + print( "Error in instanciaton of DpgenRam" ) + print( "The word number (nword = %d) " % self._nmot, "must be multiple of 8, at least 32 and no larger than 256.\n" ) sys.exit ( 3 ) if self._nmot > 128 : adrange = 8 @@ -674,4 +673,4 @@ class DpgenRam ( Model ) : ## VBE ## ######### def Vbe () : - print "RAM behavior not yet implemented" + print( "RAM behavior not yet implemented" ) diff --git a/stratus1/src/dpgen/dpgen_RF1.py b/stratus1/src/dpgen/dpgen_RF1.py index 92756f60..faadb8ee 100644 --- a/stratus1/src/dpgen/dpgen_RF1.py +++ b/stratus1/src/dpgen/dpgen_RF1.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -136,15 +135,15 @@ class top_rf1 ( Model ) : nbitu = 0 if nword % 2 == 1 or nword > 32 or nword < 4 : - print "Error in DpgenRf1 : the word number must be even larger than 4 and no larger than 32\n" + print( "Error in DpgenRf1 : the word number must be even larger than 4 and no larger than 32\n" ) sys.exit ( 3 ) if nword == 4 and ( type == 2 or type == 3 ) : - print "Error in DpgenRf1 : the word number must be larger than 4\n" + print( "Error in DpgenRf1 : the word number must be larger than 4\n" ) sys.exit ( 3 ) if nbit % 2 == 1 or nbit > 64 or nbit < 2 : - print "Error in DpgenRf1 : the bit number must be even and no larger than 64\n" + print( "Error in DpgenRf1 : the bit number must be even and no larger than 64\n" ) sys.exit ( 3 ) adrange = 2 @@ -1363,7 +1362,7 @@ class top_rf1 ( Model ) : ## VBE ## ######### def Vbe ( self ) : - print "rf1 behavior not implemented" + print( "rf1 behavior not implemented" ) diff --git a/stratus1/src/dpgen/dpgen_RF2.py b/stratus1/src/dpgen/dpgen_RF2.py index b8f2e15f..76e13993 100644 --- a/stratus1/src/dpgen/dpgen_RF2.py +++ b/stratus1/src/dpgen/dpgen_RF2.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -113,15 +112,15 @@ class top_rf2 ( Model ) : global adrange if nword % 2 == 1 or nword > 32 or nword < 4 : - print "Error in DpgenRf2 : the word number must be even, larger than 4 and no larger than 32\n" + print( "Error in DpgenRf2 : the word number must be even, larger than 4 and no larger than 32\n" ) sys.exit ( 1 ) if nword == 4 and ( type == 2 or type == 3 ) : - print "Error in DpgenRf2 : the word number must be larger than 4\n" + print( "Error in DpgenRf2 : the word number must be larger than 4\n" ) sys.exit ( 1 ) if nbit % 2 == 1 or nbit > 64 or nbit < 2 : - print "Error in DpgenRf2 : the bit number must be even and no larger than 64\n" + print( "Error in DpgenRf2 : the bit number must be even and no larger than 64\n" ) sys.exit ( 1 ) adrange = 2 @@ -1080,7 +1079,7 @@ class top_rf2 ( Model ) : ## VBE ## ######### def Vbe ( self ) : - print 'RF2 behavior not implemented' + print( 'RF2 behavior not implemented' ) diff --git a/stratus1/src/dpgen/dpgen_ROM.py b/stratus1/src/dpgen/dpgen_ROM.py index 4b439dc5..da9326ba 100644 --- a/stratus1/src/dpgen/dpgen_ROM.py +++ b/stratus1/src/dpgen/dpgen_ROM.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -113,12 +112,12 @@ class TopRom ( Model ) : elif self.nword == 512 : adrange = 9 elif self.nword == 1024 : adrange = 10 else : - print "Error : DPGEN_ROM" - print "The word number (nword := %d) ", nword, "can only takes values : 64, 128, 256, 512 or 1024.\n" + print( "Error : DPGEN_ROM" ) + print( "The word number (nword := %d) ", nword, "can only takes values : 64, 128, 256, 512 or 1024.\n" ) sys.exit ( 3 ) if self.nbit % 4 != 0 or self.nbit > 64 or self.nbit < 4 : - raise "\n[Stratus ERROR] DPGEN_ROM : The bus width (nbit := %d) ", nbit, "must be multiple of 4 and no larger than 64.\n" + raise( "\n[Stratus ERROR] DPGEN_ROM : The bus width (nbit := %d) ", nbit, "must be multiple of 4 and no larger than 64.\n" ) self.ck = SignalIn ( "ck", 1 ) self.selrom = SignalIn ( "selrom", 1 ) diff --git a/stratus1/src/dpgen/dpgen_ROM2.py b/stratus1/src/dpgen/dpgen_ROM2.py index 2550b934..c624f7f5 100644 --- a/stratus1/src/dpgen/dpgen_ROM2.py +++ b/stratus1/src/dpgen/dpgen_ROM2.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM diff --git a/stratus1/src/dpgen/dpgen_ROM4.py b/stratus1/src/dpgen/dpgen_ROM4.py index ba3e4154..dd486b44 100644 --- a/stratus1/src/dpgen/dpgen_ROM4.py +++ b/stratus1/src/dpgen/dpgen_ROM4.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM diff --git a/stratus1/src/dpgen/dpgen_Regular.py b/stratus1/src/dpgen/dpgen_Regular.py index 7945bb09..de9d7581 100644 --- a/stratus1/src/dpgen/dpgen_Regular.py +++ b/stratus1/src/dpgen/dpgen_Regular.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -359,7 +358,7 @@ class DpgenRegular ( Model ) : temp2 = LV_xl.xltovhdl() if temp1 != temp2 : - print "[Stratus Warning] : Due to its wrong size, the constant", temp1, "has been modified to :", temp2, ". Check if it's the value one wanted." + print( "[Stratus Warning] : Due to its wrong size, the constant", temp1, "has been modified to :", temp2, ". Check if it's the value one wanted." ) # Check the drive argument for iDrive in range ( MAX_TDRIVE ) : diff --git a/stratus1/src/dpgen/dpgen_Shifter.py b/stratus1/src/dpgen/dpgen_Shifter.py index 709b5293..a6e7fc98 100644 --- a/stratus1/src/dpgen/dpgen_Shifter.py +++ b/stratus1/src/dpgen/dpgen_Shifter.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -260,4 +259,4 @@ class DpgenShifter ( Model ) : ## VBE ## ######### def Vbe ( self ) : - print "vbe of DpgenShifter not implemented" + print( "vbe of DpgenShifter not implemented" ) diff --git a/stratus1/src/dpgen/dpgen_Shrot.py b/stratus1/src/dpgen/dpgen_Shrot.py index 4b0b6050..0d8aae8e 100644 --- a/stratus1/src/dpgen/dpgen_Shrot.py +++ b/stratus1/src/dpgen/dpgen_Shrot.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -340,4 +339,4 @@ class DpgenShrot ( Model ) : ## VBE ## ######### def Vbe ( self ) : - print "vbe of DpgenShrot not implemented" + print( "vbe of DpgenShrot not implemented" ) diff --git a/stratus1/src/modules/patterns/CMakeLists.txt b/stratus1/src/modules/patterns/CMakeLists.txt index 0b3b7715..b33af86b 100644 --- a/stratus1/src/modules/patterns/CMakeLists.txt +++ b/stratus1/src/modules/patterns/CMakeLists.txt @@ -7,4 +7,4 @@ ${CMAKE_CURRENT_SOURCE_DIR}/stimuli.py ) - install ( FILES ${pysources} DESTINATION ${PYTHON_SITE_PACKAGES}/stratus ) + install ( FILES ${pysources} DESTINATION ${Python_CORIOLISLIB}/stratus ) diff --git a/stratus1/src/modules/patterns/patread.py b/stratus1/src/modules/patterns/patread.py index c305c83a..e9c36327 100644 --- a/stratus1/src/modules/patterns/patread.py +++ b/stratus1/src/modules/patterns/patread.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -146,7 +145,7 @@ class PatRead: connector['arity'] = int(pieces[2])-int(pieces[4])+1 else: connector['arity'] = 1 - #DEBUG: print '%s=>%s\n' % (line, connector) + #DEBUG: print( '%s=>%s\n' % (line, connector) ) self.connectors.append(connector) # ------------------------------------------------------ diff --git a/stratus1/src/modules/patterns/patterns.py b/stratus1/src/modules/patterns/patterns.py index 6e0e39b0..a7a574ea 100644 --- a/stratus1/src/modules/patterns/patterns.py +++ b/stratus1/src/modules/patterns/patterns.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM diff --git a/stratus1/src/modules/patterns/patwrite.py b/stratus1/src/modules/patterns/patwrite.py index 3987f1f6..17c866b7 100644 --- a/stratus1/src/modules/patterns/patwrite.py +++ b/stratus1/src/modules/patterns/patwrite.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM diff --git a/stratus1/src/modules/patterns/synopsys.py b/stratus1/src/modules/patterns/synopsys.py index c7499c34..0a84381b 100644 --- a/stratus1/src/modules/patterns/synopsys.py +++ b/stratus1/src/modules/patterns/synopsys.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -129,7 +128,7 @@ class Synopsys: self._change_ck2st(filename, False) # false for no debug if debug: - print ' - VHDL conversion done.' + print( ' - VHDL conversion done.' ) # ------------------------------------------------------------- ## Remove power supply connectors from a VHDL file. @@ -153,7 +152,7 @@ class Synopsys: removed += 1 if debug: - print ' - removed %d power supply declarations'%removed + print( ' - removed %d power supply declarations'%removed ) input.close() @@ -178,7 +177,7 @@ class Synopsys: out.write(previous) if debug: - print ' - corrected %s syntax errors'%corrected + print( ' - corrected %s syntax errors'%corrected ) # END ------------------------------------------------------- temp.close() @@ -221,7 +220,7 @@ class Synopsys: temp.write(line) if debug: - print ' - changed %d ck'%changed + print( ' - changed %d ck'%changed ) # STEP2: write changes to input file ------------------------ temp.seek(0) @@ -782,7 +781,7 @@ class Synopsys: self.convert_to_vhdl(st=st, debug=debug) if debug: - print ' - generate test bench and build simulator (Synopsys) ...' + print( ' - generate test bench and build simulator (Synopsys) ...' ) try: self._cell.pat except AttributeError: diff --git a/stratus1/src/modules/patterns/utils.py b/stratus1/src/modules/patterns/utils.py index 8224d09b..e83f63c6 100644 --- a/stratus1/src/modules/patterns/utils.py +++ b/stratus1/src/modules/patterns/utils.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -174,7 +173,7 @@ def str2uint(val): def int2str(value, wl): res = "" for pos in range(wl): - res = str( (value & 1L<>pos) + res + res = str( (value & 1<>pos) + res return res # ------------------------------------------------------ @@ -233,7 +232,7 @@ def runpat(name_vst, name_pat, options='', stdout=False, stderr=True): cmd_str += ' 2> /dev/null' result = system(cmd_str) - if not result : print "Simulation OK" + if not result : print( "Simulation OK" ) return result diff --git a/stratus1/src/stratus/CMakeLists.txt b/stratus1/src/stratus/CMakeLists.txt index 9f23495f..b115b1e2 100644 --- a/stratus1/src/stratus/CMakeLists.txt +++ b/stratus1/src/stratus/CMakeLists.txt @@ -34,4 +34,4 @@ ${CMAKE_CURRENT_SOURCE_DIR}/util_uRom.py ) - install ( FILES ${pysources} DESTINATION ${PYTHON_SITE_PACKAGES}/stratus ) + install ( FILES ${pysources} DESTINATION ${Python_CORIOLISLIB}/stratus ) diff --git a/stratus1/src/stratus/st_bool.py b/stratus1/src/stratus/st_bool.py index 1b1e5af7..fd0d8cc2 100644 --- a/stratus1/src/stratus/st_bool.py +++ b/stratus1/src/stratus/st_bool.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -121,11 +120,11 @@ class Bool ( Model ) : elif self.m in A : # sxlib fulladder: import types - if type ( self.dictInOut['a'] ) == types.ListType : + if isinstance( self.dictInOut['a'], list ): for realpin in self.dictInOut['a'] : boolMap[realpin] = self._a[i] else : boolMap[self.dictInOut['a']] = self._a[i] - if type ( self.dictInOut['b'] ) == types.ListType : + if isinstance( self.dictInOut['b'], list ): for realpin in self.dictInOut['b'] : boolMap[realpin] = self._b[i] else : boolMap[self.dictInOut['b']] = self._b[i] @@ -136,7 +135,7 @@ class Bool ( Model ) : boolMap[self.dictInOut['i3']] = self._i3[i] if self.m in CIN : - if type ( self.dictInOut['cin'] ) == types.ListType : + if isinstance( self.dictInOut['cin'], list ): for realpin in self.dictInOut['cin'] : boolMap[realpin] = self._cin[i] else : boolMap[self.dictInOut['cin']] = self._cin[i] diff --git a/stratus1/src/stratus/st_cat.py b/stratus1/src/stratus/st_cat.py index 606420eb..eb9ad3f2 100644 --- a/stratus1/src/stratus/st_cat.py +++ b/stratus1/src/stratus/st_cat.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -66,12 +65,12 @@ def Cat ( *nets ) : netToCat = cell._TAB_NETS_CAT[nb] - #if type ( nets[0] ) == types.ListType : nets = nets[0] + #if isinstance( nets[0], list ): nets = nets[0] # Creation of the inversed tab netstries = [] for net in nets : - if type(net) == types.ListType : + if isinstance(net,list): for netin in net : netstries.insert(0, netin) else: netstries.insert ( 0, net ) diff --git a/stratus1/src/stratus/st_comp.py b/stratus1/src/stratus/st_comp.py index f8bca323..55fa622a 100644 --- a/stratus1/src/stratus/st_comp.py +++ b/stratus1/src/stratus/st_comp.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -65,7 +64,7 @@ class Comp ( Model ) : else : self.func = "Ne" # Error : if net is not a string - if type ( self.nb ) != types.StringType : + if isinstance(self.nb,str): err = "\n[Stratus ERROR] " + self.func + " : the argument must be a string.\n" raise Exception ( err ) diff --git a/stratus1/src/stratus/st_const.py b/stratus1/src/stratus/st_const.py index 7f657bce..9cb026ca 100644 --- a/stratus1/src/stratus/st_const.py +++ b/stratus1/src/stratus/st_const.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -153,10 +152,10 @@ class Constant ( Model ) : nb = param['nb'] # Error : if nb is not a string - if type ( nb ) not in [types.StringType, types.IntType, types.LongType] : raise "\n[Stratus ERROR] Constant : the argument must be a string, int or long.\n" + if not isinstance(nb,str) and not isinstance(nb,int): raise "\n[Stratus ERROR] Constant : the argument must be a string, int or long.\n" ### String representing a binary number ( from the LSB to the MSB ) ### - if isinstance(nb, types.StringType): + if isinstance(nb,str): bina = re.search ( "0[bB]([0-1]+)", nb ) hexa = re.search ( "0[xX]([0-9,A-F,a-f]+)", nb ) oct = re.search ( "0[oO]([0-7]+)", nb ) diff --git a/stratus1/src/stratus/st_export.py b/stratus1/src/stratus/st_export.py index c7a6a730..c5373f15 100644 --- a/stratus1/src/stratus/st_export.py +++ b/stratus1/src/stratus/st_export.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python -# + # -*- mode:Python -*- # # This file is part of the Coriolis Software. diff --git a/stratus1/src/stratus/st_extend.py b/stratus1/src/stratus/st_extend.py index 7075fd0a..802fbf7d 100644 --- a/stratus1/src/stratus/st_extend.py +++ b/stratus1/src/stratus/st_extend.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM diff --git a/stratus1/src/stratus/st_func_gen_wallace.py b/stratus1/src/stratus/st_func_gen_wallace.py index bc3a670d..6bddaa61 100644 --- a/stratus1/src/stratus/st_func_gen_wallace.py +++ b/stratus1/src/stratus/st_func_gen_wallace.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -202,7 +201,7 @@ def suite_dadda ( iValue ) : Un_1 = 2 while Un < iValue : - aux = (3 * Un_1) / 2 + aux = (3 * Un_1) // 2 Un_1 = Un Un = aux @@ -257,7 +256,7 @@ def wallace_1level ( lMat, lAdders ) : nbToDel = delta + len(carries) if(nbToDel > 0): - nb_FA = nbToDel/2 + nb_FA = nbToDel//2 nb_HA = nbToDel%2 else: nb_FA = 0 diff --git a/stratus1/src/stratus/st_generate.py b/stratus1/src/stratus/st_generate.py index c40442ea..182fa33d 100644 --- a/stratus1/src/stratus/st_generate.py +++ b/stratus1/src/stratus/st_generate.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -64,10 +63,10 @@ def Generate ( model_name, inst_name, param = {} ) : if '_vbe' in cell.__dict__ : param['behavioral'] = cell._vbe # Error : if the model is not a string - if type ( model_name ) != types.StringType : + if not isinstance(model_name,str): err = "\n[Stratus ERROR] Generate : the model must be described in a string.\n" raise Exception ( err ) - if type ( inst_name ) != types.StringType : + if not isinstance(inst_name,str): err = "\n[Stratus ERROR] Generate : the model must be described in a string.\n" raise Exception ( err ) @@ -77,7 +76,7 @@ def Generate ( model_name, inst_name, param = {} ) : raise Exception ( err ) # Warning : the name can not contain capitalized letters if re.search ( "[A-Z]", inst_name ) : - print "[Stratus Warning] Generate : Upper case letters are not supported, the name", inst_name, "is lowered." + print( "[Stratus Warning] Generate : Upper case letters are not supported, the name", inst_name, "is lowered." ) inst_name = inst_name.lower() # Check if the model does already exist diff --git a/stratus1/src/stratus/st_getrealmodel.py b/stratus1/src/stratus/st_getrealmodel.py index 4e28a3bb..d55f88b4 100644 --- a/stratus1/src/stratus/st_getrealmodel.py +++ b/stratus1/src/stratus/st_getrealmodel.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -56,7 +55,7 @@ def InitBV () : mapping = Cfg.getParamString('stratus1.mappingName').asString() if not mapping: - print '[ERROR] \"stratus1.mappingName\" configuration variable has not been set.' + print( '[ERROR] \"stratus1.mappingName\" configuration variable has not been set.' ) myP.Parse ( mapping ) return diff --git a/stratus1/src/stratus/st_instance.py b/stratus1/src/stratus/st_instance.py index 2c49236a..62416de0 100644 --- a/stratus1/src/stratus/st_instance.py +++ b/stratus1/src/stratus/st_instance.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -50,7 +49,10 @@ import CRL from Hurricane import * - +#from st_net import Signal, SignalIn, SignalOut, SignalInOut, \ +# SignalUnknown, TriState, CkIn, SignalCk, \ +# Sig, VddIn, VssIn, VddInFromHur, VssInFromHur, \ +# SignalVdd, SignalVss from st_model import Model, MODELMAP from st_getrealmodel import GetRealModel, InitBV @@ -77,16 +79,26 @@ DPSXLIB = "dp_.*_x[1-8]" # chaine = re.search ( "([^:]*):(.*)", cata_lib ) ## Class of nets ## -NET = ( "st_net.SignalIn", "st_net.SignalOut", "st_net.SignalInOut" \ - , "st_net.SignalUnknown", "st_net.TriState" \ - , "st_net.CkIn", "st_net.SignalCk" \ - , "st_net.Signal", "st_net.Sig" \ - , "st_net.VddIn", "st_net.VssIn" \ - , "st_net.VddInFromHur", "st_net.VssInFromHur" \ - , "st_net.SignalVdd" , "st_net.SignalVss" \ +NET = ( "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" ) -ALIM_NET = ( "st_net.VddIn", "st_net.VssIn" \ - , "st_net.VddInFromHur", "st_net.VssInFromHur" +ALIM_NET = ( "" + , "" + , "" + , "" ) ################ @@ -130,12 +142,12 @@ class Inst : ##### Errors ##### # Error : if the model is not a string - if type ( model ) != types.StringType : + if not isinstance(model,str): err = "\n[Stratus ERROR] Inst : the model must be described in a string.\n" raise Exception ( err ) # Warning : the model can not contain capitalized letters if re.search ( "[A-Z]", model ) : - print "[Stratus Warning] Inst : Upper case letters are not supported, the name", model, "is lowered." + print( "[Stratus Warning] Inst : Upper case letters are not supported, the name", model, "is lowered.") model = model.lower() # Error : spaces are forbidden if re.search ( " ", model ) : @@ -147,13 +159,13 @@ class Inst : raise Exception ( err ) # Warning : the name can not contain capitalized letters if re.search ( "[A-Z]", name ) : - print "[Stratus Warning] : Upper case letters are not supported, the name", name, "is lowered." + print( "[Stratus Warning] : Upper case letters are not supported, the name", name, "is lowered." ) name = name.lower () # Error : if map[pin] is not a net if map : for pin in map : - if str ( map[pin].__class__ ) not in NET : + if (str(type(map[pin])) not in NET): err = "\n[Stratus ERROR] Inst : \"" + name + "\" one argument is not a net : " err += "pin is : " + pin + " and is associated to : " if map[pin] : err += str(map[pin]) @@ -169,7 +181,7 @@ class Inst : if self._model == c._name : self._st_masterCell = c break -# if not( self._hur_masterCell or self._st_masterCell ) : print "\n[Stratus Warning] Inst : no master cell found for instance " + self._name +# if not( self._hur_masterCell or self._st_masterCell ) : print( "\n[Stratus Warning] Inst : no master cell found for instance " + self._name ) # Creation of the hurricane instance if CELLS[0]._hur_plug : self.create_hur_inst ( model ) @@ -199,7 +211,7 @@ class Inst : raise Exception ( err ) if not self._st_masterCell : - if MODELMAP.has_key ( str ( self._hur_masterCell ) ) : + if str ( self._hur_masterCell ) in MODELMAP: self._st_masterCell = MODELMAP[str ( self._hur_masterCell )] else : self._st_masterCell = Model ( str ( self._hur_masterCell.getName() ), hurCell = self._hur_masterCell ) @@ -292,7 +304,7 @@ class Inst : # If the net which is concatened is an alias if ( net._alias ) and ( net._alias[bit] ) : - netA = net._alias[bit].keys()[0] + netA = list(net._alias[bit].keys())[0] bitA = net._alias[bit][netA] if net._real_net : netA = netA._real_net @@ -302,7 +314,7 @@ class Inst : # If the net is an alias elif ( realNet._alias ) and ( realNet._alias[i] ) : - net = realNet._alias[i].keys()[0] + net = list(realNet._alias[i].keys())[0] bit = realNet._alias[i][net] if net._real_net : net = net._real_net @@ -334,7 +346,7 @@ class Inst : ### Virtual library ### if "_inout" in self.__dict__ : import types - if type ( self._inout[pin] ) == types.ListType : + if isinstance( self._inout[pin], list ): for realpin in self._inout[pin] : connectPin ( realpin ) else : @@ -363,17 +375,17 @@ class Inst : ### Prints ### ############## def printInstance ( self ) : - print " => model", self._model - print " => map" + print( " => model", self._model ) + print( " => map" ) for pin in self._map : n = self._map[pin] if n._to_merge : n = n._to_merge[0][0] - print " ", pin, "->", n._name + print( " ", pin, "->", n._name ) def printMap ( self ) : - print "Map:", self._name + print( "Map:", self._name ) for pin in self._map : - print " ", pin, self._map[pin]._name + print( " ", pin, self._map[pin]._name ) ######################### #### SetCurrentModel #### diff --git a/stratus1/src/stratus/st_model.py b/stratus1/src/stratus/st_model.py index 01fa2be9..90b29165 100644 --- a/stratus1/src/stratus/st_model.py +++ b/stratus1/src/stratus/st_model.py @@ -1,5 +1,4 @@ -#!/usr/bin/python -# + # This file is part of the Coriolis Software. # Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved # @@ -52,7 +51,7 @@ class Model() : global FRAMEWORK, CELLS # Look up the editor - if globals().has_key ( "__editor" ) : setEditor ( __editor ) + if '__editor' in globals(): setEditor ( __editor ) self._name = nom self._param = param @@ -125,16 +124,16 @@ class Model() : from st_net import VssInFromHur try: - netVdd = iter(hurCell.getPowerNets()).next() + netVdd = iter(hurCell.getPowerNets()).__next__() self._st_vdds.append ( VddInFromHur ( netVdd ) ) except StopIteration: - print "[Stratus Warning] : Cell", self._name, "does not have a vdd port." + print( "[Stratus Warning] : Cell", self._name, "does not have a vdd port." ) pass try: - netVss = iter(hurCell.getGroundNets()).next() + netVss = iter(hurCell.getGroundNets()).__next__() self._st_vsss.append ( VssInFromHur ( netVss ) ) except StopIteration: - print "[Stratus Warning] : Cell", self._name, "does not have a vss port." + print( "[Stratus Warning] : Cell", self._name, "does not have a vss port." ) pass self._st_cks = [] @@ -336,17 +335,17 @@ class Model() : ##### Print of the cell ##### ############################# def Print ( self ) : - print "################## The Cell ##################" + print( "################## The Cell ##################" ) for inst in self._st_insts : - print " * inst name :", inst._name - print " inst model :", inst._model + print( " * inst name :", inst._name ) + print( " inst model :", inst._model ) for pin in inst._map : if pin != 'vdd' and pin != 'vss' : net = inst._map[pin] - print " pin :", pin, "net :", net._name, "with arity :", net._arity + print( " pin :", pin, "net :", net._name, "with arity :", net._arity ) if net._to_merge : net = inst._map[pin]._to_merge[0][0] - print " net merged with :", net._name, "with arity :", net._arity + print( " net merged with :", net._name, "with arity :", net._arity ) ############################# ##### Find An Instance ##### @@ -367,29 +366,29 @@ class Model() : err = "\n[Stratus ERROR] PrintGraph : The graph does not exist. Use initGraph before.\n" raise Exception ( err ) - print "################## Cell's Graph features ##################" + print( "################## Cell's Graph features ##################" ) for inst in self._st_insts : - print " => inst name :", inst._name, "( model :", inst._model, ")" - print " inst st_nets_in :" - for net in inst._st_nets_in : print " ", net._name - print " inst st_nets_out :" - for net in inst._st_nets_out : print " ", net._name + print( " => inst name :", inst._name, "( model :", inst._model, ")" ) + print( " inst st_nets_in :" ) + for net in inst._st_nets_in : print( " ", net._name ) + print( " inst st_nets_out :" ) + for net in inst._st_nets_out : print( " ", net._name ) for port in self._st_ports : - print " => port name :", port._name - if port._st_inst_in : print " port _st_inst_in :", port._st_inst_in._name - print " port _st_insts_out :" - for p in port._st_insts_out : print " ", p._name + print( " => port name :", port._name ) + if port._st_inst_in : print( " port _st_inst_in :", port._st_inst_in._name ) + print( " port _st_insts_out :" ) + for p in port._st_insts_out : print( " ", p._name ) for sig in self._st_sigs : - print " => sig name :", sig._name - if sig._st_inst_in : print " sig _st_inst_in :", sig._st_inst_in._name - print " sig _st_insts_out :" - for s in sig._st_insts_out : print " ", s._name + print( " => sig name :", sig._name ) + if sig._st_inst_in : print( " sig _st_inst_in :", sig._st_inst_in._name ) + print( " sig _st_insts_out :" ) + for s in sig._st_insts_out : print( " ", s._name ) for psig in self._st_partsigs : - print " => part sig name :", psig._name - if '_st_inst_in' in psig.__dict__ and psig._st_inst_in: print " part sig _st_inst_in :", psig._st_inst_in._name + print( " => part sig name :", psig._name ) + if '_st_inst_in' in psig.__dict__ and psig._st_inst_in: print( " part sig _st_inst_in :", psig._st_inst_in._name ) if '_st_insts_out' in psig.__dict__ : - print " part sig _st_insts_out :" - for s in psig._st_insts_out : print " ", s._name + print( " part sig _st_insts_out :" ) + for s in psig._st_insts_out : print( " ", s._name ) ##################### ##### overloard ##### @@ -407,16 +406,16 @@ class Model() : ######################## ##### Interface ##### def Interface ( self ) : - print "[Stratus Warning] : Execution of empty Interface method for", self._name, "." + print( "[Stratus Warning] : Execution of empty Interface method for", self._name, "." ) ##### Netlist ##### def Netlist ( self ) : - print "[Stratus Warning] : Execution of empty Netlist method for", self._name, "." + print( "[Stratus Warning] : Execution of empty Netlist method for", self._name, "." ) pass ##### Layout ##### def Layout ( self ) : - print "[Stratus Warning] : Execution of empty Layout method for", self._name, "." + print( "[Stratus Warning] : Execution of empty Layout method for", self._name, "." ) pass ##### Vbe ##### @@ -587,7 +586,7 @@ class Model() : file = open ( fileName, "w+" ) - file.write ( "#!/usr/bin/python\n\n" ) + file.write ( "#!/usr/bin/env python3\n\n" ) file.write ( "from stratus import *\n\n" ) file.write ( "class %s ( Model ) :\n\n" % nom ) @@ -708,10 +707,10 @@ class Model() : tata = True nom = catName ( netInMap, netInMap._to_cat ) - if toto and tata : print "Attention est ce un cas bien gere ???" + if toto and tata : print( "Attention est ce un cas bien gere ???" ) - if pin == inst._map.keys()[0] : file.write ( "\"%s\" : %s\n" % ( pin, nom ) ) - else : file.write ( " , \"%s\" : %s\n" % ( pin, nom ) ) + if pin == list(inst._map.keys()[0]) : file.write ( "\"%s\" : %s\n" % ( pin, nom ) ) + else : file.write ( " , \"%s\" : %s\n" % ( pin, nom ) ) file.write ( " }\n" ) file.write ( " )\n\n" ) @@ -779,8 +778,8 @@ class Model() : #classe = str(cell.__class__) #nom = cell._name #param = cell._param - #print "nom " + nom - #print "classe " + classe + #print( "nom " + nom ) + #print( "classe " + classe ) ## Gestion of libraries with specific treatment #chaine = re.search ( "(.*)\.([^\.]*)", classe ) @@ -893,11 +892,11 @@ class Model() : tata = True nom = catName ( netInMap, netInMap._to_cat ) - if toto and tata : print "Attention est ce un cas bien gere ???" + if toto and tata : print( "Attention est ce un cas bien gere ???" ) if netInMap not in self._st_vdds + self._st_vsss : - if pin == inst._map.keys()[0] : strMap += " %s => %s,\n" % ( pin, nom ) - else : strMap += " %s => %s,\n" % ( pin, nom ) + if pin == list(inst._map.keys())[0] : strMap += " %s => %s,\n" % ( pin, nom ) + else : strMap += " %s => %s,\n" % ( pin, nom ) file.write(strMap[:-2] + '\n') file.write ( " );\n\n" ) @@ -951,7 +950,7 @@ class Model() : ############################# ##### Creation of model ##### ############################# - def ModelCreation ( self, modele, modele2, dict, hierarchy, realModele = None, inOut = None ) : + def ModelCreation ( self, modele, modele2, args, hierarchy, realModele = None, inOut = None ) : global CELLS from st_parser import BVg @@ -984,20 +983,20 @@ class Model() : from util_Gen import F_MSB_FIRST - if type ( dict ) != types.DictType : + if not isinstance(args,dict): err = "\n[Stratus ERROR] Inst : instanciation of a user's defined generator. The methods' arguments must be dictionnaries.\n" raise Exception ( err ) ##### Creation of the instance ##### -# dict['flags'] = F_MSB_FIRST # When vst driver permits to do F_LSB_FIRST or F_LSB_FIRST TODO -# dict['flags'] = 0 +# args['flags'] = F_MSB_FIRST # When vst driver permits to do F_LSB_FIRST or F_LSB_FIRST TODO +# args['flags'] = 0 ## Virtual library ## if modele in BVg : - dict['model'] = modele.lower() - dict['realModel'] = realModele + args['model'] = modele.lower() + args['realModel'] = realModele - instCell = Bool ( modele2, dict, inOut ) + instCell = Bool ( modele2, args, inOut ) ## Generator ## elif re.search ( "\.", modele ) : @@ -1017,10 +1016,10 @@ class Model() : # modeleClass = getattr ( moduleClass, className ) # fin Roselyne - instCell = modeleClass ( modele2, dict ) + instCell = modeleClass ( modele2, args ) else : - instCell = eval ( "%s ( \"%s\", %s )" % ( modele, modele2, str(dict) ) ) + instCell = eval ( "%s ( \"%s\", %s )" % ( modele, modele2, str(args) ) ) ## MAJ of the hierarchy ## instCell._hierarchy = hierarchy @@ -1031,16 +1030,16 @@ class Model() : instCell.Interface() instCell.Netlist() - if ( 'clean' in dict ) and ( dict['clean'] != False ) : - if 'interactive' not in dict : dict['interactive'] = False - instCell.Clean ( dict['interactive'], dict['clean'] ) + if ( 'clean' in args ) and ( args['clean'] != False ) : + if 'interactive' not in args : args['interactive'] = False + instCell.Clean ( args['interactive'], args['clean'] ) - if ( 'behavioral' in dict ) and ( dict['behavioral'] == True ) : + if ( 'behavioral' in args ) and ( args['behavioral'] == True ) : instCell.Vbe() if instCell._hur_cell : v = 0 - if ( 'physical' in dict ) and ( dict['physical'] == True ) : + if ( 'physical' in args ) and ( args['physical'] == True ) : instCell.Layout() v = CRL.Catalog.State.Physical instCell.Save( v|CRL.Catalog.State.Logical ) @@ -1059,7 +1058,7 @@ class Model() : global FRAMEWORK, CELLS if self._hur_cell : - print "[Stratus Warning] : The stratus cell already exists." + print( "[Stratus Warning] : The stratus cell already exists." ) return self._hur_plug = True @@ -1150,7 +1149,7 @@ class Model() : for net in net_sortie : if net_name == str ( net.getName() ) : file.insert ( 0, net ) - if interactive : print "Output Net", net, "has to be erased, it is put in the fifo." + if interactive : print( "Output Net", net, "has to be erased, it is put in the fifo." ) ## Internal nets ## # Number of plugs of each net : @@ -1160,15 +1159,15 @@ class Model() : nb_plugs = self.count_plugs ( net ) if nb_plugs == 0 : - if interactive : print "* One net suppressed (a) :", net + if interactive : print( "* One net suppressed (a) :", net ) TAB_NETS.append ( net.getName () ) cpt_net_del += 1 net.Delete() elif nb_plugs == 1 : - if net.getPlugs().next().getMasterNet().getDirection() == DirectionOUT: # output of an instance - if interactive : print "* One net put in the fifo :", net + if net.getPlugs().__next__().getMasterNet().getDirection() == DirectionOUT: # output of an instance + if interactive : print( "* One net put in the fifo :", net ) file.insert ( 0, net ) ## Ouput nets ## @@ -1177,7 +1176,7 @@ class Model() : for net in net_sortie + net_entree : cpt_plugs_sor = self.count_plugs ( net ) if cpt_plugs_sor == 0 : - print "[Stratus Warning] Clean : Interface of", self._name, "changed, net :", net, "is suppressed" + print( "[Stratus Warning] Clean : Interface of", self._name, "changed, net :", net, "is suppressed") TAB_NETS.append ( net.getName() ) cpt_net_del += 1 @@ -1186,7 +1185,7 @@ class Model() : ##### Algorithm ##### while len ( file ) > 0 : net_file = file.pop() - plug = net_file.getPlugs().next() + plug = net_file.getPlugs().__next__() inst = plug.getInstance() # input nets of the instance @@ -1210,13 +1209,13 @@ class Model() : ### Deletion of te instance ### # If the instance has only one output if cpt_sortie == 1 : - if interactive : print "* One net suppressed (b) :", net_file + if interactive : print( "* One net suppressed (b) :", net_file ) TAB_NETS.append ( net_file.getName() ) cpt_net_del += 1 net_file.Delete() - if interactive : print "* One instance suppressed (a) :", inst, inst + if interactive : print( "* One instance suppressed (a) :", inst, inst ) TAB_INSTS.append(inst.getName()) cpt_inst_del += 1 @@ -1228,14 +1227,14 @@ class Model() : cpt_plugs_in = self.count_plugs ( net_ent ) if cpt_plugs_in == 0 : if net_ent in net_entree : - print "[Stratus Warning] Clean : Interface of", self._name, "changed, net :", net_ent, "is suppressed" + print( "[Stratus Warning] Clean : Interface of", self._name, "changed, net :", net_ent, "is suppressed" ) TAB_NETS.append ( net_ent.getName() ) cpt_net_del += 1 net_ent.Delete() else : - if interactive : print "* One net suppressed (c) : ", net_ent + if interactive : print( "* One net suppressed (c) : ", net_ent ) TAB_NETS.append ( net_ent.getName() ) cpt_net_del += 1 @@ -1243,8 +1242,8 @@ class Model() : net_ent.Delete() elif cpt_plugs_in == 1 : - if net_ent.getPlugs().next().getMasterNet().getDirection() == DirectionOUT : # is an output net of another instance - if interactive : print "* One net put in the fifo :", net_ent + if net_ent.getPlugs().__next__().getMasterNet().getDirection() == DirectionOUT : # is an output net of another instance + if interactive : print( "* One net put in the fifo :", net_ent ) file.insert ( 0, net_ent ) # If the instance has more than one output @@ -1261,7 +1260,7 @@ class Model() : break if not ( connect ) : - if interactive : print "* One net suppressed (d) :", net_file + if interactive : print( "* One net suppressed (d) :", net_file ) TAB_NETS.append ( net_file.getName() ) cpt_net_del += 1 @@ -1271,13 +1270,13 @@ class Model() : for net_sor in net_sortie_inst : if net_sor in file : file.remove ( net_sor ) - if interactive : print "* One net suppressed (e) :", net_sor + if interactive : print( "* One net suppressed (e) :", net_sor ) TAB_NETS.append ( net_sor.getName() ) cpt_net_del += 1 net_sor.Delete() - if interactive : print "* One instance suppressed (b) :", inst + if interactive : print( "* One instance suppressed (b) :", inst ) TAB_INSTS.append ( inst.getName() ) cpt_inst_del += 1 @@ -1290,7 +1289,7 @@ class Model() : if cpt_plugs_in == 0 : if net_ent in net_entree : - print "[Stratus Warning] Clean : Interface of", self._name, "changed, net :", net_ent, "is suppressed" + print( "[Stratus Warning] Clean : Interface of", self._name, "changed, net :", net_ent, "is suppressed" ) TAB_NETS.append ( net_ent.getName() ) cpt_net_del += 1 @@ -1298,7 +1297,7 @@ class Model() : net_ent.Delete() else : - if interactive : print "* One net suppressed (f) :", net_ent + if interactive : print( "* One net suppressed (f) :", net_ent ) TAB_NETS.append ( net_ent.getName() ) cpt_net_del += 1 @@ -1306,24 +1305,24 @@ class Model() : net_ent.Delete() elif cpt_plugs_in == 1 : - if net_ent.getPlugs().next().getMasterNet().getDirection() == DirectionOUT: # in an output net of another instance - if interactive : print "* One net net put in the fifo :", net_ent + if net_ent.getPlugs().__next__().getMasterNet().getDirection() == DirectionOUT: # in an output net of another instance + if interactive : print( "* One net net put in the fifo :", net_ent ) file.insert ( 0, net_ent ) else : - if interactive : print "The net", net_file, "can not be delayed, it may be delayed later" + if interactive : print( "The net", net_file, "can not be delayed, it may be delayed later" ) else : - print "[Warning] Pb in Clean." + print( "[Warning] Pb in Clean." ) if interactive : - print "" - print "* Number of net suppressed :", cpt_net_del - print "* List of these nets :", TAB_NETS - print "" - print "* Number of instances suppressed :", cpt_inst_del - print "* List of these instance :", TAB_INSTS - print "" + print( "" ) + print( "* Number of net suppressed :", cpt_net_del ) + print( "* List of these nets :", TAB_NETS ) + print( "" ) + print( "* Number of instances suppressed :", cpt_inst_del ) + print( "* List of these instance :", TAB_INSTS ) + print( "" ) ############################### def count_plugs ( self, net ) : diff --git a/stratus1/src/stratus/st_mult.py b/stratus1/src/stratus/st_mult.py index 98225c88..e8084cf6 100644 --- a/stratus1/src/stratus/st_mult.py +++ b/stratus1/src/stratus/st_mult.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -70,7 +69,7 @@ class Multiplier ( Model ) : else : self._signed = True - if self.nbit0 < 3 or self.nbit1 < 3 : raise SizeError, 'input arities must be greater than 2' + if self.nbit0 < 3 or self.nbit1 < 3 : raise SizeError( 'input arities must be greater than 2' ) self.type = "nr" self.nType = 1 @@ -90,8 +89,8 @@ class Multiplier ( Model ) : def Netlist ( self ) : size_A = self.nbit0 + 2 - if self.nbit1 % 2 == 0 : size_B = self.nbit1 / 2 - else : size_B = ( self.nbit1+1 ) / 2 + if self.nbit1 % 2 == 0 : size_B = self.nbit1 // 2 + else : size_B = ( self.nbit1+1 ) // 2 if self.nbit1 % 2 == 0 : parite = 1 else : parite = 0 diff --git a/stratus1/src/stratus/st_mult_blocs.py b/stratus1/src/stratus/st_mult_blocs.py index c548b2fd..6627f2c6 100644 --- a/stratus1/src/stratus/st_mult_blocs.py +++ b/stratus1/src/stratus/st_mult_blocs.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM diff --git a/stratus1/src/stratus/st_mult_matrix.py b/stratus1/src/stratus/st_mult_matrix.py index 8482c06e..96399ccc 100644 --- a/stratus1/src/stratus/st_mult_matrix.py +++ b/stratus1/src/stratus/st_mult_matrix.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM diff --git a/stratus1/src/stratus/st_mux.py b/stratus1/src/stratus/st_mux.py index 43d3433b..446fe030 100644 --- a/stratus1/src/stratus/st_mux.py +++ b/stratus1/src/stratus/st_mux.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM diff --git a/stratus1/src/stratus/st_net.py b/stratus1/src/stratus/st_net.py index 1514657c..83464674 100644 --- a/stratus1/src/stratus/st_net.py +++ b/stratus1/src/stratus/st_net.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -57,8 +56,11 @@ from st_generate import Generate import re, types, inspect ## Class of nets ## -PORT = ( "st_net.SignalIn", "st_net.SignalOut", "st_net.SignalInOut" \ - , "st_net.SignalUnknown", "st_net.TriState" \ +PORT = ( "" + , "" + , "" + , "" + , "" ) ##################### @@ -111,6 +113,8 @@ class net : ##### For buses ##### def __getitem__ ( self, indice ) : + if isinstance(indice,slice): + return self.getslice( indice.start, indice.stop ) if indice == -1: return Sig ( self, self._ind + self._arity - 1 ) if ( indice < self._ind ) or ( indice >= ( self._ind + self._arity ) ) : @@ -122,7 +126,7 @@ class net : return Sig ( self, indice ) - def __getslice__ ( self, ind1, ind2 ) : + def getslice ( self, ind1, ind2 ) : if ind1 < ind2 : indmin = ind1 indmax = ind2 @@ -154,7 +158,7 @@ class net : cell = CELLS[-1] ### Initialisation of net representing a constant ### - if type ( net ) == types.StringType : + if isinstance(net,str): from st_const import Constant if not ( cell._st_vdds ) or not ( cell._st_vsss ) : @@ -530,14 +534,14 @@ class net : maxPossibility = pow ( 2, self._arity ) - 1 ### List ### - if type ( nets ) == types.ListType : + if isinstance(nets,list): if len ( nets ) != ( maxPossibility + 1 ) : raise Exception ( "\n[Stratus ERROR] Mux : when using a list, all the nets must be precised. Maybe one should use a dictionnary.\n" ) return self.muxList ( nets ) ### Dictionnary : Creation of the corresponding list ### - elif type ( nets ) == types.DictType : + elif isinstance(nets,dict): # Initialisation of the by default to 0 net if no default net given if "default" not in nets : nets["default"] = 0 @@ -868,7 +872,7 @@ class net : # Error : if re.search ( "[A-Z]", nom ) : - print "[Stratus Warning] : Upper case letters are not supported, the name", nom, "is lowered." + print( "[Stratus Warning] : Upper case letters are not supported, the name", nom, "is lowered." ) nom = nom.lower () if re.search ( " ", nom ) : chaine = re.search ( "st_net\.(.*)", str ( self.__class__ ) ) @@ -923,13 +927,13 @@ class net : else : #for i in range ( self._ind+self._arity, self._ind, -1 ): for i in range ( self._ind, self._ind+self._arity, 1 ): - #print 'create %s(%d)' % (self._name,i) + #print( 'create %s(%d)' % (self._name,i) ) self.hur_net ( '%s(%d)' % (self._name,i), i ) ##### hur_net one by one ##### def hur_net ( self, name, ind ) : if ( self._alias ) and ( self._alias[ind] ) : - self._hur_net += [self._alias[ind].keys()[0]] # put the right hur_net + self._hur_net += [list(self._alias[ind].keys())[0]] # put the right hur_net return elif ( self._to_cat ) and ( self._to_cat[ind] ) : cat = self._to_cat[ind] @@ -973,7 +977,7 @@ class net : bitToMerge = realNet._to_merge[i][1] if selfToMerge._hur_net == [] : - print "[Stratus Warning] HurricanePlug <= : net", selfToMerge._name, "has no hurricane net." + print( "[Stratus Warning] HurricanePlug <= : net", selfToMerge._name, "has no hurricane net." ) return if realNet._hur_net == [] : diff --git a/stratus1/src/stratus/st_param.py b/stratus1/src/stratus/st_param.py index 69f912f0..03f39296 100644 --- a/stratus1/src/stratus/st_param.py +++ b/stratus1/src/stratus/st_param.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM diff --git a/stratus1/src/stratus/st_parser.py b/stratus1/src/stratus/st_parser.py index 2fa7ac9f..3360fc0e 100644 --- a/stratus1/src/stratus/st_parser.py +++ b/stratus1/src/stratus/st_parser.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -85,7 +84,7 @@ class Parser : ######################################### def start_element ( self, name, attrs ) : # Print which the technology is -# if name == 'technology' : print " - Stratus virtual technology targets:", attrs['name'] +# if name == 'technology' : print( " - Stratus virtual technology targets:", attrs['name'] ) # Modification of attributes if name == 'model' : @@ -111,7 +110,7 @@ class Parser : def end_element ( self, name ) : pass ############################## - def char_data ( self, data ) : pass # print repr(data) + def char_data ( self, data ) : pass # print( repr(data) ) # Parsing a file ################ @@ -160,14 +159,14 @@ class InitParser : def end_element ( self, name ) : pass ############################## - def char_data ( self, data ) : pass # print repr(data) + def char_data ( self, data ) : pass # print( repr(data) ) # Parsing a file ################ def Parse ( self, nameFile ) : if not os.path.isfile(nameFile): - print '[ERROR] Parser.Parse(): stratus1.mappingName (\"%s\") file not found.' % nameFile - self._p.ParseFile ( open ( nameFile, "r" ) ) + print( '[ERROR] Parser.Parse(): stratus1.mappingName (\"%s\") file not found.' % nameFile ) + self._p.ParseFile ( open ( nameFile, "rb" ) ) # Given the tab of the name of the cells, contruction of a tab giving the name of the generators (first letter uppered) for name in BV : @@ -199,7 +198,7 @@ class WeightParser : if 'time' in attrs : temp = float(attrs['time']) else : -# print 'Warning: no weight done in the file, weight put to 1.' +# print( 'Warning: no weight done in the file, weight put to 1.' ) temp = 1 #self._weightTime[virtName][0] = temp @@ -217,7 +216,7 @@ class WeightParser : if 'area' in attrs : temp = float(attrs['area']) else : -# print 'Warning: no weight done in the file, weight put to 1.' +# print( 'Warning: no weight done in the file, weight put to 1.' ) temp = 1 self._weightArea[virtName] = temp @@ -225,7 +224,7 @@ class WeightParser : if 'power' in attrs : temp = float(attrs['power']) else : -# print 'Warning: no weight done in the file, weight put to 1.' +# print( 'Warning: no weight done in the file, weight put to 1.' ) temp = 1 self._weightPower[virtName] = temp @@ -234,7 +233,7 @@ class WeightParser : def end_element ( self, name ) : pass ############################## - def char_data ( self, data ) : pass # print repr(data) + def char_data ( self, data ) : pass # print( repr(data) ) # Parsing a file ################ diff --git a/stratus1/src/stratus/st_placeAndRoute.py b/stratus1/src/stratus/st_placeAndRoute.py index c471aad4..dbfcb2c7 100644 --- a/stratus1/src/stratus/st_placeAndRoute.py +++ b/stratus1/src/stratus/st_placeAndRoute.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -195,7 +194,7 @@ def PadNorth ( *args ) : for arg in args : if not arg : raise Exception ( "\n[Stratus ERROR] PadNorth : one instance doesn't exist.\n" ) - if str ( arg.__class__ ) != "st_instance.Inst" : + if str ( arg.__class__ ) != "" : raise Exception ( "\n[Stratus ERROR] PadNorth : one argument is not an instance.\n" ) hur_args.append ( arg._hur_instance ) @@ -217,7 +216,7 @@ def PadSouth ( *args ) : for arg in args : if not arg : raise Exception ( "\n[Stratus ERROR] PadSouth : one instance doesn't exist.\n" ) - if str ( arg.__class__ ) != "st_instance.Inst" : + if str ( arg.__class__ ) != "" : raise Exception ( "\n[Stratus ERROR] PadSouth : one argument is not an instance.\n" ) hur_args.append ( arg._hur_instance ) @@ -239,7 +238,7 @@ def PadEast ( *args ) : for arg in args : if not arg : raise Exception ( "\n[Stratus ERROR] PadEast : one instance doesn't exist.\n" ) - if str ( arg.__class__ ) != "st_instance.Inst" : + if str ( arg.__class__ ) != "" : raise Exception ( "\n[Stratus ERROR] PadEast : one argument is not an instance.\n" ) hur_args.append ( arg._hur_instance ) @@ -261,7 +260,7 @@ def PadWest ( *args ) : for arg in args : if not arg : raise Exception ( "\n[Stratus ERROR] PadWest : one instance doesn't exist.\n" ) - if str ( arg.__class__ ) != "st_instance.Inst" : + if str ( arg.__class__ ) != "" : raise Exception ( "\n[Stratus ERROR] PadWest : one argument is not an instance.\n" ) hur_args.append ( arg._hur_instance ) @@ -312,11 +311,11 @@ class ClockBuffer : plugQ = inst.getPlug ( modelMasterCell.getNet ( "q" ) ) plugQ.setNet ( self.ck_b._hur_net[0] ) - plugGround = inst.getPlug ( iter(modelMasterCell.getGroundNets()).next() ) - plugGround.setNet ( iter(self.cell._hur_cell.getGroundNets()).next() ) + plugGround = inst.getPlug ( iter(modelMasterCell.getGroundNets()).__next__() ) + plugGround.setNet ( iter(self.cell._hur_cell.getGroundNets()).__next__() ) - plugPower = inst.getPlug ( iter(modelMasterCell.getPowerNets()).next() ) - plugPower.setNet ( iter(self.cell._hur_cell.getPowerNets()).next() ) + plugPower = inst.getPlug ( iter(modelMasterCell.getPowerNets()).__next__() ) + plugPower.setNet ( iter(self.cell._hur_cell.getPowerNets()).__next__() ) def AddFF ( self, netname ) : net = self.cell._hur_cell.getNet ( netname ) diff --git a/stratus1/src/stratus/st_placement.py b/stratus1/src/stratus/st_placement.py index 192b4e34..1272fe59 100644 --- a/stratus1/src/stratus/st_placement.py +++ b/stratus1/src/stratus/st_placement.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -74,7 +73,7 @@ def Place ( ins, sym, ref, plac = FIXED, cell = None ) : raise Exception( message ) # Error message : if ref is not a reference - if str ( ref.__class__ ) != "st_ref.XY" : + if str ( ref.__class__ ) != "" : raise Exception ( "\n[Stratus ERROR] Place : wrong argument for placement, the coordinates must be put in a XY object.\n" ) # Error message if plac is not one of the permitted values @@ -274,7 +273,8 @@ def DefAb ( ref1, ref2 ) : UpdateSession.open () # Error message : if ref are not references - if ( str ( ref1.__class__ ) != "st_ref.XY" ) or ( str ( ref2.__class__ ) != "st_ref.XY" ) : + if ( str ( ref1.__class__ ) != "" ) \ + or ( str ( ref2.__class__ ) != "" ) : err = "\n[Stratus ERROR] DefAb : wrong argument, the coordinates must be put in a XY object.\n" raise Exception ( err ) @@ -310,10 +310,10 @@ def ResizeAb ( dx1, dy1, dx2, dy2 ) : global CELLS from st_model import CELLS - #print "ResizeAb()", DbU.getValueString(dx1) \ - # , DbU.getValueString(dy1) \ - # , DbU.getValueString(dx2) \ - # , DbU.getValueString(dy2) + #print( "ResizeAb()", DbU.getValueString(dx1) \ + # , DbU.getValueString(dy1) \ + # , DbU.getValueString(dx2) \ + # , DbU.getValueString(dy2) ) global MYSLICE, MYPITCH @@ -383,7 +383,7 @@ def placement ( st_inst, sym, x, y, plac = FIXED, cell = None, fonction = None ) if not st_inst : raise Exception ( "\n[Stratus ERROR] Placement : the instance doesn't exist.\n" ) # Error : st_inst is not an instance - if str ( st_inst.__class__ ) != "st_instance.Inst" : + if str ( st_inst.__class__ ) != "" : err = "\n\n[Stratus ERROR] Placement : the first argument " + st_inst + " is not an instance.\n" raise Exception ( err ) @@ -572,11 +572,11 @@ class ClockBuffer : plugQ = inst.getPlug ( modelMasterCell.getNet ( "q" ) ) plugQ.setNet ( self.ck_b._hur_net[0] ) - plugGround = inst.getPlug ( iter(modelMasterCell.getGroundNets()).next() ) - plugGround.setNet ( iter(self.cell._hur_cell.getGroundNets()).next() ) + plugGround = inst.getPlug ( iter(modelMasterCell.getGroundNets()).__next__() ) + plugGround.setNet ( iter(self.cell._hur_cell.getGroundNets()).__next__() ) - plugPower = inst.getPlug ( iter(modelMasterCell.getPowerNets()).next() ) - plugPower.setNet ( iter(self.cell._hur_cell.getPowerNets()).next() ) + plugPower = inst.getPlug ( iter(modelMasterCell.getPowerNets()).__next__() ) + plugPower.setNet ( iter(self.cell._hur_cell.getPowerNets()).__next__() ) def AddFF ( self, netname ) : net = self.cell._hur_cell.getNet ( netname ) diff --git a/stratus1/src/stratus/st_ref.py b/stratus1/src/stratus/st_ref.py index 84b337c5..14545914 100644 --- a/stratus1/src/stratus/st_ref.py +++ b/stratus1/src/stratus/st_ref.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -67,11 +66,11 @@ def GetRefXY ( pathname, refname ) : cell = CELLS[-1] # Check arguments type - if type ( pathname ) != types.StringType : + if not isinstance(pathname,str): err = "\n[Stratus ERROR] GetRefXY : The instance's path must be put with a string.\n" raise Exception ( err ) - if type ( refname ) != types.StringType : + if not isinstance(refname,str): err = "\n[Stratus ERROR] GetRefXY : The reference must be done with it's name : a string.\n" raise Exception ( err ) @@ -87,11 +86,11 @@ def PlaceRef ( ref, name ) : cell = CELLS[-1] # Check arguments type - if ( str ( ref.__class__ ) != "st_ref.XY" ) : + if ( str ( ref.__class__ ) != "" ) : err = "\n[Stratus ERROR] PlaceRef : Wrong argument, the coordinates of the reference must be put in a XY object.\n" raise Exception ( err ) - if type ( name ) != types.StringType : + if not isinstance(name,str): err = "\n[Stratus ERROR] PlaceRef : Argument layer must be a string.\n" raise Exception ( err ) @@ -103,7 +102,7 @@ def PlaceContact ( net, layer, ref, width, height ) : from st_model import FRAMEWORK # Check arguments type - if type ( layer ) != types.StringType : + if not isinstance(layer,str): err = "\n[Stratus ERROR] PlaceContact : Argument layer must be a string.\n" raise Exception ( err ) myLayer = getDataBase().getTechnology().getLayer ( layer ) @@ -111,7 +110,7 @@ def PlaceContact ( net, layer, ref, width, height ) : # err = "\n[Stratus ERROR] PlaceContact : Argument layer does not exist.\n" # raise err - if ( str ( ref.__class__ ) != "st_ref.XY" ) : + if ( str ( ref.__class__ ) != "" ) : err = "\n[Stratus ERROR] PlaceContact : Wrong argument, the coordinates of the contact must be put in a XY object.\n" raise Exception ( err ) @@ -133,7 +132,7 @@ def PlacePin ( net, layer, direction, ref, width, height ) : from st_model import FRAMEWORK # Check arguments type - if type ( layer ) != types.StringType : + if not isinstance(layer,str): err = "\n[Stratus ERROR] PlacePin : Argument layer must be a string.\n" raise Exception ( err ) # No CALU permitted for Pin @@ -155,7 +154,7 @@ def PlacePin ( net, layer, direction, ref, width, height ) : err = "\n[Stratus ERROR] PlacePin : Illegal pin access direction. The values are : UNDEFINED, NORTH, SOUTH, EAST, WEST.\n" raise Exception ( err ) - if ( str ( ref.__class__ ) != "st_ref.XY" ) : + if ( str ( ref.__class__ ) != "" ) : err = "\n[Stratus ERROR] PlacePin : Wrong argument, the coordinates of the pin must be put in a XY object.\n" raise Exception ( err ) @@ -181,11 +180,12 @@ def PlaceSegment ( net, layer, ref1, ref2, width ) : from st_model import FRAMEWORK # Check arguments type - if type ( layer ) != types.StringType : + if not isinstance(layer,str): err = "\n[Stratus ERROR] PlaceSegment : Argument layer must be a string.\n" raise Exception ( err ) - if ( str ( ref1.__class__ ) != "st_ref.XY" ) or ( str ( ref2.__class__ ) != "st_ref.XY" ) : + if ( str ( ref1.__class__ ) != "" ) \ + or ( str ( ref2.__class__ ) != "" ) : err = "\n[Stratus ERROR] PlaceSegment : Wrong argument, the coordinates of the segment must be put in XY objects.\n" raise Exception ( err ) @@ -218,11 +218,11 @@ def CopyUpSegment ( pathname, netname, newnet ) : cell = CELLS[-1] # Check arguments type - if type ( pathname ) != types.StringType : + if not isintance(pathname,str): err = "\n[Stratus ERROR] CopyUpSegment : The instance's path must be put with a string.\n" raise Exception ( err ) - if type ( netname ) != types.StringType : + if not isinstance(netname,str): err = "\n[Stratus ERROR] CopyUpSegment : The segment must be done with it's name : a string.\n" raise Exception ( err ) diff --git a/stratus1/src/stratus/st_shifter.py b/stratus1/src/stratus/st_shifter.py index be3c020e..79629d75 100644 --- a/stratus1/src/stratus/st_shifter.py +++ b/stratus1/src/stratus/st_shifter.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM diff --git a/stratus1/src/stratus/st_slansky.py b/stratus1/src/stratus/st_slansky.py index bc917671..407b395f 100644 --- a/stratus1/src/stratus/st_slansky.py +++ b/stratus1/src/stratus/st_slansky.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM diff --git a/stratus1/src/stratus/stratus.py b/stratus1/src/stratus/stratus.py index dd011e3d..21b555e6 100644 --- a/stratus1/src/stratus/stratus.py +++ b/stratus1/src/stratus/stratus.py @@ -1,58 +1,72 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2008-2018, All Rights Reserved +# Copyright (c) Sorbonne Uiversité 2008-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | # | S t r a t u s - Netlists/Layouts Description | # | | # | Author : Sophie BELLOEIL | -# | E-mail : Sophie.Belloeil@asim.lip6.fr | +# | E-mail : Sophie.Belloeil@lip6.fr | # | =============================================================== | # | Py Module : "./stratus.py" | # +-----------------------------------------------------------------+ -import sys -import traceback -import Cfg -import CRL - -# Triggers the default configuration files loading. -CRL.AllianceFramework.get() - -Cfg.Configuration.pushDefaultPriority(Cfg.Parameter.Priority.ApplicationBuiltin) -Cfg.getParamString('stratus1.format' ).setString('vst') -Cfg.getParamString('stratus1.simulator').setString('asimut') -Cfg.Configuration.popDefaultPriority() - -print ' o Stratus Configuration:' -print ' - Netlist format: <%s>.' % Cfg.getParamString('stratus1.format').asString() -print ' - Simulator: <%s>.' % Cfg.getParamString('stratus1.simulator').asString() - -from Hurricane import UpdateSession -from st_model import * -from st_net import * -from st_instance import * -from st_placement import * -#from st_placeAndRoute import * -from st_ref import * -from st_generate import * -from st_const import * -from st_cat import * -from st_param import * -from st_getrealmodel import GetWeightTime, GetWeightArea, GetWeightPower - -from util_Const import * -from util_Defs import * -from util_Misc import * -from util_Gen import * -from util_Shift import * -from util_uRom import * -from util import * - -from patterns import * +try: + import sys + import traceback + import Cfg + import CRL + + # Triggers the default configuration files loading. + CRL.AllianceFramework.get() + + Cfg.Configuration.pushDefaultPriority(Cfg.Parameter.Priority.ApplicationBuiltin) + Cfg.getParamString('stratus1.format' ).setString('vst') + Cfg.getParamString('stratus1.simulator').setString('asimut') + Cfg.Configuration.popDefaultPriority() + + print( ' o Stratus Configuration:' ) + print( ' - Netlist format: "{}".'.format(Cfg.getParamString('stratus1.format' ).asString()) ) + print( ' - Simulator: "{}".' .format(Cfg.getParamString('stratus1.simulator').asString()) ) + + from Hurricane import UpdateSession + from st_model import * + from st_net import * + from st_instance import * + from st_placement import * + #from st_placeAndRoute import * + from st_ref import * + from st_generate import * + from st_const import * + from st_cat import * + from st_param import * + from st_getrealmodel import GetWeightTime, GetWeightArea, GetWeightPower + + from util_Const import * + from util_Defs import * + from util_Misc import * + from util_Gen import * + from util_Shift import * + from util_uRom import * + from util import * + + from patterns import * +except ImportError as e: + module = str(e).split()[-1] + + print( '[ERROR] The "{}" python module or symbol cannot be loaded.'.format(module) ) + print( ' Please check the integrity of the "coriolis" package.' ) + print( traceback.format_exc() ) + sys.exit(1) +except Exception as e: + print( '[ERROR] A strange exception occurred while loading the basic Coriolis/Python' ) + print( ' modules. Something may be wrong at Python/C API level.\n' ) + #print( ' {}'.format(e) ) + print( traceback.format_exc() ) + sys.exit(2) DoNetlist = 0x00000001 @@ -64,46 +78,48 @@ RunSimulator = 0x00000010 def buildModel ( moduleName, flags, className=None, modelName=None, parameters={} ): try: - #print moduleName - if not className: className = moduleName - if not modelName: modelName = moduleName.lower() + #print( moduleName ) + if not className: className = moduleName + if not modelName: modelName = moduleName.lower() + + module = __import__( moduleName, globals(), locals(), className ) + if not className in module.__dict__: + print( '[ERROR] Stratus module "{}" do not contains a design named "{}".'.format(moduleName,className)) + sys.exit(1) + + UpdateSession.open() + print( ' - Generating Stratus Model "{}" (generator:"{}").'.format(modelName, className)) + model = module.__dict__[className](modelName,parameters) + model.Interface() + + saveFlags = 0 + if flags & DoNetlist: model.Netlist(); saveFlags |= LOGICAL + if flags & DoLayout: model.Layout (); saveFlags |= PHYSICAL + if flags & (DoPattern|RunSimulator): model.Pattern() + + stopLevel=0 + if flags & DoStop: stopLevel = 1 + model.View(stopLevel, 'Model %s' % modelName) + model.Save(saveFlags) + UpdateSession.close() + + if flags & RunSimulator: model.Simul() - module = __import__( moduleName, globals(), locals(), className ) - if not module.__dict__.has_key(className): - print '[ERROR] Stratus module <%s> do not contains a design named <%s>.' % (moduleName,className) - sys.exit(1) - - UpdateSession.open() - print ' - Generating Stratus Model <%s> (generator:<%s>).' % (modelName, className) - model = module.__dict__[className](modelName,parameters) - model.Interface() - - saveFlags = 0 - if flags & DoNetlist: model.Netlist(); saveFlags |= LOGICAL - if flags & DoLayout: model.Layout (); saveFlags |= PHYSICAL - if flags & (DoPattern|RunSimulator): model.Pattern() - - stopLevel=0 - if flags & DoStop: stopLevel = 1 - model.View(stopLevel, 'Model %s' % modelName) - model.Save(saveFlags) - UpdateSession.close() - - if flags & RunSimulator: model.Simul() - - except ImportError, e: - module = str(e).split()[-1] - - print '[ERROR] The <%s> Stratus design cannot be loaded.' % module - print ' Please check your design hierarchy.' - print e - sys.exit(1) - except Exception, e: - print '[ERROR] A strange exception occurred while loading the Stratus' - print ' design <%s>. Please check that module for error:\n' % moduleName - traceback.print_tb(sys.exc_info()[2]) - print ' %s' % e - sys.exit(2) + except ImportError as e: + module = str(e).split()[-1] + + print( '[ERROR] The "{}" Stratus design cannot be loaded.'.format(module) ) + print( ' Please check your design hierarchy.' ) + #print( e ) + print( traceback.format_exc() ) + sys.exit(1) + except Exception as e: + print( '[ERROR] A strange exception occurred while loading the Stratus' ) + print( ' design "{}". Please check that module for error:\n'.format(moduleName) ) + #traceback.print_tb(sys.exc_info()[2]) + #print( ' {}'.format(e) ) + print( traceback.format_exc() ) + sys.exit(2) framework = CRL.AllianceFramework.get() return framework.getCell( modelName, CRL.Catalog.State.Views ) diff --git a/stratus1/src/stratus/util.py b/stratus1/src/stratus/util.py index 206b6690..ec57063a 100644 --- a/stratus1/src/stratus/util.py +++ b/stratus1/src/stratus/util.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM diff --git a/stratus1/src/stratus/util_Const.py b/stratus1/src/stratus/util_Const.py index 8c9ce953..bd0b0a39 100644 --- a/stratus1/src/stratus/util_Const.py +++ b/stratus1/src/stratus/util_Const.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -137,10 +136,10 @@ def ltox ( aDigit ) : class newxl : def __init__ ( self ) : - self._size = 0L + self._size = 0 self._l = [] - for i in range ( XLONG_SIZE ) : self._l.append ( 0L ) + for i in range ( XLONG_SIZE ) : self._l.append ( 0 ) ########### @@ -151,7 +150,7 @@ class newxl : LV_const = asConst - if type ( asConst ) != types.StringType : raise Exception ( "\n[Stratus ERROR] : the constant must be described in a string.\n" ) + if not isinstance(asConst,str): raise Exception ( "\n[Stratus ERROR] : the constant must be described in a string.\n" ) base = 1 offset = 2 @@ -171,12 +170,12 @@ class newxl : self._size = (length - offset) * base - xl_size = self._size / 32 + xl_size = self._size // 32 if self._size % 32 : xl_size += 1 for i in range ( xl_size ) : - iRight = length - 1 - ( 32 / base ) * i - iLeft = length - ( 32 / base ) * ( i + 1 ) + iRight = length - 1 - ( 32 // base ) * i + iLeft = length - ( 32 // base ) * ( i + 1 ) if iLeft < offset : iLeft = offset @@ -222,7 +221,7 @@ class newxl : ## getxlbit ## ############## def getxlbit ( self, aBit ) : - i = aBit / 32 + i = aBit // 32 # mask = ( 1 << ( aBit % 32 ) ) mask = 1 @@ -236,15 +235,15 @@ class newxl : err = "\n[Stratus ERROR] : Requested bit", aBit, "is out of range\n" raise Exception ( err ) - if self._l[i] & mask : return 1L - else : return 0L + if self._l[i] & mask : return 1 + else : return 0 ############### ## getxlhexa ## ############### def getxlhexa ( self, aBit ) : - i = aBit / 32 + i = aBit // 32 shift = aBit % 32 if i >= XLONG_SIZE : diff --git a/stratus1/src/stratus/util_Defs.py b/stratus1/src/stratus/util_Defs.py index f607ef62..8fe5a358 100644 --- a/stratus1/src/stratus/util_Defs.py +++ b/stratus1/src/stratus/util_Defs.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -102,7 +101,7 @@ def dpgen_port_bit ( n, flags, s ) : ################# def dpgen_place ( Ins, x, y, plac = FIXED ) : sym = NOSYM - if ( y / 50 ) % 2 : sym = SYM_Y + if ( y // 50 ) % 2 : sym = SYM_Y Place ( Ins, sym, XY ( x, y ), plac ) diff --git a/stratus1/src/stratus/util_Gen.py b/stratus1/src/stratus/util_Gen.py index af1a47f0..d5697a0e 100644 --- a/stratus1/src/stratus/util_Gen.py +++ b/stratus1/src/stratus/util_Gen.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM diff --git a/stratus1/src/stratus/util_Misc.py b/stratus1/src/stratus/util_Misc.py index a9dc8767..194b5180 100644 --- a/stratus1/src/stratus/util_Misc.py +++ b/stratus1/src/stratus/util_Misc.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM @@ -95,4 +94,4 @@ def log2 ( x ) : except OverflowError: # x is too large for direct float handling # with this method, no limit is known - return log2((x+0xffffffffL)/0x100000000L)+32 + return log2((x+0xffffffff)//0x100000000)+32 diff --git a/stratus1/src/stratus/util_Place.py b/stratus1/src/stratus/util_Place.py index 084a313e..f70813b9 100644 --- a/stratus1/src/stratus/util_Place.py +++ b/stratus1/src/stratus/util_Place.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM diff --git a/stratus1/src/stratus/util_Route.py b/stratus1/src/stratus/util_Route.py index b8185c15..d31cf4c8 100644 --- a/stratus1/src/stratus/util_Route.py +++ b/stratus1/src/stratus/util_Route.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM diff --git a/stratus1/src/stratus/util_Shift.py b/stratus1/src/stratus/util_Shift.py index f0e8f39a..cfd4373e 100644 --- a/stratus1/src/stratus/util_Shift.py +++ b/stratus1/src/stratus/util_Shift.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM diff --git a/stratus1/src/stratus/util_uRom.py b/stratus1/src/stratus/util_uRom.py index 6c16ae07..9b5a358e 100644 --- a/stratus1/src/stratus/util_uRom.py +++ b/stratus1/src/stratus/util_uRom.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # This file is part of the Coriolis Project. # Copyright (C) Laboratoire LIP6 - Departement ASIM diff --git a/tutorial/CMakeLists.txt b/tutorial/CMakeLists.txt index 6afbd210..7235704b 100644 --- a/tutorial/CMakeLists.txt +++ b/tutorial/CMakeLists.txt @@ -8,21 +8,21 @@ cmake_minimum_required(VERSION 2.8.9) set(ignoreVariables "${LIB_SUFFIX} ${BUILD_DOC} ${CMAKE_INSTALL_DIR}") + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) setup_project_paths(CORIOLIS) set_cmake_policies() - setup_boost(program_options python) + setup_boost(program_options) setup_qt() find_package(Libexecinfo REQUIRED) find_package(LibXml2 REQUIRED) - find_package(PythonLibs 2 REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) - find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) find_package(Doxygen) diff --git a/tutorial/python/CMakeLists.txt b/tutorial/python/CMakeLists.txt index 66ed43f6..6c2a986c 100644 --- a/tutorial/python/CMakeLists.txt +++ b/tutorial/python/CMakeLists.txt @@ -1,3 +1,3 @@ # -*- explicit-buffer-name: "CMakeLists.txt" -*- - install ( FILES runDemo.py DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins ) + install ( FILES runDemo.py DESTINATION ${Python_CORIOLISLIB}/cumulus/plugins ) diff --git a/tutorial/python/runDemo.py b/tutorial/python/runDemo.py index df27a0ec..1ebf4157 100644 --- a/tutorial/python/runDemo.py +++ b/tutorial/python/runDemo.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2017-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2017-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -10,73 +10,69 @@ # | Author : Jean-Paul CHAPUT | # | E-mail : Jean-Paul.Chaput@lip6.fr | # | =============================================================== | -# | Python : "./plugins/RSavePlugin.py" | +# | Python : "./runDemo.py" | # +-----------------------------------------------------------------+ try: - import sys - import os.path - import Cfg - import Viewer - import CRL - import helpers - from helpers.io import ErrorMessage - from helpers.io import WarningMessage - from helpers import showPythonTrace - import plugins - from Hurricane import DataBase - from Hurricane import Breakpoint - from Hurricane import UpdateSession - from Hurricane import DbU - from Hurricane import Box - from Hurricane import Contact - from Hurricane import Vertical - from Hurricane import Horizontal - from Hurricane import Net - from Hurricane import Cell -except ImportError, e: - serror = str(e) - if serror.startswith('No module named'): - module = serror.split()[-1] - print '[ERROR] The <%s> python module or symbol cannot be loaded.' % module - print ' Please check the integrity of the package.' - if serror.find('cannot open shared object file'): - library = serror.split(':')[0] - print '[ERROR] The <%s> shared library cannot be loaded.' % library - print ' Under RHEL 6, you must be under devtoolset-2.' - print ' (scl enable devtoolset-2 bash)' - sys.exit(1) -except Exception, e: - print '[ERROR] A strange exception occurred while loading the basic Coriolis/Python' - print ' modules. Something may be wrong at Python/C API level.\n' - print ' %s' % e - sys.exit(2) + import sys + import os.path + import Cfg + import Viewer + import CRL + import helpers + from helpers.io import ErrorMessage + from helpers.io import WarningMessage + from helpers import showPythonTrace + import plugins + from Hurricane import DataBase + from Hurricane import Breakpoint + from Hurricane import UpdateSession + from Hurricane import DbU + from Hurricane import Box + from Hurricane import Contact + from Hurricane import Vertical + from Hurricane import Horizontal + from Hurricane import Net + from Hurricane import Cell +except ImportError as e: + serror = str(e) + if serror.startswith('No module named'): + module = serror.split()[-1] + print( '[ERROR] The "{}" python module or symbol cannot be loaded.'.format(module) ) + print( ' Please check the integrity of the "coriolis" package.' ) + if serror.find('cannot open shared object file'): + library = serror.split(':')[0] + print( '[ERROR] The "{}" shared library cannot be loaded.'.format(library) ) + print( ' Under RHEL 6, you must be under devtoolset-2.' ) + print( ' (scl enable devtoolset-2 bash)' ) + sys.exit(1) +except Exception as e: + print( '[ERROR] A strange exception occurred while loading the basic Coriolis/Python' ) + print( ' modules. Something may be wrong at Python/C API level.\n' ) + print( ' {}'.format(e) ) + sys.exit(2) def runDemo ( cell, editor ): - print 'runDemo() Python plugin function has been called.' - + print( 'runDemo() Python plugin function has been called.' ) if cell: - print WarningMessage( 'A Cell "%s" is already loaded in the Viewer, cowardly exiting.' % cell.getName() ) - return - + print( WarningMessage( 'A Cell "{}" is already loaded in the Viewer, cowardly exiting.' \ + .format(cell.getName()) )) + return library = CRL.AllianceFramework.get().getLibrary( 0 ) cell = CRL.AllianceFramework.get().getCell( 'demo_cell', CRL.Catalog.State.Views ) if cell: - print WarningMessage( '"demo_cell" has already been created, do not run twice.' ) - return - + print( WarningMessage( '"demo_cell" has already been created, do not run twice.' )) + return UpdateSession.open() cell = Cell.create( library, 'demo_cell' ) - cell.setAbutmentBox( Box( DbU.fromLambda( 0.0), DbU.fromLambda( 0.0) , DbU.fromLambda(15.0), DbU.fromLambda(50.0) ) ) UpdateSession.close() if editor: editor.setCell( cell ) - Breakpoint.stop( 1, 'Abutment box has been drawn.' ) UpdateSession.open() @@ -94,22 +90,18 @@ def runDemo ( cell, editor ): nwellNet = Net.create( cell, 'nwell' ) Horizontal.create( nwellNet, nwell, DbU.fromLambda(39.0), DbU.fromLambda(24.0), DbU.fromLambda(0.0), DbU.fromLambda(15.0) ) - vss = Net.create( cell, 'vss' ) vdd = Net.create( cell, 'vdd' ) - Horizontal.create( vss, metal1 , DbU.fromLambda(3.0), DbU.fromLambda(6.0), DbU.fromLambda(0.0), DbU.fromLambda(15.0) ) Vertical.create ( vss, diffN , DbU.fromLambda(3.5), DbU.fromLambda(4.0), DbU.fromLambda(4.0), DbU.fromLambda(12.0) ) Contact.create ( vss, contDiffN, DbU.fromLambda(4.0), DbU.fromLambda(5.0) ) - Horizontal.create( vdd, metal1 , DbU.fromLambda(47.0), DbU.fromLambda( 6.0), DbU.fromLambda( 0.0), DbU.fromLambda(15.0) ) Vertical.create ( vdd, diffP , DbU.fromLambda( 3.5), DbU.fromLambda( 4.0), DbU.fromLambda(28.0), DbU.fromLambda(46.0) ) Contact.create ( vdd, contDiffP, DbU.fromLambda( 4.0), DbU.fromLambda(45.0) ) - UpdateSession.close() Breakpoint.stop( 1, 'Power nets have been drawn.' ) - UpdateSession.open() + UpdateSession.open() nq = Net.create( cell, 'nq' ) Vertical.create ( nq, diffN , DbU.fromLambda(10.0), DbU.fromLambda( 3.0), DbU.fromLambda( 8.0), DbU.fromLambda(12.0) ) Vertical.create ( nq, diffP , DbU.fromLambda(10.0), DbU.fromLambda( 3.0), DbU.fromLambda(28.0), DbU.fromLambda(37.0) ) @@ -117,11 +109,10 @@ def runDemo ( cell, editor ): Contact.create ( nq, contDiffP, DbU.fromLambda(10.0), DbU.fromLambda(30.0) ) Contact.create ( nq, contDiffP, DbU.fromLambda(10.0), DbU.fromLambda(35.0) ) Vertical.create ( nq, metal1 , DbU.fromLambda(10.0), DbU.fromLambda( 2.0), DbU.fromLambda(10.0), DbU.fromLambda(40.0) ) - UpdateSession.close() Breakpoint.stop( 1, 'Output has been drawn.' ) - UpdateSession.open() + UpdateSession.open() i = Net.create( cell, 'i' ) Vertical.create ( i, ntrans , DbU.fromLambda( 7.0), DbU.fromLambda( 1.0), DbU.fromLambda( 6.0), DbU.fromLambda(14.0) ) Vertical.create ( i, poly , DbU.fromLambda( 7.0), DbU.fromLambda( 1.0), DbU.fromLambda(14.0), DbU.fromLambda(26.0) ) @@ -152,17 +143,13 @@ def unicornHook ( **kw ): def scriptMain ( **kw ): - try: - helpers.staticInitialization( quiet=True ) - #helpers.setTraceLevel( 550 ) - - Breakpoint.setStopLevel( 1 ) - print ' o Breakpoint level: %d.' % Breakpoint.getStopLevel() - cell, editor = plugins.kwParseMain( **kw ) - - runDemo( cell, editor ) - - except Exception, e: - helpers.io.catch( e ) - - return 0 + try: + helpers.staticInitialization( quiet=True ) + #helpers.setTraceLevel( 550 ) + Breakpoint.setStopLevel( 1 ) + print( ' o Breakpoint level: {}.'.format(Breakpoint.getStopLevel()) ) + cell, editor = plugins.kwParseMain( **kw ) + runDemo( cell, editor ) + except Exception as e: + helpers.io.catch( e ) + return 0 diff --git a/tutorial/src/CMakeLists.txt b/tutorial/src/CMakeLists.txt index e93d9f9d..3038a61e 100644 --- a/tutorial/src/CMakeLists.txt +++ b/tutorial/src/CMakeLists.txt @@ -7,7 +7,7 @@ ${CONFIGURATION_INCLUDE_DIR} ${QtX_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} - ${PYTHON_INCLUDE_PATH} + ${Python_INCLUDE_DIRS} ) set( includes tutorial/TutorialEngine.h tutorial/GraphicTutorialEngine.h @@ -40,7 +40,7 @@ ${QtX_LIBRARIES} ${Boost_LIBRARIES} ${LIBXML2_LIBRARIES} - ${PYTHON_LIBRARIES} -lutil + ${Python_LIBRARIES} -lutil ${LIBEXECINFO_LIBRARIES} ) diff --git a/tutorial/src/PyTutorial.cpp b/tutorial/src/PyTutorial.cpp index fd2bee76..fe116b09 100644 --- a/tutorial/src/PyTutorial.cpp +++ b/tutorial/src/PyTutorial.cpp @@ -2,7 +2,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC 2017-2018, All Rights Reserved +// Copyright (c) Sorbonne Université 2017-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -58,12 +58,22 @@ extern "C" { { {NULL, NULL, 0, NULL} /* sentinel */ }; + + static PyModuleDef PyTutorial_ModuleDef = + { PyModuleDef_HEAD_INIT + , .m_name = "Tutorial" + , .m_doc = "Show how to interface Coriolis/C++ to Python." + , .m_size = -1 + , .m_methods = PyTutorial_Methods + }; + // --------------------------------------------------------------- - // Module Initialization : "initTutorial ()" + // Module Initialization : "PyInit_Tutorial ()" - DL_EXPORT(void) initTutorial () { - cdebug_log(40,0) << "initTutorial()" << endl; + PyMODINIT_FUNC PyInit_Tutorial ( void ) + { + cdebug_log(40,0) << "PyInit_Tutorial()" << endl; PyTutorialEngine_LinkPyType(); PyGraphicTutorialEngine_LinkPyType(); @@ -71,17 +81,19 @@ extern "C" { PYTYPE_READY_SUB( TutorialEngine , ToolEngine ); PYTYPE_READY_SUB( GraphicTutorialEngine, GraphicTool ); - PyObject* module = Py_InitModule( "Tutorial", PyTutorial_Methods ); + PyObject* module = PyModule_Create( &PyTutorial_ModuleDef ); if (module == NULL) { cerr << "[ERROR]\n" << " Failed to initialize Tutorial module." << endl; - return; + return NULL; } Py_INCREF( &PyTypeTutorialEngine ); PyModule_AddObject( module, "TutorialEngine", (PyObject*)&PyTypeTutorialEngine ); Py_INCREF( &PyTypeGraphicTutorialEngine ); PyModule_AddObject( module, "GraphicTutorialEngine", (PyObject*)&PyTypeGraphicTutorialEngine ); + + return module; } diff --git a/tutorial/src/TutorialEngine.cpp b/tutorial/src/TutorialEngine.cpp index 8c7fd312..f14faaa4 100644 --- a/tutorial/src/TutorialEngine.cpp +++ b/tutorial/src/TutorialEngine.cpp @@ -18,7 +18,7 @@ #include #include #include -#include "vlsisapd/utilities/Path.h" +#include "hurricane/utilities/Path.h" #include "hurricane/DebugSession.h" #include "hurricane/UpdateSession.h" #include "hurricane/Bug.h" diff --git a/tutorial/src/tutorial.py b/tutorial/src/tutorial.py index 24cb924d..a536db22 100755 --- a/tutorial/src/tutorial.py +++ b/tutorial/src/tutorial.py @@ -1,34 +1,34 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 try: - import sys - import os.path - import optparse - import Cfg - import Hurricane - import Viewer - import helpers.io - import CRL - import Unicorn - import Tutorial + import sys + import os.path + import optparse + import Cfg + import Hurricane + import Viewer + import helpers.io + import CRL + import Unicorn + import Tutorial except ImportError, e: - serror = str(e) - if serror.startswith('No module named'): - module = serror.split()[-1] - print '[ERROR] The <%s> python module or symbol cannot be loaded.' % module - print ' Please check the integrity of the package.' - if serror.find('cannot open shared object file'): - library = serror.split(':')[0] - print '[ERROR] The <%s> shared library cannot be loaded.' % library - print ' Under RHEL 6, you must be under devtoolset-2.' - print ' (scl enable devtoolset-2 bash)' - sys.exit(1) + serror = str(e) + if serror.startswith('No module named'): + module = serror.split()[-1] + print( '[ERROR] The "{}" python module or symbol cannot be loaded.'.format(module) ) + print( ' Please check the integrity of the package.' ) + if serror.find('cannot open shared object file'): + library = serror.split(':')[0] + print( '[ERROR] The "{}" shared library cannot be loaded.'.format(library) ) + print( ' Under RHEL 6, you must be under devtoolset-2.' ) + print( ' (scl enable devtoolset-2 bash)' ) + sys.exit(1) except Exception, e: - print '[ERROR] A strange exception occurred while loading the basic Coriolis/Python' - print ' modules. Something may be wrong at Python/C API level.\n' - print ' %s' % e - sys.exit(2) + print( '[ERROR] A strange exception occurred while loading the basic Coriolis/Python' ) + print( ' modules. Something may be wrong at Python/C API level.\n' ) + print( ' {}'.format(e) ) + sys.exit(2) def setCgtBanner ( banner ): @@ -45,78 +45,69 @@ def credits (): if __name__ == '__main__': - try: - usage = str(setCgtBanner(CRL.Banner())) - usage += '\ncgt [options]' - - parser = optparse.OptionParser(usage) - parser.add_option( '--no-init' , action='store_true', dest='noInit' , help='Do not load any initialization.') - parser.add_option( '-c', '--cell' , type='string' , dest='cell' , help='The name of the cell to load, without extension.') - parser.add_option( '--acm-sigda-89' , type='string' , dest='acmSigdaName' , help='An ACM/SIGDA 89 bench name to load, without extension.') - parser.add_option( '--blif' , type='string' , dest='blifName' , help='A Blif (Yosys) design name to load, without extension.') - parser.add_option( '--ispd-05' , type='string' , dest='ispd05name' , help='An ISPD 05 bench (placement) name to load, without extension.') - parser.add_option( '-v', '--verbose' , action='store_true', dest='verbose' , help='First level of verbosity.') - parser.add_option( '-V', '--very-verbose' , action='store_true', dest='veryVerbose' , help='Second level of verbosity.') - parser.add_option( '-i', '--info' , action='store_true', dest='info' , help='Display lots of informational messages.') - parser.add_option( '--paranoid' , action='store_true', dest='paranoid' , help='Display everything that *may be* suspicious...') - parser.add_option( '-b', '--bug' , action='store_true', dest='bug' , help='Display bug related messages.') - parser.add_option( '--show-conf' , action='store_true', dest='showConf' , help='Display Kite configuration.') - parser.add_option( '-D', '--core-dump' , action='store_true', dest='coreDump' , help='Enable core-dump when a crash occurs.') - parser.add_option( '-L', '--log-mode' , action='store_true', dest='logMode' , help='Disable ANSI escape sequences in console output.') - (options, args) = parser.parse_args() - args.insert(0, 'tutu') - - flags = 0 - if options.noInit: - flags |= CRL.AllianceFramework.NoPythonInit - - af = CRL.AllianceFramework.create( flags ) - print af.getEnvironment().getPrint() - - Cfg.Configuration.pushDefaultPriority(Cfg.Parameter.Priority.CommandLine) - - if options.coreDump: Cfg.getParamBool ('misc.catchCore' ).setBool(False) - if options.verbose: Cfg.getParamBool ('misc.verboseLevel1').setBool(True) - if options.veryVerbose: Cfg.getParamBool ('misc.verboseLevel2').setBool(True) - if options.info: Cfg.getParamBool ('misc.info' ).setBool(True) - if options.paranoid: Cfg.getParamBool ('misc.paranoid' ).setBool(True) - if options.bug: Cfg.getParamBool ('misc.bug' ).setBool(True) - if options.logMode: Cfg.getParamBool ('misc.logMode' ).setBool(True) - if options.showConf: Cfg.getParamBool ('misc.showConf' ).setBool(True) - - Cfg.Configuration.popDefaultPriority() + usage = str(setCgtBanner(CRL.Banner())) + usage += '\ncgt [options]' + parser = optparse.OptionParser(usage) + parser.add_option( '--no-init' , action='store_true', dest='noInit' , help='Do not load any initialization.') + parser.add_option( '-c', '--cell' , type='string' , dest='cell' , help='The name of the cell to load, without extension.') + parser.add_option( '--acm-sigda-89' , type='string' , dest='acmSigdaName' , help='An ACM/SIGDA 89 bench name to load, without extension.') + parser.add_option( '--blif' , type='string' , dest='blifName' , help='A Blif (Yosys) design name to load, without extension.') + parser.add_option( '--ispd-05' , type='string' , dest='ispd05name' , help='An ISPD 05 bench (placement) name to load, without extension.') + parser.add_option( '-v', '--verbose' , action='store_true', dest='verbose' , help='First level of verbosity.') + parser.add_option( '-V', '--very-verbose' , action='store_true', dest='veryVerbose' , help='Second level of verbosity.') + parser.add_option( '-i', '--info' , action='store_true', dest='info' , help='Display lots of informational messages.') + parser.add_option( '--paranoid' , action='store_true', dest='paranoid' , help='Display everything that *may be* suspicious...') + parser.add_option( '-b', '--bug' , action='store_true', dest='bug' , help='Display bug related messages.') + parser.add_option( '--show-conf' , action='store_true', dest='showConf' , help='Display Kite configuration.') + parser.add_option( '-D', '--core-dump' , action='store_true', dest='coreDump' , help='Enable core-dump when a crash occurs.') + parser.add_option( '-L', '--log-mode' , action='store_true', dest='logMode' , help='Disable ANSI escape sequences in console output.') + (options, args) = parser.parse_args() + args.insert(0, 'tutu') - cell = None - if options.acmSigdaName: - cell = CRL.AcmSigda.load(options.acmSigdaName) - elif options.ispd05name: - cell = CRL.Ispd05.load(options.ispd05name) - elif options.blifName: - cell = CRL.Blif.load(options.blifName) - elif options.cell: - cell = af.getCell(options.cell, CRL.Catalog.State.Views) + flags = 0 + if options.noInit: + flags |= CRL.AllianceFramework.NoPythonInit - # Run in graphic mode. - ha = Viewer.HApplication.create(args) - Viewer.Graphics.enable() + af = CRL.AllianceFramework.create( flags ) + print( af.getEnvironment().getPrint() ) - unicorn = Unicorn.UnicornGui.create() - unicorn.setApplicationName ('tutu') - unicorn.registerTool (Tutorial.GraphicTutorialEngine.grab()) - unicorn.setLayerVisible ("grid" , False); - unicorn.setLayerVisible ("text.instance" , False); - unicorn.setLayerVisible ("text.component", False); - - setCgtBanner(unicorn.getBanner()) - print unicorn.getBanner() - print credits() - - if cell: unicorn.setCell(cell) - unicorn.show() - ha.qtExec() - + Cfg.Configuration.pushDefaultPriority(Cfg.Parameter.Priority.CommandLine) + if options.coreDump: Cfg.getParamBool('misc.catchCore' ).setBool(False) + if options.verbose: Cfg.getParamBool('misc.verboseLevel1').setBool(True) + if options.veryVerbose: Cfg.getParamBool('misc.verboseLevel2').setBool(True) + if options.info: Cfg.getParamBool('misc.info' ).setBool(True) + if options.paranoid: Cfg.getParamBool('misc.paranoid' ).setBool(True) + if options.bug: Cfg.getParamBool('misc.bug' ).setBool(True) + if options.logMode: Cfg.getParamBool('misc.logMode' ).setBool(True) + if options.showConf: Cfg.getParamBool('misc.showConf' ).setBool(True) + Cfg.Configuration.popDefaultPriority() + cell = None + if options.acmSigdaName: + cell = CRL.AcmSigda.load(options.acmSigdaName) + elif options.ispd05name: + cell = CRL.Ispd05.load(options.ispd05name) + elif options.blifName: + cell = CRL.Blif.load(options.blifName) + elif options.cell: + cell = af.getCell(options.cell, CRL.Catalog.State.Views) + + # Run in graphic mode. + ha = Viewer.HApplication.create(args) + Viewer.Graphics.enable() + unicorn = Unicorn.UnicornGui.create() + unicorn.setApplicationName ('tutu') + unicorn.registerTool (Tutorial.GraphicTutorialEngine.grab()) + unicorn.setLayerVisible ("grid" , False); + unicorn.setLayerVisible ("text.instance" , False); + unicorn.setLayerVisible ("text.component", False); + + setCgtBanner(unicorn.getBanner()) + print( unicorn.getBanner() ) + print( credits() ) + if cell: unicorn.setCell(cell) + unicorn.show() + ha.qtExec() except Exception, e: - helpers.io.catch( e ) - + helpers.io.catch( e ) sys.exit(0) diff --git a/unicorn/CMakeLists.txt b/unicorn/CMakeLists.txt index 4fc442d4..8d9abe0c 100644 --- a/unicorn/CMakeLists.txt +++ b/unicorn/CMakeLists.txt @@ -8,26 +8,27 @@ cmake_minimum_required(VERSION 2.8.9) set(ignoreVariables "${CMAKE_INSTALL_DIR}") + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) setup_project_paths(CORIOLIS) set_cmake_policies() + cmake_policy(SET CMP0054 NEW) setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") - setup_boost(program_options python regex) + setup_boost(program_options) setup_qt() if (USE_LIBBFD) find_package(Libbfd) endif() find_package(LibXml2 REQUIRED) - find_package(PythonLibs 2 REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(COLOQUINTE) find_package(FLUTE REQUIRED) - find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) find_package(ANABATIC REQUIRED) diff --git a/unicorn/doc/unicorn/html/UnicornGui_8h_source.html b/unicorn/doc/unicorn/html/UnicornGui_8h_source.html index be2d2bdf..1017138e 100644 --- a/unicorn/doc/unicorn/html/UnicornGui_8h_source.html +++ b/unicorn/doc/unicorn/html/UnicornGui_8h_source.html @@ -61,7 +61,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/unicorn/doc/unicorn/html/annotated.html b/unicorn/doc/unicorn/html/annotated.html index ea075101..d95c1adc 100644 --- a/unicorn/doc/unicorn/html/annotated.html +++ b/unicorn/doc/unicorn/html/annotated.html @@ -51,7 +51,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/unicorn/doc/unicorn/html/classUnicorn_1_1UnicornGui-members.html b/unicorn/doc/unicorn/html/classUnicorn_1_1UnicornGui-members.html index 7c00998a..868941ae 100644 --- a/unicorn/doc/unicorn/html/classUnicorn_1_1UnicornGui-members.html +++ b/unicorn/doc/unicorn/html/classUnicorn_1_1UnicornGui-members.html @@ -73,7 +73,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/unicorn/doc/unicorn/html/classUnicorn_1_1UnicornGui.html b/unicorn/doc/unicorn/html/classUnicorn_1_1UnicornGui.html index 9058906e..046b32d5 100644 --- a/unicorn/doc/unicorn/html/classUnicorn_1_1UnicornGui.html +++ b/unicorn/doc/unicorn/html/classUnicorn_1_1UnicornGui.html @@ -202,7 +202,7 @@ Static Public Member Functions
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/unicorn/doc/unicorn/html/classes.html b/unicorn/doc/unicorn/html/classes.html index ccccc741..68f23aff 100644 --- a/unicorn/doc/unicorn/html/classes.html +++ b/unicorn/doc/unicorn/html/classes.html @@ -54,7 +54,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/unicorn/doc/unicorn/html/dir_4aa09a10ca668c28f3c8e57fb374580b.html b/unicorn/doc/unicorn/html/dir_4aa09a10ca668c28f3c8e57fb374580b.html index 1c896f8a..c6159b42 100644 --- a/unicorn/doc/unicorn/html/dir_4aa09a10ca668c28f3c8e57fb374580b.html +++ b/unicorn/doc/unicorn/html/dir_4aa09a10ca668c28f3c8e57fb374580b.html @@ -49,7 +49,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/unicorn/doc/unicorn/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/unicorn/doc/unicorn/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html index fdb66adf..ac407e7f 100644 --- a/unicorn/doc/unicorn/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ b/unicorn/doc/unicorn/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -53,7 +53,7 @@ Directories
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/unicorn/doc/unicorn/html/files.html b/unicorn/doc/unicorn/html/files.html index 8eb264ae..ee816b8a 100644 --- a/unicorn/doc/unicorn/html/files.html +++ b/unicorn/doc/unicorn/html/files.html @@ -50,7 +50,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/unicorn/doc/unicorn/html/functions.html b/unicorn/doc/unicorn/html/functions.html index 3c96bbc7..81e27962 100644 --- a/unicorn/doc/unicorn/html/functions.html +++ b/unicorn/doc/unicorn/html/functions.html @@ -58,7 +58,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/unicorn/doc/unicorn/html/functions_func.html b/unicorn/doc/unicorn/html/functions_func.html index 7c85e02e..79afe500 100644 --- a/unicorn/doc/unicorn/html/functions_func.html +++ b/unicorn/doc/unicorn/html/functions_func.html @@ -58,7 +58,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/unicorn/doc/unicorn/html/hierarchy.html b/unicorn/doc/unicorn/html/hierarchy.html index 8bc629be..a8b4c24a 100644 --- a/unicorn/doc/unicorn/html/hierarchy.html +++ b/unicorn/doc/unicorn/html/hierarchy.html @@ -51,7 +51,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/unicorn/doc/unicorn/html/index.html b/unicorn/doc/unicorn/html/index.html index 2714cf92..7eeb7a39 100644 --- a/unicorn/doc/unicorn/html/index.html +++ b/unicorn/doc/unicorn/html/index.html @@ -45,7 +45,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/unicorn/doc/unicorn/html/namespaceUnicorn.html b/unicorn/doc/unicorn/html/namespaceUnicorn.html index a96ebc17..e582fceb 100644 --- a/unicorn/doc/unicorn/html/namespaceUnicorn.html +++ b/unicorn/doc/unicorn/html/namespaceUnicorn.html @@ -59,7 +59,7 @@ Classes
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/unicorn/doc/unicorn/html/namespaces.html b/unicorn/doc/unicorn/html/namespaces.html index 729ad204..35268348 100644 --- a/unicorn/doc/unicorn/html/namespaces.html +++ b/unicorn/doc/unicorn/html/namespaces.html @@ -50,7 +50,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/unicorn/doc/unicorn/html/pages.html b/unicorn/doc/unicorn/html/pages.html index 686fa02d..ad11877d 100644 --- a/unicorn/doc/unicorn/html/pages.html +++ b/unicorn/doc/unicorn/html/pages.html @@ -49,7 +49,7 @@ $(function() {
    - +
    Generated by doxygen 1.8.14 on Thu Nov 12 2020Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
    diff --git a/unicorn/doc/unicorn/latex/refman.tex b/unicorn/doc/unicorn/latex/refman.tex index 5596bd0a..707f08e3 100644 --- a/unicorn/doc/unicorn/latex/refman.tex +++ b/unicorn/doc/unicorn/latex/refman.tex @@ -34,7 +34,7 @@ \vspace*{1cm} {\large Generated by Doxygen 1.8.14}\\ \vspace*{0.5cm} - {\small Thu Nov 12 2020 14:00:01}\\ + {\small Fri Oct 1 2021 19:23:18}\\ \end{center} \end{titlepage} diff --git a/unicorn/python/CMakeLists.txt b/unicorn/python/CMakeLists.txt index 4b962c68..fb63d300 100644 --- a/unicorn/python/CMakeLists.txt +++ b/unicorn/python/CMakeLists.txt @@ -1,4 +1,4 @@ # -*- explicit-buffer-name: "CMakeLists.txt" -*- - install( FILES unicornInit.py DESTINATION ${PYTHON_SITE_PACKAGES}/unicorn ) + install( FILES unicornInit.py DESTINATION ${Python_CORIOLISLIB}/unicorn ) diff --git a/unicorn/python/unicornInit.py b/unicorn/python/unicornInit.py index cbbc79c9..f11beded 100644 --- a/unicorn/python/unicornInit.py +++ b/unicorn/python/unicornInit.py @@ -1,85 +1,87 @@ #!/usr/bin/env python # # This file is part of the Coriolis Software. -# Copyright (c) UPMC 2014-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2014-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | # | U n i c o r n - M a i n G U I | # | | # | Author : Jean-Paul CHAPUT | -# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +# | E-mail : Jean-Paul.Chaput@lip6.fr | # | =============================================================== | # | Python : "./init/unicornInit.py" | # +-----------------------------------------------------------------+ try: - import traceback - import sys - import os.path - import helpers - from helpers.io import ErrorMessage - from helpers.io import WarningMessage - import plugins - import Viewer -except ImportError, e: - serror = str(e) - if serror.startswith('No module named'): - module = serror.split()[-1] - print '[ERROR] The <%s> python module or symbol cannot be loaded.' % module - print ' Please check the integrity of the package.' - if str(e).find('cannot open shared object file'): - library = serror.split(':')[0] - print '[ERROR] The <%s> shared library cannot be loaded.' % library - print ' Under RHEL 6, you must be under devtoolset-2.' - print ' (scl enable devtoolset-2 bash)' - sys.exit(1) -except Exception, e: - print '[ERROR] A strange exception occurred while loading the basic Coriolis/Python' - print ' modules. Something may be wrong at Python/C API level.\n' - print ' %s' % e - sys.exit(2) + import traceback + import sys + import os.path + import helpers + from helpers.io import ErrorMessage + from helpers.io import WarningMessage + import plugins + import Viewer +except ImportError as e: + serror = str(e) + if serror.startswith('No module named'): + module = serror.split()[-1] + print( '[ERROR] The "{}" python module or symbol cannot be loaded.'.format(module) ) + print( ' Please check the integrity of the package.' ) + if str(e).find('cannot open shared object file'): + library = serror.split(':')[0] + print( '[ERROR] The "{}" shared library cannot be loaded.'.format(library) ) + print( ' Under RHEL 6, you must be under devtoolset-2.' ) + print( ' (scl enable devtoolset-2 bash)' ) + sys.exit(1) +#except Exception as e: +# print( '[ERROR] A strange exception occurred while loading the basic Coriolis/Python' ) +# print( ' modules. Something may be wrong at Python/C API level.\n' ) +# print( ' {}'.format(e) ) +# sys.exit(2) #helpers.staticInitialization( quiet=True ) def unicornConfigure ( **kw ): + """ + Look through all the currently loaded modules and try to find, then call + the ``unicornHook()`` function. + + .. note:: The modules plugins should have been loaded by the static + initialization of the ``cumulus`` tool. + """ editor = None - if kw.has_key('editor'): - editor = kw['editor'] + if 'editor' in kw: + editor = kw['editor'] else: - print ErrorMessage( 3, 'unicornConfigure.py: Must be run from a CellView derived class.' ) - return - + print( ErrorMessage( 3, 'unicornConfigure.py: Must be run from a CellView derived class.' )) + return if editor.hasMenu( 'plugins' ): - print WarningMessage( 'The menu has already been created.' ) - return - + print( WarningMessage( 'The menu has already been created.' )) + return #editor.addMenu( 'plugins', 'Plu&gins', Viewer.CellViewer.TopMenu ) - for moduleName in sys.modules: - if moduleName.startswith('plugins.'): try: - module = sys.modules[ moduleName ] - if not module: - #print WarningMessage( 'Plugin "%s" not found in Python sys/modules[].' \ - # % moduleName ) - continue - - if not module.__dict__.has_key('unicornHook'): - elements = module.__file__.split( os.sep ) - if elements[-2] == 'plugins': - print WarningMessage( 'Plugin "%s" do not provides the unicornHook() method, skipped.' \ - % moduleName ) - continue - - module.__dict__['unicornHook']( **kw ) - except ErrorMessage, e: - print e - helpers.showStackTrace( e.trace ) - except Exception, e: - helpers.showPythonTrace( __file__, e ) - + module = sys.modules[ moduleName ] + if not module: + #print( WarningMessage( 'Plugin "{}" not found in Python sys/modules[].' \ + # .format(moduleName) )) + continue + if not 'unicornHook' in module.__dict__: + if module.__name__.endswith( '.__pycache__' ): continue + if not '__file__' in module.__dict__: continue + elements = module.__file__.split( os.sep ) + if elements[-1] == 'plugins': + print( WarningMessage( 'Plugin "{}" do not provides the unicornHook() method, skipped.' \ + .format(moduleName) )) + continue + module.__dict__['unicornHook']( **kw ) + except ErrorMessage as e: + print( e ) + helpers.showStackTrace( e.trace ) + except Exception as e: + helpers.showPythonTrace( __file__, e ) return diff --git a/unicorn/src/CMakeLists.txt b/unicorn/src/CMakeLists.txt index 760afe73..b11095dd 100644 --- a/unicorn/src/CMakeLists.txt +++ b/unicorn/src/CMakeLists.txt @@ -17,7 +17,7 @@ ${QtX_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${LEFDEF_INCLUDE_DIR} - ${PYTHON_INCLUDE_PATH} + ${Python_INCLUDE_DIRS} ) add_definitions( -DSYS_CONF_DIR="${SYS_CONF_DIR}" ) @@ -77,7 +77,7 @@ ${OA_LIBRARIES} ${QtX_LIBRARIES} ${Boost_LIBRARIES} - ${PYTHON_LIBRARIES} + ${Python_LIBRARIES} -lutil ${LIBXML2_LIBRARIES} ${LIBBFD_LIBRARIES} diff --git a/unicorn/src/CgtMain.cpp b/unicorn/src/CgtMain.cpp index b9bcc528..e57343d7 100644 --- a/unicorn/src/CgtMain.cpp +++ b/unicorn/src/CgtMain.cpp @@ -22,9 +22,9 @@ using namespace std; #include namespace bopts = boost::program_options; -#include "vlsisapd/utilities/Path.h" -#include "vlsisapd/bookshelf/Exception.h" -#include "vlsisapd/configuration/Configuration.h" +// #include "vlsisapd/bookshelf/Exception.h" +#include "hurricane/configuration/Configuration.h" +#include "hurricane/utilities/Path.h" #include "hurricane/DebugSession.h" #include "hurricane/DataBase.h" #include "hurricane/Cell.h" @@ -49,7 +49,7 @@ using namespace Hurricane; #include "crlcore/AllianceFramework.h" #include "crlcore/Hierarchy.h" #include "crlcore/ToolBox.h" -#include "crlcore/Ispd04Bookshelf.h" +//#include "crlcore/Ispd04Bookshelf.h" #include "crlcore/Iccad04Lefdef.h" #include "crlcore/DefImport.h" #include "crlcore/DefExport.h" @@ -218,9 +218,9 @@ int main ( int argc, char *argv[] ) ); } - if ( (cell == NULL) and arguments.count("import-ispd04-bk") ) { - cell = Ispd04::load ( arguments["import-ispd04-bk"].as().c_str() ); - } + // if ( (cell == NULL) and arguments.count("import-ispd04-bk") ) { + // cell = Ispd04::load ( arguments["import-ispd04-bk"].as().c_str() ); + // } if ( saveImport and (cell != NULL) ) { cmess1 << " o Immediate write back of <" << cell->getName() << ">" << endl; @@ -425,10 +425,10 @@ int main ( int argc, char *argv[] ) cerr << "[ERROR] " << e.what() << endl; exit ( 1 ); } - catch ( Bookshelf::Exception& e ) { - cerr << e.what() << endl; - exit ( 1 ); - } + // catch ( Bookshelf::Exception& e ) { + // cerr << e.what() << endl; + // exit ( 1 ); + // } catch ( exception& e ) { cerr << "[ERROR] " << e.what() << endl; exit ( 1 ); diff --git a/unicorn/src/PyUnicorn.cpp b/unicorn/src/PyUnicorn.cpp index 003fe6fc..cec6936e 100644 --- a/unicorn/src/PyUnicorn.cpp +++ b/unicorn/src/PyUnicorn.cpp @@ -2,14 +2,14 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2012-2012, All Rights Reserved +// Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | // | U n i c o r n - M a i n G U I | // | | // | Author : Jean-Paul CHAPUT | -// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +// | E-mail : Jean-Paul.Chaput@lip6.fr | // | =============================================================== | // | C++ Module : "./PyUnicorn.cpp" | // +-----------------------------------------------------------------+ @@ -51,27 +51,37 @@ extern "C" { }; + static PyModuleDef PyUnicorn_ModuleDef = + { PyModuleDef_HEAD_INIT + , .m_name = "Unicorn" + , .m_doc = "Coriolis Visualizer & Debugger." + , .m_size = -1 + , .m_methods = PyUnicorn_Methods + }; // --------------------------------------------------------------- - // Module Initialization : "initUnicorn ()" + // Module Initialization : "PyInit_Unicorn ()" - DL_EXPORT(void) initUnicorn () { - cdebug_log(46,0) << "initUnicorn()" << endl; + PyMODINIT_FUNC PyInit_Unicorn ( void ) + { + cdebug_log(46,0) << "PyInit_Unicorn()" << endl; PyUnicornGui_LinkPyType (); PYTYPE_READY_SUB ( UnicornGui, CellViewer ); - PyObject* module = Py_InitModule ( "Unicorn", PyUnicorn_Methods ); + PyObject* module = PyModule_Create( &PyUnicorn_ModuleDef ); if ( module == NULL ) { cerr << "[ERROR]\n" << " Failed to initialize Unicorn module." << endl; - return; + return NULL; } Py_INCREF ( &PyTypeUnicornGui ); PyModule_AddObject ( module, "UnicornGui", (PyObject*)&PyTypeUnicornGui ); + + return module; } diff --git a/unicorn/src/UnicornGui.cpp b/unicorn/src/UnicornGui.cpp index 64237a40..3d74bc75 100644 --- a/unicorn/src/UnicornGui.cpp +++ b/unicorn/src/UnicornGui.cpp @@ -29,8 +29,8 @@ #include "crlcore/LibraryManager.h" #include "crlcore/GraphicToolEngine.h" #include "crlcore/AcmSigda.h" -#include "crlcore/Ispd04Bookshelf.h" -#include "crlcore/Ispd05Bookshelf.h" +//#include "crlcore/Ispd04Bookshelf.h" +//#include "crlcore/Ispd05Bookshelf.h" #include "crlcore/Gds.h" #include "crlcore/Blif.h" #include "crlcore/Iccad04Lefdef.h" @@ -59,8 +59,8 @@ namespace Unicorn { using CRL::AllianceFramework; using CRL::LibraryManager; using CRL::AcmSigda; - using CRL::Ispd04; - using CRL::Ispd05; +//using CRL::Ispd04; +//using CRL::Ispd05; using CRL::Gds; using CRL::Blif; using CRL::Iccad04Lefdef; @@ -102,8 +102,8 @@ namespace Unicorn { _importCell.addImporter ( "ACM/SIGDA (aka MCNC, .bench)", std::bind( &AcmSigda::load , placeholders::_1 ) ); /* Disabled because this is never the one you want _importCell.addImporter ( "ISPD'04 (Bookshelf)" , std::bind( &Ispd04::load , placeholders::_1 ) ); - */ _importCell.addImporter ( "ISPD'05 (Bookshelf)" , std::bind( &Ispd05::load , placeholders::_1 ) ); + */ _importCell.addImporter ( "ICCAD'04 (LEF/DEF)" , std::bind( &Iccad04Lefdef::load, placeholders::_1, 0 ) ); _importCell.addImporter ( "Alliance compliant DEF" , std::bind( &DefImport::load , placeholders::_1, DefImport::FitAbOnCells) ); _importCell.addImporter( "Cadence LEF" , std::bind( &LefImport::load , placeholders::_1 ) ); diff --git a/unicorn/src/cgt.py b/unicorn/src/cgt.py index 74642c19..bf231390 100755 --- a/unicorn/src/cgt.py +++ b/unicorn/src/cgt.py @@ -1,22 +1,39 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 +# +# This file is part of the Coriolis Software. +# Copyright (c) Sorbonne Université 2015-2021, All Rights Reserved +# +# +-----------------------------------------------------------------+ +# | C O R I O L I S | +# | C o r i o l i s - Generic Program Launcher | +# | | +# | Author : Jean-Paul CHAPUT | +# | E-mail : Jean-Paul.Chaput@lip6.fr | +# | =============================================================== | +# | Python : "./src/cgt.py" | +# +-----------------------------------------------------------------+ -import sys -import os.path -import optparse -import helpers.io -helpers.loadUserSettings() -import Cfg -import Hurricane -import Viewer -import CRL -import Etesian -import Anabatic -import Katana -import Katabatic -import Kite -import Bora -import Tutorial -import Unicorn +try: + import sys + import os.path + import optparse + import helpers + helpers.loadUserSettings() + import Cfg + import Hurricane + import Viewer + import CRL + import Etesian + import Anabatic + import Katana + import Katabatic + import Kite + import Bora + import Tutorial + import Unicorn +except Exception as e: + helpers.showPythonTrace( sys.argv[0], e ) + sys.exit(2) def setCgtBanner ( banner ): @@ -56,25 +73,25 @@ def runScript ( scriptPath, editor ): sys.path.insert( 0, os.path.dirname(scriptPath) ) module = __import__( os.path.basename(scriptPath), globals(), locals() ) - if not module.__dict__.has_key('scriptMain'): - print '[ERROR] Script module is missing function scriptMain().' - print ' <%s>' % scriptPath + if not 'scriptMain' in module.__dict__: + print( '[ERROR] Script module is missing function scriptMain().' ) + print( ' "{}"'.format( scriptPath )) return if not callable( module.__dict__['scriptMain'] ): - print '[ERROR] Script module symbol scriptMain is not callable (not a function?).' - print ' <%s>' % scriptPath + print( '[ERROR] Script module symbol scriptMain is not callable (not a function?).' ) + print( ' "{}"'.format( scriptPath )) return module.__dict__['scriptMain']( **kw ) - except ImportError, e: + except ImportError as e: #module = str(e).split()[-1] - #print '[ERROR] The <%s> script cannot be loaded.' % os.path.basename(scriptPath) - #print ' Please check your design hierarchy or the Python syntax.' - #print ' Error was:' - #print ' %s\n' % e + #print( '[ERROR] The "{}" script cannot be loaded.'.format(os.path.basename(scriptPath)) ) + #print( ' Please check your design hierarchy or the Python syntax.' ) + #print( ' Error was:' ) + #print( ' {}\n'.format(e)) helpers.io.catch( e ) - except Exception, e: + except Exception as e: helpers.io.catch( e ) return @@ -124,7 +141,7 @@ if __name__ == '__main__': flags |= CRL.AllianceFramework.NoPythonInit af = CRL.AllianceFramework.create( flags ) - if helpers.io.isVL(2): print af.getEnvironment().getPrint() + if helpers.io.isVL(2): print( af.getEnvironment().getPrint() ) Cfg.Configuration.pushDefaultPriority(Cfg.Parameter.Priority.CommandLine) @@ -188,8 +205,8 @@ if __name__ == '__main__': runScript(options.script,unicorn) setCgtBanner(unicorn.getBanner()) - #print unicorn.getBanner() - #print credits() + #print( unicorn.getBanner() ) + #print( credits() ) if cell: unicorn.setCell(cell) unicorn.show() @@ -254,7 +271,7 @@ if __name__ == '__main__': sys.exit(not kiteSuccess) - except Exception, e: + except Exception as e: helpers.showPythonTrace( sys.argv[0], e ) sys.exit(0) diff --git a/unicorn/src/coriolis.py b/unicorn/src/coriolis.py index fe3aed55..93fac56e 100755 --- a/unicorn/src/coriolis.py +++ b/unicorn/src/coriolis.py @@ -1,7 +1,7 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # This file is part of the Coriolis Software. -# Copyright (c) UPMC/LIP6 2015-2018, All Rights Reserved +# Copyright (c) Sorbonne Université 2015-2021, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -22,60 +22,60 @@ import distutils.sysconfig class Location ( object ): - SetCoriolisTop = 0x0001 - SetLdLibraryPath = 0x0002 - SetBasePythonPath = 0x0004 - BaseSysconfDir = 0x0008 - BaseSystem = SetCoriolisTop|BaseSysconfDir - Devtoolset2 = SetCoriolisTop|BaseSysconfDir|SetBasePythonPath - UserDefined = SetCoriolisTop|SetLdLibraryPath|SetBasePythonPath + SetCoriolisTop = 0x0001 + SetLdLibraryPath = 0x0002 + SetBasePythonPath = 0x0004 + BaseSysconfDir = 0x0008 + BaseSystem = SetCoriolisTop|BaseSysconfDir + Devtoolset2 = SetCoriolisTop|BaseSysconfDir|SetBasePythonPath + UserDefined = SetCoriolisTop|SetLdLibraryPath|SetBasePythonPath def truncPath ( path, ifirst, ilast ): - rawDirectories = path.split('/') - directories = [] - for directory in rawDirectories: - if len(directory): directories.append( directory ) - truncated = os.path.join( *directories[ifirst:ilast] ) - if ifirst == 0 and rawDirectories[0] == '': - truncated = '/'+truncated - return truncated + rawDirectories = path.split('/') + directories = [] + for directory in rawDirectories: + if len(directory): directories.append( directory ) + truncated = os.path.join( *directories[ifirst:ilast] ) + if ifirst == 0 and rawDirectories[0] == '': + truncated = '/'+truncated + return truncated def uname ( arguments ): - return subprocess.Popen( ["uname"] + arguments - , stdout=subprocess.PIPE ).stdout.readlines()[0][:-1] + return subprocess.Popen( ["uname"] + arguments + , stdout=subprocess.PIPE ).stdout.readlines()[0][:-1] class Pathes ( object ): def __init__ ( self, name ): - self.name = name - self.components = [] - if os.environ.has_key(name): - self.components = os.environ[name].split(':') - return + self.name = name + self.components = [] + if os.environ.has_key(name): + self.components = os.environ[name].split(':') + return def asString ( self ): - s = '' - for i in range(len(self.components)): - if s: s += ':' - s += self.components[i] - return s + s = '' + for i in range(len(self.components)): + if s: s += ':' + s += self.components[i] + return s def export ( self ): - os.environ[self.name] = self.asString() - return + os.environ[self.name] = self.asString() + return def insert ( self, index, path ): - self.components.insert( index, path ) - return + self.components.insert( index, path ) + return def show ( self ): - print ' %s:' % self.name - for component in self.components: - print ' %s' % component - return + print ' %s:' % self.name + for component in self.components: + print ' %s' % component + return osType = uname( ['-s'] ) @@ -92,31 +92,31 @@ print ' OS:\n %s' % osType scriptBinPath = os.path.abspath(os.path.dirname(sys.argv[0])) print ' Script location:\n %s' % scriptBinPath if scriptBinPath == '/usr/bin': - location = Location.BaseSystem - coriolisTop = '/usr' - print ' Using standard system installation scheme.' + location = Location.BaseSystem + coriolisTop = '/usr' + print ' Using standard system installation scheme.' elif scriptBinPath == '/soc/coriolis2/bin': - location = Location.Devtoolset2 - coriolisTop = '/soc/coriolis2' - print ' Using RHEL6 installation scheme.' - ldLibraryPath = os.getenv('LD_LIBRARY_PATH') - if not 'devtoolset' in ldLibraryPath: - print '[ERROR] You must enable the devtoolset-2 before running Coriolis:' - print ' > scl enable devtoolset-2 bash' - sys.exit( 1 ) + location = Location.Devtoolset2 + coriolisTop = '/soc/coriolis2' + print ' Using RHEL6 installation scheme.' + ldLibraryPath = os.getenv('LD_LIBRARY_PATH') + if not 'devtoolset' in ldLibraryPath: + print '[ERROR] You must enable the devtoolset-2 before running Coriolis:' + print ' > scl enable devtoolset-2 bash' + sys.exit( 1 ) else: - location = Location.UserDefined - coriolisTop = truncPath( scriptBinPath, 0, -1 ) - print ' Using User installation scheme.' + location = Location.UserDefined + coriolisTop = truncPath( scriptBinPath, 0, -1 ) + print ' Using User installation scheme.' if location & Location.SetCoriolisTop: - os.environ['CORIOLIS_TOP'] = coriolisTop - print ' CORIOLIS_TOP:\n %s' % coriolisTop + os.environ['CORIOLIS_TOP'] = coriolisTop + print ' CORIOLIS_TOP:\n %s' % coriolisTop if location & Location.BaseSysconfDir: - sysConfDir = truncPath( coriolisTop, 0, -1 ) + '/etc/coriolis2' + sysConfDir = truncPath( coriolisTop, 0, -1 ) + '/etc/coriolis2' else: - sysConfDir = coriolisTop + '/etc/coriolis2' + sysConfDir = coriolisTop + '/etc/coriolis2' print ' Configuration directory:\n %s' % sysConfDir os.environ['STRATUS_MAPPING_NAME'] = sysConfDir+'/stratus2sxlib.xml' @@ -131,14 +131,14 @@ if osType == 'Darwin': ldLibraryPathName = 'DYLD_LIBRARY_PATH' if location & Location.SetLdLibraryPath: - ldLibraryPath = Pathes( ldLibraryPathName ) - ldLibraryPath.insert( 0, coriolisTop+libDir ) - ldLibraryPath.export() - ldLibraryPath.show() + ldLibraryPath = Pathes( ldLibraryPathName ) + ldLibraryPath.insert( 0, coriolisTop+libDir ) + ldLibraryPath.export() + ldLibraryPath.show() pythonPath = Pathes( 'PYTHONPATH' ) if location & Location.SetBasePythonPath: - pythonPath.insert( 0, os.path.join(coriolisTop,pythonSitePackages) ) + pythonPath.insert( 0, os.path.join(coriolisTop,pythonSitePackages) ) pythonPath.insert( 0, os.path.join(coriolisTop,pythonSitePackages,'crlcore') ) pythonPath.insert( 0, os.path.join(coriolisTop,pythonSitePackages,'stratus') ) pythonPath.insert( 0, os.path.join(coriolisTop,pythonSitePackages,'cumulus') ) @@ -150,17 +150,17 @@ pythonPath.show() argvStart = 0 slaveScript = 'cgt' if len(sys.argv) > 1 and sys.argv[1].startswith('--run='): - argvStart = 1 - slaveScript = sys.argv[1][6:] + argvStart = 1 + slaveScript = sys.argv[1][6:] print ' Script:\n %s' % slaveScript print ' ========================================' try: - os.execvp( slaveScript, sys.argv[argvStart:] ) + os.execvp( slaveScript, sys.argv[argvStart:] ) except Exception, e: - print '[ERROR] An exception occured while lauching <%s>\n' % slaveScript - print e - sys.exit( 3 ) + print '[ERROR] An exception occured while lauching <%s>\n' % slaveScript + print e + sys.exit( 3 ) sys.exit( 0 ) diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index a8dab5bf..b15768d7 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -7,6 +7,7 @@ cmake_minimum_required(VERSION 2.8.9) set(ignoreVariables "${BUILD_DOC} ${CMAKE_INSTALL_DIR}") + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) @@ -15,19 +16,19 @@ print_cmake_module_path() set_cmake_policies() + cmake_policy(SET CMP0054 NEW) check_distribution() setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") - setup_boost(program_options python regex wave) + setup_boost(program_options) setup_qt() if (USE_LIBBFD) find_package(Libbfd) endif() find_package(Libexecinfo REQUIRED) - find_package(PythonLibs 2 REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF) - find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/unittests/python/__init__.py b/unittests/python/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/unittests/python/overlay.py b/unittests/python/overlay.py new file mode 100644 index 00000000..eae57300 --- /dev/null +++ b/unittests/python/overlay.py @@ -0,0 +1,337 @@ +# -*- mode:Python -*- +# +# This file is part of the Coriolis Software. +# Copyright (c) SU 2012-2020, 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 | +# | =============================================================== | +# | Python : "./crlcore/helpers/overlay.py" | +# +-----------------------------------------------------------------+ +# +# Those classes are based on the work of Jock Tanner from Libre-SOC. + + +""" +Overlay to make some C++ objects provide a more Pythonic interface. +Contains: + +* ``overlay.UpdateSession`` : to be used in ``with`` construct. +* ``overlay.Configuration`` : to be used in ``with`` construct. +* ``overlay.CfgCache`` : A cache for Cfg parameters. +""" + +from __future__ import print_function +import Cfg +import Hurricane + + +class UpdateSession ( object ): + """ + Context manager for a GO update session. See Hurricane reference manual + for an info on Hurricane::UpdateSession class. + """ + + def __enter__ ( self ): + Hurricane.UpdateSession.open() + + def __exit__( self, *args ): + Hurricane.UpdateSession.close() + + +class Configuration: + """ + Allow access to Cfg parameter as attributes. For attribute syntax, + the dot (.) used in C++ or raw access is replaced by an underscore (_) + in Python mode. + + Also provides a context manager. + """ + + PRIORITY_USE_DEFAULT = Cfg.Parameter.Priority.UseDefault + PRIORITY_APPLICATION_BUILTIN = Cfg.Parameter.Priority.ApplicationBuiltin + PRIORITY_CONFIGURATION_FILE = Cfg.Parameter.Priority.ConfigurationFile + PRIORITY_USER_FILE = Cfg.Parameter.Priority.UserFile + PRIORITY_COMMAND_LINE = Cfg.Parameter.Priority.CommandLine + PRIORITY_INTERACTIVE = Cfg.Parameter.Priority.Interactive + + def __init__ ( self, priority=None ): + self._priority = priority + + def __enter__( self ): + if self._priority is not None: + Cfg.Configuration.pushDefaultPriority( self._priority ) + return self + + def __setattr__( self, attr, val ): + if attr.startswith("_"): + self.__dict__[attr] = val + return + attr = attr.replace("_", ".") + if isinstance(val, bool): + Cfg.getParamBool(attr).setBool( val ) + elif isinstance(val, int): + p = Cfg.getParamInt( attr ) # all params have a type + if p.type == 'Enumerate': + Cfg.getParamEnumerate(attr).setInt( val ) + else: + Cfg.getParamInt(attr).setInt( val ) + elif isinstance(val, long): + p = Cfg.getParamInt( attr ) # all params have a type + p.setInt( val ) + elif isinstance(val, float): + p = Cfg.getParamDouble( attr ).setDouble( val ) + elif '%' in val: + Cfg.getParamPercentage(attr).setPercentage( float(val[:-1]) ) + else: + Cfg.getParamString(attr).setString( val ) + + def __exit__( self, *args ): + if self._priority is not None: + Cfg.Configuration.popDefaultPriority() + + +class CachedParameter ( object ): + + def __init__ ( self, path, v ): + self.path = path + self._v = None + self.v = v + self.vRange = [ None, None ] + self.vEnum = [] + self.create = True + self.cacheRead() + + @property + def v ( self ): return self._v + + @v.setter + def v ( self, value ): + if value is not None: self._v = value + + def __str__ ( self ): + if isinstance(self.v,str): s = '"{}"'.format(self.v) + else: s = '{}'.format(self.v) + if self.vRange[0] is not None or self.vRange[1] is not None: + s += ' [{}:{}]'.format(self.vRange[0],self.vRange[1]) + if self.vEnum: + s += ' (' + for i in range(len(self.vEnum)): + if i: s += ', ' + s += '{}:"{}"'.format(self.vEnum[i][1],self.vEnum[i][0]) + s += ')' + return s + + def cacheWrite ( self ): + """" + Commit the value of parameter ``self.path`` to ``self.v`` in Cfg. + Percentage are set as Double and Enumerate as Int. + """ + if Cfg.hasParameter(self.path): + confDb = Cfg.Configuration.get() + p = confDb.getParameter( self.path ) + else: + if len(self.vEnum): p = Cfg.getParamEnumerate( self.path ) + elif isinstance(self.v,bool ): p = Cfg.getParamBool ( self.path ) + elif isinstance(self.v,int ): p = Cfg.getParamInt ( self.path ) + elif isinstance(self.v,float): p = Cfg.getParamDouble ( self.path ) + else: p = Cfg.getParamString ( self.path ) + if p.type == Cfg.Parameter.Type.Enumerate: p.setInt ( self.v ) + elif p.type == Cfg.Parameter.Type.Int: p.setInt ( self.v ) + elif p.type == Cfg.Parameter.Type.Bool: p.setBool ( self.v ) + elif p.type == Cfg.Parameter.Type.Double: p.setDouble ( self.v ) + elif p.type == Cfg.Parameter.Type.Percentage: p.setDouble ( self.v*100.0 ) + else: p.setString ( str(self.v) ) + if self.create: + if len(self.vEnum): + for item in self.vEnum: + p.addValue( item[0], item[1] ) + if self.vRange[0] is not None: p.setMin( self.vRange[0] ) + if self.vRange[1] is not None: p.setMax( self.vRange[1] ) + + def cacheRead ( self ): + """"Get the value of parameter ``self.path`` from Cfg.""" + if not Cfg.hasParameter(self.path): + self.create = True + return + if self.v is not None: return + confDb = Cfg.Configuration.get() + p = confDb.getParameter( self.path ) + if p: + if p.type == Cfg.Parameter.Type.Enumerate: self.v = p.asInt() + elif p.type == Cfg.Parameter.Type.Int: + self.v = p.asInt() + elif p.type == Cfg.Parameter.Type.Bool: self.v = p.asBool() + elif p.type == Cfg.Parameter.Type.String: self.v = p.asString() + elif p.type == Cfg.Parameter.Type.Double: self.v = p.asDouble() + elif p.type == Cfg.Parameter.Type.Percentage: self.v = p.asDouble()/100.0 + else: self.v = p.asString() + + +class CfgCache ( object ): + """ + CgfCache cache a set of configuration parameters. The values of the + parameters are not set in the system *until* the ``apply()`` function + is called. + + If a parameter do not exists in the ``Cfg`` module, it is created + when ``apply()`` is called. Be aware that it is not able to guess + the right type between Double and Percentage or Int and Enumerate. + It will, by default, only create Double or Int. So, when setting + Percentage or Enumerate, be sure that they exists beforehand in + the ``Cfg`` module. + + The attributes of CfgCache exactly mimic the behavior of the + ``Cfg`` parameter string identifiers. For example: + + .. code-block:: python + + # Direct access to a Cfg parameter. + p = Cfg.getParamInt('katana.eventsLimit').setInt( 4000000 ) + + # Setup of a CfgCache parameter. + cache = CfgCache('') + cache.katana.eventsLimit = 4000000 + + # ... + # Effective setting of the Cfg parameter. + cache.apply() + + If a cache parameter is assigned to ``None``, it triggers the + loading of the value from the disk, it it exists. + + .. code-block:: python + + # Setup of a CfgCache parameter. + cache = CfgCache('') + cache.katana.eventsLimit = None + # The parameter will read it's value from the disk (4000000). + + + This is done by overloading ``__setattr__()`` and ``__getattr__()`` + which recursively create CfgCache objects for intermediate levels + attributes (in the previous example, a CfgCache for ``katana`` + will automatically be created). To separate between attributes + that are part of configuration parameters and attributes belonging + to CfgCache itself, we prepend a '_' to the laters. + + .. note:: It is important to understand the difference of behavior + with ``Configuration``, the former set the parameters + at once, it directly act on the ``Cfg`` settings. + The later keep a state and set the ``Cfg`` parameters + *only* when ``apply()`` is called. + """ + + def __enter__( self ): + return self + + def __exit__( self, *args ): + self.apply() + self.display() + + def __init__ ( self, path='', priority=None ): + """Create a new CfgCache with a ``path`` as parent path.""" + self._priority = priority + self._path = path + self._rattr = {} + + def __setattr__ ( self, attr, v ): + """ + Recursively set an attribute. Attributes names starting by an '_' are + treated as belonging to *this* object (self). + + How does the recursive attributes/CfgCache works? Assumes that we + are doing: + + .. code-block:: python + + # Setup of a CfgCache parameter. + cache = CfgCache('') + cache.katana.eventsLimit = 4000000 + + The explicit call sequence will be: + + .. code-block:: python + + cache.__getattr__('katana').__setattr__( 'eventsLimit', 4000000 ) + + 1. For the intermediate hierarchy level ``katana``, it is __getattr__() + which is called, if the attribute do not exists, we create a new + CfgCache(). + + 2. Second, and only then, __setattr__() is called, which will create a + parameter entry named ``eventsLimit``. + + The decision of whether create a parameter entry *or* a CfgCache + intermediate level will always be correctly handled because prior + to any access, an attribute needs to be set. So we always have + first a call chain of __getattr__() with one final __setattr__(). + For any subsequent access to ``cache.katana.eventsLimit``, as + the attribute already exists, there is no type creation problem. + """ + if attr[0] == '_': + object.__setattr__( self, attr, v ) + return + vRange = None + vEnum = None + if isinstance(v,list ): vRange = v; v = None + if isinstance(v,tuple): vEnum = v; v = None + if not attr in self._rattr: + self._rattr[ attr ] = CachedParameter( self._path+'.'+attr, v ) + if vRange is not None: self._rattr[ attr ].vRange = vRange + elif vEnum is not None: self._rattr[ attr ].vEnum = vEnum + else: self._rattr[ attr ].v = v + + def __getattr__ ( self, attr ): + """ + Get an attribute, if it doesn't exists, then we are in an intermediate + level like ``katana``, so create a new sub CfgCache for that attribute. + """ + if not attr in self._rattr: + path = self._path+'.'+attr if len(self._path) else attr + self._rattr[attr] = CfgCache( path, self._priority ) + if isinstance(self._rattr[attr],CachedParameter): + return self._rattr[attr].v + return self._rattr[attr] + + def _hasCachedParam ( self, elements ): + if not elements[0] in self._rattr: + return False + if len(elements) == 1: + return True + rattr = self._rattr[ elements[0] ] + if not isinstance(rattr,CfgCache): + return False + return rattr._hasCachedParam( elements[1:] ) + + def hasCachedParam ( self, attr ): + return self._hasCachedParam( attr.split('.') ) + + def apply ( self, priority=None ): + """Apply the parameters values stored in the cache to the ``Cfg`` database.""" + if priority is None: priority = self._priority + if not len(self._path) and priority is not None: + Cfg.Configuration.pushDefaultPriority( priority ) + for attrName in self._rattr.keys(): + if isinstance(self._rattr[attrName],CfgCache): + self._rattr[attrName].apply() + continue + self._rattr[attrName].cacheWrite() + if not len(self._path) and priority is not None: + Cfg.Configuration.popDefaultPriority() + #self.display() + + def display ( self ): + """Print all the parameters stored in that CfgCache.""" + if not len(self._path): + print( ' o Applying configuration (CfgCache):' ) + for attrName in self._rattr.keys(): + if isinstance(self._rattr[attrName],CfgCache): + self._rattr[attrName].display() + continue + print( ' - {}.{} = {}'.format(self._path,attrName,self._rattr[attrName]) ) + diff --git a/unittests/python/technology.py b/unittests/python/technology.py new file mode 100644 index 00000000..9f0184de --- /dev/null +++ b/unittests/python/technology.py @@ -0,0 +1,111 @@ +# -*- mode:Python -*- +# +# This file is part of the Coriolis Software. +# Copyright (c) Sorbonne Université 2020-2021, 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 | +# | =============================================================== | +# | Python : "./crlcore/helpers/technology.py" | +# +-----------------------------------------------------------------+ + +""" +Some helpers to create or load a technology and it's libraries. +""" + +from Hurricane3 import DataBase, Layer, BasicLayer, ViaLayer + + +__all__ = [ 'safeGetLibrary', 'createBL', 'setEnclosures' ] + + +def safeGetLibrary ( frameworkName, libName ): + """ + Return the library named ``libName`` if it already exists, + or create it if needed. To avoid potential collision, design + kits libraries should not be created directly under the DataBase + root library but be grouped under a common technology library, + in this case ``CM018``. + """ + db = DataBase.getDB() + tech = db.getTechnology() + frameLib = db.getRootLibrary().getLibrary( frameworkName ) + if frameLib is None: + frameLib = Library.create( db.getRootLibrary(), frameworkName ) + lib = frameLib.getLibrary( libName ) + if lib is None: + lib = Library.create( frameLib, libName ) + return lib + + +def createBL ( tech, layerName, material, size=None, spacing=None, gds2Layer=None, gds2DataType=0, area=None ): + """ + Create a new BasicLayer. Parameters ``tech``, ``layerName`` and ``material`` + are mandatory. + + :param tech: The technology the basic layer will be part of. + :param layerName: The name of the layer. + :param material: The kind of layer, see BasicLayer.Material. + :param size: The minimal size (i.e. width). + :param spacing: The minimal distance, edge to edge between two wires. + :param gds2layer: The GDSII layer number (for the GDSII driver). + :param gds2DataType: The GDSII DataType (i.e purpose). + :param area: The minimum area (in um2) + """ + print( tech ) + layer = BasicLayer.create( tech, layerName, BasicLayer.Material(material) ) + if size is not None: + layer.setMinimalSize( size ) + if spacing is not None: + layer.setMinimalSpacing( spacing ) + if gds2Layer is not None: + layer.setGds2Layer ( gds2Layer ) + layer.setGds2Datatype( gds2DataType ) + if area is not None: + layer.setMinimalArea( area ) + return layer + + +def createVia ( tech, viaName, botName, cutName, topName, size=None ): + """ + Create a new ViaLayer. Parameters ``tech``, ``viaName``, ``botName``, + ``cutName`` and ``topName`` are mandatory. + + :param tech: The technology the basic layer will be part of. + :param viaName: The name of the newly defined VIA layer. + :param botName: The name of the *bottom* metal layer. + :param cutName: The name of the *cut* (aka, via hole) layer. + :param topName: The name of the *top* metal layer. + :param size: The minimal side size of the square *cut* layer. + """ + layer = ViaLayer.create( tech + , viaName + , tech.getLayer(botName) + , tech.getLayer(cutName) + , tech.getLayer(topName) ) + if size is not None: + layer.setMinimalSize( size ) + return layer + + +def setEnclosures ( layer, subLayer, enclosures ): + """ + Set horizontal & vertical enclosure for a given ``subLayer`` in a + composite ``layer`` (typically a ViaLayer). If ``enclosures`` is a + number, both H/V will be set to that same value. If it is a tuple + (a pair), then the first value is horizontal and the seconf is + vertical. + """ + if isinstance(enclosures,tuple): + henclosure = enclosures[0] + venclosure = enclosures[1] + else: + henclosure = enclosures + venclosure = enclosures + layer.setEnclosure( subLayer, henclosure, Layer.EnclosureH ) + layer.setEnclosure( subLayer, venclosure, Layer.EnclosureV ) + return diff --git a/unittests/python/testCfg2.py b/unittests/python/testCfg2.py deleted file mode 100755 index f21c405c..00000000 --- a/unittests/python/testCfg2.py +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env python - -import Cfg2 - -print dir(Cfg2) -print dir(Cfg2.Configuration) - - -v = Cfg2.get() -print dir(v) diff --git a/unittests/python/test_cfg.py b/unittests/python/test_cfg.py new file mode 100755 index 00000000..845c9284 --- /dev/null +++ b/unittests/python/test_cfg.py @@ -0,0 +1,183 @@ +#!/usr/bin/env python3 + +import sys + +def flush (): + sys.stdout.flush() + sys.stderr.flush() + + +import Cfg + +print( "" ) +print( "Test 7" ) +print( "========================================" ) +print( type(Cfg) ) +flush() +print( "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" ) +print( "dir(Cfg) first test" ) +for item in dir(Cfg): + print( item ) + flush() +flush() +print( "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" ) +print( "Cfg.__dict__" ) +print( Cfg.__dict__ ) +flush() +print( "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" ) +print( "str(Cfg)" ) +print( str(Cfg) ) +flush() +print( "repr(Cfg)" ) +print( repr(Cfg) ) +flush() +print( "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" ) +print( "dir(Cfg), second test" ) +for item in dir(Cfg): + print( item ) + flush() +flush() +print( "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" ) +print( "Cfg.__dict__" ) +print( Cfg.__dict__ ) +flush() +print( "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" ) +print( "dir(Cfg.parameter)" ) +print( type(Cfg.Parameter) ) +for item in dir(Cfg.Parameter): + print( item ) + flush() +flush() +print( "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" ) +print( "dir(Cfg), third test" ) +for item in dir(Cfg): + print( item ) + flush() +flush() +print( Cfg.__dict__ ) + +print( "" ) +print( "Test 1" ) +print( "========================================" ) +cfg = Cfg.Configuration.get() +p1 = cfg.addParameter( "test.param1", Cfg.Parameter.Type.String, "my_value_1", Cfg.Parameter.Priority.ApplicationBuiltin ) +print( 'p1=', p1 ) +print( '(before) p1.flags=', p1.flags ) +p1.flags = Cfg.Parameter.Flags.HasMin|Cfg.Parameter.Flags.HasMax +print( '(after) p1.flags=', p1.flags ) + +print( "" ) +print( "Test 2" ) +print( "========================================" ) +p2 = cfg.addParameter( "test.param2", Cfg.Parameter.Type.String, "my_value_2" ) +print( p2 ) +dir(Cfg) + +cfg.pushDefaultPriority( Cfg.Parameter.Priority.ConfigurationFile ) +print( "priority=%d" % cfg.getDefaultPriority() ) +flush() + +print( "" ) +print( "Test 3" ) +print( "========================================" ) +hasP1 = Cfg.hasParameter( 'test.param1' ) +print( 'hasP1=%s' % hasP1 ) +hasP3 = Cfg.hasParameter( 'test.param3' ) +print( 'hasP3=%s' % hasP3 ) +dir(Cfg.Parameter) +flush() + +print( "" ) +print( "Test 4" ) +print( "========================================" ) +try: + p3 = cfg.addParameter( "test.param3", Cfg.Parameter.Type.String ) +except Exception as e: + print( e ) +dir(Cfg.Parameter) +flush() + +print( "" ) +print( "Test 5" ) +print( "========================================" ) +try: + p4 = cfg.addParameter( 1, Cfg.Parameter.Type.String, "my_value4" ) +except Exception as e: + print( e ) +dir(Cfg.Parameter) +flush() + +print( "" ) +print( "Test 6" ) +print( "========================================" ) +pX = Cfg.getParamString( 'test.param1' ) +print( 'test.param1=%s' % pX ) +print( 'test.param1.isFile(): %s' % pX.isFile() ) +dir(Cfg.Parameter) +flush() + +print( "" ) +print( "Test 8" ) +print( "========================================" ) +master = cfg.addParameter( "test.master", Cfg.Parameter.Type.String, "master value" ) +slave1 = cfg.addParameter( "test.slave1", Cfg.Parameter.Type.String, "slave1 value" ) +slave2 = cfg.addParameter( "test.slave2", Cfg.Parameter.Type.String, "slave2 value" ) +slave3 = cfg.addParameter( "test.slave3", Cfg.Parameter.Type.String, "slave3 value" ) +master.addSlave( 'test.slave1' ) +master.addSlave( 'test.slave2' ) +master.addSlave( 'test.slave3' ) +flush() +print( "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" ) +print( "Walkthrough the vector using indexes" ) +slaves = master.getSlaves() +for i in range(len(slaves)): + print( '[%d] %s' % (i,slaves[i]) ) + flush() +flush() +print( "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" ) +print( "Walkthrough the vector using iterator" ) +for slave in slaves: + print( '===> %s' % slave ) + flush() +flush() +print( '"test.slave2" in slaves = {}'.format('test.slave2' in slaves) ) +print( '"test.slaveX" in slaves = {}'.format('test.slaveX' in slaves) ) + +print( "" ) +print( "Test 9" ) +print( "========================================" ) +testDict = { 'machin':1, 'truc':2 } +for key in testDict: + print( '==>', key ) + flush() +flush() +print( 'has key "machin":{}'.format('machin' in testDict) ) +params = cfg.getParameters() +print( 'params["test.master"] = %s' % params['test.master'] ) +try: + print( 'params.has_key("test.master") = {}'.format('test.master' in params) ) + #print( 'params.has_key("test.master") = {}'.format(params.has_key('test.master') )) + print( 'params.has_key("test.slave6") = {}'.format('test.slave6' in params) ) + print( 'params["test.slave6"] = %s' % params['test.slave6'] ) +except KeyError as ke: + print( ke ) +print( "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" ) +print( "Walkthrough the map using iterator" ) +for k, v in params: + print( '===> %s %s' % (k,v) ) + flush() +flush() + +print( "" ) +print( "Test 10" ) +print( "========================================" ) +print( 'getParamString("test.master")=', Cfg.getParamString( "test.master" ) ) +flush() + +pint = cfg.addParameter( "test.paramInt", Cfg.Parameter.Type.Int, "12" ) +print( 'pint=', pint ) +flush() + +pdouble = cfg.addParameter( "test.paramDouble", Cfg.Parameter.Type.Double, "3.14" ) +print( 'pdouble=', pdouble ) +flush() diff --git a/unittests/python/test_hurricane.py b/unittests/python/test_hurricane.py new file mode 100755 index 00000000..1f92ee79 --- /dev/null +++ b/unittests/python/test_hurricane.py @@ -0,0 +1,234 @@ +#!/usr/bin/env python3 + +import sys +import Cfg +from Hurricane3 import DbU, Point, Box, DataBase, Technology, LayerMask, \ + BasicLayer, ViaLayer, RegularLayer +from overlay import CfgCache +from technology import createBL + +def flush (): + sys.stdout.flush() + sys.stderr.flush() + +#def u ( value ): return value +#def l ( value ): return value +def l ( value ): return DbU.fromLambda( value ) +def u ( value ): return DbU.fromPhysical( value, DbU.UnitPowerMicro ) +def n ( value ): return DbU.fromPhysical( value, DbU.UnitPowerNano ) + +def cfg_setup(): + print( "" ) + print( "Test Cfg module" ) + print( "========================================" ) + # Place & Route setup + with CfgCache(priority=Cfg.Parameter.Priority.ConfigurationFile) as cfg: + cfg.lefImport.minTerminalWidth = 0.0 + cfg.crlcore.groundName = 'vss' + cfg.crlcore.powerName = 'vdd' + cfg.etesian.aspectRatio = 1.00 + cfg.etesian.aspectRatio = [10, 1000] + cfg.etesian.spaceMargin = 0.10 + cfg.etesian.uniformDensity = False + cfg.etesian.routingDriven = False + #cfg.etesian.latchUpDistance = u(30.0 - 1.0) + cfg.etesian.latchUpDistance = 0 + cfg.etesian.antennaInsertThreshold = 0.50 + cfg.etesian.antennaMaxWL = u(250.0) + cfg.etesian.antennaGateMaxWL = u(250.0) + cfg.etesian.antennaDiodeMaxWL = u(550.0) + cfg.etesian.tieName = 'tiepoly_x0' + cfg.etesian.feedNames = 'tiepoly_x0' + cfg.etesian.cell.zero = 'zero_x0' + cfg.etesian.cell.one = 'one_x0' + cfg.etesian.bloat = 'disabled' + cfg.etesian.effort = 2 + cfg.etesian.effort = ( + ('Fast', 1), + ('Standard', 2), + ('High', 3 ), + ('Extreme', 4 ), + ) + cfg.etesian.graphics = 2 + cfg.etesian.graphics = ( + ('Show every step', 1), + ('Show lower bound', 2), + ('Show result only', 3), + ) + cfg.anabatic.routingGauge = 'FlexLib' + cfg.anabatic.globalLengthThreshold = 1450 + cfg.anabatic.saturateRatio = 0.90 + cfg.anabatic.saturateRp = 10 + cfg.anabatic.topRoutingLayer = 'METAL6' + cfg.anabatic.edgeLength = 48 + cfg.anabatic.edgeWidth = 8 + cfg.anabatic.edgeCostH = 9.0 + cfg.anabatic.edgeCostK = -10.0 + cfg.anabatic.edgeHInc = 1.0 + cfg.anabatic.edgeHScaling = 1.0 + cfg.anabatic.globalIterations = 10 + cfg.anabatic.globalIterations = [ 1, 100 ] + cfg.anabatic.gcell.displayMode = 1 + cfg.anabatic.gcell.displayMode = (("Boundary", 1), ("Density", 2)) + cfg.katana.hTracksReservedLocal = 4 + cfg.katana.hTracksReservedLocal = [0, 20] + cfg.katana.vTracksReservedLocal = 3 + cfg.katana.vTracksReservedLocal = [0, 20] + cfg.katana.termSatReservedLocal = 8 + cfg.katana.termSatThreshold = 9 + cfg.katana.eventsLimit = 4000002 + cfg.katana.ripupCost = 3 + cfg.katana.ripupCost = [0, None] + cfg.katana.strapRipupLimit = 16 + cfg.katana.strapRipupLimit = [1, None] + cfg.katana.localRipupLimit = 9 + cfg.katana.localRipupLimit = [1, None] + cfg.katana.globalRipupLimit = 5 + cfg.katana.globalRipupLimit = [1, None] + cfg.katana.longGlobalRipupLimit = 5 + cfg.chip.padCoreSide = 'South' + + # Plugins setup + with CfgCache(priority=Cfg.Parameter.Priority.ConfigurationFile) as cfg: + cfg.viewer.minimumSize = 500 + cfg.viewer.pixelThreshold = 20 + cfg.chip.block.rails.count = 0 + cfg.chip.block.rails.hWidth = u(2.68) + cfg.chip.block.rails.vWidth = u(2.68) + cfg.chip.block.rails.hSpacing = 0 #u(0.7) + cfg.chip.block.rails.vSpacing = 0 #u(0.7) + cfg.clockTree.minimumSide = l(600) + cfg.clockTree.buffer = 'buf_x2' + cfg.clockTree.placerEngine = 'Etesian' + cfg.block.spareSide = 10 + cfg.spares.buffer = 'buf_x8' + cfg.spares.maxSinks = 31 + + +def testDbU (): + print( "" ) + print( "Test Hurricane::DbU" ) + print( "========================================" ) + DbU.setPrecision( 2 ) + DbU.setPhysicalsPerGrid( 0.5, DbU.UnitPowerMicro ) + DbU.setGridsPerLambda( 2.0 ) + DbU.setSymbolicSnapGridStep( DbU.fromLambda(1.0) ) + DbU.setPolygonStep(DbU.fromGrid( 2.0) ) + DbU.setStringMode( DbU.StringModeSymbolic, DbU.UnitPowerMicro ) + value = DbU.fromPhysical( 10.0, DbU.UnitPowerMicro ) + print( "value={}".format( DbU.getValueString(value) )) + + +def testPoint (): + print( "" ) + print( "Test Hurricane::Point" ) + print( "========================================" ) + p1 = Point( 1000, 2000 ) + print( p1 ) + p2 = Point( 1000, 2000 ) + print( p1 == p2 ) + p3 = Point( 2000, 2000 ) + print( p1 == p3 ) + p4 = Point( p3 ) + print( p4 ) + + +def testBox (): + print( "" ) + print( "Test Hurricane::Box" ) + print( "========================================" ) + b1 = Box() + print( b1 ) + b1.merge( Point(1000,1000) ) + print( 'b1.merge(Point(1000,1000)={}'.format(b1) ) + b1.merge( Box(Point(2000,2000)) ) + print( 'b1.merge(Box(Point(1000,1000))={}'.format(b1) ) + print( 'b1.getCenter()={}'.format(b1.getCenter()) ) + p1 = Point( 1000, 1000 ) + b2 = Box( p1 ) + print( b2 ) + + +def testDB (): + print( "" ) + print( "Test Hurricane::DataBase" ) + print( "========================================" ) + db = DataBase.create() + print( 'DataBase.getDB()={}'.format(DataBase.getDB()) ) + print( 'DataBase.Flags.CreateLib={}'.format(DataBase.Flags.CreateLib) ) + + +def testTechnology (): + print( "" ) + print( "Test Hurricane::Technology" ) + print( "========================================" ) + tech = Technology.create( DataBase.getDB(), 'test_techno' ) + print( 'tech={}'.format(tech) ) + + +def testLayerMask (): + print( "" ) + print( "Test Hurricane::Layer::Mask" ) + print( "========================================" ) + mask16 = LayerMask( 16 ) + print( 'mask16= {}'.format(mask16) ) + mask32 = LayerMask( 16+32 ) + print( 'mask16= {}'.format(mask32) ) + maskAnd = mask16 & mask32 + print( 'maskAnd={}'.format(maskAnd) ) + try: + maskAnd = mask16 & 4 + print( 'maskAnd={}'.format(maskAnd) ) + except Exception as e: + print( 'Catched and exception...' ) + print( e ) + maskShift = maskAnd << 1 + print( 'maskShift={}'.format(maskShift) ) + maskNot = ~maskAnd + print( 'maskNot={}'.format(maskNot) ) + print( 'maskAnd={}'.format(maskAnd) ) + mask64 = LayerMask( 64+16 ) + print( 'mask64={}'.format(mask64) ) + mask64 &= LayerMask( 64 ) + print( 'mask64={}'.format(mask64) ) + mask64 |= LayerMask( 16 ) + print( 'mask64={}'.format(mask64) ) + mask64.fromString( '0x0000ffff' ) + print( 'mask64={}'.format(mask64) ) + + +def testBasicLayer (): + print( "" ) + print( "Test Hurricane::BasicLayer" ) + print( "========================================" ) + db = DataBase.getDB() + tech = db.getTechnology() + nWell = createBL( tech, 'nWell' , BasicLayer.Material.nWell ) + pWell = createBL( tech, 'pWell' , BasicLayer.Material.pWell ) + cut1 = createBL( tech, 'cut1' , BasicLayer.Material.cut ) + metal1 = createBL( tech, 'metal1', BasicLayer.Material.metal ) + metal2 = createBL( tech, 'metal2', BasicLayer.Material.metal ) + METAL1 = RegularLayer.create( tech, 'METAL1', metal1 ) + METAL2 = RegularLayer.create( tech, 'METAL2', metal2 ) + VIA12 = ViaLayer .create( tech, 'VIA12' , metal1, cut1, metal2 ) + print( 'nWell={}'.format(nWell) ) + print( 'pWell={}'.format(pWell) ) + print( dir(nWell) ) + print( 'Technology.getLayers():' ) + flush() + for layer in tech.getLayers(): + flush() + print( '| basicLayer={}'.format(layer) ) + flush() + + +if __name__ == '__main__': + testDbU() + cfg_setup() + testPoint() + testBox() + testDB() + testTechnology() + testLayerMask() + testBasicLayer() + sys.exit( 0 ) diff --git a/unittests/src/CMakeLists.txt b/unittests/src/CMakeLists.txt index 1f98c001..a1bf16c6 100644 --- a/unittests/src/CMakeLists.txt +++ b/unittests/src/CMakeLists.txt @@ -33,7 +33,7 @@ endif() ${OA_LIBRARIES} ${QtX_LIBRARIES} ${Boost_LIBRARIES} - ${PYTHON_LIBRARIES} + ${Python_LIBRARIES} -lutil ${LIBXML2_LIBRARIES} ${LIBEXECINFO_LIBRARIES} diff --git a/vlsisapd/CMakeLists.txt b/vlsisapd/CMakeLists.txt index 15eeb37d..984b1ddc 100644 --- a/vlsisapd/CMakeLists.txt +++ b/vlsisapd/CMakeLists.txt @@ -6,6 +6,7 @@ cmake_minimum_required(VERSION 2.8.9) set(ignoreVariables "${CMAKE_INSTALL_DIR}") + option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF) list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) @@ -14,11 +15,11 @@ message(STATUS "Boost_NO_SYSTEM_PATHS: ${Boost_NO_SYSTEM_PATHS}") set_cmake_policies() - setup_boost(program_options python regex) + setup_boost(program_options python) find_package(LibXml2 REQUIRED) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) - find_package(PythonLibs 2 REQUIRED) find_package(BISON REQUIRED) find_package(FLEX REQUIRED) find_package(Doxygen) diff --git a/vlsisapd/src/CMakeLists.txt b/vlsisapd/src/CMakeLists.txt index 94c61eb7..96dfdbda 100644 --- a/vlsisapd/src/CMakeLists.txt +++ b/vlsisapd/src/CMakeLists.txt @@ -4,5 +4,5 @@ ADD_SUBDIRECTORY(cif) ADD_SUBDIRECTORY(dtr) ADD_SUBDIRECTORY(spice) ADD_SUBDIRECTORY(bookshelf) -ADD_SUBDIRECTORY(configuration) +#ADD_SUBDIRECTORY(configuration) ADD_SUBDIRECTORY(liberty) diff --git a/vlsisapd/src/bookshelf/src/vlsisapd/bookshelf/Exception.h b/vlsisapd/src/bookshelf/src/vlsisapd/bookshelf/Exception.h index 737f244d..ed9a5e5f 100644 --- a/vlsisapd/src/bookshelf/src/vlsisapd/bookshelf/Exception.h +++ b/vlsisapd/src/bookshelf/src/vlsisapd/bookshelf/Exception.h @@ -35,12 +35,12 @@ namespace Bookshelf { class Exception : public std::exception { public: - Exception ( const std::string& ) throw(); - Exception ( const char* format, ... ) throw(); - Exception ( const Exception& ) throw(); - virtual ~Exception () throw(); + Exception ( const std::string& ); + Exception ( const char* format, ... ); + Exception ( const Exception& ); + virtual ~Exception (); public: - virtual const char* what () const throw (); + virtual const char* what () const; private: static std::string _addHeader ( const char* ); private: diff --git a/vlsisapd/src/dtr/src/vlsisapd/dtr/DTRException.h b/vlsisapd/src/dtr/src/vlsisapd/dtr/DTRException.h index ea556f13..3f1a70ed 100644 --- a/vlsisapd/src/dtr/src/vlsisapd/dtr/DTRException.h +++ b/vlsisapd/src/dtr/src/vlsisapd/dtr/DTRException.h @@ -27,17 +27,17 @@ namespace DTR { class DTRException { public: - inline DTRException (const std::string& what) throw(); - inline virtual ~DTRException () throw(); - inline virtual const char* what () const throw(); + inline DTRException (const std::string& what); + inline virtual ~DTRException (); + inline virtual const char* what () const; private: std::string _what; }; - inline DTRException::DTRException ( const std::string& what ) throw() : _what(what) {} - inline DTRException::~DTRException () throw() {} - inline const char* DTRException::what () const throw() { return _what.c_str(); } + inline DTRException::DTRException ( const std::string& what ) : _what(what) {} + inline DTRException::~DTRException () {} + inline const char* DTRException::what () const { return _what.c_str(); } } // DTR namespace. diff --git a/vlsisapd/src/spice/src/vlsisapd/spice/SpiceException.h b/vlsisapd/src/spice/src/vlsisapd/spice/SpiceException.h index 9c5a0687..38d31945 100644 --- a/vlsisapd/src/spice/src/vlsisapd/spice/SpiceException.h +++ b/vlsisapd/src/spice/src/vlsisapd/spice/SpiceException.h @@ -7,9 +7,9 @@ namespace SPICE { class SpiceException { public: - SpiceException(const std::string& what) throw() : _what(what) {} - virtual const char* what() const throw() { return _what.c_str(); } - virtual ~SpiceException() throw() {} + SpiceException(const std::string& what) : _what(what) {} + virtual const char* what() const { return _what.c_str(); } + virtual ~SpiceException() {} private: std::string _what;