efuse_guard
Check program and read targets against field locks, lifecycle-state rules, and RMA token checks.
HAS_LC_STATE distinguishes SEP (lifecycle field present) from SMC. LC_STATE_BIT_POSITION and TOKEN_MATCH_CODE locate and encode token checks; the SIP and chiplet token bit addresses are LC_STATE_BIT_POSITION+1 and +2.
The program and read interfaces sample the lock and secure-TM status when firmware starts a command and refuse a blocked start without issuing it; a command already issued completes.
- efuse_err_o sets on a lock-refused start and sticks until error_clear_i.
- Lock and secure-TM status are exported.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
EFUSE_FIELDS | int unsigned | 1 | eFuse field-map entry count. |
EFUSE_ADDR_WIDTH | int unsigned | 12 | eFuse byte-address width. |
HAS_LC_STATE | bit | 1'b0 | Set for SEP: exempts field index 0 from locks and gates the RMA token bits on token matches; clear for SMC. |
LC_STATE_BIT_POSITION | int unsigned | 0 | Bit address of the lifecycle-state field. |
TOKEN_MATCH_CODE | logic [5:0] | 6'b010101 | Token-match status code that permits programming the corresponding RMA token bit. |
SipTokenBitAddr | efuse_addr_t | efuse_addr_t'(LC_STATE_BIT_POSITION + 1) | Bit address of the RMA SiP token bit. |
ChipletTokenBitAddr | efuse_addr_t | efuse_addr_t'(LC_STATE_BIT_POSITION + 2) | Bit address of the RMA chiplet token bit. |
Ports
| Name | Direction | Type | Description |
|---|---|---|---|
clk_i | input | logic | System clock. |
rst_ni | input | logic | Active-low synchronous reset; clears efuse_err_o. |
secure_tm_i | input | logic | Secure test mode, active-high; blocks every start without raising the error. |
efuse_field_map_i | input | efuse_pkg::rule_t [EFUSE_FIELDS-1:0] | Per-field byte ranges and lock indices used to find the lock bits for a target address. |
rma_sip_token_match_i | input | logic [5:0] | RMA SiP token-match status code from token processing. |
rma_chiplet_token_match_i | input | logic [5:0] | RMA chiplet token-match status code from token processing. |
efuse_err_o | output | logic | Sticky error set when a program or read start is refused by a lock or, for a program, by a missing RMA token match; not set by secure test mode. |
error_clear_i | input | logic | Clears the sticky error; a same-cycle new error takes priority. |
shadow_regs_i | input | efuse_map_t | Shadow eFuse map supplying the per-field read and write lock bits. |
program_target_addr_i | input | efuse_addr_t | Fuse bit address a program start would target. |
read_target_addr_i | input | efuse_addr_t | Fuse bit address a read start would target. |
program_blocked_i | input | logic | One-cycle pulse: a lock refused a program start. |
read_blocked_i | input | logic | One-cycle pulse: a lock refused a read start. |
is_read_locked_o | output | logic | High when the read target address falls in a read-locked field. |
is_program_locked_o | output | logic | High when the program target address is write locked or is an RMA token bit without a token match. |
secure_tm_blocked_o | output | logic | High while secure test mode blocks fuse command starts. |