Index: trunk/modules/vci_cc_vcache_wrapper2_v1/caba/source/include/vci_cc_vcache_wrapper2_v1.h
===================================================================
--- trunk/modules/vci_cc_vcache_wrapper2_v1/caba/source/include/vci_cc_vcache_wrapper2_v1.h	(revision 20)
+++ trunk/modules/vci_cc_vcache_wrapper2_v1/caba/source/include/vci_cc_vcache_wrapper2_v1.h	(revision 37)
@@ -373,4 +373,5 @@
     sc_signal<bool>         r_vci_rsp_ins_error;
     sc_signal<bool>         r_vci_rsp_data_error;
+    sc_signal<bool>         r_dcache_tlb_sc_fail;
 
     data_t                  *r_icache_miss_buf;    
Index: trunk/modules/vci_cc_vcache_wrapper2_v1/caba/source/src/vci_cc_vcache_wrapper2_v1.cpp
===================================================================
--- trunk/modules/vci_cc_vcache_wrapper2_v1/caba/source/src/vci_cc_vcache_wrapper2_v1.cpp	(revision 20)
+++ trunk/modules/vci_cc_vcache_wrapper2_v1/caba/source/src/vci_cc_vcache_wrapper2_v1.cpp	(revision 37)
@@ -275,4 +275,5 @@
       r_vci_rsp_ins_error("r_vci_rsp_ins_error"),
       r_vci_rsp_data_error("r_vci_rsp_data_error"),
+      r_dcache_tlb_sc_fail("r_dcache_tlb_sc_fail"),
 
       r_vci_tgt_fsm("r_vci_tgt_fsm"),
@@ -514,4 +515,5 @@
 
 	r_dcache_cc_check         = false;
+	r_dcache_tlb_sc_fail	  = false;
 
         // activity counters
@@ -3006,5 +3008,6 @@
 
 		if (r_dcache_inval_tlb_rsp) r_dcache_inval_tlb_rsp = false;
-		if (r_dcache_inval_rsp) r_dcache_inval_rsp = false;		 	    }
+		if (r_dcache_inval_rsp) r_dcache_inval_rsp = false;		 	    
+	    }
 	    else 
 	    {
@@ -3014,4 +3017,5 @@
                     r_dcache_inval_tlb_rsp = false;
                     r_dcache_fsm = DCACHE_IDLE;
+		    if (r_dcache_tlb_sc_fail) r_dcache_tlb_sc_fail = false;
                     m_cost_data_tlb_miss_frz++;
                 }
@@ -3019,8 +3023,11 @@
 		{
         	    r_dcache_inval_rsp = false;
+		    if (r_dcache_tlb_sc_fail) r_dcache_tlb_sc_fail = false;
 		    r_dcache_fsm = DCACHE_IDLE;
 		}
-		else if ( r_dcache_tlb_ll_dirty_req )
+		else if ( r_dcache_tlb_sc_fail )
 	        {
+		    r_dcache_tlb_ll_dirty_req = true;
+		    r_dcache_tlb_sc_fail = false;
 	            r_dcache_fsm = DCACHE_LL_DIRTY_WAIT; 
 	        }
@@ -3252,4 +3259,5 @@
         	    r_dcache_inval_tlb_rsp = false;
         	    r_dcache_fsm = DCACHE_IDLE;
+		    if (r_dcache_tlb_sc_fail) r_dcache_tlb_sc_fail = false;
         	    m_cost_data_tlb_miss_frz++;
         	}
@@ -3257,8 +3265,11 @@
         	{
         	    r_dcache_inval_rsp = false;
+		    if (r_dcache_tlb_sc_fail) r_dcache_tlb_sc_fail = false;
         	    r_dcache_fsm = DCACHE_IDLE;
         	}
-	    	else if ( r_dcache_tlb_ll_acc_req )
+	    	else if ( r_dcache_tlb_sc_fail )
 	    	{
+		    r_dcache_tlb_sc_fail = false;
+		    r_dcache_tlb_ll_acc_req = true;
 	    	    r_dcache_fsm = DCACHE_TLB1_LL_WAIT; 
 	    	}
@@ -3713,4 +3724,5 @@
                 {
                     r_dcache_inval_tlb_rsp = false;
+		    if (r_dcache_tlb_sc_fail) r_dcache_tlb_sc_fail = false;
                     r_dcache_fsm = DCACHE_IDLE;
                     m_cost_data_tlb_miss_frz++;
@@ -3719,8 +3731,11 @@
 		{
         	    r_dcache_inval_rsp = false;
+		    if (r_dcache_tlb_sc_fail) r_dcache_tlb_sc_fail = false;
 		    r_dcache_fsm = DCACHE_IDLE;
 		}
-	        else if ( r_dcache_tlb_ll_acc_req )
+	        else if ( r_dcache_tlb_sc_fail )
 	        {
+	            r_dcache_tlb_ll_acc_req = true;
+		    r_dcache_tlb_sc_fail = false;
 	            r_dcache_fsm = DCACHE_TLB2_LL_WAIT; 
 	        }
@@ -4676,8 +4691,11 @@
 	            r_dcache_inval_rsp = false;
 	            r_dcache_fsm = DCACHE_IDLE;
+		    if (r_dcache_tlb_sc_fail) r_dcache_tlb_sc_fail = false;
 	            m_cost_data_tlb_miss_frz++;
 	        }
-	        else if ( r_dcache_itlb_ll_acc_req )
+	        else if ( r_dcache_tlb_sc_fail )
 	        {
+		    r_dcache_tlb_sc_fail = false;
+		    r_dcache_itlb_ll_acc_req = true;
 	            r_dcache_fsm = DCACHE_ITLB_LL_WAIT; 
 	        }
@@ -5226,5 +5244,6 @@
 	else if ( p_vci_ini_rw.rdata.read() == 1 ) // store conditional is not successful
 	{
-	    r_dcache_itlb_ll_acc_req = true;
+	    r_dcache_tlb_sc_fail = true;
+	    //r_dcache_itlb_ll_acc_req = true;
 	}
         r_dcache_itlb_sc_acc_req = false;
@@ -5330,5 +5349,6 @@
 	else if ( p_vci_ini_rw.rdata.read() == 1 ) // store conditional is not successful
 	{
-	    r_dcache_tlb_ll_acc_req = true;
+	    r_dcache_tlb_sc_fail = true;
+	    //r_dcache_tlb_ll_acc_req = true;
 	}
         r_dcache_tlb_sc_acc_req = false;
@@ -5368,5 +5388,6 @@
 	else if ( p_vci_ini_rw.rdata.read() == 1 ) // store conditional is not successful
 	{
-	    r_dcache_tlb_ll_dirty_req = true;
+	    r_dcache_tlb_sc_fail = true;
+	    //r_dcache_tlb_ll_dirty_req = true;
 	}
         r_dcache_tlb_sc_dirty_req = false;
