mirror of
https://github.com/myhdl/myhdl.git
synced 2024-12-14 07:44:38 +08:00
conversion bug from IPROBE project
This commit is contained in:
parent
454b2294df
commit
77a0d8c1d4
@ -1,4 +1,4 @@
|
||||
Release 0.6dev5
|
||||
Release 0.6dev6
|
||||
---------------
|
||||
|
||||
Release 0.5.1 1-May-2006
|
||||
|
@ -1,4 +1,4 @@
|
||||
MyHDL Release 0.6dev5
|
||||
MyHDL Release 0.6dev6
|
||||
=====================
|
||||
|
||||
OVERVIEW
|
||||
|
@ -48,7 +48,7 @@ __author__ = "Jan Decaluwe <jan@jandecaluwe.com>"
|
||||
__revision__ = "$Revision$"
|
||||
__date__ = "$Date$"
|
||||
|
||||
__version__ = "0.6dev5"
|
||||
__version__ = "0.6dev6"
|
||||
|
||||
import sys
|
||||
import warnings
|
||||
|
@ -366,7 +366,8 @@ class _ConvertVisitor(_ConversionMixin):
|
||||
pre, suf = "resize(", ", %s)" % vhd.size
|
||||
elif isinstance(ori, vhd_signed):
|
||||
if vhd.size != ori.size:
|
||||
pre, suf = "unsigned(resize(", ", %s))" % vhd.size
|
||||
# note the order of resizing and casting here (otherwise bug!)
|
||||
pre, suf = "resize(unsigned(", "), %s)" % vhd.size
|
||||
else:
|
||||
pre, suf = "unsigned(", ")"
|
||||
else:
|
||||
@ -377,6 +378,7 @@ class _ConvertVisitor(_ConversionMixin):
|
||||
pre, suf = "resize(", ", %s)" % vhd.size
|
||||
elif isinstance(ori, vhd_unsigned):
|
||||
if vhd.size != ori.size:
|
||||
# I think this should be the order of resizing and casting here
|
||||
pre, suf = "signed(resize(", ", %s))" % vhd.size
|
||||
else:
|
||||
pre, suf = "signed(", ")"
|
||||
|
Loading…
x
Reference in New Issue
Block a user