Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add support for multiports and banks #57

Open
lhstrh opened this issue Jan 14, 2021 · 3 comments
Open

Add support for multiports and banks #57

lhstrh opened this issue Jan 14, 2021 · 3 comments
Assignees

Comments

@lhstrh
Copy link
Member

lhstrh commented Jan 14, 2021

Relevant PRs:
lf-lang/lingua-franca#942
#81

@hokeun hokeun self-assigned this Jan 22, 2022
@hokeun
Copy link
Member

hokeun commented Jan 22, 2022

Multiport implementation is required to implement some of the benchmarks from Savina suite (e.g., Online Facility Location and UCT(Unbalanced Cobwebbed Tree)) to support tree-like actor structure, sending and receiving messages to/from multiple children.

Banks are required to implement UCT as the number of children can be arbitrary, while the number of children in Online Facility Location is always four (Quadrant actor).

@hokeun
Copy link
Member

hokeun commented Feb 5, 2022

Here are rough ideas for implementing multiports in TypeScript.

For reactor-ts runtime support:

First we need something similar to lfutil::bind_multiple_ports() in Cpp target. This function takes a vector of source ports and a vector of destination ports, and then calls bind_to() function for each individual connection.

Similarly, we can create a new function in reactor.ts, called _connectMultiplePorts(), which takes an Array of src ports and an Array of dst ports, and then calls _connect() function internally for the given Arrays of ports.

For code generation:

In TSPortGenerator.kt, generate multi ports as new Arrays.

In TSConnectionGenerator.kt, generate connection code using _connectMultiplePorts().

@hokeun
Copy link
Member

hokeun commented Feb 10, 2022

Note from Edward's comments

  • interleaved must be taken care of when supporting banks together with multiports.

@hokeun hokeun changed the title Add support for multiports (and banks?) Add support for multiports and banks Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants