Device Tables (DT) for IP sram_ctrl and top englishbreakfast. More...
Go to the source code of this file.
Macros | |
#define | OPENTITAN_SRAM_CTRL_HAS_INTEGRITY 1 |
List of supported hardware features. | |
#define | OPENTITAN_SRAM_CTRL_HAS_SCRAMBLED 1 |
#define | OPENTITAN_SRAM_CTRL_HAS_LOCK_ON_ERROR 1 |
#define | OPENTITAN_SRAM_CTRL_HAS_MEMSET 1 |
#define | OPENTITAN_SRAM_CTRL_HAS_FETCH_ALLOW 1 |
#define | OPENTITAN_SRAM_CTRL_HAS_SUBWORD_ACCESS 1 |
#define | OPENTITAN_SRAM_CTRL_HAS_REGWEN 1 |
Typedefs | |
typedef enum dt_sram_ctrl | dt_sram_ctrl_t |
List of instances. | |
typedef enum dt_sram_ctrl_reg_block | dt_sram_ctrl_reg_block_t |
List of register blocks. | |
typedef enum dt_sram_ctrl_clock | dt_sram_ctrl_clock_t |
List of clock ports. | |
typedef enum dt_sram_ctrl_reset | dt_sram_ctrl_reset_t |
List of reset ports. | |
Enumerations | |
enum | dt_sram_ctrl { kDtSramCtrlMain = 0 , kDtSramCtrlFirst = 0 , kDtSramCtrlCount = 1 } |
List of instances. More... | |
enum | dt_sram_ctrl_reg_block { kDtSramCtrlRegBlockRegs = 0 , kDtSramCtrlRegBlockRam = 1 , kDtSramCtrlRegBlockCount = 2 } |
List of register blocks. More... | |
enum | dt_sram_ctrl_clock { kDtSramCtrlClockClk = 0 , kDtSramCtrlClockOtp = 1 , kDtSramCtrlClockCount = 2 } |
List of clock ports. More... | |
enum | dt_sram_ctrl_reset { kDtSramCtrlResetRst = 0 , kDtSramCtrlResetOtp = 1 , kDtSramCtrlResetCount = 2 } |
List of reset ports. More... | |
Functions | |
dt_sram_ctrl_t | dt_sram_ctrl_from_instance_id (dt_instance_id_t inst_id) |
Get the sram_ctrl instance from an instance ID. | |
dt_instance_id_t | dt_sram_ctrl_instance_id (dt_sram_ctrl_t dt) |
Get the instance ID of an instance. | |
uint32_t | dt_sram_ctrl_reg_block (dt_sram_ctrl_t dt, dt_sram_ctrl_reg_block_t reg_block) |
Get the register base address of an instance. | |
dt_clock_t | dt_sram_ctrl_clock (dt_sram_ctrl_t dt, dt_sram_ctrl_clock_t clk) |
Get the clock signal connected to a clock port of an instance. | |
dt_reset_t | dt_sram_ctrl_reset (dt_sram_ctrl_t dt, dt_sram_ctrl_reset_t rst) |
Get the reset signal connected to a reset port of an instance. | |
Device Tables (DT) for IP sram_ctrl and top englishbreakfast.
This file contains the type definitions and global functions of the sram_ctrl.
Definition in file dt_sram_ctrl.h.
#define OPENTITAN_SRAM_CTRL_HAS_FETCH_ALLOW 1 |
Definition at line 72 of file dt_sram_ctrl.h.
#define OPENTITAN_SRAM_CTRL_HAS_INTEGRITY 1 |
List of supported hardware features.
Definition at line 68 of file dt_sram_ctrl.h.
#define OPENTITAN_SRAM_CTRL_HAS_LOCK_ON_ERROR 1 |
Definition at line 70 of file dt_sram_ctrl.h.
#define OPENTITAN_SRAM_CTRL_HAS_MEMSET 1 |
Definition at line 71 of file dt_sram_ctrl.h.
#define OPENTITAN_SRAM_CTRL_HAS_REGWEN 1 |
Definition at line 74 of file dt_sram_ctrl.h.
#define OPENTITAN_SRAM_CTRL_HAS_SCRAMBLED 1 |
Definition at line 69 of file dt_sram_ctrl.h.
#define OPENTITAN_SRAM_CTRL_HAS_SUBWORD_ACCESS 1 |
Definition at line 73 of file dt_sram_ctrl.h.
typedef enum dt_sram_ctrl_clock dt_sram_ctrl_clock_t |
List of clock ports.
Clock ports are guaranteed to be numbered consecutively from 0.
typedef enum dt_sram_ctrl_reg_block dt_sram_ctrl_reg_block_t |
List of register blocks.
Register blocks are guaranteed to start at 0 and to be consecutively numbered.
typedef enum dt_sram_ctrl_reset dt_sram_ctrl_reset_t |
List of reset ports.
Reset ports are guaranteed to be numbered consecutively from 0.
enum dt_sram_ctrl |
List of instances.
Enumerator | |
---|---|
kDtSramCtrlMain | sram_ctrl_main |
Definition at line 23 of file dt_sram_ctrl.h.
enum dt_sram_ctrl_clock |
List of clock ports.
Clock ports are guaranteed to be numbered consecutively from 0.
Enumerator | |
---|---|
kDtSramCtrlClockClk | Clock port clk_i. |
kDtSramCtrlClockOtp | Clock port clk_otp_i. |
Definition at line 48 of file dt_sram_ctrl.h.
List of register blocks.
Register blocks are guaranteed to start at 0 and to be consecutively numbered.
Definition at line 34 of file dt_sram_ctrl.h.
enum dt_sram_ctrl_reset |
List of reset ports.
Reset ports are guaranteed to be numbered consecutively from 0.
Enumerator | |
---|---|
kDtSramCtrlResetRst | Reset port rst_ni. |
kDtSramCtrlResetOtp | Reset port rst_otp_ni. |
Definition at line 59 of file dt_sram_ctrl.h.
Get the clock signal connected to a clock port of an instance.
dt | Instance of sram_ctrl. |
clk | Clock port. |
Definition at line 115 of file dt_sram_ctrl.c.
dt_sram_ctrl_t dt_sram_ctrl_from_instance_id | ( | dt_instance_id_t | inst_id | ) |
Get the sram_ctrl instance from an instance ID.
For example, dt_uart_from_instance_id(kDtInstanceIdUart3) == kDtUart3
.
inst_id | Instance ID. |
Note: This function only makes sense if the instance ID has device type sram_ctrl, otherwise the returned value is unspecified.
Definition at line 77 of file dt_sram_ctrl.c.
dt_instance_id_t dt_sram_ctrl_instance_id | ( | dt_sram_ctrl_t | dt | ) |
Get the instance ID of an instance.
dt | Instance of sram_ctrl. |
Definition at line 84 of file dt_sram_ctrl.c.
uint32_t dt_sram_ctrl_reg_block | ( | dt_sram_ctrl_t | dt, |
dt_sram_ctrl_reg_block_t | reg_block ) |
Get the register base address of an instance.
dt | Instance of sram_ctrl. |
reg_block | The register block requested. |
Definition at line 89 of file dt_sram_ctrl.c.
Get the reset signal connected to a reset port of an instance.
dt | Instance of sram_ctrl. |
rst | Reset port. |
Definition at line 122 of file dt_sram_ctrl.c.