|
From: Cary R. <cy...@ya...> - 2015-05-13 18:52:30
|
Getting this back on the development list.
Yes, VCD output is only output at the end of the simulation time step. It is not done interactively as the values change otherwise you would have a huge amount of excess data as values stabilize to their final value. I would not call this from the scheduler, but if needed do it as a final step when emitting VCD output for a given time step. I believe that is at the end of the variable_cb_2() call back routine.
Cary
On Wednesday, May 13, 2015 11:43 AM, Joshua Street <kni...@gm...> wrote:
so I think I'm still confused as to how to call the vpi callback functions from within schedule.cc.
I thought that since these two functions were called in stop.cc that I could also call these and have it immediately flush.
invoke_command_const("$fflush"); invoke_command_const("$dumpflush");
However, I think flush is the command I want. The only problem is that it doesn't seem to execute flush immediately.
I'm guessing from trying to read the source that a callback handler is registered and that it is later called when vpiPostSim takes place.
|
|
From: Joshua S. <kni...@gm...> - 2015-05-13 19:17:28
|
I don't think I need it to output every simulation time step. I just don't
think it's flushing at all. The flush call returns true, but the file size
hasn't changed. I am not at all sure what is going on. I will try to play
with it a bit more. Otherwise, the only other solution I can think of is to
just close the file handle and reopen it, which definitely is updating the
vcd properly
On Wed, May 13, 2015 at 2:52 PM, Cary R. <cy...@ya...> wrote:
> Getting this back on the development list.
>
> Yes, VCD output is only output at the end of the simulation time step. It
> is not done interactively as the values change otherwise you would have a
> huge amount of excess data as values stabilize to their final value. I
> would not call this from the scheduler, but if needed do it as a final step
> when emitting VCD output for a given time step. I believe that is at the
> end of the variable_cb_2() call back routine.
>
> Cary
>
>
>
> On Wednesday, May 13, 2015 11:43 AM, Joshua Street <
> kni...@gm...> wrote:
>
>
> so I think I'm still confused as to how to call the vpi callback functions
> from within schedule.cc.
>
> I thought that since these two functions were called in stop.cc that I
> could also call these and have it immediately flush.
>
> invoke_command_const("$fflush");
> invoke_command_const("$dumpflush");
>
> However, I think flush is the command I want. The only problem is that it
> doesn't seem to execute flush immediately.
>
> I'm guessing from trying to read the source that a callback handler is
> registered and that it is later called when vpiPostSim takes place.
>
>
>
>
>
>
>
|
|
From: Joshua S. <kni...@gm...> - 2015-05-13 20:06:10
|
gosh so sorry to bother this newsgroup with my noobness. I manually checked the file size from the C code and realized that the file does flush correct, but windows doesn't update its file sizes. Supposedly a feature of NTFS http://blogs.msdn.com/b/oldnewthing/archive/2011/12/26/10251026.aspx So in my C# code when I checked to see whether the file size changed, I was getting nothing. Now I know that I just need to manually check the file size instead of using the function I called in C# and I should be able to check if anything has changed. Thanks, Josh On Wed, May 13, 2015 at 3:16 PM, Joshua Street <kni...@gm...> wrote: > I don't think I need it to output every simulation time step. I just don't > think it's flushing at all. The flush call returns true, but the file size > hasn't changed. I am not at all sure what is going on. I will try to play > with it a bit more. Otherwise, the only other solution I can think of is to > just close the file handle and reopen it, which definitely is updating the > vcd properly > > On Wed, May 13, 2015 at 2:52 PM, Cary R. <cy...@ya...> wrote: > >> Getting this back on the development list. >> >> Yes, VCD output is only output at the end of the simulation time step. It >> is not done interactively as the values change otherwise you would have a >> huge amount of excess data as values stabilize to their final value. I >> would not call this from the scheduler, but if needed do it as a final step >> when emitting VCD output for a given time step. I believe that is at the >> end of the variable_cb_2() call back routine. >> >> Cary >> >> >> >> On Wednesday, May 13, 2015 11:43 AM, Joshua Street < >> kni...@gm...> wrote: >> >> >> so I think I'm still confused as to how to call the vpi callback >> functions from within schedule.cc. >> >> I thought that since these two functions were called in stop.cc that I >> could also call these and have it immediately flush. >> >> invoke_command_const("$fflush"); >> invoke_command_const("$dumpflush"); >> >> However, I think flush is the command I want. The only problem is that it >> doesn't seem to execute flush immediately. >> >> I'm guessing from trying to read the source that a callback handler is >> registered and that it is later called when vpiPostSim takes place. >> >> >> >> >> >> >> > |
|
From: Stephen W. <st...@ic...> - 2015-05-13 19:53:31
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 05/13/2015 11:52 AM, Cary R. wrote: > I believe that is at the end of the variable_cb_2() call back > routine. If desperate, you could put a fflush() in here, but I will not accept a patch that does this unconditionally. If you enabled it with a +vcd-sync or some such plusarg, that is something I would accept. - -- Steve Williams "The woods are lovely, dark and deep. steve at icarus.com But I have promises to keep, http://www.icarus.com and lines to code before I sleep, http://www.picturel.com And lines to code before I sleep." -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlVTq7IACgkQrPt1Sc2b3ikjTACg3ECM8d9FXEgXFYIZn1aOQvto IsoAoLoMMmD+R4trLeNJ0tI0X9/sfwto =LBqY -----END PGP SIGNATURE----- |