-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
As proposed by @sletz over at #44 and in the slack channel, I'd like to suggest adding functions for edge detection to the signal library.
my proposal would be this naming scheme:
strictRising(x) = x > x'; // 1 for strictly rising, 0 otherwise
strictFalling(x) = x < x'; // 1 for strictly falling, 0 otherwise
changed(x) = x != x'; // 1 if signal changes, 0 otherwise
falling(x) = x <= x'; // 1 for falling or unchanged, 0 otherwise
rising(x) = x >= x'; // 1 for rising or unchanged, 0 otherwise
unchanged(x) = x == x'; // 1 for unchanged, 0 otherwise
I understand that @sletz would like to have edge or front in the names, however, I do not see the need for "edge" (the change can be infinitesimally small for the functions to trigger)...
other naming schemes were (in order of appearance above):
upfront
/rising_edge
downfront
/falling_edge
edge
/front
inv_upfront
/inv_rising_edge
inv_downfront
/inv_falling_edge
inv_edge
/inv_front
Metadata
Metadata
Assignees
Labels
No labels