From: whitequark Date: Fri, 13 Nov 2020 05:44:16 +0000 (+0000) Subject: vendor.quicklogic: write OpenOCD scripts as part of build process. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b352787e3893c06621e25e2f00152e792b29c25c;p=nmigen.git vendor.quicklogic: write OpenOCD scripts as part of build process. The OpenOCD scripts for EOS-S3 are roughly equivalent to SVF files for a more traditional FPGA, which we also produce, for some common "default" configuration, as a part of the build process. --- diff --git a/nmigen/vendor/quicklogic.py b/nmigen/vendor/quicklogic.py index 6e9c63c..bc7f9a2 100644 --- a/nmigen/vendor/quicklogic.py +++ b/nmigen/vendor/quicklogic.py @@ -42,7 +42,8 @@ class QuicklogicPlatform(TemplatedPlatform): "symbiflow_place", "symbiflow_route", "symbiflow_write_fasm", - "symbiflow_write_bitstream" + "symbiflow_write_bitstream", + "symbiflow_write_openocd", ] file_templates = { **TemplatedPlatform.build_script_templates, @@ -121,14 +122,18 @@ class QuicklogicPlatform(TemplatedPlatform): -d {{platform.device}} -P {{platform.package}} -b {{name}}.bit - """ + """, + # This should be `invoke_tool("symbiflow_write_openocd")`, but isn't because of a bug in + # the QLSymbiflow v1.3.0 toolchain release. + r""" + python3 -m quicklogic_fasm.bitstream_to_openocd + {{name}}.bit + {{name}}.openocd + """, ] # Common logic - def __init__(self): - super().__init__() - def add_clock_constraint(self, clock, frequency): super().add_clock_constraint(clock, frequency) clock.attrs["keep"] = "TRUE"