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

Invoke in presence of multiple go done signals #986

Open
rachitnigam opened this issue Apr 25, 2022 · 2 comments
Open

Invoke in presence of multiple go done signals #986

rachitnigam opened this issue Apr 25, 2022 · 2 comments
Labels
C: Calyx Extension or change to the Calyx IL S: Discussion needed Issues blocked on discussion

Comments

@rachitnigam
Copy link
Contributor

We’ve been talking about so-called “method-based interfaces” for calyx for a while. The idea is to support components that can be called in multiple ways. For example, we can call the newly added synchronising register with either the write go/done ports or write go/done ports. Invoke currently only supports compiling with one set of go done ports.

I have a few proposals to make it work with multiple go/done interface. Unfortunately all of them rely on attributes which yet again adds semantic meaning to what are essentially comments:

  1. Require invoke to specify distinguished go/done ports. Error if none are specified or default to the primitive specified go/done ports.
  2. Add multiple go/done interfaces for the primitives and use numbers to group go/done symbols together. In the invoke, specify this number in the invoke.
@rachitnigam rachitnigam added S: Discussion needed Issues blocked on discussion C: Calyx Extension or change to the Calyx IL labels Apr 25, 2022
@rachitnigam rachitnigam changed the title Invoke in presence of multiple go done signaks Invoke in presence of multiple go done signals Apr 25, 2022
@sampsyo
Copy link
Contributor

sampsyo commented Apr 26, 2022

Just to fill out the design space, another option would be to extend the language to have multiple, named control programs for each component. We would then need a way to associate a go/done pair with a control program, which would presumably also use this name. Then the invoke statement would need to reference this name.

@rachitnigam
Copy link
Contributor Author

It's been roughly a year since we've thought of this problem. We've frankly not run into this much at all but worth asking @andrewb1999 if AMC might benefit from something like this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Calyx Extension or change to the Calyx IL S: Discussion needed Issues blocked on discussion
Projects
None yet
Development

No branches or pull requests

2 participants