This driver is designed to work with a variety of devices, each with
distinct interrupt mechanisms. Therefore, this module needs to be plugged
with an appropriate module that implements the
IInterrupt interface
for a given device.
The driver utilizes shared memory in the manner indicated by the following
diagram.
NOTE: Processors '0' and '1' correspond to the processors with lower and
higher MultiProc ids, respectively
sharedAddr -> --------------------------- bytes
| recvInitStatus (0) | 4 -\
| sendInitStatus (0) | 4 |= sizeof(ProcCtrl)
| eventRegMask (0) | 4 |
| eventEnableMask (0) | 4 -/
| [PADDING] (if needed) |
|-------------------------|
| recvInitStatus (1) | 4
| sendInitStatus (1) | 4
| eventRegMask (1) | 4
| eventEnableMask (1) | 4
| [PADDING] (if needed) |
|-------------------------|
| eventEntry_0 (0) | 12 -> sizeof(EventEntry)
| [PADDING] (if needed) |
|-------------------------|
| eventEntry_1 (0) | 12
| [PADDING] (if needed) |
|-------------------------|
... ...
|-------------------------|
| eventEntry_N (0) | 12
| [PADDING] (if needed) |
|-------------------------|
| eventEntry_0 (1) | 12
| [PADDING] (if needed) |
|-------------------------|
| eventEntry_1 (1) | 12
| [PADDING] (if needed) |
|-------------------------|
... ...
|-------------------------|
| eventEntry_N (1) | 12
| [PADDING] (if needed) |
|-------------------------|
Legend:
(0), (1) : Memory that belongs to the proc with lower and higher
MultiProc.id, respectively
|----| : Cache line boundary
N : Notify_numEvents - 1
NotifyDriverShm_sharedMemReq() // module-wide |
|
Amount of shared memory required for creation of each instance
ARGUMENTS
params
Pointer to parameters that will be used in the
create
RETURNS
Number of MAUs in shared memory needed to create
the instance.
Module-Wide Built-Ins |
|
// Get this module's unique id
Bool NotifyDriverShm_Module_startupDone();
// Test if this module has completed startup
// The heap from which this module allocates memory
Bool NotifyDriverShm_Module_hasMask();
// Test whether this module has a diagnostics mask
Bits16 NotifyDriverShm_Module_getMask();
// Returns the diagnostics mask for this module
Void NotifyDriverShm_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
Instance Object Types |
|
typedef struct NotifyDriverShm_Object NotifyDriverShm_Object;
// Opaque internal representation of an instance object
// Client reference to an instance object
typedef struct NotifyDriverShm_Struct NotifyDriverShm_Struct;
// Opaque client structure large enough to hold an instance object
// Convert this instance structure pointer into an instance handle
// Convert this instance handle into an instance structure pointer
Instance Config Parameters |
|
typedef struct NotifyDriverShm_Params {
// Instance config-params structure
// Common per-instance configs
Bool cacheEnabled;
// Whether cache operations will be performed
SizeT cacheLineSize;
// The cache line size of the shared memory
UInt intVectorId;
// Interrupt vector ID to be used by the driver
UInt localIntId;
// Local interrupt ID for interrupt line
UInt remoteIntId;
// Remote interrupt ID for interrupt line
UInt16 remoteProcId;
// The MultiProc ID corresponding to the remote processor
Ptr sharedAddr;
// Address in shared memory where this instance will be placed
} NotifyDriverShm_Params;
// Initialize this config-params structure with supplier-specified defaults before instance creation
config NotifyDriverShm_Params.cacheEnabled // instance |
|
Whether cache operations will be performed
DETAILS
If it is known that no cache operations are needed for this instance
set this flag to FALSE. If
sharedAddr lies within a shared
region and the cache enabled setting for the region is FALSE,
then the value specified here will be overriden to FALSE.
config NotifyDriverShm_Params.cacheLineSize // instance |
|
The cache line size of the shared memory
DETAILS
This value should be configured
config NotifyDriverShm_Params.intVectorId // instance |
|
Interrupt vector ID to be used by the driver
DETAILS
This parameter is only used by C64x+ targets
config NotifyDriverShm_Params.localIntId // instance |
|
Local interrupt ID for interrupt line
DETAILS
For devices that support multiple inter-processor interrupt lines, this
configuration parameter allows selecting a specific line to use for
receiving an interrupt. The value specified here corresponds to the
incoming interrupt line on the local processor.
If this configuration is not set, a default interrupt id is
typically chosen.
config NotifyDriverShm_Params.remoteIntId // instance |
|
Remote interrupt ID for interrupt line
DETAILS
For devices that support multiple inter-processor interrupt lines, this
configuration parameter allows selecting a specific line to use for
receiving an interrupt. The value specified here corresponds to the
incoming interrupt line on the remote processor.
If this configuration is not set, a default interrupt id is
typically chosen.
config NotifyDriverShm_Params.remoteProcId // instance |
|
The MultiProc ID corresponding to the remote processor
DETAILS
This parameter must be set for every device. The
ti.sdo.utils.MultiProc.getId call can be used to obtain
a MultiProc id given the remote processor's name.
config NotifyDriverShm_Params.sharedAddr // instance |
|
Address in shared memory where this instance will be placed
DETAILS
Use
sharedMemReq to determine the amount of shared memory
required.
NotifyDriverShm_disable() // instance |
|
Disable a NotifyDriver instance
ARGUMENTS
handle
handle of a previously-created NotifyDriverShm instance object
DETAILS
Disables the ability of a Notify driver to receive events for a given
processor. This interface function is called by the Notify_disable
function. Refer to its documentation for more details.
NotifyDriverShm_disableEvent() // instance |
|
Disable an event
ARGUMENTS
handle
handle of a previously-created NotifyDriverShm instance object
eventId
Number of event to disable
DETAILS
This interface function is called by the Notify_disableEvent function.
Refer to its documentation for more details.
The Notify module does validation of the eventId. The Notify module
enters calls this function within the Notify module gate.
NotifyDriverShm_enable() // instance |
|
Enable a NotifyDriver instance
ARGUMENTS
handle
handle of a previously-created NotifyDriverShm instance object
DETAILS
Enables the ability of a Notify driver to receive events for a given
processor. This interface function is called by the Notify_restore
function. Refer to its documentation for more details.
NotifyDriverShm_enableEvent() // instance |
|
Enable an event
ARGUMENTS
handle
handle of a previously-created NotifyDriverShm instance object
eventId
Number of event to enable
DETAILS
This interface function is called by the Notify_disableEvent function.
Refer to its documentation for more details.
The Notify module does validation of the eventId. The Notify module
enters calls this function within the Notify module gate.
NotifyDriverShm_registerEvent() // instance |
|
Register a callback to an event
ARGUMENTS
handle
handle of a previously-created NotifyDriverShm instance object
eventId
Number of event that is being registered
DETAILS
This driver function is called by the Notify_registerEvent function
within the Notify module gate. Refer to its documentation for more
details.
NotifyDriverShm_sendEvent() // instance |
|
Send a signal to an event
ARGUMENTS
handle
handle of a previously-created NotifyDriverShm instance object
eventId
Number of event to signal
payload
Payload (optional) to pass to callback function
waitClear
If TRUE, have the NotifyDriver wait for
acknowledgement back from the destination
processor.
RETURNS
Notify status
DETAILS
This interface function is called by the Notify_sendEvent function.
Notify_sendEvent does not provide any context protection for
INotifyDriver_sendEvent, so appropriate measures must be taken within
the driver itself.
NotifyDriverShm_unregisterEvent() // instance |
|
Remove an event listener from an event
ARGUMENTS
handle
handle of a previously-created NotifyDriverShm instance object
eventId
Number of event that is being unregistered
DETAILS
This driver function is called by the Notify_unregisterEvent function
within the Notify module gate. Refer to it for more details.
Instance Convertors |
|
// unconditionally move one level up the inheritance hierarchy
// conditionally move one level down the inheritance hierarchy; NULL upon failure
Instance Built-Ins |
|
Int NotifyDriverShm_Object_count();
// The number of statically-created instance objects
// The handle of the i-th statically-created instance object (array == NULL)
// The handle of the first dynamically-created instance object, or NULL
// The handle of the next dynamically-created instance object, or NULL
// The heap used to allocate dynamically-created instance objects
// The label associated with this instance object
// The name of this instance object
metaonly config NotifyDriverShm.common$ // module-wide |
|
Common module configuration parameters
DETAILS
All modules have this configuration parameter. Its name
contains the '$' character to ensure it does not conflict with
configuration parameters declared by the module. This allows
new configuration parameters to be added in the future without
any chance of breaking existing modules.
metaonly config NotifyDriverShm.rovViewInfo // module-wide |
|
Instance Config Parameters |
|
var params = new NotifyDriverShm.Params;
// Instance config-params object
params.cacheEnabled = Bool true;
// Whether cache operations will be performed
params.cacheLineSize = SizeT 128;
// The cache line size of the shared memory
params.intVectorId = UInt ~1u;
// Interrupt vector ID to be used by the driver
params.localIntId = UInt -1u;
// Local interrupt ID for interrupt line
params.remoteIntId = UInt -1u;
// Remote interrupt ID for interrupt line
// The MultiProc ID corresponding to the remote processor
params.sharedAddr = Ptr null;
// Address in shared memory where this instance will be placed
config NotifyDriverShm.Params.cacheEnabled // instance |
|
Whether cache operations will be performed
var params = new NotifyDriverShm.Params;
...
params.cacheEnabled = Bool true;
DETAILS
If it is known that no cache operations are needed for this instance
set this flag to FALSE. If
sharedAddr lies within a shared
region and the cache enabled setting for the region is FALSE,
then the value specified here will be overriden to FALSE.
C SYNOPSIS
config NotifyDriverShm.Params.cacheLineSize // instance |
|
The cache line size of the shared memory
var params = new NotifyDriverShm.Params;
...
params.cacheLineSize = SizeT 128;
DETAILS
This value should be configured
C SYNOPSIS
config NotifyDriverShm.Params.intVectorId // instance |
|
Interrupt vector ID to be used by the driver
var params = new NotifyDriverShm.Params;
...
params.intVectorId = UInt ~1u;
DETAILS
This parameter is only used by C64x+ targets
C SYNOPSIS
config NotifyDriverShm.Params.localIntId // instance |
|
Local interrupt ID for interrupt line
var params = new NotifyDriverShm.Params;
...
params.localIntId = UInt -1u;
DETAILS
For devices that support multiple inter-processor interrupt lines, this
configuration parameter allows selecting a specific line to use for
receiving an interrupt. The value specified here corresponds to the
incoming interrupt line on the local processor.
If this configuration is not set, a default interrupt id is
typically chosen.
C SYNOPSIS
config NotifyDriverShm.Params.remoteIntId // instance |
|
Remote interrupt ID for interrupt line
var params = new NotifyDriverShm.Params;
...
params.remoteIntId = UInt -1u;
DETAILS
For devices that support multiple inter-processor interrupt lines, this
configuration parameter allows selecting a specific line to use for
receiving an interrupt. The value specified here corresponds to the
incoming interrupt line on the remote processor.
If this configuration is not set, a default interrupt id is
typically chosen.
C SYNOPSIS
config NotifyDriverShm.Params.remoteProcId // instance |
|
The MultiProc ID corresponding to the remote processor
var params = new NotifyDriverShm.Params;
...
DETAILS
This parameter must be set for every device. The
ti.sdo.utils.MultiProc.getId call can be used to obtain
a MultiProc id given the remote processor's name.
C SYNOPSIS
config NotifyDriverShm.Params.sharedAddr // instance |
|
Address in shared memory where this instance will be placed
var params = new NotifyDriverShm.Params;
...
params.sharedAddr = Ptr null;
DETAILS
Use
sharedMemReq to determine the amount of shared memory
required.
C SYNOPSIS