efuse_shadow_reg_access_control
Decode the per-field read and write locks that apply to a shadow-map byte address.
Look addr_i up in efuse_field_map_i and combine the field's software lock bits with its hardware lock bits from locks_i. The module is combinational and independent of the bus protocol; the caller decides which accesses the locks block.
LockVectorBits is 2*(EFUSE_FIELDS-1), with write-lock at 2n and read-lock at 2n+1 per real field. The LOCKS meta-field uses sentinel idx all-ones and is excluded from hw-lock checks, as is any unmapped address.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
EFUSE_ADDR_WIDTH | int unsigned | 12 | Width of the MAP window byte offset on addr_i. |
EFUSE_FIELDS | int unsigned | 1 | eFuse field-map entry count. |
HAS_LC_STATE | bit | 1'b0 | Set for SEP: field index 0 is the lifecycle-state field, exempt from hardware locks and reported on lc_state_access_o. |
LockVectorBits | int unsigned | 2 * (EFUSE_FIELDS - 1) | Hardware lock bits: a write and a read lock per field, excluding the LOCKS meta-field. |
Ports
| Name | Direction | Type | Description |
|---|---|---|---|
secure_tm_i | input | logic | Secure test mode, active-high; adds each field's secure-test-mode lock to the write lock. |
efuse_field_map_i | input | efuse_pkg::rule_t [EFUSE_FIELDS-1:0] | Per-field byte ranges, lock indices, and software lock bits. |
locks_i | input | logic [LockVectorBits-1:0] | Hardware lock bits from the shadow LOCKS words: write lock at 2n, read lock at 2n+1 for field n. |
addr_i | input | logic [EFUSE_ADDR_WIDTH-1:0] | Byte offset within the MAP window, matched against the field byte ranges. |
write_locked_o | output | logic | High when the addressed field is write locked by its hardware lock bit, its software lock bits, or its secure-test-mode lock. |
read_locked_o | output | logic | High when the addressed field is read locked by its hardware or software lock bit. |
write_setup_only_o | output | logic | High when the addressed field is set-only: writes may set bits but not clear them; low when its hardware write lock is set. |
lc_state_access_o | output | logic | High when the address falls in the lifecycle-state field. |