Skip to content

Commit

Permalink
Update ibex_demo_system.sv to export mhpmcounter_num
Browse files Browse the repository at this point in the history
  • Loading branch information
nbdd0121 committed Jan 3, 2024
1 parent db9b9f8 commit f249f31
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rtl/system/ibex_demo_system.sv
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,13 @@ module ibex_demo_system #(
end

`ifdef VERILATOR

export "DPI-C" function mhpmcounter_num;

function automatic int unsigned mhpmcounter_num();
return u_top.u_ibex_core.cs_registers_i.MHPMCounterNum;
endfunction

export "DPI-C" function mhpmcounter_get;

function automatic longint unsigned mhpmcounter_get(int index);
Expand Down

0 comments on commit f249f31

Please sign in to comment.