From cd47a7d781f3c473c47e4acf1e5bfa379f510341 Mon Sep 17 00:00:00 2001 From: David Harris Date: Sun, 25 Dec 2022 22:28:58 -0800 Subject: [PATCH] testcount.pl script to count number of tests in each instruction --- bin/testcount.pl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 bin/testcount.pl diff --git a/bin/testcount.pl b/bin/testcount.pl new file mode 100755 index 00000000..65d66229 --- /dev/null +++ b/bin/testcount.pl @@ -0,0 +1,19 @@ +#!/bin/bash +# testcount.pl +# David_Harris@hmc.edu 25 December 2022 +# Read the riscv-test-suite directories from riscv-arch-test +# and count how many tests are in each + +for dir in `ls ${WALLY}/addins/riscv-arch-test/riscv-test-suite/rv*/*` +do + dir=$(echo $dir | cut -d':' -f1) + echo $dir + for fn in `ls $dir/src/*.S` + do + result=`grep 'inst_' $fn | tail -n 1` + num=$(echo $result| cut -d'_' -f 2 | cut -d':' -f 1) + ((num++)) + fnbase=`basename $fn` + echo "$fnbase: $num" + done +done