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.
This commit is contained in:
Florent Kermarrec 2017-07-24 13:38:12 +02:00
parent f25e46c428
commit 9509d9e361
1 changed files with 4 additions and 6 deletions

View File

@ -211,17 +211,15 @@ class Gearbox(Module):
# # # # # #
reset = Signal() rst = Signal()
cd_write = ClockDomain() cd_write = ClockDomain()
cd_read = ClockDomain() cd_read = ClockDomain()
self.comb += [ self.comb += [
rst.eq(ResetSignal(idomain) | ResetSignal(odomain)),
cd_write.clk.eq(ClockSignal(idomain)), cd_write.clk.eq(ClockSignal(idomain)),
cd_read.clk.eq(ClockSignal(odomain)), cd_read.clk.eq(ClockSignal(odomain)),
reset.eq(ResetSignal(idomain) | ResetSignal(odomain)) cd_write.rst.eq(rst),
] cd_read.rst.eq(rst)
self.specials += [
AsyncResetSynchronizer(cd_write, reset),
AsyncResetSynchronizer(cd_read, reset)
] ]
self.clock_domains += cd_write, cd_read self.clock_domains += cd_write, cd_read