Commit 8337a0ef authored by Lennart Bucher's avatar Lennart Bucher
Browse files

update the generation, as the old code did not make sense

parent d2cca7cc
Pipeline #186116 failed with stages
in 2 minutes and 2 seconds
...@@ -89,19 +89,15 @@ public class SetStructPortInstruction{ ...@@ -89,19 +89,15 @@ public class SetStructPortInstruction{
lowerBound = boundExists ? split[0].replaceAll("[^0-9]", "") : "0"; lowerBound = boundExists ? split[0].replaceAll("[^0-9]", "") : "0";
boundExists = !split[1].replaceAll("[^0-9]", "").isEmpty(); boundExists = !split[1].replaceAll("[^0-9]", "").isEmpty();
upperBound = boundExists ? split[1].replaceAll("[^0-9]", "") : String.valueOf(Integer.valueOf(dimSizes.get(dimSizes.size()-1))-1); upperBound = boundExists ? split[1].replaceAll("[^0-9]", "") : dimSizes.get(dimSizes.size()-1)+"-1";
} else { } else {
lowerBound = "0"; lowerBound = "0";
if(dimSizes.get(dimSizes.size()-1).equals("n")){ upperBound = dimSizes.get(dimSizes.size()-1)+"-1";
upperBound = "";
}else{
upperBound = String.valueOf(Integer.valueOf(dimSizes.get(dimSizes.size()-1))-1);
}
} }
if(!upperBound.equals("")){ if(!upperBound.equals("")){
if (Integer.parseInt(lowerBound) > Integer.parseInt(upperBound)) { // if (Integer.parseInt(lowerBound) > Integer.parseInt(upperBound)) { If
Log.error(" ArrayBoundsHandler: lowerBound > upperBound!"); // Log.error(" ArrayBoundsHandler: lowerBound > upperBound!");
} // }
inst += "if(" + lowerBound + " <= counter && counter <= " + upperBound + "){\n"; inst += "if(" + lowerBound + " <= counter && counter <= " + upperBound + "){\n";
} }
String tmp; String tmp;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment