Summary:
The output port hwpe_sel_o is declared with a width derived from $clog2(NB_HWPES). When NB_HWPES == 1, $clog2(1) == 0, so the packed range becomes [-1:0], causing compilation/elaboration errors. This issue follows pulp-platform/cluster_peripherals#8 (comment)
Affected code:
|
output logic [$clog2(NB_HWPES)-1:0] hwpe_sel_o, |
Possible fix:
output logic [((NB_HWPES>1)?$clog2(NB_HWPES):1)-1:0] hwpe_sel_o
Checklist:
Summary:
The output port
hwpe_sel_ois declared with a width derived from$clog2(NB_HWPES). WhenNB_HWPES == 1,$clog2(1) == 0, so the packed range becomes[-1:0], causing compilation/elaboration errors. This issue follows pulp-platform/cluster_peripherals#8 (comment)Affected code:
pulp_cluster/rtl/cluster_peripherals.sv
Line 103 in 989fd78
Possible fix:
output logic [((NB_HWPES>1)?$clog2(NB_HWPES):1)-1:0] hwpe_sel_oChecklist:
[$clog2(NB_HWPES)-1:0]occurrences(NB_HWPES >= 1).NB_HWPESfor{1, 2, 3, 8, …}.