Index: /branches/reconfiguration/platforms/tsar_generic_iob/scripts/arch.py
===================================================================
--- /branches/reconfiguration/platforms/tsar_generic_iob/scripts/arch.py	(revision 925)
+++ /branches/reconfiguration/platforms/tsar_generic_iob/scripts/arch.py	(revision 926)
@@ -101,6 +101,6 @@
     mmc_size = 0x1000                     # 4 Kbytes
 
-    rom_base = 0x00BFC00000
-    rom_size = 0x8000                     # 32 Kbytes
+    drom_base = 0x00BFC00000
+    drom_size = 0x8000                    # 32 Kbytes
 
     offset_io = pmsb(X_IO, Y_IO) << (PADDR_WIDTH - X_WIDTH - Y_WIDTH)
@@ -129,4 +129,7 @@
     iob_base = 0x00BE000000 + offset_io
     iob_size = 0x1000                     # 4 kbytes
+
+    rom_base = 0x00BA000000
+    rom_size = 0x8000                     # 32 Kbytes
 
     # create mapping
@@ -170,4 +173,7 @@
                       ptype='SIM')
 
+    mapping.addPeriph('ROM', base=rom_base, size=rom_size,
+                      ptype='ROM')
+
     pic = mapping.addPeriph('PIC', base=pic_base, size=pic_size,
                             ptype='PIC', channels=32)
@@ -196,6 +202,6 @@
                               ptype='MMC')
 
-            mapping.addPeriph('ROM', base=rom_base + offset, size=rom_size,
-                              ptype='ROM')
+            mapping.addPeriph('DROM', base=drom_base + offset, size=drom_size,
+                              ptype='DROM')
 
             dma = mapping.addPeriph('DMA', base=dma_base + offset,
@@ -336,5 +342,5 @@
 
     # for the Giet-VM is not necessary to map the replicated ROMs
-    mapping.addGlobal('seg_rom', rom_base, rom_size, 'CX__', vtype='PERI',
+    mapping.addGlobal('seg_rom', drom_base, drom_size, 'CX__', vtype='PERI',
                       x=X_IO, y=Y_IO, pseg='ROM', local=False, big=True)
 
Index: /branches/reconfiguration/platforms/tsar_generic_iob/scripts/onerun.py
===================================================================
--- /branches/reconfiguration/platforms/tsar_generic_iob/scripts/onerun.py	(revision 925)
+++ /branches/reconfiguration/platforms/tsar_generic_iob/scripts/onerun.py	(revision 926)
@@ -69,9 +69,5 @@
         os.unlink(dst)
 
-    os.symlink(os.path.join(basedir, "soft/config/boot_config.h"), dst)
-
-    # stop after compiling the platform when the compile-only option is activated
-    if args.compileonly == True:
-        exit(0)
+    os.symlink(os.path.join(basedir, "soft/test/config/boot_config.h"), dst)
 
     print "[ run.py ] compiling distributed boot procedure"
@@ -82,4 +78,8 @@
     subprocess.call(command, stdout=logfile, stderr=logfile)
 
+    # stop after compiling when the compile-only option is activated
+    if args.compileonly == True:
+        exit(0)
+
     # 5. execute simulator
     os.environ["DISTRIBUTED_BOOT"] = "1"
@@ -88,14 +88,11 @@
         os.environ["SOCLIB_TTY"] = "FILES"
 
-    ompthreads = (args.x * args.y) / 4
-    cpucount = multiprocessing.cpu_count()
-    if ompthreads > cpucount: ompthreads = cpucount
-
     print "[ run.py ] starting simulation"
     command = []
     command.extend([os.path.join(basedir, "simul.x")])
-    command.extend(["-SOFT", os.path.join(basedir, "soft/build/soft.elf")])
-    command.extend(["-DISK", "/dev/null"])
-    command.extend(["-THREADS", str(ompthreads)])
+    command.extend(["-DSOFT", os.path.join(basedir, "soft/build/soft.elf")])
+    command.extend(["-SOFT", os.path.join(basedir,
+                   "soft/loader/build/loader.elf")])
+    command.extend(["-DISK", "file.dmg"])
 
     if args.faultyrouter != None:
@@ -104,4 +101,5 @@
             command.extend(["-FAULTY_ROUTER", str(f[0]), str(f[1]), str(f[2])])
 
+    ompthreads = 1
     if args.debug != None:
         command.extend(["-DEBUG", str(args.debug[0])]);
@@ -109,8 +107,16 @@
         command.extend(["-PROCID", str(args.debug[2])]);
         command.extend(["-MEMCID", str(args.debug[3])]);
+
     elif os.environ.get('SOCLIB_GDB') == None:
+        ompthreads = (args.x * args.y) / 4
+        cpucount = multiprocessing.cpu_count()
+        if ompthreads > cpucount:
+            ompthreads = cpucount
+
         # the procedure grows linearly with the diameter of the mesh.
-        maxcycles = 400000 + (args.x + args.y) * 20000;
+        maxcycles = 1500000 + (args.x + args.y) * 20000
         command.extend(["-NCYCLES", str(maxcycles)])
+
+    command.extend(["-THREADS", str(ompthreads)])
 
     logfile.write("Execute: {0}\n".format(" ".join(command)))
Index: /branches/reconfiguration/platforms/tsar_generic_iob/top.cpp
===================================================================
--- /branches/reconfiguration/platforms/tsar_generic_iob/top.cpp	(revision 925)
+++ /branches/reconfiguration/platforms/tsar_generic_iob/top.cpp	(revision 926)
@@ -133,5 +133,4 @@
 #include "vci_framebuffer.h"
 #include "vci_iox_network.h"
-#include "vci_iox_network.h"
 #include "vci_iopic.h"
 #include "vci_simhelper.h"
@@ -213,10 +212,4 @@
 
 #define cluster(x, y)   ((y) + ((x) << Y_WIDTH))
-
-////////////////////////////////////////////////////////////
-//    Software to be loaded in ROM & RAM
-//////////////////////i/////////////////////////////////////
-
-#define BOOT_SOFT_NAME        "../../softs/tsar_boot/preloader.elf"
 
 ////////////////////////////////////////////////////////////
@@ -272,5 +265,5 @@
 #define INT_XICU_TGT_ID              1
 #define INT_MDMA_TGT_ID              2
-#define INT_BROM_TGT_ID              3
+#define INT_DROM_TGT_ID              3
 #define INT_IOBX_TGT_ID              4
 
@@ -299,6 +292,7 @@
 #define IOX_IOPI_TGT_ID              5
 #define IOX_SIMH_TGT_ID              6
-#define IOX_IOB0_TGT_ID              7
-#define IOX_IOB1_TGT_ID              8
+#define IOX_ROM_TGT_ID               7
+#define IOX_IOB0_TGT_ID              8
+#define IOX_IOB1_TGT_ID              9
 
 #define IOX_BDEV_INI_ID              0
@@ -317,5 +311,6 @@
 
 
-   char     soft_name[256]   = BOOT_SOFT_NAME;    // pathname: binary code
+   char     dsoft_name[256]  = "";                // pathname: binary code
+   char     soft_name[256]   = "";                // pathname: binary code
    size_t   ncycles          = UINT_MAX;          // simulated cycles
    char     disk_name[256]   = BDEV_IMAGE_NAME;   // pathname: disk image
@@ -348,4 +343,8 @@
          {
             strcpy(soft_name, argv[n+1]);
+         }
+         else if ((strcmp(argv[n], "-DSOFT") == 0) && (n+1<argc) )
+         {
+            strcpy(dsoft_name, argv[n+1]);
          }
          else if ((strcmp(argv[n], "-DEBUG") == 0) && (n+1<argc) )
@@ -444,4 +443,5 @@
             std::cout << "   Accepted arguments are :" << std::endl << std::endl;
             std::cout << "     -SOFT pathname_for_embedded_soft" << std::endl;
+            std::cout << "     -DSOFT pathname_for_distributed_embedded_soft" << std::endl;
             std::cout << "     -DISK pathname_for_disk_image" << std::endl;
             std::cout << "     -NCYCLES number_of_simulated_cycles" << std::endl;
@@ -580,8 +580,8 @@
                      IntTab(cluster(x, y), INT_MDMA_TGT_ID), not cacheable));
 
-         std::ostringstream    sbrom;
-         sbrom << "int_seg_brom_" << x << "_" << y;
-         maptab_int.add(Segment(sbrom.str(), SEG_ROM_BASE+offset, SEG_ROM_SIZE,
-                     IntTab(cluster(x, y), INT_BROM_TGT_ID), cacheable));
+         std::ostringstream    sdrom;
+         sdrom << "int_seg_drom_" << x << "_" << y;
+         maptab_int.add(Segment(sdrom.str(), SEG_DROM_BASE+offset, SEG_DROM_SIZE,
+                     IntTab(cluster(x, y), INT_DROM_TGT_ID), cacheable));
 
          // the following segments are only defined in cluster_iob0 or in cluster_iob1
@@ -628,4 +628,9 @@
             maptab_int.add(Segment(ssim.str(), SEG_SIM_BASE+offset, SEG_SIM_SIZE,
                         IntTab(cluster(x, y), INT_IOBX_TGT_ID), not cacheable));
+
+            std::ostringstream    srom;
+            srom << "int_seg_rom_" << x << "_" << y;
+            maptab_int.add(Segment(srom.str(), SEG_ROM_BASE+offset, SEG_ROM_SIZE,
+                        IntTab(cluster(x, y), INT_IOBX_TGT_ID), cacheable));
          }
 
@@ -711,5 +716,5 @@
     // - two levels srcid decoding for responses
     // - 5 initiators (IOB0, IOB1, BDEV, CDMA, IOPI)
-    // - 9 targets (IOB0, IOB1, BDEV, CDMA, MTTY, FBUF, BROM, MNIC, IOPI)
+    // - 9 targets (IOB0, IOB1, BDEV, CDMA, MTTY, FBUF, ROM, MNIC, IOPI)
     //
     // Address bit 32 is used to determine if a command must be routed to
@@ -743,4 +748,6 @@
     maptab_iox.add(Segment("iox_seg_simh_0", SEG_SIM_BASE + iob0_base, SEG_SIM_SIZE,
                    IntTab(0, IOX_SIMH_TGT_ID), false));
+    maptab_iox.add(Segment("iox_seg_rom_0", SEG_ROM_BASE + iob0_base, SEG_ROM_SIZE,
+                   IntTab(0, IOX_ROM_TGT_ID), false));
 
     if ( cluster_iob0 != cluster_iob1 )
@@ -763,4 +770,6 @@
         maptab_iox.add(Segment("iox_seg_simh_1", SEG_SIM_BASE + iob1_base, SEG_SIM_SIZE,
                    IntTab(0, IOX_SIMH_TGT_ID), false));
+        maptab_iox.add(Segment("iox_seg_rom_1", SEG_ROM_BASE + iob1_base, SEG_ROM_SIZE,
+                   IntTab(0, IOX_ROM_TGT_ID), false));
     }
 
@@ -858,4 +867,5 @@
     VciSignals<vci_param_ext>         signal_vci_tgt_iopi("signal_vci_ini_iopi");
     VciSignals<vci_param_ext>         signal_vci_tgt_simh("signal_vci_ini_simh");
+    VciSignals<vci_param_ext>         signal_vci_tgt_rom("signal_vci_ini_rom");
 
    // Horizontal inter-clusters INT network DSPIN
@@ -929,5 +939,5 @@
                                  almos_kernel_pathname);
 #else
-   soclib::common::Loader loader(soft_name);
+   soclib::common::Loader loader(soft_name, dsoft_name);
 #endif
 
@@ -946,5 +956,5 @@
 
    const size_t nb_iox_initiators = (cluster_iob0 != cluster_iob1) ? 5 : 4;
-   const size_t nb_iox_targets = (cluster_iob0 != cluster_iob1) ? 9 : 8;
+   const size_t nb_iox_targets = (cluster_iob0 != cluster_iob1) ? 10 : 9;
 
    // IOX network
@@ -1022,4 +1032,12 @@
                                           maptab_iox );
 
+   // External ROM
+   VciSimpleRom<vci_param_ext>* rom;
+   rom = new VciSimpleRom<vci_param_ext>("rom",
+                                          IntTab(0, IOX_ROM_TGT_ID),
+                                          maptab_iox,
+                                          loader,
+                                          X_WIDTH + Y_WIDTH );
+
    // Clusters
    TsarIobCluster<vci_param_int,
@@ -1089,5 +1107,5 @@
                 INT_XICU_TGT_ID,
                 INT_MDMA_TGT_ID,
-                INT_BROM_TGT_ID,
+                INT_DROM_TGT_ID,
                 INT_IOBX_TGT_ID,
 
@@ -1202,4 +1220,5 @@
     iox_network->p_to_tgt[IOX_IOPI_TGT_ID]               (signal_vci_tgt_iopi);
     iox_network->p_to_tgt[IOX_SIMH_TGT_ID]               (signal_vci_tgt_simh);
+    iox_network->p_to_tgt[IOX_ROM_TGT_ID]                (signal_vci_tgt_rom);
 
     if (cluster_iob0 != cluster_iob1)
@@ -1285,4 +1304,9 @@
     simh->p_vci(signal_vci_tgt_simh);
 
+    // External ROM connexion
+    rom->p_clk(signal_clk);
+    rom->p_resetn(signal_resetn);
+    rom->p_vci(signal_vci_tgt_rom);
+
     // IOB0 cluster connexion to IOX network
     (*clusters[0][0]->p_vci_iob_iox_ini) (signal_vci_ini_iob0);
Index: /branches/reconfiguration/platforms/tsar_generic_iob/top.desc
===================================================================
--- /branches/reconfiguration/platforms/tsar_generic_iob/top.desc	(revision 925)
+++ /branches/reconfiguration/platforms/tsar_generic_iob/top.desc	(revision 926)
@@ -40,8 +40,4 @@
                   cell_size = vci_cell_size_ext),
 
-            # ROM
-            Uses('caba:vci_simple_rom',
-                  cell_size   = vci_cell_size_ext),
-
             # Frame Buffer
             Uses('caba:vci_framebuffer',
@@ -72,4 +68,8 @@
                   cell_size = vci_cell_size_ext),
 
+            # ROM
+            Uses('caba:vci_simple_rom',
+                  cell_size = vci_cell_size_ext),
+
             Uses('common:elf_file_loader'),
             Uses('common:plain_file_loader'),
Index: /branches/reconfiguration/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/include/tsar_iob_cluster.h
===================================================================
--- /branches/reconfiguration/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/include/tsar_iob_cluster.h	(revision 925)
+++ /branches/reconfiguration/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/include/tsar_iob_cluster.h	(revision 926)
@@ -96,5 +96,5 @@
     VciSignals<vci_param_int>             signal_int_vci_tgt_xicu;
     VciSignals<vci_param_int>             signal_int_vci_tgt_mdma;
-    VciSignals<vci_param_int>             signal_int_vci_tgt_brom;
+    VciSignals<vci_param_int>             signal_int_vci_tgt_drom;
     VciSignals<vci_param_int>             signal_int_vci_tgt_iobx;
 
@@ -149,5 +149,5 @@
     VciMultiDma<vci_param_int>*                       mdma;
 
-    VciSimpleRom<vci_param_int>*                      brom;
+    VciSimpleRom<vci_param_int>*                      drom;
 
     VciLocalCrossbar<vci_param_int>*                  int_xbar_d;
@@ -212,5 +212,5 @@
                     size_t                             int_xicu_tgt_id,
                     size_t                             int_mdma_tgt_id,
-                    size_t                             int_brom_tgt_id,
+                    size_t                             int_drom_tgt_id,
                     size_t                             int_iobx_tgt_id,
                     size_t                             int_proc_ini_id,
Index: /branches/reconfiguration/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/src/tsar_iob_cluster.cpp
===================================================================
--- /branches/reconfiguration/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/src/tsar_iob_cluster.cpp	(revision 925)
+++ /branches/reconfiguration/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/src/tsar_iob_cluster.cpp	(revision 926)
@@ -51,5 +51,5 @@
         size_t                             int_xicu_tgt_id, // local index
         size_t                             int_mdma_tgt_id, // local index
-        size_t                             int_brom_tgt_id, // local index
+        size_t                             int_drom_tgt_id, // local index
         size_t                             int_iobx_tgt_id, // local index
 
@@ -210,10 +210,10 @@
                      nb_dmas);                            // number of IRQs
 
-    ///////////   DISTRIBUTED BOOT ROM
-    std::ostringstream s_brom;
-    s_brom << "brom_" << x_id << "_" << y_id;
-    brom = new VciSimpleRom<vci_param_int>(
-                     s_brom.str().c_str(),
-                     IntTab(cluster_id, int_brom_tgt_id),
+    ///////////   DISTRIBUTED ROM
+    std::ostringstream s_drom;
+    s_drom << "drom_" << x_id << "_" << y_id;
+    drom = new VciSimpleRom<vci_param_int>(
+                     s_drom.str().c_str(),
+                     IntTab(cluster_id, int_drom_tgt_id),
                      mt_int,
                      loader,
@@ -473,5 +473,5 @@
     int_xbar_d->p_to_target[int_xicu_tgt_id]          (signal_int_vci_tgt_xicu);
     int_xbar_d->p_to_target[int_mdma_tgt_id]          (signal_int_vci_tgt_mdma);
-    int_xbar_d->p_to_target[int_brom_tgt_id]          (signal_int_vci_tgt_brom);
+    int_xbar_d->p_to_target[int_drom_tgt_id]          (signal_int_vci_tgt_drom);
     int_xbar_d->p_to_initiator[int_mdma_ini_id]       (signal_int_vci_ini_mdma);
     for (size_t p = 0; p < nb_procs; p++)
@@ -597,8 +597,8 @@
         mdma->p_irq[i]                           (signal_irq_mdma[i]);
 
-    /////////////////////////////////// BROM
-    brom->p_clk                                  (this->p_clk);
-    brom->p_resetn                               (this->p_resetn);
-    brom->p_vci                                  (signal_int_vci_tgt_brom);
+    /////////////////////////////////// DROM
+    drom->p_clk                                  (this->p_clk);
+    drom->p_resetn                               (this->p_resetn);
+    drom->p_vci                                  (signal_int_vci_tgt_drom);
 
     //////////////////////////// RAM network CMD & RSP routers
