3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 09:05:32 +00:00

muxcover: do not add decode muxes with x inputs

This commit is contained in:
Lofty 2023-01-25 09:26:58 +00:00
parent 2e3c08adc4
commit 822c7b0341
2 changed files with 41 additions and 4 deletions

View file

@ -179,7 +179,7 @@ struct MuxcoverWorker
int prepare_decode_mux(SigBit &A, SigBit B, SigBit sel, SigBit bit)
{
if (A == B || sel == State::Sx)
if (A == B || A == State::Sx || B == State::Sx || sel == State::Sx)
return 0;
tuple<SigBit, SigBit, SigBit> key(A, B, sel);
@ -197,9 +197,6 @@ struct MuxcoverWorker
if (std::get<2>(entry))
return 0;
if (A == State::Sx || B == State::Sx)
return 0;
return cost_dmux / GetSize(std::get<1>(entry));
}