Re: [myhdl-list] 0.8 Type mismatch in enum item comparison
Brought to you by:
jandecaluwe
From: Christopher F. <chr...@gm...> - 2012-06-01 01:56:02
|
On 5/31/12 10:07 AM, Jan Coombs wrote: > On 31/05/12 14:26, Christopher Felton wrote: >> On 5/31/2012 8:10 AM, 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? >>> >>> Jan Coombs >> >> No might be important for you design! Jan D. added >> some nice features to help debug the use of enums >> (could be your case). Hopefully, 0.8 is flagging >> (throwing an exception) for incorrect use of an e >> num, where 0.7 will not. >> >> You might want to try and run the test without >> traceSignals and you may get more information. > > It has taken me a long time to change the test code, but am now > running without and with traceSignals. Surprisingly I did not get > more information; without traceSignals there is no error. > > So the error only appears with latest 0.8 when producing trace. > > Jan Coombs. I sometimes like my testbenches to have three sim modes selectable if simType == 'trace': dut = traceSignals(ModuleToTest, ...) elif simType == 'cosim': dut = CoSimulation(ModuleToTest, ...) else dut = ModuleToTest(..., ) Regards, Chris |