-
Notifications
You must be signed in to change notification settings - Fork 53
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
Static Primitive Signatures #1601
Comments
I think this is why we decided to deprecate Put differently: If a component is statically scheduled (i.e., has a computation independent timing behavior), it should be turned into a
This is an intriguing question that often comes up. Pipelining is about resource reuse while the other two are about the calling convention of the interface. There are four possible interfaces: (dynamic, static) X (pipelined, unpipelined). The HECTOR interface seem to only capture three of those? My gut reaction is that we don't really want to get into the business of specifying reuse properties in Calyx because then we'd have to think about the guarantees that we're providing when they mix together (HECTOR uses a stratified IR to work around this) but I think @sampsyo and @andrewb1999 should chime in on this as well. |
I generally concur with this notion:
That is, in "Calyx v1," we had this philosophy: "Statically-timed hardware is a subset of dynamically-timed hardware. Some hardware is exclusively dynamically-timed; you use this with its go/done interface only. Some hardware is both statically-timed and dynamically-timed; you use this hardware either as in the previous sentence or by ignoring the done port and waiting the appropriate amount of time instead." In "Calyx v2," we have changed this to instead be: "There are two calling conventions: static and dynamic. All hardware is either one or the other. If you want to use static hardware in a dynamic context, you first have to wrap it in a go/done interface." Stuff like The clearest way to extend this philosophy to primitives is that they also get either duplicated or wrapped. That is, we have two choices, which are the same choices as for when we implement stuff in Calyx:
I think option 1 is probably a little easier? Option 2 trends into "virtual operator" territory and would be useful if we ever think the implementations would be meaningfully different.
Yeah, super interesting. I am inclined to agree that we do not yet have a use for knowing about pipelines in the calling convention. Someday, I can imagine needing to write a pass that has to know a component's II to do its job; I don't think we have that yet. It seems best to avoid this until we need it, maybe? It is also possible that what we eventually want is full-blown Filament types for these interfaces… |
Subsumed by #1725 |
Problem
static
keyword to a primitive, and the@static
attribute to ports of primitives, what does this mean exactly?pipelined_mult
primitive and thestd_mult_pipe
primitive in their signatures?Idea
One idea is the following:
Only mark primitive
@go
ports with the@static
attribute, and don't attach thestatic
keyword to primitives. So, for example, bothpipelined_mult
andstd_mult_pipe
will have their@go
ports marked with the@static
attribute. The difference in the signatures will be thatpipelined_mult
does not have adone
port, whereasstd_mult_pipe
does, which lets us know the difference in behavior between the two primitives.One thing I was thinking of, is do we want something in the signature in the primitives that tells us that a primitive is a pipelined primitive (i.e., it can take a new input every cycle, and that its output is available for exactly one cycle before you lose it). Hector literally has 3 "scheduling maners": dynamic, static, and pipeline. Do we want something similar for Calyx primitives, where as pipelined primitive is explicitly stated, i.e., we have a literally pipeline attribute that can be attached to ports? This just a thought and not that well thought out, but I decided to put it down.
The text was updated successfully, but these errors were encountered: