summaryrefslogtreecommitdiff
path: root/sv/soc/irq/pimc.sv
diff options
context:
space:
mode:
Diffstat (limited to 'sv/soc/irq/pimc.sv')
-rw-r--r--sv/soc/irq/pimc.sv24
1 files changed, 24 insertions, 0 deletions
diff --git a/sv/soc/irq/pimc.sv b/sv/soc/irq/pimc.sv
index 6ad4c43..3c721b3 100644
--- a/sv/soc/irq/pimc.sv
+++ b/sv/soc/irq/pimc.sv
@@ -43,8 +43,10 @@ module pimc #(
/* MMIO interface */
input logic [47:0] mmio_addr,
+ input logic [31:0] mmio_wdata,
output logic [31:0] mmio_rdata,
input wire mmio_re,
+ input wire mmio_we,
output logic notify,
output logic [7:0] lineno,
@@ -87,6 +89,28 @@ module pimc #(
endcase
end
+ /* Handle MMIO wires */
+ if (mmio_we) begin
+ case (mmio_addr)
+ IRQTAB_MMIOBASE: irqtab[0] <= mmio_wdata;
+ IRQTAB_MMIOBASE + 4: irqtab[1] <= mmio_wdata;
+ IRQTAB_MMIOBASE + 8: irqtab[2] <= mmio_wdata;
+ IRQTAB_MMIOBASE + 12: irqtab[3] <= mmio_wdata;
+ IRQTAB_MMIOBASE + 16: irqtab[4] <= mmio_wdata;
+ IRQTAB_MMIOBASE + 20: irqtab[5] <= mmio_wdata;
+ IRQTAB_MMIOBASE + 24: irqtab[6] <= mmio_wdata;
+ IRQTAB_MMIOBASE + 28: irqtab[7] <= mmio_wdata;
+ IRQTAB_MMIOBASE + 32: irqtab[8] <= mmio_wdata;
+ IRQTAB_MMIOBASE + 36: irqtab[9] <= mmio_wdata;
+ IRQTAB_MMIOBASE + 40: irqtab[10] <= mmio_wdata;
+ IRQTAB_MMIOBASE + 44: irqtab[11] <= mmio_wdata;
+ IRQTAB_MMIOBASE + 48: irqtab[12] <= mmio_wdata;
+ IRQTAB_MMIOBASE + 52: irqtab[13] <= mmio_wdata;
+ IRQTAB_MMIOBASE + 56: irqtab[14] <= mmio_wdata;
+ IRQTAB_MMIOBASE + 60: irqtab[15] <= mmio_wdata;
+ endcase
+ end
+
if (irqack == 1'b1) begin
lineno <= 8'b0;
notify <= 1'b1;