mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-14 04:48:46 +00:00
Updating initial state and checks
This commit is contained in:
parent
190e44f0da
commit
cbadfa0268
|
@ -1016,6 +1016,18 @@ struct SimWorker : SimShared
|
||||||
log_error("Stop time is before start time\n");
|
log_error("Stop time is before start time\n");
|
||||||
}
|
}
|
||||||
auto edges = fst->getAllEdges(fst_clock, startCount, stopCount);
|
auto edges = fst->getAllEdges(fst_clock, startCount, stopCount);
|
||||||
|
|
||||||
|
if ((startCount == stopCount) && writeback) {
|
||||||
|
log("Update initial state with values from %zu\n",startCount);
|
||||||
|
if (edges.empty())
|
||||||
|
edges.push_back(startCount);
|
||||||
|
fst->reconstructAllAtTimes(edges);
|
||||||
|
top->setInitState(startCount);
|
||||||
|
pool<Module*> wbmods;
|
||||||
|
top->writeback(wbmods);
|
||||||
|
} else {
|
||||||
|
if (edges.empty())
|
||||||
|
log_error("No clock edges found in given time range\n");
|
||||||
fst->reconstructAllAtTimes(edges);
|
fst->reconstructAllAtTimes(edges);
|
||||||
bool initial = false;
|
bool initial = false;
|
||||||
for(auto &time : edges) {
|
for(auto &time : edges) {
|
||||||
|
@ -1034,6 +1046,7 @@ struct SimWorker : SimShared
|
||||||
log_error("Signal difference at %zu\n", time);
|
log_error("Signal difference at %zu\n", time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SimPass : public Pass {
|
struct SimPass : public Pass {
|
||||||
|
|
Loading…
Reference in a new issue