Index: /trunk/platforms/tsar_generic_leti/top.cpp
===================================================================
--- /trunk/platforms/tsar_generic_leti/top.cpp	(revision 791)
+++ /trunk/platforms/tsar_generic_leti/top.cpp	(revision 792)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////
 // File: top.cpp (for tsar_generic_leti)
-// Author: Alain Greiner 
+// Author: Alain Greiner
 // Copyright: UPMC/LIP6
 // Date : february 2014
@@ -9,8 +9,8 @@
 // with the VLSI Hardware prototype developped by CEA-LETI and LIP6
 // in the framework of the SHARP project.
-// 
+//
 // The processor is a MIPS32 processor wrapped in a GDB server
 // (this is defined in the tsar_xbar_cluster).
-// 
+//
 // It does not use an external ROM, as the boot code is (pre)loaded
 // in cluster (0,0) memory at address 0x0.
@@ -23,5 +23,5 @@
 // The number of clusters cannot be larger than 128.
 // The number of processors per cluster cannot be larger than 4.
-// 
+//
 // Each cluster contains:
 // - 5 dspin_local_crossbar (local interconnect)
@@ -43,19 +43,19 @@
 // that must be considered as an extension of this top.cpp file.
 //
-// Besides the hardware components in clusters, "external" peripherals 
+// Besides the hardware components in clusters, "external" peripherals
 // are connected to an external IO bus (implemented as a vci_local_crossbar):
-// - one disk controller 
-// - one multi-channel ethernet controller 
+// - one disk controller
+// - one multi-channel ethernet controller
 // - one multi-channel chained buffer dma controller
-// - one multi-channel tty controller 
-// - one frame buffer controller 
+// - one multi-channel tty controller
+// - one frame buffer controller
 // - one 32 channels iopic controller
 //
-// This IOBUS is connected to the north  port of the DIR_CMD 
+// This IOBUS is connected to the north  port of the DIR_CMD
 // and DIR_RSP routers, in cluster(X_SIZE-1, Y_SIZE-1).
 // For all external peripherals, the hardware interrupts (HWI) are
 // translated to write interrupts (WTI) by the iopic component:
 // - IOPIC HWI[1:0]     connected to IRQ_NIC_RX[1:0]
-// - IOPIC HWI[3:2]     connected to IRQ_NIC_TX[1:0]      
+// - 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
@@ -73,8 +73,8 @@
 // - NB_TTY_CHANNELS  : number of TTY channels in I/O cluster (8 max)
 // - NB_NIC_CHANNELS  : number of NIC channels in I/O cluster (2 max)
-// 
+//
 // Some other hardware parameters are not used when compiling the OS,
 // and are only defined in this top.cpp file:
-// - XRAM_LATENCY     : external ram latency 
+// - XRAM_LATENCY     : external ram latency
 // - MEMC_WAYS        : L2 cache number of ways
 // - MEMC_SETS        : L2 cache number of sets
@@ -85,5 +85,5 @@
 // - FBUF_X_SIZE      : width of frame buffer (pixels)
 // - FBUF_Y_SIZE      : heigth of frame buffer (lines)
-// - BDEV_IMAGE_NAME  : file pathname for block device 
+// - BDEV_IMAGE_NAME  : file pathname for block device
 // - NIC_RX_NAME      : file pathname for NIC received packets
 // - NIC_TX_NAME      : file pathname for NIC transmited packets
@@ -93,5 +93,5 @@
 // General policy for 40 bits physical address decoding:
 // All physical segments base addresses are multiple of 1 Mbytes
-// (=> the 24 LSB bits = 0, and the 16 MSB bits define the target) 
+// (=> the 24 LSB bits = 0, and the 16 MSB bits define the target)
 // The (X_WIDTH + Y_WIDTH) MSB bits (left aligned) define
 // the cluster index, and the LADR bits define the local index:
@@ -127,36 +127,5 @@
 #include "alloc_elems.h"
 
-//////////////////////////////////////////////////////////////////////////////////////////
-//    Parameters depending on the OS and software application         
-//    - path to hard_config file
-//    - path to binary code for the RAM loader
-//    - path to disk image for RAMDISK loader
-//    - path to disk image for IOC device
-//////////////////////////////////////////////////////////////////////////////////////////
-
-#define USE_GIET_VM     1
-#define USE_GIET_TSAR   0
-
-#if ( USE_GIET_VM and USE_GIET_TSAR )
-#error "Can't use Two different OS"
-#endif
-
-#if ( (not USE_GIET_VM) and (not USE_GIET_TSAR) )
-#error "You need to specify one OS"
-#endif
-
-#if USE_GIET_TSAR
-#include                         "hard_config.h"
-#define BINARY_PATH_FOR_LOADER   "../../softs/soft_transpose_giet/bin.soft"
-#define DISK_IMAGE_PATH_FOR_IOC  "../../softs/soft_transpose_giet/images.raw"
-#define RAMDISK_PATH_FOR_LOADER  DISK_IMAGE_PATH_FOR_IOC "@0x00800000:"
-#endif
-
-#if USE_GIET_VM
-#include                         "hard_config.h"
-#define BINARY_PATH_FOR_LOADER   "../../softs/tsar_boot/preloader.elf"
-#define DISK_IMAGE_PATH_FOR_IOC  "../../../giet_vm/hdd/virt_hdd.dmg"        
-#define RAMDISK_PATH_FOR_LOADER  DISK_IMAGE_PATH_FOR_IOC "@0x02000000:"
-#endif
+#include "hard_config.h"
 
 ///////////////////////////////////////////////////
@@ -176,5 +145,5 @@
 
 ///////////////////////////////////////////////////////////
-//          DSPIN parameters           
+//          DSPIN parameters
 ///////////////////////////////////////////////////////////
 
@@ -183,5 +152,5 @@
 
 ///////////////////////////////////////////////////////////
-//          VCI parameters           
+//          VCI parameters
 ///////////////////////////////////////////////////////////
 
@@ -200,8 +169,6 @@
 
 /////////////////////////////////////////////////////////////////////////////////////////
-//    Secondary Hardware Parameters         
+//    Secondary Hardware Parameters
 /////////////////////////////////////////////////////////////////////////////////////////
-
-#define RESET_ADDRESS         0x0
 
 #define MAX_TTY_CHANNELS      8
@@ -210,5 +177,4 @@
 
 #define XRAM_LATENCY          0
-#define XRAM_SIZE             0x04000000    // 64 Mbytes per cluster
 
 #define MEMC_WAYS             16
@@ -220,7 +186,4 @@
 #define L1_DWAYS              4
 #define L1_DSETS              64
-
-#define FBUF_X_SIZE           128
-#define FBUF_Y_SIZE           128
 
 #define NIC_MAC4              0XBABEF00D
@@ -235,5 +198,5 @@
 
 ///////////////////////////////////////////////////////////////////////////////////////
-//     DEBUG Parameters default values         
+//     DEBUG Parameters default values
 ///////////////////////////////////////////////////////////////////////////////////////
 
@@ -241,5 +204,5 @@
 
 ///////////////////////////////////////////////////////////////////////////////////////
-//     LOCAL TGTID & SRCID definition 
+//     LOCAL TGTID & SRCID definition
 // For all components:  global TGTID = global SRCID = cluster_index
 ///////////////////////////////////////////////////////////////////////////////////////
@@ -258,48 +221,4 @@
 #define IOPI_SRCID            NB_PROCS_MAX + 2
 
-//////////////////////////////////////////////////////////////////////////////////////
-//    Physical segments definition
-//////////////////////////////////////////////////////////////////////////////////////
-// - 3 segments are replicated in all clusters
-// - 2 segments are only in cluster[0,0] 
-// - 4 segments are only in cluster [X_SIZE-1,Y_SIZE] 
-// The following values are for segments in cluster 0,
-// and these 32 bits values must be concatenate with the cluster 
-// index (on 8 bits) to obtain the 40 bits address.
-//////////////////////////////////////////////////////////////////////////////////////
-
-// in cluster [0,0] & [X_SIZE-1,Y_SIZE] 
-
-#define MTTY_BASE    0xF4000000
-#define MTTY_SIZE    0x00001000   // 4 Kbytes
-
-#define BDEV_BASE    0xF2000000
-#define BDEV_SIZE    0x00001000   // 4 Kbytes
-
-// in cluster [X_SIZE-1,Y_SIZE]
-
-#define FBUF_BASE    0xF3000000
-#define FBUF_SIZE    (FBUF_X_SIZE * FBUF_Y_SIZE * 2)
-
-#define MNIC_BASE    0xF7000000
-#define MNIC_SIZE    0x00800000   // 512 Kbytes (for 8 channels)
-
-#define CDMA_BASE    0xF8000000
-#define CDMA_SIZE    0x00004000 * NB_CMA_CHANNELS
-
-#define IOPI_BASE    0xF9000000
-#define IOPI_SIZE    0x00001000   // 4 Kbytes 
-
-// replicated segments : address is extended to 40 bits by cluster_xy
-
-#define MEMC_BASE    0x00000000
-#define MEMC_SIZE    XRAM_SIZE
-
-#define MCFG_BASE    0xE0000000
-#define MCFG_SIZE    0x00001000   // 4 Kbytes
-
-#define XICU_BASE    0xF0000000
-#define XICU_SIZE    0x00001000   // 4 Kbytes
-
 bool stop_called = false;
 
@@ -317,10 +236,10 @@
    bool     trace_proc_ok     = false;      // detailed proc trace activated
    size_t   trace_memc_ok     = false;      // detailed memc trace activated
-   size_t   trace_memc_id     = 0;          // index of memc to be traced 
+   size_t   trace_memc_id     = 0;          // index of memc to be traced
    size_t   trace_proc_id     = 0;          // index of proc to be traced
    uint32_t frozen_cycles     = MAX_FROZEN_CYCLES;
-   char     soft_name[256]    = BINARY_PATH_FOR_LOADER;
-   char     disk_name[256]    = DISK_IMAGE_PATH_FOR_IOC;
-   char     ramdisk_name[256] = RAMDISK_PATH_FOR_LOADER;
+   char     soft_name[256]    = "soft.elf";
+   char     disk_name[256]    = "disk.img";
+   char     ramdisk_name[256] = "disk.img@0x02000000:";
    struct   timeval t1,t2;
    uint64_t ms1,ms2;
@@ -364,5 +283,5 @@
          else if ((strcmp(argv[n], "-SOFT") == 0) && ((n + 1) < argc))
          {
-            strcpy(soft_name, argv[n + 1]); 
+            strcpy(soft_name, argv[n + 1]);
          }
          else if ((strcmp(argv[n], "-DISK") == 0) && ((n + 1) < argc))
@@ -372,5 +291,5 @@
          else if ((strcmp(argv[n], "-RAMDISK") == 0) && ((n + 1) < argc))
          {
-            strcpy(ramdisk_name, argv[n + 1]); 
+            strcpy(ramdisk_name, argv[n + 1]);
          }
          else if ((strcmp(argv[n], "-THREADS") == 0) && ((n + 1) < argc))
@@ -404,8 +323,9 @@
 
     // checking hardware parameters
-    assert( ((X_SIZE==1) or (X_SIZE==2) or (X_SIZE==4) or (X_SIZE==8) or (X_SIZE==16)) and 
+    assert( ((X_SIZE==1) or (X_SIZE==2) or (X_SIZE==4) or (X_SIZE==8) or
+             (X_SIZE==16)) and
             "Illegal X_SIZE parameter" );
 
-    assert( ((Y_SIZE==1) or (Y_SIZE==2) or (Y_SIZE==4) or (Y_SIZE==8)) and 
+    assert( ((Y_SIZE==1) or (Y_SIZE==2) or (Y_SIZE==4) or (Y_SIZE==8)) and
             "Illegal Y_SIZE parameter" );
 
@@ -427,5 +347,5 @@
     assert( (X_WIDTH == 4) and (Y_WIDTH == 4) and
             "ERROR: you must have X_WIDTH == Y_WIDTH == 4");
- 
+
     std::cout << std::endl;
 
@@ -483,7 +403,7 @@
    ///////////////////////////////////////
 
-   MappingTable maptabd(vci_address_width, 
-                        IntTab(X_WIDTH + Y_WIDTH, 16 - X_WIDTH - Y_WIDTH), 
-                        IntTab(X_WIDTH + Y_WIDTH, vci_srcid_width - X_WIDTH - Y_WIDTH), 
+   MappingTable maptabd(vci_address_width,
+                        IntTab(X_WIDTH + Y_WIDTH, 16 - X_WIDTH - Y_WIDTH),
+                        IntTab(X_WIDTH + Y_WIDTH, vci_srcid_width - X_WIDTH - Y_WIDTH),
                         0x00FF000000ULL);
 
@@ -498,15 +418,15 @@
          std::ostringstream    si;
          si << "seg_xicu_" << x << "_" << y;
-         maptabd.add(Segment(si.str(), XICU_BASE + offset, XICU_SIZE, 
+         maptabd.add(Segment(si.str(), SEG_XCU_BASE + offset, SEG_XCU_SIZE,
                   IntTab(cluster(x,y),XICU_TGTID), false));
 
          std::ostringstream    sd;
          sd << "seg_mcfg_" << x << "_" << y;
-         maptabd.add(Segment(sd.str(), MCFG_BASE + offset, MCFG_SIZE, 
+         maptabd.add(Segment(sd.str(), SEG_MMC_BASE + offset, SEG_MMC_SIZE,
                   IntTab(cluster(x,y),MEMC_TGTID), false));
 
          std::ostringstream    sh;
          sh << "seg_memc_" << x << "_" << y;
-         maptabd.add(Segment(sh.str(), MEMC_BASE + offset, MEMC_SIZE, 
+         maptabd.add(Segment(sh.str(), SEG_RAM_BASE + offset, SEG_RAM_SIZE,
                   IntTab(cluster(x,y),MEMC_TGTID), true));
       }
@@ -514,8 +434,8 @@
 
    // segments for peripherals in cluster(0,0)
-   maptabd.add(Segment("seg_tty0", MTTY_BASE, MTTY_SIZE, 
+   maptabd.add(Segment("seg_tty0", SEG_TTY_BASE, SEG_TTY_SIZE,
                IntTab(cluster(0,0),MTTY_TGTID), false));
 
-   maptabd.add(Segment("seg_ioc0", BDEV_BASE, BDEV_SIZE, 
+   maptabd.add(Segment("seg_ioc0", SEG_IOC_BASE, SEG_IOC_SIZE,
                IntTab(cluster(0,0),BDEV_TGTID), false));
 
@@ -524,20 +444,20 @@
    offset = ((sc_uint<vci_address_width>)cluster(X_SIZE-1,Y_SIZE)) << 32;
 
-   maptabd.add(Segment("seg_mtty", MTTY_BASE + offset, MTTY_SIZE, 
+   maptabd.add(Segment("seg_mtty", SEG_TTY_BASE + offset, SEG_TTY_SIZE,
                IntTab(cluster(X_SIZE-1, Y_SIZE),MTTY_TGTID), false));
 
-   maptabd.add(Segment("seg_fbuf", FBUF_BASE + offset, FBUF_SIZE, 
+   maptabd.add(Segment("seg_fbuf", SEG_FBF_BASE + offset, SEG_FBF_SIZE,
                IntTab(cluster(X_SIZE-1, Y_SIZE),FBUF_TGTID), false));
 
-   maptabd.add(Segment("seg_bdev", BDEV_BASE + offset, BDEV_SIZE, 
+   maptabd.add(Segment("seg_bdev", SEG_IOC_BASE + offset, SEG_IOC_SIZE,
                IntTab(cluster(X_SIZE-1, Y_SIZE),BDEV_TGTID), false));
 
-   maptabd.add(Segment("seg_mnic", MNIC_BASE + offset, MNIC_SIZE, 
+   maptabd.add(Segment("seg_mnic", SEG_NIC_BASE + offset, SEG_NIC_SIZE,
                IntTab(cluster(X_SIZE-1, Y_SIZE),MNIC_TGTID), false));
 
-   maptabd.add(Segment("seg_cdma", CDMA_BASE + offset, CDMA_SIZE, 
+   maptabd.add(Segment("seg_cdma", SEG_CMA_BASE + offset, SEG_CMA_SIZE,
                IntTab(cluster(X_SIZE-1, Y_SIZE),CDMA_TGTID), false));
 
-   maptabd.add(Segment("seg_iopi", IOPI_BASE + offset, IOPI_SIZE, 
+   maptabd.add(Segment("seg_iopi", SEG_PIC_BASE + offset, SEG_PIC_SIZE,
                IntTab(cluster(X_SIZE-1, Y_SIZE),IOPI_TGTID), false));
 
@@ -548,7 +468,7 @@
     /////////////////////////////////////////////////
 
-    MappingTable maptabx(vci_address_width, 
-                         IntTab(X_WIDTH+Y_WIDTH), 
-                         IntTab(X_WIDTH+Y_WIDTH), 
+    MappingTable maptabx(vci_address_width,
+                         IntTab(X_WIDTH+Y_WIDTH),
+                         IntTab(X_WIDTH+Y_WIDTH),
                          0x00FF000000ULL);
 
@@ -556,7 +476,7 @@
     {
         for (size_t y = 0; y < (Y_SIZE) ; y++)
-        { 
+        {
             sc_uint<vci_address_width> offset;
-            offset = (sc_uint<vci_address_width>)cluster(x,y) 
+            offset = (sc_uint<vci_address_width>)cluster(x,y)
                       << (vci_address_width-X_WIDTH-Y_WIDTH);
 
@@ -564,6 +484,6 @@
             sh << "x_seg_memc_" << x << "_" << y;
 
-            maptabx.add(Segment(sh.str(), MEMC_BASE + offset, 
-                     MEMC_SIZE, IntTab(cluster(x,y)), false));
+            maptabx.add(Segment(sh.str(), SEG_RAM_BASE + offset,
+                     SEG_RAM_SIZE, IntTab(cluster(x,y)), false));
         }
     }
@@ -669,5 +589,5 @@
    VciSignals<vci_param_int>    signal_vci_ini_iopi("signal_vci_ini_iopi");
 
-   VciSignals<vci_param_int>*   signal_vci_ini_proc = 
+   VciSignals<vci_param_int>*   signal_vci_ini_proc =
        alloc_elems<VciSignals<vci_param_int> >("signal_vci_ini_proc", NB_PROCS_MAX );
 
@@ -683,10 +603,10 @@
    VciSignals<vci_param_int>    signal_vci_cmd_to_noc("signal_vci_cmd_to_noc");
    VciSignals<vci_param_int>    signal_vci_cmd_from_noc("signal_vci_cmd_from_noc");
-   
+
    ////////////////////////////
-   //      Loader    
+   //      Loader
    ////////////////////////////
 
-#if USE_IOC_RDK
+#if USE_RAMDISK
    soclib::common::Loader loader( soft_name, ramdisk_name );
 #else
@@ -726,5 +646,5 @@
 #endif
             std::cout << std::endl;
-            std::cout << "Cluster_" << std::dec << x << "_" << y 
+            std::cout << "Cluster_" << std::dec << x << "_" << y
                       << " with cluster_xy = " << std::hex << cluster(x,y) << std::endl;
             std::cout << std::endl;
@@ -764,7 +684,7 @@
                 frozen_cycles,
                 trace_from,
-                trace_proc_ok, 
+                trace_proc_ok,
                 trace_proc_id,
-                trace_memc_ok, 
+                trace_memc_ok,
                 trace_memc_id
             );
@@ -785,6 +705,6 @@
     // but the crossbar has (NB_PROCS_MAX + 3) intiators and
     // 8 targets, in order to use the same SRCID and TGTID space
-    // (same mapping table for the internal components, 
-    //  and for the external peripherals) 
+    // (same mapping table for the internal components,
+    //  and for the external peripherals)
     //////////////////////////////////////////////////////////////////
 
@@ -792,8 +712,8 @@
     std::cout << " Building IO cluster (external peripherals)" << std::endl;
     std::cout << std::endl;
-  
+
     size_t cluster_io = cluster(X_SIZE-1, Y_SIZE);
 
-    //////////// vci_local_crossbar  
+    //////////// vci_local_crossbar
     VciLocalCrossbar<vci_param_int>*
     iobus = new VciLocalCrossbar<vci_param_int>(
@@ -805,5 +725,5 @@
                 BDEV_TGTID );                 // default target index
 
-    //////////// vci_framebuffer                        
+    //////////// vci_framebuffer
     VciFrameBuffer<vci_param_int>*
     fbuf = new VciFrameBuffer<vci_param_int>(
@@ -813,5 +733,5 @@
                 FBUF_X_SIZE, FBUF_Y_SIZE );
 
-    ////////////  vci_block_device               
+    ////////////  vci_block_device
     VciBlockDeviceTsar<vci_param_int>*
     bdev = new VciBlockDeviceTsar<vci_param_int>(
@@ -824,5 +744,5 @@
                 64 );                         // burst size
 
-    //////////// vci_multi_nic               
+    //////////// vci_multi_nic
     VciMultiNic<vci_param_int>*
     mnic = new VciMultiNic<vci_param_int>(
@@ -836,5 +756,5 @@
                 NIC_TX_NAME );
 
-    ///////////// vci_chbuf_dma                   
+    ///////////// vci_chbuf_dma
     VciChbufDma<vci_param_int>*
     cdma = new VciChbufDma<vci_param_int>(
@@ -844,5 +764,5 @@
                 IntTab(cluster_io, CDMA_TGTID),
                 64,                          // burst size
-                NB_CMA_CHANNELS ); 
+                NB_CMA_CHANNELS );
 
     ////////////// vci_multi_tty
@@ -855,5 +775,5 @@
     }
 
-    VciMultiTty<vci_param_int>* 
+    VciMultiTty<vci_param_int>*
     mtty = new VciMultiTty<vci_param_int>(
                 "mtty",
@@ -869,8 +789,7 @@
                 IntTab(cluster_io, IOPI_SRCID),
                 IntTab(cluster_io, IOPI_TGTID),
-                32,
-                5000 );
-
-    ////////////// vci_dspin wrappers 
+                32 );
+
+    ////////////// vci_dspin wrappers
     VciDspinTargetWrapper<vci_param_int, dspin_cmd_width, dspin_rsp_width>*
     wt_iobus = new VciDspinTargetWrapper<vci_param_int, dspin_cmd_width, dspin_rsp_width>(
@@ -884,9 +803,9 @@
 
     ///////////////////////////////////////////////////////////////
-    //     Net-list 
+    //     Net-list
     ///////////////////////////////////////////////////////////////
 
-    // iobus 
-    iobus->p_clk                       (signal_clk);  
+    // iobus
+    iobus->p_clk                       (signal_clk);
     iobus->p_resetn                    (signal_resetn);
 
@@ -1049,8 +968,8 @@
         }
     }
-    std::cout << std::endl << "Horizontal connections done" << std::endl;   
+    std::cout << std::endl << "Horizontal connections done" << std::endl;
 
     // Inter Clusters vertical connections
-    if (Y_SIZE > 1) 
+    if (Y_SIZE > 1)
     {
         for (size_t y = 0; y < (Y_SIZE-1); y++)
@@ -1198,5 +1117,5 @@
     }
 
-    // set default values for VCI signals connected to unused ports on iobus 
+    // set default values for VCI signals connected to unused ports on iobus
     signal_vci_tgt_memc.rspval = false;
     signal_vci_tgt_xicu.rspval = false;
@@ -1206,5 +1125,5 @@
     signal_resetn = true;
 
-    if (gettimeofday(&t1, NULL) != 0) 
+    if (gettimeofday(&t1, NULL) != 0)
     {
         perror("gettimeofday");
@@ -1233,5 +1152,5 @@
         {
 
-            if (gettimeofday(&t2, NULL) != 0) 
+            if (gettimeofday(&t2, NULL) != 0)
             {
                 perror("gettimeofday");
@@ -1241,8 +1160,8 @@
             ms1 = (uint64_t) t1.tv_sec * 1000ULL + (uint64_t) t1.tv_usec / 1000;
             ms2 = (uint64_t) t2.tv_sec * 1000ULL + (uint64_t) t2.tv_usec / 1000;
-            std::cerr << "platform clock frequency " 
+            std::cerr << "platform clock frequency "
                       << (double) 5000000 / (double) (ms2 - ms1) << "Khz" << std::endl;
 
-            if (gettimeofday(&t1, NULL) != 0) 
+            if (gettimeofday(&t1, NULL) != 0)
             {
                 perror("gettimeofday");
@@ -1291,5 +1210,5 @@
                 clusters[x][y]->signal_vci_tgt_memc.print_trace(smemc.str());
                 clusters[x][y]->signal_vci_xram.print_trace(sxram.str());
-            }   
+            }
 
             // trace coherence signals
@@ -1309,5 +1228,5 @@
             // clusters[0][1]->xbar_m2p->print_trace();
             // clusters[1][1]->xbar_m2p->print_trace();
-        
+
             // trace router(s) m2p
             // clusters[0][0]->router_m2p->print_trace();
@@ -1315,5 +1234,5 @@
             // clusters[0][1]->router_m2p->print_trace();
             // clusters[1][1]->router_m2p->print_trace();
-        
+
             // trace external ioc
             bdev->print_trace();
@@ -1335,5 +1254,5 @@
         {
             // trace BDV interrupts events
-            if ( signal_irq_bdev.read() != prev_irq_bdev ) 
+            if ( signal_irq_bdev.read() != prev_irq_bdev )
             {
                 prev_irq_bdev = signal_irq_bdev.read();
@@ -1341,12 +1260,12 @@
                           << " at cycle " << n << std::endl;
             }
-        
+
             // trace TTY interrupts events
             for ( size_t x = 0 ; x < 8 ; x++ )
             {
-                if ( signal_irq_mtty_rx[x].read() != prev_irq_mtty_rx[x] ) 
+                if ( signal_irq_mtty_rx[x].read() != prev_irq_mtty_rx[x] )
                 {
                     prev_irq_mtty_rx[x] = signal_irq_mtty_rx[x].read();
-                    std::cout << std::dec << "@@@ IRQ_MTTY["<<x<<"] = " 
+                    std::cout << std::dec << "@@@ IRQ_MTTY["<<x<<"] = "
                               << signal_irq_mtty_rx[x].read()
                               << " at cycle " << n << std::endl;
@@ -1360,5 +1279,5 @@
             {
                 if ( clusters[x][y]->signal_proc_irq[i] != prev_irq_proc[x][y][i] )
-                { 
+                {
                     prev_irq_proc[x][y][i] = clusters[x][y]->signal_proc_irq[i];
                     std::cout << std::dec << "@@@ IRQ_PROC["<<x<<","<<y<<","<<i<<"] = "
@@ -1387,6 +1306,5 @@
 }
 
-
-void handler(int dummy = 0) 
+void handler(int dummy = 0)
 {
    stop_called = true;
