From: Florent Kermarrec Date: Mon, 16 Mar 2015 21:57:18 +0000 (+0100) Subject: mibuild/xilinx/common: add LatticeDDROutput X-Git-Tag: 24jan2021_ls180~2099^2~178 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b5a9909b089933c230f6d0ce24c18f153a345cdf;p=litex.git mibuild/xilinx/common: add LatticeDDROutput --- diff --git a/mibuild/lattice/common.py b/mibuild/lattice/common.py index 2eef69d3..c087c2aa 100644 --- a/mibuild/lattice/common.py +++ b/mibuild/lattice/common.py @@ -1 +1,18 @@ -lattice_special_overrides = {} +from migen.fhdl.std import * +from migen.genlib.io import * + +class LatticeDifferentialOutput: + @staticmethod + def lower(dr): + return LatticeDifferentialOutputImpl(dr.i, dr.o_p, dr.o_n) + +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, + ) + +lattice_special_overrides = { + DDROutput: LatticeDDROutput +}