diff options
Diffstat (limited to 'src/main/resources/top.cpp')
| -rw-r--r-- | src/main/resources/top.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/resources/top.cpp b/src/main/resources/top.cpp index 075d7085..4e9c1433 100644 --- a/src/main/resources/top.cpp +++ b/src/main/resources/top.cpp @@ -5,6 +5,13 @@ # include <verilated_vcd_c.h> // Trace file format header #endif +// Override Verilator definition so first $finish ends simulation +// Note: VL_USER_FINISH needs to be defined when compiling Verilator code +void vl_finish(const char* filename, int linenum, const char* hier) { + Verilated::flushCall(); + exit(0); +} + using namespace std; //VGCDTester *top; |
