Skip to content

Commit

Permalink
Give don't use cells to Yosys.
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Ansell <[email protected]>
  • Loading branch information
mithro committed Sep 18, 2023
1 parent 3ba0ef0 commit b10f904
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions synthesis/build_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,19 @@ def _synthesize_design_impl(ctx):
args.add_all("-l", [log_file]) # put output in log file
args.add_all("-c", [synth_tcl]) # run synthesis tcl script

dont_use_args = ""
or_config = ctx.attr.standard_cells[StandardCellInfo].open_road_configuration
if or_config:
for dont_use_pattern in or_config.do_not_use_cell_list:
dont_use_args += " -dont_use {} ".format(dont_use_pattern)

script_env_files = {
"FLIST": verilog_flist,
"UHDM_FLIST": uhdm_flist,
"TOP": ctx.attr.top_module,
"OUTPUT": output_file,
"LIBERTY": default_liberty_file,
"DONT_USE_ARGS": dont_use_args,
}

if ctx.attr.target_clock_period_pico_seconds:
Expand Down
4 changes: 2 additions & 2 deletions synthesis/synth.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ set liberty $::env(LIBERTY)
dfflibmap -liberty $liberty

if { [info exists ::env(CLOCK_PERIOD) ] } {
abc -liberty $liberty -dff -g aig -D $::env(CLOCK_PERIOD)
abc -liberty $liberty -dff -g aig -D $::env(CLOCK_PERIOD) {*}$::env(DONT_USE_ARGS)
} else {
abc -liberty $liberty -dff -g aig
abc -liberty $liberty -dff -g aig {*}$::env(DONT_USE_ARGS)
}

# write synthesized design
Expand Down

0 comments on commit b10f904

Please sign in to comment.