Module *module;
const SigMap &sigmap;
bool verbose = false;
+ bool initialized = false;
pool<SigBit> init_ones;
dict<SigSpec, pool<SigSpec>> sig_sources_db;
void initialize()
{
+ log_assert(!initialized);
+ initialized = true;
+
for (auto wire : module->wires())
{
auto it = wire->attributes.find("\\init");
if (verbose)
log("** ONEHOT QUERY START (%s)\n", log_signal(sig));
+ if (!initialized)
+ initialize();
+
query_worker(sig, retval, cache, 3);
if (verbose)
OnehotDatabase onehot_db(module, sigmap);
onehot_db.verbose = verbose_onehot;
- if (optimize_onehot)
- onehot_db.initialize();
-
dict<SigBit, pair<SigSpec, Const>> eqdb;
for (auto cell : module->cells())
SigMap sigmap(module);
OnehotDatabase onehot_db(module, sigmap);
onehot_db.verbose = verbose_onehot;
- onehot_db.initialize();
for (auto cell : module->selected_cells())
{