summaryrefslogtreecommitdiff
path: root/tests/projects/embed/verilator/modules/src/sim_main.cpp
blob: aff1c83ba3bb606de076fad441e6eae7cd7ef9b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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;
}