Index: /trunk/lib/vci_ring_target/caba/source/include/vci_ring_target.h
===================================================================
--- /trunk/lib/vci_ring_target/caba/source/include/vci_ring_target.h	(revision 15)
+++ /trunk/lib/vci_ring_target/caba/source/include/vci_ring_target.h	(revision 16)
@@ -30,6 +30,6 @@
 #include "ring_signals_2.h"
 
-#define T_DEBUG
-#define TR_DEBUG
+//#define T_DEBUG
+//#define TR_DEBUG
 //#define T_DEBUG_FSM
 
@@ -192,9 +192,11 @@
 
 #ifdef T_DEBUG_FSM
-    std::cout << "--------------------------------------------" << std::endl;
-    std::cout             << " vci cmd fsm  = " << vci_cmd_fsm_state_str_t[r_vci_cmd_fsm] << std::endl
-                          << " vci rsp fsm  = " << vci_rsp_fsm_state_str_t[r_vci_rsp_fsm] << std::endl
-                          << " ring cmd fsm = " << ring_cmd_fsm_state_str_t[r_ring_cmd_fsm] << std::endl
-                          << " ring rsp fsm = " << ring_rsp_fsm_state_str_t[r_ring_rsp_fsm] << std::endl;
+if( trace(sc_time_stamp()))
+    std::cout << sc_time_stamp() << " - " << m_name
+                                 << " - vci cmd = " << vci_cmd_fsm_state_str_t[r_vci_cmd_fsm]
+                                 << " - vci rsp = " << vci_rsp_fsm_state_str_t[r_vci_rsp_fsm]
+                                 << " - ring cmd = " << ring_cmd_fsm_state_str_t[r_ring_cmd_fsm] 
+                                 << " - ring rsp = " << ring_rsp_fsm_state_str_t[r_ring_rsp_fsm]
+                                 << std::endl;
 #endif
 	
@@ -219,9 +221,6 @@
                                 if (m_cmd_fifo.read() & 0x1 == 0x1) // broadcast
                                 {
-#ifdef I_DEBUG
-std::cout << sc_time_stamp() << " -- " << m_name << " --  broadcast " << std::endl;
-#endif
                                         r_addr   = (sc_uint<vci_param::N>) 0x3;     
-                                        r_srcid  = (sc_uint<vci_param::S>) (m_cmd_fifo.read() >> 21); 
+                                        r_srcid  = (sc_uint<vci_param::S>) (m_cmd_fifo.read() >> 20); 
  					r_cmd    = (sc_uint<2>)  0x2; 
  					r_contig = (sc_uint<1>)  0x1; 
@@ -229,5 +228,5 @@
  					r_plen   = (sc_uint<vci_param::K>) 0x04; 
  					r_pktid  = (sc_uint<vci_param::P>) 0x0; 
- 					r_trdid  = (sc_uint<vci_param::T>) ((m_cmd_fifo.read() >> 17) & 0xF); 
+ 					r_trdid  = (sc_uint<vci_param::T>) ((m_cmd_fifo.read() >> 16) & 0xF); 
 
                                         r_vci_cmd_fsm = WDATA; 
@@ -269,10 +268,5 @@
 				else  // write command
 				{
-#ifdef T_DEBUG
-if( trace(sc_time_stamp()))
-         std::cout << sc_time_stamp() << " -- " << m_name  
-              << " -- r_vci_cmd_fsm -- CMD_SECOND_HEADER & !EOP (WRITE)"
-              << std::endl;
-#endif
+
  					cmd_fifo_get =  true;
  					r_srcid  = (sc_uint<vci_param::S>)  (m_cmd_fifo.read() >> 20) ; 
@@ -319,7 +313,4 @@
 	{
 		case RSP_HEADER:
-
-			if((p_vci.rspval.read() == true) && (m_rsp_fifo.wok()))
-			{
 #ifdef T_DEBUG
 if( trace(sc_time_stamp()))
@@ -332,4 +323,7 @@
               << std::endl;
 #endif
+			if((p_vci.rspval.read() == true) && (m_rsp_fifo.wok()))
+			{
+
 				rsp_fifo_data = (((uint64_t) p_vci.rsrcid.read() & 0x3FFF) << 12) |
                                                 (((uint64_t) p_vci.rerror.read() & 0x1) << 8) | 
@@ -342,8 +336,5 @@
 
 		case DATA:
-              
-			if((p_vci.rspval.read() == true) && (m_rsp_fifo.wok())) 
-			{
-#ifdef T_DEBUG
+ #ifdef T_DEBUG
 if( trace(sc_time_stamp()))
          std::cout << sc_time_stamp() << " -- " << m_name  
@@ -354,5 +345,8 @@
               << " -- reop : " << p_vci.reop.read()
               << std::endl;
-#endif
+#endif             
+			if((p_vci.rspval.read() == true) && (m_rsp_fifo.wok())) 
+			{
+
 
 				rsp_fifo_put = true;
