[myhdl-list] Cosimulation with the simple FSM example.
Brought to you by:
jandecaluwe
|
From: Brendan R. <bre...@gm...> - 2006-01-04 06:50:20
|
I'm having some issues getting cosimulation to work with the simple FSM example
an d Icarus. I have two issues:
1. I'm seeing an 'x' being assigned to the state value, at some point.
- I can get around this by removing the $finish from the casez statement in
the generated Verilog.
- I suspect that this issue is due to the active-inactive transition of
reset_n. If so, then it's not an issue at all.
2. It appears that the enum'ed state types are not being properly de-enum'ed.
I get the following traceback:
Traceback (most recent call last):
File "./FSM_Example_cosim.py", line 63, in ?
GenWaveform()
File "./FSM_Example_cosim.py", line 53, in GenWaveform
sim.run()
File "/home/brendan/lib/python/myhdl/_Simulation.py", line 137, in run
cosim._get()
File "/home/brendan/lib/python/myhdl/_Cosimulation.py", line 144, in _get
s.next = next
File "/home/brendan/lib/python/myhdl/_Signal.py", line 172, in _set_next
self._setNextVal(val)
File "/home/brendan/lib/python/myhdl/_Signal.py", line 226, in _setNextType
raise TypeError("Expected %s, got %s" % (self._type, type(val)))
TypeError: Expected <class 'myhdl._enum.EnumItem'>, got <type 'int'>
I can work around this, as well, by simply changing this exception to a print
statement, but it would be nice to have a "fix" for this one. It does appear
that I'm seeing the values of SEARCH, CONFIRM, SYNC...but these are not being
converted to the expected type _enum.
Unless I'm doing something terribly wrong, you should be able to duplicate this
by simply trying to cosimulate the FSM example with Icarus.
Please let me know if you need any further information from me. I am using the
0.5 version of MyHDL and the 0.8.1 version of Icarus.
Best Regards, and Thanks for the great tool. I'm sure I'll have plenty of use
for it, now, and in the future!
- Brendan
|