mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 09:05:32 +00:00
Merge pull request #1177 from YosysHQ/clifford/async
Fix clk2fflogic adff reset semantic to negative hold time on reset
This commit is contained in:
commit
c66b4b9131
5 changed files with 135 additions and 8 deletions
|
@ -253,6 +253,13 @@ struct Clk2fflogicPass : public Pass {
|
|||
SigSpec qval = module->Mux(NEW_ID, past_q, past_d, clock_edge);
|
||||
Const rstval = cell->parameters["\\ARST_VALUE"];
|
||||
|
||||
Wire *past_arst = module->addWire(NEW_ID);
|
||||
module->addFf(NEW_ID, arst, past_arst);
|
||||
if (cell->parameters["\\ARST_POLARITY"].as_bool())
|
||||
arst = module->LogicOr(NEW_ID, arst, past_arst);
|
||||
else
|
||||
arst = module->LogicAnd(NEW_ID, arst, past_arst);
|
||||
|
||||
if (cell->parameters["\\ARST_POLARITY"].as_bool())
|
||||
module->addMux(NEW_ID, qval, rstval, arst, sig_q);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue