(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 )
|
||||
|
||||
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:
|
||||
if hurCell :
|
||||
found = False
|
||||
for netLoc in hurCell.getExternalNets():
|
||||
net = netLoc.getElement()
|
||||
for net in hurCell.getExternalNets():
|
||||
direction = net.getDirection()
|
||||
name = str(net.getName())
|
||||
|
||||
|
@ -455,7 +454,7 @@ class Model :
|
|||
self._vbe = True
|
||||
|
||||
##### View : in order to see the in the editor #####
|
||||
def View ( self ) :
|
||||
def View ( self, stopLevel=1, message="Status stop point" ) :
|
||||
global EDITOR
|
||||
|
||||
if not self._hur_cell :
|
||||
|
@ -465,10 +464,6 @@ class Model :
|
|||
if EDITOR:
|
||||
EDITOR.setCell ( self._hur_cell )
|
||||
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 )
|
||||
|
||||
##### Save : in order to create the output files #####
|
||||
|
@ -501,8 +496,7 @@ class Model :
|
|||
|
||||
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 -bdd' )
|
||||
if tool == 'asimut' : runpat ( self._name, name, '-l 1 -p 100 -zerodelay -nocheckdriver -nostrict -bdd -nowarning' )
|
||||
else : raise Exception ( 'not implemented yet' )
|
||||
|
||||
##### Create a stratus file given the database #####
|
||||
|
|
|
@ -185,6 +185,7 @@ class WeightParser :
|
|||
|
||||
self._weightTime = {}
|
||||
self._weightArea = {}
|
||||
self._weightPower = {}
|
||||
|
||||
# Handler functions
|
||||
|
||||
|
@ -209,6 +210,14 @@ class WeightParser :
|
|||
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue