Skip to content

Commit 799af4a

Browse files
davidschrammelRazer6
authored andcommitted
[topgen] Outgoing interrupts should not be gated by 'if has_pinmux'.
Signed-off-by: David Schrammel <[email protected]>
1 parent dc9f2ad commit 799af4a

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

util/topgen/templates/toplevel_pkg.sv.tpl

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,17 @@ package top_${top["name"]}${addr_space_suffix}_pkg;
131131
${lib.Name.from_snake_case("top_" + top["name"] + "_alert_id_count").as_camel_case()}
132132
} alert_id_e;
133133
% endif # has_alert_handler
134+
% if len(top["outgoing_interrupt"]) > 0:
135+
136+
% for interrupt_group, interrupts in top["outgoing_interrupt"].items():
137+
<%
138+
num_interrupts = sum(interrupt["width"] for interrupt in interrupts)
139+
%>\
140+
// Number of ${interrupt_group} outgoing interrupts
141+
parameter int unsigned NOutgoingInterrupts${interrupt_group.capitalize()} = ${num_interrupts};
142+
% endfor
143+
144+
% endif
134145
% if has_pinmux:
135146
136147
// Enumeration of IO power domains.
@@ -216,16 +227,6 @@ package top_${top["name"]}${addr_space_suffix}_pkg;
216227
${lib.Name.from_snake_case("peripheral_count").as_camel_case()}
217228
} peripheral_e;
218229
219-
% if len(top["outgoing_interrupt"]) > 0:
220-
% for interrupt_group, interrupts in top["outgoing_interrupt"].items():
221-
<%
222-
num_interrupts = sum(interrupt["width"] for interrupt in interrupts)
223-
%>\
224-
// Number of ${interrupt_group} outgoing interrupts
225-
parameter int unsigned NOutgoingInterrupts${interrupt_group.capitalize()} = ${num_interrupts};
226-
% endfor
227-
228-
% endif
229230
// TODO: Enumeration for PLIC Interrupt source peripheral.
230231
// TODO: Enumeration for PLIC Interrupt Ids.
231232

0 commit comments

Comments
 (0)