File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ def _synthesize_design_impl(ctx):
160
160
"LIBERTY" : default_liberty_file ,
161
161
"OUTPUT" : output_file ,
162
162
"STANDARD_CELL_BLACK_BOX" : standard_cell_black_box ,
163
+ "SYNTH_ADDITIONAL_ARGS" : ctx .attr .synth_additional_args ,
163
164
"TOP" : ctx .attr .top_module ,
164
165
"UHDM_FLIST" : uhdm_flist ,
165
166
}
@@ -385,6 +386,11 @@ synthesize_rtl = rule(
385
386
providers = [StandardCellInfo ],
386
387
default = "@com_google_skywater_pdk_sky130_fd_sc_hd//:sky130_fd_sc_hd" ,
387
388
),
389
+ "synth_additional_args" : attr .string (
390
+ mandatory = False ,
391
+ doc = "Additional args for the Yosys synth pass" ,
392
+ default = "" ,
393
+ ),
388
394
"synth_tcl" : attr .label (
389
395
default = Label ("//synthesis:synth.tcl" ),
390
396
allow_single_file = True ,
Original file line number Diff line number Diff line change 10
10
# OUTPUT = verilog file for synthesis output
11
11
# STATS_JSON = json file for structured stats output
12
12
# EARLY_TECHMAP = verilog/system verilog file for early techmap process
13
+ # SYNTH_ADDITIONAL_ARGS = Additional args for the Yosys synth pass
13
14
14
15
yosys -import
15
16
@@ -79,7 +80,12 @@ yosys delete {*/t:$print}
79
80
# pass.
80
81
yosys opt_clean -purge
81
82
82
- yosys synth -top $top -noshare
83
+ set synth_args " -noshare"
84
+ if { [info exists ::env(SYNTH_ADDITIONAL_ARGS)] && ![string equal $::env(SYNTH_ADDITIONAL_ARGS) " " ] } {
85
+ set synth_args " $synth_args $::env(SYNTH_ADDITIONAL_ARGS) "
86
+ }
87
+
88
+ yosys synth -top $top {*}$synth_args
83
89
84
90
# Remove internal only aliases for public nets and then give created instances
85
91
# useful names. At this stage it is all the other synthesizable constructs.
You can’t perform that action at this time.
0 commit comments