Add hack for handling SVA labels via Verific
authorClifford Wolf <clifford@clifford.at>
Thu, 7 Mar 2019 18:52:44 +0000 (10:52 -0800)
committerClifford Wolf <clifford@clifford.at>
Thu, 7 Mar 2019 18:52:44 +0000 (10:52 -0800)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
frontends/verific/verificsva.cc

index 6681115dfa57cc8dc423e6b7c2efa0001883de99..8ea8372d3b13c89235bf2da6d08ed8a7c63a93e6 100644 (file)
@@ -1666,7 +1666,20 @@ struct VerificSvaImporter
                                log("  importing SVA property at root cell %s (%s) at %s:%d.\n", root->Name(), root->View()->Owner()->Name(),
                                                LineFile::GetFileName(root->Linefile()), LineFile::GetLineNo(root->Linefile()));
 
-                       RTLIL::IdString root_name = module->uniquify(importer->mode_names || root->IsUserDeclared() ? RTLIL::escape_id(root->Name()) : NEW_ID);
+                       bool is_user_declared = root->IsUserDeclared();
+
+                       // FIXME
+                       if (!is_user_declared) {
+                               const char *name = root->Name();
+                               for (int i = 0; name[i]; i++) {
+                                       if (i ? (name[i] < '0' || name[i] > '9') : (name[i] != 'i')) {
+                                               is_user_declared = true;
+                                               break;
+                                       }
+                               }
+                       }
+
+                       RTLIL::IdString root_name = module->uniquify(importer->mode_names || is_user_declared ? RTLIL::escape_id(root->Name()) : NEW_ID);
 
                        // parse SVA sequence into trigger signal