Re: [myhdl-list] co-simuation
Brought to you by:
jandecaluwe
From: Edward V. <dev...@sb...> - 2015-09-01 19:06:00
|
Chris,Thanks for the information. That helped me.My vcd/ifchain.vcd is starting to show signs of life. I am trying to document my process. Can you take a look at the 2 files below and give me ideas on what is right and what is wrong. https://github.com/develone/raspberrypi2_yocto/blob/master/doc/simulate.pdf and https://github.com/develone/raspberrypi2_yocto/blob/master/doc/tb_xxxx.pdf Still not getting the status to go green in my co-simulation.I just push my latest code to github.Thanks Regards Edward Vidal Jr. e-mail dev...@sb... 915-595-1613 On Tuesday, September 1, 2015 8:03 AM, Christopher Felton <chr...@gm...> wrote: On 8/31/2015 12:25 PM, Edward Vidal wrote: > Hello All, > I am testing VHD2VL and trying to test the outputted file ifchain.v with MyHDL & Iverilog > co-simulation on a Raspberry Pi 2 B. > > I created the files and folder vcd > https://github.com/develone/raspberrypi2_yocto/tree/master/vhd2vl/examples/tb > > ifchain myhdl.vpi tb_ifchain.v test_ifchain.py vcd > <snip> > If in stimlus section of test_ifchain.py. > I comment the lines 25 & 26 I get the results below. > > python test_ifchain.py > Running test... > 0 > *{'a': Signal(intbv(0L)), 'status': Signal(False), 'b': Signal(intbv(0L)), > compiling ... > iverilog -o ifchain ../ifchain.v ./tb_ifchain.v > cosimulation setup ... > vvp -m ./myhdl.vpi ifchain > VCD info: dumpfile vcd/ifchain1.vcd opened for output. > <myhdl._Cosimulation.Cosimulation object at 0x769f6870> > back from prep cosim > start (co)simulation ... > > This appears to work okay but when I gtkwave vcd/ifchain1.vcd > The signals a,b and clk red and status is yellow. > > When the I uncomment lines 25 & 26 try send values to the co-simulation. > The program does not run to completion but crashes with the following error. > File "/usr/lib/python2.7/site-packages/myhdl-1.0dev-py2.7.egg/myhdl/_Waiter.py", line 142, in next > clause = next(self.generator) > File "test_ifchain.py", line 25, in stimlus > a.next = 10 > This actually is not a cosimulation error. I ran your code and the resulting error is: ValueError: intbv value 10 >= maximum 8 In your code your `a` and `b` are: a = Signal(intbv(0)[3:]) b = Signal(intbv(0)[3:]) Now remember, in Python the upper limit is exclusive, you created 3bit bit-vectors. The max value that can be used is 7. You probably intended it to be: a = Signal(intbv(0)[4:]) b = Signal(intbv(0)[4:]) When I make the changes, you code executes without error. Regards, Chris ------------------------------------------------------------------------------ _______________________________________________ myhdl-list mailing list myh...@li... https://lists.sourceforge.net/lists/listinfo/myhdl-list |