lib.fifo: register GrayEncoder output before CDC.
authorwhitequark <whitequark@whitequark.org>
Sun, 3 Mar 2019 18:23:51 +0000 (18:23 +0000)
committerwhitequark <whitequark@whitequark.org>
Sun, 3 Mar 2019 18:23:51 +0000 (18:23 +0000)
commit40273178352d9b1186127c2b73866ad1cb0c3a7c
tree398c0db3eeb22e64fe3032d817969d97c536d1a0
parente93bf4bf4b8d293695bfcea7d278192c7e3f306b
lib.fifo: register GrayEncoder output before CDC.

Without this register, static hazards in the encoder could cause
multiple encoder output bits to toggle, which would be incorrectly
sampled by the 2FF synchronizer.

Reported by @Wren6991.
nmigen/lib/fifo.py