aboutsummaryrefslogtreecommitdiffstats
path: root/passes
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-12-11 12:17:01 -0800
committerEddie Hung <eddie@fpgeh.com>2020-04-13 13:45:18 -0700
commit4617aa8ccd138d80c1f68b35019a8afdbeb30c9f (patch)
tree28bf3f83728149a951886d980ed77348e1be8689 /passes
parent3c5a9411b1c17d9e4474fb7edb54117c2298cfc1 (diff)
downloadyosys-4617aa8ccd138d80c1f68b35019a8afdbeb30c9f.tar.gz
yosys-4617aa8ccd138d80c1f68b35019a8afdbeb30c9f.tar.bz2
yosys-4617aa8ccd138d80c1f68b35019a8afdbeb30c9f.zip
zinit to transform set/reset value of $_DFF_[NP][NP][01]_
Diffstat (limited to 'passes')
-rw-r--r--passes/techmap/zinit.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/passes/techmap/zinit.cc b/passes/techmap/zinit.cc
index 5cfc82ac9..f982dbb30 100644
--- a/passes/techmap/zinit.cc
+++ b/passes/techmap/zinit.cc
@@ -139,6 +139,20 @@ struct ZinitPass : public Pass {
cell->setPort(ID::D, sig_d);
cell->setPort(ID::Q, initwire);
+
+ /*if (cell->type.in(ID($_DFFSR_NNN_), ID($_DFFSR_NNP_), ID($_DFFSR_NPN_), ID($_DFFSR_NPP_),
+ ID($_DFFSR_PNN_), ID($_DFFSR_PNP_), ID($_DFFSR_PPN_), ID($_DFFSR_PPP_)))
+ {
+ // TODO: I think I need a $_DFFRS_* cell where R has priority over S...
+ std::swap(cell->connections_.at(ID(R)), cell->connections_.at(ID(S)));
+ }
+ else*/ if (cell->type.in(ID($_DFF_NN0_), ID($_DFF_NN1_), ID($_DFF_NP0_), ID($_DFF_NP1_),
+ ID($_DFF_PN0_), ID($_DFF_PN1_), ID($_DFF_PP0_), ID($_DFF_PP1_)))
+ {
+ std::string t = cell->type.str();
+ t[8] = (t[8] == '0' ? '1' : '0');
+ cell->type = t;
+ }
}
if (!design->selected_whole_module(module))