Index: trunk/IPs/systemC/processor/Morpheo/Script/SelfTest.sh
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Script/SelfTest.sh	(revision 110)
+++ trunk/IPs/systemC/processor/Morpheo/Script/SelfTest.sh	(revision 112)
@@ -20,5 +20,8 @@
     "Behavioural/Custom"
 
+    "Behavioural/Generic/Comparator"
     "Behavioural/Generic/Counter"
+    "Behavioural/Generic/Divider"
+    "Behavioural/Generic/Multiplier"
     "Behavioural/Generic/Priority"
     "Behavioural/Generic/Queue_Control"                                 
Index: trunk/IPs/systemC/processor/Morpheo/Script/distexe.sh
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Script/distexe.sh	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Script/distexe.sh	(revision 112)
@@ -0,0 +1,107 @@
+#!/bin/bash
+
+#-----------------------------------------------------------
+# $Id$
+#-----------------------------------------------------------
+
+# Need : test, echo, cd, dirname, basename, ssh
+
+#-----[ distexe_usage ]-------------------------------------
+function distexe_usage ()
+{
+    echo "Usage     : ${0} file [ dir ]";
+    echo "Arguments : ";
+    echo " * file       : list of command";
+    echo " * dir        : work directory (default is current directory).";
+#   echo " * nb_process : number of process (default (and maximum) is the number of processor)";
+    echo "";
+    echo "Note      : ";
+    echo " * File content list of command. Each line is execute by an host.";
+    echo "   A line can content many shell command.";
+    echo "   Don't forgot the final end of line (else the last command is not executed)";
+    echo "   example : ";
+    echo '   echo "export PATH=${PATH}:${HOME}/my_appli/bin; my_appli 13"  > command_file.txt';
+    echo '   echo "export PATH=${PATH}:${HOME}/my_appli/bin; my_appli 21" >> command_file.txt';
+    echo '   echo "export PATH=${PATH}:${HOME}/my_appli/bin; my_appli  7" >> command_file.txt';
+    echo '   echo ""                                                      >> command_file.txt';    
+    echo " * For each command, a directory (in work directory) is created : Task_X (X is the number of line in command file).";
+    echo "   The command is execute in this directory. (Warning, set your environment !).";
+    echo "   Two file is generate : \"distexe.output\" is the output (standard and error) of the execution, and \"distexe.command\" is the command lunch.";
+#   echo " * A command empty (no command on a line of file) is a synchronisation with all process"
+    echo " * The environment variable DISTEXE_HOSTS list hosts to execute command";
+    echo "   After each host, a number is to the number of process. It's optionnal, the default value is the number of processor.";
+    echo "   example :";
+    echo '   export DISTEXE_HOSTS="localhost/1 nod/4 gdi/2"';
+    echo " * All hosts must have network file systems (per example nfs or samba)";
+    echo "   Work directory must be in this network file systems !";
+    echo "";
+    exit;
+}
+
+#-----[ distexe_test_usage ]--------------------------------
+function distexe_test_usage ()
+{
+    if test ${#} -ne 1 -a ${#} -ne 2; then
+	distexe_usage;
+    fi;
+
+    if test -z "${MORPHEO_SCRIPT}"; then
+        echo "Environment variable MORPHEO_SCRIPT is not set";
+        distexe_usage;
+    fi;
+
+    if test ! -f ${1}; then
+	echo "File \"${1}\" is invalid";
+	distexe_usage;
+    fi;
+
+    if test ! -s ${1}; then
+	echo "File \"${1}\" is empty.";
+	distexe_usage;
+    fi;
+
+    if test ${#} -eq 2; then
+        if test ! -d ${2}; then
+	    echo "Directory \"${2}\" is invalid.";
+	    distexe_usage;
+        fi;
+    fi;
+
+}
+
+#-----[ distexe ]-------------------------------------------
+function distexe ()
+{
+    distexe_test_usage ${*};
+
+    # construct file command with absolute path
+    cd $(dirname ${1});
+    local FILE_CMD=${PWD}/$(basename ${1});
+    cd -;
+
+    # Absoulte path of work directory
+    local    DIR_EXE;
+    if test ${#} -eq 2; then
+        cd ${2};
+        DIR_EXE=${PWD};
+        cd -;
+    else
+        DIR_EXE=${PWD};
+    fi;
+
+    local hosts="${DISTEXE_HOSTS}";
+
+    for line in ${hosts}; do
+        local    host=$(echo ${line} | cut -d/ -f1);
+        local -i nb_process=$(echo ${line} | cut -d/ -f2);
+
+        echo " * station : ${host} (${nb_process}) ... ";
+
+        # lunch service
+        local cmd="export MORPHEO_SCRIPT=${MORPHEO_SCRIPT};${MORPHEO_SCRIPT}/execute_n.sh ${DIR_EXE} ${FILE_CMD} ${nb_process};";
+        ssh ${host} ${cmd} &
+    done;
+}
+
+#-----[ Corps ]---------------------------------------------
+distexe ${*};
Index: trunk/IPs/systemC/processor/Morpheo/Script/execute.sh
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Script/execute.sh	(revision 110)
+++ trunk/IPs/systemC/processor/Morpheo/Script/execute.sh	(revision 112)
@@ -5,17 +5,10 @@
 #-----------------------------------------------------------
 
-declare -a COMMAND;
-declare -i CPT_OLD;
-declare -i CPT;
-declare    FILE_CMD=;
-declare    FILE_CPT=;
-declare    FILE_CPU=;
-declare    LOCK_CPT="${HOME}/.lock-cpt";
-declare    LOCK_CPU="${HOME}/.lock-cpu";
+#-----[ global variable ]-----------------------------------
 
 #-----[ lock ]----------------------------------------------
 function lock ()
 {
-    lockfile -1 $1;
+    lockfile -1 ${1};
 }
 
@@ -23,30 +16,72 @@
 function unlock ()
 {
-    rm -f $1;
+    rm -f ${1};
 }
 
-#-----[ main ]----------------------------------------------
-function main ()
+#-----[ my_date ]-------------------------------------------
+function my_date ()
 {
-    # no test, because the script execute_n have make all test
-    FILE_CMD=$1;
-    FILE_CPT=$2;
-    FILE_CPU=$3;
+    date +"%F %T";
+}
 
-    lock   $LOCK_CPT;
-    if test ! -s $FILE_CPT; then
-	echo "0" > $FILE_CPT;
+#-----[ execute_usage ]-------------------------------------
+function execute_usage ()
+{
+    echo "Usage     : ${0} work_dir file_cmd file_cpt file_cpu";
+    echo "Arguments : ";
+    echo " * work_dir   : directory to execute command";
+    echo " * file_cmd   : list of command";
+    echo " * file_cpt   : file with the index of next command to execute";
+    echo " * file_cpu   : tmp file to stock the current index";
+    exit;
+}
+
+#-----[ execute_test_usage ]--------------------------------
+function execute_test_usage ()
+{
+    if test ${#} -ne 4; then
+	execute_usage;
     fi;
-    unlock $LOCK_CPT;
 
-    # lit les fichiers ligne par ligne et le place dans un tableau
+    if test ! -d ${1}; then
+        echo "Directory ${1} is invalid";
+    fi;
+}
+
+#-----[ execute ]-------------------------------------------
+function execute ()
+{
+    # test_usage
+    execute_test_usage ${*};
+
+    local -a COMMAND;
+    local -i CPT_OLD;
+    local -i CPT;
+    local    WORK_DIR=${1};
+    local    FILE_CMD=${2};
+    local    FILE_CPT=${3};
+    local    FILE_CPU=${4};
+    local    LOCK_CPT="${WORK_DIR}/.lock-cpt";
+    local    LOCK_CPU="${WORK_DIR}/.lock-cpu";
+    local    FILE_CMD="distexe.command";
+    local    FILE_OUT="distexe.output";
+
+
+    # Init CPT if this thread is the first
+    lock   ${LOCK_CPT};
+    if test ! -s ${FILE_CPT}; then
+	echo "0" > ${FILE_CPT};
+    fi;
+    unlock ${LOCK_CPT};
+
+    # read, line by line, the command file and write in array
     CPT=0;
 
     while read line; do
-	COMMAND[$CPT]="$line";
-	CPT=$(($CPT+1));
-    done < $1;
+	COMMAND[${CPT}]="${line}";
+	CPT=$((${CPT}+1));
+    done < ${FILE_CMD};
 
-    echo "  * <$$> {"`date +"%F %T"`"} is ready";
+    echo "  * <${HOSTNAME}-$$> {"$(my_date)"} is ready";
 
     # infinite loop
@@ -56,13 +91,14 @@
     while test 1; do
 	# Take a number
-	CPT_OLD=$CPT;
+	CPT_OLD=${CPT};
 
-	lock   $LOCK_CPT;
-	CPT=`cat $FILE_CPT`;            # read  the      index
-	echo "$(($CPT+1))" > $FILE_CPT; # write the next index
-	unlock $LOCK_CPT;
+        # Read the index, and increase
+	lock   ${LOCK_CPT};
+	CPT=$(cat ${FILE_CPT});
+	echo "$((${CPT}+1))" > ${FILE_CPT};
+	unlock ${LOCK_CPT};
 
 	# test if this number is valid
-	if test $CPT -ge ${#COMMAND[*]}; then
+	if test ${CPT} -ge ${#COMMAND[*]}; then
 	    CPT=${#COMMAND[*]};
 	fi;
@@ -70,46 +106,46 @@
 	# test if between the cpt_old and cpt, there are a synchronisation command
 
-#	local -i CPT_SYNC=$CPT_OLD;
+#	local -i CPT_SYNC=${CPT}_OLD;
 #
-#	while test $CPT_SYNC -lt $CPT; do
-#	    if test -z "${COMMAND[$CPT_SYNC]}"; then
-#		echo "  * <$$> {"`date +"%F %T"`"} synchronisation [$CPT_SYNC]";
+#	while test ${CPT}_SYNC -lt ${CPT}; do
+#	    if test -z "${COMMAND[${CPT}_SYNC]}"; then
+#		echo "  * <${HOSTNAME}-$$> {"$(my_date)"} synchronisation [${CPT}_SYNC]";
 #	    fi;
-#	    CPT_SYNC=$(($CPT_SYNC+1));
+#	    CPT_SYNC=$((${CPT}_SYNC+1));
 #	done;
 
 	# test if this number is valid
-	if test $CPT -eq ${#COMMAND[*]}; then
+	if test ${CPT} -eq ${#COMMAND[*]}; then
 	    break;
 	fi;
 
 	# Test if command is empty !
-	if test ! -z "${COMMAND[$CPT]}"; then
-	    local CUR_DIR=$PWD;
-
-	    mkdir "Task_$CPT"       &> /dev/null;
-	    cd    "Task_$CPT"       &> /dev/null;
-	    echo "  * <$$> {"`date +"%F %T"`"} execute command [$CPT] : ${COMMAND[$CPT]}";
-	    echo "${COMMAND[$CPT]}"  >  "command";
-	    chmod +x                    "command";
-	    eval "${COMMAND[$CPT]}" &>  "output";
-	    cd    $CUR_DIR          &> /dev/null;
+	if test ! -z "${COMMAND[${CPT}]}"; then
+	    local CURREN_DIR=${PWD};
+            cd    ${WORK_DIR}         &> /dev/null;
+	    mkdir "Task_${CPT}"       &> /dev/null;
+	    cd    "Task_${CPT}"       &> /dev/null;
+	    echo "  * <${HOSTNAME}-$$> {"$(my_date)"} execute command [${CPT}] : ${COMMAND[${CPT}]}";
+	    echo "${COMMAND[${CPT}]}"  >  ${FILE_CMD};
+#	    chmod +x                      ${FILE_CMD};
+	    eval "${COMMAND[${CPT}]}" &>  ${FILE_OUT};
+	    cd    ${CURREN_DIR}       &> /dev/null;
 	fi;
     done;
 
-    echo "  * <$$> {"`date +"%F %T"`"} is done";
+    echo "  * <${HOSTNAME}-$$> {"$(my_date)"} is done";
 
-    lock   $LOCK_CPU;
-    CPT=`cat $FILE_CPU`;     # read  the      index
-    CPT=$(($CPT-1));
-    echo "$CPT" > $FILE_CPU; # write the next index
-    unlock $LOCK_CPU;
+    lock   ${LOCK_CPU};
+    CPT=$(cat ${FILE_CPU});    # read  the      index
+    CPT=$((${CPT}-1));
+    echo "${CPT}" > ${FILE_CPU}; # write the next index
+    unlock ${LOCK_CPU};
     
-    if test $CPT -eq 0; then
-	echo "  * <$$> {"`date +"%F %T"`"} All task is executed";
-	rm $FILE_CPU;
+    if test ${CPT} -eq 0; then
+	echo "  * <${HOSTNAME}-$$> {"$(my_date)"} All task is executed";
+	rm ${FILE_CPU};
     fi;
 }
 
 #-----[ Corps ]---------------------------------------------
-main $*;
+execute ${*};
Index: trunk/IPs/systemC/processor/Morpheo/Script/execute_n.sh
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Script/execute_n.sh	(revision 110)
+++ trunk/IPs/systemC/processor/Morpheo/Script/execute_n.sh	(revision 112)
@@ -5,18 +5,25 @@
 #-----------------------------------------------------------
 
-#-----[ variable ]------------------------------------------
-declare -a COMMAND;
-declare -i NB_PROCESS;
-declare -i CPT;
-declare    FILE_CMD;
-declare    FILE_CPT;
-declare    FILE_CPU;
-declare    ID="cpu-${HOSTNAME}-$$"
+#-----[ global variable ]-----------------------------------
 
-#-----[ usage ]---------------------------------------------
-function usage ()
+#-----[ nb_cpu ]--------------------------------------------
+function nb_cpu ()
 {
-    echo "Usage     : $0 file [ nb_process ]";
+    local FILE_CPUINFO=/proc/cpuinfo;
+    if test ! -f ${FILE_CPUINFO}; then
+	echo "\"${FILE_CPUINFO}\" don't exist."
+	usage;
+    fi;
+
+    #eval "${1}=`grep -c \"processor\" ${FILE_CPUINFO}`";
+    grep -c "processor" ${FILE_CPUINFO};
+}
+
+#-----[ execute_n_usage ]-----------------------------------
+function execute_n_usage ()
+{
+    echo "Usage     : ${0} word_dir file [ nb_process ]";
     echo "Arguments : ";
+    echo " * work_dir   : directory to execute command";
     echo " * file       : list of command";
     echo " * nb_process : number of process (default (and maximum) is the number of processor)";
@@ -25,73 +32,72 @@
     echo " * This script, for each command, create a directory : Task_X (X is the number of command), and execute the command in this directory.";
     echo " * Two file is generate : \"output\" is the output of the execution, and \"command\" is the command lunch.";
-    echo " * A command empty (no command on a line of file) is a synchronisation with all process"
-    echo " * Don't forgot the final end of line (else the last command is not executed";
+#   echo " * A command empty (no command on a line of file) is a synchronisation with all process"
+    echo " * Don't forgot the final end of line (else the last command is not executed)";
     echo "";
     exit;
 }
 
-#-----[ nb_cpu ]--------------------------------------------
-function nb_cpu ()
+#-----[ execute_n_test_usage ]------------------------------
+function execute_n_test_usage ()
 {
-    local FILE_CPUINFO=/proc/cpuinfo;
-    if test ! -f $FILE_CPUINFO; then
-	echo "\"${FILE_CPUINFO}\" don't exist."
-	usage;
+    if test ${#} -ne 2 -a ${#} -ne 3; then
+	execute_n_usage;
     fi;
 
-    eval "$1=`grep -c \"processor\" ${FILE_CPUINFO}`";
-}
-
-#-----[ test_usage ]----------------------------------------
-function test_usage ()
-{
-    if test $# -ne 1 -a $# -ne 2; then
-	usage;
+    if test ! -d ${1}; then
+        echo "Directory ${1} is invalid";
     fi;
 
-    if test ! -f $1; then
-	echo "File \"$1\" don't exist";
-	usage;
+    if test -z "${MORPHEO_SCRIPT}"; then
+        echo "Environment variable MORPHEO_SCRIPT is not set";
+        distexe_usage;
     fi;
 
-    if test ! -s $1; then
-	echo "File \"$1\" is empty";
-	usage;
+    if test ! -f ${2}; then
+	echo "File \"${2}\" don't exist";
+	execute_n_usage;
+    fi;
+
+    if test ! -s ${2}; then
+	echo "File \"${2}\" is empty";
+	execute_n_usage;
     fi;
 }
 
-#-----[ main ]----------------------------------------------
-function main ()
+#-----[ execute_n_main ]------------------------------------
+function execute_n ()
 {
-    nb_cpu NB_PROCESS;
+    local -i NB_PROCESS=$(nb_cpu);
+    local -i CPT;
+    local    WORK_DIR=${1};
+    local    FILE_CMD=${2};
+    local    FILE_CPT;
+    local    FILE_CPU;
+    local    ID="cpu-${HOSTNAME}-$$"
 
-    test_usage $*;
+    execute_n_test_usage ${*};
 
-    if test $# -eq 2; then
-	if test $2 -lt $NB_PROCESS; then
-	    NB_PROCESS=$2;
+    if test ${#} -eq 2; then
+	if test ${3} -lt ${NB_PROCESS}; then
+	    NB_PROCESS=${3};
 	fi;
     fi;
 
-    FILE_CMD=$1;
-    FILE_CPT="$HOME/control-"`basename $1`;
-    FILE_CPU="$HOME/$ID";
+    FILE_CPT="${WORK_DIR}/control-"$(basename ${FILE_CMD});
+    FILE_CPU="${WORK_DIR}/${ID}";
 
-    echo "<$0>"                                         ;
-    echo "  * Initialisation ...."                      ;
-    echo "    - host name                : $HOSTNAME"   ;
-    echo "    - number of process        : $NB_PROCESS" ;
+    echo "  * <${HOSTNAME}> ${NB_PROCESS} process";
 
     local -i IT_NB_PROCESS=1;
     local -i PID=$$;
 
-    echo "$NB_PROCESS" > $FILE_CPU;
+    echo "${NB_PROCESS}" > ${FILE_CPU};
 
     # create the same number of thread that processor
-    while test $IT_NB_PROCESS -le $NB_PROCESS; do
-	execute.sh $FILE_CMD $FILE_CPT $FILE_CPU &
-	IT_NB_PROCESS=$(($IT_NB_PROCESS+1));
+    while test ${IT_NB_PROCESS} -le ${NB_PROCESS}; do
+	${MORPHEO_SCRIPT}/execute.sh ${WORK_DIR} ${FILE_CMD} ${FILE_CPT} ${FILE_CPU} &
+	IT_NB_PROCESS=$((${IT_NB_PROCESS}+1));
 
-	if test "$$" -ne $PID; then
+	if test "$$" -ne ${PID}; then
 	    break;
 	fi;
@@ -100,3 +106,3 @@
 
 #-----[ Corps ]---------------------------------------------
-main $*;
+execute_n ${*};
