#! /bin/csh

@ narg = $#argv
if ($narg == 0) goto usage

set pixstats = "pixstats_m1"

while ($narg > 0)
    if ((a$argv[$narg] == "a-r6000") || (a$argv[$narg] == "a-r6010")) then
	set pixstats = "pixstats_m2"
    endif
    @ narg--
end

set cmd = $0
set cmd = $cmd:h
if ($cmd == 'pixstat') then
    $pixstats $argv[1-$#argv]
else
    $cmd/$pixstats $argv[1-$#argv]
endif
exit $status
usage:
echo 'usage: pixstats program [options]'
echo 'options are:'
echo '	-cycle N        set cycle time to N ns'
echo '	-clock M        set cycle time to 1000/M ns'
echo '	-r2010          use r2010 (chip) operation times and overlap (default)'
echo '	-r2360          use r2360 (board) operation times and overlap'
echo '	-r6000		use r6000 pipeline, fp times and overlap'	
echo '	-r6010		use r6000 operation times and overlap'
echo '	-disassemble    show analyzed code'
echo '	-dislimit f	limit disassembly to f% frequency instructions'
echo '	-nocounts	use 1 for each basic block count'
exit 1
