Commit 8f18c28a authored by William D. Jones's avatar William D. Jones Committed by Sébastien Bourdeauducq
Browse files

build/lattice: Add Icestorm AsyncResetSynchronizer implementation.

parent 3f16323a
......@@ -41,6 +41,22 @@ diamond_special_overrides = {
}
icestorm_special_overrides = {
class IcestormAsyncResetSynchronizerImpl(Module):
def __init__(self, cd, async_reset):
rst1 = Signal()
self.specials += [
Instance("SB_DFFS", i_D=0, i_S=async_reset,
i_C=cd.clk, o_Q=rst1),
Instance("SB_DFFS", i_D=rst1, i_S=async_reset,
i_C=cd.clk, o_Q=cd.rst)
]
class IcestormAsyncResetSynchronizer:
@staticmethod
def lower(dr):
return IcestormAsyncResetSynchronizerImpl(dr.cd, dr.async_reset)
icestorm_special_overrides = {
AsyncResetSynchronizer: IcestormAsyncResetSynchronizer,
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment