Skip to content

Commit 65d53a7

Browse files
Add comment on cve2_controller about irq_fast
1 parent cd43ee5 commit 65d53a7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rtl/cve2_controller.sv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,9 +499,10 @@ module cve2_controller #(
499499
exc_cause_o = EXC_CAUSE_IRQ_NM;
500500
nmi_mode_d = 1'b1; // enter NMI mode
501501
end else if (irqs_i.irq_fast != 16'b0) begin
502+
// if any of the irq_fast is one
502503
// generate exception cause ID from fast interrupt ID:
503504
// - first bit distinguishes interrupts from exceptions,
504-
// - third bit adds 16 to fast interrupt ID so that the interrup 0 becomes 16 and the interrupt 15 becomes 31 (hence 5bits)
505+
// - third bit adds 16 to fast interrupt ID so that the interrupt 0 becomes 16 and the interrupt 15 becomes 31 (hence 5bits)
505506
// - second bit is always 0 as the FAST interrupts are represented in the first 5bits, the 6th is always 0 cause is used by the NMI (in that case is 1 as represented by the number 32)
506507
// for example EXC_CAUSE_IRQ_FAST_0 = {1'b1, 6'd16}
507508
exc_cause_o = exc_cause_e'({3'b101, mfip_id});

0 commit comments

Comments
 (0)