diff options
author | David Shah <dave@ds0.me> | 2020-03-09 14:34:22 +0000 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2020-03-09 14:34:22 +0000 |
commit | b8abf143767c2f8c635de1352bb43ed37e781f96 (patch) | |
tree | e105da63a30ed88e010f947cae8ec5a2da790a54 /kernel | |
parent | 282d331e7e5783214eb4bc9b2e667f0d67ddc5fe (diff) | |
download | yosys-b8abf143767c2f8c635de1352bb43ed37e781f96.tar.gz yosys-b8abf143767c2f8c635de1352bb43ed37e781f96.tar.bz2 yosys-b8abf143767c2f8c635de1352bb43ed37e781f96.zip |
Add ScriptPass::run_nocheck and use for abc9
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/register.cc | 12 | ||||
-rw-r--r-- | kernel/register.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/kernel/register.cc b/kernel/register.cc index e59d59654..af8c1b8e8 100644 --- a/kernel/register.cc +++ b/kernel/register.cc @@ -400,6 +400,18 @@ void ScriptPass::run(std::string command, std::string info) } } +void ScriptPass::run_nocheck(std::string command, std::string info) +{ + if (active_design == nullptr) { + if (info.empty()) + log(" %s\n", command.c_str()); + else + log(" %s %s\n", command.c_str(), info.c_str()); + } else { + Pass::call(active_design, command); + } +} + void ScriptPass::run_script(RTLIL::Design *design, std::string run_from, std::string run_to) { help_mode = false; diff --git a/kernel/register.h b/kernel/register.h index 4622845b6..3d89386b7 100644 --- a/kernel/register.h +++ b/kernel/register.h @@ -84,6 +84,7 @@ struct ScriptPass : Pass bool check_label(std::string label, std::string info = std::string()); void run(std::string command, std::string info = std::string()); + void run_nocheck(std::string command, std::string info = std::string()); void run_script(RTLIL::Design *design, std::string run_from = std::string(), std::string run_to = std::string()); void help_script(); }; |