#!/bin/bash # Copyright 2013, Sinclair R.F., Inc. # # Exercise a make script for all the placer cost table entries. VERSION="$1"; TB="uc_led"; TOOL_DIR="/opt/Xilinx/${VERSION}"; if [ ! -e "${TOOL_DIR}" ]; then echo "Xilinx ISE version ${VERSION} not found at ${TOOL_DIR}" > /dev/stderr; exit 1; fi if [ -d "${TOOL_DIR}/ISE_DS" ]; then TOOL_DIR="${TOOL_DIR}/ISE_DS"; fi for (( ii=1; ii<=100; ++ii )); do ./make "${TOOL_DIR}" "${TB}" "-timing -t ${ii}" 2>&1 > log-placer_cost_run; echo "-timing -t ${ii} `grep "TS_i_clk = PERIOD" log-placer_cost_run`"; done | gawk ' BEGIN{best=999;} { if (NF>=3) { printf("%s\r",$3); } nfvert = split($0,vertsplit,"|"); if (nfvert < 4) next; test=1*vertsplit[4]; if (test < best) { best = test; print $0; } }'