Skip to content

Commit 1b67d55

Browse files
committed
Check if isBus()
Signed-off-by: Chris Lavin <[email protected]>
1 parent fc81421 commit 1b67d55

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/com/xilinx/rapidwright/edif/EDIFPort.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,13 @@ public int[] getBitBlastedIndicies() {
375375
* port.
376376
*/
377377
public int[] getBitBlastedIndices() {
378-
int lastLeftBracket = getName().lastIndexOf('[');
379-
if (getName().contains(":"))
380-
return EDIFTools.bitBlastBus(getName().substring(lastLeftBracket));
381-
if (getName().contains("["))
382-
return new int[] {Integer.parseInt(getName().substring(lastLeftBracket,getName().length()-1))};
378+
if (isBus()) {
379+
int lastLeftBracket = getName().lastIndexOf('[');
380+
if (getName().contains(":"))
381+
return EDIFTools.bitBlastBus(getName().substring(lastLeftBracket));
382+
if (getName().contains("["))
383+
return new int[] { Integer.parseInt(getName().substring(lastLeftBracket, getName().length() - 1)) };
384+
}
383385
return SINGLE_BIT_INDICES;
384386
}
385387

0 commit comments

Comments
 (0)