You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should add support for let-bindings to name ports and parameters.
Ports
A port let-binding is the same as a bundle of size one:
let p: [G, G+1] 32;
...
if cond {
p = x.out
} else {
p = y.out;
}
foo.in = p
Much like bundle types, a port definition of this form needs to have exactly one driver active within any given branch.
With the IR-flow, we can desugar port let-bindings into simple bundle definitions. For now, we'll require that the user provide the type for the port definition (like bundles) and eventually remove the restrictions once we have full type inference.
Parameters
A parameter let-binding allows us to name parameter expressions:
let #P = #K+1;
...
if #P > 10 { ... } else { ... }
This can make some of the code we write today nicer.
The text was updated successfully, but these errors were encountered:
We should add support for
let
-bindings to name ports and parameters.Ports
A port
let
-binding is the same as abundle
of size one:Much like
bundle
types, a port definition of this form needs to have exactly one driver active within any given branch.With the IR-flow, we can desugar port
let
-bindings into simple bundle definitions. For now, we'll require that the user provide the type for the port definition (like bundles) and eventually remove the restrictions once we have full type inference.Parameters
A parameter
let
-binding allows us to name parameter expressions:This can make some of the code we write today nicer.
The text was updated successfully, but these errors were encountered: