Index: /branches/reconfiguration/modules/dspin_router/caba/source/src/dspin_router.cpp
===================================================================
--- /branches/reconfiguration/modules/dspin_router/caba/source/src/dspin_router.cpp	(revision 1019)
+++ /branches/reconfiguration/modules/dspin_router/caba/source/src/dspin_router.cpp	(revision 1020)
@@ -321,21 +321,15 @@
         const size_t ymax = (data >> (flit_width - 20)) & 0x1F;
 
-        int bhpos = NORMAL;
-        bool recovery = false;
-        if (is_reconfigurable()) {
-            bhpos    = blackhole_position();
-            recovery = is_recovery_routing_enabled();
-        }
-
-        const bool is_n  = recovery and (bhpos == N_OF_X);
-        const bool is_s  = recovery and (bhpos == S_OF_X);
-        const bool is_w  = recovery and (bhpos == W_OF_X);
-        const bool is_e  = recovery and (bhpos == E_OF_X);
-        const bool is_nw = recovery and (bhpos == NW_OF_X);
-        const bool is_ne = recovery and (bhpos == NE_OF_X);
-        const bool is_sw = recovery and (bhpos == SW_OF_X);
-        const bool is_se = recovery and (bhpos == SE_OF_X);
-
-        const bool special = ((data & 0x2) != 0) and recovery;
+        const int bhpos  = is_reconfigurable() ? blackhole_position() : NORMAL;
+        const bool is_n  = (bhpos == N_OF_X);
+        const bool is_s  = (bhpos == S_OF_X);
+        const bool is_w  = (bhpos == W_OF_X);
+        const bool is_e  = (bhpos == E_OF_X);
+        const bool is_nw = (bhpos == NW_OF_X);
+        const bool is_ne = (bhpos == NE_OF_X);
+        const bool is_sw = (bhpos == SW_OF_X);
+        const bool is_se = (bhpos == SE_OF_X);
+
+        const bool special = ((data & 0x2) != 0) and (bhpos != NORMAL);
 
         int sel = REQ_NOP;
Index: /branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/scripts/broadcast_check.sh
===================================================================
--- /branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/scripts/broadcast_check.sh	(revision 1019)
+++ /branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/scripts/broadcast_check.sh	(revision 1020)
@@ -4,29 +4,33 @@
 # @brief	This script validates that a broadcast transaction reaches once
 #			and only once every non-faulty router in the platform.
-file=$1
+fname=$1
+npkts=$2
+
 awk '
 BEGIN {
-	sent=0
-	last=0
-	failure=0
-	min=99999999
-	max=0
+	npkts=50
+
+	rcvpkts=0
+	nrecvrs=0
+
+	sndpkts=0
+	nsendrs=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;
+	sent=$6
+	if (sent > 0) {
+		if (nsendrs > 1) {
+			print "error: more than one initiator sent broadcast packets\n"
+			exit 1
+		}
+		if (sent != npkts) {
+			print "error: the number of sent broadcast packets does not "
+			print "correspond to the one specified\n"
+			exit 1
+		}
+		nsendrs++;
+		sndpkts=sent;
 	}
 }
@@ -34,15 +38,21 @@
 #   Parse the number of received broadcast packets
 /broadcast received packets +=/ {
-	if ($6 == 0) {
+	received=$6
+	if (received == 0) {
 		zero++;
 	}
 	else {
-		# store the min and max number of received packets
-		if ($6 < min) {
-			min=$6;
+		if (received != npkts) {
+			print "error: at least a router received a number of broadcast ";
+			if (received > npkts) {
+				print "greater than the number of broadcast sent\n";
+			}
+			else {
+				print "less than the number of broadcast sent\n";
+			}
+			exit 1
 		}
-		if ($6 > max) {
-			max=$6;
-		}
+		nrecvrs++;
+		rcvpkts=received
 	}
 }
@@ -56,11 +66,4 @@
 		exit 1;
 	}
-
-	if (max > sent) {
-		print "error: at least a router received a number of broadcast greater"
-		print "than the number of broadcast sent\n";
-		exit 1;
-	}
-
 	if (zero == 1) {
 		print "error: the broadcast source received broadcasts\n";
@@ -68,13 +71,8 @@
 	}
 
-	error=sent - min
-	if (error > 0) {
-		print "error: the number of broadcast received by a router is inferior "
-		print "to the error threshold: error = " error "\n";
-		exit 1;
-	}
-
+	print "sent: " sndpkts " / # senders: " nsendrs;
+	print "received: " rcvpkts " / # receivers " nrecvrs "\n";
 	exit 0;
-}' $file
+}' $fname
 if [[ $? == 1 ]]; then exit 1; fi
 
Index: /branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/scripts/run_broadcast_check.sh
===================================================================
--- /branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/scripts/run_broadcast_check.sh	(revision 1019)
+++ /branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/scripts/run_broadcast_check.sh	(revision 1020)
@@ -1,5 +1,9 @@
 #!/usr/bin/env sh
+XSIZE=10
+YSIZE=10
+NPKTS=50
+
 LOGDIR=logs
-COMMON="-X 5 -Y 5 -P 1500"
+COMMON="-X $XSIZE -Y $YSIZE -P $NPKTS"
 SCRIPTPATH=$(dirname $0)
 
@@ -9,8 +13,8 @@
 
 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
+for (( x = 0; x < $XSIZE; x++ )); do
+	for (( y = 0; y < $YSIZE; y++ )); do
+		for (( fx = 0; fx < $XSIZE; fx++ )); do
+			for (( fy = 0; fy < $YSIZE; fy++ )); do
 				if [[ ( $x == $fx ) && ( $y == $fy ) ]]; then continue; fi
 				LOGFILE=$LOGDIR/$(echo log'_'$x'_'$y'_'$fx'_'$fy);
@@ -18,5 +22,5 @@
 				echo "./simul.x $ARGS ($LOGFILE)"
 				./simul.x $ARGS > $LOGFILE 2>/dev/null;
-				$SCRIPTPATH/broadcast_check.sh $LOGFILE
+				$SCRIPTPATH/broadcast_check.sh $LOGFILE $NPKTS
 				if [[ $? == 1 ]]; then
 					echo "FAILURE";
