No public description PiperOrigin-RevId: 638314577 Change-Id: I69d66761b734b64ae41e75091dd285f9b0eb73df
diff --git a/WORKSPACE b/WORKSPACE index bfc07eb..9ba8ebf 100644 --- a/WORKSPACE +++ b/WORKSPACE
@@ -17,14 +17,6 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") -# MPACT-Sim repo -http_archive( - name = "com_google_mpact-sim", - sha256 = "384daa4f4bcacf0552cebdb5b3001b51af19dfed3dfa3367de5e3babcd65511d", - strip_prefix = "mpact-sim-a3dbb21f3f3d3193a8d0b6667f1d0807d1dc4dd4", - url = "https://github.com/google/mpact-sim/archive/a3dbb21f3f3d3193a8d0b6667f1d0807d1dc4dd4.tar.gz" -) - # MPACT-RiscV repo http_archive( name = "com_google_mpact-riscv", @@ -33,12 +25,13 @@ url = "https://github.com/google/mpact-riscv/archive/a43a92ba38d8260f4207416e11721ceee7135624.tar.gz" ) -# MPACT-ReNode repo will go here. -git_repository( - name = "com_google_mpact-renode", - branch = "main", - remote = "https://mpact.googlesource.com/mpact-renode", -) +load("@com_google_mpact-riscv//:repos.bzl, "mpact_riscv_repos") + +mpact_riscv_repos() + +load("@com_google_mpact-riscv//::deps.bzl, "mpact_riscv_deps") + +mpact_riscv_deps() load("@com_google_mpact-sim//:repos.bzl", "mpact_sim_repos")
diff --git a/cheriot/BUILD b/cheriot/BUILD index 990e5e2..7d7e169 100644 --- a/cheriot/BUILD +++ b/cheriot/BUILD
@@ -345,9 +345,6 @@ "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", - "@com_google_mpact-renode//renode", - "@com_google_mpact-renode//renode:renode_debug_interface", - "@com_google_mpact-renode//renode:socket_cli", "@com_google_mpact-riscv//riscv:riscv_arm_semihost", "@com_google_mpact-riscv//riscv:riscv_clint", "@com_google_mpact-riscv//riscv:riscv_state", @@ -358,6 +355,9 @@ "@com_google_mpact-sim//mpact/sim/proto:component_data_cc_proto", "@com_google_mpact-sim//mpact/sim/util/memory", "@com_google_mpact-sim//mpact/sim/util/program_loader:elf_loader", + "@com_google_mpact-sim//mpact/sim/util/renode", + "@com_google_mpact-sim//mpact/sim/util/renode:renode_debug_interface", + "@com_google_mpact-sim//mpact/sim/util/renode:socket_cli", "@com_google_protobuf//:protobuf", ], ) @@ -368,7 +368,7 @@ linkstatic = True, deps = [ ":cheriot_renode", - "@com_google_mpact-renode//renode", + "@com_google_mpact-sim//mpact/sim/util/renode", ], )
diff --git a/cheriot/cheriot_cli_forwarder.cc b/cheriot/cheriot_cli_forwarder.cc index 8ba7364..ce7ae7a 100644 --- a/cheriot/cheriot_cli_forwarder.cc +++ b/cheriot/cheriot_cli_forwarder.cc
@@ -23,14 +23,14 @@ #include "absl/status/statusor.h" #include "cheriot/cheriot_renode_cli_top.h" #include "mpact/sim/generic/core_debug_interface.h" -#include "third_party/mpact_renode/cli_forwarder.h" +#include "mpact/sim/util/renode/cli_forwarder.h" namespace mpact { namespace sim { namespace cheriot { using ::mpact::sim::generic::AccessType; -using ::mpact::sim::renode::CLIForwarder; +using ::mpact::sim::util::renode::CLIForwarder; using RunStatus = ::mpact::sim::generic::CoreDebugInterface::RunStatus; using HaltReasonValueType = ::mpact::sim::generic::CoreDebugInterface::HaltReasonValueType;
diff --git a/cheriot/cheriot_cli_forwarder.h b/cheriot/cheriot_cli_forwarder.h index ac72a45..04dac62 100644 --- a/cheriot/cheriot_cli_forwarder.h +++ b/cheriot/cheriot_cli_forwarder.h
@@ -25,7 +25,7 @@ #include "absl/status/statusor.h" #include "cheriot/cheriot_renode_cli_top.h" #include "mpact/sim/generic/core_debug_interface.h" -#include "third_party/mpact_renode/cli_forwarder.h" +#include "mpact/sim/util/renode/cli_forwarder.h" // This file defines a class that forwards calls from the CLI to the class that // merges requests from the CLI and ReNode. @@ -35,7 +35,7 @@ namespace cheriot { using ::mpact::sim::generic::AccessType; -using ::mpact::sim::renode::CLIForwarder; +using ::mpact::sim::util::renode::CLIForwarder; class CheriotCLIForwarder : public CLIForwarder { public:
diff --git a/cheriot/cheriot_renode.cc b/cheriot/cheriot_renode.cc index d32bc39..505dc77 100644 --- a/cheriot/cheriot_renode.cc +++ b/cheriot/cheriot_renode.cc
@@ -51,15 +51,15 @@ #include "mpact/sim/util/memory/single_initiator_router.h" #include "mpact/sim/util/memory/tagged_flat_demand_memory.h" #include "mpact/sim/util/memory/tagged_memory_watcher.h" +#include "mpact/sim/util/memory/tagged_to_untagged_memory_transactor.h" +#include "mpact/sim/util/renode/renode_debug_interface.h" #include "riscv//riscv_arm_semihost.h" #include "riscv//riscv_clint.h" #include "riscv//riscv_state.h" #include "riscv//stoull_wrapper.h" #include "src/google/protobuf/text_format.h" -#include "third_party/mpact_renode/renode_debug_interface.h" -#include "third_party/mpact_renode/tagged_to_untagged_memory_transactor.h" -::mpact::sim::renode::RenodeDebugInterface *CreateMpactSim( +::mpact::sim::util::renode::RenodeDebugInterface *CreateMpactSim( std::string name, ::mpact::sim::util::MemoryInterface *renode_sysbus) { auto *top = new ::mpact::sim::cheriot::CheriotRenode(name, renode_sysbus); return top; @@ -72,10 +72,10 @@ using ::mpact::sim::cheriot::RiscVCheriotMInstret; using ::mpact::sim::cheriot::RiscVCheriotMInstreth; using ::mpact::sim::proto::ComponentData; -using ::mpact::sim::renode::TaggedToUntaggedMemoryTransactor; using ::mpact::sim::riscv::RiscVClint; using ::mpact::sim::util::AtomicMemoryOpInterface; using ::mpact::sim::util::TaggedMemoryWatcher; +using ::mpact::sim::util::TaggedToUntaggedMemoryTransactor; using HaltReasonValueType = ::mpact::sim::generic::CoreDebugInterface::HaltReasonValueType;
diff --git a/cheriot/cheriot_renode.h b/cheriot/cheriot_renode.h index 0edfa14..d2b98d7 100644 --- a/cheriot/cheriot_renode.h +++ b/cheriot/cheriot_renode.h
@@ -38,10 +38,10 @@ #include "mpact/sim/util/memory/tagged_flat_demand_memory.h" #include "mpact/sim/util/memory/tagged_memory_interface.h" #include "mpact/sim/util/program_loader/elf_program_loader.h" +#include "mpact/sim/util/renode/renode_debug_interface.h" +#include "mpact/sim/util/renode/socket_cli.h" #include "riscv//riscv_arm_semihost.h" #include "riscv//riscv_clint.h" -#include "third_party/mpact_renode/renode_debug_interface.h" -#include "third_party/mpact_renode/socket_cli.h" // This file defines a wrapper class for the CheriotTop that adds Arm // semihosting. In addition, the .cc class defines a global namespace @@ -55,7 +55,7 @@ // a combined ReNode/CLI interface that manages the priorities and access of // ReNode and command line commands to the simulator control class. -extern ::mpact::sim::renode::RenodeDebugInterface *CreateMpactSim( +extern ::mpact::sim::util::renode::RenodeDebugInterface *CreateMpactSim( std::string name, ::mpact::sim::util::MemoryInterface *renode_sysbus); namespace mpact { @@ -63,7 +63,6 @@ namespace cheriot { using ::mpact::sim::generic::DataBufferFactory; -using ::mpact::sim::renode::SocketCLI; using ::mpact::sim::riscv::RiscVArmSemihost; using ::mpact::sim::riscv::RiscVClint; using ::mpact::sim::util::AtomicMemory; @@ -72,8 +71,9 @@ using ::mpact::sim::util::SingleInitiatorRouter; using ::mpact::sim::util::TaggedFlatDemandMemory; using ::mpact::sim::util::TaggedMemoryInterface; +using ::mpact::sim::util::renode::SocketCLI; -class CheriotRenode : public renode::RenodeDebugInterface { +class CheriotRenode : public util::renode::RenodeDebugInterface { public: // Supported IRQ request types. enum class IrqType { @@ -94,7 +94,7 @@ using ::mpact::sim::generic::CoreDebugInterface::HaltReason; using ::mpact::sim::generic::CoreDebugInterface::RunStatus; - using RenodeCpuRegister = ::mpact::sim::renode::RenodeCpuRegister; + using RenodeCpuRegister = ::mpact::sim::util::renode::RenodeCpuRegister; // Constructor takes a name and a memory interface that is used for memory // transactions routed to the system bus.
diff --git a/cheriot/cheriot_renode_cli_top.cc b/cheriot/cheriot_renode_cli_top.cc index 302a7fc..2c7e20d 100644 --- a/cheriot/cheriot_renode_cli_top.cc +++ b/cheriot/cheriot_renode_cli_top.cc
@@ -25,7 +25,7 @@ #include "absl/status/statusor.h" #include "cheriot/cheriot_debug_interface.h" #include "cheriot/cheriot_top.h" -#include "third_party/mpact_renode/renode_cli_top.h" +#include "mpact/sim/util/renode/renode_cli_top.h" namespace mpact { namespace sim { @@ -33,7 +33,7 @@ CheriotRenodeCLITop::CheriotRenodeCLITop(CheriotTop *cheriot_top, bool wait_for_cli) - : renode::RenodeCLITop(cheriot_top, wait_for_cli), + : util::renode::RenodeCLITop(cheriot_top, wait_for_cli), cheriot_top_(cheriot_top) {} absl::StatusOr<size_t> CheriotRenodeCLITop::CLIReadTagMemory(uint64_t address,
diff --git a/cheriot/cheriot_renode_cli_top.h b/cheriot/cheriot_renode_cli_top.h index 0819616..a806c4e 100644 --- a/cheriot/cheriot_renode_cli_top.h +++ b/cheriot/cheriot_renode_cli_top.h
@@ -25,7 +25,7 @@ #include "absl/status/statusor.h" #include "cheriot/cheriot_debug_interface.h" #include "cheriot/cheriot_top.h" -#include "third_party/mpact_renode/renode_cli_top.h" +#include "mpact/sim/util/renode/renode_cli_top.h" namespace mpact { namespace sim { @@ -33,7 +33,7 @@ // This class extends the RenodeCLITop with a few features specific to the // CherIoT CLI. -class CheriotRenodeCLITop : public renode::RenodeCLITop { +class CheriotRenodeCLITop : public util::renode::RenodeCLITop { public: CheriotRenodeCLITop(CheriotTop *cheriot_top, bool wait_for_cli);
diff --git a/cheriot/cheriot_renode_register_info.h b/cheriot/cheriot_renode_register_info.h index a3888d4..84d5a00 100644 --- a/cheriot/cheriot_renode_register_info.h +++ b/cheriot/cheriot_renode_register_info.h
@@ -19,7 +19,7 @@ #include <vector> -#include "third_party/mpact_renode/renode_debug_interface.h" +#include "mpact/sim/util/renode/renode_debug_interface.h" namespace mpact { namespace sim { @@ -30,7 +30,7 @@ class CheriotRenodeRegisterInfo { public: - using RenodeRegisterInfo = std::vector<renode::RenodeCpuRegister>; + using RenodeRegisterInfo = std::vector<util::renode::RenodeCpuRegister>; static const RenodeRegisterInfo &GetRenodeRegisterInfo();