aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2016-11-23 13:46:03 +0100
committerClifford Wolf <clifford@clifford.at>2016-11-23 13:54:33 +0100
commite444e59963bae07df59f13af5cb52b3a3cae2720 (patch)
tree9e8aba735c00631a23e7f891bbcb6d8d2b9ded89
parent73653de5ff7e257e396da6970e68f254808381be (diff)
downloadyosys-e444e59963bae07df59f13af5cb52b3a3cae2720.tar.gz
yosys-e444e59963bae07df59f13af5cb52b3a3cae2720.tar.bz2
yosys-e444e59963bae07df59f13af5cb52b3a3cae2720.zip
Added wire start_offset and upto handling to splitnets cmd
-rw-r--r--passes/cmds/splitnets.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/passes/cmds/splitnets.cc b/passes/cmds/splitnets.cc
index 14eeb066f..5e37fc597 100644
--- a/passes/cmds/splitnets.cc
+++ b/passes/cmds/splitnets.cc
@@ -37,14 +37,20 @@ struct SplitnetsWorker
new_wire_name += format.substr(0, 1);
if (width > 1) {
- new_wire_name += stringf("%d", offset+width-1);
+ if (wire->upto)
+ new_wire_name += stringf("%d", wire->start_offset+wire->width-(offset+width)-1);
+ else
+ new_wire_name += stringf("%d", wire->start_offset+offset+width-1);
if (format.size() > 2)
new_wire_name += format.substr(2, 1);
else
new_wire_name += ":";
}
- new_wire_name += stringf("%d", offset);
+ if (wire->upto)
+ new_wire_name += stringf("%d", wire->start_offset+wire->width-offset-1);
+ else
+ new_wire_name += stringf("%d", wire->start_offset+offset);
if (format.size() > 1)
new_wire_name += format.substr(1, 1);