diff options
| author | Julian Blake Kongslie | 2022-04-17 16:13:26 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2022-04-17 16:13:26 -0700 |
| commit | 3ea86730def6bd637598c0cd0de9c772246b29d3 (patch) | |
| tree | f596f8a9f8ce3c02550a4f89f959f0352e5dc035 /hdl | |
| parent | Fix whitespace/maxlinesize handling in p8bin2uart. (diff) | |
| download | multipdp8-3ea86730def6bd637598c0cd0de9c772246b29d3.tar.xz | |
Refer to wrap bits instead of previous greycode in FIFO greycode calculation.
Diffstat (limited to 'hdl')
| -rw-r--r-- | hdl/fifo.sv | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hdl/fifo.sv b/hdl/fifo.sv index 374f051..19877c4 100644 --- a/hdl/fifo.sv +++ b/hdl/fifo.sv | |||
| @@ -41,7 +41,7 @@ module fifo | |||
| 41 | ++youngest_wrap; | 41 | ++youngest_wrap; |
| 42 | end | 42 | end |
| 43 | 43 | ||
| 44 | youngest_grey = {youngest_wrap, youngest} ^ ({youngest_grey, youngest} >> 1); | 44 | youngest_grey = {youngest_wrap, youngest} ^ ({youngest_wrap, youngest} >> 1); |
| 45 | 45 | ||
| 46 | in_ready = oldest_plus_one_wrap_grey != youngest_grey; | 46 | in_ready = oldest_plus_one_wrap_grey != youngest_grey; |
| 47 | end | 47 | end |
| @@ -60,7 +60,7 @@ module fifo | |||
| 60 | ++oldest_wrap; | 60 | ++oldest_wrap; |
| 61 | end | 61 | end |
| 62 | 62 | ||
| 63 | oldest_grey = {oldest_grey, oldest} ^ ({oldest_grey, oldest} >> 1); | 63 | oldest_grey = {oldest_wrap, oldest} ^ ({oldest_wrap, oldest} >> 1); |
| 64 | oldest_plus_one_wrap_grey = {!oldest_wrap, oldest} ^ ({!oldest_wrap, oldest} >> 1); | 64 | oldest_plus_one_wrap_grey = {!oldest_wrap, oldest} ^ ({!oldest_wrap, oldest} >> 1); |
| 65 | 65 | ||
| 66 | out_valid = oldest_grey != youngest_grey; | 66 | out_valid = oldest_grey != youngest_grey; |
