Extended Timestamp Counter Using Rollover Tracking
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing hardware timers in computing devices, such as ASICs and CPUs, provide timestamps with shorter bit lengths that rollover frequently, preventing the generation of longer time values needed for precise timing applications like IEEE 1588v2 Precision Time Protocol (PTP), which requires 64-bit nanosecond precision timestamps.
Innovation Solution
A mechanism to extend the bit length of timestamps by using a rollover counter in conjunction with the hardware TOD counter, incrementing the rollover counter based on detected rollovers and combining it with the hardware counter value to generate extended timestamps, accessible to both kernel and user space processes.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Device complexity
If shorter length hardware counters are used, then device complexity is reduced, but the duration of action is limited due to rollover resets
Solution Approach 1:
The extended timestamp is segmented into two parts: the original hardware counter value (lower bits) and the rollover counter value (upper bits). The hardware counter continues to operate independently with its original bit length, while the rollover counter tracks the number of rollovers. This segmentation allows the system to maintain simple hardware while achieving extended time duration through software combination of the two counters.
2Measurement precision
If longer timestamp values are required, then precision timing capability is improved, but device complexity increases due to need for extended counters
Solution Approach 1:
The rollover counter acts as an intermediary that bridges the gap between the limited hardware counter and the desired extended timestamp. Instead of modifying the hardware counter itself, the rollover counter mediates by tracking rollover events and combining its value with the hardware counter value to produce the extended timestamp, thus achieving longer timestamp range without increasing hardware complexity.
3Device complexity
If hardware counters are reset at intervals, then device complexity is reduced, but loss of information occurs regarding total elapsed time
Solution Approach 1:
The rollover counter performs preliminary action by tracking and storing the number of rollover events before they occur. Each time the hardware counter rolls over, the rollover counter is incremented, preserving the information about total elapsed time in advance. This allows the system to reconstruct the full extended timestamp even though the hardware counter itself is reset at intervals.
Data Source
AI summary
Systems and methods for extending an original bit length counter maintained by hardware of a network device to generate an extended length timestamp of a longer bit length are disclosed. The extension of the original bit length counter is based on a rollover counter, where the rollover counter is incremented based on the detection of rollovers of the original bit length counter.


