formal verif : move bits produced declarations closer to processes
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Fri, 8 May 2009 19:54:54 +0000 (15:54 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Fri, 8 May 2009 19:54:54 +0000 (15:54 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
formal-model/ooomem-double-update-minimal/mem.spin
formal-model/ooomem-two-writes/mem.spin

index 9fc540ae67745390c0e5f7000024f129572c9c08..bae92d6142422a46e19cafc00a3488dad67ca0f5 100644 (file)
 #define CLEAR_TOKENS(state, bits)      \
        state = (state) & ~(bits)
 
-/*
- * Bit encoding, proc_one_produced :
- */
-
-#define P1_PROD_NONE   (1 << 0)
-
-#define P1_READ_ONE    (1 << 1)
-#define P1_RMB         (1 << 2)
-#define P1_READ_TWO    (1 << 3)
-
-int proc_one_produced;
-
-#define P2_PROD_NONE   (1 << 0)
-
-#define P2_WRITE_ONE   (1 << 1)
-#define P2_WMB         (1 << 2)
-#define P2_WRITE_TWO   (1 << 3)
-
-int proc_two_produced;
-
 #define NR_PROCS 2
 
 #define get_pid()      (_pid)
@@ -168,6 +148,18 @@ DECLARE_CACHED_VAR(byte, beta, 0);
 byte read_one = 2;
 byte read_two = 2;
 
+/*
+ * Bit encoding, proc_one_produced :
+ */
+
+#define P1_PROD_NONE   (1 << 0)
+
+#define P1_READ_ONE    (1 << 1)
+#define P1_RMB         (1 << 2)
+#define P1_READ_TWO    (1 << 3)
+
+int proc_one_produced;
+
 active proctype test_proc_one()
 {
        assert(get_pid() < NR_PROCS);
@@ -203,6 +195,19 @@ active proctype test_proc_one()
        assert(read_one != 1 || read_two == 1);
 }
 
+
+/*
+ * Bit encoding, proc_two_produced :
+ */
+
+#define P2_PROD_NONE   (1 << 0)
+
+#define P2_WRITE_ONE   (1 << 1)
+#define P2_WMB         (1 << 2)
+#define P2_WRITE_TWO   (1 << 3)
+
+int proc_two_produced;
+
 active proctype test_proc_two()
 {
        assert(get_pid() < NR_PROCS);
index 828ff4a5d9245e51c3ba529af0ff4c0189caefc8..cb206d2596ef0a24b5b1d29aafba953e0dd1b356 100644 (file)
 #define CLEAR_TOKENS(state, bits)      \
        state = (state) & ~(bits)
 
-/*
- * Bit encoding, proc_one_produced :
- */
-
-#define P1_PROD_NONE   (1 << 0)
-
-#define P1_WRITE       (1 << 1)
-#define P1_WMB         (1 << 2)
-#define P1_SYNC_CORE   (1 << 3)
-#define P1_RMB         (1 << 4)
-#define P1_READ                (1 << 5)
-
-int proc_one_produced;
-
-#define P2_PROD_NONE   (1 << 0)
-
-#define P2_WRITE       (1 << 1)
-#define P2_WMB         (1 << 2)
-#define P2_SYNC_CORE   (1 << 3)
-#define P2_RMB         (1 << 4)
-#define P2_READ                (1 << 5)
-
-int proc_two_produced;
-
 #define NR_PROCS 2
 
 #define get_pid()      (_pid)
@@ -172,6 +148,20 @@ DECLARE_CACHED_VAR(byte, beta, 0);
 byte read_one = 2;
 byte read_two = 2;
 
+/*
+ * Bit encoding, proc_one_produced :
+ */
+
+#define P1_PROD_NONE   (1 << 0)
+
+#define P1_WRITE       (1 << 1)
+#define P1_WMB         (1 << 2)
+#define P1_SYNC_CORE   (1 << 3)
+#define P1_RMB         (1 << 4)
+#define P1_READ                (1 << 5)
+
+int proc_one_produced;
+
 active proctype test_proc_one()
 {
        assert(get_pid() < NR_PROCS);
@@ -222,6 +212,21 @@ active proctype test_proc_one()
        assert(!(read_one == 0 && read_two == 0));
 }
 
+
+/*
+ * Bit encoding, proc_two_produced :
+ */
+
+#define P2_PROD_NONE   (1 << 0)
+
+#define P2_WRITE       (1 << 1)
+#define P2_WMB         (1 << 2)
+#define P2_SYNC_CORE   (1 << 3)
+#define P2_RMB         (1 << 4)
+#define P2_READ                (1 << 5)
+
+int proc_two_produced;
+
 active proctype test_proc_two()
 {
        assert(get_pid() < NR_PROCS);
This page took 0.026816 seconds and 4 git commands to generate.