Data Structures | Defines

ringiodefs.h File Reference

#include <dsplink.h>
#include <archdefs.h>
#include <mpcsdefs.h>
Include dependency graph for gpp/inc/ringiodefs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  RingIO_Attrs_tag
struct  RingIO_Client_tag
struct  RingIO_ControlStruct_tag
struct  RingIO_Entry_tag
struct  RingIO_Ctrl_tag

Defines

#define RINGIO_INVALID_ATTR   (Uint16) 0xFFFFl
 This constant denotes an invalid attribute type. This should not be used for any valid attribute. ============================================================================.
#define RINGIO_DATABUF_CACHEUSE   0x1u
 These constants denote the flags provided while opening the RingIO. ============================================================================.
#define RINGIO_ATTRBUF_CACHEUSE   0x2u
#define RINGIO_CONTROL_CACHEUSE   0x4u
#define RINGIO_NEED_EXACT_SIZE   0x8u
#define RINGIO_NAME_MAX_LEN   32u
 Maximum length of RingIO strings. ============================================================================.

Typedefs

RingIO_Handle

This type is used for the handle to the RingIO Client structure. ============================================================================

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

typedef void * RingIO_Handle
RingIO_ControlHandle

This type is used for the handle to the Shared Control structure. ============================================================================

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

typedef struct
RingIO_ControlStruct_tag
RingIO_ControlHandle
RingIO_BufPtr

This type is used for the Buffer Pointer Type. ============================================================================

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

typedef void * RingIO_BufPtr
RingIO_NotifyParam

This type is used for the Notification Parameter. ============================================================================

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

typedef void * RingIO_NotifyParam
RingIO_NotifyMsg

This type is used for the Notification Message. ============================================================================

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

typedef Uint16 RingIO_NotifyMsg
RingIO_NotifyFunc

Signature of function used as the Notification function.

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

Parameters:
handleHandle to the RingIO.
paramParameter used while registering the notification.
msgMessage passed along with notification.
Returns:
None. ============================================================================
typedef void(* RingIO_NotifyFunc )(RingIO_Handle handle, RingIO_NotifyParam param, RingIO_NotifyMsg msg)
RingIO_Attrs

This structure defines the RingIO Creation Parameters.

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

Parameters:
transportTypeTransport type - This specifies whether the data transport is between DSP<-> DSP or DSP<->ARM.
ctrlPoolIdPool to be used to allocate memory for control structure.
dataPoolIdPool to be used to allocate memory for data buffer.
attrPoolIdPool to be used to allocate memory for attribute buffer.
lockPoolIdPool to be used to allocate memory for lock structure.
dataBufSizeData Buffer Size in bytes.
footBufSizeFooter area for providing contiguous buffer to a reader.
attrBufSizeAttribute buffer size in bytes. ============================================================================
typedef struct RingIO_Attrs_tag RingIO_Attrs
RingIO_ControlStruct

This structure defines the RingIO Control Structure. This structure is stored in shared memory and is accessible by all clients. The control structure supports a single reader and a single writer for the ring buffer.

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

Parameters:
procIdID of DSP processor.
entryIdID of the RingIO within the entry array.
transportTypeTransport type - This specifies whether the data transport is between DSP<-> DSP or DSP<->ARM.
phyBufStartPhysical start address of the data buffer.
phyBufEndTotal size of the Data buffer (offset from phyBufStart)
curBufEndCurrent buffer size. This may be <= dataBufEnd (offset from phyBufStart)
dataBufEndSize of the main data buffer (offset from phyBufStart)
dataBufSizeSize of the data buffer
footBufSizeSize of the foot buffer used for providing linear buffer to a reader
validSizeAmount of valid data available in the data buffer. Valid Data is the total data that is readable by the reader using an acquire call. This does not include the size of the data buffer already acquired by the reader
emptySizeAmount of empty space in the data buffer. This does not include the empty space already acquired by the writer
phyAttrStartPhysical start address of the attr buffer
phyAttrBufEndTotal Size of the attribute buffer (offset)
curAttrBufEndCurrent Attr buffer size. This may be <= the phyAttrBufEnd (offset)
validAttrSizeAmount of valid attribute bytes available in the attribute buffer. The valid attribute bytes does not include the attribute bytes already acquired by the reader
emptyAttrSizeAmount of empty space in the attr buffer. This does not include the empty attr space already acquired by the writer
prevAttrOffsetOffset of the most recent attribute
phyLockHandlePhysical (DSP) address of the lock that should be used to protect the Control structure from multiple accesses.
paddingPadding.
writerWriter state information
readerReader state information ============================================================================
typedef struct
RingIO_ControlStruct_tag 
RingIO_ControlStruct
RingIO_Client

This structure defines the RingIO Shared memory client structure. The RingIO Reader or Writer state information is stored in this structure

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

Parameters:
procIdProcessor Id where the client is executing
openModeIndicates whether the client is a reader or writer
pDataStartVirtual start address of the data buffer
pAttrStartVirtual start address of the attr buffer
acqStartStart offset of data buffer that has been acquired by the application.
acqSizeSize of data that has been acquired
acqAttrStartStart offset of the acquired attribute buffer
acqAttrSizeSize of attribute data that has been acquired
notifyTypeNotification type
notifyFuncNotification function for this client
notifyParamParameter to the Notification function
notifyWaterMarkWatermark that should be satisfied before notification is done
flagsCounting bits from MSB to LSB 0....31 B31 - Denotes whether the client uses cache for accessing the data buffer (dataBufCacheUseFlag) B30 - Denotes whether the client uses cache for accessing the attribute buffer (attrBufCacheUseFlag) B29 - Denotes whether the client uses cache for accessing the control struct (controlStructCacheFlag) B28 - Denotes whether requests for acquire buffer should always be satisfied. If a contiguous request could not be satisfied because of the buffer wrap, we need to mark an early end and provide only a contiguous buffer (contiguousBufFlag)
virtControlHandleHandle to the Control structure. Apps do not have direct access to the control structure. The Control structure can only be accessed through the client handle
virtLockHandleVirtual (GPP) address of the lock that should be used to protect the Control structure from multiple accesses.
isValidIndicates whether the Client is initialized
notifyFlagDenotes whether notification needs to be done or not
refCountDenotes whether RingIO has been re-opened or not
paddingPadding. ============================================================================
typedef struct RingIO_Client_tag RingIO_Client
RingIO_Entry

Entry structure for the RingIO data transport

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

Parameters:
nameSystem wide unique identifier for the RingIO
phyControlPhysical (DSP) address of the Control structure for the RingIO.
virtControlVirtual (GPP) address of the Control structure for the RingIO.
ownerProcIdCreator's processor ID of this ringio.
ctrlPoolIdPool to be used to allocate memory for control structure.
dataPoolIdPool to be used to allocate memory for data buffer.
attrPoolIdPool to be used to allocate memory for attribute buffer.
lockPoolIdPool to be used to allocate memory for lock structure.
paddingPadding. ============================================================================
typedef struct RingIO_Entry_tag RingIO_Entry

Enumerations

RingIO_OpenMode

Enumeration of RingIO open modes.

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

Parameters:
RINGIO_MODE_READReader mode.
RINGIO_MODE_WRITEWriter mode. ============================================================================
enum  RingIO_OpenMode {
  RINGIO_MODE_READ = 0,
  RINGIO_MODE_WRITE,
  RINGIO_MODE_READ = 0u,
  RINGIO_MODE_WRITE
}
RingIO_TransportType

Enumeration of RingIO transport types.

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

Parameters:
RINGIO_TRANSPORT_DSP_DSPIntra-DSP transport.
RINGIO_TRANSPORT_GPP_DSPGPP<->DSP transport. ============================================================================
enum  RingIO_TransportType {
  RINGIO_TRANSPORT_DSP_DSP = 1,
  RINGIO_TRANSPORT_GPP_DSP,
  RINGIO_TRANSPORT_DSP_DSP = 1u,
  RINGIO_TRANSPORT_GPP_DSP
}
RingIO_NotifyType

Enumeration of RingIO notification types.

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

Parameters:
RINGIO_NOTIFICATION_NONENo notification required.
RINGIO_NOTIFICATION_ALWAYSNotify whenever the other side sends data/frees up space.
RINGIO_NOTIFICATION_ONCENotify when the other side sends data/frees up space. Once the notification is done, the notification is disabled until it is enabled again
RINGIO_NOTIFICATION_HDWRFIFO_ALWAYSNotify whenever the other side sends data/frees up space. This notification is never disabled.
RINGIO_NOTIFICATION_HDWRFIFO_ONCENotify when the other side sends data/frees up space. Once the notification is done, the notification is disabled until it is enabled again. The notification is enabled once the watermark is crossed and does not require buffer to get full/empty.

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

enum  RingIO_NotifyType {
  RINGIO_NOTIFICATION_NONE = 0,
  RINGIO_NOTIFICATION_ALWAYS,
  RINGIO_NOTIFICATION_ONCE,
  RINGIO_NOTIFICATION_HDWRFIFO_ALWAYS,
  RINGIO_NOTIFICATION_HDWRFIFO_ONCE,
  RINGIO_NOTIFICATION_NONE = 0u,
  RINGIO_NOTIFICATION_ALWAYS,
  RINGIO_NOTIFICATION_ONCE,
  RINGIO_NOTIFICATION_HDWRFIFO_ALWAYS,
  RINGIO_NOTIFICATION_HDWRFIFO_ONCE
}

RingIO_Ctrl

This structure defines the control structure required by the RINGIO component. It contains information about all RINGIO objects shared between the GPP and a specific DSP.

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

Parameters:
isInitializedFlag to indicate if this region was initialized
dspIdID of the DSP with which the RingIO Region is shared
maxEntriesMaximum number of RingIO instances supported by the RingIO.
ipsIdID of the IPS to be used.
ipsEventNoIPS Event number associated with the RingIO.
dspAddrEntryPointer to array in DSP address space of RINGIO objects that can be created.
paddingPadding.
lockObjLock used to protect the shared RingIO_Ctrl from multiple simultaneous accesses. ============================================================================

#define RingIOEntry   RingIO_Entry
#define RingIORegion   RingIO_Ctrl
#define RingIO_SendNotify   RingIO_sendNotify
typedef struct RingIO_Ctrl_tag RingIO_Ctrl

Define Documentation

#define RINGIO_INVALID_ATTR   (Uint16) 0xFFFFl

This constant denotes an invalid attribute type. This should not be used for any valid attribute. ============================================================================.

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

Constant:
RINGIO_INVALID_ATTR
#define RINGIO_DATABUF_CACHEUSE   0x1u

These constants denote the flags provided while opening the RingIO. ============================================================================.

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

Constant:
RINGIO_DATABUF_CACHEUSE, RINGIO_ATTRBUF_CACHEUSE, RINGIO_ATTRBUF_CACHEUSE, RINGIO_NEED_EXACT_SIZE
#define RINGIO_ATTRBUF_CACHEUSE   0x2u
#define RINGIO_CONTROL_CACHEUSE   0x4u
#define RINGIO_NEED_EXACT_SIZE   0x8u
#define RINGIO_NAME_MAX_LEN   32u

Maximum length of RingIO strings. ============================================================================.

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

Macro:
RINGIO_NAME_MAX_LEN
#define RingIOEntry   RingIO_Entry

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

Deprecated:
The deprecated data structure RingIOEntry has been replaced with RingIOEntry

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

#define RingIORegion   RingIO_Ctrl

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

Deprecated:
The deprecated data structure RingIORegion has been replaced with RingIO_Ctrl

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

#define RingIO_SendNotify   RingIO_sendNotify

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

Deprecated:
The deprecated API RingIO_SendNotify has been replaced with RingIO_sendNotify

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


Typedef Documentation

typedef void* RingIO_Handle
typedef void* RingIO_BufPtr
typedef void* RingIO_NotifyParam
typedef struct RingIO_Ctrl_tag RingIO_Ctrl

Enumeration Type Documentation

Enumerator:
RINGIO_MODE_READ 
RINGIO_MODE_WRITE 
RINGIO_MODE_READ 
RINGIO_MODE_WRITE 
Enumerator:
RINGIO_TRANSPORT_DSP_DSP 
RINGIO_TRANSPORT_GPP_DSP 
RINGIO_TRANSPORT_DSP_DSP 
RINGIO_TRANSPORT_GPP_DSP 
Enumerator:
RINGIO_NOTIFICATION_NONE 
RINGIO_NOTIFICATION_ALWAYS 
RINGIO_NOTIFICATION_ONCE 
RINGIO_NOTIFICATION_HDWRFIFO_ALWAYS 
RINGIO_NOTIFICATION_HDWRFIFO_ONCE 
RINGIO_NOTIFICATION_NONE 
RINGIO_NOTIFICATION_ALWAYS 
RINGIO_NOTIFICATION_ONCE 
RINGIO_NOTIFICATION_HDWRFIFO_ALWAYS 
RINGIO_NOTIFICATION_HDWRFIFO_ONCE 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2012, Texas Instruments Incorporated