[myhdl-list] always_comb exception
Brought to you by:
jandecaluwe
From: Steve V. <ste...@ea...> - 2013-10-09 17:48:22
|
Hi Folks - I'm just wetting my feet with myhdl and have run into a problem running the simple latch example from the wiki. I'm running python 2.7 with myhdl v0.8. If anyone can offer some insight I'd appreciate it. Here's a variant of the problem: def Mux(z, a, b, sel): @always_comb def muxLogic(): if sel == 1: z.next = a else: z.next = b return muxLogic >>> z, a, b, sel = [Signal(0) for i in range(4)] >>> mux_1 = Mux(z,a,b,sel) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 2, in Mux File "/usr/local/lib/python2.7/dist-packages/myhdl/_always_comb.py", line 64, in always_comb c = _AlwaysComb(func, symdict) File "/usr/local/lib/python2.7/dist-packages/myhdl/_always_comb.py", line 185, in __init__ s = inspect.getsource(func) File "/usr/lib/python2.7/inspect.py", line 701, in getsource lines, lnum = getsourcelines(object) File "/usr/lib/python2.7/inspect.py", line 690, in getsourcelines lines, lnum = findsource(object) File "/usr/lib/python2.7/inspect.py", line 538, in findsource raise IOError('could not get source code') IOError: could not get source code Steve |