diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2022-04-02 10:34:11 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2022-04-02 19:13:15 +0200 |
commit | 2c96ecc5f7d88cfd8dbddc3e5f45fb0a2a9bb6d3 (patch) | |
tree | 9a56219729b9d7ea0f841444ef1a527c428a136d | |
parent | b54aecd80a58dc2a7f5069ee03561d64efdba765 (diff) | |
download | yosys-2c96ecc5f7d88cfd8dbddc3e5f45fb0a2a9bb6d3.tar.gz yosys-2c96ecc5f7d88cfd8dbddc3e5f45fb0a2a9bb6d3.tar.bz2 yosys-2c96ecc5f7d88cfd8dbddc3e5f45fb0a2a9bb6d3.zip |
setInitState can be only one altering values
-rw-r--r-- | passes/sat/sim.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/passes/sat/sim.cc b/passes/sat/sim.cc index d74fbcc4e..3fb49bbf7 100644 --- a/passes/sat/sim.cc +++ b/passes/sat/sim.cc @@ -778,8 +778,9 @@ struct SimInstance child.second->register_output_step_values(data); } - void setInitState() + bool setInitState() { + bool did_something = false; for (auto &it : ff_database) { ff_state_t &ff = it.second; @@ -792,12 +793,13 @@ struct SimInstance if (id!=0) { Const fst_val = Const::from_string(shared->fst->valueOf(id)); ff.past_d = fst_val; - set_state(qsig, fst_val); + did_something = set_state(qsig, fst_val); } } } for (auto child : children) - child.second->setInitState(); + did_something |= child.second->setInitState(); + return did_something; } void setState(dict<int, std::pair<SigBit,bool>> bits, std::string values) @@ -1112,7 +1114,7 @@ struct SimWorker : SimShared } if (initial) { - top->setInitState(); + did_something |= top->setInitState(); initial = false; } if (did_something) |