RA Flexible Software Package Documentation  Release v6.0.0

 
Ethos-U Interface

Detailed Description

Interface for Ethos-U.

Summary

The Ethos-U NPU interface provides the ability to initialize Arm Ethos-U55 NPU.

Data Structures

struct  rm_ethosu_callback_args_t
 
struct  rm_ethosu_cfg_t
 
struct  rm_ethosu_api_t
 
struct  rm_ethosu_instance_t
 

Typedefs

typedef void rm_ethosu_ctrl_t
 

Data Structure Documentation

◆ rm_ethosu_callback_args_t

struct rm_ethosu_callback_args_t

User configuration structure, used in open function

Data Fields
void * p_context Placeholder for user data. Set in rm_ethosu_api_t::open function in::rm_ethosu_cfg_t.

◆ rm_ethosu_cfg_t

struct rm_ethosu_cfg_t

User configuration structure, used in open function

Data Fields

void(* p_callback )(rm_ethosu_callback_args_t *p_args)
 Callback provided for NPU IRQ.
 
void * p_context
 Placeholder for user data.
 
uint32_t ipl
 Interrupt priority level.
 
IRQn_Type irq
 NPU IRQ number.
 
bool secure_enable
 Configure NPU in secure or non-secure mode.
 
bool privilege_enable
 Configure NPU in privileged or non-privileged mode.
 

◆ rm_ethosu_api_t

struct rm_ethosu_api_t

Ethos-U NPU interface API.

Data Fields

fsp_err_t(* open )(rm_ethosu_ctrl_t *const p_ctrl, rm_ethosu_cfg_t const *const p_cfg)
 
fsp_err_t(* callbackSet )(rm_ethosu_ctrl_t *const p_ctrl, void(*p_callback)(rm_ethosu_callback_args_t *), void *const p_context, rm_ethosu_callback_args_t *const p_callback_memory)
 
fsp_err_t(* close )(rm_ethosu_ctrl_t *const p_ctrl)
 

Field Documentation

◆ open

fsp_err_t(* rm_ethosu_api_t::open) (rm_ethosu_ctrl_t *const p_ctrl, rm_ethosu_cfg_t const *const p_cfg)

Enables Ethos-U NPU module and initialize driver.

Parameters
[in]p_ctrlPointer to control block. Must be declared by user. Elements set here.
[in]p_cfgPointer to configuration structure. All elements of this structure must be set by user.

◆ callbackSet

fsp_err_t(* rm_ethosu_api_t::callbackSet) (rm_ethosu_ctrl_t *const p_ctrl, void(*p_callback)(rm_ethosu_callback_args_t *), void *const p_context, rm_ethosu_callback_args_t *const p_callback_memory)

Specify callback function and optional context pointer and working memory pointer.

Parameters
[in]p_ctrlControl block set in rm_ethosu_api_t::open call.
[in]p_callbackCallback function to register
[in]p_contextPointer to send to callback function
[in]p_callback_memoryPointer to volatile memory where callback structure can be allocated. Callback arguments allocated here are only valid during the callback.

◆ close

fsp_err_t(* rm_ethosu_api_t::close) (rm_ethosu_ctrl_t *const p_ctrl)

Closes the module and deinitializes Ethos-U driver.

Parameters
[in]p_ctrlControl block set in rm_ethosu_api_t::open call.

◆ rm_ethosu_instance_t

struct rm_ethosu_instance_t

This structure encompasses everything that is needed to use an instance of this interface.

Data Fields
rm_ethosu_ctrl_t * p_ctrl Pointer to the control structure for this instance.
rm_ethosu_cfg_t const * p_cfg Pointer to the configuration structure for this instance.
rm_ethosu_api_t const * p_api Pointer to the API structure for this instance.

Typedef Documentation

◆ rm_ethosu_ctrl_t

typedef void rm_ethosu_ctrl_t

Ethos-U NPU API control block. Allocate an instance specific control block to pass into the Ethos-U NPU API calls.