Skip to content

Commit cce4e44

Browse files
committed
build.plat: allow removing src attributes from RTLIL output.
This is important for Glasgow, which uses RTLIL hash as cache key, and expects it to be stable between CI jobs.
1 parent c941667 commit cce4e44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

amaranth/build/plat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ def iter_clock_constraints(self):
303303
continue
304304
yield net_signal, port_signal, frequency
305305

306-
def toolchain_prepare(self, fragment, name, **kwargs):
306+
def toolchain_prepare(self, fragment, name, *, emit_src=True, **kwargs):
307307
# Restrict the name of the design to a strict alphanumeric character set. Platforms will
308308
# interpolate the name of the design in many different contexts: filesystem paths, Python
309309
# scripts, Tcl scripts, ad-hoc constraint files, and so on. It is not practical to add
@@ -319,7 +319,7 @@ def toolchain_prepare(self, fragment, name, **kwargs):
319319
# and to incorporate the Amaranth version into generated code.
320320
autogenerated = "Automatically generated by Amaranth {}. Do not edit.".format(__version__)
321321

322-
rtlil_text, self._name_map = rtlil.convert_fragment(fragment, name=name)
322+
rtlil_text, self._name_map = rtlil.convert_fragment(fragment, name=name, emit_src=emit_src)
323323

324324
# Retrieve an override specified in either the environment or as a kwarg.
325325
# expected_type parameter is used to assert the type of kwargs, passing `None` will disable

0 commit comments

Comments
 (0)