aboutsummaryrefslogtreecommitdiffstats
path: root/tests/arch/run-test.sh
blob: 5d923db560b6200068106f9a7d50727517556dc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash

set -e

declare -A defines=( ["ice40"]="ICE40_HX ICE40_LP ICE40_U" )

echo "Running syntax check on arch sim models"
for arch in ../../techlibs/*; do
	find $arch -name cells_sim.v | while read path; do
		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 -DNO_ICE40_DEFAULT_ASSIGNMENTS $path
				echo " ok"
			done
		else
			echo -n "Test $path ->"
			iverilog -t null -I$arch $path
			echo " ok"
		fi
	done
done

for path in "../../techlibs/common/simcells.v"  "../../techlibs/common/simlib.v"; do
	echo -n "Test $path ->"
	iverilog -t null $path
	echo " ok"
done