1
0
mirror of https://github.com/myhdl/myhdl.git synced 2024-12-14 07:44:38 +08:00

Merge pull request #133 from clade/0.9-maintenance

assign statement (constwires) support litterals larger than 32 bits
This commit is contained in:
jandecaluwe 2015-11-01 20:59:29 +01:00
commit b726eb8139

View File

@ -324,7 +324,9 @@ def _writeSigDecls(f, intf, siglist, memlist):
c = int(s.val)
else:
raise ToVerilogError("Unexpected type for constant signal", s._name)
print("assign %s = %s;" % (s._name, c), file=f)
c_len = s._nrbits
c_str = "%s"%c
print("assign %s = %s'd%s;" % (s._name, c_len, c_str), file=f)
print(file=f)
# shadow signal assignments
for s in siglist: