pulp-platform / snitch_cluster

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

trace: `fseq_fpu_yield` identical to `fseq_yield` #110

Open colluca opened 6 months ago

colluca commented 6 months ago

Bug description

fseq_fpu_yield is currently calculated as (fpss_fpu_issues / snitch_fseq_offloads) / fpss_fpu_rel_issues: https://github.com/pulp-platform/snitch_cluster/blob/699d4049c244484ec2e857579772c6f6477569f2/util/trace/gen_trace.py#L750-L753

fpss_fpu_rel_issues is in turn calculated as fpss_fpu_issues / fpss_issues: https://github.com/pulp-platform/snitch_cluster/blob/699d4049c244484ec2e857579772c6f6477569f2/util/trace/gen_trace.py#L736-L737

It follows that fseq_fpu_yield = fpss_issues / snitch_fseq_offloads, which equals fseq_yield by definition: https://github.com/pulp-platform/snitch_cluster/blob/699d4049c244484ec2e857579772c6f6477569f2/util/trace/gen_trace.py#L748-L749

Solution

I believe the original intent was for fseq_fpu_yield to represent the FREP yield related to FPU proper instructions only. Then we could simply calculate fseq_fpu_yield = fpss_fpu_issues / snitch_fseq_offloads. Perhaps even better, we would rectify snitch_fseq_offloads to count only instructions destined to the FPU proper.

I'm not sure of the usefulness of this metric altogether, so perhaps we could also just remove the duplicate fseq_fpu_yield.