pub type W = W<MODCTRL_SPEC>;Expand description
Register MODCTRL writer
Aliased Type§
pub struct W { /* private fields */ }Implementations§
Source§impl W
impl W
Sourcepub fn keyswp(&mut self) -> KEYSWP_W<'_, MODCTRL_SPEC>
pub fn keyswp(&mut self) -> KEYSWP_W<'_, MODCTRL_SPEC>
Bits 0:1 - Decide whether the SDP byteswaps the Key (big-endian data). When all bits are set, the data is assumed to be in the big-endian format
Sourcepub fn doutswp(&mut self) -> DOUTSWP_W<'_, MODCTRL_SPEC>
pub fn doutswp(&mut self) -> DOUTSWP_W<'_, MODCTRL_SPEC>
Bits 2:3 - Decide whether the SDP byteswaps the output data (big-endian data); When all bits are set, the data is assumed to be in the big-endian format
Sourcepub fn dinswp(&mut self) -> DINSWP_W<'_, MODCTRL_SPEC>
pub fn dinswp(&mut self) -> DINSWP_W<'_, MODCTRL_SPEC>
Bits 4:5 - Decide whether the SDP byteswaps the input data (big-endian data); When all bits are set, the data is assumed to be in the big-endian format
Sourcepub fn hasout(&mut self) -> HASOUT_W<'_, MODCTRL_SPEC>
pub fn hasout(&mut self) -> HASOUT_W<'_, MODCTRL_SPEC>
Bit 9 - When hashing is enabled, this bit controls the input or output data of the AES engine is hashed. 0 INPUT HASH 1 OUTPUT HASH
Sourcepub fn haschk(&mut self) -> HASCHK_W<'_, MODCTRL_SPEC>
pub fn haschk(&mut self) -> HASCHK_W<'_, MODCTRL_SPEC>
Bit 10 - HASH Check Enable Bit. 1x1, HASH check need, hash result will compare with the HASHRSLT 0-7 registers; 1x0, HASH check is not enabled, HASHRSLT0-7 store the HASH result. For SHA1, will use HASHRSLT0-3 words, and HASH 256 will use HASH0-7 words.
Sourcepub fn crcen(&mut self) -> CRCEN_W<'_, MODCTRL_SPEC>
pub fn crcen(&mut self) -> CRCEN_W<'_, MODCTRL_SPEC>
Bit 11 - CRC enable. 1x1, CRC is enabled. 1x0, CRC is disabled.
Sourcepub fn hasalg(&mut self) -> HASALG_W<'_, MODCTRL_SPEC>
pub fn hasalg(&mut self) -> HASALG_W<'_, MODCTRL_SPEC>
Bits 12:15 - HASH Algorithem selection. 0x0 SHA1 — 0x1 CRC32 — 0x2 SHA256 —
Sourcepub fn aesdir(&mut self) -> AESDIR_W<'_, MODCTRL_SPEC>
pub fn aesdir(&mut self) -> AESDIR_W<'_, MODCTRL_SPEC>
Bit 16 - AES direction 1x1, AES Decryption 1x0, AES Encryption.
Sourcepub fn aesks(&mut self) -> AESKS_W<'_, MODCTRL_SPEC>
pub fn aesks(&mut self) -> AESKS_W<'_, MODCTRL_SPEC>
Bits 18:23 - AES Key Selection. These regisgers are being used to select the AES key that stored in the 16x128 key ram of the SDP, or select the key from the OTP. Detail as following: 0x00: key from the 16x128, this is the key read address, valid for AES128; AES256 will use 128 bit from this address and 128 bit key from next address as 256 bit AES key. 0x01: key from the 16x128, this is the key read address, valid for AES128, not valid for AES286. …. 0x0E: key from the 16x128, this is the key read address, valid for AES128; AES256 will use 128 from this add and 128 from next add for the AES key. 0x0F: key from the 16x128, this is the key read address, valid for AES128, not valid for AES286. 0x20: kman_sk0[127:0] from the key manager for AES128; AES256 will use kman_sk0[255:0] as AES key. 0x21: kman_sk0[255:128] from the key manager for AES128; not valid for AES256. 0x22: kman_sk1[127:0] from the key manager for AES128; AES256 will use kman_sk1[255:0] as AES key. 0x23: kman_sk1[255:128] from the key manager for AES128; not valid for AES256. 0x24: kman_sk2[127:0] from the key manager for AES128; AES256 will use kman_sk2[255:0] as AES key. 0x25: kman_sk2[255:128] from the key manager for AES128; not valid for AES256. 0x26: kman_sk3[127:0] from the key manager for AES128; AES256 will use kman_sk3[255:0] as AES key. 0x27: kman_sk3[255:128] from the key manager for AES128; not valid for AES256. 0x30: exip0_key[127:0] from OTP for AES128; AES256 will use exip0_key[255:0] as AES key. 0x31: exip0_key[255:128] from OTP for AES128; not valid for AES256. 0x32: exip1_key[127:0] from OTP for AES128; AES256 will use exip1_key[255:0] as AES key. 0x33: exip1_key[255:128] from OTP for AES128; not valid for AES256. Other values, reserved.
Sourcepub fn aesmod(&mut self) -> AESMOD_W<'_, MODCTRL_SPEC>
pub fn aesmod(&mut self) -> AESMOD_W<'_, MODCTRL_SPEC>
Bits 24:27 - AES mode selection. 0x0 = ECB; 0x1 = CBC; Others, reserved.
Sourcepub fn aesalg(&mut self) -> AESALG_W<'_, MODCTRL_SPEC>
pub fn aesalg(&mut self) -> AESALG_W<'_, MODCTRL_SPEC>
Bits 28:31 - AES algorithem selection. 0x0 = AES 128; 0x1 = AES 256; 0x8 = SM4; Others, reserved.