ABCDEFGHIJKLMNOPQRSTUVW
1
BIT064 bit
2
Flags
3
BRAM REGISTER [B]L1 cache [A]Find Emax and Align
4
ScaleREG [B] [1]REG [B] [1]weightsystolic top [A] [1]Calculation result is both result & accumulated result
5
weightVdotM top [A] [1]result * (Weight's scale)
6
L2 cache REGISTER [C]VdotM top [A] [2]
7
addr len 17bitbitMega bitVdotM top [A] [3]
8
14,680,06414.68...VdotM top [A] [4]
9
10
11
GEMVBIT41717666530
12
opcodeDest Address (17bit)src Address (17bit)Flagssize (pointer)addressconstant (pointer)addressparallel Lane
13
GEMVL2 cache addressL2 cache addressFind Emax Alignsize of weight RAM's
address (pointer)
| 0 ~ 512 | 0x0040 |
shape RAM's
address (pointer)
| 0 ~ 64 | 0x0040 |
v dot m{0, 1, 2, 3}
14
ACCM
15
w * scale
16
fmap size update
17
18
GEMV
API
GEMVGEMV0 ~ 0x1FFFF0 ~ 0x1FFFFFind Emax Align0 ~ 0x00400 ~ 0x00400
1
2
3
19
ACCM
20
w * scale
21
fmap size update
22
23
24
25
26
GEMMBIT41717666530
27
opcodeDest Address (17bit)src Address (17bit)Flagssize (pointer)addressshape (pointer)addressparallel Lanereserved
28
GEMML2 cache addressL2 cache addressFind Emax Alignsize of weight RAM's
address (pointer)
| 0 ~ 512 | 0x0040 |
shape RAM's
address (pointer)
| 0 ~ 64 | 0x0040 |
v dot m{0, 1, 2, 3}
29
ACCM
30
w * scale
31
fmap size update
32
33
GEMM
API
GEMMGEMM0 ~ 0x1FFFF0 ~ 0x1FFFFFind Emax Align0 ~ 0x00400 ~ 0x00400
1
2
3
34
ACCM
35
w * scale
36
fmap size update
37
38
39
40
41
memcpyBIT411171717610
42
OpcodeFrom deviceTo devideDest Address (17bit)src Address (17bit)Address (17bit)shape (pointer)addressasync
43
memcpyFrom NPU L2To NPU (L2)L2 cache addressL2 cache addressL2 cache addressshape RAM's
address (pointer)
| 0 ~ 64 | 0x0040 |
1/0
44
To CPU
45
46
memcpy
API
memcpy_div_2_divmemcpy11/00 ~ 0x1FFFF0 ~ 0x1FFFF0 ~ 0x1FFFF0 ~ 0x00401
47
48
memcpy_div_2_host
49
50
memcpy_host_2_div
51
52
memcpy_div_2_div_async
53
54
memcpy_div_2_host_async
55
56
memcpy_host_2_div_async
57
58
memcpy_2D
59
60
memcpy_2D_async
61
62
memcpy_3D
63
64
memcpy_3D_async
65
66
67
68
69
memsetBIT42617171710
70
Opcodeselect cacheA addressA valueA valueA valuereserved
71
memsetshape cachesize of weight cache's
address (pointer)
| 0 ~ 64 | 0x0040 |
size of weight RAM'ssize of weight RAM'ssize of weight RAM's
72
73
weight cache617171710
74
A addressA valueA valueA valuereserved
75
shape cache's
address (pointer)
| 0 ~ 64 | 0x0040 |
size of weight RAM'ssize of weight RAM'ssize of weight RAM's
76
77
memset
78
memsetmemset
79
80
mem_all_clearshape/weight RAM----------------------------------------------------------------------------------------------
81
82
memset_weightweight RAM0 ~ 0x00400 ~ 0x00400 ~ 0x00400 ~ 0x0040
83
84
memset_shapeweight RAM