Sun, 06 Mar 2011 19:22:27 +0000
Make interrupts active high
Original-Author: lekernel
Original-Source: milkymist 5e8c03b53aaa820f3b43
lm32_cpu.v | file | annotate | diff | revisions | |
lm32_include.v | file | annotate | diff | revisions | |
lm32_interrupt.v | file | annotate | diff | revisions | |
lm32_top.v | file | annotate | diff | revisions |
1.1 diff -r c08774849ebf -r e8125a6a3bd8 lm32_cpu.v 1.2 --- a/lm32_cpu.v Fri Aug 13 01:16:35 2010 +0100 1.3 +++ b/lm32_cpu.v Sun Mar 06 19:22:27 2011 +0000 1.4 @@ -77,7 +77,7 @@ 1.5 rst_i, 1.6 // From external devices 1.7 `ifdef CFG_INTERRUPTS_ENABLED 1.8 - interrupt_n, 1.9 + interrupt, 1.10 `endif 1.11 // From user logic 1.12 `ifdef CFG_USER_ENABLED 1.13 @@ -213,7 +213,7 @@ 1.14 input rst_i; // Reset 1.15 1.16 `ifdef CFG_INTERRUPTS_ENABLED 1.17 -input [`LM32_INTERRUPT_RNG] interrupt_n; // Interrupt pins, active-low 1.18 +input [`LM32_INTERRUPT_RNG] interrupt; // Interrupt pins 1.19 `endif 1.20 1.21 `ifdef CFG_USER_ENABLED 1.22 @@ -1072,17 +1072,17 @@ 1.23 // Interrupt unit 1.24 lm32_interrupt interrupt ( 1.25 // ----- Inputs ------- 1.26 - .clk_i (clk_i), 1.27 + .clk_i (clk_i), 1.28 .rst_i (rst_i), 1.29 // From external devices 1.30 - .interrupt_n (interrupt_n), 1.31 + .interrupt (interrupt), 1.32 // From pipeline 1.33 .stall_x (stall_x), 1.34 `ifdef CFG_DEBUG_ENABLED 1.35 - .non_debug_exception (non_debug_exception_q_w), 1.36 + .non_debug_exception (non_debug_exception_q_w), 1.37 .debug_exception (debug_exception_q_w), 1.38 `else 1.39 - .exception (exception_q_w), 1.40 + .exception (exception_q_w), 1.41 `endif 1.42 .eret_q_x (eret_q_x), 1.43 `ifdef CFG_DEBUG_ENABLED
2.1 diff -r c08774849ebf -r e8125a6a3bd8 lm32_include.v 2.2 --- a/lm32_include.v Fri Aug 13 01:16:35 2010 +0100 2.3 +++ b/lm32_include.v Sun Mar 06 19:22:27 2011 +0000 2.4 @@ -339,7 +339,7 @@ 2.5 // Bizarre - Removing this increases LUT count! 2.6 `define CFG_DEBUG_EXCEPTIONS_ENABLED 2.7 2.8 -// Wishbone defines 2.9 +// Wishbone defines 2.10 // Refer to Wishbone System-on-Chip Interconnection Architecture 2.11 // These should probably be moved to a Wishbone common file 2.12
3.1 diff -r c08774849ebf -r e8125a6a3bd8 lm32_interrupt.v 3.2 --- a/lm32_interrupt.v Fri Aug 13 01:16:35 2010 +0100 3.3 +++ b/lm32_interrupt.v Sun Mar 06 19:22:27 2011 +0000 3.4 @@ -37,7 +37,7 @@ 3.5 clk_i, 3.6 rst_i, 3.7 // From external devices 3.8 - interrupt_n, 3.9 + interrupt, 3.10 // From pipeline 3.11 stall_x, 3.12 `ifdef CFG_DEBUG_ENABLED 3.13 @@ -72,8 +72,8 @@ 3.14 input clk_i; // Clock 3.15 input rst_i; // Reset 3.16 3.17 -input [interrupts-1:0] interrupt_n; // Interrupt pins, active-low 3.18 - 3.19 +input [interrupts-1:0] interrupt; // Interrupt pins, active-low 3.20 + 3.21 input stall_x; // Stall X pipeline stage 3.22 3.23 `ifdef CFG_DEBUG_ENABLED 3.24 @@ -130,7 +130,7 @@ 3.25 assign interrupt_exception = (|interrupt_n_exception) & ie; 3.26 3.27 // Determine which interrupts are currently being asserted (active-low) or are already pending 3.28 -assign asserted = ip | ~interrupt_n; 3.29 +assign asserted = ip | interrupt; 3.30 3.31 assign ie_csr_read_data = {{`LM32_WORD_WIDTH-3{1'b0}}, 3.32 `ifdef CFG_DEBUG_ENABLED
4.1 diff -r c08774849ebf -r e8125a6a3bd8 lm32_top.v 4.2 --- a/lm32_top.v Fri Aug 13 01:16:35 2010 +0100 4.3 +++ b/lm32_top.v Sun Mar 06 19:22:27 2011 +0000 4.4 @@ -38,7 +38,7 @@ 4.5 rst_i, 4.6 // From external devices 4.7 `ifdef CFG_INTERRUPTS_ENABLED 4.8 - interrupt_n, 4.9 + interrupt, 4.10 `endif 4.11 // From user logic 4.12 `ifdef CFG_USER_ENABLED 4.13 @@ -111,7 +111,7 @@ 4.14 input rst_i; // Reset 4.15 4.16 `ifdef CFG_INTERRUPTS_ENABLED 4.17 -input [`LM32_INTERRUPT_RNG] interrupt_n; // Interrupt pins, active-low 4.18 +input [`LM32_INTERRUPT_RNG] interrupt; // Interrupt pins 4.19 `endif 4.20 4.21 `ifdef CFG_USER_ENABLED 4.22 @@ -240,8 +240,8 @@ 4.23 ///////////////////////////////////////////////////// 4.24 // Instantiations 4.25 ///////////////////////////////////////////////////// 4.26 - 4.27 -// LM32 CPU 4.28 + 4.29 +// LM32 CPU 4.30 lm32_cpu cpu ( 4.31 // ----- Inputs ------- 4.32 .clk_i (clk_i), 4.33 @@ -251,7 +251,7 @@ 4.34 .rst_i (rst_i), 4.35 // From external devices 4.36 `ifdef CFG_INTERRUPTS_ENABLED 4.37 - .interrupt_n (interrupt_n), 4.38 + .interrupt (interrupt), 4.39 `endif 4.40 // From user logic 4.41 `ifdef CFG_USER_ENABLED