Re: [myhdl-list] 0.8 Type mismatch in enum item comparison
Brought to you by:
jandecaluwe
From: Jan D. <ja...@ja...> - 2012-05-31 20:20:14
|
On 05/31/2012 05:13 PM, Jan Coombs wrote: > On 31/05/12 15:55, Jan Decaluwe wrote: >> On 05/31/2012 03:10 PM, Jan Coombs wrote: >>> $ ./testSdp3o4.py >>> Traceback (most recent call last): >>> File "./testSdp3o4.py", line 41, in<module> >>> simulate(240) >>> File "./testSdp3o4.py", line 37, in simulate >>> tb = traceSignals(testSdp3o4) >>> File >>> "/home/jan/work/projects/MyHDL/myhdl/myhdl/_traceSignals.py", line >>> 89, in __call__ >>> _writeVcdSigs(vcdfile, h.hierarchy) >>> File >>> "/home/jan/work/projects/MyHDL/myhdl/myhdl/_traceSignals.py", line >>> 146, in _writeVcdSigs >>> if s._val == None: >>> File "/home/jan/work/projects/MyHDL/myhdl/myhdl/_enum.py", line >>> 117, in __eq__ >>> raise TypeError("Type mismatch in enum item comparison") >>> TypeError: Type mismatch in enum item comparison >>> >>> No problem with 0.7. Should I try to track it down? >> >> Mm, this is due to the more restrictive comparisons on EnumItemType. >> >> Now, that 's._val == None' test is wrong also, the idiomatic test >> is 'if s._val is None'. Could you check whether things work >> when you make that change? (line 146 in _traceSignals.py). > > That fixed it, thanks. Ok, I have made this change in 0.8-dev. -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Python as a HDL: http://www.myhdl.org VHDL development, the modern way: http://www.sigasi.com World-class digital design: http://www.easics.com |