Software APIs
dt_soc_proxy.h File Reference

Device Tables (DT) for IP soc_proxy and top darjeeling. More...

#include "dt_api.h"
#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef enum dt_soc_proxy dt_soc_proxy_t
 List of instances.
 
typedef enum dt_soc_proxy_reg_block dt_soc_proxy_reg_block_t
 List of register blocks.
 
typedef enum dt_soc_proxy_irq dt_soc_proxy_irq_t
 List of IRQs.
 
typedef enum dt_soc_proxy_alert dt_soc_proxy_alert_t
 List of Alerts.
 
typedef enum dt_soc_proxy_clock dt_soc_proxy_clock_t
 List of clock ports.
 
typedef enum dt_soc_proxy_reset_req dt_soc_proxy_reset_req_t
 List of reset requests.
 
typedef enum dt_soc_proxy_reset dt_soc_proxy_reset_t
 List of reset ports.
 
typedef enum dt_soc_proxy_periph_io dt_soc_proxy_periph_io_t
 List of peripheral I/O.
 
typedef enum dt_soc_proxy_wakeup dt_soc_proxy_wakeup_t
 List of wakeups.
 

Enumerations

enum  dt_soc_proxy {
  kDtSocProxy = 0 ,
  kDtSocProxyFirst = 0 ,
  kDtSocProxyCount = 1
}
 List of instances. More...
 
enum  dt_soc_proxy_reg_block {
  kDtSocProxyRegBlockCore = 0 ,
  kDtSocProxyRegBlockCtn = 1 ,
  kDtSocProxyRegBlockCount = 2
}
 List of register blocks. More...
 
enum  dt_soc_proxy_irq {
  kDtSocProxyIrqExternal0 = 0 ,
  kDtSocProxyIrqExternal1 = 1 ,
  kDtSocProxyIrqExternal2 = 2 ,
  kDtSocProxyIrqExternal3 = 3 ,
  kDtSocProxyIrqExternal4 = 4 ,
  kDtSocProxyIrqExternal5 = 5 ,
  kDtSocProxyIrqExternal6 = 6 ,
  kDtSocProxyIrqExternal7 = 7 ,
  kDtSocProxyIrqExternal8 = 8 ,
  kDtSocProxyIrqExternal9 = 9 ,
  kDtSocProxyIrqExternal10 = 10 ,
  kDtSocProxyIrqExternal11 = 11 ,
  kDtSocProxyIrqExternal12 = 12 ,
  kDtSocProxyIrqExternal13 = 13 ,
  kDtSocProxyIrqExternal14 = 14 ,
  kDtSocProxyIrqExternal15 = 15 ,
  kDtSocProxyIrqExternal16 = 16 ,
  kDtSocProxyIrqExternal17 = 17 ,
  kDtSocProxyIrqExternal18 = 18 ,
  kDtSocProxyIrqExternal19 = 19 ,
  kDtSocProxyIrqExternal20 = 20 ,
  kDtSocProxyIrqExternal21 = 21 ,
  kDtSocProxyIrqExternal22 = 22 ,
  kDtSocProxyIrqExternal23 = 23 ,
  kDtSocProxyIrqExternal24 = 24 ,
  kDtSocProxyIrqExternal25 = 25 ,
  kDtSocProxyIrqExternal26 = 26 ,
  kDtSocProxyIrqExternal27 = 27 ,
  kDtSocProxyIrqExternal28 = 28 ,
  kDtSocProxyIrqExternal29 = 29 ,
  kDtSocProxyIrqExternal30 = 30 ,
  kDtSocProxyIrqExternal31 = 31 ,
  kDtSocProxyIrqCount = 32
}
 List of IRQs. More...
 
enum  dt_soc_proxy_alert {
  kDtSocProxyAlertFatalAlertIntg = 0 ,
  kDtSocProxyAlertFatalAlertExternal0 = 1 ,
  kDtSocProxyAlertFatalAlertExternal1 = 2 ,
  kDtSocProxyAlertFatalAlertExternal2 = 3 ,
  kDtSocProxyAlertFatalAlertExternal3 = 4 ,
  kDtSocProxyAlertFatalAlertExternal4 = 5 ,
  kDtSocProxyAlertFatalAlertExternal5 = 6 ,
  kDtSocProxyAlertFatalAlertExternal6 = 7 ,
  kDtSocProxyAlertFatalAlertExternal7 = 8 ,
  kDtSocProxyAlertFatalAlertExternal8 = 9 ,
  kDtSocProxyAlertFatalAlertExternal9 = 10 ,
  kDtSocProxyAlertFatalAlertExternal10 = 11 ,
  kDtSocProxyAlertFatalAlertExternal11 = 12 ,
  kDtSocProxyAlertFatalAlertExternal12 = 13 ,
  kDtSocProxyAlertFatalAlertExternal13 = 14 ,
  kDtSocProxyAlertFatalAlertExternal14 = 15 ,
  kDtSocProxyAlertFatalAlertExternal15 = 16 ,
  kDtSocProxyAlertFatalAlertExternal16 = 17 ,
  kDtSocProxyAlertFatalAlertExternal17 = 18 ,
  kDtSocProxyAlertFatalAlertExternal18 = 19 ,
  kDtSocProxyAlertFatalAlertExternal19 = 20 ,
  kDtSocProxyAlertFatalAlertExternal20 = 21 ,
  kDtSocProxyAlertFatalAlertExternal21 = 22 ,
  kDtSocProxyAlertFatalAlertExternal22 = 23 ,
  kDtSocProxyAlertFatalAlertExternal23 = 24 ,
  kDtSocProxyAlertRecovAlertExternal0 = 25 ,
  kDtSocProxyAlertRecovAlertExternal1 = 26 ,
  kDtSocProxyAlertRecovAlertExternal2 = 27 ,
  kDtSocProxyAlertRecovAlertExternal3 = 28 ,
  kDtSocProxyAlertCount = 29
}
 List of Alerts. More...
 
enum  dt_soc_proxy_clock {
  kDtSocProxyClockClk = 0 ,
  kDtSocProxyClockAon = 1 ,
  kDtSocProxyClockCount = 2
}
 List of clock ports. More...
 
enum  dt_soc_proxy_reset_req {
  kDtSocProxyResetReqExternal = 0 ,
  kDtSocProxyResetReqCount = 1
}
 List of reset requests. More...
 
enum  dt_soc_proxy_reset {
  kDtSocProxyResetRst = 0 ,
  kDtSocProxyResetPor = 1 ,
  kDtSocProxyResetCount = 2
}
 List of reset ports. More...
 
enum  dt_soc_proxy_periph_io {
  kDtSocProxyPeriphIoSocGpi0 = 0 ,
  kDtSocProxyPeriphIoSocGpi1 = 1 ,
  kDtSocProxyPeriphIoSocGpi2 = 2 ,
  kDtSocProxyPeriphIoSocGpi3 = 3 ,
  kDtSocProxyPeriphIoSocGpi4 = 4 ,
  kDtSocProxyPeriphIoSocGpi5 = 5 ,
  kDtSocProxyPeriphIoSocGpi6 = 6 ,
  kDtSocProxyPeriphIoSocGpi7 = 7 ,
  kDtSocProxyPeriphIoSocGpi8 = 8 ,
  kDtSocProxyPeriphIoSocGpi9 = 9 ,
  kDtSocProxyPeriphIoSocGpi10 = 10 ,
  kDtSocProxyPeriphIoSocGpi11 = 11 ,
  kDtSocProxyPeriphIoSocGpi12 = 12 ,
  kDtSocProxyPeriphIoSocGpi13 = 13 ,
  kDtSocProxyPeriphIoSocGpi14 = 14 ,
  kDtSocProxyPeriphIoSocGpi15 = 15 ,
  kDtSocProxyPeriphIoSocGpo0 = 16 ,
  kDtSocProxyPeriphIoSocGpo1 = 17 ,
  kDtSocProxyPeriphIoSocGpo2 = 18 ,
  kDtSocProxyPeriphIoSocGpo3 = 19 ,
  kDtSocProxyPeriphIoSocGpo4 = 20 ,
  kDtSocProxyPeriphIoSocGpo5 = 21 ,
  kDtSocProxyPeriphIoSocGpo6 = 22 ,
  kDtSocProxyPeriphIoSocGpo7 = 23 ,
  kDtSocProxyPeriphIoSocGpo8 = 24 ,
  kDtSocProxyPeriphIoSocGpo9 = 25 ,
  kDtSocProxyPeriphIoSocGpo10 = 26 ,
  kDtSocProxyPeriphIoSocGpo11 = 27 ,
  kDtSocProxyPeriphIoSocGpo12 = 28 ,
  kDtSocProxyPeriphIoSocGpo13 = 29 ,
  kDtSocProxyPeriphIoSocGpo14 = 30 ,
  kDtSocProxyPeriphIoSocGpo15 = 31 ,
  kDtSocProxyPeriphIoCount = 32
}
 List of peripheral I/O. More...
 
enum  dt_soc_proxy_wakeup {
  kDtSocProxyWakeupWkupInternalReq = 0 ,
  kDtSocProxyWakeupWkupExternalReq = 1 ,
  kDtSocProxyWakeupCount = 2
}
 List of wakeups. More...
 

Functions

dt_soc_proxy_t dt_soc_proxy_from_instance_id (dt_instance_id_t inst_id)
 Get the soc_proxy instance from an instance ID.
 
dt_instance_id_t dt_soc_proxy_instance_id (dt_soc_proxy_t dt)
 Get the instance ID of an instance.
 
uint32_t dt_soc_proxy_reg_block (dt_soc_proxy_t dt, dt_soc_proxy_reg_block_t reg_block)
 Get the register base address of an instance.
 
dt_plic_irq_id_t dt_soc_proxy_irq_to_plic_id (dt_soc_proxy_t dt, dt_soc_proxy_irq_t irq)
 Get the PLIC ID of a soc_proxy IRQ for a given instance.
 
dt_soc_proxy_irq_t dt_soc_proxy_irq_from_plic_id (dt_soc_proxy_t dt, dt_plic_irq_id_t irq)
 Convert a global IRQ ID to a local soc_proxy IRQ type.
 
dt_alert_id_t dt_soc_proxy_alert_to_alert_id (dt_soc_proxy_t dt, dt_soc_proxy_alert_t alert)
 Get the alert ID of a soc_proxy alert for a given instance.
 
dt_soc_proxy_alert_t dt_soc_proxy_alert_from_alert_id (dt_soc_proxy_t dt, dt_alert_id_t alert)
 Convert a global alert ID to a local soc_proxy alert type.
 
dt_periph_io_t dt_soc_proxy_periph_io (dt_soc_proxy_t dt, dt_soc_proxy_periph_io_t sig)
 Get the peripheral I/O description of an instance.
 
dt_clock_t dt_soc_proxy_clock (dt_soc_proxy_t dt, dt_soc_proxy_clock_t clk)
 Get the clock signal connected to a clock port of an instance.
 
dt_reset_t dt_soc_proxy_reset (dt_soc_proxy_t dt, dt_soc_proxy_reset_t rst)
 Get the reset signal connected to a reset port of an instance.
 

Detailed Description

Device Tables (DT) for IP soc_proxy and top darjeeling.

This file contains the type definitions and global functions of the soc_proxy.

Definition in file dt_soc_proxy.h.

Typedef Documentation

◆ dt_soc_proxy_alert_t

List of Alerts.

Alerts are guaranteed to be numbered consecutively from 0.

◆ dt_soc_proxy_clock_t

List of clock ports.

Clock ports are guaranteed to be numbered consecutively from 0.

◆ dt_soc_proxy_irq_t

List of IRQs.

IRQs are guaranteed to be numbered consecutively from 0.

◆ dt_soc_proxy_periph_io_t

List of peripheral I/O.

Peripheral I/O are guaranteed to be numbered consecutively from 0.

◆ dt_soc_proxy_reg_block_t

List of register blocks.

Register blocks are guaranteed to start at 0 and to be consecutively numbered.

◆ dt_soc_proxy_reset_req_t

List of reset requests.

Reset requests are guaranteed to be numbered consecutively from 0.

◆ dt_soc_proxy_reset_t

List of reset ports.

Reset ports are guaranteed to be numbered consecutively from 0.

◆ dt_soc_proxy_wakeup_t

List of wakeups.

Wakeups are guaranteed to be numbered consecutively from 0.

Enumeration Type Documentation

◆ dt_soc_proxy

List of instances.

Enumerator
kDtSocProxy 

soc_proxy

Definition at line 23 of file dt_soc_proxy.h.

◆ dt_soc_proxy_alert

List of Alerts.

Alerts are guaranteed to be numbered consecutively from 0.

Enumerator
kDtSocProxyAlertFatalAlertIntg 

Fatal bus integrity alert.

kDtSocProxyAlertFatalAlertExternal0 

Fatal external alert channel 0.

kDtSocProxyAlertFatalAlertExternal1 

Fatal external alert channel 1.

kDtSocProxyAlertFatalAlertExternal2 

Fatal external alert channel 2.

kDtSocProxyAlertFatalAlertExternal3 

Fatal external alert channel 3.

kDtSocProxyAlertFatalAlertExternal4 

Fatal external alert channel 4.

kDtSocProxyAlertFatalAlertExternal5 

Fatal external alert channel 5.

kDtSocProxyAlertFatalAlertExternal6 

Fatal external alert channel 6.

kDtSocProxyAlertFatalAlertExternal7 

Fatal external alert channel 7.

kDtSocProxyAlertFatalAlertExternal8 

Fatal external alert channel 8.

kDtSocProxyAlertFatalAlertExternal9 

Fatal external alert channel 9.

kDtSocProxyAlertFatalAlertExternal10 

Fatal external alert channel 10.

kDtSocProxyAlertFatalAlertExternal11 

Fatal external alert channel 11.

kDtSocProxyAlertFatalAlertExternal12 

Fatal external alert channel 12.

kDtSocProxyAlertFatalAlertExternal13 

Fatal external alert channel 13.

kDtSocProxyAlertFatalAlertExternal14 

Fatal external alert channel 14.

kDtSocProxyAlertFatalAlertExternal15 

Fatal external alert channel 15.

kDtSocProxyAlertFatalAlertExternal16 

Fatal external alert channel 16.

kDtSocProxyAlertFatalAlertExternal17 

Fatal external alert channel 17.

kDtSocProxyAlertFatalAlertExternal18 

Fatal external alert channel 18.

kDtSocProxyAlertFatalAlertExternal19 

Fatal external alert channel 19.

kDtSocProxyAlertFatalAlertExternal20 

Fatal external alert channel 20.

kDtSocProxyAlertFatalAlertExternal21 

Fatal external alert channel 21.

kDtSocProxyAlertFatalAlertExternal22 

Fatal external alert channel 22.

kDtSocProxyAlertFatalAlertExternal23 

Fatal external alert channel 23.

kDtSocProxyAlertRecovAlertExternal0 

Recoverable external alert channel 0.

kDtSocProxyAlertRecovAlertExternal1 

Recoverable external alert channel 1.

kDtSocProxyAlertRecovAlertExternal2 

Recoverable external alert channel 2.

kDtSocProxyAlertRecovAlertExternal3 

Recoverable external alert channel 3.

Definition at line 89 of file dt_soc_proxy.h.

◆ dt_soc_proxy_clock

List of clock ports.

Clock ports are guaranteed to be numbered consecutively from 0.

Enumerator
kDtSocProxyClockClk 

Clock port clk_i.

kDtSocProxyClockAon 

Clock port clk_aon_i.

Definition at line 127 of file dt_soc_proxy.h.

◆ dt_soc_proxy_irq

List of IRQs.

IRQs are guaranteed to be numbered consecutively from 0.

Enumerator
kDtSocProxyIrqExternal0 

External interrupt request.

kDtSocProxyIrqExternal1 

External interrupt request.

kDtSocProxyIrqExternal2 

External interrupt request.

kDtSocProxyIrqExternal3 

External interrupt request.

kDtSocProxyIrqExternal4 

External interrupt request.

kDtSocProxyIrqExternal5 

External interrupt request.

kDtSocProxyIrqExternal6 

External interrupt request.

kDtSocProxyIrqExternal7 

External interrupt request.

kDtSocProxyIrqExternal8 

External interrupt request.

kDtSocProxyIrqExternal9 

External interrupt request.

kDtSocProxyIrqExternal10 

External interrupt request.

kDtSocProxyIrqExternal11 

External interrupt request.

kDtSocProxyIrqExternal12 

External interrupt request.

kDtSocProxyIrqExternal13 

External interrupt request.

kDtSocProxyIrqExternal14 

External interrupt request.

kDtSocProxyIrqExternal15 

External interrupt request.

kDtSocProxyIrqExternal16 

External interrupt request.

kDtSocProxyIrqExternal17 

External interrupt request.

kDtSocProxyIrqExternal18 

External interrupt request.

kDtSocProxyIrqExternal19 

External interrupt request.

kDtSocProxyIrqExternal20 

External interrupt request.

kDtSocProxyIrqExternal21 

External interrupt request.

kDtSocProxyIrqExternal22 

External interrupt request.

kDtSocProxyIrqExternal23 

External interrupt request.

kDtSocProxyIrqExternal24 

External interrupt request.

kDtSocProxyIrqExternal25 

External interrupt request.

kDtSocProxyIrqExternal26 

External interrupt request.

kDtSocProxyIrqExternal27 

External interrupt request.

kDtSocProxyIrqExternal28 

External interrupt request.

kDtSocProxyIrqExternal29 

External interrupt request.

kDtSocProxyIrqExternal30 

External interrupt request.

kDtSocProxyIrqExternal31 

External interrupt request.

Definition at line 48 of file dt_soc_proxy.h.

◆ dt_soc_proxy_periph_io

List of peripheral I/O.

Peripheral I/O are guaranteed to be numbered consecutively from 0.

Definition at line 159 of file dt_soc_proxy.h.

◆ dt_soc_proxy_reg_block

List of register blocks.

Register blocks are guaranteed to start at 0 and to be consecutively numbered.

Definition at line 34 of file dt_soc_proxy.h.

◆ dt_soc_proxy_reset

List of reset ports.

Reset ports are guaranteed to be numbered consecutively from 0.

Enumerator
kDtSocProxyResetRst 

Reset port rst_ni.

kDtSocProxyResetPor 

Reset port rst_por_ni.

Definition at line 148 of file dt_soc_proxy.h.

◆ dt_soc_proxy_reset_req

List of reset requests.

Reset requests are guaranteed to be numbered consecutively from 0.

Enumerator
kDtSocProxyResetReqExternal 

External reset request.

Definition at line 138 of file dt_soc_proxy.h.

◆ dt_soc_proxy_wakeup

List of wakeups.

Wakeups are guaranteed to be numbered consecutively from 0.

Enumerator
kDtSocProxyWakeupWkupInternalReq 

Internal wakeup request, should be asserted whenever an external alert or IRQ is seen.

kDtSocProxyWakeupWkupExternalReq 

External wakeup request.

Definition at line 200 of file dt_soc_proxy.h.

Function Documentation

◆ dt_soc_proxy_alert_from_alert_id()

dt_soc_proxy_alert_t dt_soc_proxy_alert_from_alert_id ( dt_soc_proxy_t dt,
dt_alert_id_t alert )

Convert a global alert ID to a local soc_proxy alert type.

Parameters
dtInstance of soc_proxy.
alertA global alert ID that belongs to this instance.
Returns
The soc_proxy alert, or kDtSocProxyAlertCount.

Note: This function assumes that the global alert ID belongs to the instance of soc_proxy passed in parameter. In other words, it must be the case that dt_soc_proxy_instance_id(dt) == dt_alert_id_to_instance_id(alert). Otherwise, this function will return kDtSocProxyAlertCount.

Definition at line 377 of file dt_soc_proxy.c.

◆ dt_soc_proxy_alert_to_alert_id()

dt_alert_id_t dt_soc_proxy_alert_to_alert_id ( dt_soc_proxy_t dt,
dt_soc_proxy_alert_t alert )

Get the alert ID of a soc_proxy 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.

Parameters
dtInstance of soc_proxy.
alertA soc_proxy alert.
Returns
The Alert Handler alert ID of the alert of this instance.

Definition at line 371 of file dt_soc_proxy.c.

◆ dt_soc_proxy_clock()

Get the clock signal connected to a clock port of an instance.

Parameters
dtInstance of soc_proxy.
clkClock port.
Returns
Clock signal.

Definition at line 395 of file dt_soc_proxy.c.

◆ dt_soc_proxy_from_instance_id()

dt_soc_proxy_t dt_soc_proxy_from_instance_id ( dt_instance_id_t inst_id)

Get the soc_proxy instance from an instance ID.

For example, dt_uart_from_instance_id(kDtInstanceIdUart3) == kDtUart3.

Parameters
inst_idInstance ID.
Returns
A soc_proxy instance.

Note: This function only makes sense if the instance ID has device type soc_proxy, otherwise the returned value is unspecified.

Definition at line 327 of file dt_soc_proxy.c.

◆ dt_soc_proxy_instance_id()

dt_instance_id_t dt_soc_proxy_instance_id ( dt_soc_proxy_t dt)

Get the instance ID of an instance.

Parameters
dtInstance of soc_proxy.
Returns
The instance ID of that instance.

Definition at line 334 of file dt_soc_proxy.c.

◆ dt_soc_proxy_irq_from_plic_id()

dt_soc_proxy_irq_t dt_soc_proxy_irq_from_plic_id ( dt_soc_proxy_t dt,
dt_plic_irq_id_t irq )

Convert a global IRQ ID to a local soc_proxy IRQ type.

Parameters
dtInstance of soc_proxy.
irqA PLIC ID that belongs to this instance.
Returns
The soc_proxy IRQ, or kDtSocProxyIrqCount.

Note: This function assumes that the PLIC ID belongs to the instance of soc_proxy passed in parameter. In other words, it must be the case that dt_soc_proxy_instance_id(dt) == dt_plic_id_to_instance_id(irq). Otherwise, this function will return kDtSocProxyIrqCount.

Definition at line 356 of file dt_soc_proxy.c.

◆ dt_soc_proxy_irq_to_plic_id()

dt_plic_irq_id_t dt_soc_proxy_irq_to_plic_id ( dt_soc_proxy_t dt,
dt_soc_proxy_irq_t irq )

Get the PLIC ID of a soc_proxy IRQ for a given instance.

If the instance is not connected to the PLIC, this function will return kDtPlicIrqIdNone.

Parameters
dtInstance of soc_proxy.
irqA soc_proxy IRQ.
Returns
The PLIC ID of the IRQ of this instance.

Definition at line 346 of file dt_soc_proxy.c.

◆ dt_soc_proxy_periph_io()

Get the peripheral I/O description of an instance.

Parameters
dtInstance of soc_proxy.
sigRequested peripheral I/O.
Returns
Description of the requested peripheral I/O for this instance.

Definition at line 388 of file dt_soc_proxy.c.

◆ dt_soc_proxy_reg_block()

Get the register base address of an instance.

Parameters
dtInstance of soc_proxy.
reg_blockThe register block requested.
Returns
The register base address of the requested block.

Definition at line 339 of file dt_soc_proxy.c.

◆ dt_soc_proxy_reset()

Get the reset signal connected to a reset port of an instance.

Parameters
dtInstance of soc_proxy.
rstReset port.
Returns
Reset signal.

Definition at line 402 of file dt_soc_proxy.c.