mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-22 22:03:40 +00:00
kernel: use more ID::*
This commit is contained in:
parent
164dd0f6b2
commit
fdafb74eb7
69 changed files with 843 additions and 841 deletions
|
@ -39,45 +39,45 @@ bool check_signal(RTLIL::Module *mod, RTLIL::SigSpec signal, RTLIL::SigSpec ref,
|
|||
|
||||
for (auto cell : mod->cells())
|
||||
{
|
||||
if (cell->type == "$reduce_or" && cell->getPort("\\Y") == signal)
|
||||
return check_signal(mod, cell->getPort("\\A"), ref, polarity);
|
||||
if (cell->type == "$reduce_or" && cell->getPort(ID::Y) == signal)
|
||||
return check_signal(mod, cell->getPort(ID::A), ref, polarity);
|
||||
|
||||
if (cell->type == "$reduce_bool" && cell->getPort("\\Y") == signal)
|
||||
return check_signal(mod, cell->getPort("\\A"), ref, polarity);
|
||||
if (cell->type == "$reduce_bool" && cell->getPort(ID::Y) == signal)
|
||||
return check_signal(mod, cell->getPort(ID::A), ref, polarity);
|
||||
|
||||
if (cell->type == "$logic_not" && cell->getPort("\\Y") == signal) {
|
||||
if (cell->type == "$logic_not" && cell->getPort(ID::Y) == signal) {
|
||||
polarity = !polarity;
|
||||
return check_signal(mod, cell->getPort("\\A"), ref, polarity);
|
||||
return check_signal(mod, cell->getPort(ID::A), ref, polarity);
|
||||
}
|
||||
|
||||
if (cell->type == "$not" && cell->getPort("\\Y") == signal) {
|
||||
if (cell->type == "$not" && cell->getPort(ID::Y) == signal) {
|
||||
polarity = !polarity;
|
||||
return check_signal(mod, cell->getPort("\\A"), ref, polarity);
|
||||
return check_signal(mod, cell->getPort(ID::A), ref, polarity);
|
||||
}
|
||||
|
||||
if (cell->type.in("$eq", "$eqx") && cell->getPort("\\Y") == signal) {
|
||||
if (cell->getPort("\\A").is_fully_const()) {
|
||||
if (!cell->getPort("\\A").as_bool())
|
||||
if (cell->type.in("$eq", "$eqx") && cell->getPort(ID::Y) == signal) {
|
||||
if (cell->getPort(ID::A).is_fully_const()) {
|
||||
if (!cell->getPort(ID::A).as_bool())
|
||||
polarity = !polarity;
|
||||
return check_signal(mod, cell->getPort("\\B"), ref, polarity);
|
||||
return check_signal(mod, cell->getPort(ID::B), ref, polarity);
|
||||
}
|
||||
if (cell->getPort("\\B").is_fully_const()) {
|
||||
if (!cell->getPort("\\B").as_bool())
|
||||
if (cell->getPort(ID::B).is_fully_const()) {
|
||||
if (!cell->getPort(ID::B).as_bool())
|
||||
polarity = !polarity;
|
||||
return check_signal(mod, cell->getPort("\\A"), ref, polarity);
|
||||
return check_signal(mod, cell->getPort(ID::A), ref, polarity);
|
||||
}
|
||||
}
|
||||
|
||||
if (cell->type.in("$ne", "$nex") && cell->getPort("\\Y") == signal) {
|
||||
if (cell->getPort("\\A").is_fully_const()) {
|
||||
if (cell->getPort("\\A").as_bool())
|
||||
if (cell->type.in("$ne", "$nex") && cell->getPort(ID::Y) == signal) {
|
||||
if (cell->getPort(ID::A).is_fully_const()) {
|
||||
if (cell->getPort(ID::A).as_bool())
|
||||
polarity = !polarity;
|
||||
return check_signal(mod, cell->getPort("\\B"), ref, polarity);
|
||||
return check_signal(mod, cell->getPort(ID::B), ref, polarity);
|
||||
}
|
||||
if (cell->getPort("\\B").is_fully_const()) {
|
||||
if (cell->getPort("\\B").as_bool())
|
||||
if (cell->getPort(ID::B).is_fully_const()) {
|
||||
if (cell->getPort(ID::B).as_bool())
|
||||
polarity = !polarity;
|
||||
return check_signal(mod, cell->getPort("\\A"), ref, polarity);
|
||||
return check_signal(mod, cell->getPort(ID::A), ref, polarity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue