Defines
FFTC OS Abstraction Layer Functions
FFTC Higher Layer Data Structures & APIs

Defines

#define Fftc_osalMalloc   Osal_fftcMalloc
#define Fftc_osalFree   Osal_fftcFree
#define Fftc_osalMultiCoreCsEnter   Osal_fftcMultiCoreCsEnter
#define Fftc_osalMultiCoreCsExit   Osal_fftcMultiCoreCsExit
#define Fftc_osalInterruptCsEnter   Osal_fftcInterruptCsEnter
#define Fftc_osalInterruptCsExit   Osal_fftcInterruptCsExit
#define Fftc_osalLog   Osal_fftcLog
#define Fftc_osalCreateSem   Osal_fftcCreateSem
#define Fftc_osalDeleteSem   Osal_fftcDeleteSem
#define Fftc_osalPendSem   Osal_fftcPendSem
#define Fftc_osalPostSem   Osal_fftcPostSem
#define Fftc_osalBeginMemAccess   Osal_fftcBeginMemAccess
#define Fftc_osalEndMemAccess   Osal_fftcEndMemAccess
#define Fftc_osalBeginDataBufMemAccess   Osal_fftcBeginDataBufMemAccess
#define Fftc_osalEndDataBufMemAccess   Osal_fftcEndDataBufMemAccess
#define Fftc_osalBeginDescMemAccess   Osal_fftcBeginDescMemAccess
#define Fftc_osalEndDescMemAccess   Osal_fftcEndDescMemAccess

Define Documentation

#define Fftc_osalBeginDataBufMemAccess   Osal_fftcBeginDataBufMemAccess

============================================================================
Fftc_osalBeginDataBufMemAccess

brief
This API is called from the driver before it makes a read access to data buffers on the data path. If the data buffers were allocated in cacheable memory region, then the application would have to ensure that the cache is updated with the contents from actual physical memory.

Parameters:
[in]dataBufPtr- Address of the data buffer memory block that the driver is trying to access.
[in]size- Size of the memory block being accessed.
Returns:

void

Prototype: The following is the C prototype for the expected OSAL API.

       void Osal_fftcBeginDataBufMemAccess (void *dataBufPtr, uint32_t size) 
    

=============================================================================

#define Fftc_osalBeginDescMemAccess   Osal_fftcBeginDescMemAccess

============================================================================
Fftc_osalBeginDescMemAccess

brief
This API is called from the driver before it makes a read access to CPPI descriptors on the Rx data path. If the descriptors were allocated in cacheable memory region, then the application would have to ensure that the cache is updated with the contents from actual physical memory.

Parameters:
[in]hRx- Rx object handle. Can be used by application to retrieve correct descriptor size, and location of the descriptors if the descriptors and Rx flow were allocated using application managed configuration.
[in]descPtr- Address of the descriptors that the driver is trying to access.
[in]size- Size of the descriptor being accessed. Can be zero if descriptors are not managed by the driver. In this case, using the hRx parameter passed the application must decide descriptor size and if it was allocated in cacheable memory region.
Returns:

void

Prototype: The following is the C prototype for the expected OSAL API.

       void Fftc_osalBeginDescMemAccess (void* hRx, void *descPtr, uint32_t size) 
    

=============================================================================

#define Fftc_osalBeginMemAccess   Osal_fftcBeginMemAccess

============================================================================
Fftc_osalBeginMemAccess

brief
This API is called from the driver before it makes a read access to its multicore shared datastructures. If these data structures were placed in cacheable memory region, then the application would have to ensure that the cache is updated with the contents from actual physical memory.

Parameters:
[in]blockPtr- Address of the memory block that the driver is trying to access.
[in]size- Size of the memory block being accessed.
Returns:

void

Prototype: The following is the C prototype for the expected OSAL API.

       void Osal_fftcBeginMemAccess (void *blockPtr, uint32_t size) 
    

=============================================================================

#define Fftc_osalCreateSem   Osal_fftcCreateSem

============================================================================
Fftc_osalCreateSem

brief
This API is called from the FFTC driver to create a software semaphore.

Parameters:
[in]void
Returns:

void* - Semaphore handle.

Prototype: The following is the C prototype for the expected OSAL API.

       void* Osal_fftcCreateSem (void) 
    

=============================================================================

#define Fftc_osalDeleteSem   Osal_fftcDeleteSem

============================================================================
Fftc_osalDeleteSem

brief
This API is called from the driver to delete a software semaphore created earlier using Fftc_osalCreateSem () API.

Parameters:
[in]hSem- Semaphore handle obtained using Fftc_osalCreateSem () API.
Returns:

void

Prototype: The following is the C prototype for the expected OSAL API.

       void Osal_fftcDeleteSem (void* hSem) 
    

=============================================================================

#define Fftc_osalEndDataBufMemAccess   Osal_fftcEndDataBufMemAccess

============================================================================
Fftc_osalEndDataBufMemAccess

brief
This API is called from the driver once its done writing to a data buffer on the data path. If the data buffers were allocated in cacheable memory region, then the application would have to ensure that the actual physical memory is updated as per the contents of cache.

Parameters:
[in]dataBufPtr- Address of the data buffer memory block that the driver has written to.
[in]size- Size of the memory block being accessed.
Returns:

void

Prototype: The following is the C prototype for the expected OSAL API.

       void Osal_fftcEndDataBufMemAccess (void *dataBufPtr, uint32_t size) 
    

=============================================================================

#define Fftc_osalEndDescMemAccess   Osal_fftcEndDescMemAccess

============================================================================
Fftc_osalEndDescMemAccess

brief
This API is called from the driver once its done writing to a descriptor on the data path/control path during descriptor initialization. If the descriptors were allocated in cacheable memory region, then the application would have to ensure that the actual physical memory is updated as per the contents of cache.

Parameters:
[in]descPtr- Address of the descriptor that the driver has written to.
[in]size- Size of the memory block being accessed.
Returns:

void

Prototype: The following is the C prototype for the expected OSAL API.

       void Fftc_osalEndDescMemAccess (void *descPtr, uint32_t size) 
    

=============================================================================

#define Fftc_osalEndMemAccess   Osal_fftcEndMemAccess

============================================================================
Fftc_osalEndMemAccess

brief
This API is called from the driver once its done writing to its multicore shared datastructures. If these data structures were placed in cacheable memory region, then the application would have to ensure that the actual physical memory is updated as per the contents of cache.

Parameters:
[in]blockPtr- Address of the memory block that the driver is has written to.
[in]size- Size of the memory block being accessed.
Returns:

void

Prototype: The following is the C prototype for the expected OSAL API.

       void Osal_fftcEndMemAccess (void *blockPtr, uint32_t size) 
    

=============================================================================

#define Fftc_osalFree   Osal_fftcFree

============================================================================
Fftc_osalFree

brief
This API is called from the FFTC driver to free up the memory allocated for buffers earlier using Fftc_osalMalloc () API.

Parameters:
[in]datavoid*Pointer to the memory block to be cleaned up.
[in]num_bytesSize of the memory block to be cleaned up.
[in]bGlobalAddressIndicates that the address passed here to this function is a Global address.

Prototype: The following is the C prototype for the expected OSAL API.

        void Osal_fftcFree (void* dataPtr, uint32_t num_bytes, uint8_t bGlobalAddress)
    

=============================================================================

#define Fftc_osalInterruptCsEnter   Osal_fftcInterruptCsEnter

============================================================================
Fftc_osalInterruptCsEnter

brief
This API is called from the FFTC driver to acquire an interrupt lock, i.e., a lock that can protect the driver against context switch to an interrupt when its manipulating data structures shared between the application process and interrupt handler (ISR).

This API is called from the FFTC Fftc_rxGetResult () API to protect the driver maintained list of results posted by ISR against manipulation from ISR at the same time its being accessed by the application via Fftc_rxGetResult () API. This API should disable the interrupts to ensure that protection against interrupts.

Parameters:
[in]void
Returns:

void

Prototype: The following is the C prototype for the expected OSAL API.

        void Osal_fftcInterruptCsEnter (void)
    

=============================================================================

#define Fftc_osalInterruptCsExit   Osal_fftcInterruptCsExit

============================================================================
Fftc_osalInterruptCsExit

brief
This API is called from the FFTC driver to release an interrupt lock previously obtained using Fftc_osalInterruptCsEnter () API. This API should enable back interrupts disabled earlier in Fftc_osalInterruptCsEnter () API.

Parameters:
[in]void
Returns:

void

Prototype: The following is the C prototype for the expected OSAL API.

        void Osal_fftcInterruptCsExit (void)
    

=============================================================================

#define Fftc_osalLog   Osal_fftcLog

============================================================================
Fftc_osalLog

brief
This API is called from the FFTC driver to log useful debug information.

Parameters:
[in]void
Returns:

void

Prototype: The following is the C prototype for the expected OSAL API.

       void Osal_fftcLog (char* fmt, ... ) 
    

=============================================================================

#define Fftc_osalMalloc   Osal_fftcMalloc

============================================================================
Fftc_osalMalloc

brief
This API is called from the FFTC driver to allocate memory for the FFT request and result data buffers used in Host mode CPPI descriptors. It can also be called to allocate memory for driver's internal book-keeping objects.

This memory can be allocated from a core's local heap.

Parameters:
[in]num_bytesNumber of bytes to be allocated.
[in]bGlobalAddressIndicates whether the address returned by this API should be a global address or a core local address. Global addresses are required by driver when allocating CPPI descriptors and buffers.
Returns:
Allocated block address
Precondition:

The buffers allocated using this API MUST be translated to global addresses when 'bGlobalAddress' is set to 1.

Prototype: The following is the C prototype for the expected OSAL API.

        void*  Osal_fftcMalloc (uint32_t num_bytes, uint8_t bGlobalAddress)
    

=============================================================================

#define Fftc_osalMultiCoreCsEnter   Osal_fftcMultiCoreCsEnter

============================================================================
Fftc_osalMultiCoreCsEnter

brief
This API is called from the FFTC driver to acquire a multi-core, multi-threaded synchronization lock, i.e., a lock that once obtained that would ensure that no process/thread on the current core or any of the cores can access the FFTC library APIs until its released by the current user.

This API is called from the FFTC driver mainly from the control path APIs, i.e., Fftc_init (), Fftc_open () etc to ensure that the data structures shared between all the driver users are updated correctly.

Parameters:
[in]void
Returns:

void

Prototype: The following is the C prototype for the expected OSAL API.

        void Osal_fftcMultiCoreCsEnter (void)
    

=============================================================================

#define Fftc_osalMultiCoreCsExit   Osal_fftcMultiCoreCsExit

============================================================================
Fftc_osalMultiCoreCsExit

brief
This API is called from the FFTC driver to release a multi-core and multi-threaded lock previously obtained using Fftc_osalMultiCoreCsEnter () API. This API should reset the multi-core, multi-threaded lock enabling another process/core to grab it to access the FFTC library.

Parameters:
[in]void
Returns:

void

Prototype: The following is the C prototype for the expected OSAL API.

        void Osal_fftcMultiCoreCsExit (void)
    

=============================================================================

#define Fftc_osalPendSem   Osal_fftcPendSem

============================================================================
Fftc_osalPendSem

brief
This API is called from the driver to acquire a software semaphore created earlier using Fftc_osalCreateSem () API.

Parameters:
[in]hSem- Semaphore handle obtained using Fftc_osalCreateSem () API.
Returns:

void

Prototype: The following is the C prototype for the expected OSAL API.

       void Osal_fftcPendSem (void* hSem) 
    

=============================================================================

#define Fftc_osalPostSem   Osal_fftcPostSem

============================================================================
Fftc_osalPostSem

brief
This API is called from the driver to release a semaphore acquired earlier using Fftc_osalPendSem () API.

Parameters:
[in]hSem- Semaphore handle obtained using Fftc_osalCreateSem () API.
Returns:

void

Prototype: The following is the C prototype for the expected OSAL API.

       void Osal_fftcPostSem (void* hSem) 
    

=============================================================================


Copyright 2014, Texas Instruments Incorporated