mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-02 09:20:23 +00:00
Added FSM test bench
This commit is contained in:
parent
622ebab671
commit
c07774b0b6
2 changed files with 113 additions and 0 deletions
30
tests/fsm/run-test.sh
Executable file
30
tests/fsm/run-test.sh
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
|
||||
# run this test many times:
|
||||
# time bash -c 'for ((i=0; i<100; i++)); do echo "-- $i --"; bash run-test.sh || exit 1; done'
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf temp
|
||||
mkdir -p temp
|
||||
echo "generating tests.."
|
||||
python generate.py
|
||||
|
||||
{
|
||||
all_targets="all_targets:"
|
||||
echo "all: all_targets"
|
||||
for i in $( ls temp/*.ys | sed 's,[^0-9],,g; s,^0*\(.\),\1,g;' ); do
|
||||
idx=$( printf "%05d" $i )
|
||||
echo "temp/uut_${idx}.log: temp/uut_${idx}.ys temp/uut_${idx}.v"
|
||||
echo " @echo -n '[$i]'"
|
||||
echo " @../../yosys -ql temp/uut_${idx}.log temp/uut_${idx}.ys"
|
||||
all_targets="$all_targets temp/uut_${idx}.log"
|
||||
done
|
||||
echo "$all_targets"
|
||||
} > temp/makefile
|
||||
|
||||
echo "running tests.."
|
||||
${MAKE:-make} -f temp/makefile
|
||||
echo
|
||||
|
||||
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue