The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Mar 29th, 2024, 5:42am
Pages: 1
Send Topic Print
invoking a perl script from ncverilog? (Read 5394 times)
joel
Community Member
***
Offline



Posts: 43

invoking a perl script from ncverilog?
May 12th, 2009, 3:49pm
 
Hi All,
 My simulation needs to periodically regenerate its stimulus file based on current simulation conditions.  I have a perl script that generates the stimulus file based on a few parameters.  Is there a simple way to invoke a perl script from an ncverilog simulation and suspend the simulation until the perl script completes?  e.g.

always #10000
 begin
   $system("create_stim_file.pl");
   $readmemh( "stim_file.dat", stim_data);
 end
I've glanced at the PLI and VPI docs, but it seems overkill and very complex for my goal.

  Thanks,
  -Joel
 
Back to top
 
 
View Profile   IP Logged
joel
Community Member
***
Offline



Posts: 43

Re: invoking a perl script from ncverilog?
Reply #1 - Jun 1st, 2009, 12:17pm
 

Hi All,
 I guess I'm the only one doing this!  But just in case anyone else is interested, here is what the Cadence AE said.

Bracketing the $system call with $display statements will define its location in the event queue.  So if you put this in your primary clock loop:

  $display("about to...");
  $system("create_stim_file.pl");
  $display("done...");

and make sure to stop your clock oscillator or whatever time-progression mechanism your sim uses while the three lines are being executed.

 Cheers,
 /jd
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.