mirror of
https://github.com/YosysHQ/yosys
synced 2025-10-08 17:01:57 +00:00
Add new tests for ice40 architecture
This commit is contained in:
parent
749ff864aa
commit
153ec0541c
28 changed files with 901 additions and 0 deletions
21
tests/ice40/run-test.sh
Executable file
21
tests/ice40/run-test.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
if [ -f "../../../../../techlibs/common/simcells.v" ]; then
|
||||
COMMON_PREFIX=../../../../../techlibs/common
|
||||
TECHLIBS_PREFIX=../../../../../techlibs
|
||||
else
|
||||
COMMON_PREFIX=/usr/local/share/yosys
|
||||
TECHLIBS_PREFIX=/usr/local/share/yosys
|
||||
fi
|
||||
for x in *_top.v; do
|
||||
echo "Running $x.."
|
||||
../../yosys -q -s ${x%_top.v}.ys -l ./temp/${x%.v}.log $x
|
||||
echo "Simulating $x.."
|
||||
iverilog -o ./temp/${x%_top.v}_testbench ${x%_top.v}_tb.v ./temp/${x%_top.v}_synth.v common.v $COMMON_PREFIX/simcells.v $TECHLIBS_PREFIX/ice40/cells_sim.v
|
||||
if ! vvp -N ./temp/${x%_top.v}_testbench > ./temp/${x%_top.v}_testbench.log 2>&1; then
|
||||
grep 'ERROR' ./temp/${x%_top.v}_testbench.log
|
||||
exit 0
|
||||
elif grep 'ERROR' ./temp/${x%_top.v}_testbench.log || ! grep 'OKAY' ./temp/${x%_top.v}_testbench.log; then
|
||||
exit 0
|
||||
fi
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue