Reset the atomics flags if RMW_Read is not followed by a RMW_Read or RMW_Write
authorPolina Dudnik <pdudnik@gmail.com>
Fri, 28 Aug 2009 20:09:41 +0000 (15:09 -0500)
committerPolina Dudnik <pdudnik@gmail.com>
Fri, 28 Aug 2009 20:09:41 +0000 (15:09 -0500)
src/mem/slicc/symbols/StateMachine.cc

index 0a3d4a85debb0f77417994d75f74cad054ca7303..86f92b692ddffe1b160d2c93af05c2d7dc278e8c 100644 (file)
@@ -862,7 +862,19 @@ void StateMachine::printCWakeup(ostream& out, string component)
                  assert(0); \n \
                } \n \
              } \n \
-             } \n \  
+             } \n \ 
+             else { \n \
+               if (servicing_atomic > 0) { \n \
+                 // reset \n \
+                  servicing_atomic = 0; \n \
+                  read_counter = 0; \n \
+                  started_receiving_writes = false; \n \
+                  locked_read_request1 = Address(-1); \n \
+                  locked_read_request2 = Address(-1); \n \
+                  locked_read_request3 = Address(-1); \n \
+                  locked_read_request4 = Address(-1); \n \
+                } \n \
+              } \n \
                ";
     output.insert(pos, atomics_string);
     /*string foo = "// Cannot do anything with this transition, go check next doable transition (mostly likely of next port)\n";