Hi,

can we take this discussion to the developer mailing list? You may need
to subscribe at http://lists.milkymist.org so your messages do not go
into the moderation queue and you'll get the possible answers from other
people.

On 11/27/2013 05:49 PM, Victor Lyuboslavsky wrote:
> I tried migen, and I'm running into problems simulating.
> I have iverilog 0.9.6 installed in a custom directory
> (/usr/share/iverilog-0.9.6) and migensim.vpi installed in
> /usr/share/iverilog-0.9.6/lib/ivl. It is not clear how to give this
> information to migen -- are there environment variables I should set?
> Using Ubuntu 12.04
> 
> Here is my run:
> root@precise64:/work/migen/examples/sim#
> /usr/share/python3.3.3/bin/python3 basic1.py
> Traceback (most recent call last):
>   File "basic1.py", line 35, in <module>
>     main()
>   File "basic1.py", line 30, in main
>     sim = Simulator(dut)
>   File "/work/migen/migen/sim/generic.py", line 88, in __init__
>     self.ipc = Initiator(sockaddr)
>   File "/work/migen/migen/sim/ipc.py", line 145, in __init__
>     self.socket.bind(self.sockaddr)
> PermissionError: [Errno 1] Operation not permitted

This sounds like you do not have permission to create a unix socket in
the current directory, or the filesystem does not support it. Can you
run mkfifo successfully there?

> Question #2. Is it possible to have a generic script that takes a migen
> Python file, finds the top level and the ports, and creates a
> synthesizable Verilog file. For example: custom_script migen.py > migen.v
> This would help with having a more streamlined synthesis flow. I'm not a
> Python expert, so I'm not sure how to do this easily.

Partly.

The ports, and the hierarchy, can be defined at runtime by an algorithm.
There is also no clear definition of 'port', but for many practical
purposes I think you can assume that all Signal members of Modules whose
names do not start with underscores are ports. For extracting the
hierarchy, you would need to try instantiating every class defined in
the module and see which classes are submodules of which, then take the
top of the tree(s).
Note that in some designs, many classes require parameters for which
they do not provide default values, and that script would not be able to
find values for them.

Sebastien

_______________________________________________
Devel mailing list
Devel@lists.milkymist.org
https://ssl.serverraum.org/lists/listinfo/devel

Reply via email to