Skip to content

Commit

Permalink
Add that in guards ports can be literals to docs (#1821)
Browse files Browse the repository at this point in the history
* Add that ports can be literals in guards to docs

* Update docs/lang/ref.md

Co-authored-by: Adrian Sampson <[email protected]>

---------

Co-authored-by: Adrian Sampson <[email protected]>
  • Loading branch information
nathanielnrn and sampsyo committed Dec 22, 2023
1 parent 08fd510 commit c34d1dd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/lang/ref.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ Guards can use the following constructs:
- `guard || guard`: Disjunction between two guards
- `guard && guard`: Conjunction of two guards

In the context of guards, a port can also be a literal (i.e., `counter.out == 3'd2` is a valid guard).

> **Well-formedness**: For each input port on the LHS, only one guard should be active in any given cycle during the execution of a Calyx program.
### Continuous Assignments
Expand Down

0 comments on commit c34d1dd

Please sign in to comment.