update submodule pointers

This commit is contained in:
Eyck Jentzsch 2020-06-18 06:20:04 +02:00
parent 7148f1caec
commit 6ee0cd1b29
10 changed files with 37 additions and 39 deletions

@ -1 +1 @@
Subproject commit 3caaa873be50218c1669b359cc672e685d09183c Subproject commit 715ffe5e74ee3e5ddfa214fba866d650d440f524

View File

@ -75,25 +75,26 @@ 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;
} }
auto log_level = vm_["verbose"].as<unsigned>();
auto verbosity = !vm_["Verbose"].defaulted() ? vm_["Verbose"].as<unsigned>() : vm_["verbose"].as<unsigned>(); auto verbosity = !vm_["Verbose"].defaulted() ? vm_["Verbose"].as<unsigned>() : vm_["verbose"].as<unsigned>();
auto colored_output = vm_["Verbose"].defaulted(); auto colored_output = vm_["Verbose"].defaulted();
auto dbg_level = std::min<unsigned>(logging::DBGTRACE, verbosity); auto dbg_level = vm_.count("debug-level")
? vm_["debug-level"].as<scc::log>()
: static_cast<scc::log>(std::min<unsigned>(static_cast<unsigned>(scc::log::DBGTRACE), verbosity));
auto l = logging::as_log_level(log_level > 6 ? 6 : log_level);
auto log_regex = vm_["log-filter"].as<std::string>(); auto log_regex = vm_["log-filter"].as<std::string>();
if (vm_.count("log-file")) { if (vm_.count("log-file")) {
auto log_file_name = vm_["log-file"].as<std::string>(); auto log_file_name = vm_["log-file"].as<std::string>();
scc::init_logging(scc::LogConfig() scc::init_logging(scc::LogConfig()
.logFileName(log_file_name) .logFileName(log_file_name)
.logLevel(static_cast<logging::log_level>(dbg_level)) .logLevel(static_cast<scc::log>(dbg_level))
.logFilterRegex(log_regex) .logFilterRegex(log_regex)
.coloredOutput(colored_output) .coloredOutput(colored_output)
); );
} else { } else {
scc::init_logging(scc::LogConfig() scc::init_logging(scc::LogConfig()
.logLevel(static_cast<logging::log_level>(dbg_level)) .logLevel(static_cast<scc::log>(dbg_level))
.logFilterRegex(log_regex) .logFilterRegex(log_regex)
.coloredOutput(colored_output) .coloredOutput(colored_output)
); );
@ -106,12 +107,13 @@ void CLIParser::build() {
("help,h", "Print help message") ("help,h", "Print help message")
("verbose,v", po::value<unsigned>()->implicit_value(3), "Sets logging verbosity") ("verbose,v", po::value<unsigned>()->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") ("Verbose,V", po::value<unsigned>()->default_value(logging::INFO), "Debug output level as with --verbose but print non-colored")
("debug-level,D", po::value<scc::log>(), "Debug output level (textual) as with --verbose")
("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") ("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")
("dump-ir", "dump the intermediate representation") ("ir-dump", "dump the intermediate representation")
("quantum", po::value<unsigned>(), "SystemC quantum time in ns") ("quantum", po::value<unsigned>(), "SystemC quantum time in ns")
("reset,r", po::value<std::string>(), "reset address") ("reset,r", po::value<std::string>(), "reset address")
("trace-level,t", po::value<unsigned>()->default_value(0), "enable tracing, or combination of 1=signals and 2=TX text, 4=TX compressed text, 6=TX in SQLite") ("trace-level,t", po::value<unsigned>()->default_value(0), "enable tracing, or combination of 1=signals and 2=TX text, 4=TX compressed text, 6=TX in SQLite")

View File

@ -65,10 +65,6 @@ int sc_main(int argc, char *argv[]) {
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
sc_report_handler::set_actions(SC_ID_MORE_THAN_ONE_SIGNAL_DRIVER_, SC_DO_NOTHING); sc_report_handler::set_actions(SC_ID_MORE_THAN_ONE_SIGNAL_DRIVER_, SC_DO_NOTHING);
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// create global CCI broker
///////////////////////////////////////////////////////////////////////////
cci::cci_register_broker(new cci_utils::broker("Global Broker"));
///////////////////////////////////////////////////////////////////////////
// CLI argument parsing & logging setup // CLI argument parsing & logging setup
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
CLIParser parser(argc, argv); CLIParser parser(argc, argv);

View File

@ -117,11 +117,11 @@ void clint::update_mtime(bool force) {
if (regs->r_mtimecmp > regs->r_mtime && clk > sc_core::SC_ZERO_TIME) { if (regs->r_mtimecmp > regs->r_mtime && clk > sc_core::SC_ZERO_TIME) {
sc_core::sc_time next_trigger = sc_core::sc_time next_trigger =
(clk * lfclk_mutiplier) * (regs->r_mtimecmp - regs->r_mtime) - cnt_fraction * clk; (clk * lfclk_mutiplier) * (regs->r_mtimecmp - regs->r_mtime) - cnt_fraction * clk;
SCTRACE() << "Timer fires at " << sc_time_stamp() + next_trigger; SCCTRACE() << "Timer fires at " << sc_time_stamp() + next_trigger;
mtime_evt.notify(next_trigger); mtime_evt.notify(next_trigger);
mtime_int_o.write(false); mtime_int_o.write(false);
} else { } else {
SCTRACE() << "Timer fired at " << sc_time_stamp(); SCCTRACE() << "Timer fired at " << sc_time_stamp();
mtime_int_o.write(true); mtime_int_o.write(true);
} }
} }

View File

@ -111,7 +111,7 @@ gpio::~gpio() = default;
void gpio::before_end_of_elaboration() { void gpio::before_end_of_elaboration() {
if (write_to_ws.get_value()) { if (write_to_ws.get_value()) {
SCTRACE() << "Adding WS handler for " << (std::string{"/ws/"} + name()); SCCTRACE() << "Adding WS handler for " << (std::string{"/ws/"} + name());
handler = std::make_shared<WsHandler>(); handler = std::make_shared<WsHandler>();
sc_comm_singleton::inst().registerWebSocketHandler((std::string{"/ws/"} + name()).c_str(), handler); sc_comm_singleton::inst().registerWebSocketHandler((std::string{"/ws/"} + name()).c_str(), handler);
} }

View File

@ -86,7 +86,7 @@ void mcp_3008::do_conversion() {
auto inp = ch_i[channel].read(); auto inp = ch_i[channel].read();
auto norm = 1024.0 * inp / vref; auto norm = 1024.0 * inp / vref;
auto res = static_cast<int>(norm); auto res = static_cast<int>(norm);
SCDEBUG(this->name()) << "Converting " << inp << " to " << norm << " as int " << res; SCCDEBUG(this->name()) << "Converting " << inp << " to " << norm << " as int " << res;
tx_bytes[1] = bit_sub<8, 2>(res); tx_bytes[1] = bit_sub<8, 2>(res);
tx_bytes[2] = bit_sub<0, 8>(res); tx_bytes[2] = bit_sub<0, 8>(res);
} else { } else {
@ -176,7 +176,7 @@ void mcp_3208::do_conversion() {
auto inp = ch_i[channel].read(); auto inp = ch_i[channel].read();
auto norm = 4096.0 * inp / vref; auto norm = 4096.0 * inp / vref;
auto res = static_cast<int>(norm); auto res = static_cast<int>(norm);
SCDEBUG(this->name()) << "Converting channel " << channel << " " << inp << "V to " << norm << " as int " SCCDEBUG(this->name()) << "Converting channel " << channel << " " << inp << "V to " << norm << " as int "
<< res; << res;
tx_bytes[1] = bit_sub<8, 4>(res); tx_bytes[1] = bit_sub<8, 4>(res);
tx_bytes[2] = bit_sub<0, 8>(res); tx_bytes[2] = bit_sub<0, 8>(res);

View File

@ -111,7 +111,7 @@ void plic::global_int_port_cb() {
if (enable && global_interrupts_i[i].read() == 1) { if (enable && global_interrupts_i[i].read() == 1) {
regs->r_pending[reg_idx] = regs->r_pending[reg_idx] | (0x1 << bit_ofs); regs->r_pending[reg_idx] = regs->r_pending[reg_idx] | (0x1 << bit_ofs);
handle_pending = true; handle_pending = true;
SCDEBUG(this->name()) << "pending interrupt identified: " << i; SCCDEBUG(this->name()) << "pending interrupt identified: " << i;
} }
} }
@ -138,7 +138,7 @@ void plic::handle_pending_int() {
claim_prio = prio; claim_prio = prio;
claim_int = i; claim_int = i;
raise_int = true; raise_int = true;
SCDEBUG(this->name()) << "pending interrupt activated: " << i; SCCDEBUG(this->name()) << "pending interrupt activated: " << i;
} }
} }
} }
@ -149,14 +149,14 @@ void plic::handle_pending_int() {
// todo: evluate clock period // todo: evluate clock period
} else { } else {
regs->r_claim_complete = 0; regs->r_claim_complete = 0;
SCDEBUG(this->name()) << "no further pending interrupt."; SCCDEBUG(this->name()) << "no further pending interrupt.";
} }
} }
void plic::reset_pending_int(uint32_t irq) { void plic::reset_pending_int(uint32_t irq) {
// todo: evaluate enable register (see spec) // todo: evaluate enable register (see spec)
// todo: make sure that pending is set, otherwise don't reset irq ... read spec. // todo: make sure that pending is set, otherwise don't reset irq ... read spec.
SCTRACE(this->name()) << "reset pending interrupt: " << irq; SCCTRACE(this->name()) << "reset pending interrupt: " << irq;
// reset related pending bit // reset related pending bit
auto reg_idx = irq >> 5; auto reg_idx = irq >> 5;
auto bit_ofs = irq & 0x1F; auto bit_ofs = irq & 0x1F;

View File

@ -57,7 +57,7 @@ terminal::~terminal() = default;
void terminal::before_end_of_elaboration() { void terminal::before_end_of_elaboration() {
if (write_to_ws.get_value()) { if (write_to_ws.get_value()) {
SCTRACE() << "Adding WS handler for " << (std::string{"/ws/"} + name()); SCCTRACE() << "Adding WS handler for " << (std::string{"/ws/"} + name());
handler = std::make_shared<WsHandler>(); handler = std::make_shared<WsHandler>();
sc_comm_singleton::inst().registerWebSocketHandler((std::string{"/ws/"} + name()).c_str(), handler); sc_comm_singleton::inst().registerWebSocketHandler((std::string{"/ws/"} + name()).c_str(), handler);
} }
@ -80,7 +80,7 @@ void terminal::receive(tlm::tlm_signal_gp<sc_dt::sc_logic> &gp, sc_core::sc_time
this->handler->send(os.str()); this->handler->send(os.str());
}); });
else else
SCINFO(this->name()) << " receive: '" << msg << "'"; SCCINFO(this->name()) << " receive: '" << msg << "'";
queue.clear(); queue.clear();
} }
} }

2
riscv

@ -1 +1 @@
Subproject commit abcfb7501148c6b9892c18ba651e7293342208f7 Subproject commit edeff7add807ab0e524b5d05b16defe58be2a867

2
scc

@ -1 +1 @@
Subproject commit d3d7c9f590ea422ad8d47486fb1efcaeef208cce Subproject commit 01458535fa10e3bd5794d50df82ce94f214bfbe1