Register Define and Type Definitions
- group NMSIS_Core_Registers
Type definitions and defines for core registers.
Defines
-
__RISCV_XLEN 32
Refer to the width of an integer register in bits(either 32 or 64)
Typedefs
-
typedef uint32_t rv_csr_t
Type of Control and Status Register(CSR), depends on the XLEN defined in RISC-V.
-
__RISCV_XLEN 32
Core
- group NMSIS_Core_Base_Registers
Type definitions and defines for base core registers.
Typedefs
-
typedef CSR_MMISCCTRL_Type CSR_MMISCCTL_Type
-
union CSR_MISA_Type
- #include <core_feature_base.h>
Union type to access MISA CSR register.
Public Members
-
struct CSR_MISA_Type::[anonymous] b
Structure used for bit access.
-
struct CSR_MISA_Type::[anonymous] b
-
union CSR_MSTATUS_Type
- #include <core_feature_base.h>
Union type to access MSTATUS CSR register.
Public Members
-
struct CSR_MSTATUS_Type::[anonymous] b
Structure used for bit access.
-
struct CSR_MSTATUS_Type::[anonymous] b
-
union CSR_MTVEC_Type
- #include <core_feature_base.h>
Union type to access MTVEC CSR register.
-
union CSR_MCAUSE_Type
- #include <core_feature_base.h>
Union type to access MCAUSE CSR register.
Public Members
-
struct CSR_MCAUSE_Type::[anonymous] b
Structure used for bit access.
-
struct CSR_MCAUSE_Type::[anonymous] b
-
union CSR_MCOUNTINHIBIT_Type
- #include <core_feature_base.h>
Union type to access MCOUNTINHIBIT CSR register.
Public Members
-
struct CSR_MCOUNTINHIBIT_Type::[anonymous] b
Structure used for bit access.
-
struct CSR_MCOUNTINHIBIT_Type::[anonymous] b
-
union CSR_MSUBM_Type
- #include <core_feature_base.h>
Union type to access MSUBM CSR register.
-
union CSR_MDCAUSE_Type
- #include <core_feature_base.h>
Union type to access MDCAUSE CSR register.
-
union CSR_MMISCCTRL_Type
- #include <core_feature_base.h>
Union type to access MMISC_CTRL CSR register.
Public Members
-
struct CSR_MMISCCTRL_Type::[anonymous] b
Structure used for bit access.
-
struct CSR_MMISCCTRL_Type::[anonymous] b
-
union CSR_MCACHECTL_Type
- #include <core_feature_base.h>
Union type to access MCACHE_CTL CSR register.
Public Members
-
struct CSR_MCACHECTL_Type::[anonymous] b
Structure used for bit access.
-
struct CSR_MCACHECTL_Type::[anonymous] b
-
union CSR_MSAVESTATUS_Type
- #include <core_feature_base.h>
Union type to access MSAVESTATUS CSR register.
Public Members
-
struct CSR_MSAVESTATUS_Type::[anonymous] b
Structure used for bit access.
-
struct CSR_MSAVESTATUS_Type::[anonymous] b
-
union CSR_MILMCTL_Type
- #include <core_feature_base.h>
Union type to access MILM_CTL CSR register.
Public Members
-
struct CSR_MILMCTL_Type::[anonymous] b
Structure used for bit access.
-
struct CSR_MILMCTL_Type::[anonymous] b
-
union CSR_MDLMCTL_Type
- #include <core_feature_base.h>
Union type to access MDLM_CTL CSR register.
Public Members
-
struct CSR_MDLMCTL_Type::[anonymous] b
Structure used for bit access.
-
struct CSR_MDLMCTL_Type::[anonymous] b
-
union CSR_MCFGINFO_Type
- #include <core_feature_base.h>
Union type to access MCFG_INFO CSR register.
Public Members
-
struct CSR_MCFGINFO_Type::[anonymous] b
Structure used for bit access.
-
struct CSR_MCFGINFO_Type::[anonymous] b
-
union CSR_MICFGINFO_Type
- #include <core_feature_base.h>
Union type to access MICFG_INFO CSR register.
Public Members
-
struct CSR_MICFGINFO_Type::[anonymous] b
Structure used for bit access.
-
struct CSR_MICFGINFO_Type::[anonymous] b
-
union CSR_MDCFGINFO_Type
- #include <core_feature_base.h>
Union type to access MDCFG_INFO CSR register.
Public Members
-
struct CSR_MDCFGINFO_Type::[anonymous] b
Structure used for bit access.
-
struct CSR_MDCFGINFO_Type::[anonymous] b
-
union CSR_MPPICFGINFO_Type
- #include <core_feature_base.h>
Union type to access MPPICFG_INFO CSR register.
-
union CSR_MFIOCFGINFO_Type
- #include <core_feature_base.h>
Union type to access MFIOCFG_INFO CSR register.
-
union CSR_MECCLOCK_Type
- #include <core_feature_base.h>
Union type to access MECC_LOCK CSR register.
-
union CSR_MECCCODE_Type
- #include <core_feature_base.h>
Union type to access MECC_CODE CSR register.
Public Members
-
struct CSR_MECCCODE_Type::[anonymous] b
Structure used for bit access.
-
struct CSR_MECCCODE_Type::[anonymous] b
-
typedef CSR_MMISCCTRL_Type CSR_MMISCCTL_Type
ECLIC
- group NMSIS_Core_ECLIC_Registers
Type definitions and defines for eclic registers.
Defines
-
CLIC_CLICCFG_NLBIT_Pos 1U
CLIC CLICCFG: NLBIT Position.
-
CLIC_CLICCFG_NLBIT_Msk (0xFUL << CLIC_CLICCFG_NLBIT_Pos)
CLIC CLICCFG: NLBIT Mask.
-
CLIC_CLICINFO_CTLBIT_Pos 21U
CLIC INTINFO: __ECLIC_GetInfoCtlbits() Position.
-
CLIC_CLICINFO_CTLBIT_Msk (0xFUL << CLIC_CLICINFO_CTLBIT_Pos)
CLIC INTINFO: __ECLIC_GetInfoCtlbits() Mask.
-
CLIC_CLICINFO_VER_Pos 13U
CLIC CLICINFO: VERSION Position.
-
CLIC_CLICINFO_VER_Msk (0xFFUL << CLIC_CLICCFG_NLBIT_Pos)
CLIC CLICINFO: VERSION Mask.
-
CLIC_CLICINFO_NUM_Pos 0U
CLIC CLICINFO: NUM Position.
-
CLIC_CLICINFO_NUM_Msk (0xFFFUL << CLIC_CLICINFO_NUM_Pos)
CLIC CLICINFO: NUM Mask.
-
CLIC_INTIP_IP_Pos 0U
CLIC INTIP: IP Position.
-
CLIC_INTIP_IP_Msk (0x1UL << CLIC_INTIP_IP_Pos)
CLIC INTIP: IP Mask.
-
CLIC_INTIE_IE_Pos 0U
CLIC INTIE: IE Position.
-
CLIC_INTIE_IE_Msk (0x1UL << CLIC_INTIE_IE_Pos)
CLIC INTIE: IE Mask.
-
CLIC_INTATTR_MODE_Pos 6U
CLIC INTATTA: Mode Position.
-
CLIC_INTATTR_MODE_Msk (0x3U << CLIC_INTATTR_MODE_Pos)
CLIC INTATTA: Mode Mask.
-
CLIC_INTATTR_TRIG_Pos 1U
CLIC INTATTR: TRIG Position.
-
CLIC_INTATTR_TRIG_Msk (0x3UL << CLIC_INTATTR_TRIG_Pos)
CLIC INTATTR: TRIG Mask.
-
CLIC_INTATTR_SHV_Pos 0U
CLIC INTATTR: SHV Position.
-
CLIC_INTATTR_SHV_Msk (0x1UL << CLIC_INTATTR_SHV_Pos)
CLIC INTATTR: SHV Mask.
-
ECLIC_MAX_NLBITS 8U
Max nlbit of the CLICINTCTLBITS.
-
ECLIC_MODE_MTVEC_Msk 3U
ECLIC Mode mask for MTVT CSR Register.
-
ECLIC_NON_VECTOR_INTERRUPT 0x0
Non-Vector Interrupt Mode of ECLIC.
-
ECLIC_VECTOR_INTERRUPT 0x1
Vector Interrupt Mode of ECLIC.
-
ECLIC_BASE __ECLIC_BASEADDR
ECLIC Base Address.
-
ECLIC ((CLIC_Type *) ECLIC_BASE)
CLIC configuration struct.
Enums
-
enum ECLIC_TRIGGER
ECLIC Trigger Enum for different Trigger Type.
Values:
-
enumerator ECLIC_LEVEL_TRIGGER
Level Triggerred, trig[0] = 0.
-
enumerator ECLIC_POSTIVE_EDGE_TRIGGER
Postive/Rising Edge Triggered, trig[0] = 1, trig[1] = 0.
-
enumerator ECLIC_NEGTIVE_EDGE_TRIGGER
Negtive/Falling Edge Triggered, trig[0] = 1, trig[1] = 1.
-
enumerator ECLIC_MAX_TRIGGER
MAX Supported Trigger Mode.
-
enumerator ECLIC_LEVEL_TRIGGER
-
union CLICCFG_Type
- #include <core_feature_eclic.h>
Union type to access CLICFG configure register.
Public Members
- __IM uint8_t _reserved0
- __IOM uint8_t nlbits
bit: 1..4 specified the bit-width of level and priority in the register clicintctl[i]
- __IM uint8_t nmbits
bit: 5..6 ties to 1 if supervisor-level interrupt supported, or else it’s reserved
- __IM uint8_t _reserved1
-
struct CLICCFG_Type::[anonymous] b
Structure used for bit access.
-
uint8_t w
Type used for byte access.
-
union CLICINFO_Type
- #include <core_feature_eclic.h>
Union type to access CLICINFO information register.
Public Members
- __IM uint32_t numint
bit: 0..12 number of maximum interrupt inputs supported
- __IM uint32_t version
bit: 13..20 20:17 for architecture version,16:13 for implementation version
- __IM uint32_t intctlbits
bit: 21..24 specifies how many hardware bits are actually implemented in the clicintctl registers
- __IM uint32_t _reserved0
bit: 25..31 Reserved
-
struct CLICINFO_Type::[anonymous] b
Structure used for bit access.
- __IM uint32_t w
Type used for word access.
-
struct CLIC_CTRL_Type
- #include <core_feature_eclic.h>
Access to the machine mode register structure of INTIP, INTIE, INTATTR, INTCTL.
-
struct CLIC_Type
- #include <core_feature_eclic.h>
Access to the structure of ECLIC Memory Map, which is compatible with TEE.
-
CLIC_CLICCFG_NLBIT_Pos 1U
SysTimer
- group NMSIS_Core_SysTimer_Registers
Type definitions and defines for system timer registers.
Defines
-
SysTimer_MTIMECTL_TIMESTOP_Pos 0U
SysTick Timer MTIMECTL: TIMESTOP bit Position.
-
SysTimer_MTIMECTL_TIMESTOP_Msk (1UL << SysTimer_MTIMECTL_TIMESTOP_Pos)
SysTick Timer MTIMECTL: TIMESTOP Mask.
-
SysTimer_MTIMECTL_CMPCLREN_Pos 1U
SysTick Timer MTIMECTL: CMPCLREN bit Position.
-
SysTimer_MTIMECTL_CMPCLREN_Msk (1UL << SysTimer_MTIMECTL_CMPCLREN_Pos)
SysTick Timer MTIMECTL: CMPCLREN Mask.
-
SysTimer_MTIMECTL_CLKSRC_Pos 2U
SysTick Timer MTIMECTL: CLKSRC bit Position.
-
SysTimer_MTIMECTL_CLKSRC_Msk (1UL << SysTimer_MTIMECTL_CLKSRC_Pos)
SysTick Timer MTIMECTL: CLKSRC Mask.
-
SysTimer_MSIP_MSIP_Pos 0U
SysTick Timer MSIP: MSIP bit Position.
-
SysTimer_MSIP_MSIP_Msk (1UL << SysTimer_MSIP_MSIP_Pos)
SysTick Timer MSIP: MSIP Mask.
-
SysTimer_MTIMER_Msk (0xFFFFFFFFFFFFFFFFULL)
SysTick Timer MTIMER value Mask.
-
SysTimer_MTIMERCMP_Msk (0xFFFFFFFFFFFFFFFFULL)
SysTick Timer MTIMERCMP value Mask.
-
SysTimer_MTIMECTL_Msk (0xFFFFFFFFUL)
SysTick Timer MTIMECTL/MSTOP value Mask.
-
SysTimer_MSIP_Msk (0xFFFFFFFFUL)
SysTick Timer MSIP value Mask.
-
SysTimer_MSFTRST_Msk (0xFFFFFFFFUL)
SysTick Timer MSFTRST value Mask.
-
SysTimer_MSFRST_KEY (0x80000A5FUL)
SysTick Timer Software Reset Request Key.
-
SysTimer_CLINT_MSIP_OFS (0x1000UL)
Software interrupt register offset of clint mode in SysTick Timer.
-
SysTimer_CLINT_MTIMECMP_OFS (0x5000UL)
MTIMECMP register offset of clint mode in SysTick Timer.
-
SysTimer_CLINT_MTIME_OFS (0xCFF8UL)
MTIME register offset of clint mode in SysTick Timer.
-
SysTimer_BASE __SYSTIMER_BASEADDR
SysTick Base Address.
-
SysTimer ((SysTimer_Type *) SysTimer_BASE)
SysTick configuration struct.
-
SysTimer_CLINT_MSIP_BASE(hartid) (unsigned long)((SysTimer_BASE) + (SysTimer_CLINT_MSIP_OFS) + ((hartid) << 2))
-
SysTimer_CLINT_MTIMECMP_BASE(hartid) (unsigned long)((SysTimer_BASE) + (SysTimer_CLINT_MTIMECMP_OFS) + ((hartid) << 3))
-
SysTimer_CLINT_MTIME_BASE (unsigned long)((SysTimer_BASE) + (SysTimer_CLINT_MTIME_OFS))
-
struct SysTimer_Type
- #include <core_feature_timer.h>
Structure type to access the System Timer (SysTimer).
Structure definition to access the system timer(SysTimer).
Remark
MSFTRST register is introduced in Nuclei N Core version 1.3(__NUCLEI_N_REV >= 0x0103)
MSTOP register is renamed to MTIMECTL register in Nuclei N Core version 1.4(__NUCLEI_N_REV >= 0x0104)
CMPCLREN and CLKSRC bit in MTIMECTL register is introduced in Nuclei N Core version 1.4(__NUCLEI_N_REV >= 0x0104)
-
SysTimer_MTIMECTL_TIMESTOP_Pos 0U