mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-20 07:36:39 +00:00
consteval: Fix $bwmux handling
If the cell type has a S signal and hasn't already been handled, use `CellTypes::eval(cell, A, B, S)`.
This commit is contained in:
parent
31aaf6e7f7
commit
49eec407c2
|
@ -349,7 +349,11 @@ struct ConstEval
|
|||
return false;
|
||||
|
||||
bool eval_err = false;
|
||||
RTLIL::Const eval_ret = CellTypes::eval(cell, sig_a.as_const(), sig_b.as_const(), sig_c.as_const(), sig_d.as_const(), &eval_err);
|
||||
RTLIL::Const eval_ret;
|
||||
if (sig_s.size() > 0 && eval(sig_s, undef, cell)) {
|
||||
eval_ret = CellTypes::eval(cell, sig_a.as_const(), sig_b.as_const(), sig_s.as_const(), &eval_err);
|
||||
} else
|
||||
eval_ret = CellTypes::eval(cell, sig_a.as_const(), sig_b.as_const(), sig_c.as_const(), sig_d.as_const(), &eval_err);
|
||||
|
||||
if (eval_err)
|
||||
return false;
|
||||
|
|
|
@ -1044,9 +1044,7 @@ struct TestCellPass : public Pass {
|
|||
// $pmux doesn't work in sat, and is not supported with 'techmap -assert'
|
||||
if (nosat && techmap_cmd.compare("aigmap") == 0)
|
||||
cell_types[ID($pmux)] = "*";
|
||||
// $bwmux is not supported by ConstEval
|
||||
if (noeval)
|
||||
cell_types[ID($bwmux)] = "A";
|
||||
cell_types[ID($bwmux)] = "A";
|
||||
|
||||
cell_types[ID($slice)] = "A";
|
||||
cell_types[ID($concat)] = "AB";
|
||||
|
|
Loading…
Reference in a new issue