(suite)
Gestion de la fonction d'evaluation de la consommation pour memoire : stratus utilise toujours la variable STRATUS_MAPPING_NAME
This commit is contained in:
parent
72e72d8eab
commit
3801d65cdc
|
@ -91,3 +91,14 @@ def GetWeightArea ( model ) :
|
||||||
raise Exception ( err )
|
raise Exception ( err )
|
||||||
|
|
||||||
return myP._weightArea[model]
|
return myP._weightArea[model]
|
||||||
|
|
||||||
|
def GetWeightPower ( model ) :
|
||||||
|
myP = WeightParser()
|
||||||
|
|
||||||
|
if 'STRATUS_MAPPING_NAME' in os.environ :
|
||||||
|
myP.Parse ( os.environ['STRATUS_MAPPING_NAME'] )
|
||||||
|
else :
|
||||||
|
err = "\n[Stratus ERROR] Virtual library : No file found in order to parse.\nCheck STRATUS_MAPPING_NAME.\n"
|
||||||
|
raise Exception ( err )
|
||||||
|
|
||||||
|
return myP._weightPower[model]
|
||||||
|
|
|
@ -300,8 +300,7 @@ class Model :
|
||||||
# Hurricane cell found:
|
# Hurricane cell found:
|
||||||
if hurCell :
|
if hurCell :
|
||||||
found = False
|
found = False
|
||||||
for netLoc in hurCell.getExternalNets():
|
for net in hurCell.getExternalNets():
|
||||||
net = netLoc.getElement()
|
|
||||||
direction = net.getDirection()
|
direction = net.getDirection()
|
||||||
name = str(net.getName())
|
name = str(net.getName())
|
||||||
|
|
||||||
|
@ -455,7 +454,7 @@ class Model :
|
||||||
self._vbe = True
|
self._vbe = True
|
||||||
|
|
||||||
##### View : in order to see the in the editor #####
|
##### View : in order to see the in the editor #####
|
||||||
def View ( self ) :
|
def View ( self, stopLevel=1, message="Status stop point" ) :
|
||||||
global EDITOR
|
global EDITOR
|
||||||
|
|
||||||
if not self._hur_cell :
|
if not self._hur_cell :
|
||||||
|
@ -465,10 +464,6 @@ class Model :
|
||||||
if EDITOR:
|
if EDITOR:
|
||||||
EDITOR.setCell ( self._hur_cell )
|
EDITOR.setCell ( self._hur_cell )
|
||||||
EDITOR.fit ()
|
EDITOR.fit ()
|
||||||
|
|
||||||
##### Breakpoint : stop point with a level. Also load in the Viewer #####
|
|
||||||
def Breakpoint ( self, stopLevel=1, message="Status stop point" ) :
|
|
||||||
self.View ()
|
|
||||||
Breakpoint.stop ( stopLevel, message )
|
Breakpoint.stop ( stopLevel, message )
|
||||||
|
|
||||||
##### Save : in order to create the output files #####
|
##### Save : in order to create the output files #####
|
||||||
|
@ -501,8 +496,7 @@ class Model :
|
||||||
|
|
||||||
if not name : name = self._name
|
if not name : name = self._name
|
||||||
|
|
||||||
# Removed unknown asimut options: -nocheckdriver -nostrict -nowarning
|
if tool == 'asimut' : runpat ( self._name, name, '-l 1 -p 100 -zerodelay -nocheckdriver -nostrict -bdd -nowarning' )
|
||||||
if tool == 'asimut' : runpat ( self._name, name, '-l 1 -p 100 -zerodelay -bdd' )
|
|
||||||
else : raise Exception ( 'not implemented yet' )
|
else : raise Exception ( 'not implemented yet' )
|
||||||
|
|
||||||
##### Create a stratus file given the database #####
|
##### Create a stratus file given the database #####
|
||||||
|
|
|
@ -185,6 +185,7 @@ class WeightParser :
|
||||||
|
|
||||||
self._weightTime = {}
|
self._weightTime = {}
|
||||||
self._weightArea = {}
|
self._weightArea = {}
|
||||||
|
self._weightPower = {}
|
||||||
|
|
||||||
# Handler functions
|
# Handler functions
|
||||||
|
|
||||||
|
@ -209,6 +210,14 @@ class WeightParser :
|
||||||
|
|
||||||
self._weightArea[virtName] = temp
|
self._weightArea[virtName] = temp
|
||||||
|
|
||||||
|
if 'power' in attrs :
|
||||||
|
temp = float(attrs['power'])
|
||||||
|
else :
|
||||||
|
# print 'Warning: no weight done in the file, weight put to 1.'
|
||||||
|
temp = 1
|
||||||
|
|
||||||
|
self._weightPower[virtName] = temp
|
||||||
|
|
||||||
################################
|
################################
|
||||||
def end_element ( self, name ) : pass
|
def end_element ( self, name ) : pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue