efuse_shadow_reg_access_control

Enforce per-field read and write locks on APB accesses to the shadow map.

Filter APB requests using efuse_field_map_i and locks_i before they reach the shadow regs.

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.

Report write_locked_o, read_locked_o, write_setup_only_o, and lc_state_access_o. locked_field_access_interrupt_o signals locked-field hits.

Parameters

Table 1. Parameters
NameTypeDefaultDescription
EFUSE_ADDR_WIDTHint unsigned12Width of the MAP window byte offset on apb_req_paddr_i.
EFUSE_FIELDSint unsigned1eFuse field-map entry count.
HAS_LC_STATEbit1'b0Set for SEP: field index 0 is the lifecycle-state field, exempt from hardware locks and reported on lc_state_access_o.
LockVectorBitsint unsigned2 * (EFUSE_FIELDS - 1)Hardware lock bits: a write and a read lock per field, excluding the LOCKS meta-field.

Ports

Table 2. Ports
NameDirectionTypeDescription
clk_iinputlogicSystem clock; not used, the module is combinational.
rst_niinputlogicActive-low reset; not used, the module is combinational.
secure_tm_iinputlogicSecure test mode, active-high; adds each field's secure-test-mode lock to the write check.
efuse_field_map_iinputefuse_pkg::rule_t [EFUSE_FIELDS-1:0]Per-field byte ranges, lock indices, and software lock bits.
apb_req_paddr_iinputlogic [EFUSE_ADDR_WIDTH-1:0]Byte offset within the MAP window, matched against the field byte ranges.
apb_req_pprot_iinputlogic [2:0]APB protection attributes, forwarded unchanged.
apb_req_psel_iinputlogicAPB select for the MAP window.
apb_req_penable_iinputlogicAPB access phase; lock checks apply only while it and the select are high.
apb_req_pwrite_iinputlogicAPB transfer direction, high for a write.
apb_req_pwdata_iinputlogic [31:0]Write data forwarded to the shadow registers when the access is allowed.
apb_req_pstrb_iinputlogic [3:0]Byte lane enables for the write.
apb_resp_ooutputefuse_apb_resp_tAPB response; a locked access completes with read data 0xBADCAB1E and no slave error.
apb_req_from_ac_ooutputefuse_apb_req_tAPB request forwarded to the shadow registers; zero unless the access passes the lock checks.
apb_resp_from_ac_iinputefuse_apb_resp_tAPB response from the shadow registers for accesses that pass the lock checks.
write_locked_ooutputlogicHigh during an APB write access to a field that is write locked by its hardware lock bit, its software lock bits, or its secure-test-mode lock.
write_setup_only_ooutputlogicHigh 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_ooutputlogicHigh when the address falls in the lifecycle-state field.
read_locked_ooutputlogicHigh when the addressed field is read locked by its hardware or software lock bit.
locks_iinputlogic [LockVectorBits-1:0]Hardware lock bits from the shadow LOCKS words: write lock at 2n, read lock at 2n+1 for field n.
locked_field_access_interrupt_ooutputlogicHigh during an APB access that a lock blocks.