diff options
author | Eddie Hung <eddie@fpgeh.com> | 2020-01-07 13:08:59 -0800 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2020-01-08 10:52:08 -0800 |
commit | e230fd8afef6483d546cb38616e63b05d4d9b42a (patch) | |
tree | 992b372b5e21fb34c9a5e584c5329f02350d87d8 /passes | |
parent | a63e2508fcca395e795029d5c57c59acc63a9959 (diff) | |
download | yosys-e230fd8afef6483d546cb38616e63b05d4d9b42a.tar.gz yosys-e230fd8afef6483d546cb38616e63b05d4d9b42a.tar.bz2 yosys-e230fd8afef6483d546cb38616e63b05d4d9b42a.zip |
Fix {C} substitution
Diffstat (limited to 'passes')
-rw-r--r-- | passes/techmap/abc9.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/passes/techmap/abc9.cc b/passes/techmap/abc9.cc index 486b9313b..d03c24fdb 100644 --- a/passes/techmap/abc9.cc +++ b/passes/techmap/abc9.cc @@ -292,8 +292,11 @@ void abc9_module(RTLIL::Design *design, RTLIL::Module *module, std::string scrip for (size_t pos = abc9_script.find("{W}"); pos != std::string::npos; pos = abc9_script.find("{W}", pos)) abc9_script = abc9_script.substr(0, pos) + wire_delay + abc9_script.substr(pos+3); + std::string C; + if (design->scratchpad.count("abc9.if.C")) + C = "-C " + design->scratchpad_get_string("abc9.if.C"); for (size_t pos = abc9_script.find("{C}"); pos != std::string::npos; pos = abc9_script.find("{C}", pos)) - abc9_script = abc9_script.substr(0, pos) + design->scratchpad_get_string("abc9.if.C", "") + abc9_script.substr(pos+3); + abc9_script = abc9_script.substr(0, pos) + C + abc9_script.substr(pos+3); if (nomfs) for (size_t pos = abc9_script.find("&mfs"); pos != std::string::npos; pos = abc9_script.find("&mfs", pos)) |