Oops did not reply to the list:
>
>What is your compilation problem?
>
>Sébastien

Thanks for the pointers, I will have a look at them.

My naive first test was this:

from random import Random

from migen import *
from migen.genlib.cdc import GrayCounter
from migen.fhdl.verilog import *

def tb(dut):
    prng = Random(7345)
    for i in range(35):
        print("{0:0{1}b} CE={2} bin={3}".format((yield dut.q),
            len(dut.q), (yield dut.ce), (yield dut.q_binary)))
        yield dut.ce.eq(prng.getrandbits(1))
        yield


if __name__ == "__main__":
    dut = GrayCounter(3)
    run_simulation(dut, tb(dut), vcd_name="graycounter.vcd")
    convert(GrayCounter()).write("GrayCounter.v")



and fails like this:

warning: Debugger speedups using cython not found. Run 
'"/usr/local/bin/python3.5" 
"/Applications/Eclipse-Neon.app/Contents/Eclipse/plugins/org.python.pydev_5.4.0.201611281236/pysrc/setup_cython.py"
 build_ext --inplace' to build.
pydev debugger: starting (pid: 31176)
000 CE=0 bin=0
000 CE=0 bin=0
000 CE=1 bin=0
001 CE=0 bin=1
001 CE=0 bin=1
001 CE=0 bin=1
001 CE=0 bin=1
001 CE=0 bin=1
001 CE=1 bin=1
011 CE=0 bin=2
011 CE=0 bin=2
011 CE=0 bin=2
011 CE=1 bin=2
010 CE=1 bin=3
110 CE=0 bin=4
110 CE=0 bin=4
110 CE=1 bin=4
111 CE=0 bin=5
111 CE=0 bin=5
111 CE=1 bin=5
101 CE=0 bin=6
101 CE=0 bin=6
101 CE=1 bin=6
100 CE=1 bin=7
000 CE=0 bin=0
000 CE=1 bin=0
001 CE=1 bin=1
011 CE=1 bin=2
010 CE=0 bin=3
010 CE=0 bin=3
010 CE=0 bin=3
010 CE=0 bin=3
010 CE=1 bin=3
110 CE=0 bin=4
110 CE=1 bin=4
Traceback (most recent call last):
  File 
"/Applications/Eclipse-Neon.app/Contents/Eclipse/plugins/org.python.pydev_5.4.0.201611281236/pysrc/pydevd.py",
 line 1537, in <module>
    globals = debugger.run(setup['file'], None, None, is_module)
  File 
"/Applications/Eclipse-Neon.app/Contents/Eclipse/plugins/org.python.pydev_5.4.0.201611281236/pysrc/pydevd.py",
 line 976, in run
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File 
"/Applications/Eclipse-Neon.app/Contents/Eclipse/plugins/org.python.pydev_5.4.0.201611281236/pysrc/_pydev_imps/_pydev_execfile.py",
 line 25, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/Users/nyholku/migenexp/src/graycounter.py", line 19, in <module>
    convert(GrayCounter()).write("GrayCounter.v")
TypeError: __init__() missing 1 required positional argument: 'width'

wbr Kusti





_______________________________________________
M-Labs devel mailing list
https://ssl.serverraum.org/lists/listinfo/devel

Reply via email to