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.
This commit is contained in:
Hansung Kim
2023-11-15 20:06:58 -08:00
parent d9cb14d6e4
commit bbacf9a25e
2 changed files with 10 additions and 8 deletions

View File

@@ -20,7 +20,7 @@
#include <rvfloats.h>
#include <util.h>
#include "svdpi.h"
#include "verilated_vpi.h"
// #include "verilated_vpi.h"
#include "VX_config.h"
extern "C" {

View File

@@ -12,14 +12,16 @@
// limitations under the License.
#include <stdio.h>
#include <stdarg.h>
#include <math.h>
#include <unordered_map>
#include <vector>
#include <mutex>
#include <memory>
#include <iostream>
#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);
}
///////////////////////////////////////////////////////////////////////////////