check scratchpad variables for custom abc scripts
authorN. Engelhardt <nak@symbioticeda.com>
Fri, 13 Dec 2019 11:54:52 +0000 (12:54 +0100)
committerN. Engelhardt <nak@symbioticeda.com>
Fri, 13 Dec 2019 11:54:52 +0000 (12:54 +0100)
passes/techmap/abc.cc
passes/techmap/abc9.cc

index b29480e267edacc19fefbcef9955cd8eaef9b57d..9b156a2af6ea1e7feda95748542abc23b9194f46 100644 (file)
@@ -732,6 +732,8 @@ void abc_module(RTLIL::Design *design, RTLIL::Module *current_module, std::strin
                                        abc_script += script_file[i];
                } else
                        abc_script += stringf("source %s", script_file.c_str());
+       } else if (design->scratchpad.count("abc.script")) {
+               abc_script += design->scratchpad_get_string("abc.script");
        } else if (!lut_costs.empty()) {
                bool all_luts_cost_same = true;
                for (int this_cost : lut_costs)
index 8276c3c16f815dbf65b4dd0a182458693b2978d3..7fd235d6e352480214bc00de29d48bea7b378e80 100644 (file)
@@ -332,6 +332,8 @@ void abc9_module(RTLIL::Design *design, RTLIL::Module *current_module, std::stri
                                        abc9_script += script_file[i];
                } else
                        abc9_script += stringf("source %s", script_file.c_str());
+       } else if (design->scratchpad.count("abc9.script")) {
+               abc9_script += design->scratchpad_get_string("abc9.script");
        } else if (!lut_costs.empty() || !lut_file.empty()) {
                //bool all_luts_cost_same = true;
                //for (int this_cost : lut_costs)