diff options
| author | ruki <[email protected]> | 2026-06-28 22:38:37 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-06-28 23:05:09 +0800 |
| commit | f1194083f0f0b48e320afa6dd5e7353930044c9d (patch) | |
| tree | 3e4014ebdb37c46ff79c1d20a981a6b520c28464 /tests/projects/embed/verilator/modules/src/sim_main.cpp | |
| parent | fbf7ed31b095f201a577b86aafd523cb4efa3e8c (diff) | |
improve verilator rulesverilator
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; +} |
