diff options
Diffstat (limited to 'tests/projects/embed/verilator/modules/src/sim_main.cpp')
| -rw-r--r-- | tests/projects/embed/verilator/modules/src/sim_main.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/projects/embed/verilator/modules/src/sim_main.cpp b/tests/projects/embed/verilator/modules/src/sim_main.cpp new file mode 100644 index 000000000..aff1c83ba --- /dev/null +++ b/tests/projects/embed/verilator/modules/src/sim_main.cpp @@ -0,0 +1,16 @@ +#include "hello.h" +#include "verilated.h" +import mod; + +double sc_time_stamp() { return 0; } + +int main(int argc, char** argv) { + VerilatedContext* contextp = new VerilatedContext; + contextp->commandArgs(argc, argv); + hello* top = new hello{contextp}; + mod::say("hello module!"); + while (!contextp->gotFinish()) { top->eval(); } + delete top; + delete contextp; + return 0; +} |
