#!/bin/bash # # Copyright 2012, Sinclair R.F., Inc. NAME=open_drain for WIDTH in 1 5 8; do sed -e "s/@WIDTH@/width=${WIDTH}/" tb_${NAME}.9x8-template > tb_${NAME}.9x8; sed -e "s/@WIDTH@/${WIDTH}/" tb.v-template > tb.v; ../../../../../ssbcc -q -P monitor_stack tb_${NAME}.9x8 || { echo "${NAME} compile failed" > /dev/stderr; exit 1; } iverilog -o tb tb.v tb_${NAME}.v || { echo "${NAME} build failed" > /dev/stderr; exit 1; } ./tb > tb_${WIDTH}.out; done T="`md5sum -c md5sums 2>&1 | sed '/: OK$/d'`"; if [ -n "${T}" ]; then echo "${NAME} failed" > /dev/stderr; exit 1; fi echo "Passed: ${NAME}"; exit 0;