From c34d1dd856fdb572d4804da18cb1edae36e172bd Mon Sep 17 00:00:00 2001 From: Nathaniel Navarro Date: Fri, 22 Dec 2023 12:58:35 -0500 Subject: [PATCH] Add that in guards ports can be literals to docs (#1821) * Add that ports can be literals in guards to docs * Update docs/lang/ref.md Co-authored-by: Adrian Sampson --------- Co-authored-by: Adrian Sampson --- docs/lang/ref.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/lang/ref.md b/docs/lang/ref.md index 109a6f52a4..a0de7729a4 100644 --- a/docs/lang/ref.md +++ b/docs/lang/ref.md @@ -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