[myhdl-list] Can't compare Signal(enum)
Brought to you by:
jandecaluwe
From: Thomas H. <th...@ct...> - 2014-07-28 12:08:54
|
I cannot compare signals containing enum instances; this looks like a bug to me: c:\Users\thomas\ip>py -2.7-32 Python 2.7.7 (default, Jun 1 2014, 14:17:13) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import myhdl >>> >>> state = myhdl.enum("foo", "bar") >>> >>> a = myhdl.Signal(state.foo) >>> b = myhdl.Signal(state.bar) >>> >>> print a == b Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Python27\lib\site-packages\myhdl\_Signal.py", line 479, in __cmp__ return cmp(self._val, other) File "C:\Python27\lib\site-packages\myhdl\_enum.py", line 109, in _notImplementedCompare raise NotImplementedError NotImplementedError >>> Thomas |