From bbacf9a25e62b1f537a3b337411e232dfd098db5 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Wed, 15 Nov 2023 20:06:58 -0800 Subject: [PATCH] Remove verilated vpi code, add missing includes for C++ Vortex rtlsim defines sim_trace_enabled... functions in the Verilated C++ code for use in dpi_trace, which we don't need. --- hw/dpi/float_dpi.cpp | 4 ++-- hw/dpi/util_dpi.cpp | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/hw/dpi/float_dpi.cpp b/hw/dpi/float_dpi.cpp index 340b258d..56a79d91 100644 --- a/hw/dpi/float_dpi.cpp +++ b/hw/dpi/float_dpi.cpp @@ -20,7 +20,7 @@ #include #include #include "svdpi.h" -#include "verilated_vpi.h" +// #include "verilated_vpi.h" #include "VX_config.h" extern "C" { @@ -337,4 +337,4 @@ void dpi_fmax(bool enable, int dst_fmt, int64_t a, int64_t b, int64_t* result, s } else { *result = nan_box(rv_fmax_s(check_boxing(a), check_boxing(b), fflags)); } -} \ No newline at end of file +} diff --git a/hw/dpi/util_dpi.cpp b/hw/dpi/util_dpi.cpp index 7315a471..220ff4d2 100644 --- a/hw/dpi/util_dpi.cpp +++ b/hw/dpi/util_dpi.cpp @@ -12,14 +12,16 @@ // limitations under the License. #include +#include #include #include #include #include +#include #include #include "svdpi.h" -#include "verilated_vpi.h" +// #include "verilated_vpi.h" #include "uuid_gen.h" @@ -191,8 +193,8 @@ void dpi_idiv(bool enable, bool is_signed, iword_t a, iword_t b, iword_t* quotie void dpi_trace(int level, const char* format, ...) { if (level > DEBUG_LEVEL) return; - if (!sim_trace_enabled()) - return; + // if (!sim_trace_enabled()) + // return; va_list va; va_start(va, format); vprintf(format, va); @@ -200,11 +202,11 @@ void dpi_trace(int level, const char* format, ...) { } void dpi_trace_start() { - sim_trace_enable(true); + // sim_trace_enable(true); } void dpi_trace_stop() { - sim_trace_enable(false); + // sim_trace_enable(false); } /////////////////////////////////////////////////////////////////////////////// @@ -229,4 +231,4 @@ uint64_t dpi_uuid_gen(bool reset, int wid, uint64_t PC) { uint32_t instr_ref = instr_uuid >> 16; uint64_t uuid = (uint64_t(instr_ref) << 32) | (wid << 16) | instr_id; return uuid; -} \ No newline at end of file +}