Index: trunk/modules/vci_vdspin_target_wrapper/caba/source/src/vci_vdspin_target_wrapper.cpp
===================================================================
--- trunk/modules/vci_vdspin_target_wrapper/caba/source/src/vci_vdspin_target_wrapper.cpp	(revision 149)
+++ trunk/modules/vci_vdspin_target_wrapper/caba/source/src/vci_vdspin_target_wrapper.cpp	(revision 185)
@@ -26,4 +26,6 @@
 
 #include "../include/vci_vdspin_target_wrapper.h"
+
+using namespace soclib::common;
 
 namespace soclib { namespace caba {
@@ -67,11 +69,11 @@
 tmpl(void)::transition()
 {
-	sc_uint<dspin_cmd_width>	cmd_fifo_data;
-	bool				cmd_fifo_write;
-	bool				cmd_fifo_read;
-
-	sc_uint<dspin_rsp_width>	rsp_fifo_data;
-	bool				rsp_fifo_write;
-	bool				rsp_fifo_read;
+	sc_uint<dspin_cmd_width>		cmd_fifo_data;
+	bool					cmd_fifo_write;
+	bool					cmd_fifo_read;
+
+	sc_uint<dspin_rsp_width>		rsp_fifo_data;
+	bool					rsp_fifo_write;
+	bool					rsp_fifo_read;
 
 	if (p_resetn == false) 
@@ -121,5 +123,5 @@
                     else
                     {
-                        rsp_fifo_data = rsp_fifo_data | 0x100000000;
+                        rsp_fifo_data = rsp_fifo_data | 0x100000000LL;
                         r_rsp_fsm = RSP_WRITE;
                     }
@@ -135,5 +137,5 @@
                     if ( p_vci.reop ) 
                     {
-                        rsp_fifo_data = rsp_fifo_data | 0x100000000;
+                        rsp_fifo_data = rsp_fifo_data | 0x100000000LL;
                         r_rsp_fsm = RSP_IDLE;
                     }
@@ -208,6 +210,6 @@
                     r_cmd_buf1 = r_fifo_cmd.read();		// save command parameters
                     // read command if EOP
-                    if ( (r_fifo_cmd.read() & 0x8000000000) )   r_cmd_fsm = CMD_READ;
-                    else					r_cmd_fsm = CMD_WDATA;
+                    if ( (r_fifo_cmd.read() & 0x8000000000LL) )   r_cmd_fsm = CMD_READ;
+                    else					  r_cmd_fsm = CMD_WDATA;
                     r_flit_count = 0;
 		}
@@ -223,7 +225,7 @@
 		if( r_fifo_cmd.rok() && p_vci.cmdack.read() )
                 {
-                    if ( (r_cmd_buf1.read() & 0x0000200000) == 0 ) r_flit_count = r_flit_count + 1;
+                    if ( (r_cmd_buf1.read() & 0x0000200000LL) == 0 ) 	r_flit_count = r_flit_count + 1;
 		    cmd_fifo_read = true;
-                    if ( (r_fifo_cmd.read() & 0x8000000000) ) 	r_cmd_fsm = CMD_IDLE;
+                    if ( (r_fifo_cmd.read() & 0x8000000000LL) ) 	r_cmd_fsm = CMD_IDLE;
 		}
                 break;
@@ -254,5 +256,5 @@
             if ( r_fifo_cmd.rok() )
             {
-                sc_uint<dspin_cmd_width>  minmax = r_cmd_buf0.read() & 0x7FFFF80000;
+                sc_uint<dspin_cmd_width>  minmax = r_cmd_buf0.read() & 0x7FFFF80000LL;
                 if ( vci_param::N == 40 ) minmax = (minmax << 1);
                 else			  minmax = (minmax >> (39 - vci_param::N) ); 
@@ -260,8 +262,8 @@
 	        p_vci.address = (sc_uint<vci_param::N>)minmax | 0x3;
                 p_vci.cmd     = vci_param::CMD_WRITE;
-                p_vci.wdata   = (sc_uint<8*vci_param::B>)(r_fifo_cmd.read() & 0x00FFFFFFFF);
-                p_vci.be      = (sc_uint<vci_param::B>)((r_fifo_cmd.read() & 0x0F00000000) >> 32);
-                p_vci.srcid   = (sc_uint<vci_param::S>)((r_cmd_buf0.read() & 0x000007FFE0) >> 5);
-                p_vci.trdid   = (sc_uint<vci_param::T>)((r_cmd_buf0.read() & 0x000000001E) >> 1);
+                p_vci.wdata   = (sc_uint<8*vci_param::B>)(r_fifo_cmd.read() & 0x00FFFFFFFFLL);
+                p_vci.be      = (sc_uint<vci_param::B>)((r_fifo_cmd.read()  & 0x0F00000000LL) >> 32);
+                p_vci.srcid   = (sc_uint<vci_param::S>)((r_cmd_buf0.read()  & 0x000007FFE0LL) >> 5);
+                p_vci.trdid   = (sc_uint<vci_param::T>)((r_cmd_buf0.read()  & 0x000000001ELL) >> 1);
 		p_vci.pktid   = 0;
                 p_vci.plen    = vci_param::B;
@@ -282,13 +284,13 @@
             p_vci.cmdval  = true;
 	    p_vci.address = address;
-            p_vci.cmd     = (sc_uint<2>)((r_cmd_buf1.read()            & 0x0001800000) >> 23);
+            p_vci.cmd     = (sc_uint<2>)((r_cmd_buf1.read()            & 0x0001800000LL) >> 23);
 	    p_vci.wdata   = 0;
-            p_vci.be      = (sc_uint<vci_param::B>)((r_cmd_buf1.read() & 0x000000001E) >> 1);
-            p_vci.srcid   = (sc_uint<vci_param::S>)((r_cmd_buf1.read() & 0x7FFE000000) >> 25);
-            p_vci.trdid   = (sc_uint<vci_param::T>)((r_cmd_buf1.read() & 0x0000001FE0) >> 5);
+            p_vci.be      = (sc_uint<vci_param::B>)((r_cmd_buf1.read() & 0x000000001ELL) >> 1);
+            p_vci.srcid   = (sc_uint<vci_param::S>)((r_cmd_buf1.read() & 0x7FFE000000LL) >> 25);
+            p_vci.trdid   = (sc_uint<vci_param::T>)((r_cmd_buf1.read() & 0x0000001FE0LL) >> 5);
 	    p_vci.pktid   = 0;
-            p_vci.plen    = (sc_uint<vci_param::K>)((r_cmd_buf1.read() & 0x00001FE000) >> 13);
-            p_vci.contig  = ((r_cmd_buf1.read() & 0x0000400000) != 0);
-            p_vci.cons    = ((r_cmd_buf1.read() & 0x0000200000) != 0);
+            p_vci.plen    = (sc_uint<vci_param::K>)((r_cmd_buf1.read() & 0x00001FE000LL) >> 13);
+            p_vci.contig  = ((r_cmd_buf1.read() & 0x0000400000LL) != 0);
+            p_vci.cons    = ((r_cmd_buf1.read() & 0x0000200000LL) != 0);
             p_vci.eop     = true;
 	}
@@ -302,14 +304,14 @@
                 p_vci.cmdval  = true;
 	        p_vci.address = address + (r_flit_count.read()*vci_param::B);
-                p_vci.cmd     = (sc_uint<2>)((r_cmd_buf1.read()              & 0x0001800000) >> 23);
-		p_vci.wdata   = (sc_uint<8*vci_param::B>)(r_fifo_cmd.read()  & 0x00FFFFFFFF);
-		p_vci.be      = (sc_uint<vci_param::B>)((r_fifo_cmd.read()   & 0x0F00000000) >> 32);
-                p_vci.srcid   = (sc_uint<vci_param::S>)((r_cmd_buf1.read()   & 0x7FFE000000) >> 25);
-                p_vci.trdid   = (sc_uint<vci_param::T>)((r_cmd_buf1.read()   & 0x0000001FE0) >> 5);
+                p_vci.cmd     = (sc_uint<2>)((r_cmd_buf1.read()              & 0x0001800000LL) >> 23);
+		p_vci.wdata   = (sc_uint<8*vci_param::B>)(r_fifo_cmd.read()  & 0x00FFFFFFFFLL);
+		p_vci.be      = (sc_uint<vci_param::B>)((r_fifo_cmd.read()   & 0x0F00000000LL) >> 32);
+                p_vci.srcid   = (sc_uint<vci_param::S>)((r_cmd_buf1.read()   & 0x7FFE000000LL) >> 25);
+                p_vci.trdid   = (sc_uint<vci_param::T>)((r_cmd_buf1.read()   & 0x0000001FE0LL) >> 5);
 		p_vci.pktid   = 0;
-                p_vci.plen    = (sc_uint<vci_param::K>)((r_cmd_buf1.read() & 0x00001FE000) >> 13);
-                p_vci.contig  = ((r_cmd_buf1.read() & 0x0000400000) != 0);
-                p_vci.cons    = ((r_cmd_buf1.read() & 0x0000200000) != 0);
-		p_vci.eop     = ((r_fifo_cmd.read() & 0x8000000000) == 0x8000000000); 
+                p_vci.plen    = (sc_uint<vci_param::K>)((r_cmd_buf1.read() & 0x00001FE000LL) >> 13);
+                p_vci.contig  = ((r_cmd_buf1.read() & 0x0000400000LL) != 0);
+                p_vci.cons    = ((r_cmd_buf1.read() & 0x0000200000LL) != 0);
+		p_vci.eop     = ((r_fifo_cmd.read() & 0x8000000000LL) == 0x8000000000LL); 
             }
             else
