From c5270ec60527b3a7797d366bf8605c0a35cbb63f Mon Sep 17 00:00:00 2001 From: Roselyne Chotin Date: Fri, 2 Aug 2013 12:36:01 +0000 Subject: [PATCH] correct bug in constant generation --- stratus1/src/stratus/st_const.py | 3 ++- stratus1/src/stratus/st_net.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/stratus1/src/stratus/st_const.py b/stratus1/src/stratus/st_const.py index 27ddeb01..7f657bce 100644 --- a/stratus1/src/stratus/st_const.py +++ b/stratus1/src/stratus/st_const.py @@ -194,7 +194,8 @@ class Constant ( Model ) : if (nbint < 0): string = '1' + bin(nbint & (2**(nbit+1)-1))[2:] else: - string = '0' + bin(nbint)[2:] + tmp = bin(nbint)[2:] + string = '0'*(nbit - len(tmp)) + tmp return string diff --git a/stratus1/src/stratus/st_net.py b/stratus1/src/stratus/st_net.py index 71d6e949..a292e178 100644 --- a/stratus1/src/stratus/st_net.py +++ b/stratus1/src/stratus/st_net.py @@ -180,7 +180,7 @@ class net : } else : inst_name = Constant.getModelName ( constParam ) - map_cst = { 'output0': cell._TAB_NETS_OUT[num_net] + map_cst = { 'o': cell._TAB_NETS_OUT[num_net] , 'vdd': cell._st_vdds[0] , 'vss': cell._st_vsss[0] }