Skip to content

Commit 36bc1d2

Browse files
committed
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.
1 parent d6da4c2 commit 36bc1d2

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

nmigen/vendor/quicklogic.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ class QuicklogicPlatform(TemplatedPlatform):
4242
"symbiflow_place",
4343
"symbiflow_route",
4444
"symbiflow_write_fasm",
45-
"symbiflow_write_bitstream"
45+
"symbiflow_write_bitstream",
46+
"symbiflow_write_openocd",
4647
]
4748
file_templates = {
4849
**TemplatedPlatform.build_script_templates,
@@ -121,14 +122,18 @@ class QuicklogicPlatform(TemplatedPlatform):
121122
-d {{platform.device}}
122123
-P {{platform.package}}
123124
-b {{name}}.bit
124-
"""
125+
""",
126+
# This should be `invoke_tool("symbiflow_write_openocd")`, but isn't because of a bug in
127+
# the QLSymbiflow v1.3.0 toolchain release.
128+
r"""
129+
python3 -m quicklogic_fasm.bitstream_to_openocd
130+
{{name}}.bit
131+
{{name}}.openocd
132+
""",
125133
]
126134

127135
# Common logic
128136

129-
def __init__(self):
130-
super().__init__()
131-
132137
def add_clock_constraint(self, clock, frequency):
133138
super().add_clock_constraint(clock, frequency)
134139
clock.attrs["keep"] = "TRUE"

0 commit comments

Comments
 (0)