fixes AXI test

This commit is contained in:
2022-10-02 18:20:00 +02:00
parent aa58ec0fa7
commit 34d4102422
7 changed files with 219 additions and 75 deletions

View File

@ -11,21 +11,26 @@
#include <scc/trace.h>
#include <scc/tracer.h>
#include <util/ities.h>
#include <cstdlib>
using namespace scc;
using namespace sc_core;
int sc_main(int argc, char* argv[]) {
scc::init_logging(LogConfig().logLevel(log::INFO).logAsync(false));
auto token = util::split(argv[0], '/');
auto trc = scc::create_fst_trace_file(token.back().c_str());
scc::tracer trace(token.back(), scc::tracer::file_type::NONE, trc);
auto my_name = util::split(argv[0], '/').back();
scc::init_logging(LogConfig().logLevel(getenv("SCC_TEST_VERBOSE")?log::DEBUG:log::INFO).logAsync(false));
// create tracer
//auto trc = scc::create_fst_trace_file(my_name.c_str());
//auto trc = scc::create_vcd_pull_trace_file(my_name.c_str());
scc::tracer trace(my_name, scc::tracer::file_type::TEXT, true);
// instantiate design(s)
factory::get_instance().create();
// run tests
int result = Catch::Session().run( argc, argv );
// close trace file
//scc::close_fst_trace_file(trc);
//scc::close_vcd_pull_trace_file(trc);
// destroy design(s)
factory::get_instance().destroy();
scc::close_fst_trace_file(trc);
return result + sc_report_handler::get_count(SC_ERROR) + sc_report_handler::get_count(SC_WARNING);
}