Index: trunk/platforms/tsar_generic_iob/arch.py
===================================================================
--- trunk/platforms/tsar_generic_iob/arch.py	(revision 965)
+++ trunk/platforms/tsar_generic_iob/arch.py	(revision 966)
@@ -14,12 +14,12 @@
 #  (global vsegs).
 #
-#  This platform includes 6 external peripherals, accessible through an IOB
+#  This platform includes 7 external peripherals, accessible through an IOB
 #  components located in cluster [0,0] or in cluster [x_size-1, y_size-1].
-#  Available peripherals are: TTY, HBA, FBF, ROM, NIC, CMA, PIC.
+#  Available peripherals are: TTY, IOC, FBF, ROM, NIC, CMA, PIC.
 #
 #  All clusters contain (nb_procs) processors, one L2 cache, one XCU, and
 #  one DMA controller.
 #
-#  The "constructor" parameters are:
+#  The "constructor" parameters (defined in Makefile) are:
 #  - x_size         : number of clusters in a row
 #  - y_size         : number of clusters in a column
@@ -27,7 +27,7 @@
 #  - nb_ttys        : number of TTY channels
 #  - fbf_width      : frame_buffer width = frame_buffer heigth
-#  - ioc_type       : can be 'BDV' , 'HBA' , 'SDC' , 'NONE'
-#
-#  The other hardware parameters are:
+#  - ioc_type       : can be 'BDV','HBA','SDC', but not 'RDK' 
+#
+#  The other hardware parameters (defined below) are:
 #  - nb_nics        : number of NIC channels
 #  - nb_cmas        : number of CMA channels
@@ -39,5 +39,5 @@
 #  - irq_per_proc   : number of input IRQs per processor
 #  - use_ramdisk    : use a ramdisk when True
-#  - vseg_increment : address increment for replicated peripherals
+#  - vseg_increment : address increment for replicated vsegs
 #
 #  Regarding the boot and kernel vsegs mapping :
@@ -71,6 +71,6 @@
     p_width         = 4
     paddr_width     = 40
-    irq_per_proc    = 4
-    peri_increment  = 0x10000    # distributed peripherals vbase address increment
+    irq_per_proc    = 4          # NetBSD constraint
+    peri_increment  = 0x10000  
 
     ### parameters checking
@@ -89,5 +89,5 @@
             ((x_io == x_size-1) and (y_io == y_size-1)) )
 
-    assert( ioc_type in IOCSUBTYPES )
+    assert( ioc_type in [ 'BDV' , 'HBA' , 'SDC' ] )
  
     ### define platform name
Index: trunk/platforms/tsar_generic_iob/top.cpp
===================================================================
--- trunk/platforms/tsar_generic_iob/top.cpp	(revision 965)
+++ trunk/platforms/tsar_generic_iob/top.cpp	(revision 966)
@@ -3,5 +3,5 @@
 // Author: Alain Greiner
 // Copyright: UPMC/LIP6
-// Date : august 2013
+// Date : august 2013 / updated march 2015
 // This program is released under the GNU public license
 ///////////////////////////////////////////////////////////////////////////////
@@ -18,5 +18,5 @@
 //
 // This I/0 bus is connected to internal address space through two IOB bridges
-// located in cluster[0][0] and cluster[X_SIZE-1][Åž_SIZE-1].
+// located in cluster[0][0] and cluster[X_SIZE-1][Y_SIZE-1].
 // 
 // The internal physical address space is 40 bits, and the cluster index
@@ -78,4 +78,7 @@
 //
 // The main hardware parameters must be defined in the hard_config.h file :
+// - X_WIDTH          : number of bits for x cluster coordinate
+// - Y_WIDTH          : number of bits for y cluster coordinate
+// - P_WIDTH          : number of bits for local processor coordinate
 // - X_SIZE           : number of clusters in a row
 // - Y_SIZE           : number of clusters in a column
@@ -91,6 +94,7 @@
 // - XCU_NB_WTI       : number of XCU WTIs (>= 4*NB_PROCS_MAX)
 // - XCU_NB_OUT       : number of XCU output IRQs (>= 4*NB_PROCS_MAX)
+// - USE_IOC_XYZ      : IOC type (XYZ in HBA / BDV / SDC)
 //
-// Some secondary hardware parameters must be defined in this top.cpp file:
+// Some other hardware parameters must be defined in this top.cpp file:
 // - XRAM_LATENCY     : external ram latency
 // - MEMC_WAYS        : L2 cache number of ways
@@ -319,5 +323,5 @@
    size_t   ncycles          = 4000000000;              // simulated cycles
    char     disk_name[256]   = DISK_IMAGE_NAME;         // pathname: disk image
-   ssize_t  threads_nr       = 1;                       // simulator's threads number
+   ssize_t  threads          = 1;                       // simulator's threads number
    bool     debug_ok         = false;                   // trace activated
    size_t   debug_memc_id    = 0xFFFFFFFF;              // index of traced memc
@@ -353,8 +357,4 @@
          {
             ncycles = atoi(argv[n+1]);
-         }
-         else if ((strcmp(argv[n],"-ROM") == 0) && (n+1<argc) )
-         {
-            strcpy(soft_name, argv[n+1]);
          }
          else if ((strcmp(argv[n],"-DEBUG") == 0) && (n+1<argc) )
@@ -374,5 +374,5 @@
             if( (x>=XMAX) || (y>=YMAX) )
             {
-                std::cout << "MEMCID parameter does'nt fit XMAX/YMAX" << std::endl;
+                std::cout << "MEMCID parameter doesn't fit XMAX/YMAX" << std::endl;
                 std::cout << " - MEMCID = " << std::hex << debug_memc_id << std::endl;
                 std::cout << " - XMAX   = " << std::hex << XMAX          << std::endl;
@@ -413,6 +413,6 @@
          else if ((strcmp(argv[n], "-THREADS") == 0) && ((n+1) < argc))
          {
-            threads_nr = atoi(argv[n+1]);
-            threads_nr = (threads_nr < 1) ? 1 : threads_nr;
+            threads = atoi(argv[n+1]);
+            threads = (threads < 1) ? 1 : threads;
          }
          else if ((strcmp(argv[n], "-FROZEN") == 0) && (n+1 < argc))
@@ -425,6 +425,4 @@
             std::cout << "   The order is not important." << std::endl;
             std::cout << "   Accepted arguments are :" << std::endl << std::endl;
-            std::cout << "     - ROM  pathname_for_embedded_soft" << std::endl;
-            std::cout << "     - DISK pathname_for_disk_image" << std::endl;
             std::cout << "     - NCYCLES number_of_simulated_cycles" << std::endl;
             std::cout << "     - DEBUG debug_start_cycle" << std::endl;
@@ -432,5 +430,4 @@
             std::cout << "     - FROZEN max_number_of_lines" << std::endl;
             std::cout << "     - MEMCID index_memc_to_be_traced" << std::endl;
-            std::cout << "     - XRAMID index_xram_to_be_traced" << std::endl;
             std::cout << "     - PROCID index_proc_to_be_traced" << std::endl;
             std::cout << "     - IOB    non_zero_value" << std::endl;
@@ -473,4 +470,7 @@
    assert( (NB_CMA_CHANNELS <= 4) and
            "The NB_CMA_CHANNELS parameter cannot be larger than 4" );
+
+   assert( (X_WIDTH == 4) and (Y_WIDTH == 4) and
+           "You must have X_WIDTH == Y_WIDTH == 4");
 
    std::cout << std::endl << std::dec
@@ -487,4 +487,7 @@
              << " - MAX_FROZEN      = " << frozen_cycles << std::endl
              << " - NCYCLES         = " << ncycles << std::endl
+             << " - SOFT_FILENAME   = " << soft_name << std::endl
+             << " - DISK_IMAGENAME  = " << disk_name << std::endl
+             << " - OPENMP THREADS  = " << threads << std::endl
              << " - DEBUG_PROCID    = " << debug_proc_id << std::endl
              << " - DEBUG_MEMCID    = " << debug_memc_id << std::endl
@@ -495,5 +498,5 @@
 #if USING_OPENMP
    omp_set_dynamic(false);
-   omp_set_num_threads(threads_nr);
+   omp_set_num_threads(threads);
    std::cerr << "Built with openmp version " << _OPENMP << std::endl;
 #endif
@@ -958,4 +961,5 @@
 
 #if ( USE_IOC_HBA )
+
     VciMultiAhci<vci_param_ext>*  disk;
     disk = new VciMultiAhci<vci_param_ext>( "disk",
@@ -967,5 +971,6 @@
                                             64,         // burst size (bytes)
                                             0 );        // disk latency
-#elif ( USE_IOC_BDV )
+#elif ( USE_IOC_BDV or USE_IOC_SDC )
+
     VciBlockDeviceTsar<vci_param_ext>*  disk;
     disk = new VciBlockDeviceTsar<vci_param_ext>( "disk",
@@ -977,7 +982,4 @@
                                                   64,         // burst size (bytes)
                                                   0 );        // disk latency
-#else 
-    std::cout << "Error in tsar_generic_iob : only HBA & BDV are supported" << std::endl;
-    exit(0);
 #endif
 
