From 36bc1d2b4d1da0344764c99b9f6cddf21eeec1b3 Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 13 Nov 2020 05:44:16 +0000 Subject: [PATCH] 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. --- nmigen/vendor/quicklogic.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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" -- 2.30.2