Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12652 Discussions

Is there a way to send periodic time updates to an FPGA over JTAG/UART?

Altera_Forum
Honored Contributor II
1,698 Views

Hi all, 

 

Would there be a way to periodically send NTP network time updates from my computer to a Nios II over JTAG/UART? 

 

I am aware that it is possible to install an embedded version of Linux (uCLinux) and use SSH/Telnet, but I am looking to avoid that method of implementation.
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
966 Views

"anything is possible" 

 

You would have to clarify what you are hoping to accomplish. Do you just want to get the correct time of day/date down in the FPGA? Or do you want a local clock synchronized with some high degree of precision with the NTP server?
0 Kudos
Altera_Forum
Honored Contributor II
966 Views

 

--- Quote Start ---  

"anything is possible" 

 

You would have to clarify what you are hoping to accomplish. Do you just want to get the correct time of day/date down in the FPGA? Or do you want a local clock synchronized with some high degree of precision with the NTP server? 

--- Quote End ---  

 

 

Ted, thanks for looking for clarification. In short, I'm trying to get some sort of high degree of precision with an NTP server. The easiest I'm thinking would be to use some method that already exists and send a host computer's NTP time over JTAG to the FPGA. Any thoughts are welcome. 

 

To give better idea of what I'm trying to accomplish, I'm encrypting a stream of data over Ethernet and need to keep several Altera Boards in time sync. I'm trying to do it out-of-band, hence why I'm trying to stay away from uCLinux SSH/Telnet over Ethernet and am thinking JTAG would be the way to go. I'm aware that the Nios II has an internal clock that I can set, but I would need to send the initial NTP time and probably periodic updates to accommodate for any drift.
0 Kudos
Altera_Forum
Honored Contributor II
966 Views

You would probably be better off just implementing (S)NTP in your board using Ethernet directly. Or if you feel that's overkill, just write your own UDP broadcast with the time information in it that gets sent to your boards: your ethernet switch(es) should do a better job delivering the packet in a timely fashion than Altera software -> JTAG -> (IP blocks) -> (NIOS software) could ever do. 

 

But if you are forced to resort to JTAG, I would recommend just instantiating a JTAG UART for this purpose, then on your host you can write software which uses stdin/stdout pipes to open the "nios2-terminal" process so you can easily write/read the time data with the board. There's no problem or complication having multiple nios2-terminal instances running (to multiple hardware sets). 

 

But again, if you want "some sort of high degree of precision", since you've got Ethernet available I would say just do NTP in your board.
0 Kudos
Altera_Forum
Honored Contributor II
966 Views

Thanks ted! 

 

I see. It definitely would be better to do so over the network. I would then need to learn the in's and out's of NTP. One other idea that I came up with was to obtain a simple GPS receiver with serial interface. That way I would have Stratum 0 time available as an out of band solution.  

 

I do appreciate. I'm working on my masters in computer engineering. Working on my thesis...
0 Kudos
Altera_Forum
Honored Contributor II
966 Views

Depending on where you arw on earth, you could also use a dcf receiver (or a similar thing in your area) DCF updates date and time via radio each minute

0 Kudos
Reply