Re: [myhdl-list] OSS CVC vpi module
Brought to you by:
jandecaluwe
From: Christopher F. <chr...@gm...> - 2014-12-17 12:52:46
|
On 12/17/2014 6:00 AM, Paul.Y.Zhang wrote: > There are two cases causing memory leak: > > 1. vpi_put_value with delay, such as: > > vpi_put_value(handle, value_p, time_p, vpiInerialDelay); > vpi_put_value(handle, value_p, time_p, vpiTransportDelay); > vpi_put_value(handle, value_p, time_p, vpiPureTransportDelay); > > But seems vpiNoDelay does NOT cause memory leak. > > 2. callback with reason cbAfterDelay > > These two cases will cause memory leak. Thanks for the investigation Paul! Did you use some custom code for the test? I only see vpi_put_value called in one spot with vpiNoDelay: https://bitbucket.org/jandecaluwe/myhdl/src/tip/cosimulation/cver/myhdl_vpi.c?at=default#cl-406 I believe one of the issues with VPI and different simulators is that it is not always defined who is supposed to release memory allocated (simulator or the VPI module). Possibly in the delay callback something additional needs to be released (pure speculation at this point)? Regards, Chris |