CrossCoreWaitFlag (ISASI)
Product Support
Product |
Supported |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
|
x |
Function
Sets the inter-core synchronization control for the separate mode. This API works with CrossCoreSetFlag. For details, see CrossCoreSetFlag.
Prototype
1 2 | template <uint8_t modeId = 0, pipe_t pipe = PIPE_S> __aicore__ inline void CrossCoreWaitFlag(uint16_t flagId) |
Parameters
Parameter |
Description |
|---|---|
modeId |
Inter-core synchronization mode. The options are as follows:
|
pipe |
The pipeline type of the instruction. For details about the pipeline types, see Pipelines. |
Parameter |
Input/Output |
Description |
|---|---|---|
flagId |
Input |
Flag ID of the inter-core synchronization. For the For the |
Returns
None
Restrictions
- When using this synchronization API, you need to set the kernel type according to the following rules:
- In pure vector or cube scenarios, set the kernel type to KERNEL_TYPE_MIX_AIV_1_0 or KERNEL_TYPE_MIX_AIC_1_0.
- In vector and cube fused scenarios, set the kernel type based on the actual situation.
- CrossCoreWaitFlag must be used together with CrossCoreSetFlag to prevent the computing core from being always in the blocking phase.
- If the value of the counter of flagId is 0 when CrossCoreWaitFlag is executed, all instructions after CrossCoreWaitFlag are blocked until the value of the counter of flagId is not 0. The counter of the same flagId can be set for a maximum of 15 times.
Example
For details, see the Examples.