2015-03-16 17:57:18 -04:00
|
|
|
from migen.fhdl.std import *
|
|
|
|
from migen.genlib.io import *
|
|
|
|
|
|
|
|
class LatticeDDROutputImpl(Module):
|
|
|
|
def __init__(self, i1, i2, o, clk):
|
|
|
|
self.specials += Instance("ODDRA",
|
|
|
|
i_CLK=clk, i_RST=0,
|
|
|
|
i_DA=i1, i_DB=i2, o_Q=o,
|
|
|
|
)
|
|
|
|
|
2015-03-17 04:40:25 -04:00
|
|
|
class LatticeDDROutput:
|
|
|
|
@staticmethod
|
|
|
|
def lower(dr):
|
|
|
|
return LatticeDDROutputImpl(dr.i1, dr.i2, dr.o, dr.clk)
|
|
|
|
|
2015-03-16 17:57:18 -04:00
|
|
|
lattice_special_overrides = {
|
|
|
|
DDROutput: LatticeDDROutput
|
|
|
|
}
|