Fix handling of $global_clocking in Verific
authorClifford Wolf <clifford@clifford.at>
Fri, 6 Apr 2018 19:23:47 +0000 (21:23 +0200)
committerClifford Wolf <clifford@clifford.at>
Fri, 6 Apr 2018 19:23:47 +0000 (21:23 +0200)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
frontends/verific/verific.cc

index 25af54e036ad93e1cc7e17c1e26c77ecfa47b9e2..8e76d894903a3a34ea26138bb6f76b6434af7c4f 100644 (file)
@@ -123,8 +123,11 @@ void VerificImporter::import_attributes(dict<RTLIL::IdString, RTLIL::Const> &att
                attributes["\\src"] = stringf("%s:%d", LineFile::GetFileName(obj->Linefile()), LineFile::GetLineNo(obj->Linefile()));
 
        // FIXME: Parse numeric attributes
-       FOREACH_ATTRIBUTE(obj, mi, attr)
+       FOREACH_ATTRIBUTE(obj, mi, attr) {
+               if (attr->Key()[0] == ' ' || attr->Value() == nullptr)
+                       continue;
                attributes[RTLIL::escape_id(attr->Key())] = RTLIL::Const(std::string(attr->Value()));
+       }
 }
 
 RTLIL::SigSpec VerificImporter::operatorInput(Instance *inst)
@@ -1955,6 +1958,9 @@ struct VerificPass : public Pass {
 #endif
                        }
 
+                       if (!verific_error_msg.empty())
+                               goto check_error;
+
                        if (flatten) {
                                for (auto nl : nl_todo)
                                        nl->Flatten();