2020-08-13 12:23:02 +00:00
|
|
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
|
|
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
|
|
|
// any use, without warranty, 2020 by Edgar E. Iglesias.
|
|
|
|
// SPDX-License-Identifier: CC0-1.0
|
|
|
|
|
|
|
|
#include VM_PREFIX_INCLUDE
|
|
|
|
#include "Vt_sc_names.h"
|
|
|
|
|
2020-08-15 14:12:55 +00:00
|
|
|
VM_PREFIX* tb = nullptr;
|
2020-08-13 12:23:02 +00:00
|
|
|
|
|
|
|
int sc_main(int argc, char* argv[]) {
|
2022-08-30 03:50:32 +00:00
|
|
|
tb = new VM_PREFIX{"tb"};
|
2020-10-28 00:03:17 +00:00
|
|
|
std::vector<sc_object*> ch = tb->get_child_objects();
|
2020-08-13 12:23:02 +00:00
|
|
|
bool found = false;
|
|
|
|
|
|
|
|
/* We expect to find clk in here. */
|
|
|
|
for (int i = 0; i < ch.size(); ++i) {
|
2022-09-15 01:10:19 +00:00
|
|
|
if (!std::strcmp(ch[i]->basename(), "clk")) found = true;
|
2020-08-13 12:23:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (found) {
|
|
|
|
VL_PRINTF("*-* All Finished *-*\n");
|
|
|
|
tb->final();
|
|
|
|
} else {
|
|
|
|
vl_fatal(__FILE__, __LINE__, "tb", "Unexpected results\n");
|
|
|
|
}
|
2020-11-17 11:37:55 +00:00
|
|
|
VL_DO_DANGLING(delete tb, tb);
|
2020-08-13 12:23:02 +00:00
|
|
|
return 0;
|
|
|
|
}
|