Adapted to latest changes in SCC and DBT_RISE(-RISCV) repos
This commit is contained in:
parent
c199db7bfd
commit
be0c930879
1
.project
1
.project
|
@ -23,6 +23,5 @@
|
||||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||||
<nature>org.eclipse.linuxtools.tmf.project.nature</nature>
|
|
||||||
</natures>
|
</natures>
|
||||||
</projectDescription>
|
</projectDescription>
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
[requires]
|
[requires]
|
||||||
gsl_microsoft/20180102@bincrafters/stable
|
gsl_microsoft/20180102@bincrafters/stable
|
||||||
spdlog/0.16.3@bincrafters/stable
|
fmt/5.2.1@bincrafters/stable
|
||||||
#fmt/5.2.1@bincrafters/stable
|
|
||||||
fmt/4.1.0@bincrafters/stable
|
|
||||||
Seasocks/1.3.2@minres/stable
|
Seasocks/1.3.2@minres/stable
|
||||||
SystemC/2.3.3@minres/stable
|
SystemC/2.3.3@minres/stable
|
||||||
SystemCVerification/2.0.1@minres/stable
|
SystemCVerification/2.0.1@minres/stable
|
||||||
|
|
2
dbt-core
2
dbt-core
|
@ -1 +1 @@
|
||||||
Subproject commit c1d65b863b34d2ff9d459d3caa4e6972213f2026
|
Subproject commit db518d2bcf9a883f1875ad9feb154d795e320db9
|
|
@ -42,11 +42,6 @@ using namespace sc_core;
|
||||||
CLIParser::CLIParser(int argc, char *argv[])
|
CLIParser::CLIParser(int argc, char *argv[])
|
||||||
: desc("Options")
|
: desc("Options")
|
||||||
, valid(false) {
|
, valid(false) {
|
||||||
scc::init_logging();
|
|
||||||
LOGGER(DEFAULT)::reporting_level() = logging::WARNING;
|
|
||||||
LOGGER(connection)::reporting_level() = logging::WARNING;
|
|
||||||
LOGGER(SystemC)::reporting_level() = logging::WARNING;
|
|
||||||
|
|
||||||
build();
|
build();
|
||||||
try {
|
try {
|
||||||
// Variant 1: no non-options
|
// Variant 1: no non-options
|
||||||
|
@ -80,31 +75,28 @@ CLIParser::CLIParser(int argc, char *argv[])
|
||||||
std::cerr << "ERROR: " << e.what() << std::endl << std::endl;
|
std::cerr << "ERROR: " << e.what() << std::endl << std::endl;
|
||||||
std::cerr << desc << std::endl;
|
std::cerr << desc << std::endl;
|
||||||
}
|
}
|
||||||
if (vm_.count("verbose")) { // NONE, FATAL, ERROR, WARNING, INFO, DEBUG, TRACE
|
|
||||||
const std::array<int, 8> verbosity = {SC_NONE, // Logging::NONE
|
|
||||||
SC_LOW, // Logging::FATAL
|
|
||||||
SC_LOW, // Logging::ERROR
|
|
||||||
SC_LOW, // Logging::WARNING
|
|
||||||
SC_MEDIUM, // Logging::INFO
|
|
||||||
SC_HIGH, // logging::DEBUG
|
|
||||||
SC_FULL, // logging::TRACE
|
|
||||||
SC_DEBUG}; // logging::TRACE+1
|
|
||||||
auto log_level = vm_["verbose"].as<int>();
|
auto log_level = vm_["verbose"].as<int>();
|
||||||
|
auto verbosity = !vm_["Verbose"].defaulted()?vm_["Verbose"].as<unsigned>():vm_["verbose"].as<unsigned>();
|
||||||
|
auto colored_output = vm_["Verbose"].defaulted();
|
||||||
|
auto dbg_level = std::min<unsigned>(logging::DBGTRACE, verbosity);
|
||||||
|
|
||||||
auto l = logging::as_log_level(log_level > 6 ? 6 : log_level);
|
auto l = logging::as_log_level(log_level > 6 ? 6 : log_level);
|
||||||
LOGGER(DEFAULT)::reporting_level() = l;
|
auto log_regex = vm_["log-filter"].as<std::string>();
|
||||||
LOGGER(DEFAULT)::print_time() = false;
|
|
||||||
LOGGER(connection)::reporting_level() = l;
|
|
||||||
LOGGER(connection)::print_time() = false;
|
|
||||||
LOGGER(SystemC)::reporting_level() = l;
|
|
||||||
LOGGER(SystemC)::print_time() = false;
|
|
||||||
sc_report_handler::set_verbosity_level(verbosity[log_level]);
|
|
||||||
}
|
|
||||||
if (vm_.count("log-file")) {
|
if (vm_.count("log-file")) {
|
||||||
// configure the connection logger
|
auto log_file_name = vm_["log-file"].as<std::string>();
|
||||||
auto f = fopen(vm_["log-file"].as<std::string>().c_str(), "w");
|
scc::init_logging(scc::LogConfig()
|
||||||
LOG_OUTPUT(DEFAULT)::stream() = f;
|
.logFileName(log_file_name)
|
||||||
LOG_OUTPUT(connection)::stream() = f;
|
.logLevel(static_cast<logging::log_level>(dbg_level))
|
||||||
LOG_OUTPUT(SystemC)::stream() = f;
|
.logFilterRegex(log_regex)
|
||||||
|
.coloredOutput(colored_output)
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
scc::init_logging(scc::LogConfig()
|
||||||
|
.logLevel(static_cast<logging::log_level>(dbg_level))
|
||||||
|
.logFilterRegex(log_regex)
|
||||||
|
.coloredOutput(colored_output)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,7 +105,9 @@ void CLIParser::build() {
|
||||||
desc.add_options()
|
desc.add_options()
|
||||||
("help,h", "Print help message")
|
("help,h", "Print help message")
|
||||||
("verbose,v", po::value<int>()->implicit_value(3), "Sets logging verbosity")
|
("verbose,v", po::value<int>()->implicit_value(3), "Sets logging verbosity")
|
||||||
|
("Verbose,V", po::value<unsigned>()->default_value(logging::INFO), "Debug output level as with --verbose but print non-colored")
|
||||||
("log-file", po::value<std::string>(), "Sets default log file.")
|
("log-file", po::value<std::string>(), "Sets default log file.")
|
||||||
|
("log-filter", po::value<std::string>()->default_value(""), "log filter regular expression name")
|
||||||
("disass,d", po::value<std::string>()->implicit_value(""), "Enables disassembly")
|
("disass,d", po::value<std::string>()->implicit_value(""), "Enables disassembly")
|
||||||
("elf,l", po::value<std::string>(), "ELF file to load")
|
("elf,l", po::value<std::string>(), "ELF file to load")
|
||||||
("gdb-port,g", po::value<unsigned short>()->default_value(0), "enable gdb server and specify port to use")
|
("gdb-port,g", po::value<unsigned short>()->default_value(0), "enable gdb server and specify port to use")
|
||||||
|
|
2
riscv
2
riscv
|
@ -1 +1 @@
|
||||||
Subproject commit d037141d98951287215c4eee76a88e625433f331
|
Subproject commit cb447a1260843ea423317402c01361e1e19b591e
|
2
scc
2
scc
|
@ -1 +1 @@
|
||||||
Subproject commit 140a5a7067d9051cd15140f681428203843ced15
|
Subproject commit 45cd6c74114f7c85935cab63eeb12678e1f1eac0
|
Loading…
Reference in New Issue