Method and system for measuring time
Abstract
A method for measuring time includes setting a clock mask by a starting signal and an ending signal generated upon commencement of measurement and termination of measurement, respectively; obtaining a cycle number of a reference signal under the clock mask to calculate a preliminary time; correcting the preliminary time according to a plurality of phase shift signals generated based on the reference signal; and minimizing an error of the preliminary time by increasing the quantity of the phase shift signals. The method enhances the accuracy of the measured time, times up time measurement, and reduces the required circuit areas. A system for measuring time is further introduced for use with the method.
Claims
exact text as granted — not AI-modified1 . A method for measuring time, comprising the steps of:
providing a reference signal; generating a plurality of phase shift signals of a same frequency based on the reference signal, the phase shift signals being spaced apart from each other by a fixed phase; setting a clock mask, the clock mask starting from a start signal for commencement of time measurement and ending at an end signal for termination of time measurement; counting a number Nd 1 of second triggering states occurring to the phase shift signals during a time period from a point in time of commencement of the clock mask to occurrence of a first triggering state to the reference signal; counting a number Nb of cycles of the reference signal based on the first triggering state during a time period of the clock mask; counting a number Nd 2 of the second triggering states occurring to the phase shift signals during a time period from a point in time of termination of the clock mask to occurrence of the first triggering state to the reference signal; and obtaining a measured time t by the equation below:
t =( Nb/Fb )+[ Nd 1/( Fb/M )]−[ Nd 2/( Fb/M )]
wherein frequency of the reference signal is denoted by Fb and number of the phase shift signals by M, and M≧2.
2 . The method of claim 1 , wherein the first triggering state is one of a rising edge triggering state and a falling edge triggering state.
3 . The method of claim 1 , wherein the second triggering state is one of a rising edge triggering state and a falling edge triggering state.
4 . The method of claim 1 , wherein four or eight said phase shift signals are generated.
5 . The method of claim 1 , further comprising replacing frequency Fb of the reference signal with a default value.
6 . The method of claim 1 , wherein the fixed phase equals 360°/(M−1).
7 . A system for measuring time, comprising:
a signal input end for receiving a start signal for commencement of time measurement and an end signal for termination of time measurement; a timer connected to the signal input end for receiving the start signal and the end signal, generating a reference signal of a frequency Fb, generating M phase shift signals based on the reference signal, characterized by a same frequency, and spaced apart from each other by a fixed phase, generating a clock mask starting from the start signal and ending at the end signal, counting a number Nd 1 of second triggering states occurring to the phase shift signals during a time period from a point in time of commencement of the clock mask to occurrence of a first triggering state to the reference signal, counting a number Nb of cycles of the reference signal during the time period of the clock mask based on the first triggering state, counting a number Nd 2 of second triggering states occurring to the phase shift signals during a time period from a point in time of termination of the clock mask to occurrence of a first triggering state to the reference signal, and outputting values Fb, M, Nb, Nd 1 , and Nd 2 ; and a computing device connected to the timer for receiving the values and performing computation with the equation below to obtain a measured time t,
t =( Nb/Fb )+[ Nd 1/( Fb/M )]−[ Nd 2/( Fb/M )]
wherein M≧2.
8 . The system of claim 7 , wherein the timer comprises:
a fundamental frequency generating unit for generating a fundamental frequency signal; a frequency multiplying unit connected to the fundamental frequency generating unit for turning the fundamental frequency signal into the reference signal by frequency multiplication; and a programmable gate array connected to the signal input end for receiving the start signal and the end signal, connected to the frequency multiplying unit for receiving the reference signal, and adapted to generate the values M, Nb, Nd 1 , and Nd 2 and output the values Fb, M, Nb, Nd 1 , and Nd 2 .
9 . The system of claim 8 , wherein the computing device replaces the value Fb with a default value.
10 . The system of claim 7 , wherein the computing device is one of a control unit and a computer device.
11 . The system of claim 7 , wherein the first triggering state is one of a rising edge triggering state and a falling edge triggering state, and the second triggering state is one of a rising edge triggering state and a falling edge triggering state.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.