diff --git a/.envrc b/.envrc
index 032d31f..b0de304 100644
--- a/.envrc
+++ b/.envrc
@@ -5,6 +5,8 @@ if [ $distro == "CentOS" ]; then
. /opt/rh/rh-python38/enable
elif [ $distro == "Rocky" ]; then
. /opt/rh/gcc-toolset-11/enable
+elif [ $distro == "RockyLinux" ]; then
+ . /opt/rh/gcc-toolset-14/enable
fi
if has module; then
module load ./Modulefile
diff --git a/.gdbinit b/.gdbinit
deleted file mode 100644
index 043b1d8..0000000
--- a/.gdbinit
+++ /dev/null
@@ -1 +0,0 @@
-set breakpoint pending on
diff --git a/.launch/TGC-VP interp.launch b/.launch/TGC-VP interp.launch
new file mode 100644
index 0000000..11d0f2d
--- /dev/null
+++ b/.launch/TGC-VP interp.launch
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.launch/TGC-VP-FW-Debug dhrystone.launch b/.launch/TGC-VP-FW-Debug dhrystone.launch
new file mode 100644
index 0000000..ced7812
--- /dev/null
+++ b/.launch/TGC-VP-FW-Debug dhrystone.launch
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.vscode/launch.json b/.vscode/launch.json
index dbae280..5fac938 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -44,6 +44,41 @@
"b main"
]
},
+ {
+ "type": "gdbtarget",
+ "request": "launch",
+ "name": "Debug hello world 32bit",
+ "program": "fw/hello-world/hello.elf",
+ "imageAndSymbols": {
+ "symbolFileName": "fw/hello-world/hello.elf"
+ },
+ "target": {
+ "server": "${workspaceFolder}/build/RelWithDebInfo/src/riscv-vp",
+ "serverParameters": [
+ "--isa",
+ "rv32gc_msu",
+ "-v",
+ "INFO",
+ "-f",
+ "fw/hello-world/hello.elf",
+ "-g",
+ "10000"
+ ],
+ "watchServerProcess": true,
+ "port": "10000"
+ },
+ "cwd": "${workspaceRoot}",
+ "gdb": "riscv64-unknown-elf-gdb",
+ "openGdbConsole": false,
+ "presentation": {
+ "hidden": false,
+ "group": "FW Debug",
+ "order": 2
+ },
+ "initCommands": [
+ "b main"
+ ]
+ },
{
"type": "gdbtarget",
"request": "attach",
@@ -79,7 +114,15 @@
"name": "32bit VP",
"cwd": "${workspaceRoot}",
"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,
+ "initCommands": [
+ "set breakpoint pending on",
+ "set breakpoint auto-hw on",
+ "set breakpoint always-inserted on",
+ "set output-radix 16"
+ ],
+ "verbose": false
},
{
"type": "gdb",
diff --git a/CMakePresets.json b/CMakePresets.json
index b0b1ff5..e7ab433 100644
--- a/CMakePresets.json
+++ b/CMakePresets.json
@@ -19,7 +19,9 @@
"CMAKE_INSTALL_PREFIX": "${sourceDir}/install/${presetName}",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"CMAKE_PROJECT_TOP_LEVEL_INCLUDES": "scc/cmake/conan_provider.cmake",
- "CONAN_BUILD_PROFILE": "auto-cmake",
+ "CONAN_HOST_PROFILE": "auto-cmake",
+ "CONAN_BUILD_PROFILE": "conan_host_profile",
+ "CMAKE_EXECUTE_PROCESS_COMMAND_ECHO": "STDOUT",
"WITH_TCC": "OFF"
}
},
diff --git a/Linux.code-workspace b/Linux.code-workspace
new file mode 100644
index 0000000..39c5ea3
--- /dev/null
+++ b/Linux.code-workspace
@@ -0,0 +1,13 @@
+{
+ "folders": [
+ {
+ "path": "build/Linux4TGC/buildroot"
+ },
+ {
+ "path": "build/Linux4TGC/opensbi"
+ },
+ {
+ "path": "build/Linux4TGC/linux"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/conanfile.py b/conanfile.py
index 62a13f6..0c6a8ea 100644
--- a/conanfile.py
+++ b/conanfile.py
@@ -12,6 +12,7 @@ class Pkg(ConanFile):
)
default_options = {
"llvm-core/*:targets": "X86",
+ "llvm-core/*:components": "Native",
"boost/*:fPIC": "True",
"boost/*:header_only": "False",
"boost/*:without_contract": "True",
diff --git a/dbt-rise-core b/dbt-rise-core
index 54518de..cc0de2d 160000
--- a/dbt-rise-core
+++ b/dbt-rise-core
@@ -1 +1 @@
-Subproject commit 54518de7effb9b719f5169d51e51fb658e9085af
+Subproject commit cc0de2d95c844df326fb4145a857c2291b8b4520
diff --git a/dbt-rise-riscv b/dbt-rise-riscv
index a0ff129..8a528fc 160000
--- a/dbt-rise-riscv
+++ b/dbt-rise-riscv
@@ -1 +1 @@
-Subproject commit a0ff1294e35d2616291462001d7be693c5032380
+Subproject commit 8a528fceadae055c02197e194d188bbd0f78a03d
diff --git a/scc b/scc
index 03567fb..82602d0 160000
--- a/scc
+++ b/scc
@@ -1 +1 @@
-Subproject commit 03567fbece049e8c0490d62cef055b106da41977
+Subproject commit 82602d000fa1ed177ad0872dd3f82298f411efbc
diff --git a/src/CLIParser.cpp b/src/CLIParser.cpp
index a3a5786..f0ee526 100644
--- a/src/CLIParser.cpp
+++ b/src/CLIParser.cpp
@@ -40,9 +40,10 @@ CLIParser::CLIParser(int argc, char* argv[])
}
auto log_level = vm_["verbose"].as();
auto log_level_num = static_cast(log_level);
- LOGGER(DEFAULT)::set_reporting_level(logging::as_log_level(log_level_num > 6 ? 6 : log_level_num));
- LOGGER(connection)::set_reporting_level(logging::as_log_level(log_level_num > 4 ? log_level_num - 1 : log_level_num));
- LOGGER(dbt_rise_iss)::set_reporting_level(logging::as_log_level(log_level_num > 4 ? log_level_num - 1 : log_level_num));
+ auto level = logging::as_log_level(log_level_num > 6 ? 6 : log_level_num);
+ LOGGER(DEFAULT)::set_reporting_level(level);
+ LOGGER(connection)::set_reporting_level(level);
+ LOGGER(dbt_rise_iss)::set_reporting_level(level);
///////////////////////////////////////////////////////////////////////////
// configure logging
///////////////////////////////////////////////////////////////////////////
@@ -86,7 +87,7 @@ void CLIParser::build() {
"dump the intermediate representation")
("dump-structure", po::value(),
"dump model structure to ELK file")
- ("quantum", po::value(),
+ ("quantum", po::value()->default_value(100),
"SystemC quantum time in ns")
("reset,r", po::value(),
"reset address")
diff --git a/src/mcount.c b/src/mcount.c
new file mode 100644
index 0000000..b762e07
--- /dev/null
+++ b/src/mcount.c
@@ -0,0 +1,9 @@
+/* The canonical name for the function is `_mcount' in both C and asm,
+ but some old asm code might assume it's `mcount'. */
+void _mcount (void);
+weak_alias (_mcount, mcount);
+
+void _mcount (void)
+{
+ mcount_internal ((u_long) __builtin_return_address (1), (u_long) __builtin_return_address(0));
+}
diff --git a/src/vp/system.h b/src/vp/system.h
index dfb2ca3..ab81f82 100644
--- a/src/vp/system.h
+++ b/src/vp/system.h
@@ -7,6 +7,7 @@
#ifndef SRC_VP_SYSTEM_H_
#define SRC_VP_SYSTEM_H_
+#include "tlm/scc/quantum_keeper.h"
#include
#include
#include
@@ -48,7 +49,8 @@ public:
system(sc_core::sc_module_name nm);
private:
- sysc::riscv::core_complex<> core_complex{"core_complex"};
+#include "../vp/gen/PipelinedMemoryBusToApbBridge.h" // IWYU pragma: keep
+ sysc::riscv::core_complex core_complex{"core_complex"};
scc::router<> ahb_router, apbBridge;
vpvper::minres::gpio_tl gpio0{"gpio0"};
vpvper::minres::uart_tl uart0{"uart0"};
@@ -67,7 +69,6 @@ private:
sc_core::sc_signal core_int_s{"core_int_s"};
sc_core::sc_signal mtime_s{"mtime_s"};
void gen_reset();
-#include "../vp/gen/PipelinedMemoryBusToApbBridge.h" // IWYU pragma: keep
};
} // namespace vp