mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 09:05:32 +00:00
Merge pull request #3646 from YosysHQ/lofty/fix-3591
muxcover: do not add decode muxes with x inputs
This commit is contained in:
commit
21e87f7986
2 changed files with 41 additions and 4 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue