Index: branches/RWT/modules/vci_mem_cache/caba/source/include/xram_transaction.h
===================================================================
--- branches/RWT/modules/vci_mem_cache/caba/source/include/xram_transaction.h	(revision 814)
+++ branches/RWT/modules/vci_mem_cache/caba/source/include/xram_transaction.h	(revision 823)
@@ -15,8 +15,8 @@
 class TransactionTabEntry
 {
-    typedef sc_dt::sc_uint<64>    wide_data_t;
-    typedef sc_dt::sc_uint<40>    addr_t;
-    typedef uint32_t              data_t;
-    typedef uint32_t              be_t;
+    typedef sc_dt::sc_uint<64> wide_data_t;
+    typedef sc_dt::sc_uint<40> addr_t;
+    typedef uint32_t           data_t;
+    typedef uint32_t           be_t;
 
     public:
@@ -154,26 +154,26 @@
 class TransactionTab
 {
-    typedef sc_dt::sc_uint<64>    wide_data_t;
-    typedef sc_dt::sc_uint<40>    addr_t;
-    typedef uint32_t              data_t;
-    typedef uint32_t              be_t;
+    typedef sc_dt::sc_uint<64> wide_data_t;
+    typedef sc_dt::sc_uint<40> addr_t;
+    typedef uint32_t           data_t;
+    typedef uint32_t           be_t;
 
     private:
-    const std::string tab_name;                // the name for logs
-    size_t            size_tab;                // the size of the tab
+    const std::string tab_name; // the name for logs
+    size_t            size_tab; // the size of the tab
 
     data_t be_to_mask(be_t be)
     {
         data_t ret = 0;
-        if ( be&0x1 ) {
+        if (be & 0x1) {
             ret = ret | 0x000000FF;
         }
-        if ( be&0x2 ) {
+        if (be & 0x2) {
             ret = ret | 0x0000FF00;
         }
-        if ( be&0x4 ) {
+        if (be & 0x4) {
             ret = ret | 0x00FF0000;
         }
-        if ( be&0x8 ) {
+        if (be & 0x8) {
             ret = ret | 0xFF000000;
         }
@@ -189,6 +189,6 @@
     TransactionTab()
     {
-        size_tab=0;
-        tab=NULL;
+        size_tab = 0;
+        tab = NULL;
     }
 
@@ -196,9 +196,9 @@
                    size_t            n_entries,
                    size_t            n_words )
-    : tab_name( name ),
-      size_tab( n_entries )
+    : tab_name(name),
+      size_tab(n_entries)
     {
         tab = new TransactionTabEntry[size_tab];
-        for ( size_t i=0; i<size_tab; i++)
+        for (size_t i = 0; i < size_tab; i++)
         {
             tab[i].alloc(n_words);
@@ -222,5 +222,5 @@
     void init()
     {
-        for ( size_t i=0; i<size_tab; i++)
+        for (size_t i = 0; i < size_tab; i++)
         {
             tab[i].init();
@@ -234,5 +234,5 @@
     void print(const size_t index)
     {
-        assert( (index < size_tab) and
+        assert((index < size_tab) and
         "MEMC ERROR: The selected entry is out of range in TRT write_data_mask()");
 
@@ -247,5 +247,5 @@
     TransactionTabEntry read(const size_t index)
     {
-        assert( (index < size_tab) and
+        assert((index < size_tab) and
         "MEMC ERROR: Invalid Transaction Tab Entry");
 
@@ -260,9 +260,9 @@
     bool full(size_t &index)
     {
-        for(size_t i=0; i<size_tab; i++)
-        {
-            if(!tab[i].valid)
+        for (size_t i = 0; i < size_tab; i++)
+        {
+            if (!tab[i].valid)
             {
-                index=i;
+                index = i;
                 return false;
             }
@@ -278,11 +278,11 @@
     // The function returns true if a read request has already been sent
     //////////////////////////////////////////////////////////////////////
-    bool hit_read(const addr_t nline,size_t &index)
-    {
-        for(size_t i=0; i<size_tab; i++)
-        {
-            if((tab[i].valid && (nline==tab[i].nline)) && (tab[i].xram_read))
+    bool hit_read(const addr_t nline, size_t &index)
+    {
+        for (size_t i = 0; i < size_tab; i++)
+        {
+            if ((tab[i].valid && (nline == tab[i].nline)) && (tab[i].xram_read))
             {
-                index=i;
+                index = i;
                 return true;
             }
@@ -299,7 +299,7 @@
     bool hit_write(const addr_t nline)
     {
-        for(size_t i=0; i<size_tab; i++)
-        {
-            if(tab[i].valid && (nline==tab[i].nline) && !(tab[i].xram_read))
+        for (size_t i = 0; i < size_tab; i++)
+        {
+            if(tab[i].valid && (nline == tab[i].nline) && !(tab[i].xram_read))
             {
                 return true;
@@ -319,6 +319,6 @@
     bool hit_write(const addr_t nline, size_t* index)
     {
-        for(size_t i=0; i<size_tab; i++){
-            if(tab[i].valid && (nline==tab[i].nline) && !(tab[i].xram_read)) {
+        for (size_t i = 0; i < size_tab; i++){
+            if (tab[i].valid && (nline == tab[i].nline) && !(tab[i].xram_read)) {
                 *index = i;
                 return true;
@@ -337,17 +337,17 @@
     /////////////////////////////////////////////////////////////////////
     void write_data_mask(const size_t index,
-            const std::vector<be_t> &be,
-            const std::vector<data_t> &data)
-    {
-        assert( (index < size_tab) and
+                         const std::vector<be_t> &be,
+                         const std::vector<data_t> &data)
+    {
+        assert((index < size_tab) and
         "MEMC ERROR: The selected entry is out of range in TRT write_data_mask()");
 
-        assert( (be.size()==tab[index].wdata_be.size()) and
+        assert((be.size() == tab[index].wdata_be.size()) and
         "MEMC ERROR: Bad be size in TRT write_data_mask()");
 
-        assert( (data.size()==tab[index].wdata.size()) and
+        assert((data.size() == tab[index].wdata.size()) and
         "MEMC ERROR: Bad data size in TRT write_data_mask()");
 
-        for(size_t i=0; i<tab[index].wdata_be.size() ; i++)
+        for (size_t i = 0; i < tab[index].wdata_be.size(); i++)
         {
             tab[index].wdata_be[i] = tab[index].wdata_be[i] | be[i];
@@ -375,24 +375,24 @@
     /////////////////////////////////////////////////////////////////////
     void set(const size_t index,
-            const bool xram_read,
-            const addr_t nline,
-            const size_t srcid,
-            const size_t trdid,
-            const size_t pktid,
-            const bool proc_read,
-            const size_t read_length,
-            const size_t word_index,
-            const std::vector<be_t> &data_be,
-            const std::vector<data_t> &data,
-            const data_t ll_key = 0,
-            const bool config = false)
-    {
-        assert( (index < size_tab) and
+             const bool xram_read,
+             const addr_t nline,
+             const size_t srcid,
+             const size_t trdid,
+             const size_t pktid,
+             const bool proc_read,
+             const size_t read_length,
+             const size_t word_index,
+             const std::vector<be_t> &data_be,
+             const std::vector<data_t> &data,
+             const data_t ll_key = 0,
+             const bool config = false)
+    {
+        assert((index < size_tab) and
         "MEMC ERROR: The selected entry is out of range in TRT set()");
 
-        assert( (data_be.size()==tab[index].wdata_be.size()) and
+        assert((data_be.size() == tab[index].wdata_be.size()) and
         "MEMC ERROR: Bad data_be argument in TRT set()");
 
-        assert( (data.size()==tab[index].wdata.size()) and
+        assert((data.size() == tab[index].wdata.size()) and
         "MEMC ERROR: Bad data argument in TRT set()");
 
@@ -408,8 +408,8 @@
         tab[index].ll_key      = ll_key;
         tab[index].config      = config;
-        for(size_t i=0; i<tab[index].wdata.size(); i++)
-        {
-            tab[index].wdata_be[i]    = data_be[i];
-            tab[index].wdata[i]       = data[i];
+        for (size_t i = 0; i < tab[index].wdata.size(); i++)
+        {
+            tab[index].wdata_be[i] = data_be[i];
+            tab[index].wdata[i]    = data[i];
         }
     }
@@ -429,20 +429,20 @@
                    const bool        rerror)
     {
-        data_t  value;
-        data_t  mask;
-
-        assert( (index < size_tab) and
+        data_t value;
+        data_t mask;
+
+        assert((index < size_tab) and
         "MEMC ERROR: The selected entry is out of range in TRT write_rsp()");
 
-        assert( (word < tab[index].wdata_be.size()) and
+        assert((word < tab[index].wdata_be.size()) and
         "MEMC ERROR: Bad word index in TRT write_rsp()");
 
-        assert( (tab[index].valid) and
+        assert((tab[index].valid) and
         "MEMC ERROR: TRT entry not valid in TRT write_rsp()");
 
-        assert( (tab[index].xram_read ) and
+        assert((tab[index].xram_read ) and
         "MEMC ERROR: TRT entry is not a GET in TRT write_rsp()");
 
-        if ( rerror )
+        if (rerror)
         {
             tab[index].rerror = true;
@@ -456,7 +456,7 @@
 
         // second 32 bits word
-        value = (data_t)(data>>32);
-        mask  = be_to_mask(tab[index].wdata_be[word+1]);
-        tab[index].wdata[word+1] = (tab[index].wdata[word+1] & mask) | (value & ~mask);
+        value = (data_t)(data >> 32);
+        mask  = be_to_mask(tab[index].wdata_be[word + 1]);
+        tab[index].wdata[word + 1] = (tab[index].wdata[word + 1] & mask) | (value & ~mask);
     }
     /////////////////////////////////////////////////////////////////////
@@ -467,5 +467,5 @@
     void erase(const size_t index)
     {
-        assert( (index < size_tab) and
+        assert((index < size_tab) and
         "MEMC ERROR: The selected entry is out of range in TRT erase()");
 
@@ -480,5 +480,5 @@
     bool is_config(const size_t index)
     {
-        assert( (index < size_tab) and
+        assert((index < size_tab) and
         "MEMC ERROR: The selected entry is out of range in TRT is_config()");
 
