T
Tom Derham
Guest
I am using one counter to trigger a second counter.
The first counter is loadable but typically runs for a long time ('count' is
28 bit).
This counter keeps running, and each time it terminates, produces a pulse.
This pulse is used to trigger the second counter, which typically runs for
much less time ('count' is 8 bit). This counter produces output 1 while it
is counting, then returns to 0 until it is retriggered by the pulse from the
first counter.
The whole design is synchronous (running of a single clock at 100 MHz),
using Webpack on Spartan IIE.
Question: how long must the pulse from the first clock be, to ensure that it
triggers the second clock? As I see it, if it is one clock cycle long, then
the second clock should trigger on the next clock rising edge (providing the
sum of clock propagation and the 2nd clock flip-flop setup is less than one
clock cycle)... but functionally the pulse will fall back at the moment it
is triggered (one cycle later), so will only work if the hold time of the
flip-flop is less than the clock propagation.
Is this safe? Does the pulse need to be longer? Will the simulation tools
realise if there is a problem here?
Many thanks
Tom Derham
The first counter is loadable but typically runs for a long time ('count' is
28 bit).
This counter keeps running, and each time it terminates, produces a pulse.
This pulse is used to trigger the second counter, which typically runs for
much less time ('count' is 8 bit). This counter produces output 1 while it
is counting, then returns to 0 until it is retriggered by the pulse from the
first counter.
The whole design is synchronous (running of a single clock at 100 MHz),
using Webpack on Spartan IIE.
Question: how long must the pulse from the first clock be, to ensure that it
triggers the second clock? As I see it, if it is one clock cycle long, then
the second clock should trigger on the next clock rising edge (providing the
sum of clock propagation and the 2nd clock flip-flop setup is less than one
clock cycle)... but functionally the pulse will fall back at the moment it
is triggered (one cycle later), so will only work if the hold time of the
flip-flop is less than the clock propagation.
Is this safe? Does the pulse need to be longer? Will the simulation tools
realise if there is a problem here?
Many thanks
Tom Derham