mirror of
https://github.com/openhwgroup/cve2.git
synced 2025-04-22 04:57:25 -04:00
[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:
parent
99b8f61223
commit
6ebc6bcb9f
2 changed files with 2 additions and 2 deletions
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue