Forum Discussion
Altera_Forum
Honored Contributor
15 years agoAcessing Data on GMII
Hi folks, at the moment i am planning the architecture of the project of my final thesis. I want to implement a Timestamping-Unit(TSU) for the PTP-Protokoll (IEEE1588). The ptp i want to set...
Altera_Forum
Honored Contributor
15 years agoYou don't have to modify the packets to implement PTP, you just have to timestamp them. I think that the only application that would require to modify the packets in a PTP 2.0 compliant Ethernet switch.
You are right that the second possibility is the most accurate. One way to do it is to monitor the (R)GMII signals to detect if a PTP sync packet is being sent or received. The TSU would need to detect the preamble and SFD to timestamp the packet, and then read the other bytes to check if the packet is IP, UDP, and on the correct port number. It isn't too difficult to do. It can then report the timestamp to the software layer. I have made a PTP implementation on Nios, but unfortunately I can't share it here as it is my company's IP. For the software side you can have a look at this project: http://ptpd.sourceforge.net/doc.html