updates submodules and sc_main to match them

This commit is contained in:
2025-11-27 17:57:30 +01:00
parent 1bbcbc9a69
commit 1338cbffb9
11 changed files with 33 additions and 27 deletions

2
.envrc
View File

@@ -5,6 +5,8 @@ if [ $distro == "CentOS" ]; then
. /opt/rh/rh-python38/enable . /opt/rh/rh-python38/enable
elif [ $distro == "Rocky" ]; then elif [ $distro == "Rocky" ]; then
. /opt/rh/gcc-toolset-11/enable . /opt/rh/gcc-toolset-11/enable
elif [ $distro == "RockyLinux" ]; then
. /opt/rh/gcc-toolset-14/enable
fi fi
if has module; then if has module; then
module load ./Modulefile module load ./Modulefile

View File

@@ -1 +0,0 @@
set breakpoint pending on

11
.vscode/launch.json vendored
View File

@@ -106,8 +106,15 @@
"name": "32bit VP", "name": "32bit VP",
"cwd": "${workspaceRoot}", "cwd": "${workspaceRoot}",
"program": "${workspaceFolder}/build/Debug/src/riscv-vp", "program": "${workspaceFolder}/build/Debug/src/riscv-vp",
"arguments": "--isa 'rv32gc_msu' -v INFO --disass -f fw/hello-world/hello.elf", "arguments": "--isa 'rv32gc_msu' -v INFO -f fw/hello-world/hello.elf",
"openGdbConsole": true "openGdbConsole": true,
"initCommands": [
"set breakpoint pending on",
"set breakpoint auto-hw on",
"set breakpoint always-inserted on",
"set output-radix 16"
],
"verbose": false
}, },
{ {
"type": "gdb", "type": "gdb",

View File

@@ -12,6 +12,7 @@ class Pkg(ConanFile):
) )
default_options = { default_options = {
"llvm-core/*:targets": "X86", "llvm-core/*:targets": "X86",
"llvm-core/*:components": "Native",
"boost/*:fPIC": "True", "boost/*:fPIC": "True",
"boost/*:header_only": "False", "boost/*:header_only": "False",
"boost/*:without_contract": "True", "boost/*:without_contract": "True",
@@ -46,7 +47,7 @@ class Pkg(ConanFile):
self.requires("lz4/1.9.3") self.requires("lz4/1.9.3")
self.requires("yaml-cpp/0.8.0") self.requires("yaml-cpp/0.8.0")
self.requires("jsoncpp/1.9.5") self.requires("jsoncpp/1.9.5")
self.requires("zlib/1.2.12") self.requires("zlib/1.3.1")
self.requires("asmjit/cci.20240531") self.requires("asmjit/cci.20240531")
if "WITH_LLVM" in os.environ: if "WITH_LLVM" in os.environ:
self.requires("llvm-core/19.1.7") self.requires("llvm-core/19.1.7")

2
scc

Submodule scc updated: 89b2b48cdf...82602d000f

View File

@@ -40,11 +40,10 @@ CLIParser::CLIParser(int argc, char* argv[])
} }
auto log_level = vm_["verbose"].as<scc::log>(); auto log_level = vm_["verbose"].as<scc::log>();
auto log_level_num = static_cast<unsigned>(log_level); auto log_level_num = static_cast<unsigned>(log_level);
LOGGER(DEFAULT)::reporting_level() = logging::as_log_level(log_level_num > 6 ? 6 : log_level_num); auto level = logging::as_log_level(log_level_num > 6 ? 6 : log_level_num);
LOGGER(connection)::reporting_level() = LOGGER(DEFAULT)::set_reporting_level(level);
logging::as_log_level(log_level_num > 4 ? log_level_num - 1 : log_level_num); LOGGER(connection)::set_reporting_level(level);
LOGGER(dbt_rise_iss)::reporting_level() = LOGGER(dbt_rise_iss)::set_reporting_level(level);
logging::as_log_level(log_level_num > 4 ? log_level_num - 1 : log_level_num);
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// configure logging // configure logging
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
@@ -57,8 +56,8 @@ CLIParser::CLIParser(int argc, char* argv[])
scc::stream_redirection cerr_redir(std::cerr, scc::log::ERROR); scc::stream_redirection cerr_redir(std::cerr, scc::log::ERROR);
sc_core::sc_report_handler::set_actions("/IEEE_Std_1666/deprecated", sc_core::SC_DO_NOTHING); sc_core::sc_report_handler::set_actions("/IEEE_Std_1666/deprecated", sc_core::SC_DO_NOTHING);
sc_core::sc_report_handler::set_actions(sc_core::SC_ID_MORE_THAN_ONE_SIGNAL_DRIVER_, sc_core::SC_DO_NOTHING); sc_core::sc_report_handler::set_actions(sc_core::SC_ID_MORE_THAN_ONE_SIGNAL_DRIVER_, sc_core::SC_DO_NOTHING);
sc_core::sc_report_handler::set_actions(sc_core::SC_ERROR, sc_core::SC_LOG | sc_core::SC_CACHE_REPORT | sc_core::sc_report_handler::set_actions(sc_core::SC_ERROR,
sc_core::SC_DISPLAY | sc_core::SC_STOP); sc_core::SC_LOG | sc_core::SC_CACHE_REPORT | sc_core::SC_DISPLAY | sc_core::SC_STOP);
} }
void CLIParser::build() { void CLIParser::build() {
@@ -88,7 +87,7 @@ void CLIParser::build() {
"dump the intermediate representation") "dump the intermediate representation")
("dump-structure", po::value<std::string>(), ("dump-structure", po::value<std::string>(),
"dump model structure to ELK file") "dump model structure to ELK file")
("quantum", po::value<unsigned>(), ("quantum", po::value<unsigned>()->default_value(100),
"SystemC quantum time in ns") "SystemC quantum time in ns")
("reset,r", po::value<std::string>(), ("reset,r", po::value<std::string>(),
"reset address") "reset address")

View File

@@ -73,8 +73,7 @@ int sc_main(int argc, char* argv[]) {
if(auto trace_level = parser.get<unsigned>("trace-level")) { if(auto trace_level = parser.get<unsigned>("trace-level")) {
auto file_name = parser.get<std::string>("trace-file"); auto file_name = parser.get<std::string>("trace-file");
auto enable_sig_trace = (trace_level & 0x1) != 0; // bit0 enables sig trace auto enable_sig_trace = (trace_level & 0x1) != 0; // bit0 enables sig trace
auto tx_trace_type = auto tx_trace_type = static_cast<scc::tracer::file_type>(trace_level >> 1); // bit3-bit1 define the kind of transaction trace
static_cast<scc::tracer::file_type>(trace_level >> 1); // bit3-bit1 define the kind of transaction trace
auto trace_default_on = parser.is_set("trace-default-on"); auto trace_default_on = parser.is_set("trace-default-on");
if(parser.is_set("trace-default-off")) if(parser.is_set("trace-default-off"))
cfg.set_value("scc_tracer.default_trace_enable", false); cfg.set_value("scc_tracer.default_trace_enable", false);
@@ -102,8 +101,7 @@ int sc_main(int argc, char* argv[]) {
cfg.configure(); cfg.configure();
std::unique_ptr<scc::hierarchy_dumper> dumper; std::unique_ptr<scc::hierarchy_dumper> dumper;
if(parser.is_set("dump-structure")) if(parser.is_set("dump-structure"))
dumper.reset( dumper.reset(new scc::hierarchy_dumper(parser.get<std::string>("dump-structure"), scc::hierarchy_dumper::D3JSON));
new scc::hierarchy_dumper(parser.get<std::string>("dump-structure"), scc::hierarchy_dumper::D3JSON));
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// overwrite config with command line settings // overwrite config with command line settings
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
@@ -121,13 +119,12 @@ int sc_main(int argc, char* argv[]) {
tlm::tlm_global_quantum::instance().set(sc_core::sc_time(parser.get<unsigned>("quantum"), sc_core::SC_NS)); tlm::tlm_global_quantum::instance().set(sc_core::sc_time(parser.get<unsigned>("quantum"), sc_core::SC_NS));
if(parser.is_set("reset")) { if(parser.is_set("reset")) {
auto str = parser.get<std::string>("reset"); auto str = parser.get<std::string>("reset");
uint64_t start_address = uint64_t start_address = str.find("0x") == 0 ? std::stoull(str.substr(2), nullptr, 16) : std::stoull(str, nullptr, 10);
str.find("0x") == 0 ? std::stoull(str.substr(2), nullptr, 16) : std::stoull(str, nullptr, 10);
cfg.set_value(core_path + ".reset_address", start_address); cfg.set_value(core_path + ".reset_address", start_address);
} }
if(parser.is_set("disass")) { if(parser.is_set("disass")) {
cfg.set_value(core_path + ".enable_disass", true); cfg.set_value(core_path + ".enable_disass", true);
LOGGER(disass)::reporting_level() = logging::INFO; LOGGER(disass)::set_reporting_level(logging::INFO);
auto file_name = parser.get<std::string>("disass"); auto file_name = parser.get<std::string>("disass");
if(file_name.length() > 0) { if(file_name.length() > 0) {
LOG_OUTPUT(disass)::stream() = fopen(file_name.c_str(), "w"); LOG_OUTPUT(disass)::stream() = fopen(file_name.c_str(), "w");

View File

@@ -7,6 +7,7 @@
#ifndef SRC_VP_SYSTEM_H_ #ifndef SRC_VP_SYSTEM_H_
#define SRC_VP_SYSTEM_H_ #define SRC_VP_SYSTEM_H_
#include "tlm/scc/quantum_keeper.h"
#include <cci_configuration> #include <cci_configuration>
#include <minres/aclint.h> #include <minres/aclint.h>
#include <minres/gpio.h> #include <minres/gpio.h>
@@ -20,7 +21,7 @@
#include <sysc/communication/sc_clock.h> #include <sysc/communication/sc_clock.h>
#include <sysc/communication/sc_signal.h> #include <sysc/communication/sc_signal.h>
#include <sysc/communication/sc_signal_ports.h> #include <sysc/communication/sc_signal_ports.h>
#include <sysc/core_complex_mt.h> #include <sysc/core_complex.h>
#include <sysc/kernel/sc_module.h> #include <sysc/kernel/sc_module.h>
#include <sysc/kernel/sc_time.h> #include <sysc/kernel/sc_time.h>
#include <sysc/utils/sc_vector.h> #include <sysc/utils/sc_vector.h>
@@ -48,7 +49,8 @@ public:
system(sc_core::sc_module_name nm); system(sc_core::sc_module_name nm);
private: private:
sysc::riscv::core_complex_mt<> core_complex{"core_complex"}; #include "../vp/gen/PipelinedMemoryBusToApbBridge.h" // IWYU pragma: keep
sysc::riscv::core_complex<scc::LT, tlm::scc::quantumkeeper_mt> core_complex{"core_complex"};
scc::router<> ahb_router, apbBridge; scc::router<> ahb_router, apbBridge;
vpvper::minres::gpio_tl gpio0{"gpio0"}; vpvper::minres::gpio_tl gpio0{"gpio0"};
vpvper::minres::uart_tl uart0{"uart0"}; vpvper::minres::uart_tl uart0{"uart0"};
@@ -67,7 +69,6 @@ private:
sc_core::sc_signal<bool, sc_core::SC_MANY_WRITERS> core_int_s{"core_int_s"}; sc_core::sc_signal<bool, sc_core::SC_MANY_WRITERS> core_int_s{"core_int_s"};
sc_core::sc_signal<uint64_t> mtime_s{"mtime_s"}; sc_core::sc_signal<uint64_t> mtime_s{"mtime_s"};
void gen_reset(); void gen_reset();
#include "../vp/gen/PipelinedMemoryBusToApbBridge.h" // IWYU pragma: keep
}; };
} // namespace vp } // namespace vp

2
vpvper

Submodule vpvper updated: 923024bd82...6413f14b18