Skip to content

Commit b5d8c06

Browse files
authored
Merge pull request #388 from hdl/ericastor-patch-1
Add support for Yosys's `--autoidx` and `--hash-seed` flags
2 parents 11fc268 + 7ff2d41 commit b5d8c06

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

synthesis/build_defs.bzl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ def _synthesize_design_impl(ctx):
132132
args.add_all("-c", [synth_tcl]) # run synthesis tcl script
133133
if ctx.attr.extra_tcl_command:
134134
args.add("-p", ctx.attr.extra_tcl_command)
135+
if ctx.attr.autoidx_seed:
136+
args.add("--autoidx", ctx.attr.autoidx_seed)
137+
if ctx.attr.hash_seed:
138+
args.add("--hash-seed", ctx.attr.hash_seed)
135139

136140
dont_use_args = ""
137141
or_config = ctx.attr.standard_cells[StandardCellInfo].open_road_configuration
@@ -346,12 +350,20 @@ synthesize_rtl = rule(
346350
allow_single_file = True,
347351
doc = "Verilog file that maps yosys adder to PDK adders.",
348352
),
353+
"autoidx_seed": attr.int(
354+
mandatory = False,
355+
doc = "Controls the starting point for the autoidx pass; introduces additional variability into the synthesis logic.",
356+
),
349357
"deps": attr.label_list(
350358
providers = [[VerilogInfo], [UhdmInfo]],
351359
),
352360
"extra_tcl_command": attr.string(
353361
default = "",
354362
),
363+
"hash_seed": attr.int(
364+
mandatory = False,
365+
doc = "Salts the hashes used in Yosys for (e.g.) iteration order; introduces additional variability into the synthesis logic.",
366+
),
355367
"output_file_name": attr.string(
356368
doc = "The output file name.",
357369
),

0 commit comments

Comments
 (0)