mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-29 07:27:58 +00:00
Added RTLIL::Cell::has(portname)
This commit is contained in:
parent
a84cb04935
commit
97a59851a6
12 changed files with 33 additions and 27 deletions
|
@ -87,21 +87,21 @@ struct ConstEval
|
|||
{
|
||||
RTLIL::SigSpec sig_a, sig_b, sig_s, sig_y;
|
||||
|
||||
assert(cell->connections().count("\\Y") > 0);
|
||||
assert(cell->has("\\Y"));
|
||||
sig_y = values_map(assign_map(cell->get("\\Y")));
|
||||
if (sig_y.is_fully_const())
|
||||
return true;
|
||||
|
||||
if (cell->connections().count("\\S") > 0) {
|
||||
if (cell->has("\\S")) {
|
||||
sig_s = cell->get("\\S");
|
||||
if (!eval(sig_s, undef, cell))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cell->connections().count("\\A") > 0)
|
||||
if (cell->has("\\A"))
|
||||
sig_a = cell->get("\\A");
|
||||
|
||||
if (cell->connections().count("\\B") > 0)
|
||||
if (cell->has("\\B"))
|
||||
sig_b = cell->get("\\B");
|
||||
|
||||
if (cell->type == "$mux" || cell->type == "$pmux" || cell->type == "$safe_pmux" || cell->type == "$_MUX_")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue