HPM SDK
HPMicro Software Development Kit
hpm_ffa_drv.h File Reference
#include "hpm_common.h"
#include "hpm_ffa_regs.h"
#include "hpm_soc_feature.h"
#include "hpm_soc_ip_feature.h"

Go to the source code of this file.

Data Structures

struct  ffa_complex_q31_t
 FFA complex Q31 data type definition. More...
 
struct  ffa_complex_q15_t
 FFA complex Q15 data type definition. More...
 
struct  fft_xfer_t
 FFT transform context. More...
 
struct  fir_xfer_t
 FIR transform context. More...
 

Macros

#define FFA_OPCMD_FIR   (0U) /* !< FIR operation command index */
 Operation commands supported by FFA. More...
 
#define FFA_OPCMD_FFT   (2U) /* !< FFT operation command index */
 
#define FFA_DATA_TYPE_REAL_Q31   (0U) /* !< FFA Data type: Real Q31 */
 Data type supported by FFA. More...
 
#define FFA_DATA_TYPE_REAL_Q15   (1U) /* !< FFA Data type: Real Q15 */
 
#define FFA_DATA_TYPE_COMPLEX_Q31   (2U) /* !< FFA Data type: Complex Q31 */
 
#define FFA_DATA_TYPE_COMPLEX_Q15   (3U) /* !< FFA Data type: Complex Q15 */
 

Typedefs

typedef int32_t ffa_q31_t
 FFA Q31 data type definition. More...
 
typedef int16_t ffa_q15_t
 FFA Q15 data type definition. More...
 

Enumerations

enum  {
  status_ffa_fir_overflow = ((uint32_t)( status_group_ffa )*1000U + (uint32_t)( 0 )) , status_ffa_fft_overflow = ((uint32_t)( status_group_ffa )*1000U + (uint32_t)( 1 )) , status_ffa_write_error = ((uint32_t)( status_group_ffa )*1000U + (uint32_t)( 2 )) , status_ffa_read_next_error = ((uint32_t)( status_group_ffa )*1000U + (uint32_t)( 3 )) ,
  status_ffa_read_error = ((uint32_t)( status_group_ffa )*1000U + (uint32_t)( 4 ))
}
 FFA error codes. More...
 

Functions

static void ffa_enable (FFA_Type *ptr)
 Enable FFA module and start an specified FFA operation. More...
 
static void ffa_disable (FFA_Type *ptr)
 Stop FFA module. More...
 
static uint32_t ffa_get_status (FFA_Type *ptr)
 Get FFA status. More...
 
static void ffa_enable_interrupt (FFA_Type *ptr, uint32_t mask)
 Enable FFA Interrupt. More...
 
static void ffa_disable_interrupt (FFA_Type *ptr, uint32_t mask)
 Disable FFA interrupt. More...
 
void ffa_start_fft (FFA_Type *ptr, fft_xfer_t *fft_xfer)
 Start an FFT operation. More...
 
void ffa_start_fir (FFA_Type *ptr, fir_xfer_t *fir_xfer)
 Start an FIR operation. More...
 
hpm_stat_t ffa_calculate_fft_blocking (FFA_Type *ptr, fft_xfer_t *fft_xfer)
 Perform FFT transformation in blocking mode. More...
 
hpm_stat_t ffa_calculate_fir_blocking (FFA_Type *ptr, fir_xfer_t *fir_xfer)
 Perform FIR transform in blocking mode. More...