summaryrefslogtreecommitdiff
path: root/src/main/resources
diff options
context:
space:
mode:
authorAdam Izraelevitz2017-01-11 11:42:16 -0800
committerGitHub2017-01-11 11:42:16 -0800
commit514eadb99e6715e161c73f487347872eed004230 (patch)
tree0099c332f9a629a0b41eb3680f6c493e18bf57ca /src/main/resources
parent8a63d43762afdbdd17c04faf01201181c1eb9a8d (diff)
parent06df5adfd78061aa5ae7567882fb8c42d7260a46 (diff)
Merge branch 'master' into fixedPointFromBits
Diffstat (limited to 'src/main/resources')
-rw-r--r--src/main/resources/top.cpp7
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;