From f2e151842eb5aee4fc178ccf5759ae72b2c6880b Mon Sep 17 00:00:00 2001 From: Roselyne Chotin Date: Thu, 9 Aug 2012 16:33:48 +0000 Subject: [PATCH] take account of multi outputs cell as FullAdder to compute weight --- stratus1/src/stratus/st_parser.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/stratus1/src/stratus/st_parser.py b/stratus1/src/stratus/st_parser.py index 68ec7eb2..45611b0a 100644 --- a/stratus1/src/stratus/st_parser.py +++ b/stratus1/src/stratus/st_parser.py @@ -200,8 +200,18 @@ class WeightParser : # print 'Warning: no weight done in the file, weight put to 1.' temp = 1 - self._weightTime[virtName] = temp - + #self._weightTime[virtName][0] = temp + + # multi output cells as halfadder and fulladder + if 'time2' in attrs : + self._weightTime[virtName] = {} + self._weightTime[virtName]['time'] = temp + temp = float(attrs['time2']) + self._weightTime[virtName]['time2'] = temp + else : + self._weightTime[virtName] = temp + + if 'area' in attrs : temp = float(attrs['area']) else :