From e444e59963bae07df59f13af5cb52b3a3cae2720 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 23 Nov 2016 13:46:03 +0100 Subject: [PATCH] Added wire start_offset and upto handling to splitnets cmd --- passes/cmds/splitnets.cc | 10 ++++++++-- 1 file 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); -- 2.30.2