-
Notifications
You must be signed in to change notification settings - Fork 52
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
3639e21
commit 0126ede
Showing
4 changed files
with
80 additions
and
4 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,32 @@ | ||
import "primitives/core.futil"; | ||
import "primitives/memories/comb.futil"; | ||
|
||
component main() -> () { | ||
cells { | ||
@external(1) a = comb_mem_d1(32, 1, 1); | ||
lt = std_lt(32); | ||
} | ||
|
||
wires { | ||
comb group cond { | ||
lt.left = 32'd5; | ||
lt.right = 32'd9; | ||
} | ||
|
||
group wr_a { | ||
a.addr0 = 1'b0; | ||
a.write_en = 1'b1; | ||
a.write_data = 32'd1; | ||
wr_a[done] = a.done; | ||
} | ||
|
||
group wr_b { | ||
wr_a[go] = lt.out ? 1'b1; | ||
wr_b[done] = wr_a[done]; | ||
} | ||
} | ||
|
||
control { | ||
wr_b; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
tests/passes/inline-structural-group-enables/cond.futil.data
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,12 @@ | ||
{ | ||
"a": { | ||
"data": [ | ||
0 | ||
], | ||
"format": { | ||
"numeric_type": "bitnum", | ||
"is_signed": true, | ||
"width": 32 | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
tests/passes/inline-structural-group-enables/seq-and-par-with-se.futil.data
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,32 @@ | ||
{ | ||
"a": { | ||
"data": [ | ||
0 | ||
], | ||
"format": { | ||
"numeric_type": "bitnum", | ||
"is_signed": true, | ||
"width": 32 | ||
} | ||
}, | ||
"b": { | ||
"data": [ | ||
0 | ||
], | ||
"format": { | ||
"numeric_type": "bitnum", | ||
"is_signed": false, | ||
"width": 32 | ||
} | ||
}, | ||
"c": { | ||
"data": [ | ||
0 | ||
], | ||
"format": { | ||
"numeric_type": "bitnum", | ||
"is_signed": false, | ||
"width": 32 | ||
} | ||
} | ||
} |