[hmac/alerts] Instantiate dummy alert in hmac and wire up alert handler

Signed-off-by: Michael Schaffner <msf@google.com>
diff --git a/hw/top_earlgrey/data/top_earlgrey.hjson b/hw/top_earlgrey/data/top_earlgrey.hjson
index f593627..326236b 100644
--- a/hw/top_earlgrey/data/top_earlgrey.hjson
+++ b/hw/top_earlgrey/data/top_earlgrey.hjson
@@ -97,6 +97,26 @@
       reset_connections: {rst_ni: "sys"},
       base_addr: "0x40070000",
       generated: "true"
+    },
+    { name: "alert_handler",
+      type: "alert_handler",
+      clock_connections: {clk_i: "main"},
+      reset_connections: {rst_ni: "sys"},
+      base_addr: "0x40130000",
+      generated: "true"         // Indicate this module is generated in the topgen
+      localparam: {
+        EscCntDw:  32,
+        AccuCntDw: 16,
+        LfsrSeed:  "0x7FFFFFFF"
+      }
+    }
+    // dummy module to capture the alert handler escalation signals
+    // and test them by converting them into IRQs
+    { name: "nmi_gen",
+      type: "nmi_gen",
+      clock_connections: {clk_i: "main"},
+      reset_connections: {rst_ni: "sys"},
+      base_addr: "0x40140000",
     }
   ]
 
@@ -142,7 +162,8 @@
   // If interrupt is not defined, it uses the order from the module list
   // and include every modules.
   // first item goes to LSB of the interrupt source
-  interrupt_module: ["gpio", "uart", "spi_device", "flash_ctrl", "hmac" ]
+  interrupt_module: ["gpio", "uart", "spi_device", "flash_ctrl",
+                     "hmac", "alert_handler", "nmi_gen" ]
 
   // RV_PLIC has two searching algorithm internally to pick the most highest priority interrupt
   // source. "sequential" is smaller but slower, "matrix" is larger but faster.
@@ -152,7 +173,14 @@
   interrupt: [
   ]
 
-  // TODO: ALERT HANDLER
+  // ===== ALERT HANDLER ======================================================
+  // list all modules that expose alerts
+  // first item goes to LSB of the interrupt source
+  alert_module: [ "hmac" ]
+
+  // generated list of alerts:
+  alert: [
+  ]
 
   // TODO: PINMUX
   pinmux: {