-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lava: Change Recipe to leverage the "do" syntax
Fx, before: shiftAndAdd s = While (s.b.val =/= 0) $ Seq [ s.a <== low `vshr` (s.a.val) , s.b <== (s.b.val) `vshl` low , s.b.val.vhead |> s.result <== s.result.val + s.a.val , Tick ] now shiftAndAdd s = do while (s.b.val =/= 0) $do s.a <== low `vshr` (s.a.val) s.b <== (s.b.val) `vshl` low iff (s.b.val.vhead) $do s.result <== s.result.val + s.a.val tick Note, this is a purely syntactic change, the effective code is exactly the same as before. This is but a step on the path to making sequential logic more readable and mallable.
- Loading branch information
1 parent
d807e0e
commit 0b33651
Showing
23 changed files
with
480 additions
and
484 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.