I have implemented accelerator on Rocket chip generator using Rocc. How to compute the performance of accelerator and compare with C implementation. I have written C implementation and computing the cycles as "Cycle = End - Begin". Where end and begin are calling read_csr(mcycle). I use it by reading dhrystone.h in RISCV-test github. Is this right way to calculate the cycles ?
I am thinking of using this technique for both accelerator and C implementation. Can i use CSR for this purpose.