from migen.genlib.resetsync import AsyncResetSynchronizer
-class DiamondAsyncResetSynchronizerImpl(Module):
+class LatticeECPXAsyncResetSynchronizerImpl(Module):
def __init__(self, cd, async_reset):
rst1 = Signal()
self.specials += [
]
-class DiamondAsyncResetSynchronizer:
+class LatticeECPXAsyncResetSynchronizer:
@staticmethod
def lower(dr):
- return DiamondAsyncResetSynchronizerImpl(dr.cd, dr.async_reset)
+ return LatticeECPXAsyncResetSynchronizerImpl(dr.cd, dr.async_reset)
-class DiamondDDROutputImpl(Module):
+class LatticeECPXDDROutputImpl(Module):
def __init__(self, i1, i2, o, clk):
self.specials += Instance("ODDRXD1",
synthesis_directive="ODDRAPPS=\"SCLK_ALIGNED\"",
i_DA=i1, i_DB=i2, o_Q=o)
-class DiamondDDROutput:
+class LatticeECPXDDROutput:
@staticmethod
def lower(dr):
- return DiamondDDROutputImpl(dr.i1, dr.i2, dr.o, dr.clk)
+ return LatticeECPXDDROutputImpl(dr.i1, dr.i2, dr.o, dr.clk)
-diamond_special_overrides = {
- AsyncResetSynchronizer: DiamondAsyncResetSynchronizer,
- DDROutput: DiamondDDROutput
+lattice_ecpx_special_overrides = {
+ AsyncResetSynchronizer: LatticeECPXAsyncResetSynchronizer,
+ DDROutput: LatticeECPXDDROutput
}
-class IcestormAsyncResetSynchronizerImpl(Module):
+class LatticeiCE40AsyncResetSynchronizerImpl(Module):
def __init__(self, cd, async_reset):
rst1 = Signal()
self.specials += [
]
-class IcestormAsyncResetSynchronizer:
+class LatticeiCE40AsyncResetSynchronizer:
@staticmethod
def lower(dr):
- return IcestormAsyncResetSynchronizerImpl(dr.cd, dr.async_reset)
+ return LatticeiCE40AsyncResetSynchronizerImpl(dr.cd, dr.async_reset)
-class IcestormDifferentialOutputImpl(Module):
+class LatticeiCE40DifferentialOutputImpl(Module):
def __init__(self, i, o_p, o_n):
self.specials += Instance("SB_IO",
p_PIN_TYPE=C(0b011000, 6),
i_D_OUT_0=~i)
-class IcestormDifferentialOutput:
+class LatticeiCE40DifferentialOutput:
@staticmethod
def lower(dr):
- return IcestormDifferentialOutputImpl(dr.i, dr.o_p, dr.o_n)
+ return LatticeiCE40DifferentialOutputImpl(dr.i, dr.o_p, dr.o_n)
-icestorm_special_overrides = {
- AsyncResetSynchronizer: IcestormAsyncResetSynchronizer,
- DifferentialOutput: IcestormDifferentialOutput
+lattice_ice40_special_overrides = {
+ AsyncResetSynchronizer: LatticeiCE40AsyncResetSynchronizer,
+ DifferentialOutput: LatticeiCE40DifferentialOutput
}