[myhdl-list] Re: myhdl on windows platform?
Brought to you by:
jandecaluwe
From: Chun L. Z. <chu...@ho...> - 2004-12-29 13:52:07
|
Jan, I tried the method you proposed for me. I made some necessary changes of = file cosimulation/icarus/test/test.py, use the python in cygwin to = co-sim (python test.py), and got the following kind of errors. I don't know what is this assertion means. Could you help me out, or if = these is a definite message that myhdl can't be used with any windows = version simulator, I can abort my effort in this. Thank you very much. Btw: You've done a great job. Till now it works fine on linux platform = for me as a very good HVL. -Arnold # vsim -do sim.do -c -pli {h:\mti\myhdl.dll} tb=20 # Loading c:\Modeltech_6.0a\win32/novas.dll # Loading h:\mti\myhdl.dll # // ModelSim SE 6.0a Sep 24 2004=20 # // # // Copyright Mentor Graphics Corporation 2004 # // All Rights Reserved. # // # // THIS WORK CONTAINS TRADE SECRET AND=20 # // PROPRIETARY INFORMATION WHICH IS THE PROPERTY # // OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS # // AND IS SUBJECT TO LICENSE TERMS. # // # Loading work.tb # do sim.do=20 Assertion failed: n > 0, file myhdl.c, line 216 abnormal program termination ** Fatal: Signal 22 caught. Closing vsimk kernel. ** Fatal: Signal Caught in kernel. ** Fatal: vsimk is exiting with code 222. (Exit codes are defined in the ModelSim messages appendix of the ModelSim User's Manual.) Traceback (most recent call last): File "test.py", line 17, in ? cosim =3D Cosimulation("vsim -pli h:\mti\myhdl.dll -c tb -do = sim.do", a=3Da, b=3Db , c=3Dc) File "/usr/lib/python2.4/site-packages/myhdl/_Cosimulation.py", line = 91, in __ init__ raise CosimulationError(_error.SimulationEnd) myhdl.CosimulationError: Premature simulation end "Arnold" <chu...@ho...> wrote in message news:... > Jan, >=20 > Thank you for your quick reply. >=20 > 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. >=20 > Thanks >=20 >=20 > "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 =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? > > > > 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 > > > > --=20 > > 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/ >=20 > |