Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Federated banks with multiports don't work #1942

Closed
edwardalee opened this issue Aug 12, 2023 · 0 comments · Fixed by #1956
Closed

Federated banks with multiports don't work #1942

edwardalee opened this issue Aug 12, 2023 · 0 comments · Fixed by #1956
Labels
bug Something isn't working federated

Comments

@edwardalee
Copy link
Collaborator

If you make the FullyConnected_01_Addressable.lf example in the playground federated, it fails to compile with the following stack trace:

lfc: info: ##### Generating code for federate federate__nodes__0 in directory /Users/eal/git/playground-lingua-franca/examples/C/fed-gen/FullyConnected_01_Addressable/src
lfc: fatal error: Error running generator
java.lang.IllegalArgumentException: Parameter num_nodes is not a parameter of reactor instance ns_federate__nodes__0.
        at org.lflang.ast.ASTUtils.initialValue(ASTUtils.java:1327)
        at org.lflang.ast.ASTUtils.initialValueInt(ASTUtils.java:1412)
        at org.lflang.generator.ReactorInstance.initialIntParameterValue(ReactorInstance.java:467)
        at org.lflang.generator.PortInstance.setInitialWidth(PortInstance.java:424)
        at org.lflang.generator.PortInstance.<init>(PortInstance.java:83)
        at org.lflang.generator.ReactorInstance.<init>(ReactorInstance.java:864)
        at org.lflang.generator.ReactorInstance.<init>(ReactorInstance.java:882)
        at org.lflang.generator.ReactorInstance.<init>(ReactorInstance.java:117)
        at org.lflang.federated.extensions.CExtension.generateCodeForPhysicalActions(CExtension.java:810)
        at org.lflang.federated.extensions.CExtension.generateExecutablePreamble(CExtension.java:639)
        at org.lflang.federated.extensions.CExtension.makePreamble(CExtension.java:582)
        at org.lflang.federated.extensions.CExtension.writePreambleFile(CExtension.java:490)
        at org.lflang.federated.extensions.CExtension.generatePreamble(CExtension.java:510)
        at org.lflang.federated.generator.FedPreambleEmitter.generatePreamble(FedPreambleEmitter.java:51)
        at org.lflang.federated.generator.FedEmitter.generateFederate(FedEmitter.java:55)
        at org.lflang.federated.generator.FedGenerator.doGenerate(FedGenerator.java:152)
        at org.lflang.generator.LFGenerator.doGenerate(LFGenerator.java:114)
        at org.eclipse.xtext.generator.GeneratorDelegate.doGenerate(GeneratorDelegate.java:44)
        at org.eclipse.xtext.generator.GeneratorDelegate.generate(GeneratorDelegate.java:35)
        at org.lflang.cli.Lfc.invokeGenerator(Lfc.java:193)
        at org.lflang.cli.Lfc.doRun(Lfc.java:156)
        at org.lflang.cli.CliBase.run(CliBase.java:145)
        at picocli.CommandLine.executeUserObject(CommandLine.java:2026)
        at picocli.CommandLine.access$1500(CommandLine.java:148)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
        at picocli.CommandLine.execute(CommandLine.java:2170)
        at org.lflang.cli.CliBase.doExecute(CliBase.java:117)
        at org.lflang.cli.CliBase.cliMain(CliBase.java:109)
        at org.lflang.cli.Lfc.main(Lfc.java:143)
        at org.lflang.cli.Lfc.main(Lfc.java:133)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working federated
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant