mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-12 09:03:27 +00:00
Use more ID::{A,B,Y,blackbox,whitebox}
This commit is contained in:
parent
6cd8cace0c
commit
52355f5185
40 changed files with 889 additions and 887 deletions
|
@ -86,10 +86,10 @@ struct OptMuxtreeWorker
|
|||
{
|
||||
if (cell->type.in(ID($mux), ID($pmux)))
|
||||
{
|
||||
RTLIL::SigSpec sig_a = cell->getPort(ID(A));
|
||||
RTLIL::SigSpec sig_b = cell->getPort(ID(B));
|
||||
RTLIL::SigSpec sig_a = cell->getPort(ID::A);
|
||||
RTLIL::SigSpec sig_b = cell->getPort(ID::B);
|
||||
RTLIL::SigSpec sig_s = cell->getPort(ID(S));
|
||||
RTLIL::SigSpec sig_y = cell->getPort(ID(Y));
|
||||
RTLIL::SigSpec sig_y = cell->getPort(ID::Y);
|
||||
|
||||
muxinfo_t muxinfo;
|
||||
muxinfo.cell = cell;
|
||||
|
@ -227,10 +227,10 @@ struct OptMuxtreeWorker
|
|||
continue;
|
||||
}
|
||||
|
||||
RTLIL::SigSpec sig_a = mi.cell->getPort(ID(A));
|
||||
RTLIL::SigSpec sig_b = mi.cell->getPort(ID(B));
|
||||
RTLIL::SigSpec sig_a = mi.cell->getPort(ID::A);
|
||||
RTLIL::SigSpec sig_b = mi.cell->getPort(ID::B);
|
||||
RTLIL::SigSpec sig_s = mi.cell->getPort(ID(S));
|
||||
RTLIL::SigSpec sig_y = mi.cell->getPort(ID(Y));
|
||||
RTLIL::SigSpec sig_y = mi.cell->getPort(ID::Y);
|
||||
|
||||
RTLIL::SigSpec sig_ports = sig_b;
|
||||
sig_ports.append(sig_a);
|
||||
|
@ -255,8 +255,8 @@ struct OptMuxtreeWorker
|
|||
}
|
||||
}
|
||||
|
||||
mi.cell->setPort(ID(A), new_sig_a);
|
||||
mi.cell->setPort(ID(B), new_sig_b);
|
||||
mi.cell->setPort(ID::A, new_sig_a);
|
||||
mi.cell->setPort(ID::B, new_sig_b);
|
||||
mi.cell->setPort(ID(S), new_sig_s);
|
||||
if (GetSize(new_sig_s) == 1) {
|
||||
mi.cell->type = ID($mux);
|
||||
|
@ -364,8 +364,8 @@ struct OptMuxtreeWorker
|
|||
|
||||
int width = 0;
|
||||
idict<int> ctrl_bits;
|
||||
if (portname == ID(B))
|
||||
width = GetSize(muxinfo.cell->getPort(ID(A)));
|
||||
if (portname == ID::B)
|
||||
width = GetSize(muxinfo.cell->getPort(ID::A));
|
||||
for (int bit : sig2bits(muxinfo.cell->getPort(ID(S)), false))
|
||||
ctrl_bits(bit);
|
||||
|
||||
|
@ -414,8 +414,8 @@ struct OptMuxtreeWorker
|
|||
|
||||
// set input ports to constants if we find known active or inactive signals
|
||||
if (do_replace_known) {
|
||||
replace_known(knowledge, muxinfo, ID(A));
|
||||
replace_known(knowledge, muxinfo, ID(B));
|
||||
replace_known(knowledge, muxinfo, ID::A);
|
||||
replace_known(knowledge, muxinfo, ID::B);
|
||||
}
|
||||
|
||||
// if there is a constant activated port we just use it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue