1 // -*- mode: C++; c-file-style: "cc-mode" -*-
2 // This file ONLY is placed under the Creative Commons Public Domain, for
3 // any use, without warranty, 2020 by Edgar E. Iglesias.
4 // SPDX-License-Identifier: CC0-1.0
5
6 #include VM_PREFIX_INCLUDE
7 #include "Vt_sc_names.h"
8
9 VM_PREFIX* tb = nullptr;
10
sc_main(int argc,char * argv[])11 int sc_main(int argc, char* argv[]) {
12 tb = new VM_PREFIX("tb");
13 std::vector<sc_object*> ch = tb->get_child_objects();
14 bool found = false;
15
16 /* We expect to find clk in here. */
17 for (int i = 0; i < ch.size(); ++i) {
18 if (!strcmp(ch[i]->basename(), "clk")) found = true;
19 }
20
21 if (found) {
22 VL_PRINTF("*-* All Finished *-*\n");
23 tb->final();
24 } else {
25 vl_fatal(__FILE__, __LINE__, "tb", "Unexpected results\n");
26 }
27 VL_DO_DANGLING(delete tb, tb);
28 return 0;
29 }
30