mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
mibuild/xilinx: export special_overrides dictionary
This commit is contained in:
parent
d34b7d7a6b
commit
aef9275c99
2 changed files with 11 additions and 12 deletions
|
@ -4,6 +4,8 @@ from distutils.version import StrictVersion
|
|||
from migen.fhdl.std import *
|
||||
from migen.fhdl.specials import SynthesisDirective
|
||||
from migen.genlib.cdc import *
|
||||
from migen.genlib.resetsync import AsyncResetSynchronizer
|
||||
from migen.genlib.io import *
|
||||
from mibuild import tools
|
||||
|
||||
def settings(path, ver=None, sub=None):
|
||||
|
@ -81,3 +83,11 @@ class XilinxDifferentialOutput:
|
|||
@staticmethod
|
||||
def lower(dr):
|
||||
return XilinxDifferentialOutputImpl(dr.i, dr.o_p, dr.o_n)
|
||||
|
||||
xilinx_special_overrides = {
|
||||
NoRetiming: XilinxNoRetiming,
|
||||
MultiReg: XilinxMultiReg,
|
||||
AsyncResetSynchronizer: XilinxAsyncResetSynchronizer,
|
||||
DifferentialInput: XilinxDifferentialInput,
|
||||
DifferentialOutput: XilinxDifferentialOutput,
|
||||
}
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
from migen.genlib.cdc import *
|
||||
from migen.genlib.resetsync import AsyncResetSynchronizer
|
||||
from migen.genlib.io import *
|
||||
|
||||
from mibuild.generic_platform import GenericPlatform
|
||||
from mibuild.xilinx import common, vivado, ise
|
||||
|
||||
|
@ -18,20 +14,13 @@ class XilinxPlatform(GenericPlatform):
|
|||
raise ValueError("Unknown toolchain")
|
||||
|
||||
def get_verilog(self, *args, special_overrides=dict(), **kwargs):
|
||||
so = {
|
||||
NoRetiming: common.XilinxNoRetiming,
|
||||
MultiReg: common.XilinxMultiReg,
|
||||
AsyncResetSynchronizer: common.XilinxAsyncResetSynchronizer,
|
||||
DifferentialInput: common.XilinxDifferentialInput,
|
||||
DifferentialOutput: common.XilinxDifferentialOutput,
|
||||
}
|
||||
so = dict(common.xilinx_special_overrides)
|
||||
so.update(special_overrides)
|
||||
return GenericPlatform.get_verilog(self, *args, special_overrides=so, **kwargs)
|
||||
|
||||
def get_edif(self, fragment, **kwargs):
|
||||
return GenericPlatform.get_edif(self, fragment, "UNISIMS", "Xilinx", self.device, **kwargs)
|
||||
|
||||
|
||||
def build(self, *args, **kwargs):
|
||||
return self.toolchain.build(self, *args, **kwargs)
|
||||
|
||||
|
|
Loading…
Reference in a new issue