Ok. Then I guess I need to somehow create a delay? Maybe I don't understand butWhy not register data on the rising edge, at the same time you clear the counter ?
then you only need one pulse ?
don't you need to latch the data and then reset the counter with a delayed pulse?
Will you not loose the data if you do these two operations simultaneously?