From b5a9909b089933c230f6d0ce24c18f153a345cdf Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 16 Mar 2015 22:57:18 +0100 Subject: [PATCH] mibuild/xilinx/common: add LatticeDDROutput --- mibuild/lattice/common.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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 +} -- 2.30.2