This section describes the hardware architecture and functions of the __NPU_ARCH__ version 200x. 200 indicates the IP core ID, and x indicates the configuration version of the same IP core. The corresponding product model is

Deployment of the Cube Unit and Vector Unit on the same core
In this architecture, the Cube Unit and Vector Unit are deployed on the same core and share the same Scalar Unit.
Vector Unit
Cube Unit
Obtaining the memory size of a storage unit
You can query the memory size of each storage unit by calling the platform information acquisition API.
Minimum access granularities (alignment requirements) of each storage unit
|
Storage Unit |
Alignment Requirement |
|---|---|
|
Unified Buffer |
32-byte aligned. |
|
L1 Buffer |
32-byte aligned. |
|
L0A Buffer |
512-byte aligned. |
|
L0B Buffer |
512-byte aligned. |
|
L0C Buffer |
64-byte aligned. |
Recommended data layout formats for each storage unit
These formats are optimized for compute-intensive tasks such as cube multiplication, significantly improving the compute efficiency.
Resolving access conflicts of storage units to improve read/write performance
When multiple operations attempt to access the same bank or bank group of the Unified Buffer at the same time, bank conflicts may occur, including the read-write conflict, write-write conflict, and read-read conflict. As a result, the accesses queue and the performance deteriorates. The read/write performance can be improved by optimizing bank allocation. For details, see Avoiding Bank Conflicts in the Unified Buffer.
Alignment requirements during movement
The size of the data to be moved is subject to certain requirements because the moved data is used for computation. The size of the data moved to the Unified Buffer must be aligned based on the data block size. The data moved to other storage units must be aligned based on the fractal requirements. For example, when data is moved from the L1 Buffer to the L0A Buffer, the data format needs to be converted from NZ to ZZ. The size of the data to be moved must be aligned based on the fractal size. If the remaining size of the L1 Buffer is less than one fractal, an exception will occur during hardware execution.
Intra-core synchronization
The execution units (such as the MTE2 and Vector Unit) within the AI Core operate asynchronously and in parallel. As a result, data dependencies may arise when reading data from or writing data to the local memory (such as the Unified Buffer). To ensure data consistency and computational accuracy, synchronization control is required to coordinate the timing of operations.
For example, in the process where the MTE2 moves data from the GM to the UB for Abs computation by the Vector Unit and then moves the data back to the GM, the following synchronization conditions must be met:
The synchronization control process is shown in the following figure.

In the preceding figure, ID1, ID2, ID3, ID4, ID5, and ID6 represent event IDs. Each event ID corresponds to the movement status of a piece of stored data, ensuring the correctness and consistency of data operations.
For example, SetFlag<HardEvent::S_MTE3>(1) and SetFlag<HardEvent::MTE3_MTE1>(1) set different event IDs because their template parameters are different. They set the same event ID only when their template parameters and event IDs are the same.
Inter-core synchronization
This hardware architecture does not support inter-core synchronization.