-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fud2-rhai-improved-errors
- Loading branch information
Showing
27 changed files
with
702 additions
and
330 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 |
---|---|---|
@@ -1,8 +1,12 @@ | ||
# For usage, see gen_queue_data_expect.sh | ||
|
||
import sys | ||
import calyx.queues as queues | ||
from calyx import queue_util | ||
|
||
if __name__ == "__main__": | ||
max_cmds, len = int(sys.argv[1]), int(sys.argv[2]) | ||
commands, values = queue_util.parse_json() | ||
fifo = queues.Fifo([], False) | ||
ans = queues.operate_queue(commands, values, fifo) | ||
fifo = queues.Fifo(len) | ||
ans = queues.operate_queue(commands, values, fifo, max_cmds) | ||
queue_util.dump_json(commands, values, ans) |
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,17 @@ | ||
#!/usr/bin/bash | ||
|
||
# For SDN, we use piezo mode when making the data file and | ||
# use pifotree_oracle to generate the expected output | ||
python3 queue_data_gen.py 20000 --no-err 16 > ../test/correctness/queues/sdn.data | ||
cat ../test/correctness/queues/sdn.data | python3 pifo_tree_oracle.py 20000 16 > ../test/correctness/queues/sdn.expect | ||
|
||
# For the others, we drop piezo mode for data gen, and we use the appropriate | ||
# oracle, which is one of the following: | ||
# - fifo_oracle.py | ||
# - pifo_oracle.py | ||
# - pifo_tree_oracle.py | ||
|
||
for queue_kind in fifo pifo pifo_tree; do | ||
python3 queue_data_gen.py 20000 --no-err 16 > ../test/correctness/queues/$queue_kind.data | ||
cat ../test/correctness/queues/$queue_kind.data | python3 ${queue_kind}_oracle.py 20000 16 > ../test/correctness/queues/$queue_kind.expect | ||
done |
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 |
---|---|---|
@@ -1,11 +1,15 @@ | ||
# For usage, see gen_queue_data_expect.sh | ||
|
||
import sys | ||
import calyx.queues as queues | ||
from calyx import queue_util | ||
|
||
if __name__ == "__main__": | ||
max_cmds, len = int(sys.argv[1]), int(sys.argv[2]) | ||
commands, values = queue_util.parse_json() | ||
|
||
# Our PIFO is simple: it just orchestrates two FIFOs. The boundary is 200. | ||
pifo = queues.Pifo(queues.Fifo([]), queues.Fifo([]), 200, False) | ||
pifo = queues.Pifo(queues.Fifo(len), queues.Fifo(len), 200, len) | ||
|
||
ans = queues.operate_queue(commands, values, pifo) | ||
ans = queues.operate_queue(commands, values, pifo, max_cmds) | ||
queue_util.dump_json(commands, values, ans) |
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.