Allow "device" to be specified in yaml

Otherwise we don't get the DDROutput overrides and the standalone
core fails to generate when using GMII_MII

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Benjamin Herrenschmidt 2021-09-22 22:27:07 +10:00
parent cccc0c720a
commit 9b3837e636
1 changed files with 4 additions and 2 deletions

View File

@ -318,10 +318,12 @@ def main():
core_config[k] = int(float(core_config[k]))
# Generate core --------------------------------------------------------------------------------
if "device" not in core_config:
core_config["device"] = ""
if core_config["vendor"] == "lattice":
platform = LatticePlatform("", io=[], toolchain="diamond")
platform = LatticePlatform(core_config["device"], io=[], toolchain="diamond")
elif core_config["vendor"] == "xilinx":
platform = XilinxPlatform("", io=[], toolchain="vivado")
platform = XilinxPlatform(core_config["device"], io=[], toolchain="vivado")
else:
raise ValueError("Unsupported vendor: {}".format(core_config["vendor"]))
platform.add_extension(_io)