aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2020-04-14 12:35:12 -0700
committerEddie Hung <eddie@fpgeh.com>2020-05-14 10:33:56 -0700
commit8bad885e782181837c710f738f6184bd473d88ae (patch)
treec14d14829a84409a4789364f3da73a19c64de96a
parent489e83fc1ea7051cc400b043f75ce1ad359038f0 (diff)
downloadyosys-8bad885e782181837c710f738f6184bd473d88ae.tar.gz
yosys-8bad885e782181837c710f738f6184bd473d88ae.tar.bz2
yosys-8bad885e782181837c710f738f6184bd473d88ae.zip
abc9_ops: -prep_dff_map to check $_DFF_[NP]_.Q drives module output
-rw-r--r--passes/techmap/abc9_ops.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/passes/techmap/abc9_ops.cc b/passes/techmap/abc9_ops.cc
index d15da348a..2f1b531e2 100644
--- a/passes/techmap/abc9_ops.cc
+++ b/passes/techmap/abc9_ops.cc
@@ -175,6 +175,10 @@ void prep_dff_map(RTLIL::Design *design)
// because ABC9 doesn't support them
Q = cell->getPort(ID::Q);
log_assert(GetSize(Q.wire) == 1);
+
+ if (!Q.wire->port_output)
+ log_error("Module '%s' contains a %s cell where its 'Q' port does not drive a module output!\n", log_id(module), log_id(cell->type));
+
Const init = Q.wire->attributes.at(ID::init, State::Sx);
log_assert(GetSize(init) == 1);
if (init != State::S0) {
@@ -1207,7 +1211,7 @@ struct Abc9OpsPass : public Pass {
log(" -prep_dff_unmap\n");
log(" fill in previously created '$abc9_unmap' design to contain techmap rules\n");
log(" for mapping *_$abc9_flop cells back into their original (* abc9_flop *)\n");
- log(" cells(including their original parameters).\n");
+ log(" cells (including their original parameters).\n");
log("\n");
log(" -prep_delays\n");
log(" insert `$__ABC9_DELAY' blackbox cells into the design to account for\n");