-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@fast
attribute to enable early (0-cycle) transitions between alter…
…nating dynamic/static groups (#2118) Will eventually close #1828 once finalized and thoroughly tested (the former of which may take a while).
- Loading branch information
1 parent
8945254
commit 82da397
Showing
11 changed files
with
224 additions
and
8 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
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
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,9 @@ | ||
---CODE--- | ||
255 | ||
---STDERR--- | ||
[fud] ERROR: `/home/calyx/target/debug/calyx -l /home/calyx -b verilog --disable-verify -p validate -p compile -p lower -d static-promotion' failed: | ||
=====STDERR===== | ||
Error: Malformed Control: `seq` marked `@fast` does not contain alternating static-dynamic control children (see #1828) | ||
|
||
=====STDOUT===== | ||
|
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,46 @@ | ||
import "primitives/core.futil"; | ||
import "primitives/memories/comb.futil"; | ||
|
||
component main(@go go: 1) -> (@done done: 1) { | ||
cells { | ||
@external m = comb_mem_d1(32, 1, 32); | ||
i0 = std_reg(32); | ||
add = std_add(32); | ||
} | ||
wires { | ||
static<1> group init { | ||
i0.in = 32'd0; | ||
i0.write_en = 1'b1; | ||
} | ||
group dyn_inc { | ||
add.left = i0.out; | ||
add.right = 32'd1; | ||
i0.in = add.out; | ||
i0.write_en = 1'b1; | ||
dyn_inc[done] = i0.done; | ||
} | ||
static<1> group static_inc { | ||
add.left = i0.out; | ||
add.right = 32'd1; | ||
i0.in = add.out; | ||
i0.write_en = 1'b1; | ||
} | ||
group write { | ||
m.write_data = i0.out; | ||
m.write_en = 1'b1; | ||
write[done] = m.done; | ||
} | ||
} | ||
control { | ||
@fast seq { | ||
init; | ||
dyn_inc; | ||
dyn_inc; | ||
dyn_inc; | ||
static_inc; | ||
static_inc; | ||
static_inc; | ||
write; | ||
} | ||
} | ||
} |
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 @@ | ||
{ | ||
"m": { | ||
"data": [ | ||
0 | ||
], | ||
"format": { | ||
"numeric_type": "bitnum", | ||
"is_signed": false, | ||
"width": 32 | ||
} | ||
} | ||
} |
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,8 @@ | ||
{ | ||
"cycles": 9, | ||
"memories": { | ||
"m": [ | ||
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,46 @@ | ||
import "primitives/core.futil"; | ||
import "primitives/memories/comb.futil"; | ||
|
||
component main(@go go: 1) -> (@done done: 1) { | ||
cells { | ||
@external m = comb_mem_d1(32, 1, 32); | ||
i0 = std_reg(32); | ||
add = std_add(32); | ||
} | ||
wires { | ||
static<1> group init { | ||
i0.in = 32'd0; | ||
i0.write_en = 1'b1; | ||
} | ||
group dyn_inc { | ||
add.left = i0.out; | ||
add.right = 32'd1; | ||
i0.in = add.out; | ||
i0.write_en = 1'b1; | ||
dyn_inc[done] = i0.done; | ||
} | ||
static<1> group static_inc { | ||
add.left = i0.out; | ||
add.right = 32'd1; | ||
i0.in = add.out; | ||
i0.write_en = 1'b1; | ||
} | ||
group write { | ||
m.write_data = i0.out; | ||
m.write_en = 1'b1; | ||
write[done] = m.done; | ||
} | ||
} | ||
control { | ||
@fast seq { | ||
init; | ||
dyn_inc; | ||
static_inc; | ||
dyn_inc; | ||
static_inc; | ||
dyn_inc; | ||
static_inc; | ||
write; | ||
} | ||
} | ||
} |
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 @@ | ||
{ | ||
"m": { | ||
"data": [ | ||
0 | ||
], | ||
"format": { | ||
"numeric_type": "bitnum", | ||
"is_signed": false, | ||
"width": 32 | ||
} | ||
} | ||
} |