Device Tables (DT) for IP rv_dm and top earlgrey. More...
#include "hw/top/dt/dt_api.h"#include <stdint.h>Go to the source code of this file.
Macros | |
| #define | OPENTITAN_RV_DM_HAS_JTAG_FSM 1 |
| List of supported hardware features. | |
| #define | OPENTITAN_RV_DM_HAS_JTAG_DTM 1 |
| #define | OPENTITAN_RV_DM_HAS_DBG_DATA_REGS 1 |
| #define | OPENTITAN_RV_DM_HAS_DBG_DMCONTROL_REG 1 |
| #define | OPENTITAN_RV_DM_HAS_DBG_DMSTATUS_REG 1 |
| #define | OPENTITAN_RV_DM_HAS_DBG_HARTINFO_REG 1 |
| #define | OPENTITAN_RV_DM_HAS_DBG_HALTSUM0_REG 1 |
| #define | OPENTITAN_RV_DM_HAS_DBG_ABSTRACT_COMMAND 1 |
| #define | OPENTITAN_RV_DM_HAS_DBG_PROGBUF 1 |
| #define | OPENTITAN_RV_DM_HAS_DBG_SBA 1 |
| #define | OPENTITAN_RV_DM_HAS_DBG_NDM_RESET 1 |
| #define | OPENTITAN_RV_DM_HAS_DBG_GDB 1 |
Typedefs | |
| typedef enum dt_rv_dm | dt_rv_dm_t |
| List of instances. | |
| typedef enum dt_rv_dm_reg_block | dt_rv_dm_reg_block_t |
| List of register blocks. | |
| typedef enum dt_rv_dm_memory | dt_rv_dm_memory_t |
| List of memories. | |
| typedef enum dt_rv_dm_alert | dt_rv_dm_alert_t |
| List of Alerts. | |
| typedef enum dt_rv_dm_clock | dt_rv_dm_clock_t |
| List of clock ports. | |
| typedef enum dt_rv_dm_reset | dt_rv_dm_reset_t |
| List of reset ports. | |
Enumerations | |
| enum | dt_rv_dm { kDtRvDm = 0 , kDtRvDmFirst = 0 , kDtRvDmCount = 1 } |
| List of instances. More... | |
| enum | dt_rv_dm_reg_block { kDtRvDmRegBlockRegs = 0 , kDtRvDmRegBlockMem = 1 , kDtRvDmRegBlockDbg = 2 , kDtRvDmRegBlockCount = 3 } |
| List of register blocks. More... | |
| enum | dt_rv_dm_memory { kDtRvDmMemoryCount = 0 } |
| List of memories. More... | |
| enum | dt_rv_dm_alert { kDtRvDmAlertFatalFault = 0 , kDtRvDmAlertCount = 1 } |
| List of Alerts. More... | |
| enum | dt_rv_dm_clock { kDtRvDmClockClk = 0 , kDtRvDmClockLc = 1 , kDtRvDmClockCount = 2 } |
| List of clock ports. More... | |
| enum | dt_rv_dm_reset { kDtRvDmResetRst = 0 , kDtRvDmResetLc = 1 , kDtRvDmResetCount = 2 } |
| List of reset ports. More... | |
Functions | |
| dt_rv_dm_t | dt_rv_dm_from_instance_id (dt_instance_id_t inst_id) |
| Get the rv_dm instance from an instance ID. | |
| dt_instance_id_t | dt_rv_dm_instance_id (dt_rv_dm_t dt) |
| Get the instance ID of an instance. | |
| uint32_t | dt_rv_dm_reg_block (dt_rv_dm_t dt, dt_rv_dm_reg_block_t reg_block) |
| Get the register base address of an instance. | |
| uint32_t | dt_rv_dm_memory_base (dt_rv_dm_t dt, dt_rv_dm_memory_t mem) |
| Get the base address of a memory. | |
| uint32_t | dt_rv_dm_memory_size (dt_rv_dm_t dt, dt_rv_dm_memory_t mem) |
| Get the size of a memory. | |
| dt_alert_id_t | dt_rv_dm_alert_to_alert_id (dt_rv_dm_t dt, dt_rv_dm_alert_t alert) |
| Get the alert ID of a rv_dm alert for a given instance. | |
| dt_rv_dm_alert_t | dt_rv_dm_alert_from_alert_id (dt_rv_dm_t dt, dt_alert_id_t alert) |
| Convert a global alert ID to a local rv_dm alert type. | |
| dt_clock_t | dt_rv_dm_clock (dt_rv_dm_t dt, dt_rv_dm_clock_t clk) |
| Get the clock signal connected to a clock port of an instance. | |
| dt_reset_t | dt_rv_dm_reset (dt_rv_dm_t dt, dt_rv_dm_reset_t rst) |
| Get the reset signal connected to a reset port of an instance. | |
Device Tables (DT) for IP rv_dm and top earlgrey.
This file contains the type definitions and global functions of the rv_dm.
Definition in file dt_rv_dm.h.
| #define OPENTITAN_RV_DM_HAS_DBG_ABSTRACT_COMMAND 1 |
Definition at line 101 of file dt_rv_dm.h.
| #define OPENTITAN_RV_DM_HAS_DBG_DATA_REGS 1 |
Definition at line 96 of file dt_rv_dm.h.
| #define OPENTITAN_RV_DM_HAS_DBG_DMCONTROL_REG 1 |
Definition at line 97 of file dt_rv_dm.h.
| #define OPENTITAN_RV_DM_HAS_DBG_DMSTATUS_REG 1 |
Definition at line 98 of file dt_rv_dm.h.
| #define OPENTITAN_RV_DM_HAS_DBG_GDB 1 |
Definition at line 105 of file dt_rv_dm.h.
| #define OPENTITAN_RV_DM_HAS_DBG_HALTSUM0_REG 1 |
Definition at line 100 of file dt_rv_dm.h.
| #define OPENTITAN_RV_DM_HAS_DBG_HARTINFO_REG 1 |
Definition at line 99 of file dt_rv_dm.h.
| #define OPENTITAN_RV_DM_HAS_DBG_NDM_RESET 1 |
Definition at line 104 of file dt_rv_dm.h.
| #define OPENTITAN_RV_DM_HAS_DBG_PROGBUF 1 |
Definition at line 102 of file dt_rv_dm.h.
| #define OPENTITAN_RV_DM_HAS_DBG_SBA 1 |
Definition at line 103 of file dt_rv_dm.h.
| #define OPENTITAN_RV_DM_HAS_JTAG_DTM 1 |
Definition at line 95 of file dt_rv_dm.h.
| #define OPENTITAN_RV_DM_HAS_JTAG_FSM 1 |
List of supported hardware features.
Definition at line 94 of file dt_rv_dm.h.
| typedef enum dt_rv_dm_alert dt_rv_dm_alert_t |
List of Alerts.
Alerts are guaranteed to be numbered consecutively from 0.
| typedef enum dt_rv_dm_clock dt_rv_dm_clock_t |
List of clock ports.
Clock ports are guaranteed to be numbered consecutively from 0.
| typedef enum dt_rv_dm_memory dt_rv_dm_memory_t |
List of memories.
Memories are guaranteed to start at 0 and to be consecutively numbered.
| typedef enum dt_rv_dm_reg_block dt_rv_dm_reg_block_t |
List of register blocks.
Register blocks are guaranteed to start at 0 and to be consecutively numbered.
| typedef enum dt_rv_dm_reset dt_rv_dm_reset_t |
List of reset ports.
Reset ports are guaranteed to be numbered consecutively from 0.
| enum dt_rv_dm |
| enum dt_rv_dm_alert |
List of Alerts.
Alerts are guaranteed to be numbered consecutively from 0.
| Enumerator | |
|---|---|
| kDtRvDmAlertFatalFault | This fatal alert is triggered when a fatal TL-UL bus integrity fault is detected. |
Definition at line 64 of file dt_rv_dm.h.
| enum dt_rv_dm_clock |
List of clock ports.
Clock ports are guaranteed to be numbered consecutively from 0.
| Enumerator | |
|---|---|
| kDtRvDmClockClk | Clock port clk_i. |
| kDtRvDmClockLc | Clock port clk_lc_i. |
Definition at line 74 of file dt_rv_dm.h.
| enum dt_rv_dm_memory |
List of memories.
Memories are guaranteed to start at 0 and to be consecutively numbered.
Definition at line 55 of file dt_rv_dm.h.
| enum dt_rv_dm_reg_block |
List of register blocks.
Register blocks are guaranteed to start at 0 and to be consecutively numbered.
Definition at line 40 of file dt_rv_dm.h.
| enum dt_rv_dm_reset |
List of reset ports.
Reset ports are guaranteed to be numbered consecutively from 0.
| Enumerator | |
|---|---|
| kDtRvDmResetRst | Reset port rst_ni. |
| kDtRvDmResetLc | Reset port rst_lc_ni. |
Definition at line 85 of file dt_rv_dm.h.
| dt_rv_dm_alert_t dt_rv_dm_alert_from_alert_id | ( | dt_rv_dm_t | dt, |
| dt_alert_id_t | alert ) |
Convert a global alert ID to a local rv_dm alert type.
| dt | Instance of rv_dm. |
| alert | A global alert ID that belongs to this instance. |
kDtRvDmAlertCount.Note: This function assumes that the global alert ID belongs to the instance of rv_dm passed in parameter. In other words, it must be the case that dt_rv_dm_instance_id(dt) == dt_alert_id_to_instance_id(alert). Otherwise, this function will return kDtRvDmAlertCount.
Definition at line 108 of file dt_rv_dm.c.
| dt_alert_id_t dt_rv_dm_alert_to_alert_id | ( | dt_rv_dm_t | dt, |
| dt_rv_dm_alert_t | alert ) |
Get the alert ID of a rv_dm alert for a given instance.
Note: This function only makes sense if the instance is connected to the Alert Handler. For any instances where the instance is not connected, the return value is unspecified.
| dt | Instance of rv_dm. |
| alert | A rv_dm alert. |
Definition at line 102 of file dt_rv_dm.c.
| dt_clock_t dt_rv_dm_clock | ( | dt_rv_dm_t | dt, |
| dt_rv_dm_clock_t | clk ) |
Get the clock signal connected to a clock port of an instance.
| dt | Instance of rv_dm. |
| clk | Clock port. |
Definition at line 120 of file dt_rv_dm.c.
| dt_rv_dm_t dt_rv_dm_from_instance_id | ( | dt_instance_id_t | inst_id | ) |
Get the rv_dm 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 rv_dm, otherwise the returned value is unspecified.
Definition at line 68 of file dt_rv_dm.c.
| dt_instance_id_t dt_rv_dm_instance_id | ( | dt_rv_dm_t | dt | ) |
Get the instance ID of an instance.
| dt | Instance of rv_dm. |
Definition at line 75 of file dt_rv_dm.c.
| uint32_t dt_rv_dm_memory_base | ( | dt_rv_dm_t | dt, |
| dt_rv_dm_memory_t | mem ) |
Get the base address of a memory.
| dt | Instance of rv_dm. |
| mem | The memory requested. |
Definition at line 87 of file dt_rv_dm.c.
| uint32_t dt_rv_dm_memory_size | ( | dt_rv_dm_t | dt, |
| dt_rv_dm_memory_t | mem ) |
Get the size of a memory.
| dt | Instance of rv_dm. |
| mem | The memory requested. |
Definition at line 94 of file dt_rv_dm.c.
| uint32_t dt_rv_dm_reg_block | ( | dt_rv_dm_t | dt, |
| dt_rv_dm_reg_block_t | reg_block ) |
Get the register base address of an instance.
| dt | Instance of rv_dm. |
| reg_block | The register block requested. |
Definition at line 80 of file dt_rv_dm.c.
| dt_reset_t dt_rv_dm_reset | ( | dt_rv_dm_t | dt, |
| dt_rv_dm_reset_t | rst ) |
Get the reset signal connected to a reset port of an instance.
| dt | Instance of rv_dm. |
| rst | Reset port. |
Definition at line 127 of file dt_rv_dm.c.