mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-19 04:13:39 +00:00
Update dff2dffe, dff2dffs, zinit to new FF types.
This commit is contained in:
parent
e71d827590
commit
88e7f90663
21 changed files with 267 additions and 237 deletions
|
@ -31,7 +31,7 @@ struct Dff2dffsPass : public Pass {
|
|||
log("\n");
|
||||
log(" dff2dffs [options] [selection]\n");
|
||||
log("\n");
|
||||
log("Merge synchronous set/reset $_MUX_ cells to create $__DFFS_[NP][NP][01], to be run before\n");
|
||||
log("Merge synchronous set/reset $_MUX_ cells to create $_SDFF_[NP][NP][01]_, to be run before\n");
|
||||
log("dff2dffe for SR over CE priority.\n");
|
||||
log("\n");
|
||||
log(" -match-init\n");
|
||||
|
@ -138,21 +138,21 @@ struct Dff2dffsPass : public Pass {
|
|||
|
||||
if (sr_val == State::S1) {
|
||||
if (cell->type == ID($_DFF_N_)) {
|
||||
if (invert_sr) cell->type = ID($__DFFS_NN1_);
|
||||
else cell->type = ID($__DFFS_NP1_);
|
||||
if (invert_sr) cell->type = ID($_SDFF_NN1_);
|
||||
else cell->type = ID($_SDFF_NP1_);
|
||||
} else {
|
||||
log_assert(cell->type == ID($_DFF_P_));
|
||||
if (invert_sr) cell->type = ID($__DFFS_PN1_);
|
||||
else cell->type = ID($__DFFS_PP1_);
|
||||
if (invert_sr) cell->type = ID($_SDFF_PN1_);
|
||||
else cell->type = ID($_SDFF_PP1_);
|
||||
}
|
||||
} else {
|
||||
if (cell->type == ID($_DFF_N_)) {
|
||||
if (invert_sr) cell->type = ID($__DFFS_NN0_);
|
||||
else cell->type = ID($__DFFS_NP0_);
|
||||
if (invert_sr) cell->type = ID($_SDFF_NN0_);
|
||||
else cell->type = ID($_SDFF_NP0_);
|
||||
} else {
|
||||
log_assert(cell->type == ID($_DFF_P_));
|
||||
if (invert_sr) cell->type = ID($__DFFS_PN0_);
|
||||
else cell->type = ID($__DFFS_PP0_);
|
||||
if (invert_sr) cell->type = ID($_SDFF_PN0_);
|
||||
else cell->type = ID($_SDFF_PP0_);
|
||||
}
|
||||
}
|
||||
cell->setPort(ID::R, sr_sig);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue