From e736739eef6b2e92e4e6925eda2afb28f9aa2625 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Sat, 17 Jul 2010 10:34:21 +0000 Subject: [PATCH] * All Main Python Modules: - Change: New problem identified with the Python modules: each module seems to be built as a complete binary, so all the static C++ initializers are allocated in each module. In particular the C++ tree inheritance is built for *each* module so we cannot longer uses the typeid() comparisons across modules... It was used by boost::program_options to perform is casts with boost::any and was starting throwing exceptions because of bad casts. program_option was first initialized in "configuration" first included by PyViewer then in PyCRL (see Utilities.cpp). A first solution is to re-order the import of Python modules in stratus1/st_model so that CRL is imported first. The second is to not not link "configuration" with boost::program_option as only the binary vlsisapd-conf-editor needs it. That is a serious problem of which we must be aware and can cause further strange behaviors. Debug code used to diagnostic has been kept commented in the sources a it may be needed again :-( This behavior do not affect our singletons because they are part of dynamic libraries that seems to be correctly shared between the various Python modules. * ./stratus1, ./cumulus: - Change: Replace calls to CRL.getAllianceFramework() by CRL.AllianceFramework.get(). --- stratus1/src/stratus/st_model.py | 2 +- stratus1/src/stratus/st_placeAndRoute.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stratus1/src/stratus/st_model.py b/stratus1/src/stratus/st_model.py index b5e8f577..32fbcad9 100644 --- a/stratus1/src/stratus/st_model.py +++ b/stratus1/src/stratus/st_model.py @@ -142,7 +142,7 @@ class Model : # Creation of the database if not FRAMEWORK : #Initialize() - FRAMEWORK = CRL.getAllianceFramework() + FRAMEWORK = CRL.AllianceFramework.get() self._st_vdds = [] self._st_vsss = [] diff --git a/stratus1/src/stratus/st_placeAndRoute.py b/stratus1/src/stratus/st_placeAndRoute.py index 3ec23931..3810908f 100644 --- a/stratus1/src/stratus/st_placeAndRoute.py +++ b/stratus1/src/stratus/st_placeAndRoute.py @@ -297,7 +297,7 @@ class ClockBuffer : self.net = self.cell._hur_cell.getNet ( netname ) self.ck_b = Signal ( "ck_b%d"%nbCkBuf, 1 ) - modelMasterCell = CRL.getAllianceFramework().getCell ( "buf_x2", CRL.Catalog.State.Views ) + modelMasterCell = CRL.AllianceFramework.get().getCell ( "buf_x2", CRL.Catalog.State.Views ) if not modelMasterCell : err = "Stratus Error : ClockBuffer : Cannot find model cell : buf_x2 in database !\n" raise err