pulp-platform / snitch_cluster

An energy-efficient RISC-V floating-point compute cluster.
https://pulp-platform.github.io/snitch_cluster/
Apache License 2.0
52 stars 55 forks source link

Verilator testbench: time is always 0 in DASM and perf results #57

Closed Raragyay closed 1 year ago

Raragyay commented 1 year ago

I am currently following the tutorial for snitch cluster at https://pulp-platform.github.io/snitch_cluster/ug/tutorial.html and reached the debugging/benchmarking step. However, when trying to analyze the performance, it seems that the tstart and tend metrics are always 0. This value persists from the DASM file to the text, csv, and json results from the other steps for benchmarking.

image

The command I ran: bin/snitch_cluster.vlt sw/apps/blas/axpy/build/axpy.elf Resulting files is attached. trace_hart_00000000.dasm.txt hart_00000000_perf.json perf.csv event.csv

Running on docker on Linux, amd64:

$ uname -a
Linux b0f761a4bb94 6.5.0-1004-oem #4-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 15 19:52:30 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Tested running on

Things I tried changing:

colluca commented 1 year ago

Thank you for opening the issue.

This is a known problem with Verilator simulation as it does not log simulation timestamps. The Python scripts could be extended to use the cycle count instead of the absolute timestamp as a workaround.

If you could provide such a feature, I would be willing to merge it.

Raragyay commented 1 year ago

Do you know if there are any known simulators that are able to provide wall time statistics? I saw that Banshee was another tool mentioned but that seemed to lean towards instruction accuracy instead of cycle accuracy. On IIS there seemed to be other tools like Questa too.

colluca commented 1 year ago

Yes, indeed if you have a Questa or VCS license you can use those to get the wall time statistics.

Raragyay commented 1 year ago

How can one get this license? Is it offered within the Docker installation?

colluca commented 1 year ago

No, these are commercial tools we cannot provide.