diff options
author | David Shah <dave@ds0.me> | 2020-01-18 09:47:17 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-18 09:47:17 +0000 |
commit | a4cfd1237ff92764cea121f7025fc9f9dd07462f (patch) | |
tree | c16118745fbe4807ba47955a7de5d49655248fd2 | |
parent | 67c6bf0b6b8a5a2d03a7e64b3baa5c1d3021e6d1 (diff) | |
parent | 379dcda1398ea7a1325f82340148359ffe2bf548 (diff) | |
download | yosys-a4cfd1237ff92764cea121f7025fc9f9dd07462f.tar.gz yosys-a4cfd1237ff92764cea121f7025fc9f9dd07462f.tar.bz2 yosys-a4cfd1237ff92764cea121f7025fc9f9dd07462f.zip |
Merge pull request #1602 from niklasnisbeth/ice40-init-vals-warning
ice40: Demote conflicting FF init values to a warning
-rw-r--r-- | techlibs/ice40/ice40_ffinit.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/techlibs/ice40/ice40_ffinit.cc b/techlibs/ice40/ice40_ffinit.cc index 3089d8932..c098736e9 100644 --- a/techlibs/ice40/ice40_ffinit.cc +++ b/techlibs/ice40/ice40_ffinit.cc @@ -78,10 +78,12 @@ struct Ice40FfinitPass : 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; } @@ -114,6 +116,10 @@ struct Ice40FfinitPass : public Pass { continue; State val = initbits.at(bit_q); + + if (val == State::Sx) + continue; + handled_initbits.insert(bit_q); log("FF init value for cell %s (%s): %s = %c\n", log_id(cell), log_id(cell->type), |