self._stages = stages
if async_edge not in ("pos", "neg"):
- raise ValueError("AsyncFFSynchronizer async edge must be one of 'pos' or 'neg', not {!r}"
+ raise ValueError("AsyncFFSynchronizer async edge must be one of 'pos' or 'neg', "
+ "not {!r}"
.format(async_edge))
self._edge = async_edge
def get_async_ff_sync(self, async_ff_sync):
m = Module()
sync_output = Signal()
- if async_ff_sync.edge == "pos":
+ if async_ff_sync._edge == "pos":
m.submodules += Instance("altera_std_synchronizer",
p_depth=async_ff_sync._stages,
i_clk=ClockSignal(async_ff_sync._domain),
for i, o in zip((0, *flops), flops):
m.d.async_ff += o.eq(i)
- if self._edge == "pos":
+ if async_ff_sync._edge == "pos":
m.d.comb += ResetSignal("async_ff").eq(asnyc_ff_sync.i)
else:
m.d.comb += ResetSignal("async_ff").eq(~asnyc_ff_sync.i)
for i, o in zip((0, *flops), flops):
m.d.async_ff += o.eq(i)
- if self._edge == "pos":
+ if async_ff_sync._edge == "pos":
m.d.comb += ResetSignal("async_ff").eq(asnyc_ff_sync.i)
else:
m.d.comb += ResetSignal("async_ff").eq(~asnyc_ff_sync.i)
for i, o in zip((0, *flops), flops):
m.d.async_ff += o.eq(i)
- if self._edge == "pos":
+ if async_ff_sync._edge == "pos":
m.d.comb += ResetSignal("async_ff").eq(asnyc_ff_sync.i)
else:
m.d.comb += ResetSignal("async_ff").eq(~asnyc_ff_sync.i)