Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21612 Discussions

UTC time stamp in FPGA

Altera_Forum
Honored Contributor II
1,637 Views

Hello! I am working on a project where I need to use the UTC time stamp and date. I am not sure how I can implement it. Is there any opensource IP (so far I didn't find any) to do that or does it come with FPGA? I am using stratix V fpga.

0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
845 Views

I use a generic register to store a timestamp and set that generic in a pre-flow script, eg., the Tcl command looks like this: 

 

# Timestamp integer set timestamp # Top-level timestamp generic set_parameter -name TIMESTAMP $timestamp  

 

This code can be found in the boards directory of the code for this tutorial: 

 

http://www.ovro.caltech.edu/~dwh/correlator/pdf/esc-104paper_hawkins.pdf 

 

I forget if this timestamp is in UTC format. If it is not, then you can either use Tcl to calculate it, or use another command. For example, you can also use Tcl exec to call the Cygwin date command which can produce UTC format. 

 

Cheers, 

Dave
0 Kudos
Reply