From 77616837e8ddaa4ed31d4bccb289ff3feba2acf6 Mon Sep 17 00:00:00 2001 From: Mariusz Glebocki Date: Mon, 24 Aug 2020 13:03:59 +0200 Subject: [PATCH] vendor.xilinx_7series: add `_part` property getter --- nmigen/vendor/xilinx_7series.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nmigen/vendor/xilinx_7series.py b/nmigen/vendor/xilinx_7series.py index 1716b91..e923e03 100644 --- a/nmigen/vendor/xilinx_7series.py +++ b/nmigen/vendor/xilinx_7series.py @@ -52,6 +52,10 @@ class Xilinx7SeriesPlatform(TemplatedPlatform): package = abstractproperty() speed = abstractproperty() + @property + def _part(self): + return "{}{}-{}".format(self.device, self.package, self.speed) + required_tools = ["vivado"] file_templates = { **TemplatedPlatform.build_script_templates, @@ -72,7 +76,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._part}} {% for file in platform.iter_extra_files(".v", ".sv", ".vhd", ".vhdl") -%} add_files {{file|tcl_escape}} {% endfor %} -- 2.30.2