Index: /trunk/platforms/tsar_generic_iob/arch.py
===================================================================
--- /trunk/platforms/tsar_generic_iob/arch.py	(revision 964)
+++ /trunk/platforms/tsar_generic_iob/arch.py	(revision 965)
@@ -16,5 +16,5 @@
 #  This platform includes 6 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, BDV, FBF, ROM, NIC, CMA, PIC.
+#  Available peripherals are: TTY, HBA, FBF, ROM, NIC, CMA, PIC.
 #
 #  All clusters contain (nb_procs) processors, one L2 cache, one XCU, and
@@ -27,4 +27,5 @@
 #  - 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:
@@ -57,5 +58,6 @@
           nb_procs  = 2,
           nb_ttys   = 1,
-          fbf_width = 128 ):
+          fbf_width = 128,
+          ioc_type  = 'BDV' ):
 
     ### define architecture constants
@@ -70,5 +72,4 @@
     paddr_width     = 40
     irq_per_proc    = 4
-    use_ramdisk     = False
     peri_increment  = 0x10000    # distributed peripherals vbase address increment
 
@@ -88,8 +89,10 @@
             ((x_io == x_size-1) and (y_io == y_size-1)) )
 
-    ### define type and name
-
-    platform_type  = 'tsar_iob'
-    platform_name  = '%s_%d_%d_%d' % ( platform_type, x_size, y_size , nb_procs )
+    assert( ioc_type in IOCSUBTYPES )
+ 
+    ### define platform name
+
+    platform_name = 'tsar_iob_%d_%d_%d' % ( x_size, y_size , nb_procs )
+    platform_name += '_%d_%d_%s' % ( fbf_width , nb_ttys , ioc_type )
 
     ### define physical segments replicated in all clusters
@@ -110,6 +113,6 @@
     ## These segments are only defined in cluster_io
 
-    bdv_base  = 0x00B3000000
-    bdv_size  = 0x1000                     # 4kbytes
+    ioc_base  = 0x00B3000000
+    ioc_size  = 0x1000                     # 4 Kbytes
 
     tty_base  = 0x00B4000000
@@ -186,5 +189,5 @@
                        coherence      = True,          
                        irq_per_proc   = irq_per_proc,  
-                       use_ramdisk    = use_ramdisk,  
+                       use_ramdisk    = (ioc_type == 'RDK'),
                        x_io           = x_io,          
                        y_io           = y_io,
@@ -234,6 +237,6 @@
                                          ptype = 'IOB' )
 
-                bdv = mapping.addPeriph( 'BDV', base = bdv_base + offset, size = bdv_size, 
-                                         ptype = 'IOC', subtype = 'BDV' )
+                ioc = mapping.addPeriph( 'IOC', base = ioc_base + offset, size = ioc_size, 
+                                         ptype = 'IOC', subtype = ioc_type )
 
                 tty = mapping.addPeriph( 'TTY', base = tty_base + offset, size = tty_size, 
@@ -266,5 +269,9 @@
                 mapping.addIrq( pic, index = 7,  isrtype = 'ISR_CMA'   , channel = 3 )
 
-                mapping.addIrq( pic, index = 8,  isrtype = 'ISR_BDV'   , channel = 0 )
+                if ( ioc_type == 'BDV' ): isr_ioc = 'ISR_BDV'
+                if ( ioc_type == 'HBA' ): isr_ioc = 'ISR_HBA'
+                if ( ioc_type == 'SDC' ): isr_ioc = 'ISR_SDC'
+
+                mapping.addIrq( pic, index = 8,  isrtype = isr_ioc     , channel = 0 )
 
                 mapping.addIrq( pic, index = 16, isrtype = 'ISR_TTY_RX', channel = 0 )
@@ -310,13 +317,15 @@
 
     ### global vsegs kernel_code, kernel_init : big / local
-    ### replicated in all clusters with the same name & same vbase
-    for x in xrange( x_size ):
-        for y in xrange( y_size ):
-            mapping.addGlobal( 'seg_kernel_code', kernel_code_vbase, kernel_code_size,
+    ### replicated in all clusters with indexed name & same vbase
+    for x in xrange( x_size ):
+        for y in xrange( y_size ):
+            mapping.addGlobal( 'seg_kernel_code_%d_%d' %(x,y), 
+                               kernel_code_vbase, kernel_code_size,
                                'CXW_', vtype = 'ELF', x = x , y = y , pseg = 'RAM',
                                binpath = 'build/kernel/kernel.elf', 
                                local = True, big = True )
 
-            mapping.addGlobal( 'seg_kernel_init', kernel_init_vbase, kernel_init_size,
+            mapping.addGlobal( 'seg_kernel_init_%d_%d' %(x,y), 
+                               kernel_init_vbase, kernel_init_size,
                                'CXW_', vtype = 'ELF', x = x , y = y , pseg = 'RAM',
                                binpath = 'build/kernel/kernel.elf', 
@@ -358,6 +367,6 @@
                        local = False, big = True )
 
-    mapping.addGlobal( 'seg_bdv', bdv_base, bdv_size, '__W_',
-                       vtype = 'PERI', x = 0, y = 0, pseg = 'BDV',
+    mapping.addGlobal( 'seg_ioc', ioc_base, ioc_size, '__W_',
+                       vtype = 'PERI', x = 0, y = 0, pseg = 'IOC',
                        local = False, big = True )
 
Index: /trunk/platforms/tsar_generic_iob/top.cpp
===================================================================
--- /trunk/platforms/tsar_generic_iob/top.cpp	(revision 964)
+++ /trunk/platforms/tsar_generic_iob/top.cpp	(revision 965)
@@ -14,5 +14,5 @@
 // - MNIC : Network controller (up to 2 channels)
 // - CDMA : Chained Buffer DMA controller (up to 4 channels)
-// - BDEV : Dlock Device controler (one channel)
+// - DISK : Block device controler (BDV / HBA / SDC)
 // - IOPI : HWI to SWI translator.
 //
@@ -45,5 +45,5 @@
 // - IOPIC HWI[3:2]     connected to IRQ_NIC_TX[1:0]
 // - IOPIC HWI[7:4]     connected to IRQ_CMA_TX[3:0]]
-// - IOPIC HWI[8]       connected to IRQ_BDEV
+// - IOPIC HWI[8]       connected to IRQ_DISK
 // - IOPIC HWI[31:16]   connected to IRQ_TTY_RX[15:0]
 //
@@ -100,5 +100,5 @@
 // - L1_DWAYS
 // - L1_DSETS
-// - BDEV_IMAGE_NAME  : file pathname for block device
+// - DISK_IMAGE_NAME  : file pathname for block device
 //
 // General policy for 40 bits physical address decoding:
@@ -132,7 +132,7 @@
 #include "vci_multi_nic.h"
 #include "vci_simple_rom.h"
+#include "vci_multi_ahci.h"
 #include "vci_block_device_tsar.h"
 #include "vci_framebuffer.h"
-#include "vci_iox_network.h"
 #include "vci_iox_network.h"
 #include "vci_iopic.h"
@@ -210,5 +210,5 @@
 #define L1_DSETS              64
 
-#define BDEV_IMAGE_NAME       "../../../giet_vm/hdd/virt_hdd.dmg"
+#define DISK_IMAGE_NAME       "../../../giet_vm/hdd/virt_hdd.dmg"
 
 #define ROM_SOFT_NAME         "../../softs/tsar_boot/preloader.elf"
@@ -247,5 +247,5 @@
 // - Internal initiators (procs, mdma) are replicated in all clusters,
 //   and each initiator has one single SRCID.
-// - External initiators (bdev, cdma) are not replicated, but can be
+// - External initiators (disk, cdma) are not replicated, but can be
 //   accessed in 2 clusters : cluster_iob0 and cluster_iob1.
 //   They have the same local index, but two different cluster indexes.
@@ -263,5 +263,5 @@
 #define MEMC_LOCAL_SRCID             0xA
 #define CDMA_LOCAL_SRCID             0xB
-#define BDEV_LOCAL_SRCID             0xC
+#define DISK_LOCAL_SRCID             0xC
 #define IOPI_LOCAL_SRCID             0xD
 
@@ -293,5 +293,5 @@
 
 #define IOX_FBUF_TGT_ID              0
-#define IOX_BDEV_TGT_ID              1
+#define IOX_DISK_TGT_ID              1
 #define IOX_MNIC_TGT_ID              2
 #define IOX_CDMA_TGT_ID              3
@@ -302,5 +302,5 @@
 #define IOX_IOB1_TGT_ID              8
 
-#define IOX_BDEV_INI_ID              0
+#define IOX_DISK_INI_ID              0
 #define IOX_CDMA_INI_ID              1
 #define IOX_IOPI_INI_ID              2
@@ -316,8 +316,7 @@
    using namespace soclib::common;
 
-
    char     soft_name[256]   = ROM_SOFT_NAME;           // pathname: binary code
    size_t   ncycles          = 4000000000;              // simulated cycles
-   char     disk_name[256]   = BDEV_IMAGE_NAME;         // pathname: disk image
+   char     disk_name[256]   = DISK_IMAGE_NAME;         // pathname: disk image
    ssize_t  threads_nr       = 1;                       // simulator's threads number
    bool     debug_ok         = false;                   // trace activated
@@ -585,7 +584,7 @@
                         IntTab(cluster(x,y), INT_IOBX_TGT_ID), not cacheable));
 
-            std::ostringstream    sbdv;
-            sbdv << "int_seg_bdev_" << x << "_" << y;
-            maptab_int.add(Segment(sbdv.str(), SEG_IOC_BASE+offset, SEG_IOC_SIZE,
+            std::ostringstream    sdsk;
+            sdsk << "int_seg_disk_" << x << "_" << y;
+            maptab_int.add(Segment(sdsk.str(), SEG_IOC_BASE+offset, SEG_IOC_SIZE,
                         IntTab(cluster(x,y), INT_IOBX_TGT_ID), not cacheable));
 
@@ -667,8 +666,8 @@
                           IntTab( cluster_iob1, RAM_IOBX_INI_ID ) );
 
-    maptab_ram.srcid_map( IntTab( cluster_iob0, BDEV_LOCAL_SRCID ),
+    maptab_ram.srcid_map( IntTab( cluster_iob0, DISK_LOCAL_SRCID ),
                           IntTab( cluster_iob0, RAM_IOBX_INI_ID ) );
 
-    maptab_ram.srcid_map( IntTab( cluster_iob1, BDEV_LOCAL_SRCID ),
+    maptab_ram.srcid_map( IntTab( cluster_iob1, DISK_LOCAL_SRCID ),
                           IntTab( cluster_iob1, RAM_IOBX_INI_ID ) );
 
@@ -691,6 +690,6 @@
     // - two levels address decoding for commands (9, 7) bits
     // - two levels srcid decoding for responses
-    // - 5 initiators (IOB0, IOB1, BDEV, CDMA, IOPI)
-    // - 9 targets (IOB0, IOB1, BDEV, CDMA, MTTY, FBUF, BROM, MNIC, IOPI)
+    // - 5 initiators (IOB0, IOB1, DISK, CDMA, IOPI)
+    // - 9 targets (IOB0, IOB1, DISK, CDMA, MTTY, FBUF, BROM, MNIC, IOPI)
     //
     // Address bit 32 is used to determine if a command must be routed to
@@ -714,6 +713,6 @@
     maptab_iox.add(Segment("iox_seg_fbuf_0", SEG_FBF_BASE + iob0_base, SEG_FBF_SIZE,
                    IntTab(0, IOX_FBUF_TGT_ID), false));
-    maptab_iox.add(Segment("iox_seg_bdev_0", SEG_IOC_BASE + iob0_base, SEG_IOC_SIZE,
-                   IntTab(0, IOX_BDEV_TGT_ID), false));
+    maptab_iox.add(Segment("iox_seg_disk_0", SEG_IOC_BASE + iob0_base, SEG_IOC_SIZE,
+                   IntTab(0, IOX_DISK_TGT_ID), false));
     maptab_iox.add(Segment("iox_seg_mnic_0", SEG_NIC_BASE + iob0_base, SEG_NIC_SIZE,
                    IntTab(0, IOX_MNIC_TGT_ID), false));
@@ -734,6 +733,6 @@
         maptab_iox.add(Segment("iox_seg_fbuf_1", SEG_FBF_BASE + iob1_base, SEG_FBF_SIZE,
                    IntTab(0, IOX_FBUF_TGT_ID), false));
-        maptab_iox.add(Segment("iox_seg_bdev_1", SEG_IOC_BASE + iob1_base, SEG_IOC_SIZE,
-                   IntTab(0, IOX_BDEV_TGT_ID), false));
+        maptab_iox.add(Segment("iox_seg_disk_1", SEG_IOC_BASE + iob1_base, SEG_IOC_SIZE,
+                   IntTab(0, IOX_DISK_TGT_ID), false));
         maptab_iox.add(Segment("iox_seg_mnic_1", SEG_NIC_BASE + iob1_base, SEG_NIC_SIZE,
                    IntTab(0, IOX_MNIC_TGT_ID), false));
@@ -794,6 +793,6 @@
     maptab_iox.srcid_map( IntTab( 0, CDMA_LOCAL_SRCID ) ,
                           IntTab( 0, IOX_CDMA_INI_ID  ) );
-    maptab_iox.srcid_map( IntTab( 0, BDEV_LOCAL_SRCID ) ,
-                          IntTab( 0, IOX_BDEV_INI_ID  ) );
+    maptab_iox.srcid_map( IntTab( 0, DISK_LOCAL_SRCID ) ,
+                          IntTab( 0, IOX_DISK_INI_ID  ) );
     maptab_iox.srcid_map( IntTab( 0, IOPI_LOCAL_SRCID ) ,
                           IntTab( 0, IOX_IOPI_INI_ID  ) );
@@ -817,5 +816,5 @@
 
     sc_signal<bool>                   signal_irq_false;
-    sc_signal<bool>                   signal_irq_bdev;
+    sc_signal<bool>                   signal_irq_disk;
     sc_signal<bool>                   signal_irq_mtty_rx[NB_TTY_CHANNELS];
     sc_signal<bool>                   signal_irq_mnic_rx[NB_NIC_CHANNELS];
@@ -826,5 +825,5 @@
     VciSignals<vci_param_ext>         signal_vci_ini_iob0("signal_vci_ini_iob0");
     VciSignals<vci_param_ext>         signal_vci_ini_iob1("signal_vci_ini_iob1");
-    VciSignals<vci_param_ext>         signal_vci_ini_bdev("signal_vci_ini_bdev");
+    VciSignals<vci_param_ext>         signal_vci_ini_disk("signal_vci_ini_disk");
     VciSignals<vci_param_ext>         signal_vci_ini_cdma("signal_vci_ini_cdma");
     VciSignals<vci_param_ext>         signal_vci_ini_iopi("signal_vci_ini_iopi");
@@ -836,5 +835,5 @@
     VciSignals<vci_param_ext>         signal_vci_tgt_mnic("signal_vci_tgt_mnic");
     VciSignals<vci_param_ext>         signal_vci_tgt_brom("signal_vci_tgt_brom");
-    VciSignals<vci_param_ext>         signal_vci_tgt_bdev("signal_vci_tgt_bdev");
+    VciSignals<vci_param_ext>         signal_vci_tgt_disk("signal_vci_tgt_disk");
     VciSignals<vci_param_ext>         signal_vci_tgt_cdma("signal_vci_tgt_cdma");
     VciSignals<vci_param_ext>         signal_vci_tgt_iopi("signal_vci_tgt_iopi");
@@ -901,85 +900,101 @@
       alloc_elems<DspinSignals<dspin_ram_rsp_width> >("signal_dspin_false_ram_rsp_out", XMAX, YMAX, 4);
 
-   ////////////////////////////
-   //      Loader
-   ////////////////////////////
+    ////////////////////////////
+    //      Loader
+    ////////////////////////////
 
 #if USE_ALMOS
-   soclib::common::Loader loader(almos_bootloader_pathname,
+    soclib::common::Loader loader(almos_bootloader_pathname,
                                  almos_archinfo_pathname,
                                  almos_kernel_pathname);
 #else
-   soclib::common::Loader loader(soft_name);
+    soclib::common::Loader loader(soft_name);
 #endif
 
-   typedef soclib::common::GdbServer<soclib::common::Mips32ElIss> proc_iss;
-   proc_iss::set_loader(loader);
-
-   ////////////////////////////////////////
-   //  Instanciated Hardware Components
-   ////////////////////////////////////////
-
-   std::cout << std::endl << "External Bus and Peripherals" << std::endl << std::endl;
-
-   const size_t nb_iox_initiators = (cluster_iob0 != cluster_iob1) ? 5 : 4;
-   const size_t nb_iox_targets = (cluster_iob0 != cluster_iob1) ? 9 : 8;
-
-   // IOX network
-   VciIoxNetwork<vci_param_ext>* iox_network;
-   iox_network = new VciIoxNetwork<vci_param_ext>( "iox_network",
-                                                   maptab_iox,
-                                                   nb_iox_targets,
-                                                   nb_iox_initiators );
-   // boot ROM
-   VciSimpleRom<vci_param_ext>*  brom;
-   brom = new VciSimpleRom<vci_param_ext>( "brom",
-                                           IntTab(0, IOX_BROM_TGT_ID),
+    typedef soclib::common::GdbServer<soclib::common::Mips32ElIss> proc_iss;
+    proc_iss::set_loader(loader);
+
+    ////////////////////////////////////////
+    //  Instanciated Hardware Components
+    ////////////////////////////////////////
+
+    std::cout << std::endl << "External Bus and Peripherals" << std::endl << std::endl;
+
+    const size_t nb_iox_initiators = (cluster_iob0 != cluster_iob1) ? 5 : 4;
+    const size_t nb_iox_targets = (cluster_iob0 != cluster_iob1) ? 9 : 8;
+
+    // IOX network
+    VciIoxNetwork<vci_param_ext>* iox_network;
+    iox_network = new VciIoxNetwork<vci_param_ext>( "iox_network",
+                                                    maptab_iox,
+                                                    nb_iox_targets,
+                                                    nb_iox_initiators );
+    // boot ROM
+    VciSimpleRom<vci_param_ext>*  brom;
+    brom = new VciSimpleRom<vci_param_ext>( "brom",
+                                            IntTab(0, IOX_BROM_TGT_ID),
+                                            maptab_iox,
+                                            loader );
+    // Network Controller
+    VciMultiNic<vci_param_ext>*  mnic;
+    mnic = new VciMultiNic<vci_param_ext>( "mnic",
+                                           IntTab(0, IOX_MNIC_TGT_ID),
                                            maptab_iox,
-                                           loader );
-   // Network Controller
-   VciMultiNic<vci_param_ext>*  mnic;
-   mnic = new VciMultiNic<vci_param_ext>( "mnic",
-                                          IntTab(0, IOX_MNIC_TGT_ID),
-                                          maptab_iox,
-                                          NB_NIC_CHANNELS,
-                                          0,                // mac_4 address
-                                          0,                // mac_2 address
-                                          1 );              // NIC_MODE_SYNTHESIS
-
-   // Frame Buffer
-   VciFrameBuffer<vci_param_ext>*  fbuf;
-   fbuf = new VciFrameBuffer<vci_param_ext>( "fbuf",
-                                             IntTab(0, IOX_FBUF_TGT_ID),
-                                             maptab_iox,
-                                             FBUF_X_SIZE, FBUF_Y_SIZE );
-
-   // Block Device
-   // for AHCI
-   // std::vector<std::string> filenames;
-   // filenames.push_back(disk_name);            // one single disk
-   VciBlockDeviceTsar<vci_param_ext>*  bdev;
-   bdev = new VciBlockDeviceTsar<vci_param_ext>( "bdev",
+                                           NB_NIC_CHANNELS,
+                                           0,                // mac_4 address
+                                           0,                // mac_2 address
+                                           1 );              // NIC_MODE_SYNTHESIS
+
+    // Frame Buffer
+    VciFrameBuffer<vci_param_ext>*  fbuf;
+    fbuf = new VciFrameBuffer<vci_param_ext>( "fbuf",
+                                              IntTab(0, IOX_FBUF_TGT_ID),
+                                              maptab_iox,
+                                              FBUF_X_SIZE, FBUF_Y_SIZE );
+
+    // Disk
+    std::vector<std::string> filenames;
+    filenames.push_back(disk_name);            // one single disk
+
+#if ( USE_IOC_HBA )
+    VciMultiAhci<vci_param_ext>*  disk;
+    disk = new VciMultiAhci<vci_param_ext>( "disk",
+                                            maptab_iox,
+                                            IntTab(0, DISK_LOCAL_SRCID),
+                                            IntTab(0, IOX_DISK_TGT_ID),
+                                            filenames,
+                                            512,        // block size
+                                            64,         // burst size (bytes)
+                                            0 );        // disk latency
+#elif ( USE_IOC_BDV )
+    VciBlockDeviceTsar<vci_param_ext>*  disk;
+    disk = new VciBlockDeviceTsar<vci_param_ext>( "disk",
                                                   maptab_iox,
-                                                  IntTab(0, BDEV_LOCAL_SRCID),
-                                                  IntTab(0, IOX_BDEV_TGT_ID),
+                                                  IntTab(0, DISK_LOCAL_SRCID),
+                                                  IntTab(0, IOX_DISK_TGT_ID),
                                                   disk_name,
                                                   512,        // block size
                                                   64,         // burst size (bytes)
                                                   0 );        // disk latency
-
-   // Chained Buffer DMA controller
-   VciChbufDma<vci_param_ext>*  cdma;
-   cdma = new VciChbufDma<vci_param_ext>( "cdma",
-                                          maptab_iox,
-                                          IntTab(0, CDMA_LOCAL_SRCID),
-                                          IntTab(0, IOX_CDMA_TGT_ID),
-                                          64,          // burst size (bytes)
-                                          NB_CMA_CHANNELS );
-   // Multi-TTY controller
-   std::vector<std::string> vect_names;
-   for( size_t tid = 0 ; tid < NB_TTY_CHANNELS ; tid++ )
-   {
-      std::ostringstream term_name;
-         term_name <<  "term" << tid;
+#else 
+    std::cout << "Error in tsar_generic_iob : only HBA & BDV are supported" << std::endl;
+    exit(0);
+#endif
+
+    // Chained Buffer DMA controller
+    VciChbufDma<vci_param_ext>*  cdma;
+    cdma = new VciChbufDma<vci_param_ext>( "cdma",
+                                           maptab_iox,
+                                           IntTab(0, CDMA_LOCAL_SRCID),
+                                           IntTab(0, IOX_CDMA_TGT_ID),
+                                           64,          // burst size (bytes)
+                                           NB_CMA_CHANNELS );
+    // Multi-TTY controller
+    std::vector<std::string> vect_names;
+    for( size_t tid = 0 ; tid < NB_TTY_CHANNELS ; tid++ )
+    {
+        std::ostringstream term_name;
+          term_name <<  "term" << tid;
+ 
          vect_names.push_back(term_name.str().c_str());
       }
@@ -990,18 +1005,18 @@
                                              vect_names);
 
-   // IOPIC
-   VciIopic<vci_param_ext>* iopi;
-   iopi = new VciIopic<vci_param_ext>( "iopi",
-                                       maptab_iox,
-                                       IntTab(0, IOPI_LOCAL_SRCID),
-                                       IntTab(0, IOX_IOPI_TGT_ID),
-                                       32 );        // number of input HWI
-   // Clusters
-   TsarIobCluster<vci_param_int,
-                  vci_param_ext,
-                  dspin_int_cmd_width,
-                  dspin_int_rsp_width,
-                  dspin_ram_cmd_width,
-                  dspin_ram_rsp_width>* clusters[XMAX][YMAX];
+    // IOPIC
+    VciIopic<vci_param_ext>* iopi;
+    iopi = new VciIopic<vci_param_ext>( "iopi",
+                                        maptab_iox,
+                                        IntTab(0, IOPI_LOCAL_SRCID),
+                                        IntTab(0, IOX_IOPI_TGT_ID),
+                                        32 );        // number of input HWI
+    // Clusters
+    TsarIobCluster<vci_param_int,
+                   vci_param_ext,
+                   dspin_int_cmd_width,
+                   dspin_int_rsp_width,
+                   dspin_ram_cmd_width,
+                   dspin_ram_rsp_width>* clusters[XMAX][YMAX];
 
 #if USING_OPENMP
@@ -1117,5 +1132,5 @@
     iox_network->p_resetn                                (signal_resetn);
     iox_network->p_to_ini[IOX_IOB0_INI_ID]               (signal_vci_ini_iob0);
-    iox_network->p_to_ini[IOX_BDEV_INI_ID]               (signal_vci_ini_bdev);
+    iox_network->p_to_ini[IOX_DISK_INI_ID]               (signal_vci_ini_disk);
     iox_network->p_to_ini[IOX_CDMA_INI_ID]               (signal_vci_ini_cdma);
     iox_network->p_to_ini[IOX_IOPI_INI_ID]               (signal_vci_ini_iopi);
@@ -1126,5 +1141,5 @@
     iox_network->p_to_tgt[IOX_MNIC_TGT_ID]               (signal_vci_tgt_mnic);
     iox_network->p_to_tgt[IOX_BROM_TGT_ID]               (signal_vci_tgt_brom);
-    iox_network->p_to_tgt[IOX_BDEV_TGT_ID]               (signal_vci_tgt_bdev);
+    iox_network->p_to_tgt[IOX_DISK_TGT_ID]               (signal_vci_tgt_disk);
     iox_network->p_to_tgt[IOX_CDMA_TGT_ID]               (signal_vci_tgt_cdma);
     iox_network->p_to_tgt[IOX_IOPI_TGT_ID]               (signal_vci_tgt_iopi);
@@ -1136,12 +1151,16 @@
     }
 
-    // BDEV connexion
-    bdev->p_clk                                          (signal_clk);
-    bdev->p_resetn                                       (signal_resetn);
-    bdev->p_irq                                          (signal_irq_bdev);
-    bdev->p_vci_target                                   (signal_vci_tgt_bdev);
-    bdev->p_vci_initiator                                (signal_vci_ini_bdev);
-
-    std::cout << "  - BDEV connected" << std::endl;
+    // DISK connexion
+    disk->p_clk                                          (signal_clk);
+    disk->p_resetn                                       (signal_resetn);
+    disk->p_vci_target                                   (signal_vci_tgt_disk);
+    disk->p_vci_initiator                                (signal_vci_ini_disk);
+#if ( USE_IOC_HBA )
+    disk->p_channel_irq[0]                               (signal_irq_disk);
+#else
+    disk->p_irq                                          (signal_irq_disk);
+#endif
+
+    std::cout << "  - DISK connected" << std::endl;
 
     // FBUF connexion
@@ -1206,5 +1225,5 @@
        else if(i < 4+NB_CMA_CHANNELS)  iopi->p_hwi[i] (signal_irq_cdma[i-4]);
        else if(i < 8)                  iopi->p_hwi[i] (signal_irq_false);
-       else if(i < 9)                  iopi->p_hwi[i] (signal_irq_bdev);
+       else if(i < 9)                  iopi->p_hwi[i] (signal_irq_disk);
        else if(i < 16)                 iopi->p_hwi[i] (signal_irq_false);
        else if(i < 16+NB_TTY_CHANNELS) iopi->p_hwi[i] (signal_irq_mtty_rx[i-16]);
@@ -1480,11 +1499,11 @@
                 clusters[x][y]->signal_int_vci_tgt_xicu.print_trace(xicu_signame.str());
 
-                clusters[x][y]->mdma->print_trace();
-                std::ostringstream mdma_tgt_signame;
-                mdma_tgt_signame << "[SIG]MDMA_TGT_" << x << "_" << y;
-                clusters[x][y]->signal_int_vci_tgt_mdma.print_trace(mdma_tgt_signame.str());
-                std::ostringstream mdma_ini_signame;
-                mdma_ini_signame << "[SIG]MDMA_INI_" << x << "_" << y;
-                clusters[x][y]->signal_int_vci_ini_mdma.print_trace(mdma_ini_signame.str());
+//              clusters[x][y]->mdma->print_trace();
+//              std::ostringstream mdma_tgt_signame;
+//              mdma_tgt_signame << "[SIG]MDMA_TGT_" << x << "_" << y;
+//              clusters[x][y]->signal_int_vci_tgt_mdma.print_trace(mdma_tgt_signame.str());
+//              std::ostringstream mdma_ini_signame;
+//              mdma_ini_signame << "[SIG]MDMA_INI_" << x << "_" << y;
+//              clusters[x][y]->signal_int_vci_ini_mdma.print_trace(mdma_ini_signame.str());
 
                 // local interrupts in cluster(x,y)
@@ -1554,7 +1573,7 @@
 //              signal_vci_tgt_iob0.print_trace("[SIG]IOB0_IOX_TGT");
 
-//              cdma->print_trace();
-//              signal_vci_tgt_cdma.print_trace("[SIG]CDMA_TGT");
-//              signal_vci_ini_cdma.print_trace("[SIG]CDMA_INI");
+                cdma->print_trace();
+                signal_vci_tgt_cdma.print_trace("[SIG]CDMA_TGT");
+                signal_vci_ini_cdma.print_trace("[SIG]CDMA_INI");
 
 //              brom->print_trace();
@@ -1564,10 +1583,10 @@
 //              signal_vci_tgt_mtty.print_trace("[SIG]MTTY_TGT");
 
-                bdev->print_trace();
-                signal_vci_tgt_bdev.print_trace("[SIG]BDEV_TGT");
-                signal_vci_ini_bdev.print_trace("[SIG]BDEV_INI");
-
-//              mnic->print_trace( 0x000 );
-//              signal_vci_tgt_mnic.print_trace("[SIG]MNIC_TGT");
+//              disk->print_trace();
+//              signal_vci_tgt_disk.print_trace("[SIG]DISK_TGT");
+//              signal_vci_ini_disk.print_trace("[SIG]DISK_INI");
+
+                mnic->print_trace( 0x000 );
+                signal_vci_tgt_mnic.print_trace("[SIG]MNIC_TGT");
 
 //              fbuf->print_trace();
@@ -1577,8 +1596,9 @@
 //              signal_vci_ini_iopi.print_trace("[SIG]IOPI_INI");
 //              signal_vci_tgt_iopi.print_trace("[SIG]IOPI_TGT");
+
 //              iox_network->print_trace();
 
                 // interrupts
-                if (signal_irq_bdev)       std::cout << "### IRQ_BDEV ACTIVE"       << std::endl;
+                if (signal_irq_disk)       std::cout << "### IRQ_DISK ACTIVE"       << std::endl;
                 if (signal_irq_mtty_rx[0]) std::cout << "### IRQ_MTTY_RX[0] ACTIVE" << std::endl;
                 if (signal_irq_mnic_rx[0]) std::cout << "### IRQ_MNIC_RX[0] ACTIVE" << std::endl;
Index: /trunk/platforms/tsar_generic_iob/top.desc
===================================================================
--- /trunk/platforms/tsar_generic_iob/top.desc	(revision 964)
+++ /trunk/platforms/tsar_generic_iob/top.desc	(revision 965)
@@ -52,4 +52,7 @@
                   cell_size = vci_cell_size_ext),
 
+            Uses('caba:vci_multi_ahci',
+                  cell_size = vci_cell_size_ext),
+
             # NIC 
             Uses('caba:vci_multi_nic', 
