-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a380dfb
commit 69615c7
Showing
7 changed files
with
47 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import "primitives/state.fil"; | ||
/// A simple shift register component that delays a signal by D cycles. | ||
comp main[W, D]<'G: 1>( | ||
in: ['G, 'G+1] W | ||
) -> ( | ||
out: ['G+D, 'G+D+1] W | ||
) where W > 0 { | ||
shift := new Shift[W, D]<'G>(in); | ||
out = shift.out{0}; | ||
} |
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,11 @@ | ||
{ | ||
"interfaces": [ | ||
{"name": "null", "event": "G", "delay": 1, "states": 6, "phantom": true } | ||
], | ||
"inputs": [ | ||
{ "event": "G", "name": "in", "width": 32 , "start": 0, "end": 1 } | ||
], | ||
"outputs": [ | ||
{ "event": "G", "name": "out", "width": 32 , "start": 5, "end": 6 } | ||
] | ||
} |
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 @@ | ||
params = [32, 5] |
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,11 @@ | ||
{ | ||
"interfaces": [ | ||
{"name": "null", "event": "G", "delay": 1, "states": 7, "phantom": true } | ||
], | ||
"inputs": [ | ||
{ "event": "G", "name": "in", "width": 32 , "start": 0, "end": 1 } | ||
], | ||
"outputs": [ | ||
{ "event": "G", "name": "out", "width": 32 , "start": 6, "end": 7 } | ||
] | ||
} |
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 @@ | ||
params = [32, 6] |
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,11 @@ | ||
---CODE--- | ||
1 | ||
---STDERR--- | ||
error: `main' requires at least 2 parameters but 1 were provided | ||
┌─ tests/gen/shift.fil:3:6 | ||
│ | ||
3 │ comp main[W, D]<'G: 1>( | ||
│ ^^^^ `main' requires at least 2 parameters but 1 were provided | ||
|
||
Compilation failed with 1 errors. | ||
Run with --show-models to generate assignments for failing constraints. |
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,2 @@ | ||
# Missing the D parameter | ||
params = [32] |