[dbg] Add debug_req to ml_top

Change-Id: I9a74f9c8b28200ab889db4e7068b3ea5be56dbf5
diff --git a/hw/top_matcha/data/top_matcha.hjson b/hw/top_matcha/data/top_matcha.hjson
index 8665847..844d419 100644
--- a/hw/top_matcha/data/top_matcha.hjson
+++ b/hw/top_matcha/data/top_matcha.hjson
@@ -1297,7 +1297,8 @@
       'rv_plic_smc.msip' : ['rv_core_ibex_smc.irq_software'],
       'rv_plic_smc.irq'  : ['rv_core_ibex_smc.irq_external'],
 
-       'rv_dm.debug_req': ['rv_core_ibex_sec.debug_req', 'rv_core_ibex_smc.debug_req'],
+       'rv_dm.debug_req': ['rv_core_ibex_sec.debug_req', 'rv_core_ibex_smc.debug_req',
+                            'ml_top.debug_req'],
 
       // rv_timer connections
 
diff --git a/hw/top_matcha/ip/ml_top/data/ml_top.hjson b/hw/top_matcha/ip/ml_top/data/ml_top.hjson
index 09519c0..af9292b 100644
--- a/hw/top_matcha/ip/ml_top/data/ml_top.hjson
+++ b/hw/top_matcha/ip/ml_top/data/ml_top.hjson
@@ -117,6 +117,13 @@
         type:    "uni",
         width:   "32"
      },
+     { name:  "debug_req",
+        package: "",
+        struct:  "logic",
+        act:     "rcv",
+        type:    "uni",
+        width:   "1"
+     },
   ],
 
 
diff --git a/hw/top_matcha/ip/ml_top/rtl/ml_top.sv b/hw/top_matcha/ip/ml_top/rtl/ml_top.sv
index cb34bd0..0699f4f 100644
--- a/hw/top_matcha/ip/ml_top/rtl/ml_top.sv
+++ b/hw/top_matcha/ip/ml_top/rtl/ml_top.sv
@@ -47,16 +47,19 @@
   input   [255:0]            isp_wdata_i,
   input   [31:0]             isp_wmask_i,
 
-    input                      isp_sp_cvalid_i,
-    output logic               isp_sp_cready_o,
-    input                      isp_sp_cwrite_i,
-    input        [21:0]        isp_sp_caddr_i,
-    input        [255:0]       isp_sp_wdata_i,
-    input        [31:0]        isp_sp_wmask_i,
+  input                      isp_sp_cvalid_i,
+  output logic               isp_sp_cready_o,
+  input                      isp_sp_cwrite_i,
+  input   [21:0]             isp_sp_caddr_i,
+  input   [255:0]            isp_sp_wdata_i,
+  input   [31:0]             isp_sp_wmask_i,
+
   // Interrupts
   output logic               intr_host_req_o,
   output logic               intr_finish_o,
-  output logic               intr_fault_o
+  output logic               intr_fault_o,
+
+  input logic                debug_req_i
 
 );
 
@@ -154,7 +157,9 @@
     // Interrupt
     .fault        (core0_fault),
     .host_req     (core0_host_req), // raised if the kelvin core need to interrupt the host
-    .finish       (core0_finish)    // raised if the kelvin finish the task
+    .finish       (core0_finish),    // raised if the kelvin finish the task
+
+    .debug_req    (debug_req_i)
   );
 
 
diff --git a/hw/top_matcha/rtl/autogen/top_matcha.sv b/hw/top_matcha/rtl/autogen/top_matcha.sv
index 9658ece..42be2ab 100644
--- a/hw/top_matcha/rtl/autogen/top_matcha.sv
+++ b/hw/top_matcha/rtl/autogen/top_matcha.sv
@@ -786,7 +786,7 @@
   logic [1:0] rv_plic_irq;
   logic       rv_plic_smc_msip;
   logic       rv_plic_smc_irq;
-  logic [1:0] rv_dm_debug_req;
+  logic [2:0] rv_dm_debug_req;
   rv_core_ibex_pkg::cpu_crash_dump_t       rv_core_ibex_sec_crash_dump;
   pwrmgr_pkg::pwr_cpu_t       rv_core_ibex_sec_pwrmgr;
   lc_ctrl_pkg::lc_tx_t       rv_core_ibex_smc_pwrmgr_cpu_en;
@@ -3284,6 +3284,7 @@
       .isp_sp_caddr_i(isp_wrapper_isp_sp_caddr),
       .isp_sp_wdata_i(isp_wrapper_isp_sp_wdata),
       .isp_sp_wmask_i(isp_wrapper_isp_sp_wmask),
+      .debug_req_i(rv_dm_debug_req[2]),
       .core_tl_i(ml_top_core_tl_req),
       .core_tl_o(ml_top_core_tl_rsp),
       .dmem_tl_i(ml_top_dmem_tl_req),