Forum Discussion
Altera_Forum
Honored Contributor
11 years agoSecurely start a State-Machine with pulses or edges
Hi there, this problem occures in my work from time to time: I want to start a State-Machine (Transition from Idle-State S000 to State S010) either with a single one-clock-pulse or on the edg...
Altera_Forum
Honored Contributor
11 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.