Improve handling of verific primitives in "verific -import -V" mode
authorClifford Wolf <clifford@clifford.at>
Fri, 22 Nov 2019 15:00:07 +0000 (16:00 +0100)
committerClifford Wolf <clifford@clifford.at>
Fri, 22 Nov 2019 15:00:07 +0000 (16:00 +0100)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
frontends/verific/verific.cc

index de41e1a5c084561365130943230c07fbf4ad4593..843e7b9b4a32820b190aace2fc3a99040fd42de0 100644 (file)
@@ -789,7 +789,7 @@ void VerificImporter::import_netlist(RTLIL::Design *design, Netlist *nl, std::se
        std::string netlist_name = nl->GetAtt(" \\top") ? nl->CellBaseName() : nl->Owner()->Name();
        std::string module_name = netlist_name;
 
-       if (nl->IsOperator()) {
+       if (nl->IsOperator() || nl->IsPrimitive()) {
                module_name = "$verific$" + module_name;
        } else {
                if (!norename && *nl->Name()) {
@@ -1409,7 +1409,7 @@ void VerificImporter::import_netlist(RTLIL::Design *design, Netlist *nl, std::se
 
                std::string inst_type = inst->View()->Owner()->Name();
 
-               if (inst->View()->IsOperator()) {
+               if (inst->View()->IsOperator() || inst->View()->IsPrimitive()) {
                        inst_type = "$verific$" + inst_type;
                } else {
                        if (*inst->View()->Name()) {