2019-06-26 12:17:52 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2020-03-05 10:08:32 -06:00
|
|
|
declare -A defines=( ["ice40"]="ICE40_HX ICE40_LP ICE40_U" )
|
|
|
|
|
2019-06-26 12:17:52 -05:00
|
|
|
echo "Running syntax check on arch sim models"
|
|
|
|
for arch in ../../techlibs/*; do
|
2019-06-27 13:13:49 -05:00
|
|
|
find $arch -name cells_sim.v | while read path; do
|
2020-03-05 10:08:32 -06:00
|
|
|
arch_name=$(basename -- $arch)
|
|
|
|
if [ "${defines[$arch_name]}" ]; then
|
|
|
|
for def in ${defines[$arch_name]}; do
|
|
|
|
echo -n "Test $path -D$def ->"
|
|
|
|
iverilog -t null -I$arch -D$def $path
|
|
|
|
echo " ok"
|
|
|
|
done
|
|
|
|
else
|
|
|
|
echo -n "Test $path ->"
|
|
|
|
iverilog -t null -I$arch $path
|
|
|
|
echo " ok"
|
|
|
|
fi
|
2019-06-27 13:13:49 -05:00
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
for path in "../../techlibs/common/simcells.v" "../../techlibs/common/simlib.v"; do
|
|
|
|
echo -n "Test $path ->"
|
|
|
|
iverilog -t null $path
|
|
|
|
echo " ok"
|
2019-06-26 12:17:52 -05:00
|
|
|
done
|