-
Design patterns: reusable templates which appear often in applications
-
Patterns
- Operating on signal transitions
- Debounce (one-sided, two-sided)
-
For boolean signals/conditions
-
Use when information is in the signals' fronts (edge / transition) rather than in its values
-
Solution: detect signal transitions
- rising edge
- falling edge
- both
-
Draw here: detect rising edge
-
Draw here: detect falling edge
-
Draw here: detect any edge
-
For boolean signals/conditions
-
Bouncing: real signals look like this:
- Use debouncing to avoid spurious transitions
-
Draw here: debounce rising edge
-
Draw here: debounce falling edge
-
Draw here: debounce both edges