Commit be89fbfd authored by Christian Fuß's avatar Christian Fuß
Browse files

fixed bug so that Unrolls also work with external input & output elements

parent b96760c0
Pipeline #158556 passed with stages
in 17 minutes and 7 seconds
......@@ -362,17 +362,20 @@ public class CNNArchSymbolTableCreator extends de.monticore.symboltable.CommonSy
layer.setArguments(arguments);
List<ArchitectureElementSymbol> elements = new ArrayList<>();
int elementNumber = 0;
for (ASTArchitectureElement astElement : ast.getBody().getElementsList()){
elements.add((ArchitectureElementSymbol) astElement.getSymbolOpt().get());
if(elementNumber == 0){
if(elementNumber == 0 && astElement.getSymbolOpt().get() instanceof IOSymbol){
layer.getDeclaration().getBody().setInputElement((ArchitectureElementSymbol) astElement.getSymbolOpt().get());
} else if(elementNumber == (ast.getBody().getElementsList().size() - 1)){
}else if(elementNumber == (ast.getBody().getElementsList().size() - 1) && astElement.getSymbolOpt().get() instanceof IOSymbol){
layer.getDeclaration().getBody().setOutputElement((ArchitectureElementSymbol) astElement.getSymbolOpt().get());
}
elementNumber++;
}
layer.getDeclaration().getBody().setElements(elements);
/*List<ArchitectureElementSymbol> elements = new ArrayList<>();
......
Supports Markdown
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