From bfd4538df0710703ee845c0747f5c4e05854013d Mon Sep 17 00:00:00 2001 From: whitequark Date: Thu, 10 Oct 2019 16:25:10 +0000 Subject: [PATCH] xilinx_7series: add grade platform property. For some devices grade has to be omitted, so it is optional. --- nmigen/vendor/xilinx_7series.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nmigen/vendor/xilinx_7series.py b/nmigen/vendor/xilinx_7series.py index d26c438..e94f8d2 100644 --- a/nmigen/vendor/xilinx_7series.py +++ b/nmigen/vendor/xilinx_7series.py @@ -50,12 +50,12 @@ class Xilinx7SeriesPlatform(TemplatedPlatform): device = abstractproperty() package = abstractproperty() speed = abstractproperty() + grade = None required_tools = [ "yosys", "vivado" ] - file_templates = { **TemplatedPlatform.build_script_templates, "build_{{name}}.sh": r""" @@ -75,7 +75,7 @@ class Xilinx7SeriesPlatform(TemplatedPlatform): """, "{{name}}.tcl": r""" # {{autogenerated}} - create_project -force -name {{name}} -part {{platform.device}}{{platform.package}}-{{platform.speed}} + create_project -force -name {{name}} -part {{platform.device}}{{platform.package}}-{{platform.speed}}{{"-" + platform.grade if platform.grade else ""}} {% for file in platform.iter_extra_files(".v", ".sv", ".vhd", ".vhdl") -%} add_files {{file}} {% endfor %} -- 2.30.2