Thread: [myhdl-list] myhdl on windows platform?
Brought to you by:
jandecaluwe
From: Chun L. Z. <chu...@ho...> - 2004-12-14 15:26:08
|
Hi, all, I tried to use myhdl to co-simulate with verilog on windows platform = today. I got the following error messages. Traceback (most recent call last): File = "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py",= line 310, in RunScript exec codeObject in __main__.__dict__ File "D:\proj\myhdl-0.4\cosimulation\mti\test\test.py", line 17, in ? def stimulus(a, b): File "C:\Python23\Lib\site-packages\myhdl\_Cosimulation.py", line 71, = in __init__ child_pid =3D self._child_pid =3D os.fork() AttributeError: 'module' object has no attribute 'fork' I queried the library reference of python, it DO mentioned that os.fork = is only available in UNIX. So I guess MyHDL doesn't have the ability to co-sim with Verilog on = windows currently. However, do you have any plan to support this on = windows recently? Thank you very much. -ChunLin |
From: Jan D. <ja...@ja...> - 2004-12-15 11:17:33
|
Chun Lin Zhang wrote: > Hi, all, > > I tried to use myhdl to co-simulate with verilog on windows platform > today. I got the following error messages. > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "D:\proj\myhdl-0.4\cosimulation\mti\test\test.py", line 17, in ? > def stimulus(a, b): > File "C:\Python23\Lib\site-packages\myhdl\_Cosimulation.py", line 71, > in __init__ > child_pid = self._child_pid = os.fork() > AttributeError: 'module' object has no attribute 'fork' > > I queried the library reference of python, it DO mentioned that os.fork > is only available in UNIX. > > So I guess MyHDL doesn't have the ability to co-sim with Verilog on > windows currently. However, do you have any plan to support this on > windows recently? Hi: In general, I would like MyHDL run on any Python platform. I try to take advantage of Python's portability. However, I only use Linux as a development platform myself, and I don't have the possibility to test/maintain multiple platforms. This is one area where I have to rely on outside help. The closer one gets to the operating system, the more likely it is that problems will appear. The way co-simulation is currently set up, using fork to create new processes, is one example. Note that "native" MyHDL shouldn't pose any problem, and if it does, it should be possible to solve it easily. For this concrete problem: I wasn't fully aware of the fork issue, but I have done some investigations. It seems indeed that this is not available on Windows, and cannot even be emulated easily. From what I read it may be availabe on NT, but even then it's not certain that Python will support it. Your best bet, I think, is to compile Python under Cygwin on Windows, instead of using the native Python. This should give you fork as I understand it. This may be a reasonable solution, because I wonder what Verilog simulator you are using? If it is Icarus, I believe that the way it works on Windows is by using Cygwin anyway. Note: I never used Cygwin myself, but it seems to get good press. Another solution, perhaps, would be one for me: using another approach for co-simulation. It might be possible to use threads instead of processes, and this should work on all platforms (using Python's threading module). I will need to investigate this further, and I have no idea what problems I will encounter, so don't count on this one anytime soon. Hope this helps, Jan -- Jan Decaluwe - Resources bvba - http://jandecaluwe.com Losbergenlaan 16, B-3010 Leuven, Belgium Python is fun, and now you can design hardware with it: http://jandecaluwe.com/Tools/MyHDL/Overview.html |
From: Arnold <chu...@ho...> - 2004-12-15 15:30:57
|
Jan, Thank you for your quick reply. Another question is about using cygwin to compile python on windows: can I use mingw32 to compile python instead of cygwin? If yes how can I achieve that. Thanks "Jan Decaluwe" <ja...@ja...> wrote in message news:41C...@ja...... > Chun Lin Zhang wrote: > > Hi, all, > > > > I tried to use myhdl to co-simulate with verilog on windows platform > > today. I got the following error messages. > > > > Traceback (most recent call last): > > File > > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > > line 310, in RunScript > > exec codeObject in __main__.__dict__ > > File "D:\proj\myhdl-0.4\cosimulation\mti\test\test.py", line 17, in ? > > def stimulus(a, b): > > File "C:\Python23\Lib\site-packages\myhdl\_Cosimulation.py", line 71, > > in __init__ > > child_pid = self._child_pid = os.fork() > > AttributeError: 'module' object has no attribute 'fork' > > > > I queried the library reference of python, it DO mentioned that os.fork > > is only available in UNIX. > > > > So I guess MyHDL doesn't have the ability to co-sim with Verilog on > > windows currently. However, do you have any plan to support this on > > windows recently? > > Hi: > > In general, I would like MyHDL run on any Python platform. > I try to take advantage of Python's portability. > However, I only use Linux as a development platform myself, > and I don't have the possibility to test/maintain multiple > platforms. This is one area where I have to rely on outside > help. > > The closer one gets to the operating system, the more likely > it is that problems will appear. The way co-simulation is > currently set up, using fork to create new processes, is > one example. Note that "native" MyHDL shouldn't pose any > problem, and if it does, it should be possible to solve > it easily. > > For this concrete problem: I wasn't fully aware of the > fork issue, but I have done some investigations. It seems > indeed that this is not available on Windows, and cannot > even be emulated easily. From what I read it may be > availabe on NT, but even then it's not certain that Python > will support it. > > Your best bet, I think, is to compile Python under Cygwin > on Windows, instead of using the native Python. This should > give you fork as I understand it. > > This may be a reasonable solution, because I wonder what > Verilog simulator you are using? If it is Icarus, I believe > that the way it works on Windows is by using Cygwin anyway. > > Note: I never used Cygwin myself, but it seems to get good > press. > > Another solution, perhaps, would be one for me: using another > approach for co-simulation. It might be possible to use > threads instead of processes, and this should work on all > platforms (using Python's threading module). > I will need to investigate this further, and I have no idea > what problems I will encounter, so don't count on this > one anytime soon. > > Hope this helps, > > Jan > > -- > Jan Decaluwe - Resources bvba - http://jandecaluwe.com > Losbergenlaan 16, B-3010 Leuven, Belgium > Python is fun, and now you can design hardware with it: > http://jandecaluwe.com/Tools/MyHDL/Overview.html > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ |
From: Jan D. <ja...@ja...> - 2004-12-16 10:08:44
|
Arnold wrote: > Jan, > > Thank you for your quick reply. > > Another question is about using cygwin to compile python on windows: can I > use mingw32 to compile python instead of cygwin? If yes how can I achieve > that. I have no personal experience with either - so below is just my impression from some Internet searches. When you mention mingw, is that because Icarus Verilog on windows seems to move in that direction and deprecate the cygwin port? From what I found it seems that building Python itself with mingw is quite hard. I found an explanation, but it seems so complex that you may want to avoid it when possible. On the other hand, it seems that building Python with cygwin shouldn't be harder than on a typical Unix box (on Linux, my experience has been that it is trivial). So it seems that your best bet is to use a cygwin Python. As the simulator is a separate program, it should be perfectly possible to use mingw for the simulator and the VPI stuff provided by MyHDL, and co-simulate in that way. Hope this helps (and let us know if you get it to work, too!), Jan -- Jan Decaluwe - Resources bvba - http://jandecaluwe.com Losbergenlaan 16, B-3010 Leuven, Belgium Python is fun, and now you can design hardware with it: http://jandecaluwe.com/Tools/MyHDL/Overview.html |