Skip to content

Commit

Permalink
Fix nanoxplore meminit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Alain Dargelas committed Dec 21, 2024
1 parent e0534a2 commit 11e4446
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions passes/pmgen/peepopt_muxadd.pmg
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,16 @@ code add_y add_a add_b add_a_ext add_a_id add_b_id mux_y mux_a mux_b mux_a_id m
// Adder output could be assigned...
for (auto it = module->connections().begin(); it != module->connections().end(); ++it) {
RTLIL::SigSpec rhs = it->second;
const std::string& rhs_name = rhs.as_wire()->name.c_str();
if (rhs_name == adder_y_name) {
RTLIL::SigSpec lhs = it->first;
const std::string& lhs_name = lhs.as_wire()->name.c_str();
module->rename(lhs_name, module->uniquify("$" + lhs_name));
break;
if (rhs.is_wire()) {
const std::string& rhs_name = rhs.as_wire()->name.c_str();
if (rhs_name == adder_y_name) {
RTLIL::SigSpec lhs = it->first;
if (lhs.is_wire()) {
const std::string& lhs_name = lhs.as_wire()->name.c_str();
module->rename(lhs_name, module->uniquify("$" + lhs_name));
break;
}
}
}
}
// ...or the port name could be a wire name
Expand Down

0 comments on commit 11e4446

Please sign in to comment.