摘要 |
A method for measuring system clock signal frequency variations is disclosed, whereby the number of search operations can be limited to log2n, where n is the number of elements (signal values) within the sliding window used. A binary tree is used to sort the minimum value. A condition imposed for the binary tree is that the signal values for both the children elements are greater than or equal to the signal value for the parent element. As such, each element of the binary tree contains a signal value and a flag that indicates which of the two children elements contains the smallest signal value. The element at the root of the tree contains the smallest signal value for the entire tree. Whenever a new signal value for an element is retrieved, the new signal value replaces the oldest signal value in the elements involved. The element containing the oldest signal value can be located anywhere in the tree.
|