From 759530f272500bc7d5ab24bdaee1dfac801205f5 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Fri, 23 Sep 2022 18:43:22 +0200 Subject: [PATCH] build/generic_platform, generic_toolchain, yosys_nextpnr_wrapper: introduce the information about ability to do synthesis with mixed languages --- litex/build/generic_platform.py | 5 +++++ litex/build/generic_toolchain.py | 5 +++++ litex/build/yosys_nextpnr_toolchain.py | 3 +++ 3 files changed, 13 insertions(+) diff --git a/litex/build/generic_platform.py b/litex/build/generic_platform.py index c327b9f6a..0826e4a28 100644 --- a/litex/build/generic_platform.py +++ b/litex/build/generic_platform.py @@ -323,6 +323,7 @@ class ConstraintManager: class GenericPlatform: def __init__(self, device, io, connectors=[], name=None): + self.toolchain = None self.device = device self.constraint_manager = ConstraintManager(io, connectors) if name is None: @@ -462,3 +463,7 @@ class GenericPlatform: def create_programmer(self): raise NotImplementedError + + @property + def support_mixed_language(self): + return self.toolchain.support_mixed_language diff --git a/litex/build/generic_toolchain.py b/litex/build/generic_toolchain.py index 08c6c2144..998f66576 100644 --- a/litex/build/generic_toolchain.py +++ b/litex/build/generic_toolchain.py @@ -18,6 +18,7 @@ class GenericToolchain: } supported_build_backend = ["litex"] + _support_mixed_language = True def __init__(self): self.clocks = dict() @@ -27,6 +28,10 @@ class GenericToolchain: self._vns = None self._synth_opts = "" + @property + def support_mixed_language(self): + return self._support_mixed_language + def finalize(self): pass # Pass since optional. diff --git a/litex/build/yosys_nextpnr_toolchain.py b/litex/build/yosys_nextpnr_toolchain.py index 04fc3a65b..e875bf3e0 100644 --- a/litex/build/yosys_nextpnr_toolchain.py +++ b/litex/build/yosys_nextpnr_toolchain.py @@ -57,10 +57,13 @@ class YosysNextPNRToolchain(GenericToolchain): target package (optional/target dependant) _speed_grade: str target speed grade (optional/target dependant) + _support_mixed_language: bool + informs if toolchain is able to use only verilog or verilog + vhdl """ attr_translate = { "keep": ("keep", "true"), } + _support_mixed_language = False family = "" synth_fmt = ""