Re: [myhdl-list] VHDL Cosim Initial Thoughts
Brought to you by:
jandecaluwe
From: Christopher F. <chr...@gm...> - 2013-01-13 22:26:14
|
On 1/13/13 3:26 PM, Daryl Wasden wrote: > Christopher Felton <chris.felton <at> gmail.com> writes: > >> >> On 1/8/13 6:30 PM, Daryl Wasden wrote: >>>>>> Also, I haven't yet figured out how to deal with delays... >>>>> I am not sure what you are asking or not understanding >>>>> here? >>> I see how this works now. I didn't completely understand the >>> format. Now, I see the protocol structure. The time is sent >>> first, then any signal changes. Doing the socket-based >>> cosimulation in verilog was helpful. >>> >>> I am still fixing one bug, but the simulation is running >>> correctly using socket communication on windows. I ran >>> the test_bin2gray using Icarus. The bug is related to >>> reusing the same port when moving between tests... If I >>> get this up and running and fix the bug, then I'll work >>> on porting it over to Linux/Mac OSX as well. >>> >>> -Daryl >>> >>> >> >> Sounds like you are making good progress. If you want, we >> can setup a bitbucket repository and I can test out your >> changes as well. I don't have a windows system right now >> but I can test it out on a linux. >> >> Regards, >> Chris >> >> > > Sure, that would be great. My free time is going away quickly, > but I should be able to put in at least a few hours every week. > With where I am now, that should still get things done > relatively fast. Currently, the simulation runs okay, but > if you try to execute two simulations quickly, there can be > a problem because ports don't register as closed immediately > after you close them. Also, it only works on localhost > right now because of how it is designed... This wouldn't be > too difficult to change, but it would require the user to > start the process on the server manually prior to starting > the MyHDL simulation which deviates from the current > implementation, but may be useful for me later. So, I'll > look into that as well at some point. > > I've never used bit bucket before, but I will look into it. > Should I email you personally when I've got everything up or > just keep posting to the mailing list? Also, should I put > the 0.8dev code up there and contribute to it or just > include the subclassed code and the (modified) test code? You can create a repository and push your changes or I created a repository on bitbucket. If you want to use the clone I created: https://bitbucket.org/cfelton/myhdl_vhdl_cosim/overview The following should get you started. >> hg clone https://bitbucket.org/cfelton/myhdl_vhdl_cosim <local_path> # Add a <user>@bitbucket.org if you want to push later # after cloned the bitbucket clone of myhdl, push your changes >> cd <to your current working > >> hg commit # commit any modifications >> hg push <path to your local clone, first command above> You will need to create a bitbucket user and then you can push, bitbucket is essentially the same as github just mercurial based and not git. The conversation can continue on this mailing-list unless anyone else objects. The feedback from other users/devs can be very useful. > > The one problem is that this method (or any method other than > the one provided in the present version) requires a change > to _Simulation.py as well because the Cosimulation pipes are > closed by the Simulation class methods manually and not by a > call to the Cosimulation class methods. This would be easily > changed, but I'm not sure how to suggest such a patch. I > looked on the website and it says to send ideas to the mailing > list for discussion. I put it in an earlier reply on this > thread, but maybe I should make a new thread and put it there? Yes, a new thread with this specific issue. > > I'm sorry for all my questions, I'm trying to figure out the > proper etiquette for contributing to the project still. The > modification would not change any existing behavior, it would > just make it possible to subclass the Cosimulation object and > use other methods for inter-process communication. At some > point, I think I'll look into putting windows pipes. Questions are perfect! Jan D. has outlined how to communicate changes and commit bundles (patches). http://www.myhdl.org/doku.php/dev:patches > > Also, the class CosimulationWithSockets is based heavily on > the original Cosimulation class with the only changes being > initialization, communication, and clean up of the sockets > (instead of the pipes) and the use of the multiprocessing > module to generate a child process instead of os.fork(). > I should include the original license at the top of the > file in this case, correct? > > Thanks again, I really appreciate you helping me to > understand these things. I know that you are busy, too... > > -Daryl > No problem, these two topics are asked once in a while, VHDL cosimulation and windows cosimulation. I think their are others that might be interested as well but probably don't have the cycles right now. Regards, Chris |