US10084559B1ActiveUtility

System and method for maintaining a time of day in a port of a PHY module

97
Assignee: MARVELL INT LTDPriority: Mar 6, 2015Filed: Mar 4, 2016Granted: Sep 25, 2018
Est. expiryMar 6, 2035(~8.7 yrs left)· nominal 20-yr term from priority
H04J 3/0644H04J 3/0635H04L 7/0037H04J 3/0667H04L 7/04H04J 3/0673H04L 7/042H04L 47/125H04J 3/0682H04J 3/0697H04J 3/0661
97
PatentIndex Score
73
Cited by
34
References
23
Claims

Abstract

A network device including a port having register and timing modules. The register module includes first ToD, loadpoint, and compensation registers. The timing module includes a second ToD register and ToD module and operates based on a local clock signal. The register module receives a ToD from a control module, which is separate from the network device and selects an initial hardware time. The ToD is a future time and is based on a grandmaster clock signal. The first ToD and loadpoint registers store the ToD and initial hardware time. The compensation register stores a compensation value from the control module and determined based on a difference between local and grandmaster clock signals. The ToD module, when local and initial hardware times match: transfers the ToD between first and second ToD registers; and updates the ToD in the second ToD register based on the local clock signal and compensation value.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
       1. A network device comprising:
 a first port comprising
 a register module to receive a first time of day from a control module, wherein the control module is separate from the network device, wherein the first time of day is a future time and is based on a grandmaster clock signal, and wherein the register module comprises
 a first one or more time of day registers, wherein the first one or more time of day registers are to store the first time of day, 
 a loadpoint register to store an initial hardware time, wherein the control module selects the initial hardware time, and 
 a compensation register to store a compensation value received from the control module, wherein the compensation value is determined based on a difference between a local clock signal and the grandmaster clock signal, and 
 
 a timing module to operate based on the local clock signal, wherein the timing module comprises
 a second one or more time of day registers, and 
 a time of day module to, when a local hardware time of the timing module matches the initial hardware time, (i) transfer the first time of day from the first one or more time of day registers to the second one or more time of day registers, (ii) begin updating the first time of day stored in the second one or more time of day registers based on the local clock signal, and (iii) update the first time of day based on the compensation value. 
 
 
 
     
     
       2. The network device of  claim 1 , wherein:
 the register module comprises an enable register; 
 the enable register is to store an enable bit; 
 the enable bit is set by the control module; and 
 the time of day module is to, subsequent to the control module setting the enable bit and based on the local clock signal, update the first time of day stored in the second one or more time of day registers. 
 
     
     
       3. The network device of  claim 1 , wherein:
 the first one or more time of day registers include a first time of day register and a second time of day register; 
 the first time of day register and the second time of day register are to store respective portions of the first time of day; 
 the second one or more time of day registers include a third time of day register and a fourth time of day register; and 
 the time of day module is to, when the local hardware time of the timing module matches the initial hardware time, (i) transfer the first time of day from the first time of day register and the second time of day register to the third time of day register and the fourth time of day register, and (ii) begin updating the first time of day stored in the third time of day register and the fourth time of day register based on the local clock signal. 
 
     
     
       4. The network device of  claim 3 , wherein:
 the register module comprises a capture register; 
 the capture register is to store a capture bit; 
 the capture bit is set by the control module; and 
 the time of day module is to, subsequent to the control module setting the capture bit, (i) capture the first time of day by transferring the first time of day from the third time of day register and the fourth time of day register to the first time of day register and the second time of day register, and (ii) capture the local hardware time in the loadpoint register. 
 
     
     
       5. The network device of  claim 4 , wherein:
 the register module comprises a fifth time of day register; 
 the fifth time of day register is to store a second time of day, wherein the second time of day is in a different format than the first time of day; 
 the timing module comprises a sixth time of day register; 
 the sixth time of day register is to store the second time of day; and 
 the time of day module is to (i) update the second time of day in the sixth time of day register, and (ii) based on the capture bit, capture the second time of day by transferring the second time of day from the sixth time of day register to the fifth time of day register. 
 
     
     
       6. The network device of  claim 4 , wherein:
 the timing module comprises a counter; 
 the counter is to operate based on the local clock signal; and 
 the time of day module generates the local hardware time based on a value of the counter. 
 
     
     
       7. A system comprising:
 the network device of  claim 4 ; and 
 the control module further to, based on the local hardware time, determine an amount of drift of the first time of day by comparing the time of day captured in the first time of day register and the second time of day register to a grandmaster time indicated via the grandmaster clock signal, 
 wherein the control module is further to adjust the compensation value based on the amount of drift. 
 
     
     
       8. The network device of  claim 1 , wherein the time of day module is to periodically update the first time of day based on (i) the compensation value, and (ii) a difference between (a) the first time of day as stored in the first one or more time of day registers and (b) a grandmaster time of the grandmaster clock signal. 
     
     
       9. A system comprising:
 the network device of  claim 8 ; and 
 the control module further to (i) compare the first time of day to the grandmaster clock signal, and (ii) update the compensation value based on a difference between the first time of day and the grandmaster time. 
 
     
     
       10. The system of  claim 9 , wherein:
 the timing module further comprises an accumulation module; 
 the accumulation module is to, for a plurality of cycles of the grandmaster clock signal, accumulate nanoseconds of differences between the first time of day and the grandmaster time to generate an accumulated value; and 
 the time of day module is further to, based on the accumulated value, update the first time of day stored in the second one or more time of day registers. 
 
     
     
       11. A system comprising:
 the network device of  claim 1 ; and 
 the control module further to (i) compare the first time of day to the grandmaster clock signal, (ii) update the compensation value based on a difference between the first time of day and the grandmaster clock signal, and (iii) based on the difference between the first time of day and a grandmaster time of the grandmaster clock signal, reset the first one or more time of day registers, the second one or more time of day registers, and the loadpoint register. 
 
     
     
       12. A system comprising:
 the network device of  claim 1 ; and 
 the control module, 
 wherein
 the network device comprises a second port, 
 the first port is further to (i) receive a first synchronization frame, and (ii) timestamp the first synchronization frame, wherein the timestamp indicates a time when the first synchronization frame is received at the first port, 
 the control module is further to (i) receive the first synchronization frame from the first port, (ii) generate a second synchronization frame including the timestamp of the first synchronization frame, and (iii) while or subsequent to generating the second synchronization frame, generating a follow up frame corresponding to the second synchronization frame, and 
 the first port or the second port is to (i) receive the second synchronization frame and the follow up frame from the control module, (ii) transmit the synchronization frame and the follow up frame from the network device, and (iii) perform one or more of
 (a) generating an egress timestamp for the second synchronization frame while transmitting the second synchronization frame from the network device, converting the egress timestamp to an egress time based on the time of day stored in the second one or more time of day registers, and prior to transmitting the follow up frame from the network device, updating a timestamp field of the follow up frame to indicate the egress time of the second synchronization frame from the first port or the second port, and 
 (b) calculating a residence time based on the timestamp of the first synchronization frame and the egress timestamp of the second synchronization frame, and prior to transmitting the follow up frame from the network device, updating a correction field of the follow up frame based on the residence time. 
 
 
 
     
     
       13. A system comprising:
 the network device of  claim 1 ; and 
 the control module, 
 wherein
 the first port is to (i) receive a request frame, and (ii) timestamp the request frame, wherein the timestamp indicates a time when the request frame is received at the port, 
 the control module is to (i) receive the request frame from the first port, (ii) generate a response frame including the timestamp of the request frame, and (iii) while or subsequent to generating the response frame, generating a follow up frame corresponding to the response frame, and 
 the first port is further to (i) receive the response frame and the follow up frame from the control module, (ii) transmit the response frame and the follow up frame from the network device, and (iii) perform one or more of
 (a) generating an egress timestamp for the response frame while transmitting the response frame from the network device, converting the egress timestamp to an egress time based on the time of day stored in the second one or more time of day registers, and prior to transmitting the follow up frame from the network device, updating a timestamp field of the follow up frame to indicate the egress time of the response frame from the port, and 
 (b) calculating a turnaround time based on the timestamp of the request frame and the egress timestamp of the response frame, and prior to transmitting the follow up frame from the network device, updating a correction field of the follow up frame based on the turnaround time. 
 
 
 
     
     
       14. A method of operating a network device, wherein the network device comprises a first port, wherein the first port comprises a register module and a timing module, wherein the register module comprises a first one or more time of day registers and a loadpoint register, wherein the timing module comprises a second one or more time of day registers and a time of day module, the method comprising:
 receiving a first time of day from a control module at the register module, wherein the control module is separate from the network device, and wherein the first time of day is a future time and is based on a grandmaster clock signal; 
 storing the first time of day in the first one or more time of day registers; 
 storing an initial hardware time in the loadpoint register, wherein the control module selects the initial hardware time; 
 storing a compensation value received from the control module in a compensation register, wherein the compensation value is determined based on a difference between a local clock signal and the grandmaster clock signal; 
 operating the timing module based on the local clock signal; and 
 when a local hardware time of the timing module matches the initial hardware time, (i) transferring the first time of day from the first one or more time of day registers to the second one or more time of day registers, (ii) begin updating the first time of day stored in the second one or more time of day registers based on the local clock signal, and (iii) updating the first time of day based on the compensation value. 
 
     
     
       15. The method of  claim 14 , further comprising:
 storing an enable bit in an enable register of the register module, wherein the enable bit is set by the control module; and 
 subsequent to the control module setting the enable bit and based on the local clock signal, updating the first time of day stored in the second one or more time of day registers, 
 wherein the transferring of the first time of day from the first one or more time of day registers to the second one or more time of day registers is performed subsequent to the control module setting the enable bit. 
 
     
     
       16. The method of  claim 14 , wherein:
 the first one or more time of day registers include a first time of day register and a second time of day register; 
 the first time of day register and the second time of day register are to store respective portions of the first time of day; 
 the second one or more time of day registers include a third time of day register and a fourth time of day register; and 
 when the local hardware time of the timing module matches the initial hardware time, (i) the first time of day is transferred from the first one or more time of day registers to the second one or more time of day registers, and (ii) the first time of day stored in the second one or more time of day registers is updated based on the local clock signal. 
 
     
     
       17. The method of  claim 16 , further comprising:
 storing a capture bit in a capture register of the register module, wherein the capture bit is set by the control module; and 
 subsequent to the control module setting the capture bit, (i) capturing the first time of day by transferring the first time of day from the third time of day register and the fourth time of day register to the first time of day register and the second time of day register, and (ii) capturing the local hardware time in the loadpoint register. 
 
     
     
       18. The method of  claim 17 , wherein:
 incrementing a counter in the timing module based on the local clock signal; 
 generating the local hardware time based on a value of the counter; 
 based on the local hardware time, determine, via the control module, an amount of drift of the first time of day by comparing the time of day captured in the first time of day register and the second time of day register to a grandmaster time indicated via the grandmaster clock signal; and 
 adjusting the compensation value based on the amount of drift. 
 
     
     
       19. The method of  claim 14 , further comprising:
 periodically updating the first time of day based on (i) the compensation value, and (ii) a difference between (a) the first time of day as stored in the first one or more time of day registers and (b) a grandmaster time of the grandmaster clock signal; 
 comparing the first time of day to the grandmaster clock signal; and 
 updating the compensation value based on a difference between the first time of day and the grandmaster time. 
 
     
     
       20. The method of  claim 19 , further comprising:
 for a plurality of cycles of the grandmaster clock signal, accumulating nanoseconds of differences between the first time of day and the grandmaster time to generate an accumulated value; and 
 based on the accumulated value, updating the first time of day stored in the second one or more time of day registers. 
 
     
     
       21. The method of  claim 14 , further comprising:
 comparing the first time of day to the grandmaster clock signal at the control module; 
 updating the compensation value based on a difference between the first time of day and the grandmaster clock signal; and 
 based on the difference between the first time of day and a grandmaster time of the grandmaster clock signal, resetting the first one or more time of day registers, the second one or more time of day registers, and the loadpoint register. 
 
     
     
       22. The method of  claim 14 , further comprising:
 receiving a first synchronization frame at the first port; 
 timestamping the first synchronization frame via the first port, wherein the timestamp indicates a time when the first synchronization frame is received at the first port; 
 receiving the first synchronization frame from the first port at the control module 
 generating a second synchronization frame including the timestamp of the first synchronization frame; 
 while or subsequent to generating the second synchronization frame, generating a follow up frame corresponding to the second synchronization frame; 
 receiving the second synchronization frame and the follow up frame from the control module at the first port or a second port of the network device; 
 transmitting the synchronization frame and the follow up frame from the network device via the first port or the second port; and 
 performing one or more of
 (a) generating an egress timestamp for the second synchronization frame while transmitting the second synchronization frame from the first port or the second port, converting the egress timestamp to an egress time based on the time of day stored in the second one or more time of day registers, and prior to transmitting the follow up frame from the first port or the second port, updating a timestamp field of the follow up frame to indicate the egress time of the second synchronization frame from the first port or the second port, and 
 (b) calculating a residence time based on the timestamp of the first synchronization frame and the egress timestamp of the second synchronization frame, and prior to transmitting the follow up frame from the first port or the second port, updating a correction field of the follow up frame based on the residence time. 
 
 
     
     
       23. The method of  claim 14 , further comprising
 receiving a request frame at the first port; 
 timestamping the request frame, wherein the timestamp indicates a time when the request frame is received at the first port; 
 receiving the request frame from the first port at the control module in the network device; 
 generating a response frame including the timestamp of the request frame; 
 while or subsequent to generating the response frame, generating a follow up frame corresponding to the response frame; 
 receiving the response frame and the follow up frame from the control module at the first port; 
 transmitting the response frame and the follow up frame from the first port; and 
 performing one or more of
 (a) generating an egress timestamp for the response frame while transmitting the response frame from the port, converting the egress timestamp to an egress time based on the time of day stored in the second one or more time of day registers, and prior to transmitting the follow up frame from the port, updating a timestamp field of the follow up frame to indicate the egress time of the response frame from the port, and 
 (b) calculating a turnaround time based on the timestamp of the request frame and the egress timestamp of the response frame, and prior to transmitting the follow up frame from the port, updating a correction field of the follow up frame based on the turnaround time.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.