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

Docs: static keyword #1872

Merged
merged 11 commits into from
Feb 1, 2024
7 changes: 4 additions & 3 deletions docs/lang/static.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Static Timing

By default, Calyx programs use a *latency-insensitive* model of computation.
This means that the compiler does not track the number of cycles it takes to perform a computation or run a control operator
This means that the compiler does not track the number of cycles it takes to perform a computation or run a control operator.
In general, latency-insensitivity makes it easier to compose programs together and gives the compiler freedom to schedule operators however it wants.
However, the generated hardware to schedule the execution may not be efficient–especially if the program can take advantage of the *latency* information.
anshumanmohan marked this conversation as resolved.
Show resolved Hide resolved

Expand All @@ -24,7 +24,7 @@ seq {
}
```

A simple trick to achieve this is adding an empty group with `@static(n)` attribute on it:
A simple way to achieve this is adding an empty group with `@static(n)` attribute on it:
```
cell {
r = @std_reg(0);
anshumanmohan marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -39,4 +39,5 @@ seq {
}
```

The static compilation pass `tdst` will never attempt to use the `delay_9`'s `done` condition and since there are no assignments in the group, it'll not generate any additional hardware.
The static compilation pass `tdst` will never attempt to use the `delay_9`'s `done` condition.
Further, since there are no assignments in the group, it will not generate any additional hardware.
Loading