correct bug in constant generation

This commit is contained in:
Roselyne Chotin 2013-08-02 12:36:01 +00:00
parent ce5b06cccc
commit c5270ec605
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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]
}