module ti.sdo.utils.MultiProc |
![](../../../Arrow_left.png) |
![](../../../Arrow_up.png) |
![](../../../Arrow_right.png) |
Processor Id Module Manager
Many IPC modules require the ability to uniquely specify and identify
processors in a multi-processor environment. The MultiProc module
centeralizes processor id management into one module. Since this
configuration is almost always universally required, most IPC applications
require supplying configuration of this module.
[
more ... ]
#include <ti/sdo/utils/MultiProc.h>
Functions common to all target modules |
|
|
Defines |
#define | |
Constants |
| |
| |
extern const UInt16 | |
DETAILS
Many IPC modules require the ability to uniquely specify and identify
processors in a multi-processor environment. The MultiProc module
centeralizes processor id management into one module. Since this
configuration is almost always universally required, most IPC applications
require supplying configuration of this module.
Each processor in the MultiProc module may be uniquely identified by
either a name string or an integer ranging from 0 to MAXPROCESSORS - 1.
Configuration is supplied using the
setConfig meta function.
The setConfig function tells the MultiProc module:
- The specific processor for which the application is being built
- Which processors out of a set of possible processors on a device are
being used by the multi-processor application
Using the information supplied using the
setConfig meta function,
The
numProcessors module configuration and the processor IDs are
internally set. Please refer to the documentation for
setConfig
for more details.
At runtime, the
getId call returns the MultiProc id
for any processor. At config-time, the
getIdMeta call returns the
the same value. At both run time and static time, the
numProcessors module config is equal to the length of the
procNames array supplied in
setConfig.
const MultiProc_INVALIDID |
![](../../../Arrow_up.png) |
Invalid processor id constant
#define MultiProc_INVALIDID (UInt16)0xFFFF
DETAILS
This constant denotes that the processor id is not valid.
config MultiProc_A_invalidMultiProcId // module-wide |
![](../../../Arrow_up.png) |
Assert raised when an invalid processor id is used
extern const Assert_Id MultiProc_A_invalidMultiProcId;
config MultiProc_A_invalidProcName // module-wide |
![](../../../Arrow_up.png) |
Assert raised when a NULL processor name is encountered
extern const Assert_Id MultiProc_A_invalidProcName;
config MultiProc_numProcessors // module-wide |
![](../../../Arrow_up.png) |
Number of processors in the system
extern const UInt16 MultiProc_numProcessors;
DETAILS
This configuration should only be read from and should never be set:
numProcessors is internally set by the
setConfig meta function.
setConfig statically sets the value of this configuration to the length
of the supplied nameList array. After
setConfig has been
called, it is possible to retrive the maximum # of processors by
reading this module config either at run-time or at config time.
Module-Wide Built-Ins |
![](../../../Arrow_up.png) |
// Get this module's unique id
Bool MultiProc_Module_startupDone();
// Test if this module has completed startup
// The heap from which this module allocates memory
Bool MultiProc_Module_hasMask();
// Test whether this module has a diagnostics mask
Bits16 MultiProc_Module_getMask();
// Returns the diagnostics mask for this module
Void MultiProc_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
module-wide constants & types
module-wide config parameters
msg: "A_invalidMultiProcId: Invalid MultiProc id"
};
msg: "A_invalidProcName: NULL MultiProc name encountered"
};
module-wide functions
const MultiProc.INVALIDID |
![](../../../Arrow_up.png) |
Invalid processor id constant
XDCscript usage |
meta-domain |
const MultiProc.INVALIDID = 0xFFFF;
DETAILS
This constant denotes that the processor id is not valid.
C SYNOPSIS
metaonly struct MultiProc.ModuleView |
![](../../../Arrow_up.png) |
XDCscript usage |
meta-domain |
var obj = new MultiProc.ModuleView;
obj.id = UInt16 ...
obj.numProcessors = UInt16 ...
obj.nameList = String[] ...
config MultiProc.A_invalidMultiProcId // module-wide |
![](../../../Arrow_up.png) |
Assert raised when an invalid processor id is used
XDCscript usage |
meta-domain |
msg: "A_invalidMultiProcId: Invalid MultiProc id"
};
C SYNOPSIS
config MultiProc.A_invalidProcName // module-wide |
![](../../../Arrow_up.png) |
Assert raised when a NULL processor name is encountered
XDCscript usage |
meta-domain |
msg: "A_invalidProcName: NULL MultiProc name encountered"
};
C SYNOPSIS
config MultiProc.numProcessors // module-wide |
![](../../../Arrow_up.png) |
Number of processors in the system
XDCscript usage |
meta-domain |
MultiProc.numProcessors = UInt16 1;
DETAILS
This configuration should only be read from and should never be set:
numProcessors is internally set by the
setConfig meta function.
setConfig statically sets the value of this configuration to the length
of the supplied nameList array. After
setConfig has been
called, it is possible to retrive the maximum # of processors by
reading this module config either at run-time or at config time.
C SYNOPSIS
metaonly config MultiProc.common$ // module-wide |
![](../../../Arrow_up.png) |
Common module configuration parameters
XDCscript usage |
meta-domain |
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 MultiProc.rovViewInfo // module-wide |
![](../../../Arrow_up.png) |
XDCscript usage |
meta-domain |
metaonly MultiProc.getDeviceProcNames() // module-wide |
![](../../../Arrow_up.png) |
Returns an array of all possible processor names on the build device
XDCscript usage |
meta-domain |
MultiProc.getDeviceProcNames() returns Any
DETAILS
@(return) Array of valid MultiProc processor names
metaonly MultiProc.getIdMeta() // module-wide |
![](../../../Arrow_up.png) |
Meta version of getId
XDCscript usage |
meta-domain |
MultiProc.getIdMeta(String name) returns UInt16
ARGUMENTS
name
MultiProc procName
DETAILS
Statically returns the internally set ID based on configuration
supplied via
setConfig.
metaonly MultiProc.setConfig() // module-wide |
![](../../../Arrow_up.png) |
Configure the MultiProc module
XDCscript usage |
meta-domain |
MultiProc.setConfig(String name, String[] nameList) returns Void
ARGUMENTS
name
MultiProc name for the local processor
nameList
Array of all processors used by the application
DETAILS
Configuration of the MultiProc module is primarily accomplished using
the setConfig API at config time. The setConfig API allows the
MultiProc module to identify:
- Which is the local processor
- Which processors are being used
The second of these two pieces of information is supplied via the
nameList argument. The nameList is a non-empty set of distinct
processors valid for the particular device. For a list of valid
processor names for a given device, please refer to the :
Table of
Valid Names for Each Device.
The local processor is identified by using a single name from
nameList. A MultiProc id is internally set to the index of
'name' in the supplied 'nameList'. I.e. in the example:
MultiProc.setConfig("DSP", ["HOST", "DSP", "OTHERCORE"]);
The processors, "HOST", "DSP" and "OTHERCORE" get assigned MultiProc
IDs 0, 1, and 2, respectively. The local processor, "DSP" is assigned
an ID of '1'.
If the local processor is not known at static time, it is possible to
supply a null name. MultiProc will set the local id to
INVALIDID until it is set at runtime using
MultiProc_setLocalId.
generated on Wed, 23 Mar 2011 16:23:24 GMT