Closed rod-chapman closed 4 years ago
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
I am having trouble getting sensible values back from mhpmcounter3 - the most-significant 32 bits seem to be corrupted in some way and don't make any sense. The FE310 manual says something about the counter only really being 40 bits, so I tried to mask off the top-most 24 bits (i.e. doing andi t2, t2, 255 after the csrr t2, mhpmcounter3h instructions), but that didn't help...
Does anyone at AdaCore have way to test this?
Does anyone at AdaCore have way to test this?
I have a HiFive1 revA here, but did you try with the C API first? Are there examples provided in the SDK?
I tried using my own API to call to assembly code, with the same results. If I reset the counter to 0 at the start of the test, then only read the lower 32 bits, then it seems to be OK, but the upper 32 bits are all wrong...
Maybe you can ask on the SiFive forums.
@rod-chapman did you get more info on this?
The code looks good I am ok to merge this.
OK - please go ahead and merge.
I didn't get the 64-bit counters (like mhpmcounter3) to work reliably - I was still getting back garbage values for the 32 MSBs. At the moment, I am not using them, so this is not blocking me.
Thank yo @rod-chapman
Opening Pull Request.
Closes #365