From a5e39b110b8c4bb7eeb2eab07b318343ee8683a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20L=C3=BCbeck?= Date: Mon, 18 Sep 2023 08:30:24 +0200 Subject: [PATCH] Changed std::string to tvm::runtime::String in DPIModule (src/dpi/module.cc) to fix inheritance error when building VTA_TSIM with TVM and added override statements to DPIModule methods that override methods of the base class DPIModuleNode. --- src/dpi/module.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/dpi/module.cc b/src/dpi/module.cc index def13054..74a52efc 100644 --- a/src/dpi/module.cc +++ b/src/dpi/module.cc @@ -282,8 +282,8 @@ class DPIModule final : public DPIModuleNode { } PackedFunc GetFunction( - const std::string& name, - const ObjectPtr& sptr_to_self) final { + const String& name, + const ObjectPtr& sptr_to_self) override { if (name == "WriteReg") { return TypedPackedFunc( [this](int addr, int value){ @@ -305,31 +305,31 @@ class DPIModule final : public DPIModuleNode { CHECK(ftsim_ != nullptr); } - void SimLaunch() { + void SimLaunch() override { auto frun = [this]() { (*ftsim_)(); }; tsim_thread_ = std::thread(frun); } - void SimWait() { + void SimWait() override { sim_device_.Wait(); } - void SimResume() { + void SimResume() override { sim_device_.Resume(); } - void SimFinish() { + void SimFinish() override { sim_device_.Exit(); tsim_thread_.join(); } - void WriteReg(int addr, uint32_t value) { + void WriteReg(int addr, uint32_t value) override { host_device_.PushRequest(1, addr, value); } - uint32_t ReadReg(int addr) { + uint32_t ReadReg(int addr) override { uint32_t value; HostResponse* r = new HostResponse; host_device_.PushRequest(0, addr, 0);