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

Bank to reaction capability is missing #377

Open
edwardalee opened this issue Jun 23, 2021 · 2 comments
Open

Bank to reaction capability is missing #377

edwardalee opened this issue Jun 23, 2021 · 2 comments
Assignees

Comments

@edwardalee
Copy link
Collaborator

Our syntax allows a reaction to be triggered by a contained bank, but this does not currently work, and it it's not entirely clear what it should mean. My proposal is that the reaction is triggered by any output from any of the instances of the bank. This means that the target language needs syntax for getting the width of the bank and iterating over it, something like the following (this does not currently compile):

image

@edwardalee edwardalee self-assigned this Jun 23, 2021
@cmnrd
Copy link
Collaborator

cmnrd commented Jun 23, 2021

I am currently revising the code C++ code generator to fix #66 and this has also become an issue there. I am taking a similar approach as you suggested (actually I assumed this already works in C). Iterating in C++ is a bit simpler, as the symbol s would be of type std::array<...> and you can use a for each loop.

This gets slightly more complicated if the contained port is also a multiport.

@cmnrd
Copy link
Collaborator

cmnrd commented Jul 1, 2021

#387 implements this for C++. I added two tests ReadMultiportOutputOfContainedBank.lf and ReadOutputOfContainedBank.lf
.

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