[simple_system] Fix type for mhpmcounter_get

It's probably clearer if this 64-bit counter is treated as a uint64_t,
not an int64_t (the code using it downstream expects non-negative
values).
This commit is contained in:
Rupert Swarbrick 2021-02-24 15:07:06 +00:00 committed by Rupert Swarbrick
parent 99b8f61223
commit 6ebc6bcb9f
2 changed files with 2 additions and 2 deletions

View file

@ -10,7 +10,7 @@
#include <svdpi.h>
extern "C" {
extern long long mhpmcounter_get(int index);
extern unsigned long long mhpmcounter_get(int index);
}
#include "ibex_pcounts.h"

View file

@ -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