From dd04e9c902d3ac7fb3a6b5384c3a1c967e106e81 Mon Sep 17 00:00:00 2001 From: Jinming Lu <30696153+jmluu@users.noreply.github.com> Date: Fri, 9 Dec 2022 17:40:30 +0800 Subject: [PATCH] FIX BUG, declare VTAxxxAPI Functions as extern C --- hardware/dpi/tsim_device.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hardware/dpi/tsim_device.cc b/hardware/dpi/tsim_device.cc index be191083..d4c3befc 100644 --- a/hardware/dpi/tsim_device.cc +++ b/hardware/dpi/tsim_device.cc @@ -41,13 +41,13 @@ static VTASimDPIFunc _sim_dpi = nullptr; static VTAHostDPIFunc _host_dpi = nullptr; static VTAMemDPIFunc _mem_dpi = nullptr; -void VTASimDPI(dpi8_t* wait, +extern "C" void VTASimDPI(dpi8_t* wait, dpi8_t* exit) { assert(_sim_dpi != nullptr); (*_sim_dpi)(_ctx, wait, exit); } -void VTAHostDPI(dpi8_t* req_valid, +extern "C" void VTAHostDPI(dpi8_t* req_valid, dpi8_t* req_opcode, dpi8_t* req_addr, dpi32_t* req_value, @@ -60,7 +60,7 @@ void VTAHostDPI(dpi8_t* req_valid, resp_valid, resp_value); } -void VTAMemDPI(dpi8_t rd_req_valid, +extern "C" void VTAMemDPI(dpi8_t rd_req_valid, dpi8_t rd_req_len, dpi8_t rd_req_id, dpi64_t rd_req_addr,