The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Modeling >> Behavioral Models >> writiing verilog -a time data to file
https://designers-guide.org/forum/YaBB.pl?num=1488233629

Message started by openloop on Feb 27th, 2017, 2:13pm

Title: writiing verilog -a time data to file
Post by openloop on Feb 27th, 2017, 2:13pm

I need to find a command for Verilog -a that will let me write the time that a crossing event occurs.  $realtime seems close, but how do I get this into a file for processing later?

Title: Re: writiing verilog -a time data to file
Post by Geoffrey_Coram on Feb 28th, 2017, 12:21pm


openloop wrote on Feb 27th, 2017, 2:13pm:
I need to find a command for Verilog -a that will let me write the time that a crossing event occurs.  $realtime seems close, but how do I get this into a file for processing later?


You should use $abstime instead of $realtime, which is not officially supported in the analog context.

You should be able to use $fstrobe or $fwrite to write to a file.

Title: Re: writiing verilog -a time data to file
Post by Ken Kundert on Feb 28th, 2017, 4:41pm

With a crossing event, you should also use last_crossing along with cross to get the best accuracy. See time interval measurement for a template.

-Ken

Title: Re: writiing verilog -a time data to file
Post by openloop on Mar 1st, 2017, 6:43am

Thanks all for helping.

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.