From a9859aebb4a1baf58b2cf383ca85ba80d4eea313 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Stensg=C3=A5rd?= Date: Sat, 26 Apr 2025 17:45:52 +0200 Subject: verilator_example_c++: hello --- verilator_example_c++/sim_main.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 verilator_example_c++/sim_main.cc (limited to 'verilator_example_c++/sim_main.cc') 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 + +#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"); +} -- cgit v1.2.3