Start an up-counter from zero when the first event happens. When the second event happens stop the counter.
The counter value multiplied by the clock period is the answer.
The clock frequency will determine the accuracy and the resolution.
Care to spend some time explaining the actual situation? Otherwise it's just a guessing game as to what solution is applicable.
Or you could use a dual mixer time difference method. You can get pretty precise results that way. Oh wait, also does't fit your unwritten requirements? Curses!
Is it that you don't know where it is? Then we'll need to know where you are starting from. And maybe the type of library you're looking for.
Or maybe you know where the library is, and just need a lift.
So give us some more data about your requirements. Are you trying to design something that measures time, or test that two signals have a particular time?
Hi everyone! and thank you for your answers! Well I found the solution for my problem.
It's the keyword "now", when this keyword is affected to a variable of type time ( T<=now) it gives you the current moment,
so what I do is T1<=now and when the second signal changes I made T2<=now . So the difference is T2-T1.
Hi everyone! and thank you for your answers! Well I found the solution for my problem.
It's the keyword "now", when this keyword is affected to a variable of type time ( T<=now) it gives you the current moment,
so what I do is T1<=now and when the second signal changes I made T2<=now . So the difference is T2-T1.
the time of signal equal time of hight lever signal plus time of low lever signal. time of hight lever more than time of low lever, capaciti of signal is small.