mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-14 05:31:29 +00:00
Make liberal use of IdString.in()
This commit is contained in:
parent
43081337fa
commit
3486235338
18 changed files with 45 additions and 51 deletions
|
@ -262,7 +262,7 @@ struct MemoryDffWorker
|
|||
mux_cells_a[sigmap(cell->getPort("\\A"))] = cell;
|
||||
mux_cells_b[sigmap(cell->getPort("\\B"))] = cell;
|
||||
}
|
||||
if (cell->type == "$not" || cell->type == "$_NOT_" || (cell->type == "$logic_not" && GetSize(cell->getPort("\\A")) == 1)) {
|
||||
if (cell->type.in("$not", "$_NOT_") || (cell->type == "$logic_not" && GetSize(cell->getPort("\\A")) == 1)) {
|
||||
SigSpec sig_a = cell->getPort("\\A");
|
||||
SigSpec sig_y = cell->getPort("\\Y");
|
||||
if (cell->type == "$not")
|
||||
|
|
|
@ -155,7 +155,7 @@ struct MemoryShareWorker
|
|||
{
|
||||
bool ignore_data_port = false;
|
||||
|
||||
if (cell->type == "$mux" || cell->type == "$pmux")
|
||||
if (cell->type.in("$mux", "$pmux"))
|
||||
{
|
||||
std::vector<RTLIL::SigBit> sig_a = sigmap(cell->getPort("\\A"));
|
||||
std::vector<RTLIL::SigBit> sig_b = sigmap(cell->getPort("\\B"));
|
||||
|
@ -173,7 +173,7 @@ struct MemoryShareWorker
|
|||
continue;
|
||||
}
|
||||
|
||||
if ((cell->type == "$memwr" || cell->type == "$memrd") &&
|
||||
if (cell->type.in("$memwr", "$memrd") &&
|
||||
cell->parameters.at("\\MEMID").decode_string() == memid)
|
||||
ignore_data_port = true;
|
||||
|
||||
|
@ -690,7 +690,7 @@ struct MemoryShareWorker
|
|||
sigmap_xmux.add(cell->getPort("\\Y"), sig_a);
|
||||
}
|
||||
|
||||
if (cell->type == "$mux" || cell->type == "$pmux")
|
||||
if (cell->type.in("$mux", "$pmux"))
|
||||
{
|
||||
std::vector<RTLIL::SigBit> sig_y = sigmap(cell->getPort("\\Y"));
|
||||
for (int i = 0; i < int(sig_y.size()); i++)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue