save interval too short, also normalise it
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 21 Jan 2022 21:01:02 +0000 (21:01 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 21 Jan 2022 21:01:02 +0000 (21:01 +0000)
verilator/microwatt-verilator.cpp

index 45aa33626732c7c235661f7123c608ca4674e2ab..9e3905500a5b0394c7494ca1bdfabb784d87a8ad 100644 (file)
@@ -108,8 +108,8 @@ int memdump(vluint64_t time, unsigned char *mem, size_t sz)
 }
 
 // save-trigger offsets
-vluint64_t save_offset = 500000;
-vluint64_t save_countdown = save_offset;
+vluint64_t save_offset = 1000000;
+vluint64_t save_countdown = save_offset-10;
 
 // write (masked by sel) to internal mem offset by bram_addr line
 static void mem_write(unsigned char *mem,
@@ -272,7 +272,7 @@ int main(int argc, char **argv)
             if (mem != NULL) {
                 memdump(main_time, mem, sz);
             }
-            save_countdown = save_offset; // loop for next snapshot
+            save_countdown = save_offset-1; // loop for next snapshot
         } else {
             --save_countdown;
         }