Re: [myhdl-list] always_comb exception
Brought to you by:
jandecaluwe
From: Steve V. <ste...@ea...> - 2013-10-09 18:34:21
|
<head><style>body{font-size:10pt;font-family:arial,sans-serif;background-color:#ffffff;color:black;}p{margin:0px;}</style></head><body><font color="#000000"><font size="2"><font face="arial,sans-serif">Hi<font size="2"> <br><font size="2"> Thanks very much<font size="2"> !</font></font><br></font></font></font></font><blockquote style="PADDING-LEFT: 5px; MARGIN-LEFT: 0px; BORDER-LEFT: #0000ff 2px solid">-----Original Message----- <br>From: Per Karlsson <bas...@gm...> <br>Sent: Oct 9, 2013 1:16 PM <br>To: Steve Vejcik <ste...@ea...>, General discussions on MyHDL <myh...@li...> <br>Subject: Re: [myhdl-list] always_comb exception <br><br><div dir="ltr">I suspect you are running from the interpreter. <div>That won't work, because MyHDL uses inspection. </div><div>Every piece of MyHDL code has to be written to an actual file somewhere (or at least that's how I understand it).</div> <div><br></div><div>Cheers</div><div>Per</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Oct 9, 2013 at 7:48 PM, Steve Vejcik <span dir="ltr"><<a target="_blank" href="mailto:ste...@ea...">ste...@ea...</a>></span> wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Folks - I'm just wetting my feet with myhdl and have run into a problem<br> running the simple latch example from the wiki. I'm running python 2.7 with<br> myhdl v0.8. If anyone can offer some insight I'd appreciate it. Here's a<br> variant of the problem:<br> <br> def Mux(z, a, b, sel):<br> @always_comb<br> def muxLogic():<br> if sel == 1:<br> z.next = a<br> else:<br> z.next = b<br> return muxLogic<br> >>> z, a, b, sel = [Signal(0) for i in range(4)]<br> >>> mux_1 = Mux(z,a,b,sel)<br> <br> Traceback (most recent call last):<br> File "<stdin>", line 1, in <module><br> File "<stdin>", line 2, in Mux<br> File "/usr/local/lib/python2.7/dist-packages/myhdl/_always_comb.py", line<br> 64, in always_comb<br> c = _AlwaysComb(func, symdict)<br> File "/usr/local/lib/python2.7/dist-packages/myhdl/_always_comb.py", line<br> 185, in __init__<br> s = inspect.getsource(func)<br> File "/usr/lib/python2.7/inspect.py", line 701, in getsource<br> lines, lnum = getsourcelines(ZZZobject)<br> File "/usr/lib/python2.7/inspect.py", line 690, in getsourcelines<br> lines, lnum = findsource(ZZZobject)<br> File "/usr/lib/python2.7/inspect.py", line 538, in findsource<br> raise IOError('could not get source code')<br> IOError: could not get source code<br> <br> Steve<br> <br> ------------------------------------------------------------------------------<br> October Webinars: Code for Performance<br> Free Intel webinars can help you accelerate application performance.<br> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from<br> the latest Intel processors and coprocessors. See abstracts and register ><br> <a target="_blank" href="http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk">http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk</a><br> _______________________________________________<br> myhdl-list mailing list<br> <a target="_blank" href="mailto:myh...@li...">myh...@li...</a><br> <a target="_blank" href="https://lists.sourceforge.net/lists/listinfo/myhdl-list">https://lists.sourceforge.net/lists/listinfo/myhdl-list</a><br> </blockquote></div><br></div> </myh...@li...></ste...@ea...></bas...@gm...></blockquote></body><pre> Steve</pre> |