Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

dsp/inc/ringiodefs.h File Reference

#include <mpcs.h>

Include dependency graph for dsp/inc/ringiodefs.h:

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

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:
isInitialized Flag to indicate if this region was initialized
dspId ID of the DSP with which the RingIO Region is shared
maxEntries Maximum number of RingIO instances supported by the RingIO.
ipsId ID of the IPS to be used.
ipsEventNo IPS Event number associated with the RingIO.
dspAddrEntry Pointer to array in DSP address space of RINGIO objects that can be created.
padding Padding.
lockObj Lock used to protect the shared RingIO_Ctrl from multiple simultaneous accesses. ============================================================================


#define GET_ENTRY_ID(client)   ((client)->virtControlHandle->entryId)
 Gets the entry id of the RingIO ============================================================================.
#define GET_LOCK_POOL_ID(entryId)   (RingIO_ctrlPtr->entry [entryId].lockPoolId)
 Gets the pool id from which the MPCS lock object structure has been allocated. ============================================================================.
#define GET_CTRL_POOL_ID(entryId)   (RingIO_ctrlPtr->entry [entryId].ctrlPoolId)
 Gets the pool id from which the RingIO control structure has been validated. ============================================================================.
#define GET_DATA_POOL_ID(entryId)   (RingIO_ctrlPtr->entry [entryId].dataPoolId)
 Gets the pool id from which the RingIO data buffer has been allocated. ============================================================================.
#define GET_ATTR_POOL_ID(entryId)   (RingIO_ctrlPtr->entry [entryId].attrPoolId)
 Gets the pool id from which the RingIO attr buffer has been allocated. ============================================================================.
#define IS_WRITER(client)   ((client)->openMode == RINGIO_MODE_WRITE)
 Check if client is a writer. ============================================================================.
#define IS_READER(client)   ((client)->openMode == RINGIO_MODE_READ)
 Check if client is a reader. ============================================================================.
#define GET_CUR_ATTR_END(control)   ((control)->curAttrBufEnd + 1)
 Get Current attr buffer end. ============================================================================.
#define GET_CUR_DATA_END(control)   ((control)->curBufEnd + 1)
 Get Current data buffer end. ============================================================================.
#define ADJUST_MODULO(start, size, bufSize)   (((start) + (size)) % bufSize)
 Modulo operation ============================================================================.
#define SIZEOF_ATTR(size)   (sizeof (RingIO_Attr) + (size))
 Size of RingIO attributes ============================================================================.
typedef RingIO_Ctrl_tag RingIO_Ctrl
 Gets the entry id of the RingIO ============================================================================.

RingIO_Handle

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

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

typedef Ptr RingIO_Handle

RingIO_ControlHandle

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

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

typedef RingIO_ControlStruct_tagRingIO_ControlHandle

RingIO_BufPtr

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

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

typedef Ptr RingIO_BufPtr

RingIO_NotifyParam

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

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

typedef Ptr 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:
handle Handle to the RingIO.
param Parameter used while registering the notification.
msg Message 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:
transportType Transport type - This specifies whether the data transport is between DSP<-> DSP or DSP<->ARM.
ctrlPoolId Pool to be used to allocate memory for control structure.
dataPoolId Pool to be used to allocate memory for data buffer.
attrPoolId Pool to be used to allocate memory for attribute buffer.
lockPoolId Pool to be used to allocate memory for lock structure.
dataBufSize Data Buffer Size in bytes.
footBufSize Footer area for providing contiguous buffer to a reader.
attrBufSize Attribute buffer size in bytes. ============================================================================


typedef RingIO_Attrs_tag RingIO_Attrs

RingIO_ControlStruct

Forward declaration of RingIO_ControlStruct. ============================================================================

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

typedef 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:
procId Processor Id where the client is executing
openMode Indicates whether the client is a reader or writer
pDataStart Virtual start address of the data buffer
pAttrStart Virtual start address of the attr buffer
acqStart Start offset of data buffer that has been acquired by the application.
acqSize Size of data that has been acquired
acqAttrStart Start offset of the acquired attribute buffer
acqAttrSize Size of attribute data that has been acquired
notifyType Notification type
notifyFunc Notification function for this client
notifyParam Parameter to the Notification function
notifyWaterMark Watermark that should be satisfied before notification is done
flags Counting 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)
virtControlHandle Handle 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
virtLockHandle Virtual (GPP) address of the lock that should be used to protect the Control structure from multiple accesses.
isValid Indicates whether the Client is initialized
notifyFlag Denotes whether notification needs to be done or not
refCount Denotes whether ringio has been re-opened or not
padding Padding. ============================================================================


typedef RingIO_Client_tag RingIO_Client

RingIO_Entry

Entry structure for the RingIO data transport

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

Parameters:
name System wide unique identifier for the RingIO
phyControl Physical (DSP) address of the Control structure for the RingIO.
virtControl Virtual (GPP) address of the Control structure for the RingIO.
ownerProcId Creator's processor ID of this ringio.
ctrlPoolId Pool to be used to allocate memory for control structure.
dataPoolId Pool to be used to allocate memory for data buffer.
attrPoolId Pool to be used to allocate memory for attribute buffer.
lockPoolId Pool to be used to allocate memory for lock structure.
padding Padding. ============================================================================


typedef RingIO_Entry_tag RingIO_Entry

RingIO_NotifyType

Enumeration of RingIO notification types.

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

Parameters:
RINGIO_NOTIFICATION_NONE No notification required.
RINGIO_NOTIFICATION_ALWAYS Notify whenever the other side sends data/frees up space.
RINGIO_NOTIFICATION_ONCE Notify 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_ALWAYS Notify whenever the other side sends data/frees up space. This notification is never disabled.
RINGIO_NOTIFICATION_HDWRFIFO_ONCE Notify 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_OpenMode

Enumeration of RingIO open modes.

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

Parameters:
RINGIO_MODE_READ Reader mode.
RINGIO_MODE_WRITE Writer mode. ============================================================================


enum  RingIO_OpenMode { RINGIO_MODE_READ = 0, RINGIO_MODE_WRITE }

RingIO_TransportType

Enumeration of RingIO transport types.

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

Parameters:
RINGIO_TRANSPORT_DSP_DSP Intra-DSP transport.
RINGIO_TRANSPORT_GPP_DSP GPP<->DSP transport. ============================================================================


enum  RingIO_TransportType { RINGIO_TRANSPORT_DSP_DSP = 1, RINGIO_TRANSPORT_GPP_DSP }

Defines

#define RINGIODEFS_H
#define RINGIO_SUCCESS   (SYS_OK)
#define RINGIO_BASE   (SYS_EUSER)
#define RINGIO_SPENDINGATTRIBUTE   (RINGIO_BASE + 0x1)
#define RINGIO_EFAILURE   (RINGIO_BASE + 0x2)
#define RINGIO_EBUFWRAP   (RINGIO_BASE + 0x3)
#define RINGIO_EBUFEMPTY   (RINGIO_BASE + 0x4)
#define RINGIO_EBUFFULL   (RINGIO_BASE + 0x5)
#define RINGIO_EPENDINGDATA   (RINGIO_BASE + 0x6)
#define RINGIO_EVARIABLEATTRIBUTE   (RINGIO_BASE + 0x7)
#define RINGIO_EALREADYEXISTS   (RINGIO_BASE + 0x8)
#define RINGIO_ENOTCONTIGUOUSDATA   (RINGIO_BASE + 0x9)
#define RINGIO_EWRONGSTATE   (RINGIO_BASE + 0xA)
#define RINGIO_NAME_MAX_LEN   DSP_MAX_STRLEN
 Maximum length of RingIO strings. ============================================================================.
#define RINGIO_INVALID_ATTR   (Uint16) 0xFFFF
#define RINGIO_DATABUF_CACHEUSE   0x1
 These constants denote the flags provided while opening the RingIO. ============================================================================.
#define RINGIO_ATTRBUF_CACHEUSE   0x2
#define RINGIO_CONTROL_CACHEUSE   0x4
#define RINGIO_NEED_EXACT_SIZE   0x8


Define Documentation

#define ADJUST_MODULO start,
size,
bufSize   )     (((start) + (size)) % bufSize)
 

Modulo operation ============================================================================.

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

Macro:
ADJUST_MODULO

Definition at line 625 of file dsp/inc/ringiodefs.h.

#define GET_ATTR_POOL_ID entryId   )     (RingIO_ctrlPtr->entry [entryId].attrPoolId)
 

Gets the pool id from which the RingIO attr buffer has been allocated. ============================================================================.

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

Macro:
GET_ATTR_POOL_ID

Definition at line 585 of file dsp/inc/ringiodefs.h.

#define GET_CTRL_POOL_ID entryId   )     (RingIO_ctrlPtr->entry [entryId].ctrlPoolId)
 

Gets the pool id from which the RingIO control structure has been validated. ============================================================================.

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

Macro:
GET_CTRL_POOL_ID

Definition at line 567 of file dsp/inc/ringiodefs.h.

#define GET_CUR_ATTR_END control   )     ((control)->curAttrBufEnd + 1)
 

Get Current attr buffer end. ============================================================================.

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

Macro:
GET_CUR_ATTR_END

Definition at line 609 of file dsp/inc/ringiodefs.h.

#define GET_CUR_DATA_END control   )     ((control)->curBufEnd + 1)
 

Get Current data buffer end. ============================================================================.

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

Macro:
GET_CUR_DATA_END

Definition at line 617 of file dsp/inc/ringiodefs.h.

#define GET_DATA_POOL_ID entryId   )     (RingIO_ctrlPtr->entry [entryId].dataPoolId)
 

Gets the pool id from which the RingIO data buffer has been allocated. ============================================================================.

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

Macro:
GET_DATA_POOL_ID

Definition at line 576 of file dsp/inc/ringiodefs.h.

#define GET_ENTRY_ID client   )     ((client)->virtControlHandle->entryId)
 

Gets the entry id of the RingIO ============================================================================.

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

Macro:
GET_ENTRY_ID

Definition at line 549 of file dsp/inc/ringiodefs.h.

#define GET_LOCK_POOL_ID entryId   )     (RingIO_ctrlPtr->entry [entryId].lockPoolId)
 

Gets the pool id from which the MPCS lock object structure has been allocated. ============================================================================.

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

Macro:
GET_LOCK_POOL_ID

Definition at line 558 of file dsp/inc/ringiodefs.h.

#define IS_READER client   )     ((client)->openMode == RINGIO_MODE_READ)
 

Check if client is a reader. ============================================================================.

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

Macro:
IS_READER

Definition at line 601 of file dsp/inc/ringiodefs.h.

#define IS_WRITER client   )     ((client)->openMode == RINGIO_MODE_WRITE)
 

Check if client is a writer. ============================================================================.

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

Macro:
IS_WRITER

Definition at line 593 of file dsp/inc/ringiodefs.h.

#define RINGIO_ATTRBUF_CACHEUSE   0x2
 

Definition at line 123 of file dsp/inc/ringiodefs.h.

#define RINGIO_BASE   (SYS_EUSER)
 

Definition at line 58 of file dsp/inc/ringiodefs.h.

#define RINGIO_CONTROL_CACHEUSE   0x4
 

Definition at line 124 of file dsp/inc/ringiodefs.h.

#define RINGIO_DATABUF_CACHEUSE   0x1
 

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

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

Constant:
RINGIO_DATABUF_CACHEUSE, RINGIO_ATTRBUF_CACHEUSE, RINGIO_CONTROL_CACHEUSE, RINGIO_NEED_EXACT_SIZE

Definition at line 122 of file dsp/inc/ringiodefs.h.

#define RINGIO_EALREADYEXISTS   (RINGIO_BASE + 0x8)
 

Definition at line 88 of file dsp/inc/ringiodefs.h.

#define RINGIO_EBUFEMPTY   (RINGIO_BASE + 0x4)
 

Definition at line 74 of file dsp/inc/ringiodefs.h.

#define RINGIO_EBUFFULL   (RINGIO_BASE + 0x5)
 

Definition at line 77 of file dsp/inc/ringiodefs.h.

#define RINGIO_EBUFWRAP   (RINGIO_BASE + 0x3)
 

Definition at line 71 of file dsp/inc/ringiodefs.h.

#define RINGIO_EFAILURE   (RINGIO_BASE + 0x2)
 

Definition at line 67 of file dsp/inc/ringiodefs.h.

#define RINGIO_ENOTCONTIGUOUSDATA   (RINGIO_BASE + 0x9)
 

Definition at line 93 of file dsp/inc/ringiodefs.h.

#define RINGIO_EPENDINGDATA   (RINGIO_BASE + 0x6)
 

Definition at line 81 of file dsp/inc/ringiodefs.h.

#define RINGIO_EVARIABLEATTRIBUTE   (RINGIO_BASE + 0x7)
 

Definition at line 85 of file dsp/inc/ringiodefs.h.

#define RINGIO_EWRONGSTATE   (RINGIO_BASE + 0xA)
 

Definition at line 96 of file dsp/inc/ringiodefs.h.

#define RINGIO_INVALID_ATTR   (Uint16) 0xFFFF
 

Definition at line 113 of file dsp/inc/ringiodefs.h.

#define RINGIO_NAME_MAX_LEN   DSP_MAX_STRLEN
 

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

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

Macro:
RINGIO_NAME_MAX_LEN

Definition at line 104 of file dsp/inc/ringiodefs.h.

#define RINGIO_NEED_EXACT_SIZE   0x8
 

Definition at line 125 of file dsp/inc/ringiodefs.h.

#define RINGIO_SPENDINGATTRIBUTE   (RINGIO_BASE + 0x1)
 

Definition at line 64 of file dsp/inc/ringiodefs.h.

#define RINGIO_SUCCESS   (SYS_OK)
 

Definition at line 57 of file dsp/inc/ringiodefs.h.

#define RINGIODEFS_H
 

Definition at line 44 of file dsp/inc/ringiodefs.h.

#define SIZEOF_ATTR size   )     (sizeof (RingIO_Attr) + (size))
 

Size of RingIO attributes ============================================================================.

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

Macro:
SIZEOF_ATTR

Definition at line 633 of file dsp/inc/ringiodefs.h.


Typedef Documentation

typedef struct RingIO_Attrs_tag RingIO_Attrs
 

typedef Ptr RingIO_BufPtr
 

Definition at line 214 of file dsp/inc/ringiodefs.h.

typedef struct RingIO_Client_tag RingIO_Client
 

typedef struct RingIO_ControlStruct_tag* RingIO_ControlHandle
 

Definition at line 206 of file dsp/inc/ringiodefs.h.

typedef struct RingIO_ControlStruct_tag RingIO_ControlStruct
 

Definition at line 293 of file dsp/inc/ringiodefs.h.

typedef struct RingIO_Ctrl_tag RingIO_Ctrl
 

Gets the entry id of the RingIO ============================================================================.

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

Macro:
GET_ENTRY_ID

typedef struct RingIO_Entry_tag RingIO_Entry
 

typedef Ptr RingIO_Handle
 

Definition at line 198 of file dsp/inc/ringiodefs.h.

typedef Void(* RingIO_NotifyFunc)(RingIO_Handle handle, RingIO_NotifyParam param, RingIO_NotifyMsg msg)
 

Definition at line 247 of file dsp/inc/ringiodefs.h.

typedef Uint16 RingIO_NotifyMsg
 

Definition at line 230 of file dsp/inc/ringiodefs.h.

typedef Ptr RingIO_NotifyParam
 

Definition at line 222 of file dsp/inc/ringiodefs.h.


Enumeration Type Documentation

enum RingIO_NotifyType
 

Enumerator:
RINGIO_NOTIFICATION_NONE 
RINGIO_NOTIFICATION_ALWAYS 
RINGIO_NOTIFICATION_ONCE 
RINGIO_NOTIFICATION_HDWRFIFO_ALWAYS 
RINGIO_NOTIFICATION_HDWRFIFO_ONCE 

Definition at line 151 of file dsp/inc/ringiodefs.h.

enum RingIO_OpenMode
 

Enumerator:
RINGIO_MODE_READ 
RINGIO_MODE_WRITE 

Definition at line 170 of file dsp/inc/ringiodefs.h.

00170             {
00171     RINGIO_MODE_READ = 0,
00172     RINGIO_MODE_WRITE
00173 } RingIO_OpenMode ;

enum RingIO_TransportType
 

Enumerator:
RINGIO_TRANSPORT_DSP_DSP 
RINGIO_TRANSPORT_GPP_DSP 

Definition at line 186 of file dsp/inc/ringiodefs.h.


Generated on Fri Jul 16 14:34:09 2010 for DSP/BIOSLink by  doxygen 1.4.4