summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-08-03 19:39:50 -0400
committerIan Moffett <ian@osmora.org>2024-08-03 19:39:50 -0400
commitf7f868aa082fa08b9bbf34a08cec1d4cc3c2ade5 (patch)
tree3d345d56eb35d0f6b8b482b7b0f55ae35ca4ea41
parent304056a748288b6459e1c4ba48c7ee236c2a8d3f (diff)
soc: pimc: Fix up mask bit
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--sv/soc/irq/pimc.sv7
1 files changed, 2 insertions, 5 deletions
diff --git a/sv/soc/irq/pimc.sv b/sv/soc/irq/pimc.sv
index a41a941..6ad4c43 100644
--- a/sv/soc/irq/pimc.sv
+++ b/sv/soc/irq/pimc.sv
@@ -35,10 +35,7 @@
module pimc #(
parameter IRQ_PIN_COUNT = 16,
parameter IRQTAB_ENTSIZE = 32,
- parameter IRQTAB_MMIOBASE = 48'h1000,
-
- /* irqtab indices */
- parameter IRQTAB_MASK = 1
+ parameter IRQTAB_MMIOBASE = 48'h1000
) (
input wire clk, /* 50 MHz */
input logic [IRQ_PIN_COUNT-1:0] irq_in,
@@ -97,7 +94,7 @@ module pimc #(
end else begin
for (i = 0; i < IRQ_PIN_COUNT; i = i + 1) begin
/* IRQ should be dropped if masked */
- irqmask <= irqtab[(i * IRQTAB_ENTSIZE) + IRQTAB_MASK][0];
+ irqmask <= irqtab[i * IRQTAB_ENTSIZE][8];
accept <= (irqmask == 1'b0 && notify == 1'b1);
if (irq_in[i] == 1'b1 && accept == 1'b1) begin
lineno <= i[7:0];