Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

UTC time stamp in FPGA

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.

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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