WS63 SDK 文档
7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
chip_definitions.h
浏览该文件的文档.
1
/*
2
* Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2018-2020. All rights reserved.
3
* Description: Basic chip definitions
4
* Author:
5
* Create: 2018-10-15
6
*/
7
#ifndef LIB_COMMON_HEADERS_CHIP_DEFINITIONS_H
8
#define LIB_COMMON_HEADERS_CHIP_DEFINITIONS_H
9
19
#define BT 0
20
#define PROTOCOL 1
21
#define APPS 2
22
#define GNSS 3
23
#define SECURITY 4
24
#define HIFI PROTOCOL
25
#define WIFI 5
26
#define CONTROL_CORE 6
27
#define SENSOR 7
28
29
#define CM3 0
30
#define CM7 1
31
#define RISCV31 2
32
#define RISCV70 3
33
#define RISCV32 4
34
35
#define CHIP_LIBRA (TARGET_CHIP_LIBRA)
36
#define CHIP_SOCMN1 (TARGET_CHIP_SOCMN1)
37
#define CHIP_BS25 (TARGET_CHIP_BS25)
38
#define CHIP_BRANDY (TARGET_CHIP_BRANDY)
39
#define CHIP_SW39 (TARGET_CHIP_SW39)
40
#define CHIP_SW21 (TARGET_CHIP_SW21)
41
42
#if (CHIP_LIBRA == 1)
43
#define MASTER_BY_ALL APPS
44
#define CORE_NUMS 5
// Total cores in chip
45
#define CPU_NUM 3
// Total cpus in chip
46
#elif (CHIP_SOCMN1 == 1)
47
#define MASTER_BY_ALL APPS
48
#define CORE_NUMS 4
// Total cores in chip
49
#define CPU_NUM 3
// Total cpus in chip
50
#elif (CHIP_BS25 == 1)
51
#define MASTER_BY_ALL APPS
52
#define CORE_NUMS 2
// Total cores in chip
53
#define CPU_NUM 2
// Total cpus in chip
54
#elif (CHIP_BS20 == 1 || CHIP_BS21 == 1 || CHIP_BS21A == 1 || \
55
CHIP_BS21E == 1 || CHIP_BS22 == 1 || CHIP_BS26 == 1)
56
#define MASTER_BY_ALL APPS
57
#define CORE_NUMS 1
// Total cores in chip
58
#define CPU_NUM 1
// Total cpus in chip
59
#elif (CHIP_WS53 == 1)
60
#define MASTER_BY_ALL APPS
61
#define CORE_NUMS 2
// Total cores in chip
62
#define CPU_NUM 2
// Total cpus in chip
63
#elif (CHIP_WS63 == 1)
64
#define MASTER_BY_ALL APPS
65
#define CORE_NUMS 1
// Total cores in chip
66
#define CPU_NUM 1
// Total cpus in chip
67
#elif (CHIP_BRANDY == 1)
68
#define MASTER_BY_ALL APPS
69
#define CORE_NUMS 3
// Total cores in chip
70
#define CPU_NUM 3
// Total cpus in chip
71
#elif (CHIP_SW39 == 1)
72
#define MASTER_BY_ALL APPS
73
#define CORE_NUMS 6
// Total cores in chip
74
#define CPU_NUM 3
// Total cpus in chip
75
#elif (CHIP_CAT1 == 1)
76
#define MASTER_BY_ALL APPS
77
#define CORE_NUMS 2
// Total cores in chip
78
#define CPU_NUM 2
// Total cpus in chip
79
#elif (CHIP_SW21 == 1)
80
#define MASTER_BY_ALL APPS
81
#define CORE_NUMS 5
// Total cores in chip
82
#define CPU_NUM 5
// Total cpus in chip
83
#else
84
#error Please define master control core
85
#endif
86
87
#define OTHER_CPU_NUM (CPU_NUM - 1)
// Other cpus number, exclude current cpu.
88
89
#define MASTER_BY_LIBRA_ONLY (CHIP_LIBRA && (CORE == APPS))
90
#define MASTER_BY_SOCMN1_ONLY (CHIP_SOCMN1 && (CORE == APPS))
91
#define MASTER_BY_BS25_ONLY (CHIP_BS25 && (CORE == APPS))
92
#define MASTER_BY_BS20_ONLY (CHIP_BS20 && (CORE == APPS))
93
#define MASTER_BY_BS21_ONLY (CHIP_BS21 && (CORE == APPS))
94
#define MASTER_BY_BS21E_ONLY (CHIP_BS21E && (CORE == APPS))
95
#define MASTER_BY_BS21A_ONLY (CHIP_BS21A && (CORE == APPS))
96
#define MASTER_BY_BS22_ONLY (CHIP_BS22 && (CORE == APPS))
97
#define MASTER_BY_BS26_ONLY (CHIP_BS26 && (CORE == APPS))
98
#define MASTER_BY_BRANDY_ONLY (CHIP_BRANDY && (CORE == APPS))
99
#define MASTER_BY_WS53_ONLY (CHIP_WS53 && (CORE == APPS))
100
#define MASTER_BY_SW39_ONLY (CHIP_SW39 && (CORE == APPS))
101
#define MASTER_BY_SW21_ONLY (CHIP_SW21 && (CORE == APPS))
102
103
#define MASTER_ONLY (MASTER_BY_LIBRA_ONLY || \
104
MASTER_BY_SOCMN1_ONLY || MASTER_BY_BS25_ONLY || \
105
MASTER_BY_BRANDY_ONLY || MASTER_BY_BS20_ONLY || \
106
MASTER_BY_BS21_ONLY || MASTER_BY_BS21A_ONLY || \
107
MASTER_BY_BS22_ONLY || MASTER_BY_BS26_ONLY || \
108
MASTER_BY_WS53_ONLY || MASTER_BY_SW39_ONLY || \
109
MASTER_BY_SW21_ONLY || MASTER_BY_BS21E_ONLY)
110
111
#define MCU_ONLY (MASTER_BY_LIBRA_ONLY || MASTER_BY_SOCMN1_ONLY || \
112
MASTER_BY_BS25_ONLY || MASTER_BY_BRANDY_ONLY || \
113
MASTER_BY_WS53_ONLY || CHIP_WS63 || CHIP_BS20 || CHIP_BS21 || CHIP_BS21E || \
114
CHIP_BS21A || CHIP_BS22 || CHIP_BS26 || MASTER_BY_SW39_ONLY || \
115
MASTER_BY_SW21_ONLY)
116
117
118
#define SLAVE_BY_LIBRA_BT (CHIP_LIBRA && (CORE == BT))
119
#define SLAVE_BY_LIBRA_GNSS (CHIP_LIBRA && (CORE == GNSS))
120
#define SLAVE_BY_LIBRA_SECURITY (CHIP_LIBRA && (CORE == SECURITY))
121
#define SLAVE_BY_LIBRA_ONLY (SLAVE_BY_LIBRA_BT || SLAVE_BY_LIBRA_GNSS || SLAVE_BY_LIBRA_SECURITY)
122
#define SLAVE_BY_SOCMN1_ONLY (CHIP_SOCMN1 && (CORE == BT))
123
#define SLAVE_BY_SW39_BT (CHIP_SW39 && (CORE == BT))
124
#define SLAVE_BY_BS25_ONLY (CHIP_BS25 && (CORE == BT))
125
#define SLAVE_BY_BRANDY_BT (CHIP_BRANDY && (CORE == BT))
126
#define SLAVE_BY_BRANDY_DSP (CHIP_BRANDY && (CORE == DSP))
127
#define SLAVE_BY_BRANDY_ONLY (SLAVE_BY_BRANDY_BT || SLAVE_BY_BRANDY_DSP)
128
#define SLAVE_BY_WS53_ONLY (CHIP_WS53 && (CORE == CONTROL_CORE))
129
130
#define CHIP_LIBRA_FPGA (CHIP_LIBRA && (LIBRA_CHIP_FPGA))
131
#define CHIP_LIBRA_CS (CHIP_LIBRA && (LIBRA_CHIP_CS))
132
133
#define CHIP_SOCMN1_FPGA (CHIP_SOCMN1 && (SOCMN1_CHIP_FPGA))
134
#define CHIP_SOCMN1_V100 (CHIP_SOCMN1 && (SOCMN1_CHIP_V100))
135
#define CHIP_SOCMN1_V200 (CHIP_SOCMN1 && (SOCMN1_CHIP_V200))
136
137
#define CHIP_BS25_FPGA (CHIP_BS25 && (BS25_CHIP_FPGA))
138
#define CHIP_BS25_V100 (CHIP_BS25 && (BS25_CHIP_V100))
139
140
#ifdef PRE_FPGA
141
#define FPGA 1
142
#define ASIC 0
143
#endif
144
145
#ifdef PRE_ASIC
146
#define FPGA 0
147
#define ASIC 1
148
#endif
149
150
#define CHIP_BS20_FPGA (CHIP_BS20 && (FPGA))
151
#define CHIP_BS20_V100 (CHIP_BS20 && (ASIC))
152
153
#define CHIP_BS21_FPGA (CHIP_BS21 && (FPGA))
154
#define CHIP_BS21_V100 (CHIP_BS21 && (ASIC))
155
156
#define CHIP_BS21E_FPGA (CHIP_BS21E && (FPGA))
157
#define CHIP_BS21E_V100 (CHIP_BS21E && (ASIC))
158
159
#define CHIP_BS21A_FPGA (CHIP_BS21A && (FPGA))
160
#define CHIP_BS21A_V100 (CHIP_BS21A && (ASIC))
161
162
#define CHIP_BS22_FPGA (CHIP_BS22 && (FPGA))
163
#define CHIP_BS22_V100 (CHIP_BS22 && (ASIC))
164
165
#define CHIP_BS26_FPGA (CHIP_BS26 && (FPGA))
166
#define CHIP_BS26_V100 (CHIP_BS26 && (ASIC))
167
168
#define CHIP_WS63_FPGA (CHIP_WS63 && (FPGA))
169
#define CHIP_WS63_V100 (CHIP_WS63 && (ASIC))
170
171
#define CHIP_BRANDY_FPGA (CHIP_BRANDY && (BRANDY_CHIP_FPGA))
172
#define CHIP_BRANDY_V100 (CHIP_BRANDY && (BRANDY_CHIP_V100))
173
174
#define CHIP_SW39_FPGA (CHIP_SW39 && (SW39_CHIP_FPGA))
175
176
#define CHIP_SW21_FPGA (CHIP_SW21 && (SW21_CHIP_FPGA))
177
#define CHIP_SW21_V100 (CHIP_SW21 && (SW21_CHIP_V100))
178
179
#define CHIP_WS53_FPGA (CHIP_WS53 && (FPGA))
180
#define CHIP_WS53_V100 (CHIP_WS53 && (ASIC))
181
182
#define CHIP_FPGA (CHIP_LIBRA_FPGA || CHIP_SOCMN1_FPGA || CHIP_BS25_FPGA || CHIP_SW39_FPGA || \
183
CHIP_BRANDY_FPGA || CHIP_BS20_FPGA || CHIP_BS21_FPGA || CHIP_BS21A_FPGA || \
184
CHIP_BS22_FPGA || CHIP_BS26_FPGA || CHIP_WS63_FPGA || CHIP_WS53_FPGA || \
185
CHIP_SW21_FPGA || CHIP_BS21E_FPGA)
186
187
#define CHIP_SOCMN1_ASIC (CHIP_SOCMN1_V100 || CHIP_SOCMN1_V200)
188
#define CHIP_BS25_ASIC (CHIP_BS25_V100)
189
#define CHIP_BS20_ASIC (CHIP_BS20_V100)
190
#define CHIP_BS21_ASIC (CHIP_BS21_V100)
191
#define CHIP_BS21E_ASIC (CHIP_BS21E_V100)
192
#define CHIP_BS21A_ASIC (CHIP_BS21A_V100)
193
#define CHIP_BS22_ASIC (CHIP_BS22_V100)
194
#define CHIP_BS26_ASIC (CHIP_BS26_V100)
195
#define CHIP_BRANDY_ASIC (CHIP_BRANDY_V100)
196
#define CHIP_WS63_ASIC (CHIP_WS63_V100)
197
#define CHIP_WS53_ASIC (CHIP_WS53_V100)
198
#define CHIP_SW21_ASIC (CHIP_SW21_V100)
199
200
#define CHIP_ASIC (CHIP_LIBRA_CS || CHIP_SOCMN1_ASIC || \
201
CHIP_BS25_ASIC || CHIP_BRANDY_ASIC || \
202
CHIP_BS20_ASIC || CHIP_BS21_ASIC || \
203
CHIP_BS21A_ASIC || CHIP_BS22_ASIC || \
204
CHIP_BS26_ASIC || CHIP_WS63_ASIC || \
205
CHIP_WS53_ASIC || CHIP_SW21_ASIC || \
206
CHIP_BS21E_ASIC)
207
209
#endif
src
middleware
utils
common_headers
chip_definitions.h
由
William Goodspeed
维护 | E-mail: gongzl@stu.hebust.edu.cn | Wechat: a23333344 | ALSO CHECKOUT
WS63FLASH
!
生成于 2025年 一月 4日 星期六 17:47:12 , 为 WS63 SDK 文档使用
1.9.8