mirror of
https://github.com/myhdl/myhdl.git
synced 2025-01-24 21:52:56 +08:00
When using a tristate-driver as 'local variable' in a device and having a reset function, the init value will be None - that's right so far. But when converting this to verilog (maybe vhdl too) the output will be None, which is wrong, it should be 'bz.
This should fix it at least for verilog. I think the same thing has to be done for vhdl as well. --HG-- branch : punkkeks/when-using-a-tristatedriver-as-local-var-1390504597923
This commit is contained in:
parent
a22bb76cc2
commit
4124e55a76
@ -1272,7 +1272,7 @@ def _convertInitVal(reg, init):
|
||||
if tipe is bool:
|
||||
v = '1' if init else '0'
|
||||
elif tipe is intbv:
|
||||
v = "%s" % init
|
||||
v = "%s" % init if init is not None else "'bz"
|
||||
else:
|
||||
assert isinstance(init, EnumItemType)
|
||||
v = init._toVerilog()
|
||||
|
Loading…
x
Reference in New Issue
Block a user