From: Florent Kermarrec Date: Mon, 24 Jul 2017 11:38:12 +0000 (+0200) Subject: gen/genlib/cdc/gearbox: fix possible pointers overlap by removing AsyncResetSynchroni... X-Git-Tag: 24jan2021_ls180~1812 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9509d9e361dc85ac709130788e022240ce7d2182;p=litex.git gen/genlib/cdc/gearbox: fix possible pointers overlap by removing AsyncResetSynchronizers. read/write clocks don't have the same frequencies, using AsyncResetSynchronizers cause differents delay when releasing reset and can cause pointers overlap. --- diff --git a/litex/gen/genlib/cdc.py b/litex/gen/genlib/cdc.py index 1fa66543..3ba1a262 100644 --- a/litex/gen/genlib/cdc.py +++ b/litex/gen/genlib/cdc.py @@ -211,17 +211,15 @@ class Gearbox(Module): # # # - reset = Signal() + rst = Signal() cd_write = ClockDomain() cd_read = ClockDomain() self.comb += [ + rst.eq(ResetSignal(idomain) | ResetSignal(odomain)), cd_write.clk.eq(ClockSignal(idomain)), cd_read.clk.eq(ClockSignal(odomain)), - reset.eq(ResetSignal(idomain) | ResetSignal(odomain)) - ] - self.specials += [ - AsyncResetSynchronizer(cd_write, reset), - AsyncResetSynchronizer(cd_read, reset) + cd_write.rst.eq(rst), + cd_read.rst.eq(rst) ] self.clock_domains += cd_write, cd_read