2017-02-09 12:43:43 +00:00
|
|
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
|
|
|
//
|
|
|
|
// DESCRIPTION: Verilator: Verilog Test module
|
|
|
|
//
|
2020-03-21 15:24:24 +00:00
|
|
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
|
|
|
// any use, without warranty, 2017 by Wilson Snyder.
|
|
|
|
// SPDX-License-Identifier: CC0-1.0
|
2017-02-09 12:43:43 +00:00
|
|
|
|
|
|
|
#include <verilated.h>
|
|
|
|
#include "Vt_flag_fi.h"
|
|
|
|
|
|
|
|
//======================================================================
|
|
|
|
|
|
|
|
unsigned int main_time = 0;
|
|
|
|
|
2019-11-10 01:35:12 +00:00
|
|
|
double sc_time_stamp() { return main_time; }
|
2017-02-09 12:43:43 +00:00
|
|
|
|
2020-08-15 14:12:55 +00:00
|
|
|
VM_PREFIX* topp = nullptr;
|
2017-02-09 12:43:43 +00:00
|
|
|
bool gotit = false;
|
|
|
|
|
2019-11-10 01:35:12 +00:00
|
|
|
void myfunction() { gotit = true; }
|
2017-02-09 12:43:43 +00:00
|
|
|
|
2019-11-10 01:35:12 +00:00
|
|
|
int main(int argc, char* argv[]) {
|
2017-02-09 12:43:43 +00:00
|
|
|
topp = new VM_PREFIX;
|
|
|
|
|
|
|
|
Verilated::debug(0);
|
|
|
|
|
|
|
|
topp->eval();
|
2021-02-22 02:25:21 +00:00
|
|
|
if (!gotit) vl_fatal(__FILE__, __LINE__, "dut", "Never got call to myfunction");
|
2017-02-09 12:43:43 +00:00
|
|
|
|
|
|
|
topp->final();
|
2020-11-17 11:37:55 +00:00
|
|
|
VL_DO_DANGLING(delete topp, topp);
|
2017-02-09 12:43:43 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|