From 4e0140d9ffb8b1f7758d07d0cdb81c2bf9c345da Mon Sep 17 00:00:00 2001 From: Roselyne Chotin Date: Thu, 9 Aug 2012 16:34:55 +0000 Subject: [PATCH] take account of multi outputs cell as FullAdder to compute weight --- stratus1/src/stratus/st_getrealmodel.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/stratus1/src/stratus/st_getrealmodel.py b/stratus1/src/stratus/st_getrealmodel.py index 7adce3e5..ba8ad3cc 100644 --- a/stratus1/src/stratus/st_getrealmodel.py +++ b/stratus1/src/stratus/st_getrealmodel.py @@ -70,7 +70,7 @@ def GetRealModel ( model ) : return myP._realCell[model], myP._inOut[model] -def GetWeightTime ( model ) : +def GetWeightTime ( model, value=None ) : myP = WeightParser() if 'STRATUS_MAPPING_NAME' in os.environ : @@ -78,8 +78,14 @@ def GetWeightTime ( model ) : else : err = "\n[Stratus ERROR] Virtual library : No file found in order to parse.\nCheck STRATUS_MAPPING_NAME.\n" raise Exception ( err ) - - return myP._weightTime[model] + + if value == None : + if type(myP._weightTime[model]) == dict: + return myP._weightTime[model]['time'] + else : + return myP._weightTime[model] + else: + return myP._weightTime[model][value] def GetWeightArea ( model ) : myP = WeightParser()