CrossCoreWaitFlag (ISASI)
Supported Products
Product |
Supported/Unsupported |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
|
x |
Function Usage
Inter-core synchronization control API for the split 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 values are as follows:
|
pipe |
The pipeline type of the instruction. For details about the pipeline type, see Pipelines. |
Parameter |
Input/Output |
Description |
|---|---|---|
flagId |
Input |
Flag ID of the inter-core synchronization. For the For the |
Returns
None
Constraints
- When using this synchronization API, you need to set the kernel type according to the following rules:
- In the pure Vector/Cube scenario, the kernel type must be set to KERNEL_TYPE_MIX_AIV_1_0 or KERNEL_TYPE_MIX_AIC_1_0.
- In the scenario where the Vector and Cube are used together, the kernel type must be configured 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.
Examples
For details, see the Examples.