def __init__(self):
self.tick = Signal()
self.tick_clear_wait = Signal()
- self.counter = Signal(8)
+ self.counter = Signal(64)
self.rst = Signal()
def elaborate(self, platform):
# simple "counter" thing
class Domain2(Elaboratable):
def __init__(self):
- self.counter = Signal(8)
+ self.counter = Signal(64)
self.rst = Signal()
def elaborate(self, platform):
comb += core_sync.clk.eq(self.core_clk) # driven externally
comb += core.rst.eq(ResetSignal())
- m.submodules += AsyncFFSynchronizer(self.core_tick, core.tick)
+ m.submodules += AsyncFFSynchronizer(self.core_tick, core.tick,
+ domain="coresync")
return m
yield Tick("sync")
yield Tick("sync")
yield Tick("sync")
+ yield Tick("sync")
+ yield Tick("sync")
yield dut.core_clk.eq(0)
yield Tick("sync")
yield Tick("sync")
yield Tick("sync")
yield Tick("sync")
+ yield Tick("sync")
+ yield Tick("sync")
counter = yield dut.core2.counter
print ("async counter", counter)