6 seed
="" # default to no seed specified
10 S
) seed
="-S $OPTARG" ;;
15 bash ..
/tools
/autotest.sh
$seed -G *.v
17 for f
in `egrep -l 'expect-(wr|rd)-ports' *.v`; do
18 echo -n "Testing expectations for $f .."
19 ..
/..
/yosys
-qp "proc; opt; memory -nomap;; dump -outfile ${f%.v}.dmp t:\$mem" $f
20 if grep -q expect-wr-ports
$f; then
21 grep -q "parameter \\\\WR_PORTS $(gawk '/expect-wr-ports/ { print $3; }' $f)\$" ${f%.v}.dmp ||
22 { echo " ERROR: Unexpected number of write ports."; false
; }
24 if grep -q expect-rd-ports
$f; then
25 grep -q "parameter \\\\RD_PORTS $(gawk '/expect-rd-ports/ { print $3; }' $f)\$" ${f%.v}.dmp ||
26 { echo " ERROR: Unexpected number of read ports."; false
; }