build/generic_platform, generic_toolchain, yosys_nextpnr_wrapper: introduce the information about ability to do synthesis with mixed languages

This commit is contained in:
Gwenhael Goavec-Merou 2022-09-23 18:43:22 +02:00
parent b8e22fcd79
commit 759530f272
3 changed files with 13 additions and 0 deletions

View File

@ -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

View File

@ -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.

View File

@ -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 = ""