Forum Discussion
Altera_Forum
Honored Contributor
17 years agoCapture the falling edge of signals in VHDL
Hi, Please bear me with a newbie's question: I want to capture a PWM signal's falling edge. But, I can not use "falling_edge" as the PWM signal is not a clock signal. Can any exper...
Altera_Forum
Honored Contributor
17 years agoRandom comment, but i think it is cool that 3 people both replied with something that will synthesize to close to the same code but look pretty different.
Pertinent comment: If the PWM signal is asynchronous to the clock you are sampling it with, you may want to clock the PWM signal through a few ff's first so you don't have any metastability issues. If it is on the same clock domain as the sample clock then you don't need to worry about it obviously.