[Downgrade] downgrade example file to 4.0 ver.

This commit is contained in:
bLueriVerLHR
2023-05-11 22:34:21 +08:00
parent 0bf1c68d94
commit 5f2016f254
2 changed files with 6 additions and 8 deletions

View File

@@ -18,18 +18,15 @@ int main(int argc, char** argv) {
// real project, it is better to start with a more complete example,
// e.g. examples/c_tracing.
// Construct a VerilatedContext to hold simulation time, etc.
VerilatedContext* contextp = new VerilatedContext;
// Pass arguments so Verilated code can see them, e.g. $value$plusargs
// This needs to be called before you create any model
contextp->commandArgs(argc, argv);
Verilated::commandArgs(argc, argv);
// Construct the Verilated model, from Vtop.h generated from Verilating "top.v"
Vtop* top = new Vtop{contextp};
Vtop* top = new Vtop();
// Simulate until $finish
while (!contextp->gotFinish()) {
while (!Verilated::gotFinish()) {
// Evaluate model
top->eval();