-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
backends/cpp: Don't hide local variables named "tmp" in calls to intfuns
- Loading branch information
1 parent
da174b5
commit 4bd7ed2
Showing
2 changed files
with
26 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
;;; Unit test for “tmp” variable | ||
|
||
(defun sum ((v1 (bits 16)) (v2 (bits 16))) (bits 16) | ||
(+ v1 v2)) | ||
|
||
(module tmp_var | ||
(register r 16'b0) | ||
|
||
(rule init | ||
(let ((tmp 16'b0000111100001111) | ||
(_tmp 16'b0000111100001111) | ||
(tmp (sum tmp _tmp))) | ||
(displn tmp))) | ||
|
||
(scheduler s (sequence init))) |