lib.fifo: register GrayEncoder output before CDC.
authorwhitequark <cz@m-labs.hk>
Sun, 3 Mar 2019 18:23:51 +0000 (18:23 +0000)
committerwhitequark <cz@m-labs.hk>
Sun, 3 Mar 2019 18:23:51 +0000 (18:23 +0000)
commita5bfe8eed88236efe205c6937e8af9f5bfdb6187
tree398c0db3eeb22e64fe3032d817969d97c536d1a0
parent1076a4b129e35dafd7a7e9278d7d1dae040eb78f
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