Making a System Call After Simulation

  • Thread starter Scott Brady Drummonds
  • Start date
S

Scott Brady Drummonds

Guest
Hi, everyone,

I'm a Verilog novice and am trying to have my compiled circuit execute a PLI
routine after simulation is complete (to write out some data I've collected
during simulation). However, I have no idea how to do this. My stimulus is
provided in EVCD format, so it appears that just adding my call to that file
doesn't work.

How can I register my function to be called as simulation completes?

Thanks!
Scott

--
Remove ".nospam" from the user ID in my e-mail to reply via e-mail.
 
It is easy. Just register a cbEndOfSimulation call back. If
your simulator supports modern +load_vpi= option, easiest is to register
the call back in one of the [booststrap routine list] routines.
You can see an example that uses this callback in the vacbtst.c
program in the tests_and_examples directory of our gpl-cver
release (home: www.pragmatic-c.com/gpl-cver).
/Steve


On Fri, 10 Oct 2003 15:06:10 -0700, Scott Brady Drummonds
<scott.b.drummonds.nospam@intel.com> wrote:
Hi, everyone,

I'm a Verilog novice and am trying to have my compiled circuit execute a PLI
routine after simulation is complete (to write out some data I've collected
during simulation). However, I have no idea how to do this. My stimulus is
provided in EVCD format, so it appears that just adding my call to that file
doesn't work.

How can I register my function to be called as simulation completes?

Thanks!
Scott

--
Steve Meyer Phone: (612) 371-2023
Pragmatic C Software Corp. email: sjmeyer@pragmatic-c.com
520 Marquette Ave. So., Suite 900
Minneapolis, MN 55402
 
"Steve Meyer" <sjmeyer@www.tdl.com> wrote in message
news:slrnbokd7c.19h.sjmeyer@localhost.localdomain...
It is easy. Just register a cbEndOfSimulation call back.
Steve,

After following your suggestion to some more resources, I found out that my
simulator--VCS--doesn't support cbEndOfSimulation. It does, however,
provide another mechanism (vcs_atexit(void (*)(int)) that provides a similar
function.

Thank you so much for the pointer. It got me on the right track!

Scott
 

Welcome to EDABoard.com

Sponsor

Back
Top