lowrisc/registers/
sram_ctrl_regs.rsuse kernel::utilities::registers::ReadWrite;
use kernel::utilities::registers::{register_bitfields, register_structs};
pub const SRAM_CTRL_PARAM_NUM_ALERTS: u32 = 1;
pub const SRAM_CTRL_PARAM_REG_WIDTH: u32 = 32;
register_structs! {
pub SramCtrlRegisters {
(0x0000 => pub(crate) alert_test: ReadWrite<u32, ALERT_TEST::Register>),
(0x0004 => pub(crate) status: ReadWrite<u32, STATUS::Register>),
(0x0008 => pub(crate) exec_regwen: ReadWrite<u32, EXEC_REGWEN::Register>),
(0x000c => pub(crate) exec: ReadWrite<u32, EXEC::Register>),
(0x0010 => pub(crate) ctrl_regwen: ReadWrite<u32, CTRL_REGWEN::Register>),
(0x0014 => pub(crate) ctrl: ReadWrite<u32, CTRL::Register>),
(0x0018 => @END),
}
}
register_bitfields![u32,
pub(crate) ALERT_TEST [
FATAL_ERROR OFFSET(0) NUMBITS(1) [],
],
pub(crate) STATUS [
BUS_INTEG_ERROR OFFSET(0) NUMBITS(1) [],
INIT_ERROR OFFSET(1) NUMBITS(1) [],
ESCALATED OFFSET(2) NUMBITS(1) [],
SCR_KEY_VALID OFFSET(3) NUMBITS(1) [],
SCR_KEY_SEED_VALID OFFSET(4) NUMBITS(1) [],
INIT_DONE OFFSET(5) NUMBITS(1) [],
],
pub(crate) EXEC_REGWEN [
EXEC_REGWEN OFFSET(0) NUMBITS(1) [],
],
pub(crate) EXEC [
EN OFFSET(0) NUMBITS(4) [],
],
pub(crate) CTRL_REGWEN [
CTRL_REGWEN OFFSET(0) NUMBITS(1) [],
],
pub(crate) CTRL [
RENEW_SCR_KEY OFFSET(0) NUMBITS(1) [],
INIT OFFSET(1) NUMBITS(1) [],
],
];