mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-13 13:11:27 +00:00
Changed users of cell->connections_ to the new API (sed command)
git grep -l 'connections_' | xargs sed -i -r -e ' s/(->|\.)connections_\["([^"]*)"\] = (.*);/\1set("\2", \3);/g; s/(->|\.)connections_\["([^"]*)"\]/\1get("\2")/g; s/(->|\.)connections_.at\("([^"]*)"\)/\1get("\2")/g; s/(->|\.)connections_.push_back/\1connect/g; s/(->|\.)connections_/\1connections()/g;'
This commit is contained in:
parent
cd6574ecf6
commit
b7dda72302
61 changed files with 1201 additions and 1201 deletions
|
@ -35,40 +35,40 @@ static bool check_signal(RTLIL::Module *mod, RTLIL::SigSpec signal, RTLIL::SigSp
|
|||
|
||||
for (auto &cell_it : mod->cells) {
|
||||
RTLIL::Cell *cell = cell_it.second;
|
||||
if (cell->type == "$reduce_or" && cell->connections_["\\Y"] == signal)
|
||||
return check_signal(mod, cell->connections_["\\A"], ref, polarity);
|
||||
if (cell->type == "$reduce_bool" && cell->connections_["\\Y"] == signal)
|
||||
return check_signal(mod, cell->connections_["\\A"], ref, polarity);
|
||||
if (cell->type == "$logic_not" && cell->connections_["\\Y"] == signal) {
|
||||
if (cell->type == "$reduce_or" && cell->get("\\Y") == signal)
|
||||
return check_signal(mod, cell->get("\\A"), ref, polarity);
|
||||
if (cell->type == "$reduce_bool" && cell->get("\\Y") == signal)
|
||||
return check_signal(mod, cell->get("\\A"), ref, polarity);
|
||||
if (cell->type == "$logic_not" && cell->get("\\Y") == signal) {
|
||||
polarity = !polarity;
|
||||
return check_signal(mod, cell->connections_["\\A"], ref, polarity);
|
||||
return check_signal(mod, cell->get("\\A"), ref, polarity);
|
||||
}
|
||||
if (cell->type == "$not" && cell->connections_["\\Y"] == signal) {
|
||||
if (cell->type == "$not" && cell->get("\\Y") == signal) {
|
||||
polarity = !polarity;
|
||||
return check_signal(mod, cell->connections_["\\A"], ref, polarity);
|
||||
return check_signal(mod, cell->get("\\A"), ref, polarity);
|
||||
}
|
||||
if ((cell->type == "$eq" || cell->type == "$eqx") && cell->connections_["\\Y"] == signal) {
|
||||
if (cell->connections_["\\A"].is_fully_const()) {
|
||||
if (!cell->connections_["\\A"].as_bool())
|
||||
if ((cell->type == "$eq" || cell->type == "$eqx") && cell->get("\\Y") == signal) {
|
||||
if (cell->get("\\A").is_fully_const()) {
|
||||
if (!cell->get("\\A").as_bool())
|
||||
polarity = !polarity;
|
||||
return check_signal(mod, cell->connections_["\\B"], ref, polarity);
|
||||
return check_signal(mod, cell->get("\\B"), ref, polarity);
|
||||
}
|
||||
if (cell->connections_["\\B"].is_fully_const()) {
|
||||
if (!cell->connections_["\\B"].as_bool())
|
||||
if (cell->get("\\B").is_fully_const()) {
|
||||
if (!cell->get("\\B").as_bool())
|
||||
polarity = !polarity;
|
||||
return check_signal(mod, cell->connections_["\\A"], ref, polarity);
|
||||
return check_signal(mod, cell->get("\\A"), ref, polarity);
|
||||
}
|
||||
}
|
||||
if ((cell->type == "$ne" || cell->type == "$nex") && cell->connections_["\\Y"] == signal) {
|
||||
if (cell->connections_["\\A"].is_fully_const()) {
|
||||
if (cell->connections_["\\A"].as_bool())
|
||||
if ((cell->type == "$ne" || cell->type == "$nex") && cell->get("\\Y") == signal) {
|
||||
if (cell->get("\\A").is_fully_const()) {
|
||||
if (cell->get("\\A").as_bool())
|
||||
polarity = !polarity;
|
||||
return check_signal(mod, cell->connections_["\\B"], ref, polarity);
|
||||
return check_signal(mod, cell->get("\\B"), ref, polarity);
|
||||
}
|
||||
if (cell->connections_["\\B"].is_fully_const()) {
|
||||
if (cell->connections_["\\B"].as_bool())
|
||||
if (cell->get("\\B").is_fully_const()) {
|
||||
if (cell->get("\\B").as_bool())
|
||||
polarity = !polarity;
|
||||
return check_signal(mod, cell->connections_["\\A"], ref, polarity);
|
||||
return check_signal(mod, cell->get("\\A"), ref, polarity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue