summaryrefslogblamecommitdiffstats
path: root/sim-scripts/tsim-support
blob: ae4acb86a28454af747b00acc0aa720e7b5a1583 (plain) (tree)
1
2
3
4
5
6
7
8
9


                      


                       


                              
                     


















                                          












                        







                
                     
                          
                         
                         
                          

                          
                                                                  



                                                                  

                          
               

 
                         




                            













                                                                            
    
 
#
#  TSIM Shared Support
#
#

runBSP=tsim-${tsimName}
bspUsesGDBSimulator="no"
bspGeneratesGDBCommands="yes"
bspSupportsGDBServerMode="yes"
bspNeedsSttySane="no"

type ${runBSP} >/dev/null 2>&1
if [ $? -ne 0 ] ; then
  echo "Unable to find ${runBSP} on PATH."
  exit 1
fi

# required for this to run
echo | ${runBSP} -nohaspnet >/dev/null
if [ $? -ne 0 ] ; then
  echo "No TSIM License for this machine."
  exit 1
fi

runARGS()
{
  echo "-c ${bspTreeFile} ${1}"
}

gdbServerARGS()
{
  echo "-gdb"
}

bspGenerateGDBCommands()
{
cat <<EOF
tar remote :1234
load
EOF
}

checkBSPFaults()
{
  return 0
}

bspLimit()
{
  testname=$1
  case ${testname} in
    *stackchk*)limit=15 ;;
    *fatal*)   limit=1 ;;
    *minimum*) limit=1 ;;
    *block05*) limit=70 ;;
    *psxtime*) 
       case ${tsimName} in
         leon)  limit=240 ;;  # ran in 200 seconds on idle england
         leon3) limit=240 ;;  # ran in 200 seconds on idle england
         *)     limit=180 ;;
       esac
       ;;
    *)         limit=60 ;;
  esac
  echo ${limit}
}

bspSimTrustedToExit="yes"
bspGeneratesDeviceTree="yes"
bspTreeFile=${tsimName}.conf

bspGenerateDeviceTree()
{
  if [ ${inGDBScript} = no ] ; then
    if [ ${coverage} = yes ] ; then
      echo "coverage enable"
    fi
    if [ ${limit} -eq 0 ] ; then
      echo "go ${tsimGoAddress}"
    else
      echo "go ${tsimGoAddress} ${limit} s"
    fi
    if [ ${coverage} = yes ] ; then
      echo "coverage save ${2}.cov"
      echo "shell sleep 1"           # give tsim time to actually write file
    fi
    echo "quit"
  fi
}