Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add edge detection to signal library #45

Open
LFSaw opened this issue Jun 28, 2020 · 1 comment
Open

add edge detection to signal library #45

LFSaw opened this issue Jun 28, 2020 · 1 comment

Comments

@LFSaw
Copy link

LFSaw commented Jun 28, 2020

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
@sletz
Copy link
Member

sletz commented Aug 22, 2021

see #98.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants