From 2c51619c2b11edb63c147b1f6eea75c0b01e7256 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sat, 8 Feb 2014 00:06:00 +0100 Subject: [PATCH] Now also move net labes to the right position in splice cmd --- passes/cmds/splice.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/passes/cmds/splice.cc b/passes/cmds/splice.cc index bfb27c383..a53a39197 100644 --- a/passes/cmds/splice.cc +++ b/passes/cmds/splice.cc @@ -186,7 +186,7 @@ struct SpliceWorker } } - std::vector> rework_outputs; + std::vector> rework_wires; for (auto &it : module->wires) if (it.second->port_output) { @@ -197,10 +197,17 @@ struct SpliceWorker continue; RTLIL::SigSpec new_sig = get_spliced_signal(sig); if (new_sig != sig) - rework_outputs.push_back(std::pair(it.second, new_sig)); + rework_wires.push_back(std::pair(it.second, new_sig)); + } else + if (!it.second->port_input) { + RTLIL::SigSpec sig = sigmap(it.second); + if (spliced_signals_cache.count(sig) && spliced_signals_cache.at(sig) != sig) + rework_wires.push_back(std::pair(it.second, spliced_signals_cache.at(sig))); + else if (sliced_signals_cache.count(sig) && sliced_signals_cache.at(sig) != sig) + rework_wires.push_back(std::pair(it.second, sliced_signals_cache.at(sig))); } - for (auto &it : rework_outputs) + for (auto &it : rework_wires) { module->wires.erase(it.first->name); RTLIL::Wire *new_port = new RTLIL::Wire(*it.first); -- 2.30.2