mirror of https://github.com/YosysHQ/yosys.git
Merge pull request #1602 from niklasnisbeth/ice40-init-vals-warning
ice40: Demote conflicting FF init values to a warning
This commit is contained in:
commit
a4cfd1237f
|
@ -78,10 +78,12 @@ struct Ice40FfinitPass : public Pass {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (initbits.count(bit)) {
|
if (initbits.count(bit)) {
|
||||||
if (initbits.at(bit) != val)
|
if (initbits.at(bit) != val) {
|
||||||
log_error("Conflicting init values for signal %s (%s = %s, %s = %s).\n",
|
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(bit), log_signal(SigBit(wire, i)), log_signal(val),
|
||||||
log_signal(initbit_to_wire[bit]), log_signal(initbits.at(bit)));
|
log_signal(initbit_to_wire[bit]), log_signal(initbits.at(bit)));
|
||||||
|
initbits.at(bit) = State::Sx;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,6 +116,10 @@ struct Ice40FfinitPass : public Pass {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
State val = initbits.at(bit_q);
|
State val = initbits.at(bit_q);
|
||||||
|
|
||||||
|
if (val == State::Sx)
|
||||||
|
continue;
|
||||||
|
|
||||||
handled_initbits.insert(bit_q);
|
handled_initbits.insert(bit_q);
|
||||||
|
|
||||||
log("FF init value for cell %s (%s): %s = %c\n", log_id(cell), log_id(cell->type),
|
log("FF init value for cell %s (%s): %s = %c\n", log_id(cell), log_id(cell->type),
|
||||||
|
|
Loading…
Reference in New Issue