The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Mar 28th, 2024, 11:04pm
Pages: 1
Send Topic Print
writiing verilog -a time data to file (Read 1101 times)
openloop
New Member
*
Offline



Posts: 3

writiing verilog -a time data to file
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?
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: writiing verilog -a time data to file
Reply #1 - 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.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: writiing verilog -a time data to file
Reply #2 - 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
Back to top
 
 
View Profile WWW   IP Logged
openloop
New Member
*
Offline



Posts: 3

Re: writiing verilog -a time data to file
Reply #3 - Mar 1st, 2017, 6:43am
 
Thanks all for helping.
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.