cores/clock/xilinx_usp/USPIDELAYCTRL: Apply USIDELAYCTRL's changes.

This commit is contained in:
Florent Kermarrec 2021-03-04 14:42:50 +01:00
parent 60e2d3335f
commit a1e7aab35c
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,6 @@ class USPMMCM(XilinxClocking):
class USPIDELAYCTRL(Module): class USPIDELAYCTRL(Module):
def __init__(self, cd_ref, cd_sys, reset_cycles=64, ready_cycles=64): def __init__(self, cd_ref, cd_sys, reset_cycles=64, ready_cycles=64):
cd_sys.rst.reset = 1
self.clock_domains.cd_ic = ClockDomain() self.clock_domains.cd_ic = ClockDomain()
ic_reset_counter = Signal(max=reset_cycles, reset=reset_cycles-1) ic_reset_counter = Signal(max=reset_cycles, reset=reset_cycles-1)
ic_reset = Signal(reset=1) ic_reset = Signal(reset=1)
@ -109,6 +108,7 @@ class USPIDELAYCTRL(Module):
ic_ready = Signal() ic_ready = Signal()
self.comb += self.cd_ic.clk.eq(cd_sys.clk) self.comb += self.cd_ic.clk.eq(cd_sys.clk)
self.sync.ic += [ self.sync.ic += [
cd_sys.rst.eq(1),
If(ic_ready, If(ic_ready,
If(ic_ready_counter != 0, If(ic_ready_counter != 0,
ic_ready_counter.eq(ic_ready_counter - 1) ic_ready_counter.eq(ic_ready_counter - 1)