[otp, sram] Define default for dangling sram_otp_key_rsp connections
Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
diff --git a/hw/ip/otp_ctrl/rtl/otp_ctrl_pkg.sv b/hw/ip/otp_ctrl/rtl/otp_ctrl_pkg.sv
index 88ac020..4ef1119 100644
--- a/hw/ip/otp_ctrl/rtl/otp_ctrl_pkg.sv
+++ b/hw/ip/otp_ctrl/rtl/otp_ctrl_pkg.sv
@@ -237,12 +237,20 @@
};
typedef struct packed {
- logic ack; // Ack for key.
+ logic ack; // Ack for key.
sram_key_t key; // 128bit ephemeral scrambling key.
sram_nonce_t nonce; // 64bit nonce.
logic seed_valid; // Set to 1 if the key seed has been provisioned and is valid.
} sram_otp_key_rsp_t;
+ // Default for dangling connection
+ parameter sram_otp_key_rsp_t SRAM_OTP_KEY_RSP_DEFAULT = '{
+ ack: 1'b1,
+ key: '0,
+ nonce: '0,
+ seed_valid: 1'b1
+ };
+
typedef struct packed {
logic ack; // Ack for key.
otbn_key_t key; // 128bit ephemeral scrambling key.
diff --git a/hw/ip/sram_ctrl/data/sram_ctrl.hjson b/hw/ip/sram_ctrl/data/sram_ctrl.hjson
index b4ed5ee..2edd01b 100644
--- a/hw/ip/sram_ctrl/data/sram_ctrl.hjson
+++ b/hw/ip/sram_ctrl/data/sram_ctrl.hjson
@@ -75,7 +75,6 @@
type: "req_rsp"
name: "sram_otp_key"
act: "req"
- default: "'0"
package: "otp_ctrl_pkg"
},
// SRAM attribute input
diff --git a/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson b/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson
index f6e76a2..238033b 100644
--- a/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson
+++ b/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson
@@ -3471,8 +3471,8 @@
type: req_rsp
act: req
width: 1
- default: "'0"
inst_name: sram_ctrl_ret_aon
+ default: ""
top_signame: otp_ctrl_sram_otp_key
index: 1
}
@@ -5269,8 +5269,8 @@
type: req_rsp
act: req
width: 1
- default: "'0"
inst_name: sram_ctrl_main
+ default: ""
top_signame: otp_ctrl_sram_otp_key
index: 0
}
@@ -14866,8 +14866,8 @@
type: req_rsp
act: req
width: 1
- default: "'0"
inst_name: sram_ctrl_ret_aon
+ default: ""
top_signame: otp_ctrl_sram_otp_key
index: 1
}
@@ -15853,8 +15853,8 @@
type: req_rsp
act: req
width: 1
- default: "'0"
inst_name: sram_ctrl_main
+ default: ""
top_signame: otp_ctrl_sram_otp_key
index: 0
}