Commit 6169265e authored by Sebastien Bourdeauducq's avatar Sebastien Bourdeauducq
Browse files

xilinx: move Spartan-6 DDR output out of generic Xilinx special overrides

parent 970428e0
...@@ -119,7 +119,15 @@ class XilinxDifferentialOutput: ...@@ -119,7 +119,15 @@ class XilinxDifferentialOutput:
return XilinxDifferentialOutputImpl(dr.i, dr.o_p, dr.o_n) return XilinxDifferentialOutputImpl(dr.i, dr.o_p, dr.o_n)
class XilinxDDROutputImpl(Module): xilinx_special_overrides = {
MultiReg: XilinxMultiReg,
AsyncResetSynchronizer: XilinxAsyncResetSynchronizer,
DifferentialInput: XilinxDifferentialInput,
DifferentialOutput: XilinxDifferentialOutput
}
class XilinxDDROutputImplS6(Module):
def __init__(self, i1, i2, o, clk): def __init__(self, i1, i2, o, clk):
self.specials += Instance("ODDR2", self.specials += Instance("ODDR2",
p_DDR_ALIGNMENT="NONE", p_INIT=0, p_SRTYPE="SYNC", p_DDR_ALIGNMENT="NONE", p_INIT=0, p_SRTYPE="SYNC",
...@@ -128,18 +136,14 @@ class XilinxDDROutputImpl(Module): ...@@ -128,18 +136,14 @@ class XilinxDDROutputImpl(Module):
) )
class XilinxDDROutput: class XilinxDDROutputS6:
@staticmethod @staticmethod
def lower(dr): def lower(dr):
return XilinxDDROutputImpl(dr.i1, dr.i2, dr.o, dr.clk) return XilinxDDROutputImplS6(dr.i1, dr.i2, dr.o, dr.clk)
xilinx_special_overrides = { xilinx_s6_special_overrides = {
MultiReg: XilinxMultiReg, DDROutput: XilinxDDROutputS6
AsyncResetSynchronizer: XilinxAsyncResetSynchronizer,
DifferentialInput: XilinxDifferentialInput,
DifferentialOutput: XilinxDifferentialOutput,
DDROutput: XilinxDDROutput
} }
......
...@@ -16,6 +16,8 @@ class XilinxPlatform(GenericPlatform): ...@@ -16,6 +16,8 @@ class XilinxPlatform(GenericPlatform):
def get_verilog(self, *args, special_overrides=dict(), **kwargs): def get_verilog(self, *args, special_overrides=dict(), **kwargs):
so = dict(common.xilinx_special_overrides) so = dict(common.xilinx_special_overrides)
if self.device[:3] == "xc6":
so.update(common.xilinx_s6_special_overrides)
if self.device[:3] == "xc7": if self.device[:3] == "xc7":
so.update(common.xilinx_s7_special_overrides) so.update(common.xilinx_s7_special_overrides)
if self.device[:4] == "xcku": if self.device[:4] == "xcku":
......
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