diff options
Diffstat (limited to 'verilator_example_c++/sim_main.cc')
-rw-r--r-- | verilator_example_c++/sim_main.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/verilator_example_c++/sim_main.cc b/verilator_example_c++/sim_main.cc new file mode 100644 index 0000000..6652dd9 --- /dev/null +++ b/verilator_example_c++/sim_main.cc @@ -0,0 +1,15 @@ +#include <cstdio> + +#include "Vhello.h" +#include "verilated.h" + +int +main(int argc, char **argv) +{ + VerilatedContext *cp = new VerilatedContext; + cp->commandArgs(argc, argv); + Vhello *top = new Vhello{cp}; + while (!cp->gotFinish()) + top->eval(); + fprintf(stderr, "it finished.\n"); +} |