From 4b22a7b109fdbc0c769ac344610ec66635d680da Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 21 Nov 2022 12:30:36 +0100 Subject: [PATCH] build/osfpga: Add fake OSFPGAAsyncResetSynchronizer and false_path_constraint to be able to generate more cores. Code will be replaced when information will be available. --- litex/build/osfpga/common.py | 17 +++++++++++++++-- litex/build/osfpga/platform.py | 3 +++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/litex/build/osfpga/common.py b/litex/build/osfpga/common.py index 1f9efeb1f..f5aa89254 100644 --- a/litex/build/osfpga/common.py +++ b/litex/build/osfpga/common.py @@ -9,6 +9,19 @@ from migen.genlib.resetsync import AsyncResetSynchronizer from litex.build.io import * -# OS-FPGA Special Overrides ------------------------------------------------------------------------ +# OS-FPGA AsyncResetSynchronizer ------------------------------------------------------------------- -osfpga_special_overrides = {} +class OSFPGAAsyncResetSynchronizerImpl(Module): + def __init__(self, cd, async_reset): + self.comb += cd.rst.eq(async_reset) # FIXME: Implement. + +class OSFPGAAsyncResetSynchronizer: + @staticmethod + def lower(dr): + return OSFPGAAsyncResetSynchronizerImpl(dr.cd, dr.async_reset) + +# OS-FPGA Special Overrides ------------------------------------------------------------------------- + +osfpga_special_overrides = { + AsyncResetSynchronizer: OSFPGAAsyncResetSynchronizer, +} diff --git a/litex/build/osfpga/platform.py b/litex/build/osfpga/platform.py index bdd576651..265d48080 100644 --- a/litex/build/osfpga/platform.py +++ b/litex/build/osfpga/platform.py @@ -38,3 +38,6 @@ class OSFPGAPlatform(GenericPlatform): def add_period_constraint(self, clk, period): if clk is None: return self.toolchain.add_period_constraint(self, clk, period) + + def add_false_path_constraint(self, from_, to): + pass # FIXME: Implement.