Conversation
if we want to count zeros, then we should check if count_q != 0. Checking count_q!=SIZE will lead to stuck in 1 for q_o
niwis
left a comment
There was a problem hiding this comment.
Thank you. Actually, I think there might be more issues with this module (why count to SIZE[SIZE-1:0]? Default value for q_o? q not used?). Because any of these changes will have behavioural implications, I'm marking this as v2 for now.
|
I just had a look at For
For
Imo what all these try to implement is a majority voting system used for eg UART, SPI or I2C (or any other serial interface where you want to oversample). So I think this should probably be redesigned anyway to maybe feature an optional integrated sync (?), settable threshold(s) and maybe a linear approach instead of a counter/integrator one. |
if we want to count zeros, then we should check if count_q != 0. Checking count_q!=SIZE will lead to stuck in 1 for q_o