diff options
author | David Shah <dave@ds0.me> | 2019-03-04 11:18:53 +0000 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2019-03-04 11:26:20 +0000 |
commit | 777864d02ea3382c822a764e928e06b6142da6ec (patch) | |
tree | 0b45ab80fa16d9c541fb4104a50ba2028e06935b /techlibs/ecp5 | |
parent | 57f8bb471feecafad9d9e0bae77ea937b6b03a83 (diff) | |
download | yosys-777864d02ea3382c822a764e928e06b6142da6ec.tar.gz yosys-777864d02ea3382c822a764e928e06b6142da6ec.tar.bz2 yosys-777864d02ea3382c822a764e928e06b6142da6ec.zip |
ecp5: Demote conflicting FF init values to a warning
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'techlibs/ecp5')
-rw-r--r-- | techlibs/ecp5/ecp5_ffinit.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/techlibs/ecp5/ecp5_ffinit.cc b/techlibs/ecp5/ecp5_ffinit.cc index 02945fff4..dbd16cac9 100644 --- a/techlibs/ecp5/ecp5_ffinit.cc +++ b/techlibs/ecp5/ecp5_ffinit.cc @@ -79,10 +79,12 @@ struct Ecp5FfinitPass : public Pass { continue; if (initbits.count(bit)) { - if (initbits.at(bit) != val) - log_error("Conflicting init values for signal %s (%s = %s, %s = %s).\n", + if (initbits.at(bit) != val) { + log_warning("Conflicting init values for signal %s (%s = %s, %s = %s).\n", log_signal(bit), log_signal(SigBit(wire, i)), log_signal(val), log_signal(initbit_to_wire[bit]), log_signal(initbits.at(bit))); + initbits.at(bit) = State::Sx; + } continue; } @@ -121,6 +123,9 @@ struct Ecp5FfinitPass : public Pass { State val = initbits.at(bit_q); + if (val == State::Sx) + continue; + log("FF init value for cell %s (%s): %s = %c\n", log_id(cell), log_id(cell->type), log_signal(bit_q), val != State::S0 ? '1' : '0'); // Initval is the same as the reset state. Matches hardware, nowt more to do |