Added handling of unconnected/unspecified signals to eval -vloghammer_report
authorClifford Wolf <clifford@clifford.at>
Wed, 6 Nov 2013 21:42:07 +0000 (22:42 +0100)
committerClifford Wolf <clifford@clifford.at>
Wed, 6 Nov 2013 21:42:07 +0000 (22:42 +0100)
passes/sat/eval.cc

index 26b571e29dc7b4300690d8cfaf6cd57dbddc964b..d805b3c84d6c6a71565209675239959442797f97 100644 (file)
@@ -177,8 +177,12 @@ struct VlogHammerReporter
                                RTLIL::SigSpec sig(module->wires.at("\\y"));
                                RTLIL::SigSpec undef;
 
-                               if (!ce.eval(sig, undef))
-                                       log_error("Evaluation of y in module %s failed: sig=%s, undef=%s\n", RTLIL::id2cstr(module->name), log_signal(sig), log_signal(undef));
+                               while (!ce.eval(sig, undef)) {
+                                       // log_error("Evaluation of y in module %s failed: sig=%s, undef=%s\n", RTLIL::id2cstr(module->name), log_signal(sig), log_signal(undef));
+                                       log("Warning: Setting signal %s in module %s to undef.\n", log_signal(undef), RTLIL::id2cstr(module->name));
+                                       ce.set(undef, RTLIL::Const(RTLIL::State::Sx, undef.width));
+                               }
+
                                log("++VAL++ %d %s %s #\n", idx, module_name.c_str(), sig.as_const().as_string().c_str());
 
                                if (module_name == "rtl") {