diff --git a/dv/verilator/pcount/cpp/ibex_pcounts.cc b/dv/verilator/pcount/cpp/ibex_pcounts.cc index 60e9d535..733dcf09 100644 --- a/dv/verilator/pcount/cpp/ibex_pcounts.cc +++ b/dv/verilator/pcount/cpp/ibex_pcounts.cc @@ -10,7 +10,7 @@ #include extern "C" { -extern long long mhpmcounter_get(int index); +extern unsigned long long mhpmcounter_get(int index); } #include "ibex_pcounts.h" diff --git a/examples/simple_system/rtl/ibex_simple_system.sv b/examples/simple_system/rtl/ibex_simple_system.sv index 1949a781..6d902ec7 100644 --- a/examples/simple_system/rtl/ibex_simple_system.sv +++ b/examples/simple_system/rtl/ibex_simple_system.sv @@ -279,7 +279,7 @@ module ibex_simple_system ( export "DPI-C" function mhpmcounter_get; - function automatic longint mhpmcounter_get(int index); + function automatic longint unsigned mhpmcounter_get(int index); return u_core.u_ibex_core.cs_registers_i.mhpmcounter[index]; endfunction