From 6e52e1df7567cdf419a193bf541dd98c0253e5a4 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Thu, 15 Dec 2022 12:30:30 -0600 Subject: Add interrupt controller to Platform Designer --- rtl/core/control/exception.sv | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'rtl/core') diff --git a/rtl/core/control/exception.sv b/rtl/core/control/exception.sv index 21adb19..ed7893e 100644 --- a/rtl/core/control/exception.sv +++ b/rtl/core/control/exception.sv @@ -29,14 +29,14 @@ module core_control_exception assign exception = undefined || syscall || prefetch_abort || mem_fault || pending_irq; assign exception_vector = {{16{high_vectors}}, 11'b0, vector_offset, 2'b00}; - always @(posedge clk or negedge rst_n) begin + always @(posedge clk or negedge rst_n) if(!rst_n) begin syscall <= 0; pending_irq <= 0; vector_offset <= 0; exception_mode <= 0; exception_offset_pc <= 0; - end begin + end else begin if(next_cycle.issue) begin syscall <= issue && dec.ctrl.swi; pending_irq <= issue && irq && !intmask.i; @@ -59,10 +59,9 @@ module core_control_exception vector_offset <= 3'b010; exception_mode <= `MODE_SVC; end - end - if(next_cycle.escalate) - exception_offset_pc <= !mem_fault; - end + if(next_cycle.escalate) + exception_offset_pc <= !mem_fault; + end endmodule -- cgit v1.2.3