diff options
author | Clifford Wolf <clifford@clifford.at> | 2016-11-23 13:46:03 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2016-11-23 13:54:33 +0100 |
commit | e444e59963bae07df59f13af5cb52b3a3cae2720 (patch) | |
tree | 9e8aba735c00631a23e7f891bbcb6d8d2b9ded89 | |
parent | 73653de5ff7e257e396da6970e68f254808381be (diff) | |
download | yosys-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.cc | 10 |
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); |