[myhdl-list] Re: MyHDL / ModelSim cosim
Brought to you by:
jandecaluwe
From: Jan D. <ja...@ja...> - 2005-05-30 21:02:18
|
Jan Decaluwe wrote: > > My guess is that it is a memory leak caused by the myhdl PLI code, not > by the simulator. This means that I should be able to reproduce it with > Icarus. > > I have briefly looked at the code and I can see potential memory leaks: > > - apparently call back handles should be explicitly freed with a special > vpi call after registering; > - at a certain point the code malloc's memory in a callback which is > never freed. > > As callbacks are created all the time during simulation, this could > explain it. I will run a check with Icarus to see if I can > reproduce/resolve the issue. I did some experiments - please disregard the above, it is probably all wrong. Both with cver and Icarus I see a memory leak, but my hypotheses above are not correct: - freeing the callback handles explicitly doesn't work in Icarus and makes no difference in cver. At this point I also don't see why it should actually make a difference - the malloc'ed memory is free'd automatically, so the simulation crashes on an explicit attempt to free it. I'm searching for another explanation. Jan -- Jan Decaluwe - Resources bvba - http://jandecaluwe.com Losbergenlaan 16, B-3010 Leuven, Belgium Using Python as a hardware description language: http://jandecaluwe.com/Tools/MyHDL/Overview.html |