mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-31 15:24:57 +00:00
Add test
This commit is contained in:
parent
fb8fab4a29
commit
a701a2accf
2 changed files with 22 additions and 1 deletions
|
@ -14,7 +14,7 @@ shift "$((OPTIND-1))"
|
|||
|
||||
bash ../tools/autotest.sh $seed -G *.v
|
||||
|
||||
for f in `egrep -l 'expect-(wr|rd)-ports' *.v`; do
|
||||
for f in `egrep -l 'expect-(wr-ports|rd-ports|rd-clk)' *.v`; do
|
||||
echo -n "Testing expectations for $f .."
|
||||
../../yosys -qp "proc; opt; memory -nomap;; dump -outfile ${f%.v}.dmp t:\$mem" $f
|
||||
if grep -q expect-wr-ports $f; then
|
||||
|
@ -25,6 +25,10 @@ for f in `egrep -l 'expect-(wr|rd)-ports' *.v`; do
|
|||
grep -q "parameter \\\\RD_PORTS $(gawk '/expect-rd-ports/ { print $3; }' $f)\$" ${f%.v}.dmp ||
|
||||
{ echo " ERROR: Unexpected number of read ports."; false; }
|
||||
fi
|
||||
if grep -q expect-rd-clk $f; then
|
||||
grep -q "connect \\\\RD_CLK \\$(gawk '/expect-rd-clk/ { print $3; }' $f)\$" ${f%.v}.dmp ||
|
||||
{ echo " ERROR: Unexpected read clock."; false; }
|
||||
fi
|
||||
echo " ok."
|
||||
done
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue