2020-08-13 14:23:02 +02: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
|
|
|
|
|
|
2023-10-26 20:36:18 +02:00
|
|
|
using namespace sc_core;
|
|
|
|
|
|
2020-08-15 16:12:55 +02:00
|
|
|
VM_PREFIX* tb = nullptr;
|
2020-08-13 14:23:02 +02:00
|
|
|
|
|
|
|
|
int sc_main(int argc, char* argv[]) {
|
2022-08-30 05:50:32 +02:00
|
|
|
tb = new VM_PREFIX{"tb"};
|
2020-10-28 01:03:17 +01:00
|
|
|
std::vector<sc_object*> ch = tb->get_child_objects();
|
2020-08-13 14:23:02 +02:00
|
|
|
bool found = false;
|
|
|
|
|
|
2025-01-22 04:00:04 +01:00
|
|
|
// We expect to find clk in here
|
2020-08-13 14:23:02 +02:00
|
|
|
for (int i = 0; i < ch.size(); ++i) {
|
2022-09-15 03:10:19 +02:00
|
|
|
if (!std::strcmp(ch[i]->basename(), "clk")) found = true;
|
2020-08-13 14:23:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (found) {
|
|
|
|
|
VL_PRINTF("*-* All Finished *-*\n");
|
|
|
|
|
tb->final();
|
|
|
|
|
} else {
|
|
|
|
|
vl_fatal(__FILE__, __LINE__, "tb", "Unexpected results\n");
|
|
|
|
|
}
|
2020-11-17 12:37:55 +01:00
|
|
|
VL_DO_DANGLING(delete tb, tb);
|
2020-08-13 14:23:02 +02:00
|
|
|
return 0;
|
|
|
|
|
}
|