From a5b6c3cc191c2f18f52f45c1e34588a7bbe639b4 Mon Sep 17 00:00:00 2001 From: "Emil J. Tywoniak" Date: Fri, 14 Nov 2025 13:44:12 +0100 Subject: [PATCH] opensta, sdc_expand: more scratchpad --- techlibs/common/opensta.cc | 2 +- techlibs/common/sdc_expand.cc | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/techlibs/common/opensta.cc b/techlibs/common/opensta.cc index fbdf27304..6d793b3e1 100644 --- a/techlibs/common/opensta.cc +++ b/techlibs/common/opensta.cc @@ -39,7 +39,7 @@ struct OpenstaPass : public Pass string sdc_filename, sdc_expanded_filename; string tempdir_name, script_filename; string verilog_filename, liberty_filename; - bool cleanup = true; + bool cleanup = design->scratchpad_get_bool("opensta.cleanup", true); log_header(design, "Executing OPENSTA pass.\n"); log_push(); diff --git a/techlibs/common/sdc_expand.cc b/techlibs/common/sdc_expand.cc index 1b13923f0..cec5e8c1e 100644 --- a/techlibs/common/sdc_expand.cc +++ b/techlibs/common/sdc_expand.cc @@ -32,12 +32,13 @@ struct SdcExpandPass : public ScriptPass } string opensta_exe, sdc_filename, sdc_expanded_filename; - bool cleanup = true; + bool cleanup; void execute(std::vector args, RTLIL::Design *design) override { log_header(design, "Executing SDC_EXPAND pass.\n"); string run_from, run_to; - opensta_exe = "sta"; + opensta_exe = ""; + cleanup = design->scratchpad_get_bool("sdc_expand.cleanup", true); size_t argidx; for (argidx = 1; argidx < args.size(); argidx++) @@ -121,8 +122,11 @@ struct SdcExpandPass : public ScriptPass std::string liberty_path = tempdir_name + "/yosys.lib"; run("icell_liberty " + liberty_path); - std::string opensta_pass_call = "opensta -exe "; - opensta_pass_call += help_mode ? "" : opensta_exe; + std::string opensta_pass_call = "opensta "; + if (opensta_exe.length()) { + opensta_pass_call += "-exe "; + opensta_pass_call += help_mode ? "" : opensta_exe; + } opensta_pass_call += " -sdc-in "; opensta_pass_call += help_mode ? "" : sdc_filename; opensta_pass_call += " -sdc-out ";