// ==================================================================
-VerificImporter::VerificImporter(bool mode_gates, bool mode_keep, bool mode_nosva, bool mode_names) :
+VerificImporter::VerificImporter(bool mode_gates, bool mode_keep, bool mode_nosva, bool mode_names, bool mode_verific) :
mode_gates(mode_gates), mode_keep(mode_keep), mode_nosva(mode_nosva),
- mode_names(mode_names)
+ mode_names(mode_names), mode_verific(mode_verific)
{
}
if (verific_verbose)
log(" importing cell %s (%s) as %s.\n", inst->Name(), inst->View()->Owner()->Name(), log_id(inst_name));
+ if (mode_verific)
+ goto import_verific_cells;
+
if (inst->Type() == PRIM_PWR) {
module->connect(net_map_at(inst->GetOutput()), RTLIL::State::S1);
continue;
log_warning("Unsupported Verific primitive %s of type %s\n", inst->Name(), inst->View()->Owner()->Name());
}
+ import_verific_cells:
nl_todo.insert(inst->View());
RTLIL::Cell *cell = module->addCell(inst_name, inst->IsOperator() ?
log(" This will also add all SVA related cells to the design parallel to\n");
log(" the checker logic inferred by it.\n");
log("\n");
+ log(" -V\n");
+ log(" Import Verific netlist as-is without translating to Yosys cell types. \n");
+ log("\n");
log(" -nosva\n");
log(" Ignore SVA properties, do not infer checker logic.\n");
log("\n");
{
std::set<Netlist*> nl_todo, nl_done;
bool mode_all = false, mode_gates = false, mode_keep = false;
- bool mode_nosva = false, mode_names = false;
+ bool mode_nosva = false, mode_names = false, mode_verific = false;
bool flatten = false, extnets = false;
string dumpfile;
mode_names = true;
continue;
}
+ if (args[argidx] == "-V") {
+ mode_verific = true;
+ continue;
+ }
if (args[argidx] == "-v") {
verific_verbose = 1;
continue;
while (!nl_todo.empty()) {
Netlist *nl = *nl_todo.begin();
if (nl_done.count(nl) == 0) {
- VerificImporter importer(mode_gates, mode_keep, mode_nosva, mode_names);
+ VerificImporter importer(mode_gates, mode_keep, mode_nosva,
+ mode_names, mode_verific);
importer.import_netlist(design, nl, nl_todo);
}
nl_todo.erase(nl);
std::map<Verific::Net*, RTLIL::SigBit> net_map;
std::map<Verific::Net*, Verific::Net*> sva_posedge_map;
- bool mode_gates, mode_keep, mode_nosva, mode_names;
+ bool mode_gates, mode_keep, mode_nosva, mode_names, mode_verific;
- VerificImporter(bool mode_gates, bool mode_keep, bool mode_nosva, bool mode_names);
+ VerificImporter(bool mode_gates, bool mode_keep, bool mode_nosva, bool mode_names, bool mode_verific);
RTLIL::SigBit net_map_at(Verific::Net *net);