Index: branches/reconfiguration/platforms/tsar_generic_iob/scripts/run.py
===================================================================
--- branches/reconfiguration/platforms/tsar_generic_iob/scripts/run.py	(revision 774)
+++ branches/reconfiguration/platforms/tsar_generic_iob/scripts/run.py	(revision 775)
@@ -7,4 +7,5 @@
 import subprocess
 import arch
+import faultyprocs
 
 # define constants
@@ -14,4 +15,6 @@
 configs.append([8 ,8 ])
 configs.append([16,16])
+
+faultylist = [[(0,0,1), (0,1,1), (1,0,1), (1,0,2), (1,0,3), (1,1,1), (1,1,3)]]
 
 nprocs = 4
@@ -23,51 +26,51 @@
 
 # repeat while configurations is not empty
-for x,y in configs:
-    confdir = os.getcwd() + "conf/config_{}c/".format(x*y)
+for faulty in faultylist:
+    for x,y in configs:
+        confdir = os.getcwd() + "conf/config_{}c/".format(x*y)
 
-    # 1. generate configuration and ouput directories
-    try:
-        os.makedirs(confdir + "config", 0755)
-    except OSError:
-        pass # directory already exists => do nothing
+        # 1. generate configuration and ouput directories
+        try:
+            os.makedirs(confdir + "config", 0755)
+        except OSError:
+            pass # directory already exists => do nothing
 
-    # 2. generate hard_config.h and fault_config.h files
-    arch.main( x = x, y = y, p = nprocs,
-               hard_path = confdir + "config/hard_config.h",
-               xml_path = confdir + "config/map.xml" )
+        # 2. generate hard_config.h and fault_config.h files
+        arch.main( x = x, y = y, p = nprocs,
+                   hard_path = confdir + "config/hard_config.h",
+                   xml_path = confdir + "config/map.xml" )
+        faultyprocs.generate(faulty, confdir + "config/fault_config.h")
 
-    # 3. compile simulator executable
-    if os.path.exists("hard_config.h"): os.unlink("hard_config.h")
-    os.symlink(confdir + "config/hard_config.h", "hard_config.h")
-    subprocess.call("make")
+        # 3. compile simulator executable
+        if os.path.exists("hard_config.h"): os.unlink("hard_config.h")
+        os.symlink(confdir + "config/hard_config.h", "hard_config.h")
+        subprocess.call("make")
 
-    # 4. compile distributed boot executable
-    dst = confdir + "config/boot_config.h"
-    if not os.path.exists(dst):
-        os.symlink(os.getcwd() + "/soft/config/boot_config.h", dst)
-    dst = confdir + "config/fault_config.h"
-    if not os.path.exists(dst):
-        os.symlink(os.getcwd() + "/soft/config/fault_config.h", dst)
-    subprocess.call(["make",
-        "-C", "soft",
-        "CONFDIR=" + confdir
-        ])
+        # 4. compile distributed boot executable
+        dst = confdir + "config/boot_config.h"
+        if not os.path.exists(dst):
+            os.symlink(os.getcwd() + "/soft/config/boot_config.h", dst)
+        subprocess.call(["make",
+            "-C", "soft",
+            "CONFDIR=" + confdir
+            ])
 
-    # 5. execute simulator
-    os.environ["DISTRIBUTED_BOOT"] = "1"
-    os.environ["SOCLIB_TTY"] = "FILES"
-    with open(confdir + "log", "w") as log_file:
-        subprocess.call(["./simul.x",
-            "-SOFT"   , "soft/build/soft.elf",
-            "-DISK"   , "/dev/null",
-            "-NCYCLES", "10000000"],
-            stdout=log_file,
-            stderr=log_file,
-            )
+        # 5. execute simulator
+        os.environ["DISTRIBUTED_BOOT"] = "1"
+        os.environ["SOCLIB_TTY"] = "FILES"
+        with open(confdir + "log", "w") as log_file:
+            subprocess.call(["./simul.x",
+                "-SOFT"   , "soft/build/soft.elf",
+                "-DISK"   , "/dev/null",
+                "-NCYCLES", "10000000"],
+                stdout=log_file,
+                stderr=log_file,
+                )
 
-    # 6. move simulation terminal output into the target config dir
-    os.rename("term0", confdir + "term")
+        # 6. move simulation terminal output into the target config dir
+        os.rename("term0", confdir + "term")
 
-# end repeat
+        # end for each config
+    #end for each faulty
 
 # vim: tabstop=4 : softtabstop=4 : shiftwidth=4 : expandtab
