[top] hook-up rom_ctrl to kmac

Signed-off-by: Timothy Chen <timothytim@google.com>
diff --git a/hw/ip/rom_ctrl/data/rom_ctrl.hjson b/hw/ip/rom_ctrl/data/rom_ctrl.hjson
index 128ef77..8c602db 100644
--- a/hw/ip/rom_ctrl/data/rom_ctrl.hjson
+++ b/hw/ip/rom_ctrl/data/rom_ctrl.hjson
@@ -32,6 +32,15 @@
       randcount: "128",
       randtype:  "data"
     }
+
+    { name:      "SkipCheck",
+      type:      "bit",
+      desc:      "Skip rom power up check"
+      // TODO: flip this to 0 when infrastructure is ready
+      default:   "1"
+      local:     "false",
+      expose:    "true"
+    }
   ]
   alert_list: [
     { name: "fatal"
diff --git a/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson b/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson
index ab7542f..bb543d3 100644
--- a/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson
+++ b/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson
@@ -4016,7 +4016,7 @@
           width: 3
           inst_name: kmac
           default: ""
-          end_idx: 1
+          end_idx: 2
           top_type: partial-one-to-N
           top_signame: kmac_app
           index: -1
@@ -5085,6 +5085,14 @@
           default: 0x23c074e020fd502869582e71443c8be0
           randwidth: 128
         }
+        {
+          name: SkipCheck
+          desc: Skip rom power up check
+          type: bit
+          default: "1"
+          expose: "true"
+          name_top: RomCtrlSkipCheck
+        }
       ]
       inter_signal_list:
       [
@@ -5132,7 +5140,9 @@
           act: req
           width: 1
           inst_name: rom_ctrl
-          index: -1
+          default: ""
+          top_signame: kmac_app
+          index: 1
         }
         {
           name: regs_tl
@@ -5775,6 +5785,7 @@
       kmac.app:
       [
         keymgr.kmac_data
+        rom_ctrl.kmac_data
       ]
       clkmgr_aon.idle:
       [
@@ -13647,7 +13658,7 @@
         width: 3
         inst_name: kmac
         default: ""
-        end_idx: 1
+        end_idx: 2
         top_type: partial-one-to-N
         top_signame: kmac_app
         index: -1
@@ -14291,7 +14302,9 @@
         act: req
         width: 1
         inst_name: rom_ctrl
-        index: -1
+        default: ""
+        top_signame: kmac_app
+        index: 1
       }
       {
         name: regs_tl
@@ -16417,7 +16430,7 @@
         signame: kmac_app_req
         width: 3
         type: req_rsp
-        end_idx: 1
+        end_idx: 2
         act: rsp
         suffix: req
         default: ""
@@ -16428,7 +16441,7 @@
         signame: kmac_app_rsp
         width: 3
         type: req_rsp
-        end_idx: 1
+        end_idx: 2
         act: rsp
         suffix: rsp
         default: ""
diff --git a/hw/top_earlgrey/data/top_earlgrey.hjson b/hw/top_earlgrey/data/top_earlgrey.hjson
index 292b449..3c179f2 100644
--- a/hw/top_earlgrey/data/top_earlgrey.hjson
+++ b/hw/top_earlgrey/data/top_earlgrey.hjson
@@ -894,7 +894,7 @@
       'keymgr.kmac_key'         : ['kmac.keymgr_key']
 
       // KMAC Application Interface
-      'kmac.app'                : ['keymgr.kmac_data']
+      'kmac.app'                : ['keymgr.kmac_data', 'rom_ctrl.kmac_data']
 
       // The idle connection is automatically connected through topgen.
       // The user does not need to explicitly declare anything other than
diff --git a/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv b/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv
index fdae775..0e9ec66 100644
--- a/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv
+++ b/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv
@@ -25,6 +25,7 @@
   parameter bit SramCtrlMainInstrExec = 1,
   parameter otbn_pkg::regfile_e OtbnRegFile = otbn_pkg::RegFileFF,
   parameter  RomCtrlBootRomInitFile = "",
+  parameter bit RomCtrlSkipCheck = 1,
 
   // Manually defined parameters
   parameter ibex_pkg::regfile_e IbexRegFile = ibex_pkg::RegFileFF,
@@ -651,7 +652,6 @@
   edn_pkg::edn_rsp_t unused_edn1_edn_rsp4;
   edn_pkg::edn_rsp_t unused_edn1_edn_rsp5;
   edn_pkg::edn_rsp_t unused_edn1_edn_rsp6;
-  kmac_pkg::app_rsp_t unused_kmac_app_rsp1;
   kmac_pkg::app_rsp_t unused_kmac_app_rsp2;
 
   // assign partial inter-module tie-off
@@ -661,7 +661,6 @@
   assign unused_edn1_edn_rsp4 = edn1_edn_rsp[4];
   assign unused_edn1_edn_rsp5 = edn1_edn_rsp[5];
   assign unused_edn1_edn_rsp6 = edn1_edn_rsp[6];
-  assign unused_kmac_app_rsp1 = kmac_app_rsp[1];
   assign unused_kmac_app_rsp2 = kmac_app_rsp[2];
   assign edn1_edn_req[1] = '0;
   assign edn1_edn_req[2] = '0;
@@ -669,7 +668,6 @@
   assign edn1_edn_req[4] = '0;
   assign edn1_edn_req[5] = '0;
   assign edn1_edn_req[6] = '0;
-  assign kmac_app_req[1] = kmac_pkg::APP_REQ_DEFAULT;
   assign kmac_app_req[2] = kmac_pkg::APP_REQ_DEFAULT;
 
 
@@ -2284,7 +2282,8 @@
     .AlertAsyncOn(alert_handler_reg_pkg::AsyncOn[30:30]),
     .BootRomInitFile(RomCtrlBootRomInitFile),
     .RndCnstScrNonce(RndCnstRomCtrlScrNonce),
-    .RndCnstScrKey(RndCnstRomCtrlScrKey)
+    .RndCnstScrKey(RndCnstRomCtrlScrKey),
+    .SkipCheck(RomCtrlSkipCheck)
   ) u_rom_ctrl (
       // [30]: fatal
       .alert_tx_o  ( alert_tx[30:30] ),
@@ -2294,8 +2293,8 @@
       .rom_cfg_i(ast_rom_cfg),
       .pwrmgr_data_o(rom_ctrl_pwrmgr_data),
       .keymgr_data_o(),
-      .kmac_data_o(),
-      .kmac_data_i(kmac_pkg::APP_RSP_DEFAULT),
+      .kmac_data_o(kmac_app_req[1]),
+      .kmac_data_i(kmac_app_rsp[1]),
       .regs_tl_i(rom_ctrl_regs_tl_req),
       .regs_tl_o(rom_ctrl_regs_tl_rsp),
       .rom_tl_i(rom_ctrl_rom_tl_req),