diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-05-02 17:40:39 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-05-02 17:40:39 -0700 |
commit | aa081f83c791b1d666214776aaf744a80ce6a690 (patch) | |
tree | e518dbed1559fc64bf22323614478c9e73e9bef3 /passes | |
parent | 98925f6c4be611434e75f0ccf645a7ef8adcfc63 (diff) | |
download | yosys-aa081f83c791b1d666214776aaf744a80ce6a690.tar.gz yosys-aa081f83c791b1d666214776aaf744a80ce6a690.tar.bz2 yosys-aa081f83c791b1d666214776aaf744a80ce6a690.zip |
dffinit -noreinit to silently continue when init value is 1'bx
Diffstat (limited to 'passes')
-rw-r--r-- | passes/techmap/dffinit.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/passes/techmap/dffinit.cc b/passes/techmap/dffinit.cc index 48390488e..37479da65 100644 --- a/passes/techmap/dffinit.cc +++ b/passes/techmap/dffinit.cc @@ -135,10 +135,18 @@ struct DffinitPass : public Pass { continue; while (GetSize(value.bits) <= i) value.bits.push_back(State::S0); - if (noreinit && value.bits[i] != State::Sx && value.bits[i] != init_bits.at(sig[i])) - log_error("Trying to assign a different init value for %s.%s.%s which technically " - "have a conflicted init value.\n", - log_id(module), log_id(cell), log_id(it.second)); + if (noreinit && value.bits[i] != State::Sx && value.bits[i] != init_bits.at(sig[i])) { + if (init_bits.at(sig[i]) != State::Sx) { + log_error("Trying to assign a different init value for %s.%s.%s which technically " + "have a conflicted init value.\n", + log_id(module), log_id(cell), log_id(it.second)); + } + else { + // Trying to overwrite an existing INIT value with 1'bx, + // silently ignore? + continue; + } + } value.bits[i] = init_bits.at(sig[i]); cleanup_bits.insert(sig[i]); } |