ifeq ($(ENABLE_VERIFIC),1)
VERIFIC_DIR ?= /usr/local/src/verific_lib
-VERIFIC_COMPONENTS ?= verilog vhdl database util containers hier_tree
+VERIFIC_COMPONENTS ?= verilog vhdl database util containers hier_tree extensions
CXXFLAGS += $(patsubst %,-I$(VERIFIC_DIR)/%,$(VERIFIC_COMPONENTS)) -DYOSYS_ENABLE_VERIFIC
ifeq ($(OS), Darwin)
LDLIBS += $(patsubst %,$(VERIFIC_DIR)/%/*-mac.a,$(VERIFIC_COMPONENTS)) -lz
#include "VhdlUnits.h"
#include "VeriLibrary.h"
-#if defined(YOSYSHQ_VERIFIC_INITSTATE) || defined(YOSYSHQ_VERIFIC_TEMPLATES) || defined(YOSYSHQ_VERIFIC_FORMALAPPS)
-#include "VeriExtensions.h"
-#endif
+#include "InitialAssertions.h"
#ifndef YOSYSHQ_VERIFIC_API_VERSION
# error "Only YosysHQ flavored Verific is supported. Please contact office@yosyshq.com for commercial support for Yosys+Verific."
#endif
-#if YOSYSHQ_VERIFIC_API_VERSION < 20210103
+#if YOSYSHQ_VERIFIC_API_VERSION < 20210602
# error "Please update your version of YosysHQ flavored Verific."
#endif
continue;
}
-#ifdef YOSYSHQ_VERIFIC_INITSTATE
if (inst->Type() == PRIM_YOSYSHQ_INITSTATE)
{
+ if (verific_verbose)
+ log(" adding YosysHQ init state\n");
SigBit initstate = module->Initstate(new_verific_id(inst));
SigBit sig_o = net_map_at(inst->GetOutput());
module->connect(sig_o, initstate);
if (!mode_keep)
continue;
}
-#endif
+
if (!mode_keep && verific_sva_prims.count(inst->Type())) {
if (verific_verbose)
log(" skipping SVA cell in non k-mode\n");
for (const auto &i : parameters)
verific_params.Insert(i.first.c_str(), i.second.c_str());
-#ifdef YOSYSHQ_VERIFIC_INITSTATE
- InitialAssertionRewriter rw;
- rw.RegisterCallBack();
-#endif
+ InitialAssertions::Rewrite("work");
+
if (top.empty()) {
netlists = hier_tree::ElaborateAll(&veri_libs, &vhdl_libs, &verific_params);
}
std::set<std::string> top_mod_names;
-#ifdef YOSYSHQ_VERIFIC_INITSTATE
- InitialAssertionRewriter rw;
- rw.RegisterCallBack();
-#endif
+ InitialAssertions::Rewrite(work);
+
if (mode_all)
{
log("Running hier_tree::ElaborateAll().\n");