Skip to content

Commit

Permalink
Piezo, PIFO tree: new .data and .expect files (#1788)
Browse files Browse the repository at this point in the history
* Actually put new files in

* Usage directions in comments
  • Loading branch information
anshumanmohan authored Nov 24, 2023
1 parent 9f457bb commit 2d6c8fc
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 85 deletions.
8 changes: 7 additions & 1 deletion calyx-py/calyx/pifotree_oracle.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Usage:
# To make a .data file:
# python calyx-py/calyx/queue_data_gen.py --piezo > calyx-py/test/correctness/sdn.data
# To then make a .expect file:
# cat calyx-py/test/correctness/sdn.data |
# python calyx-py/calyx/pifotree_oracle.py > calyx-py/test/correctness/sdn.expect

import calyx.queues as queues
from calyx import queue_util

Expand All @@ -21,4 +28,3 @@

ans = queues.operate_queue(commands, values, pifo)
queue_util.dump_json(commands, values, ans)

7 changes: 7 additions & 0 deletions calyx-py/calyx/queue_data_gen.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Usage:
# To make a .data file:
# python calyx-py/calyx/queue_data_gen.py --piezo > calyx-py/test/correctness/sdn.data
# To then make a .expect file:
# cat calyx-py/test/correctness/sdn.data |
# python calyx-py/calyx/pifotree_oracle.py > calyx-py/test/correctness/sdn.expect

import random
import json
import sys
Expand Down
50 changes: 25 additions & 25 deletions calyx-py/test/correctness/sdn.data
Original file line number Diff line number Diff line change
@@ -1,105 +1,105 @@
{
"commands": {
"data": [
2,
2,
0,
2,
0,
2,
2,
2,
2,
0,
0,
2,
0,
2,
2,
0,
2,
2,
0,
0,
2,
0,
2,
2,
2,
0,
2,
2,
2,
2,
0,
2,
0,
2,
0,
0,
2,
2,
0,
2,
0,
0,
2,
0,
0,
2,
2,
0,
2,
0,
0,
2,
0,
2,
0,
0,
0,
0,
2,
2,
0,
2,
2,
0,
0,
2,
0,
2,
2,
0,
2,
0,
2,
2,
2,
2,
2,
0,
2,
2,
0,
0,
2,
0,
2,
2,
0,
2,
2,
2,
0,
2,
2,
0,
0,
0,
0,
0,
2,
2,
2,
0,
2,
2,
0,
2,
2,
0,
0,
2,
0,
0,
2,
2,
0,
2,
2,
0,
2,
2,
2,
0,
0
],
"format": {
Expand All @@ -110,6 +110,7 @@
},
"values": {
"data": [
40,
320,
76,
369,
Expand Down Expand Up @@ -208,8 +209,7 @@
174,
332,
91,
297,
5
297
],
"format": {
"is_signed": false,
Expand Down
Loading

0 comments on commit 2d6c8fc

Please sign in to comment.