Skip to content

Commit

Permalink
Add cycle counts
Browse files Browse the repository at this point in the history
- setup script for generating cycles counts: cycles.sh
- report cycles counts in cycles.txt
- tweak clean_test_data.sh to remove binheap/round_robin and
  binheap/strict tests
  • Loading branch information
polybeandip committed Sep 11, 2024
1 parent 9defd7d commit 3ad5253
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
20 changes: 20 additions & 0 deletions frontends/queues/cycles.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/bash

shopt -s globstar

cd "$(dirname "$0")/../.." # move to root

for file in frontends/queues/tests/**/*.py; do
name="$(basename $file .py)"
dir="$(dirname $file)"

echo -n "$file: "

python3 $file 20000 --keepgoing |\
fud e --from calyx --to jq \
--through verilog \
--through dat \
-s verilog.data "$dir/$name.data" \
-s jq.expr ".cycles" \
-q
done
30 changes: 30 additions & 0 deletions frontends/queues/cycles.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
frontends/queues/tests/binheap/binheap_test.py: 750
frontends/queues/tests/binheap/fifo_test.py: 1509164
frontends/queues/tests/binheap/pifo_test.py: 1784719
frontends/queues/tests/binheap/round_robin/rr_2flow_test.py: 1870740
frontends/queues/tests/binheap/round_robin/rr_3flow_test.py: 1884450
frontends/queues/tests/binheap/round_robin/rr_4flow_test.py: 1897807
frontends/queues/tests/binheap/round_robin/rr_5flow_test.py: 1903303
frontends/queues/tests/binheap/round_robin/rr_6flow_test.py: 1934811
frontends/queues/tests/binheap/round_robin/rr_7flow_test.py: 1944544
frontends/queues/tests/binheap/stable_binheap_test.py: 1802173
frontends/queues/tests/binheap/strict/strict_2flow_test.py: 1785391
frontends/queues/tests/binheap/strict/strict_3flow_test.py: 1826179
frontends/queues/tests/binheap/strict/strict_4flow_test.py: 1842823
frontends/queues/tests/binheap/strict/strict_5flow_test.py: 1852314
frontends/queues/tests/binheap/strict/strict_6flow_test.py: 1851588
frontends/queues/tests/complex_tree_test.py: 1504412
frontends/queues/tests/fifo_test.py: 595422
frontends/queues/tests/pifo_tree_test.py: 1199525
frontends/queues/tests/round_robin/rr_2flow_test.py: 993313
frontends/queues/tests/round_robin/rr_3flow_test.py: 1013489
frontends/queues/tests/round_robin/rr_4flow_test.py: 1032869
frontends/queues/tests/round_robin/rr_5flow_test.py: 1051211
frontends/queues/tests/round_robin/rr_6flow_test.py: 1125919
frontends/queues/tests/round_robin/rr_7flow_test.py: 1136933
frontends/queues/tests/sdn_test.py: 1244054
frontends/queues/tests/strict/strict_2flow_test.py: 1058077
frontends/queues/tests/strict/strict_3flow_test.py: 1144637
frontends/queues/tests/strict/strict_4flow_test.py: 1233029
frontends/queues/tests/strict/strict_5flow_test.py: 1315433
frontends/queues/tests/strict/strict_6flow_test.py: 1481437
2 changes: 2 additions & 0 deletions frontends/queues/test_data_gen/clean_test_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ cd binheap/
for test in fifo_test pifo_test stable_binheap_test; do
rm -rf $test.data $test.expect
done
rm -rf round_robin/*.data round_robin/*.expect
rm -rf strict/*.data strict/*.expect

cd ../round_robin
rm -rf *.data *.expect
Expand Down

0 comments on commit 3ad5253

Please sign in to comment.