Xilinx LogiCORE IP Ethernet AVB Endpoint v2.4 User Manual page 78

Table of Contents

Advertisement

Chapter 8: Real Time Clock and Time Stamping
There are two stages to the implementation:
(Step 1) Controlled Frequency RTC
The RTC Increment Value illustrated in
Value Control Register."
RTC nanoseconds field. The lower 20-bits of the RTC Increment Value align with the 20-bit
sub-nanoseconds field. It is assumed that the frequency of the RTC reference clock is
known by the processor to enable the increment value to be programmed correctly. For
example, if the RTC is being clocked from a 125 MHz clock source, a nominal increment
value of 8 ns should be programmed (by writing the value 0x800000 into the
Increment Value Control
clock is drifting with respect to the grand master clock, it can revise this nominal 8 ns up or
down by a very fine degree of accuracy.
The "step 1" addition illustrated in
will occur on every clock cycle of the RTC reference clock. The result from this addition
forms the new value of the "controlled frequency RTC" nanoseconds field. This controlled
frequency RTC will initialize to zero, following reset, and will continue to increment
smoothly on every RTC reference clock cycle by the current value contained in the RTC
Increment Value Control Register.
Figure 8-2
bits of which overlap into the nanoseconds field. For this reason, the largest per-cycle
increment = 1ns * 2^6 = 64 ns. The lowest clock period which is expected to increment this
counter is 40 ns (corresponding to the 25 MHz MAC clock used at 100 Mbps speeds). So
this should satisfy all allowable clock periods.
(Step 2) Synchronized RTC
The value contained in the
is then applied to the free running "controlled frequency RTC" counter. This is used by the
microprocessor to:
The "step 2" addition illustrated in
offset) will occur on every clock cycle of the RTC reference clock. The result from this
addition forms the new value of the Synchronized RTC nanoseconds field. It is this version
of the RTC nanoseconds field which is made available as an output of the core - the
rtc_nanosec_field[31:0] port.
Increment of the Seconds Field
The RTC seconds field is, conceptually, implemented in a similar way to the nanoseconds
field. The seconds field should be incremented by a value of one whenever the
synchronized RTC nanoseconds field saturates at one-second. The
Registers"
similar manner. Again, the step correction capability can be used to either initialize the
RTC counter following reset, or to synchronize the local RTC to that of the Grand Master
Clock (when the local device is acting as a clock slave).
78
The upper 6 bits of this register align with the lower 6 bits of the
Register"). However, if the microprocessor determines that this
illustrates that 26 bits have been reserved for the Increment Value, the upper 6-
"RTC Offset Control Registers"
Initialize the power-up value of the Synchronized RTC.
Apply step corrections to the Synchronized RTC (when a slave), based on the timing
PTP packets received from the Grand Master Clock RTC.
allow the software to make large step corrections to the seconds field in a
www.xilinx.com
Figure 8-2
is set directly from the
Figure 8-2
(of current counter value plus increment)
written by the microprocessor,
Figure 8-2
(of controlled frequency RTC value plus
Ethernet AVB Endpoint User Guide
"RTC Increment
"RTC
"RTC Offset Control
UG492 September 21, 2010

Advertisement

Table of Contents
loading

Table of Contents