Forum Discussion
Altera_Forum
Honored Contributor
10 years ago --- Quote Start --- Well, now the really generalized question is (see initial post) what are the best (securest) ways to detect edges or one-clock-pulses (everything synchronized) to trigger the start of a state-machine. This is a general question and not for debugging a special code. --- Quote End --- There is only one way and is surest securest: sample the pulse on the clock edge and use same clock edge as that generated it, though you may take risk and swap edges but there is no need to swap edges unless for some reason you want to overcome timing issues. The timing makes sure that there is setup window and hold window of pulse transition relative to clock edge and in effect says I see the pulse. If sampling fails and the clock edge did not see the pulse then either timing is not right or else your logic is not right. We trust the technology otherwise we wouldn't be here.