Index: branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/broadcast_check.sh
===================================================================
--- branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/broadcast_check.sh	(revision 996)
+++ branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/broadcast_check.sh	(revision 996)
@@ -0,0 +1,76 @@
+#!/usr/bin/env sh
+# @author	Cesar Armando Fuguet Tortolero
+# @date		24 May, 2015
+# @brief	This script validates that a broadcast transaction reaches once
+#			and only once every non-faulty router in the platform.
+file=$1
+awk '
+BEGIN {
+	sent=0
+	last=0
+	failure=0
+}
+#   Parse coordinates of routers
+#   /DSPIN_GENERATOR/ {
+#   	regex="\\[[0-9]+\\]\\[";
+#   	if (match($2,regex)) {
+#   		x=substr($2,RSTART+1,RLENGTH-3);
+#   	}
+#   	regex="\\]\\[[0-9]+\\]";
+#   	if (match($2,regex)) {
+#   		y=substr($2,RSTART+2,RLENGTH-3);
+#   	}
+#   }
+
+#   Parse the number of sent broadcast packets
+/broadcast sent packets += +/ {
+	if ($6 != 0) {
+		sent=$6;
+	}
+}
+
+#   Parse the number of received broadcast packets
+/broadcast received packets +=/ {
+	if ($6 == 0) {
+		zero++;
+	}
+	else {
+		# store the number of received packets of a router that actually
+		# received packets.
+		if (last == 0) {
+			last=$6
+		}
+		# test if the error is too important. The error is defined as
+		# difference between the number of packets received by different
+		# routers.
+		error=last - $6
+		if ((error > 20) || (error < -20)) {
+			failure=1
+			exit;
+		}
+	}
+}
+
+#   Validate the file
+END {
+	# an error was too important
+	if (failure == 1) {
+		exit 1
+	}
+
+	# it should be only two routers that do not receive the broadcast:
+	# the source and the faulty router.
+	if (zero != 2) {
+		exit 1;
+	}
+
+	# test if the error is too important
+	error=last - sent
+	if ((error > 20) || (error < -20)) {
+		exit 1;
+	}
+
+	exit 0;
+}' $file
+if [[ $? == 1 ]]; then exit 1; fi
+
Index: branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/broadcast_latency.sh
===================================================================
--- branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/broadcast_latency.sh	(revision 996)
+++ branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/broadcast_latency.sh	(revision 996)
@@ -0,0 +1,52 @@
+#!/usr/bin/env sh
+# @author	Cesar Armando Fuguet Tortolero
+# @date		24 May, 2015
+# @brief	This script validates that a broadcast transaction reaches once
+#			and only once every non-faulty router in the platform.
+file=$1
+awk '
+BEGIN {
+	sent=0
+	total=0
+	targets=0
+}
+#   Parse coordinates of routers
+/DSPIN_GENERATOR/ {
+	regex="\\[[0-9]+\\]\\[";
+	if (match($2,regex)) {
+		x=substr($2,RSTART+1,RLENGTH-3);
+	}
+	regex="\\]\\[[0-9]+\\]";
+	if (match($2,regex)) {
+		y=substr($2,RSTART+2,RLENGTH-3);
+	}
+}
+
+#   Parse the number of sent broadcast packets
+/broadcast sent packets += +/ {
+	if ($6 != 0) {
+		sent=$6;
+	}
+}
+
+#   Parse the number of received broadcast packets
+/broadcast received packets +=/ {
+	packets=$6
+}
+
+#   Parse the broadcast latency
+/broadcast latency +=/ {
+	latency=$5;
+	total+=latency;
+	if (latency > 0) {
+		targets++;
+	}
+}
+
+#   Validate the file
+END {
+	print "mean latency=" total/targets
+	exit 0;
+}' $file
+if [[ $? == 1 ]]; then exit 1; fi
+
Index: branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/check_broadcast.sh
===================================================================
--- branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/check_broadcast.sh	(revision 995)
+++ 	(revision )
@@ -1,75 +1,0 @@
-#!/usr/bin/env sh
-# @author	Cesar Armando Fuguet Tortolero
-# @date		24 May, 2015
-# @brief	This script validates that a broadcast transaction reaches once
-#			and only once every non-faulty router in the platform.
-file=$1
-awk '
-BEGIN {
-	sent=0
-	last=0
-	failure=0
-}
-#   Parse coordinates of routers
-#   /DSPIN_GENERATOR/ {
-#   	regex="\\[[0-9]+\\]\\[";
-#   	if (match($2,regex)) {
-#   		x=substr($2,RSTART+1,RLENGTH-3);
-#   	}
-#   	regex="\\]\\[[0-9]+\\]";
-#   	if (match($2,regex)) {
-#   		y=substr($2,RSTART+2,RLENGTH-3);
-#   	}
-#   }
-
-#   Parse the number of sent broadcast packets
-/broadcast sent packets += +/ {
-	if ($6 != 0) {
-		sent=$6;
-	}
-}
-#   Parse the number of received broadcast packets
-/broadcast received packets +=/ {
-	if ($6 == 0) {
-		zero++;
-	}
-	else {
-		# store the number of received packets of a router that actually
-		# received packets.
-		if (last == 0) {
-			last=$6
-		}
-		# test if the error is too important. The error is defined as
-		# difference between the number of packets received by different
-		# routers.
-		error=last - $6
-		if ((error > 20) || (error < -20)) {
-			failure=1
-			exit;
-		}
-	}
-}
-
-#   Validate the file
-END {
-	# an error was too important
-	if (failure == 1) {
-		exit 1
-	}
-
-	# it should be only two routers that do not receive the broadcast:
-	# the source and the faulty router.
-	if (zero != 2) {
-		exit 1;
-	}
-
-	# test if the error is too important
-	error=last - sent
-	if ((error > 20) || (error < -20)) {
-		exit 1;
-	}
-
-	exit 0;
-}' $file
-if [[ $? == 1 ]]; then exit 1; fi
-
Index: branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/run.sh
===================================================================
--- branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/run.sh	(revision 995)
+++ 	(revision )
@@ -1,23 +1,0 @@
-#!/usr/bin/env sh
-LOGDIR=logs
-COMMON="-X 5 -Y 5 -N 3000"
-
-mkdir -p $LOGDIR
-for (( x = 0; x < 5; x++ )); do
-	for (( y = 0; y < 5; y++ )); do
-		for (( fx = 0; fx < 5; fx++ )); do
-			for (( fy = 0; fy < 5; fy++ )); do
-				if [[ ( $x == $fx ) && ( $y == $fy ) ]]; then continue; fi
-				LOGFILE=$LOGDIR/$(echo log'_'$x'_'$y'_'$fx'_'$fy);
-				ARGS="$COMMON -SX $x -SY $y -FX $fx -FY $fy";
-				echo "./simul.x $ARGS ($LOGFILE)"
-				./simul.x $ARGS > $LOGFILE 2>/dev/null;
-				./check_broadcast.sh $LOGFILE
-				if [[ $? == 1 ]]; then
-					echo "FAILURE";
-					exit 1;
-				fi
-			done
-		done
-	done
-done
Index: branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/run_broadcast_check.sh
===================================================================
--- branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/run_broadcast_check.sh	(revision 996)
+++ branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/run_broadcast_check.sh	(revision 996)
@@ -0,0 +1,23 @@
+#!/usr/bin/env sh
+LOGDIR=logs
+COMMON="-X 5 -Y 5 -N 3000"
+
+mkdir -p $LOGDIR
+for (( x = 0; x < 5; x++ )); do
+	for (( y = 0; y < 5; y++ )); do
+		for (( fx = 0; fx < 5; fx++ )); do
+			for (( fy = 0; fy < 5; fy++ )); do
+				if [[ ( $x == $fx ) && ( $y == $fy ) ]]; then continue; fi
+				LOGFILE=$LOGDIR/$(echo log'_'$x'_'$y'_'$fx'_'$fy);
+				ARGS="$COMMON -SX $x -SY $y -FX $fx -FY $fy";
+				echo "./simul.x $ARGS ($LOGFILE)"
+				./simul.x $ARGS > $LOGFILE 2>/dev/null;
+				./broadcast_check.sh $LOGFILE
+				if [[ $? == 1 ]]; then
+					echo "FAILURE";
+					exit 1;
+				fi
+			done
+		done
+	done
+done
Index: branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/run_broadcast_latency.sh
===================================================================
--- branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/run_broadcast_latency.sh	(revision 996)
+++ branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/run_broadcast_latency.sh	(revision 996)
@@ -0,0 +1,34 @@
+#!/usr/bin/env sh
+LOGDIR=logs
+FX=2
+FY=2
+COMMON="-X 5 -Y 5 -FX $FX -FY $FY -N 10000"
+
+mkdir -p $LOGDIR
+for (( x = 0; x < 5; x++ )); do
+	for (( y = 0; y < 5; y++ )); do
+		for (( load = 100; load <= 1000; load += 100 )); do
+			if [[ ( $x == $FX ) && ( $y == $FY ) ]]; then continue; fi
+			LOGFILE=$LOGDIR/$(echo latency'_'$x'_'$y'_'$load);
+			ARGS="$COMMON -SX $x -SY $y -FX $FX -FY $FY -L $load";
+			echo "./simul.x $ARGS ($LOGFILE)"
+			./simul.x $ARGS > $LOGFILE 2>/dev/null;
+			./broadcast_latency.sh $LOGFILE
+			if [[ $? == 1 ]]; then
+				echo "FAILURE";
+				exit 1;
+			fi
+		done
+	done
+done
+for (( load = 100; load <= 1000; load += 100 )); do
+	LOGFILE=$LOGDIR/$(echo latency_all'_'$load);
+	ARGS="$COMMON -FX $FX -FY $FY -L $load";
+	echo "./simul.x $ARGS ($LOGFILE)"
+	./simul.x $ARGS > $LOGFILE 2>/dev/null;
+	./broadcast_latency.sh $LOGFILE
+	if [[ $? == 1 ]]; then
+		echo "FAILURE";
+		exit 1;
+	fi
+done
Index: branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/top.cpp
===================================================================
--- branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/top.cpp	(revision 995)
+++ branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/top.cpp	(revision 996)
@@ -83,5 +83,9 @@
     /* number of simulation cycles */
     int simCycles = 100000;
-    for (int n = 1; n < argc; n = n + 2) {
+
+    /* synthetic generator load */
+    int load = LOAD;
+
+    for (int n = 1; n < argc; n += 2) {
         if ((strcmp(argv[n], "-X") == 0) && ((n + 1) < argc)) {
             xSize = strtol(argv[n + 1], NULL, 0);
@@ -113,5 +117,10 @@
             continue;
         }
-        if ((strcmp(argv[n], "-DEBUG") == 0)) {
+        if ((strcmp(argv[n], "-L") == 0) && ((n + 1) < argc) ) {
+            load = strtol(argv[n + 1], NULL, 0);
+            assert(load > 0);
+            continue;
+        }
+        if ((strcmp(argv[n--], "-DEBUG") == 0)) {
             debug = true;
             continue;
@@ -146,10 +155,10 @@
 
             int broadcast_period = 0;
-            int load = 0;
+            int ld = 0;
             const int SRCID = cluster(x,y);
-            bool all = (xSrc == -1) && (ySrc == -1);
+            bool all = (xSrc == -1) || (ySrc == -1);
             if (all || (cluster(x,y) == cluster(xSrc,ySrc))) {
                broadcast_period = BROADCAST_PERIOD;
-               load = LOAD;
+               ld = load;
             }
             std::ostringstream generatorStr;
@@ -158,5 +167,5 @@
                 new DspinGeneratorType(generatorStr.str().c_str(),
                                        SRCID, NFLITS,
-                                       load, FIFO_DEPTH,
+                                       ld, FIFO_DEPTH,
                                        broadcast_period);
         }
@@ -202,4 +211,9 @@
             dspinRouter[x][y]->p_out[4](sDspinL[x][y][1]);
 
+            if ((xFaulty < 0) || (yFaulty < 0)) {
+                dspinRouter[x][y]->bind_recovery_port(sConfigNONE);
+                continue;
+            }
+
             if (x == (xFaulty + 1)) {
                 if (y == (yFaulty + 1)) {
