Pavona Software APIs
ast.h File Reference

Device Tables (DT) for IP ast and top scafi_deprecated. More...

#include "hw/top/dt/api.h"
#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef enum dt_ast dt_ast_t
 List of instances.
 
typedef enum dt_ast_reg_block dt_ast_reg_block_t
 List of register blocks.
 
typedef enum dt_ast_clock dt_ast_clock_t
 List of clock ports.
 
typedef enum dt_ast_reset dt_ast_reset_t
 List of reset ports.
 

Enumerations

enum  dt_ast {
  kDtAstFirst = 0 ,
  kDtAst = 0
}
 List of instances. More...
 
enum  { kDtAstCount = 1 }
 
enum  dt_ast_reg_block { kDtAstRegBlockCore = 0 }
 List of register blocks. More...
 
enum  { kDtAstRegBlockCount = 1 }
 
enum  dt_ast_clock {
  kDtAstClockAstTlul = 0 ,
  kDtAstClockAstAdc = 1 ,
  kDtAstClockAstAlert = 2 ,
  kDtAstClockAstEs = 3 ,
  kDtAstClockAstRng = 4 ,
  kDtAstClockAstUsb = 5
}
 List of clock ports. More...
 
enum  { kDtAstClockCount = 6 }
 
enum  dt_ast_reset {
  kDtAstResetAstTlul = 0 ,
  kDtAstResetAstAdc = 1 ,
  kDtAstResetAstAlert = 2 ,
  kDtAstResetAstEs = 3 ,
  kDtAstResetAstRng = 4 ,
  kDtAstResetAstUsb = 5
}
 List of reset ports. More...
 
enum  { kDtAstResetCount = 6 }
 

Functions

dt_ast_t dt_ast_from_instance_id (dt_instance_id_t inst_id)
 Get the ast instance from an instance ID.
 
dt_instance_id_t dt_ast_instance_id (dt_ast_t dt)
 Get the instance ID of an instance.
 
uint32_t dt_ast_reg_block (dt_ast_t dt, dt_ast_reg_block_t reg_block)
 Get the register base address of an instance.
 
dt_clock_t dt_ast_clock (dt_ast_t dt, dt_ast_clock_t clk)
 Get the clock signal connected to a clock port of an instance.
 
dt_reset_t dt_ast_reset (dt_ast_t dt, dt_ast_reset_t rst)
 Get the reset signal connected to a reset port of an instance.
 

Detailed Description

Device Tables (DT) for IP ast and top scafi_deprecated.

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

Definition in file ast.h.

Typedef Documentation

◆ dt_ast_clock_t

List of clock ports.

Clock ports are guaranteed to be numbered consecutively from 0.

◆ dt_ast_reg_block_t

List of register blocks.

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

◆ dt_ast_reset_t

List of reset ports.

Reset ports are guaranteed to be numbered consecutively from 0.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
kDtAstCount 

Number of instances.

Definition at line 34 of file ast.h.

◆ anonymous enum

anonymous enum
Enumerator
kDtAstResetCount 

Number of reset ports.

Definition at line 89 of file ast.h.

◆ anonymous enum

anonymous enum
Enumerator
kDtAstClockCount 

Number of clock ports.

Definition at line 70 of file ast.h.

◆ anonymous enum

anonymous enum
Enumerator
kDtAstRegBlockCount 

Number of register blocks.

Definition at line 48 of file ast.h.

◆ dt_ast

enum dt_ast

List of instances.

Enumerator
kDtAstFirst 

First instance.

kDtAst 

ast

Definition at line 29 of file ast.h.

◆ dt_ast_clock

List of clock ports.

Clock ports are guaranteed to be numbered consecutively from 0.

Enumerator
kDtAstClockAstTlul 

Clock port clk_ast_tlul_i.

kDtAstClockAstAdc 

Clock port clk_ast_adc_i.

kDtAstClockAstAlert 

Clock port clk_ast_alert_i.

kDtAstClockAstEs 

Clock port clk_ast_es_i.

kDtAstClockAstRng 

Clock port clk_ast_rng_i.

kDtAstClockAstUsb 

Clock port clk_ast_usb_i.

Definition at line 61 of file ast.h.

◆ dt_ast_reg_block

List of register blocks.

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

Definition at line 44 of file ast.h.

◆ dt_ast_reset

List of reset ports.

Reset ports are guaranteed to be numbered consecutively from 0.

Enumerator
kDtAstResetAstTlul 

Reset port rst_ast_tlul_ni.

kDtAstResetAstAdc 

Reset port rst_ast_adc_ni.

kDtAstResetAstAlert 

Reset port rst_ast_alert_ni.

kDtAstResetAstEs 

Reset port rst_ast_es_ni.

kDtAstResetAstRng 

Reset port rst_ast_rng_ni.

kDtAstResetAstUsb 

Reset port rst_ast_usb_ni.

Definition at line 80 of file ast.h.

Function Documentation

◆ dt_ast_clock()

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

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

Definition at line 83 of file ast.c.

◆ dt_ast_from_instance_id()

dt_ast_t dt_ast_from_instance_id ( dt_instance_id_t inst_id)

Get the ast instance from an instance ID.

For example, dt_uart_from_instance_id(kDtInstanceIdUart3) == kDtUart3.

Parameters
inst_idInstance ID.
Returns
A ast instance.

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

Definition at line 61 of file ast.c.

◆ dt_ast_instance_id()

dt_instance_id_t dt_ast_instance_id ( dt_ast_t dt)

Get the instance ID of an instance.

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

Definition at line 68 of file ast.c.

◆ dt_ast_reg_block()

uint32_t dt_ast_reg_block ( dt_ast_t dt,
dt_ast_reg_block_t reg_block )

Get the register base address of an instance.

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

Definition at line 73 of file ast.c.

◆ dt_ast_reset()

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

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

Definition at line 90 of file ast.c.