google/CFU-Playground

How to print the "perf counters" when I use the FPU variant?

yoooyeah opened this issue · 1 comments

Hi! I know that if I want to show the "perf counters" in a RV32I architecture, I can easily use the "Perf Cfu" variant. However, now I want to use a FPU supported RISCV CPU, namely that I cannot use "Perf Cfu" and "Fpu Cfu" at the same time. I want to see the cycles of some floating-point operations. How to print the "perf counters" when I use the FPU variant? Thanks!

tcal-x commented

Hello @yoooyeah , we would need to create a new VexRiscv variant that combines those two features! They both requires some amount of resources --- do you have plenty of extra space on your target FPGA?

There are some instructions here (be warned, this is expert-level stuff, so not many contributors have attempted it, and we might have missed some stuff in the documentation): https://github.com/google/CFU-Playground/blob/main/soc/vexriscv/README.md

Basically, look at the Makefile in that directory, and create a new target that combines the flags for FPU and perf counters. There are a few other places in the system that you need to inform about the new variant.

Can you give it a try?