-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Consider the following RDL description:
regfile perf_regs {
perf_cnt_en perf_cnt_en[NumPerfCounters];
external perf_cnt_sel perf_cnt_sel[NumPerfCounters];
external perf_cnt perf_cnt[NumPerfCounters];
};
PeakRDL does not generate any macro or variable with the NumPerfCounters information, which would be useful to e.g. loop over all performance counters.
While this can be calculated as follows, it is quite convoluted and ugly:
#define SNRT_NUM_PERF_CNTS \
(sizeof(((perf_regs_t){}).perf_cnt) / sizeof(((perf_regs_t){}).perf_cnt[0]))
It would be really nice if PeakRDL or this plugin could directly generate a NUM_PERF_COUNTERS macro from the respective RDL parameter.
Note: the reference code is taken from this PR.
Metadata
Metadata
Assignees
Labels
No labels