Changeset 78 for trunk/IPs/systemC/processor/Morpheo/Script
- Timestamp:
- Mar 27, 2008, 11:04:49 AM (17 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Script
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Script/execute.sh
r2 r78 7 7 declare FILE_CPT=; 8 8 declare FILE_CPU=; 9 declare LOCK_CPT="$ HOME/.lock-cpt";10 declare LOCK_CPU="$ HOME/.lock-cpu";11 9 declare LOCK_CPT="${HOME}/.lock-cpt"; 10 declare LOCK_CPU="${HOME}/.lock-cpu"; 11 12 12 #-----[ lock ]---------------------------------------------- 13 13 function lock () -
trunk/IPs/systemC/processor/Morpheo/Script/execute_n.sh
r2 r78 8 8 declare FILE_CPT; 9 9 declare FILE_CPU; 10 declare ID="cpu-$ HOSTNAME-$$"10 declare ID="cpu-${HOSTNAME}-$$" 11 11 12 12 #-----[ usage ]--------------------------------------------- 13 13 function usage () 14 14 { 15 echo "Usage : $0 file [ nb_process ]"; 16 echo " * file : list of command"; 17 echo " * nb_process : number of process (default (and maximum) is the number of processor)"; 15 echo "Usage : $0 file [ nb_process ]"; 16 echo "Arguments : "; 17 echo " * file : list of command"; 18 echo " * nb_process : number of process (default (and maximum) is the number of processor)"; 18 19 echo ""; 19 echo "Note - This script, for each command, create a directory : Task_X (X is the number of command), and execute the command in this directory."; 20 echo " - Two file is generate : \"output\" is the output of the execution, and \"command\" is the command lunch."; 21 echo " - A command empty (no command on a line of file1) is a synchronisation with all process" 22 echo " - Don't forgot the final end of line (else the last command is not executed"; 20 echo "Note : "; 21 echo " * This script, for each command, create a directory : Task_X (X is the number of command), and execute the command in this directory."; 22 echo " * Two file is generate : \"output\" is the output of the execution, and \"command\" is the command lunch."; 23 echo " * A command empty (no command on a line of file) is a synchronisation with all process" 24 echo " * Don't forgot the final end of line (else the last command is not executed"; 23 25 echo ""; 24 26 exit; … … 30 32 local FILE_CPUINFO=/proc/cpuinfo; 31 33 if test ! -f $FILE_CPUINFO; then 32 echo "\"$ FILE_CPUINFO\" don't exist."34 echo "\"${FILE_CPUINFO}\" don't exist." 33 35 usage; 34 36 fi; 35 37 36 eval "$1=`grep -c \"processor\" $ FILE_CPUINFO`";38 eval "$1=`grep -c \"processor\" ${FILE_CPUINFO}`"; 37 39 } 38 40 -
trunk/IPs/systemC/processor/Morpheo/Script/lock.sh
r2 r78 4 4 function usage () 5 5 { 6 echo "Usage : ${0} file"; 7 echo "lock file, you can see the lock at \"~/.$(basename file).lock\"" 6 echo "Usage : ${0} file"; 7 echo "Arguments : "; 8 echo ' * file : you can see the lock at "${MORPHEO_HOME}/lock/$(basename file).lock"'; 9 echo "Notes :"; 10 echo " * Morpheo's environnement must be positionned."; 11 8 12 exit; 9 13 } … … 18 22 function main () 19 23 { 20 if test ${#} -ne 1 -o ! -f ${1}; then 24 LOCK_DIRECTORY="${MORPHEO_HOME}/lock"; 25 26 if test ${#} -ne 1 -o -z ${MORPHEO_HOME} -o ! -d ${LOCK_DIRECTORY}; then 21 27 usage ${*}; 22 28 fi; 23 29 24 lock "${ HOME}/.$(basename ${1}).lock"30 lock "${LOCK_DIRECTORY}/$(basename ${1}).lock" 25 31 } 26 32 -
trunk/IPs/systemC/processor/Morpheo/Script/log_trace.pl
r2 r78 20 20 sub usage() 21 21 { 22 print "usage : $0 rob_trace_file nm_file\n"; 23 print " * rob_trace_file : Trace file generate by simulation\n"; 24 print " * nm_file : List of symbol (generate by nm)\n"; 22 print "Usage : $0 rob_trace_file nm_file\n"; 23 print "Arguments : "; 24 print " * rob_trace_file : Trace file generate by simulation\n"; 25 print " * nm_file : List of symbol (generate by nm)\n"; 25 26 exit(1); 26 27 } -
trunk/IPs/systemC/processor/Morpheo/Script/range.sh
r57 r78 4 4 function usage () 5 5 { 6 echo "Usage : $0 min max [step [iter]]"; 6 echo "Usage : ${0} min max [step [iter]]"; 7 echo "Arguments : "; 7 8 echo " * min : value minimal"; 8 9 echo " * max : value maximal"; … … 15 16 function range () 16 17 { 17 declare a=$ 1;18 declare b=$ 2;19 declare step=$ 3;18 declare a=${1}; 19 declare b=${2}; 20 declare step=${3}; 20 21 21 while test $ a -lt $b; do22 echo $ a;23 a=$(($ a $step));22 while test ${a} -lt ${b}; do 23 echo ${a}; 24 a=$((${a} ${step})); 24 25 done 25 26 26 if test $ a -eq $b; then27 echo $ a;27 if test ${a} -eq ${b}; then 28 echo ${a}; 28 29 fi; 29 30 } … … 32 33 function range_max () 33 34 { 34 declare a=$ 1;35 declare b=$ 2;36 declare step=$ 3;37 declare iter=$ 4;35 declare a=${1}; 36 declare b=${2}; 37 declare step=${3}; 38 declare iter=${4}; 38 39 39 while test $ a -lt $b -a $iter-gt 1; do40 a=$(($ a $step));41 iter=$(($ iter-1));40 while test ${a} -lt ${b} -a ${iter} -gt 1; do 41 a=$((${a} ${step})); 42 iter=$((${iter}-1)); 42 43 done; 43 44 44 if test $ a -eq $b; then45 echo $ a;45 if test ${a} -eq ${b}; then 46 echo ${a}; 46 47 fi; 47 48 48 if test $ iter-eq 1; then49 echo $ a;49 if test ${iter} -eq 1; then 50 echo ${a}; 50 51 fi; 51 52 } … … 55 56 { 56 57 # create operande 57 case $ #in58 2) range $ *"+1";;59 3) range $ *;;60 4) range_max $ *;;61 *) usage $ *58 case ${#} in 59 2) range ${*} "+1";; 60 3) range ${*} ;; 61 4) range_max ${*} ;; 62 *) usage ${*} 62 63 esac 63 64 } 64 65 65 66 #-----[ Corps ]--------------------------------------------- 66 main $ *67 main ${*} -
trunk/IPs/systemC/processor/Morpheo/Script/unlock.sh
r2 r78 4 4 function usage () 5 5 { 6 echo "Usage : ${0} file"; 7 echo "unlock file, you can see the lock at \"~/.$(basename file).lock\"" 6 echo "Usage : ${0} file"; 7 echo "Arguments : "; 8 echo ' * file : you can see the lock at "${MORPHEO_HOME}/lock/$(basename file).lock"'; 9 echo "Notes :"; 10 echo " * Morpheo's environnement must be positionned."; 11 8 12 exit; 9 13 } … … 18 22 function main () 19 23 { 20 if test ${#} -ne 1 -o ! -f ${1}; then 24 LOCK_DIRECTORY="${MORPHEO_HOME}/lock"; 25 26 if test ${#} -ne 1 -o -z ${MORPHEO_HOME} -o ! -d ${LOCK_DIRECTORY}; then 21 27 usage ${*}; 22 28 fi; 23 29 24 unlock "${ HOME}/.$(basename ${1}).lock"30 unlock "${LOCK_DIRECTORY}/$(basename ${1}).lock" 25 31 } 26 32 -
trunk/IPs/systemC/processor/Morpheo/Script/xilinx_extract_info.sh
r71 r78 2 2 3 3 for i in *.fpga.log; do 4 5 4 echo "===== $i"; 6 5 grep "Number of Slice Registers" $i;
Note: See TracChangeset
for help on using the changeset viewer.