Package: otp_ctrl_env_pkg
- File: otp_ctrl_env_pkg.sv
Description
Copyright lowRISC contributors.
Licensed under the Apache License, Version 2.0, see LICENSE for details.
SPDX-License-Identifier: Apache-2.0
Signals
Name | Type | Description |
---|---|---|
index | int | |
index | for | |
NumPart | index | |
PartInfo | index | |
index | index | |
index | end | |
index | return | |
function | endfunction | |
is_secret | bit | |
part_index | int | |
part_index | if | |
return | else | |
function | endfunction | |
is_sw_digest | bit | |
addr | if | |
VendorTestDigestOffset | if | |
CreatorSwCfgDigestOffset | if | |
OwnerSwCfgDigestOffset | if | |
else | end | |
return | begin | |
endfunction | end |
Constants
Name | Type | Value | Description |
---|---|---|---|
LIST_OF_ALERTS | string | { "fatal_macro_error", |
parameters |
uint | uint | 3 | |
uint | uint | 8 | |
uint | uint | 'h1000 | |
uint | uint | 'h2000 | |
uint | uint | 512 * 4 | |
uint | uint | 16 * 4 | |
VENDOR_TEST_START_ADDR | uint | VendorTestOffset | convert byte into TLUL width size |
VENDOR_TEST_DIGEST_ADDR | uint | VendorTestDigestOffset | |
VENDOR_TEST_END_ADDR | uint | VENDOR_TEST_DIGEST_ADDR - 1 | |
CREATOR_SW_CFG_START_ADDR | uint | CreatorSwCfgOffset | |
CREATOR_SW_CFG_DIGEST_ADDR | uint | CreatorSwCfgDigestOffset | |
CREATOR_SW_CFG_END_ADDR | uint | CREATOR_SW_CFG_DIGEST_ADDR - 1 | |
OWNER_SW_CFG_START_ADDR | uint | OwnerSwCfgOffset | |
OWNER_SW_CFG_DIGEST_ADDR | uint | OwnerSwCfgDigestOffset | |
OWNER_SW_CFG_END_ADDR | uint | OWNER_SW_CFG_DIGEST_ADDR - 1 | |
HW_CFG_START_ADDR | uint | HwCfgOffset | |
HW_CFG_DIGEST_ADDR | uint | HwCfgDigestOffset | |
HW_CFG_END_ADDR | uint | HW_CFG_DIGEST_ADDR - 1 | |
SECRET0_START_ADDR | uint | Secret0Offset | |
SECRET0_DIGEST_ADDR | uint | Secret0DigestOffset | |
SECRET0_END_ADDR | uint | SECRET0_DIGEST_ADDR - 1 | |
SECRET1_START_ADDR | uint | Secret1Offset | |
SECRET1_DIGEST_ADDR | uint | Secret1DigestOffset | |
SECRET1_END_ADDR | uint | SECRET1_DIGEST_ADDR - 1 | |
SECRET2_START_ADDR | uint | Secret2Offset | |
SECRET2_DIGEST_ADDR | uint | Secret2DigestOffset | |
SECRET2_END_ADDR | uint | SECRET2_DIGEST_ADDR - 1 | |
uint | uint | int | LC has its own storage in scb |
uint | uint | Total num of valid dai address, secret partitions have a granularity of 8, the rest have a granularity of 4. Subtract 8 for each digest. | |
SRAM_DATA_SIZE | uint | 1 + SramKeyWidth + SramNonceWidth | sram rsp data has 1 bit for seed_valid, the rest are for key and nonce |
OTBN_DATA_SIZE | uint | 1 + OtbnKeyWidth + OtbnNonceWidth | otbn rsp data has 1 bit for seed_valid, the rest are for key and nonce |
FLASH_DATA_SIZE | uint | 1 + FlashKeyWidth | flash rsp data has 1 bit for seed_valid, the rest are for key |
LC_PROG_DATA_SIZE | uint | LcStateWidth + LcCountWidth | lc program data has lc_state data and lc_cnt data |
uint | uint | 12 | |
uint | uint | 10 | |
uint | uint | 3 | |
uint | uint | 5 | |
uint | uint | 40 | |
FATAL_EXP_STATUS | bit [9:0] | '1 | When fatal alert triggered, all partitions go to error state and status will be set to 1. |
PART_BASE_ADDRS | int | lc does not have dai access | |
OTP_TERMINAL_ERRS | otp_err_code_e | bit [TL_DW-1:0] |
Types
Name | Type | Description |
---|---|---|
otp_status_e | enum bit [5:0] { OtpVendorTestErrIdx, OtpCreatorSwCfgErrIdx, OtpOwnerSwCfgErrIdx, OtpHwCfgErrIdx, OtpSecret0ErrIdx, OtpSecret1ErrIdx, OtpSecret2ErrIdx, OtpLifeCycleErrIdx, OtpDaiErrIdx, OtpLciErrIdx, OtpTimeoutErrIdx, OtpLfsrFsmErrIdx, OtpScramblingFsmErrIdx, OtpDerivKeyFsmErrIdx, OtpBusIntegErrorIdx, OtpDaiIdleIdx, OtpCheckPendingIdx, OtpStatusFieldSize } |
|
otp_err_code_e | enum bit [2:0] { OtpNoError, OtpMacroError, OtpMacroEccCorrError, OtpMacroEccUncorrError, OtpMacroWriteBlankError, OtpAccessError, OtpCheckFailError, OtpFsmStateError } |
|
otp_ecc_err_e | enum bit [1:0] { OtpNoEccErr, OtpEccCorrErr, OtpEccUncorrErr } |
|
otp_alert_e | enum bit [1:0] { OtpNoAlert, OtpCheckAlert, OtpMacroAlert } |
|
otp_ctrl_vif | virtual otp_ctrl_if |
Functions
- is_digest (bit [TL_DW-1:0]) return (bit)
- is_sw_part (bit [TL_DW-1:0]) return (bit)
- get_sw_window_offset (bit [TL_AW-1:0] dai_addr) return (bit [TL_AW-1:0])
Description
Resolve an offset within the software window as an offset within the whole otp_ctrl block.
- randomize_lc_tx_t_val () return (lc_ctrl_pkg::lc_tx_t)
Description
This function randomizes lc_tx_t with 25% lc_ctrl_pkg::On, 25% lc_ctrl_pkg::Off,
and 50% random values
- normalize_dai_addr (bit [TL_DW-1:0] dai_addr) return (bit [TL_DW-1:0])