Tim Hall | 79d07d2 | 2020-04-27 18:20:16 +0100 | [diff] [blame] | 1 | # Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. |
| 2 | # |
| 3 | # SPDX-License-Identifier: Apache-2.0 |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the License); you may |
| 6 | # not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an AS IS BASIS, WITHOUT |
| 13 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | |
Diqing Zhong | b731170 | 2020-04-14 12:31:44 +0200 | [diff] [blame] | 17 | |
| 18 | |
Tim Hall | 79d07d2 | 2020-04-27 18:20:16 +0100 | [diff] [blame] | 19 | from ctypes import * |
| 20 | from enum import Enum |
| 21 | |
Diqing Zhong | fed918b | 2020-04-27 10:27:34 +0200 | [diff] [blame^] | 22 | ARCH_VER = '0.169.0' |
Tim Hall | 79d07d2 | 2020-04-27 18:20:16 +0100 | [diff] [blame] | 23 | |
| 24 | |
| 25 | class DEBUG_INTERNAL(Enum): |
| 26 | SHARED_BUFFER0 = 0x0400 |
| 27 | SHARED_BUFFER1 = 0x0404 |
| 28 | SHARED_BUFFER2 = 0x0408 |
| 29 | SHARED_BUFFER3 = 0x040C |
| 30 | SHARED_BUFFER4 = 0x0410 |
| 31 | SHARED_BUFFER5 = 0x0414 |
| 32 | SHARED_BUFFER6 = 0x0418 |
| 33 | SHARED_BUFFER7 = 0x041C |
| 34 | SHARED_BUFFER8 = 0x0420 |
| 35 | SHARED_BUFFER9 = 0x0424 |
| 36 | SHARED_BUFFER10 = 0x0428 |
| 37 | SHARED_BUFFER11 = 0x042C |
| 38 | SHARED_BUFFER12 = 0x0430 |
| 39 | SHARED_BUFFER13 = 0x0434 |
| 40 | SHARED_BUFFER14 = 0x0438 |
| 41 | SHARED_BUFFER15 = 0x043C |
| 42 | SHARED_BUFFER16 = 0x0440 |
| 43 | SHARED_BUFFER17 = 0x0444 |
| 44 | SHARED_BUFFER18 = 0x0448 |
| 45 | SHARED_BUFFER19 = 0x044C |
| 46 | SHARED_BUFFER20 = 0x0450 |
| 47 | SHARED_BUFFER21 = 0x0454 |
| 48 | SHARED_BUFFER22 = 0x0458 |
| 49 | SHARED_BUFFER23 = 0x045C |
| 50 | SHARED_BUFFER24 = 0x0460 |
| 51 | SHARED_BUFFER25 = 0x0464 |
| 52 | SHARED_BUFFER26 = 0x0468 |
| 53 | SHARED_BUFFER27 = 0x046C |
| 54 | SHARED_BUFFER28 = 0x0470 |
| 55 | SHARED_BUFFER29 = 0x0474 |
| 56 | SHARED_BUFFER30 = 0x0478 |
| 57 | SHARED_BUFFER31 = 0x047C |
| 58 | SHARED_BUFFER32 = 0x0480 |
| 59 | SHARED_BUFFER33 = 0x0484 |
| 60 | SHARED_BUFFER34 = 0x0488 |
| 61 | SHARED_BUFFER35 = 0x048C |
| 62 | SHARED_BUFFER36 = 0x0490 |
| 63 | SHARED_BUFFER37 = 0x0494 |
| 64 | SHARED_BUFFER38 = 0x0498 |
| 65 | SHARED_BUFFER39 = 0x049C |
| 66 | SHARED_BUFFER40 = 0x04A0 |
| 67 | SHARED_BUFFER41 = 0x04A4 |
| 68 | SHARED_BUFFER42 = 0x04A8 |
| 69 | SHARED_BUFFER43 = 0x04AC |
| 70 | SHARED_BUFFER44 = 0x04B0 |
| 71 | SHARED_BUFFER45 = 0x04B4 |
| 72 | SHARED_BUFFER46 = 0x04B8 |
| 73 | SHARED_BUFFER47 = 0x04BC |
| 74 | SHARED_BUFFER48 = 0x04C0 |
| 75 | SHARED_BUFFER49 = 0x04C4 |
| 76 | SHARED_BUFFER50 = 0x04C8 |
| 77 | SHARED_BUFFER51 = 0x04CC |
| 78 | SHARED_BUFFER52 = 0x04D0 |
| 79 | SHARED_BUFFER53 = 0x04D4 |
| 80 | SHARED_BUFFER54 = 0x04D8 |
| 81 | SHARED_BUFFER55 = 0x04DC |
| 82 | SHARED_BUFFER56 = 0x04E0 |
| 83 | SHARED_BUFFER57 = 0x04E4 |
| 84 | SHARED_BUFFER58 = 0x04E8 |
| 85 | SHARED_BUFFER59 = 0x04EC |
| 86 | SHARED_BUFFER60 = 0x04F0 |
| 87 | SHARED_BUFFER61 = 0x04F4 |
| 88 | SHARED_BUFFER62 = 0x04F8 |
| 89 | SHARED_BUFFER63 = 0x04FC |
| 90 | SHARED_BUFFER64 = 0x0500 |
| 91 | SHARED_BUFFER65 = 0x0504 |
| 92 | SHARED_BUFFER66 = 0x0508 |
| 93 | SHARED_BUFFER67 = 0x050C |
| 94 | SHARED_BUFFER68 = 0x0510 |
| 95 | SHARED_BUFFER69 = 0x0514 |
| 96 | SHARED_BUFFER70 = 0x0518 |
| 97 | SHARED_BUFFER71 = 0x051C |
| 98 | SHARED_BUFFER72 = 0x0520 |
| 99 | SHARED_BUFFER73 = 0x0524 |
| 100 | SHARED_BUFFER74 = 0x0528 |
| 101 | SHARED_BUFFER75 = 0x052C |
| 102 | SHARED_BUFFER76 = 0x0530 |
| 103 | SHARED_BUFFER77 = 0x0534 |
| 104 | SHARED_BUFFER78 = 0x0538 |
| 105 | SHARED_BUFFER79 = 0x053C |
| 106 | SHARED_BUFFER80 = 0x0540 |
| 107 | SHARED_BUFFER81 = 0x0544 |
| 108 | SHARED_BUFFER82 = 0x0548 |
| 109 | SHARED_BUFFER83 = 0x054C |
| 110 | SHARED_BUFFER84 = 0x0550 |
| 111 | SHARED_BUFFER85 = 0x0554 |
| 112 | SHARED_BUFFER86 = 0x0558 |
| 113 | SHARED_BUFFER87 = 0x055C |
| 114 | SHARED_BUFFER88 = 0x0560 |
| 115 | SHARED_BUFFER89 = 0x0564 |
| 116 | SHARED_BUFFER90 = 0x0568 |
| 117 | SHARED_BUFFER91 = 0x056C |
| 118 | SHARED_BUFFER92 = 0x0570 |
| 119 | SHARED_BUFFER93 = 0x0574 |
| 120 | SHARED_BUFFER94 = 0x0578 |
| 121 | SHARED_BUFFER95 = 0x057C |
| 122 | SHARED_BUFFER96 = 0x0580 |
| 123 | SHARED_BUFFER97 = 0x0584 |
| 124 | SHARED_BUFFER98 = 0x0588 |
| 125 | SHARED_BUFFER99 = 0x058C |
| 126 | SHARED_BUFFER100 = 0x0590 |
| 127 | SHARED_BUFFER101 = 0x0594 |
| 128 | SHARED_BUFFER102 = 0x0598 |
| 129 | SHARED_BUFFER103 = 0x059C |
| 130 | SHARED_BUFFER104 = 0x05A0 |
| 131 | SHARED_BUFFER105 = 0x05A4 |
| 132 | SHARED_BUFFER106 = 0x05A8 |
| 133 | SHARED_BUFFER107 = 0x05AC |
| 134 | SHARED_BUFFER108 = 0x05B0 |
| 135 | SHARED_BUFFER109 = 0x05B4 |
| 136 | SHARED_BUFFER110 = 0x05B8 |
| 137 | SHARED_BUFFER111 = 0x05BC |
| 138 | SHARED_BUFFER112 = 0x05C0 |
| 139 | SHARED_BUFFER113 = 0x05C4 |
| 140 | SHARED_BUFFER114 = 0x05C8 |
| 141 | SHARED_BUFFER115 = 0x05CC |
| 142 | SHARED_BUFFER116 = 0x05D0 |
| 143 | SHARED_BUFFER117 = 0x05D4 |
| 144 | SHARED_BUFFER118 = 0x05D8 |
| 145 | SHARED_BUFFER119 = 0x05DC |
| 146 | SHARED_BUFFER120 = 0x05E0 |
| 147 | SHARED_BUFFER121 = 0x05E4 |
| 148 | SHARED_BUFFER122 = 0x05E8 |
| 149 | SHARED_BUFFER123 = 0x05EC |
| 150 | SHARED_BUFFER124 = 0x05F0 |
| 151 | SHARED_BUFFER125 = 0x05F4 |
| 152 | SHARED_BUFFER126 = 0x05F8 |
| 153 | SHARED_BUFFER127 = 0x05FC |
| 154 | SHARED_BUFFER128 = 0x0600 |
| 155 | SHARED_BUFFER129 = 0x0604 |
| 156 | SHARED_BUFFER130 = 0x0608 |
| 157 | SHARED_BUFFER131 = 0x060C |
| 158 | SHARED_BUFFER132 = 0x0610 |
| 159 | SHARED_BUFFER133 = 0x0614 |
| 160 | SHARED_BUFFER134 = 0x0618 |
| 161 | SHARED_BUFFER135 = 0x061C |
| 162 | SHARED_BUFFER136 = 0x0620 |
| 163 | SHARED_BUFFER137 = 0x0624 |
| 164 | SHARED_BUFFER138 = 0x0628 |
| 165 | SHARED_BUFFER139 = 0x062C |
| 166 | SHARED_BUFFER140 = 0x0630 |
| 167 | SHARED_BUFFER141 = 0x0634 |
| 168 | SHARED_BUFFER142 = 0x0638 |
| 169 | SHARED_BUFFER143 = 0x063C |
| 170 | SHARED_BUFFER144 = 0x0640 |
| 171 | SHARED_BUFFER145 = 0x0644 |
| 172 | SHARED_BUFFER146 = 0x0648 |
| 173 | SHARED_BUFFER147 = 0x064C |
| 174 | SHARED_BUFFER148 = 0x0650 |
| 175 | SHARED_BUFFER149 = 0x0654 |
| 176 | SHARED_BUFFER150 = 0x0658 |
| 177 | SHARED_BUFFER151 = 0x065C |
| 178 | SHARED_BUFFER152 = 0x0660 |
| 179 | SHARED_BUFFER153 = 0x0664 |
| 180 | SHARED_BUFFER154 = 0x0668 |
| 181 | SHARED_BUFFER155 = 0x066C |
| 182 | SHARED_BUFFER156 = 0x0670 |
| 183 | SHARED_BUFFER157 = 0x0674 |
| 184 | SHARED_BUFFER158 = 0x0678 |
| 185 | SHARED_BUFFER159 = 0x067C |
| 186 | SHARED_BUFFER160 = 0x0680 |
| 187 | SHARED_BUFFER161 = 0x0684 |
| 188 | SHARED_BUFFER162 = 0x0688 |
| 189 | SHARED_BUFFER163 = 0x068C |
| 190 | SHARED_BUFFER164 = 0x0690 |
| 191 | SHARED_BUFFER165 = 0x0694 |
| 192 | SHARED_BUFFER166 = 0x0698 |
| 193 | SHARED_BUFFER167 = 0x069C |
| 194 | SHARED_BUFFER168 = 0x06A0 |
| 195 | SHARED_BUFFER169 = 0x06A4 |
| 196 | SHARED_BUFFER170 = 0x06A8 |
| 197 | SHARED_BUFFER171 = 0x06AC |
| 198 | SHARED_BUFFER172 = 0x06B0 |
| 199 | SHARED_BUFFER173 = 0x06B4 |
| 200 | SHARED_BUFFER174 = 0x06B8 |
| 201 | SHARED_BUFFER175 = 0x06BC |
| 202 | SHARED_BUFFER176 = 0x06C0 |
| 203 | SHARED_BUFFER177 = 0x06C4 |
| 204 | SHARED_BUFFER178 = 0x06C8 |
| 205 | SHARED_BUFFER179 = 0x06CC |
| 206 | SHARED_BUFFER180 = 0x06D0 |
| 207 | SHARED_BUFFER181 = 0x06D4 |
| 208 | SHARED_BUFFER182 = 0x06D8 |
| 209 | SHARED_BUFFER183 = 0x06DC |
| 210 | SHARED_BUFFER184 = 0x06E0 |
| 211 | SHARED_BUFFER185 = 0x06E4 |
| 212 | SHARED_BUFFER186 = 0x06E8 |
| 213 | SHARED_BUFFER187 = 0x06EC |
| 214 | SHARED_BUFFER188 = 0x06F0 |
| 215 | SHARED_BUFFER189 = 0x06F4 |
| 216 | SHARED_BUFFER190 = 0x06F8 |
| 217 | SHARED_BUFFER191 = 0x06FC |
| 218 | SHARED_BUFFER192 = 0x0700 |
| 219 | SHARED_BUFFER193 = 0x0704 |
| 220 | SHARED_BUFFER194 = 0x0708 |
| 221 | SHARED_BUFFER195 = 0x070C |
| 222 | SHARED_BUFFER196 = 0x0710 |
| 223 | SHARED_BUFFER197 = 0x0714 |
| 224 | SHARED_BUFFER198 = 0x0718 |
| 225 | SHARED_BUFFER199 = 0x071C |
| 226 | SHARED_BUFFER200 = 0x0720 |
| 227 | SHARED_BUFFER201 = 0x0724 |
| 228 | SHARED_BUFFER202 = 0x0728 |
| 229 | SHARED_BUFFER203 = 0x072C |
| 230 | SHARED_BUFFER204 = 0x0730 |
| 231 | SHARED_BUFFER205 = 0x0734 |
| 232 | SHARED_BUFFER206 = 0x0738 |
| 233 | SHARED_BUFFER207 = 0x073C |
| 234 | SHARED_BUFFER208 = 0x0740 |
| 235 | SHARED_BUFFER209 = 0x0744 |
| 236 | SHARED_BUFFER210 = 0x0748 |
| 237 | SHARED_BUFFER211 = 0x074C |
| 238 | SHARED_BUFFER212 = 0x0750 |
| 239 | SHARED_BUFFER213 = 0x0754 |
| 240 | SHARED_BUFFER214 = 0x0758 |
| 241 | SHARED_BUFFER215 = 0x075C |
| 242 | SHARED_BUFFER216 = 0x0760 |
| 243 | SHARED_BUFFER217 = 0x0764 |
| 244 | SHARED_BUFFER218 = 0x0768 |
| 245 | SHARED_BUFFER219 = 0x076C |
| 246 | SHARED_BUFFER220 = 0x0770 |
| 247 | SHARED_BUFFER221 = 0x0774 |
| 248 | SHARED_BUFFER222 = 0x0778 |
| 249 | SHARED_BUFFER223 = 0x077C |
| 250 | SHARED_BUFFER224 = 0x0780 |
| 251 | SHARED_BUFFER225 = 0x0784 |
| 252 | SHARED_BUFFER226 = 0x0788 |
| 253 | SHARED_BUFFER227 = 0x078C |
| 254 | SHARED_BUFFER228 = 0x0790 |
| 255 | SHARED_BUFFER229 = 0x0794 |
| 256 | SHARED_BUFFER230 = 0x0798 |
| 257 | SHARED_BUFFER231 = 0x079C |
| 258 | SHARED_BUFFER232 = 0x07A0 |
| 259 | SHARED_BUFFER233 = 0x07A4 |
| 260 | SHARED_BUFFER234 = 0x07A8 |
| 261 | SHARED_BUFFER235 = 0x07AC |
| 262 | SHARED_BUFFER236 = 0x07B0 |
| 263 | SHARED_BUFFER237 = 0x07B4 |
| 264 | SHARED_BUFFER238 = 0x07B8 |
| 265 | SHARED_BUFFER239 = 0x07BC |
| 266 | SHARED_BUFFER240 = 0x07C0 |
| 267 | SHARED_BUFFER241 = 0x07C4 |
| 268 | SHARED_BUFFER242 = 0x07C8 |
| 269 | SHARED_BUFFER243 = 0x07CC |
| 270 | SHARED_BUFFER244 = 0x07D0 |
| 271 | SHARED_BUFFER245 = 0x07D4 |
| 272 | SHARED_BUFFER246 = 0x07D8 |
| 273 | SHARED_BUFFER247 = 0x07DC |
| 274 | SHARED_BUFFER248 = 0x07E0 |
| 275 | SHARED_BUFFER249 = 0x07E4 |
| 276 | SHARED_BUFFER250 = 0x07E8 |
| 277 | SHARED_BUFFER251 = 0x07EC |
| 278 | SHARED_BUFFER252 = 0x07F0 |
| 279 | SHARED_BUFFER253 = 0x07F4 |
| 280 | SHARED_BUFFER254 = 0x07F8 |
| 281 | SHARED_BUFFER255 = 0x07FC |
| 282 | SIZE = 0x0800 |
| 283 | |
| 284 | class HW_DEBUG_INTERNAL(Enum): |
Diqing Zhong | b731170 | 2020-04-14 12:31:44 +0200 | [diff] [blame] | 285 | WD_STATUS = 0x0100 |
| 286 | MAC_STATUS = 0x0104 |
| 287 | DMA_STATUS = 0x0108 |
| 288 | AO_STATUS = 0x0110 |
Tim Hall | 79d07d2 | 2020-04-27 18:20:16 +0100 | [diff] [blame] | 289 | CLKFORCE = 0x0140 |
| 290 | DEBUG = 0x0144 |
| 291 | DEBUG2 = 0x0148 |
| 292 | DEBUGCORE = 0x014C |
| 293 | SIZE = 0x0150 |
| 294 | |
| 295 | class NPU_BP(Enum): |
| 296 | BASEP0 = 0x0080 |
| 297 | BASEP1 = 0x0084 |
| 298 | BASEP2 = 0x0088 |
| 299 | BASEP3 = 0x008C |
| 300 | BASEP4 = 0x0090 |
| 301 | BASEP5 = 0x0094 |
| 302 | BASEP6 = 0x0098 |
| 303 | BASEP7 = 0x009C |
| 304 | BASEP8 = 0x00A0 |
| 305 | BASEP9 = 0x00A4 |
| 306 | BASEP10 = 0x00A8 |
| 307 | BASEP11 = 0x00AC |
| 308 | BASEP12 = 0x00B0 |
| 309 | BASEP13 = 0x00B4 |
| 310 | BASEP14 = 0x00B8 |
| 311 | BASEP15 = 0x00BC |
| 312 | SIZE = 0x00C0 |
| 313 | |
| 314 | class NPU_IDS(Enum): |
| 315 | REVISION = 0x0FC0 |
| 316 | PID4 = 0x0FD0 |
| 317 | PID5 = 0x0FD4 |
| 318 | PID6 = 0x0FD8 |
| 319 | PID7 = 0x0FDC |
| 320 | PID0 = 0x0FE0 |
| 321 | PID1 = 0x0FE4 |
| 322 | PID2 = 0x0FE8 |
| 323 | PID3 = 0x0FEC |
| 324 | CID0 = 0x0FF0 |
| 325 | CID1 = 0x0FF4 |
| 326 | CID2 = 0x0FF8 |
| 327 | CID3 = 0x0FFC |
| 328 | SIZE = 0x1000 |
| 329 | |
| 330 | class NPU_REG(Enum): |
| 331 | ID = 0x0000 |
| 332 | STATUS = 0x0004 |
| 333 | CMD = 0x0008 |
| 334 | RESET = 0x000C |
| 335 | QBASE0 = 0x0010 |
| 336 | QBASE1 = 0x0014 |
| 337 | QREAD = 0x0018 |
| 338 | QCONFIG = 0x001C |
| 339 | QSIZE = 0x0020 |
| 340 | PROT = 0x0024 |
| 341 | CONFIG = 0x0028 |
| 342 | LOCK = 0x002C |
| 343 | REGIONCFG = 0x003C |
| 344 | AXI_LIMIT0 = 0x0040 |
| 345 | AXI_LIMIT1 = 0x0044 |
| 346 | AXI_LIMIT2 = 0x0048 |
| 347 | AXI_LIMIT3 = 0x004C |
| 348 | SIZE = 0x0050 |
| 349 | |
| 350 | class PMU_INTERNAL(Enum): |
| 351 | PMCR = 0x0180 |
| 352 | PMCNTENSET = 0x0184 |
| 353 | PMCNTENCLR = 0x0188 |
| 354 | PMOVSSET = 0x018C |
| 355 | PMOVSCLR = 0x0190 |
| 356 | PMINTSET = 0x0194 |
| 357 | PMINTCLR = 0x0198 |
| 358 | PMCCNTR_LO = 0x01A0 |
| 359 | PMCCNTR_HI = 0x01A4 |
| 360 | PMCCNTR_CFG = 0x01A8 |
| 361 | PMCAXI_CHAN = 0x01AC |
| 362 | PMEVCNTR0 = 0x0300 |
| 363 | PMEVCNTR1 = 0x0304 |
| 364 | PMEVCNTR2 = 0x0308 |
| 365 | PMEVCNTR3 = 0x030C |
| 366 | PMEVTYPER0 = 0x0380 |
| 367 | PMEVTYPER1 = 0x0384 |
| 368 | PMEVTYPER2 = 0x0388 |
| 369 | PMEVTYPER3 = 0x038C |
| 370 | SIZE = 0x0390 |
| 371 | |
| 372 | class TSU_DEBUG_INTERNAL(Enum): |
| 373 | IFM_PAD_TOP = 0x0800 |
| 374 | IFM_PAD_LEFT = 0x0804 |
| 375 | IFM_PAD_RIGHT = 0x0808 |
| 376 | IFM_PAD_BOTTOM = 0x080C |
| 377 | IFM_DEPTH_M1 = 0x0810 |
| 378 | IFM_PRECISION = 0x0814 |
| 379 | IFM_UPSCALE = 0x081C |
| 380 | IFM_ZERO_POINT = 0x0824 |
| 381 | IFM_WIDTH0_M1 = 0x0828 |
| 382 | IFM_HEIGHT0_M1 = 0x082C |
| 383 | IFM_HEIGHT1_M1 = 0x0830 |
| 384 | IFM_IB_END = 0x0834 |
| 385 | IFM_REGION = 0x083C |
| 386 | OFM_WIDTH_M1 = 0x0844 |
| 387 | OFM_HEIGHT_M1 = 0x0848 |
| 388 | OFM_DEPTH_M1 = 0x084C |
| 389 | OFM_PRECISION = 0x0850 |
| 390 | OFM_BLK_WIDTH_M1 = 0x0854 |
| 391 | OFM_BLK_HEIGHT_M1 = 0x0858 |
| 392 | OFM_BLK_DEPTH_M1 = 0x085C |
| 393 | OFM_ZERO_POINT = 0x0860 |
| 394 | OFM_WIDTH0_M1 = 0x0868 |
| 395 | OFM_HEIGHT0_M1 = 0x086C |
| 396 | OFM_HEIGHT1_M1 = 0x0870 |
| 397 | OFM_REGION = 0x087C |
| 398 | KERNEL_WIDTH_M1 = 0x0880 |
| 399 | KERNEL_HEIGHT_M1 = 0x0884 |
| 400 | KERNEL_STRIDE = 0x0888 |
| 401 | PARALLEL_MODE = 0x088C |
| 402 | ACC_FORMAT = 0x0890 |
| 403 | ACTIVATION = 0x0894 |
| 404 | ACTIVATION_MIN = 0x0898 |
| 405 | ACTIVATION_MAX = 0x089C |
| 406 | WEIGHT_REGION = 0x08A0 |
| 407 | SCALE_REGION = 0x08A4 |
| 408 | AB_START = 0x08B4 |
| 409 | BLOCKDEP = 0x08BC |
| 410 | DMA0_SRC_REGION = 0x08C0 |
| 411 | DMA0_DST_REGION = 0x08C4 |
| 412 | DMA0_SIZE0 = 0x08C8 |
| 413 | DMA0_SIZE1 = 0x08CC |
| 414 | IFM2_BROADCAST = 0x0900 |
| 415 | IFM2_SCALAR = 0x0904 |
| 416 | IFM2_PRECISION = 0x0914 |
| 417 | IFM2_ZERO_POINT = 0x0924 |
| 418 | IFM2_WIDTH0_M1 = 0x0928 |
| 419 | IFM2_HEIGHT0_M1 = 0x092C |
| 420 | IFM2_HEIGHT1_M1 = 0x0930 |
| 421 | IFM2_IB_START = 0x0934 |
| 422 | IFM2_REGION = 0x093C |
| 423 | IFM_BASE0 = 0x0A00 |
| 424 | IFM_BASE0_HI = 0x0A04 |
| 425 | IFM_BASE1 = 0x0A08 |
| 426 | IFM_BASE1_HI = 0x0A0C |
| 427 | IFM_BASE2 = 0x0A10 |
| 428 | IFM_BASE2_HI = 0x0A14 |
| 429 | IFM_BASE3 = 0x0A18 |
| 430 | IFM_BASE3_HI = 0x0A1C |
| 431 | IFM_STRIDE_X = 0x0A20 |
| 432 | IFM_STRIDE_X_HI = 0x0A24 |
| 433 | IFM_STRIDE_Y = 0x0A28 |
| 434 | IFM_STRIDE_Y_HI = 0x0A2C |
| 435 | IFM_STRIDE_C = 0x0A30 |
| 436 | IFM_STRIDE_C_HI = 0x0A34 |
| 437 | OFM_BASE0 = 0x0A40 |
| 438 | OFM_BASE0_HI = 0x0A44 |
| 439 | OFM_BASE1 = 0x0A48 |
| 440 | OFM_BASE1_HI = 0x0A4C |
| 441 | OFM_BASE2 = 0x0A50 |
| 442 | OFM_BASE2_HI = 0x0A54 |
| 443 | OFM_BASE3 = 0x0A58 |
| 444 | OFM_BASE3_HI = 0x0A5C |
| 445 | OFM_STRIDE_X = 0x0A60 |
| 446 | OFM_STRIDE_X_HI = 0x0A64 |
| 447 | OFM_STRIDE_Y = 0x0A68 |
| 448 | OFM_STRIDE_Y_HI = 0x0A6C |
| 449 | OFM_STRIDE_C = 0x0A70 |
| 450 | OFM_STRIDE_C_HI = 0x0A74 |
| 451 | WEIGHT_BASE = 0x0A80 |
| 452 | WEIGHT_BASE_HI = 0x0A84 |
| 453 | WEIGHT_LENGTH = 0x0A88 |
| 454 | WEIGHT_LENGTH_HI = 0x0A8C |
| 455 | SCALE_BASE = 0x0A90 |
| 456 | SCALE_BASE_HI = 0x0A94 |
| 457 | SCALE_LENGTH = 0x0A98 |
| 458 | OFM_SCALE = 0x0AA0 |
| 459 | OFM_SCALE_SHIFT = 0x0AA4 |
| 460 | OPA_SCALE = 0x0AA8 |
| 461 | OPA_SCALE_SHIFT = 0x0AAC |
| 462 | OPB_SCALE = 0x0AB0 |
| 463 | DMA0_SRC = 0x0AC0 |
| 464 | DMA0_SRC_HI = 0x0AC4 |
| 465 | DMA0_DST = 0x0AC8 |
| 466 | DMA0_DST_HI = 0x0ACC |
| 467 | DMA0_LEN = 0x0AD0 |
| 468 | DMA0_LEN_HI = 0x0AD4 |
| 469 | DMA0_SKIP0 = 0x0AD8 |
| 470 | DMA0_SKIP0_HI = 0x0ADC |
| 471 | DMA0_SKIP1 = 0x0AE0 |
| 472 | DMA0_SKIP1_HI = 0x0AE4 |
| 473 | IFM2_BASE0 = 0x0B00 |
| 474 | IFM2_BASE0_HI = 0x0B04 |
| 475 | IFM2_BASE1 = 0x0B08 |
| 476 | IFM2_BASE1_HI = 0x0B0C |
| 477 | IFM2_BASE2 = 0x0B10 |
| 478 | IFM2_BASE2_HI = 0x0B14 |
| 479 | IFM2_BASE3 = 0x0B18 |
| 480 | IFM2_BASE3_HI = 0x0B1C |
| 481 | IFM2_STRIDE_X = 0x0B20 |
| 482 | IFM2_STRIDE_X_HI = 0x0B24 |
| 483 | IFM2_STRIDE_Y = 0x0B28 |
| 484 | IFM2_STRIDE_Y_HI = 0x0B2C |
| 485 | IFM2_STRIDE_C = 0x0B30 |
| 486 | IFM2_STRIDE_C_HI = 0x0B34 |
| 487 | WEIGHT1_BASE = 0x0B40 |
| 488 | WEIGHT1_BASE_HI = 0x0B44 |
| 489 | WEIGHT1_LENGTH = 0x0B48 |
| 490 | WEIGHT1_LENGTH_HI = 0x0B4C |
| 491 | SCALE1_BASE = 0x0B50 |
| 492 | SCALE1_BASE_HI = 0x0B54 |
| 493 | SCALE1_LENGTH = 0x0B58 |
| 494 | SIZE = 0x0B5C |
| 495 | |
| 496 | class TSU_DEBUG_RO_INTERNAL(Enum): |
| 497 | KERNEL_X = 0x0200 |
| 498 | KERNEL_Y = 0x0204 |
| 499 | KERNEL_W_M1 = 0x0208 |
| 500 | KERNEL_H_M1 = 0x020C |
| 501 | OFM_CBLK_WIDTH_M1 = 0x0210 |
| 502 | OFM_CBLK_HEIGHT_M1 = 0x0214 |
| 503 | OFM_CBLK_DEPTH_M1 = 0x0218 |
| 504 | IFM_CBLK_DEPTH_M1 = 0x021C |
| 505 | OFM_X = 0x0220 |
| 506 | OFM_Y = 0x0224 |
| 507 | OFM_Z = 0x0228 |
| 508 | IFM_Z = 0x022C |
| 509 | PAD_TOP = 0x0230 |
| 510 | PAD_LEFT = 0x0234 |
| 511 | IFM_CBLK_WIDTH = 0x0238 |
| 512 | IFM_CBLK_HEIGHT = 0x023C |
| 513 | DMA_IFM_SRC = 0x0240 |
| 514 | DMA_IFM_SRC_HI = 0x0244 |
| 515 | DMA_IFM_DST = 0x0248 |
| 516 | DMA_OFM_SRC = 0x024C |
| 517 | DMA_OFM_DST = 0x0250 |
| 518 | DMA_OFM_DST_HI = 0x0254 |
| 519 | DMA_WEIGHT_SRC = 0x0258 |
| 520 | DMA_WEIGHT_SRC_HI = 0x025C |
| 521 | DMA_CMD_SRC = 0x0260 |
| 522 | DMA_CMD_SRC_HI = 0x0264 |
| 523 | DMA_CMD_SIZE = 0x0268 |
| 524 | DMA_M2M_SRC = 0x026C |
| 525 | DMA_M2M_SRC_HI = 0x0270 |
| 526 | DMA_M2M_DST = 0x0274 |
| 527 | DMA_M2M_DST_HI = 0x0278 |
| 528 | CURRENT_QREAD = 0x027C |
| 529 | DMA_SCALE_SRC = 0x0280 |
| 530 | DMA_SCALE_SRC_HI = 0x0284 |
| 531 | CURRENT_CMD = 0x02BC |
| 532 | SIZE = 0x02C0 |
| 533 | |
| 534 | |
| 535 | |
| 536 | class acc_format(Enum): |
| 537 | INT_32BIT = 0 |
| 538 | INT_40BIT = 1 |
| 539 | FP_S5_10 = 2 |
| 540 | |
| 541 | class activation(Enum): |
| 542 | NONE = 0 |
| 543 | TANH = 3 |
| 544 | SIGMOID = 4 |
| 545 | LUT_START = 16 |
| 546 | LUT_END = 23 |
| 547 | |
| 548 | class clip_range(Enum): |
| 549 | OFM_PRECISION = 0 |
| 550 | FORCE_UINT8 = 2 |
| 551 | FORCE_INT8 = 3 |
| 552 | FORCE_INT16 = 5 |
| 553 | |
| 554 | class cmd0(Enum): |
| 555 | NPU_OP_STOP = 0x000 |
| 556 | NPU_OP_IRQ = 0x001 |
| 557 | NPU_OP_CONV = 0x002 |
| 558 | NPU_OP_DEPTHWISE = 0x003 |
| 559 | NPU_OP_POOL = 0x005 |
| 560 | NPU_OP_ELEMENTWISE = 0x006 |
| 561 | NPU_OP_DMA_START = 0x010 |
| 562 | NPU_OP_DMA_WAIT = 0x011 |
| 563 | NPU_OP_KERNEL_WAIT = 0x012 |
| 564 | NPU_OP_PMU_MASK = 0x013 |
| 565 | NPU_SET_IFM_PAD_TOP = 0x100 |
| 566 | NPU_SET_IFM_PAD_LEFT = 0x101 |
| 567 | NPU_SET_IFM_PAD_RIGHT = 0x102 |
| 568 | NPU_SET_IFM_PAD_BOTTOM = 0x103 |
| 569 | NPU_SET_IFM_DEPTH_M1 = 0x104 |
| 570 | NPU_SET_IFM_PRECISION = 0x105 |
| 571 | NPU_SET_IFM_UPSCALE = 0x107 |
| 572 | NPU_SET_IFM_ZERO_POINT = 0x109 |
| 573 | NPU_SET_IFM_WIDTH0_M1 = 0x10A |
| 574 | NPU_SET_IFM_HEIGHT0_M1 = 0x10B |
| 575 | NPU_SET_IFM_HEIGHT1_M1 = 0x10C |
| 576 | NPU_SET_IFM_IB_END = 0x10D |
| 577 | NPU_SET_IFM_REGION = 0x10F |
| 578 | NPU_SET_OFM_WIDTH_M1 = 0x111 |
| 579 | NPU_SET_OFM_HEIGHT_M1 = 0x112 |
| 580 | NPU_SET_OFM_DEPTH_M1 = 0x113 |
| 581 | NPU_SET_OFM_PRECISION = 0x114 |
| 582 | NPU_SET_OFM_BLK_WIDTH_M1 = 0x115 |
| 583 | NPU_SET_OFM_BLK_HEIGHT_M1 = 0x116 |
| 584 | NPU_SET_OFM_BLK_DEPTH_M1 = 0x117 |
| 585 | NPU_SET_OFM_ZERO_POINT = 0x118 |
| 586 | NPU_SET_OFM_WIDTH0_M1 = 0x11A |
| 587 | NPU_SET_OFM_HEIGHT0_M1 = 0x11B |
| 588 | NPU_SET_OFM_HEIGHT1_M1 = 0x11C |
| 589 | NPU_SET_OFM_REGION = 0x11F |
| 590 | NPU_SET_KERNEL_WIDTH_M1 = 0x120 |
| 591 | NPU_SET_KERNEL_HEIGHT_M1 = 0x121 |
| 592 | NPU_SET_KERNEL_STRIDE = 0x122 |
| 593 | NPU_SET_PARALLEL_MODE = 0x123 |
| 594 | NPU_SET_ACC_FORMAT = 0x124 |
| 595 | NPU_SET_ACTIVATION = 0x125 |
| 596 | NPU_SET_ACTIVATION_MIN = 0x126 |
| 597 | NPU_SET_ACTIVATION_MAX = 0x127 |
| 598 | NPU_SET_WEIGHT_REGION = 0x128 |
| 599 | NPU_SET_SCALE_REGION = 0x129 |
| 600 | NPU_SET_AB_START = 0x12D |
| 601 | NPU_SET_BLOCKDEP = 0x12F |
| 602 | NPU_SET_DMA0_SRC_REGION = 0x130 |
| 603 | NPU_SET_DMA0_DST_REGION = 0x131 |
| 604 | NPU_SET_DMA0_SIZE0 = 0x132 |
| 605 | NPU_SET_DMA0_SIZE1 = 0x133 |
| 606 | NPU_SET_IFM2_BROADCAST = 0x180 |
| 607 | NPU_SET_IFM2_SCALAR = 0x181 |
| 608 | NPU_SET_IFM2_PRECISION = 0x185 |
| 609 | NPU_SET_IFM2_ZERO_POINT = 0x189 |
| 610 | NPU_SET_IFM2_WIDTH0_M1 = 0x18A |
| 611 | NPU_SET_IFM2_HEIGHT0_M1 = 0x18B |
| 612 | NPU_SET_IFM2_HEIGHT1_M1 = 0x18C |
| 613 | NPU_SET_IFM2_IB_START = 0x18D |
| 614 | NPU_SET_IFM2_REGION = 0x18F |
| 615 | |
| 616 | class cmd1(Enum): |
| 617 | NPU_SET_IFM_BASE0 = 0x000 |
| 618 | NPU_SET_IFM_BASE1 = 0x001 |
| 619 | NPU_SET_IFM_BASE2 = 0x002 |
| 620 | NPU_SET_IFM_BASE3 = 0x003 |
| 621 | NPU_SET_IFM_STRIDE_X = 0x004 |
| 622 | NPU_SET_IFM_STRIDE_Y = 0x005 |
| 623 | NPU_SET_IFM_STRIDE_C = 0x006 |
| 624 | NPU_SET_OFM_BASE0 = 0x010 |
| 625 | NPU_SET_OFM_BASE1 = 0x011 |
| 626 | NPU_SET_OFM_BASE2 = 0x012 |
| 627 | NPU_SET_OFM_BASE3 = 0x013 |
| 628 | NPU_SET_OFM_STRIDE_X = 0x014 |
| 629 | NPU_SET_OFM_STRIDE_Y = 0x015 |
| 630 | NPU_SET_OFM_STRIDE_C = 0x016 |
| 631 | NPU_SET_WEIGHT_BASE = 0x020 |
| 632 | NPU_SET_WEIGHT_LENGTH = 0x021 |
| 633 | NPU_SET_SCALE_BASE = 0x022 |
| 634 | NPU_SET_SCALE_LENGTH = 0x023 |
| 635 | NPU_SET_OFM_SCALE = 0x024 |
| 636 | NPU_SET_OPA_SCALE = 0x025 |
| 637 | NPU_SET_OPB_SCALE = 0x026 |
| 638 | NPU_SET_DMA0_SRC = 0x030 |
| 639 | NPU_SET_DMA0_DST = 0x031 |
| 640 | NPU_SET_DMA0_LEN = 0x032 |
| 641 | NPU_SET_DMA0_SKIP0 = 0x033 |
| 642 | NPU_SET_DMA0_SKIP1 = 0x034 |
| 643 | NPU_SET_IFM2_BASE0 = 0x080 |
| 644 | NPU_SET_IFM2_BASE1 = 0x081 |
| 645 | NPU_SET_IFM2_BASE2 = 0x082 |
| 646 | NPU_SET_IFM2_BASE3 = 0x083 |
| 647 | NPU_SET_IFM2_STRIDE_X = 0x084 |
| 648 | NPU_SET_IFM2_STRIDE_Y = 0x085 |
| 649 | NPU_SET_IFM2_STRIDE_C = 0x086 |
| 650 | NPU_SET_WEIGHT1_BASE = 0x090 |
| 651 | NPU_SET_WEIGHT1_LENGTH = 0x091 |
| 652 | NPU_SET_SCALE1_BASE = 0x092 |
| 653 | NPU_SET_SCALE1_LENGTH = 0x093 |
| 654 | |
| 655 | class data_format(Enum): |
| 656 | NHWC = 0 |
| 657 | NHCWB16 = 1 |
| 658 | |
| 659 | class elementwise_mode(Enum): |
| 660 | MUL = 0 |
| 661 | ADD = 1 |
| 662 | SUB = 2 |
| 663 | MIN = 3 |
| 664 | MAX = 4 |
| 665 | LRELU = 5 |
| 666 | ABS = 6 |
| 667 | CLZ = 7 |
| 668 | SHR = 8 |
| 669 | SHL = 9 |
| 670 | |
| 671 | class ifm_precision(Enum): |
Diqing Zhong | fed918b | 2020-04-27 10:27:34 +0200 | [diff] [blame^] | 672 | U8 = 0 |
| 673 | S8 = 1 |
| 674 | U16 = 4 |
| 675 | S16 = 5 |
| 676 | S32 = 9 |
Tim Hall | 79d07d2 | 2020-04-27 18:20:16 +0100 | [diff] [blame] | 677 | |
| 678 | class ifm_scale_mode(Enum): |
| 679 | SCALE_16BIT = 0 |
| 680 | SCALE_OPA_32BIT = 1 |
| 681 | SCALE_OPB_32BIT = 2 |
| 682 | |
Diqing Zhong | b731170 | 2020-04-14 12:31:44 +0200 | [diff] [blame] | 683 | class macs_per_cc(Enum): |
| 684 | MACS_PER_CC_IS_5 = 0x5 |
| 685 | MACS_PER_CC_IS_6 = 0x6 |
| 686 | MACS_PER_CC_IS_7 = 0x7 |
| 687 | MACS_PER_CC_IS_8 = 0x8 |
| 688 | |
Tim Hall | 79d07d2 | 2020-04-27 18:20:16 +0100 | [diff] [blame] | 689 | class memory_type(Enum): |
| 690 | AXI0_OUTSTANDING_COUNTER0 = 0 |
| 691 | AXI0_OUTSTANDING_COUNTER1 = 1 |
| 692 | AXI1_OUTSTANDING_COUNTER2 = 2 |
| 693 | AXI1_OUTSTANDING_COUNTER3 = 3 |
| 694 | |
| 695 | class ofm_precision(Enum): |
| 696 | U8 = 0 |
| 697 | S8 = 1 |
| 698 | U16 = 2 |
| 699 | S16 = 3 |
| 700 | S32 = 5 |
| 701 | |
| 702 | class pmu_event_type(Enum): |
Diqing Zhong | b731170 | 2020-04-14 12:31:44 +0200 | [diff] [blame] | 703 | NO_EVENT = 0x00 |
Tim Hall | 79d07d2 | 2020-04-27 18:20:16 +0100 | [diff] [blame] | 704 | CYCLE = 0x11 |
| 705 | NPU_IDLE = 0x20 |
| 706 | MAC_ACTIVE = 0x30 |
| 707 | MAC_ACTIVE_8BIT = 0x31 |
| 708 | MAC_ACTIVE_16BIT = 0x32 |
| 709 | MAC_DPU_ACTIVE = 0x33 |
| 710 | MAC_STALLED_BY_WD_ACC = 0x34 |
| 711 | MAC_STALLED_BY_WD = 0x35 |
| 712 | MAC_STALLED_BY_ACC = 0x36 |
| 713 | MAC_STALLED_BY_IB = 0x37 |
Diqing Zhong | b731170 | 2020-04-14 12:31:44 +0200 | [diff] [blame] | 714 | MAC_ACTIVE_32BIT = 0x38 |
Tim Hall | 79d07d2 | 2020-04-27 18:20:16 +0100 | [diff] [blame] | 715 | AO_ACTIVE = 0x40 |
| 716 | AO_ACTIVE_8BIT = 0x41 |
| 717 | AO_ACTIVE_16BIT = 0x42 |
| 718 | AO_STALLED_BY_OFMP_OB = 0x43 |
| 719 | AO_STALLED_BY_OFMP = 0x44 |
| 720 | AO_STALLED_BY_OB = 0x45 |
| 721 | AO_STALLED_BY_ACC_IB = 0x46 |
| 722 | AO_STALLED_BY_ACC = 0x47 |
| 723 | AO_STALLED_BY_IB = 0x48 |
| 724 | WD_ACTIVE = 0x50 |
| 725 | WD_STALLED = 0x51 |
| 726 | WD_STALLED_BY_WS = 0x52 |
| 727 | WD_STALLED_BY_WD_BUF = 0x53 |
| 728 | WD_PARSE_ACTIVE = 0x54 |
| 729 | WD_PARSE_STALLED = 0x55 |
| 730 | WD_PARSE_STALLED_IN = 0x56 |
| 731 | WD_PARSE_STALLED_OUT = 0x57 |
Diqing Zhong | b731170 | 2020-04-14 12:31:44 +0200 | [diff] [blame] | 732 | WD_TRANS_WS = 0x58 |
| 733 | WD_TRANS_WB = 0x59 |
| 734 | WD_TRANS_DW0 = 0x5a |
| 735 | WD_TRANS_DW1 = 0x5b |
Tim Hall | 79d07d2 | 2020-04-27 18:20:16 +0100 | [diff] [blame] | 736 | AXI0_RD_TRANS_ACCEPTED = 0x80 |
| 737 | AXI0_RD_TRANS_COMPLETED = 0x81 |
| 738 | AXI0_RD_DATA_BEAT_RECEIVED = 0x82 |
| 739 | AXI0_RD_TRAN_REQ_STALLED = 0x83 |
| 740 | AXI0_WR_TRANS_ACCEPTED = 0x84 |
| 741 | AXI0_WR_TRANS_COMPLETED_M = 0x85 |
| 742 | AXI0_WR_TRANS_COMPLETED_S = 0x86 |
| 743 | AXI0_WR_DATA_BEAT_WRITTEN = 0x87 |
| 744 | AXI0_WR_TRAN_REQ_STALLED = 0x88 |
| 745 | AXI0_WR_DATA_BEAT_STALLED = 0x89 |
| 746 | AXI0_ENABLED_CYCLES = 0x8c |
| 747 | AXI0_RD_STALL_LIMIT = 0x8e |
| 748 | AXI0_WR_STALL_LIMIT = 0x8f |
| 749 | AXI1_RD_TRANS_ACCEPTED = 0x180 |
| 750 | AXI1_RD_TRANS_COMPLETED = 0x181 |
| 751 | AXI1_RD_DATA_BEAT_RECEIVED = 0x182 |
| 752 | AXI1_RD_TRAN_REQ_STALLED = 0x183 |
| 753 | AXI1_WR_TRANS_ACCEPTED = 0x184 |
| 754 | AXI1_WR_TRANS_COMPLETED_M = 0x185 |
| 755 | AXI1_WR_TRANS_COMPLETED_S = 0x186 |
| 756 | AXI1_WR_DATA_BEAT_WRITTEN = 0x187 |
| 757 | AXI1_WR_TRAN_REQ_STALLED = 0x188 |
| 758 | AXI1_WR_DATA_BEAT_STALLED = 0x189 |
| 759 | AXI1_ENABLED_CYCLES = 0x18c |
| 760 | AXI1_RD_STALL_LIMIT = 0x18e |
| 761 | AXI1_WR_STALL_LIMIT = 0x18f |
| 762 | AXI_LATENCY_ANY = 0xa0 |
| 763 | AXI_LATENCY_32 = 0xa1 |
| 764 | AXI_LATENCY_64 = 0xa2 |
| 765 | AXI_LATENCY_128 = 0xa3 |
| 766 | AXI_LATENCY_256 = 0xa4 |
| 767 | AXI_LATENCY_512 = 0xa5 |
| 768 | AXI_LATENCY_1024 = 0xa6 |
| 769 | |
| 770 | class pooling_mode(Enum): |
| 771 | MAX = 0 |
| 772 | AVERAGE = 1 |
| 773 | REDUCE_SUM = 2 |
| 774 | |
| 775 | class privilege_level(Enum): |
| 776 | USER = 0 |
| 777 | PRIVILEGED = 1 |
| 778 | |
Tim Hall | 79d07d2 | 2020-04-27 18:20:16 +0100 | [diff] [blame] | 779 | class resampling_mode(Enum): |
| 780 | NONE = 0 |
| 781 | NEAREST = 1 |
| 782 | TRANSPOSE = 2 |
| 783 | |
| 784 | class rounding(Enum): |
| 785 | TFL = 0 |
| 786 | TRUNCATE = 1 |
| 787 | NATURAL = 2 |
| 788 | |
| 789 | class security_level(Enum): |
| 790 | SECURE = 0 |
| 791 | NON_SECURE = 1 |
| 792 | |
Diqing Zhong | b731170 | 2020-04-14 12:31:44 +0200 | [diff] [blame] | 793 | class shram_size(Enum): |
| 794 | SHRAM_48KB = 0x30 |
| 795 | SHRAM_24KB = 0x18 |
| 796 | SHRAM_16KB = 0x10 |
| 797 | |
Tim Hall | 79d07d2 | 2020-04-27 18:20:16 +0100 | [diff] [blame] | 798 | class state(Enum): |
| 799 | STOPPED = 0 |
| 800 | RUNNING = 1 |
| 801 | |
| 802 | class stride_mode(Enum): |
| 803 | STRIDE_MODE_1D = 0 |
| 804 | STRIDE_MODE_2D = 1 |
| 805 | STRIDE_MODE_3D = 2 |
| 806 | |
| 807 | |
| 808 | class clkforce_r(Union): |
| 809 | class _bitfield(Structure): |
| 810 | _fields_ = [ |
| 811 | ("top_level_clk", c_uint32, 1), |
| 812 | ("cc_clk", c_uint32, 1), |
| 813 | ("dma_clk", c_uint32, 1), |
| 814 | ("mac_clk", c_uint32, 1), |
| 815 | ("ao_clk", c_uint32, 1), |
| 816 | ("wd_clk", c_uint32, 1), |
| 817 | ("reserved0", c_uint32, 26), |
| 818 | ] |
| 819 | _fields_ = [("bits", _bitfield), |
| 820 | ("word", c_uint32)] |
| 821 | def set_top_level_clk(self, value): self.bits.top_level_clk = value |
| 822 | def get_top_level_clk(self): value = self.bits.top_level_clk; return value |
| 823 | def set_cc_clk(self, value): self.bits.cc_clk = value |
| 824 | def get_cc_clk(self): value = self.bits.cc_clk; return value |
| 825 | def set_dma_clk(self, value): self.bits.dma_clk = value |
| 826 | def get_dma_clk(self): value = self.bits.dma_clk; return value |
| 827 | def set_mac_clk(self, value): self.bits.mac_clk = value |
| 828 | def get_mac_clk(self): value = self.bits.mac_clk; return value |
| 829 | def set_ao_clk(self, value): self.bits.ao_clk = value |
| 830 | def get_ao_clk(self): value = self.bits.ao_clk; return value |
| 831 | def set_wd_clk(self, value): self.bits.wd_clk = value |
| 832 | def get_wd_clk(self): value = self.bits.wd_clk; return value |
| 833 | |
| 834 | |
| 835 | class basep0_r(Union): |
| 836 | class _bitfield(Structure): |
| 837 | _fields_ = [ |
| 838 | ("addr_word", c_uint32, 32), |
| 839 | ] |
| 840 | _fields_ = [("bits", _bitfield), |
| 841 | ("word", c_uint32)] |
| 842 | def set_addr_word(self, value): self.bits.addr_word = value |
| 843 | def get_addr_word(self): value = self.bits.addr_word; return value |
| 844 | |
| 845 | |
| 846 | class basep1_r(Union): |
| 847 | class _bitfield(Structure): |
| 848 | _fields_ = [ |
| 849 | ("addr_word", c_uint32, 32), |
| 850 | ] |
| 851 | _fields_ = [("bits", _bitfield), |
| 852 | ("word", c_uint32)] |
| 853 | def set_addr_word(self, value): self.bits.addr_word = value |
| 854 | def get_addr_word(self): value = self.bits.addr_word; return value |
| 855 | |
| 856 | |
| 857 | class basep2_r(Union): |
| 858 | class _bitfield(Structure): |
| 859 | _fields_ = [ |
| 860 | ("addr_word", c_uint32, 32), |
| 861 | ] |
| 862 | _fields_ = [("bits", _bitfield), |
| 863 | ("word", c_uint32)] |
| 864 | def set_addr_word(self, value): self.bits.addr_word = value |
| 865 | def get_addr_word(self): value = self.bits.addr_word; return value |
| 866 | |
| 867 | |
| 868 | class basep3_r(Union): |
| 869 | class _bitfield(Structure): |
| 870 | _fields_ = [ |
| 871 | ("addr_word", c_uint32, 32), |
| 872 | ] |
| 873 | _fields_ = [("bits", _bitfield), |
| 874 | ("word", c_uint32)] |
| 875 | def set_addr_word(self, value): self.bits.addr_word = value |
| 876 | def get_addr_word(self): value = self.bits.addr_word; return value |
| 877 | |
| 878 | |
| 879 | class basep4_r(Union): |
| 880 | class _bitfield(Structure): |
| 881 | _fields_ = [ |
| 882 | ("addr_word", c_uint32, 32), |
| 883 | ] |
| 884 | _fields_ = [("bits", _bitfield), |
| 885 | ("word", c_uint32)] |
| 886 | def set_addr_word(self, value): self.bits.addr_word = value |
| 887 | def get_addr_word(self): value = self.bits.addr_word; return value |
| 888 | |
| 889 | |
| 890 | class basep5_r(Union): |
| 891 | class _bitfield(Structure): |
| 892 | _fields_ = [ |
| 893 | ("addr_word", c_uint32, 32), |
| 894 | ] |
| 895 | _fields_ = [("bits", _bitfield), |
| 896 | ("word", c_uint32)] |
| 897 | def set_addr_word(self, value): self.bits.addr_word = value |
| 898 | def get_addr_word(self): value = self.bits.addr_word; return value |
| 899 | |
| 900 | |
| 901 | class basep6_r(Union): |
| 902 | class _bitfield(Structure): |
| 903 | _fields_ = [ |
| 904 | ("addr_word", c_uint32, 32), |
| 905 | ] |
| 906 | _fields_ = [("bits", _bitfield), |
| 907 | ("word", c_uint32)] |
| 908 | def set_addr_word(self, value): self.bits.addr_word = value |
| 909 | def get_addr_word(self): value = self.bits.addr_word; return value |
| 910 | |
| 911 | |
| 912 | class basep7_r(Union): |
| 913 | class _bitfield(Structure): |
| 914 | _fields_ = [ |
| 915 | ("addr_word", c_uint32, 32), |
| 916 | ] |
| 917 | _fields_ = [("bits", _bitfield), |
| 918 | ("word", c_uint32)] |
| 919 | def set_addr_word(self, value): self.bits.addr_word = value |
| 920 | def get_addr_word(self): value = self.bits.addr_word; return value |
| 921 | |
| 922 | |
| 923 | class basep8_r(Union): |
| 924 | class _bitfield(Structure): |
| 925 | _fields_ = [ |
| 926 | ("addr_word", c_uint32, 32), |
| 927 | ] |
| 928 | _fields_ = [("bits", _bitfield), |
| 929 | ("word", c_uint32)] |
| 930 | def set_addr_word(self, value): self.bits.addr_word = value |
| 931 | def get_addr_word(self): value = self.bits.addr_word; return value |
| 932 | |
| 933 | |
| 934 | class basep9_r(Union): |
| 935 | class _bitfield(Structure): |
| 936 | _fields_ = [ |
| 937 | ("addr_word", c_uint32, 32), |
| 938 | ] |
| 939 | _fields_ = [("bits", _bitfield), |
| 940 | ("word", c_uint32)] |
| 941 | def set_addr_word(self, value): self.bits.addr_word = value |
| 942 | def get_addr_word(self): value = self.bits.addr_word; return value |
| 943 | |
| 944 | |
| 945 | class basep10_r(Union): |
| 946 | class _bitfield(Structure): |
| 947 | _fields_ = [ |
| 948 | ("addr_word", c_uint32, 32), |
| 949 | ] |
| 950 | _fields_ = [("bits", _bitfield), |
| 951 | ("word", c_uint32)] |
| 952 | def set_addr_word(self, value): self.bits.addr_word = value |
| 953 | def get_addr_word(self): value = self.bits.addr_word; return value |
| 954 | |
| 955 | |
| 956 | class basep11_r(Union): |
| 957 | class _bitfield(Structure): |
| 958 | _fields_ = [ |
| 959 | ("addr_word", c_uint32, 32), |
| 960 | ] |
| 961 | _fields_ = [("bits", _bitfield), |
| 962 | ("word", c_uint32)] |
| 963 | def set_addr_word(self, value): self.bits.addr_word = value |
| 964 | def get_addr_word(self): value = self.bits.addr_word; return value |
| 965 | |
| 966 | |
| 967 | class basep12_r(Union): |
| 968 | class _bitfield(Structure): |
| 969 | _fields_ = [ |
| 970 | ("addr_word", c_uint32, 32), |
| 971 | ] |
| 972 | _fields_ = [("bits", _bitfield), |
| 973 | ("word", c_uint32)] |
| 974 | def set_addr_word(self, value): self.bits.addr_word = value |
| 975 | def get_addr_word(self): value = self.bits.addr_word; return value |
| 976 | |
| 977 | |
| 978 | class basep13_r(Union): |
| 979 | class _bitfield(Structure): |
| 980 | _fields_ = [ |
| 981 | ("addr_word", c_uint32, 32), |
| 982 | ] |
| 983 | _fields_ = [("bits", _bitfield), |
| 984 | ("word", c_uint32)] |
| 985 | def set_addr_word(self, value): self.bits.addr_word = value |
| 986 | def get_addr_word(self): value = self.bits.addr_word; return value |
| 987 | |
| 988 | |
| 989 | class basep14_r(Union): |
| 990 | class _bitfield(Structure): |
| 991 | _fields_ = [ |
| 992 | ("addr_word", c_uint32, 32), |
| 993 | ] |
| 994 | _fields_ = [("bits", _bitfield), |
| 995 | ("word", c_uint32)] |
| 996 | def set_addr_word(self, value): self.bits.addr_word = value |
| 997 | def get_addr_word(self): value = self.bits.addr_word; return value |
| 998 | |
| 999 | |
| 1000 | class basep15_r(Union): |
| 1001 | class _bitfield(Structure): |
| 1002 | _fields_ = [ |
| 1003 | ("addr_word", c_uint32, 32), |
| 1004 | ] |
| 1005 | _fields_ = [("bits", _bitfield), |
| 1006 | ("word", c_uint32)] |
| 1007 | def set_addr_word(self, value): self.bits.addr_word = value |
| 1008 | def get_addr_word(self): value = self.bits.addr_word; return value |
| 1009 | |
| 1010 | |
| 1011 | class pid4_r(Union): |
| 1012 | class _bitfield(Structure): |
| 1013 | _fields_ = [ |
| 1014 | ("pid4", c_uint32, 32), |
| 1015 | ] |
| 1016 | _fields_ = [("bits", _bitfield), |
| 1017 | ("word", c_uint32)] |
| 1018 | def set_pid4(self, value): self.bits.pid4 = value |
| 1019 | def get_pid4(self): value = self.bits.pid4; return value |
| 1020 | |
| 1021 | |
| 1022 | class pid5_r(Union): |
| 1023 | class _bitfield(Structure): |
| 1024 | _fields_ = [ |
| 1025 | ("pid5", c_uint32, 32), |
| 1026 | ] |
| 1027 | _fields_ = [("bits", _bitfield), |
| 1028 | ("word", c_uint32)] |
| 1029 | def set_pid5(self, value): self.bits.pid5 = value |
| 1030 | def get_pid5(self): value = self.bits.pid5; return value |
| 1031 | |
| 1032 | |
| 1033 | class pid6_r(Union): |
| 1034 | class _bitfield(Structure): |
| 1035 | _fields_ = [ |
| 1036 | ("pid6", c_uint32, 32), |
| 1037 | ] |
| 1038 | _fields_ = [("bits", _bitfield), |
| 1039 | ("word", c_uint32)] |
| 1040 | def set_pid6(self, value): self.bits.pid6 = value |
| 1041 | def get_pid6(self): value = self.bits.pid6; return value |
| 1042 | |
| 1043 | |
| 1044 | class pid7_r(Union): |
| 1045 | class _bitfield(Structure): |
| 1046 | _fields_ = [ |
| 1047 | ("pid7", c_uint32, 32), |
| 1048 | ] |
| 1049 | _fields_ = [("bits", _bitfield), |
| 1050 | ("word", c_uint32)] |
| 1051 | def set_pid7(self, value): self.bits.pid7 = value |
| 1052 | def get_pid7(self): value = self.bits.pid7; return value |
| 1053 | |
| 1054 | |
| 1055 | class pid0_r(Union): |
| 1056 | class _bitfield(Structure): |
| 1057 | _fields_ = [ |
| 1058 | ("pid0", c_uint32, 32), |
| 1059 | ] |
| 1060 | _fields_ = [("bits", _bitfield), |
| 1061 | ("word", c_uint32)] |
| 1062 | def set_pid0(self, value): self.bits.pid0 = value |
| 1063 | def get_pid0(self): value = self.bits.pid0; return value |
| 1064 | |
| 1065 | |
| 1066 | class pid1_r(Union): |
| 1067 | class _bitfield(Structure): |
| 1068 | _fields_ = [ |
| 1069 | ("pid1", c_uint32, 32), |
| 1070 | ] |
| 1071 | _fields_ = [("bits", _bitfield), |
| 1072 | ("word", c_uint32)] |
| 1073 | def set_pid1(self, value): self.bits.pid1 = value |
| 1074 | def get_pid1(self): value = self.bits.pid1; return value |
| 1075 | |
| 1076 | |
| 1077 | class pid2_r(Union): |
| 1078 | class _bitfield(Structure): |
| 1079 | _fields_ = [ |
| 1080 | ("pid2", c_uint32, 32), |
| 1081 | ] |
| 1082 | _fields_ = [("bits", _bitfield), |
| 1083 | ("word", c_uint32)] |
| 1084 | def set_pid2(self, value): self.bits.pid2 = value |
| 1085 | def get_pid2(self): value = self.bits.pid2; return value |
| 1086 | |
| 1087 | |
| 1088 | class pid3_r(Union): |
| 1089 | class _bitfield(Structure): |
| 1090 | _fields_ = [ |
| 1091 | ("pid3", c_uint32, 32), |
| 1092 | ] |
| 1093 | _fields_ = [("bits", _bitfield), |
| 1094 | ("word", c_uint32)] |
| 1095 | def set_pid3(self, value): self.bits.pid3 = value |
| 1096 | def get_pid3(self): value = self.bits.pid3; return value |
| 1097 | |
| 1098 | |
| 1099 | class cid0_r(Union): |
| 1100 | class _bitfield(Structure): |
| 1101 | _fields_ = [ |
| 1102 | ("cid0", c_uint32, 32), |
| 1103 | ] |
| 1104 | _fields_ = [("bits", _bitfield), |
| 1105 | ("word", c_uint32)] |
| 1106 | def set_cid0(self, value): self.bits.cid0 = value |
| 1107 | def get_cid0(self): value = self.bits.cid0; return value |
| 1108 | |
| 1109 | |
| 1110 | class cid1_r(Union): |
| 1111 | class _bitfield(Structure): |
| 1112 | _fields_ = [ |
| 1113 | ("cid1", c_uint32, 32), |
| 1114 | ] |
| 1115 | _fields_ = [("bits", _bitfield), |
| 1116 | ("word", c_uint32)] |
| 1117 | def set_cid1(self, value): self.bits.cid1 = value |
| 1118 | def get_cid1(self): value = self.bits.cid1; return value |
| 1119 | |
| 1120 | |
| 1121 | class cid2_r(Union): |
| 1122 | class _bitfield(Structure): |
| 1123 | _fields_ = [ |
| 1124 | ("cid2", c_uint32, 32), |
| 1125 | ] |
| 1126 | _fields_ = [("bits", _bitfield), |
| 1127 | ("word", c_uint32)] |
| 1128 | def set_cid2(self, value): self.bits.cid2 = value |
| 1129 | def get_cid2(self): value = self.bits.cid2; return value |
| 1130 | |
| 1131 | |
| 1132 | class cid3_r(Union): |
| 1133 | class _bitfield(Structure): |
| 1134 | _fields_ = [ |
| 1135 | ("cid3", c_uint32, 32), |
| 1136 | ] |
| 1137 | _fields_ = [("bits", _bitfield), |
| 1138 | ("word", c_uint32)] |
| 1139 | def set_cid3(self, value): self.bits.cid3 = value |
| 1140 | def get_cid3(self): value = self.bits.cid3; return value |
| 1141 | |
| 1142 | |
| 1143 | class id_r(Union): |
| 1144 | class _bitfield(Structure): |
| 1145 | _fields_ = [ |
| 1146 | ("version_status", c_uint32, 4), |
| 1147 | ("version_minor", c_uint32, 4), |
| 1148 | ("version_major", c_uint32, 4), |
| 1149 | ("product_major", c_uint32, 4), |
| 1150 | ("arch_patch_rev", c_uint32, 4), |
| 1151 | ("arch_minor_rev", c_uint32, 8), |
| 1152 | ("arch_major_rev", c_uint32, 4), |
| 1153 | ] |
| 1154 | _fields_ = [("bits", _bitfield), |
| 1155 | ("word", c_uint32)] |
| 1156 | def set_version_status(self, value): self.bits.version_status = value |
| 1157 | def get_version_status(self): value = self.bits.version_status; return value |
| 1158 | def set_version_minor(self, value): self.bits.version_minor = value |
| 1159 | def get_version_minor(self): value = self.bits.version_minor; return value |
| 1160 | def set_version_major(self, value): self.bits.version_major = value |
| 1161 | def get_version_major(self): value = self.bits.version_major; return value |
| 1162 | def set_product_major(self, value): self.bits.product_major = value |
| 1163 | def get_product_major(self): value = self.bits.product_major; return value |
| 1164 | def set_arch_patch_rev(self, value): self.bits.arch_patch_rev = value |
| 1165 | def get_arch_patch_rev(self): value = self.bits.arch_patch_rev; return value |
| 1166 | def set_arch_minor_rev(self, value): self.bits.arch_minor_rev = value |
| 1167 | def get_arch_minor_rev(self): value = self.bits.arch_minor_rev; return value |
| 1168 | def set_arch_major_rev(self, value): self.bits.arch_major_rev = value |
| 1169 | def get_arch_major_rev(self): value = self.bits.arch_major_rev; return value |
| 1170 | |
| 1171 | |
| 1172 | class status_r(Union): |
| 1173 | class _bitfield(Structure): |
| 1174 | _fields_ = [ |
| 1175 | ("state", c_uint32, 1), |
| 1176 | ("irq_raised", c_uint32, 1), |
| 1177 | ("bus_status", c_uint32, 1), |
| 1178 | ("reset_status", c_uint32, 1), |
| 1179 | ("cmd_parse_error", c_uint32, 1), |
| 1180 | ("cmd_end_reached", c_uint32, 1), |
| 1181 | ("pmu_irq_raised", c_uint32, 1), |
| 1182 | ("wd_fault", c_uint32, 1), |
| 1183 | ("reserved0", c_uint32, 3), |
| 1184 | ("faulting_interface", c_uint32, 1), |
| 1185 | ("faulting_channel", c_uint32, 4), |
| 1186 | ("irq_history_mask", c_uint32, 16), |
| 1187 | ] |
| 1188 | _fields_ = [("bits", _bitfield), |
| 1189 | ("word", c_uint32)] |
| 1190 | def set_state(self, value): self.bits.state = value |
| 1191 | def get_state(self): value = self.bits.state; return value |
| 1192 | def set_irq_raised(self, value): self.bits.irq_raised = value |
| 1193 | def get_irq_raised(self): value = self.bits.irq_raised; return value |
| 1194 | def set_bus_status(self, value): self.bits.bus_status = value |
| 1195 | def get_bus_status(self): value = self.bits.bus_status; return value |
| 1196 | def set_reset_status(self, value): self.bits.reset_status = value |
| 1197 | def get_reset_status(self): value = self.bits.reset_status; return value |
| 1198 | def set_cmd_parse_error(self, value): self.bits.cmd_parse_error = value |
| 1199 | def get_cmd_parse_error(self): value = self.bits.cmd_parse_error; return value |
| 1200 | def set_cmd_end_reached(self, value): self.bits.cmd_end_reached = value |
| 1201 | def get_cmd_end_reached(self): value = self.bits.cmd_end_reached; return value |
| 1202 | def set_pmu_irq_raised(self, value): self.bits.pmu_irq_raised = value |
| 1203 | def get_pmu_irq_raised(self): value = self.bits.pmu_irq_raised; return value |
| 1204 | def set_wd_fault(self, value): self.bits.wd_fault = value |
| 1205 | def get_wd_fault(self): value = self.bits.wd_fault; return value |
| 1206 | def set_faulting_interface(self, value): self.bits.faulting_interface = value |
| 1207 | def get_faulting_interface(self): value = self.bits.faulting_interface; return value |
| 1208 | def set_faulting_channel(self, value): self.bits.faulting_channel = value |
| 1209 | def get_faulting_channel(self): value = self.bits.faulting_channel; return value |
| 1210 | def set_irq_history_mask(self, value): self.bits.irq_history_mask = value |
| 1211 | def get_irq_history_mask(self): value = self.bits.irq_history_mask; return value |
| 1212 | |
| 1213 | |
| 1214 | class cmd_r(Union): |
| 1215 | class _bitfield(Structure): |
| 1216 | _fields_ = [ |
| 1217 | ("transition_to_running_state", c_uint32, 1), |
| 1218 | ("clear_irq", c_uint32, 1), |
| 1219 | ("clock_q_enable", c_uint32, 1), |
| 1220 | ("power_q_enable", c_uint32, 1), |
| 1221 | ("stop_request", c_uint32, 1), |
| 1222 | ("reserved0", c_uint32, 11), |
| 1223 | ("clear_irq_history", c_uint32, 16), |
| 1224 | ] |
| 1225 | _fields_ = [("bits", _bitfield), |
| 1226 | ("word", c_uint32)] |
| 1227 | def set_transition_to_running_state(self, value): self.bits.transition_to_running_state = value |
| 1228 | def get_transition_to_running_state(self): value = self.bits.transition_to_running_state; return value |
| 1229 | def set_clear_irq(self, value): self.bits.clear_irq = value |
| 1230 | def get_clear_irq(self): value = self.bits.clear_irq; return value |
| 1231 | def set_clock_q_enable(self, value): self.bits.clock_q_enable = value |
| 1232 | def get_clock_q_enable(self): value = self.bits.clock_q_enable; return value |
| 1233 | def set_power_q_enable(self, value): self.bits.power_q_enable = value |
| 1234 | def get_power_q_enable(self): value = self.bits.power_q_enable; return value |
| 1235 | def set_stop_request(self, value): self.bits.stop_request = value |
| 1236 | def get_stop_request(self): value = self.bits.stop_request; return value |
| 1237 | def set_clear_irq_history(self, value): self.bits.clear_irq_history = value |
| 1238 | def get_clear_irq_history(self): value = self.bits.clear_irq_history; return value |
| 1239 | |
| 1240 | |
| 1241 | class reset_r(Union): |
| 1242 | class _bitfield(Structure): |
| 1243 | _fields_ = [ |
| 1244 | ("pending_cpl", c_uint32, 1), |
| 1245 | ("pending_csl", c_uint32, 1), |
| 1246 | ("reserved0", c_uint32, 30), |
| 1247 | ] |
| 1248 | _fields_ = [("bits", _bitfield), |
| 1249 | ("word", c_uint32)] |
| 1250 | def set_pending_cpl(self, value): self.bits.pending_cpl = value |
| 1251 | def get_pending_cpl(self): value = self.bits.pending_cpl; return value |
| 1252 | def set_pending_csl(self, value): self.bits.pending_csl = value |
| 1253 | def get_pending_csl(self): value = self.bits.pending_csl; return value |
| 1254 | |
| 1255 | |
| 1256 | class qbase0_r(Union): |
| 1257 | class _bitfield(Structure): |
| 1258 | _fields_ = [ |
| 1259 | ("qbase0", c_uint32, 32), |
| 1260 | ] |
| 1261 | _fields_ = [("bits", _bitfield), |
| 1262 | ("word", c_uint32)] |
| 1263 | def set_qbase0(self, value): self.bits.qbase0 = value |
| 1264 | def get_qbase0(self): value = self.bits.qbase0; return value |
| 1265 | |
| 1266 | |
| 1267 | class qbase1_r(Union): |
| 1268 | class _bitfield(Structure): |
| 1269 | _fields_ = [ |
| 1270 | ("qbase1", c_uint32, 32), |
| 1271 | ] |
| 1272 | _fields_ = [("bits", _bitfield), |
| 1273 | ("word", c_uint32)] |
| 1274 | def set_qbase1(self, value): self.bits.qbase1 = value |
| 1275 | def get_qbase1(self): value = self.bits.qbase1; return value |
| 1276 | |
| 1277 | |
| 1278 | class qread_r(Union): |
| 1279 | class _bitfield(Structure): |
| 1280 | _fields_ = [ |
| 1281 | ("qread", c_uint32, 32), |
| 1282 | ] |
| 1283 | _fields_ = [("bits", _bitfield), |
| 1284 | ("word", c_uint32)] |
| 1285 | def set_qread(self, value): self.bits.qread = value |
| 1286 | def get_qread(self): value = self.bits.qread; return value |
| 1287 | |
| 1288 | |
| 1289 | class qconfig_r(Union): |
| 1290 | class _bitfield(Structure): |
| 1291 | _fields_ = [ |
| 1292 | ("qconfig", c_uint32, 32), |
| 1293 | ] |
| 1294 | _fields_ = [("bits", _bitfield), |
| 1295 | ("word", c_uint32)] |
| 1296 | def set_qconfig(self, value): self.bits.qconfig = value |
| 1297 | def get_qconfig(self): value = self.bits.qconfig; return value |
| 1298 | |
| 1299 | |
| 1300 | class qsize_r(Union): |
| 1301 | class _bitfield(Structure): |
| 1302 | _fields_ = [ |
| 1303 | ("qsize", c_uint32, 32), |
| 1304 | ] |
| 1305 | _fields_ = [("bits", _bitfield), |
| 1306 | ("word", c_uint32)] |
| 1307 | def set_qsize(self, value): self.bits.qsize = value |
| 1308 | def get_qsize(self): value = self.bits.qsize; return value |
| 1309 | |
| 1310 | |
| 1311 | class prot_r(Union): |
| 1312 | class _bitfield(Structure): |
| 1313 | _fields_ = [ |
| 1314 | ("active_cpl", c_uint32, 1), |
| 1315 | ("active_csl", c_uint32, 1), |
| 1316 | ("reserved0", c_uint32, 30), |
| 1317 | ] |
| 1318 | _fields_ = [("bits", _bitfield), |
| 1319 | ("word", c_uint32)] |
| 1320 | def set_active_cpl(self, value): self.bits.active_cpl = value |
| 1321 | def get_active_cpl(self): value = self.bits.active_cpl; return value |
| 1322 | def set_active_csl(self, value): self.bits.active_csl = value |
| 1323 | def get_active_csl(self): value = self.bits.active_csl; return value |
| 1324 | |
| 1325 | |
| 1326 | class config_r(Union): |
| 1327 | class _bitfield(Structure): |
| 1328 | _fields_ = [ |
| 1329 | ("macs_per_cc", c_uint32, 4), |
| 1330 | ("cmd_stream_version", c_uint32, 4), |
| 1331 | ("shram_size", c_uint32, 8), |
| 1332 | ("reserved0", c_uint32, 12), |
| 1333 | ("product", c_uint32, 4), |
| 1334 | ] |
| 1335 | _fields_ = [("bits", _bitfield), |
| 1336 | ("word", c_uint32)] |
| 1337 | def set_macs_per_cc(self, value): self.bits.macs_per_cc = value |
| 1338 | def get_macs_per_cc(self): value = self.bits.macs_per_cc; return value |
| 1339 | def set_cmd_stream_version(self, value): self.bits.cmd_stream_version = value |
| 1340 | def get_cmd_stream_version(self): value = self.bits.cmd_stream_version; return value |
| 1341 | def set_shram_size(self, value): self.bits.shram_size = value |
| 1342 | def get_shram_size(self): value = self.bits.shram_size; return value |
| 1343 | def set_product(self, value): self.bits.product = value |
| 1344 | def get_product(self): value = self.bits.product; return value |
| 1345 | |
| 1346 | |
| 1347 | class lock_r(Union): |
| 1348 | class _bitfield(Structure): |
| 1349 | _fields_ = [ |
| 1350 | ("lock", c_uint32, 32), |
| 1351 | ] |
| 1352 | _fields_ = [("bits", _bitfield), |
| 1353 | ("word", c_uint32)] |
| 1354 | def set_lock(self, value): self.bits.lock = value |
| 1355 | def get_lock(self): value = self.bits.lock; return value |
| 1356 | |
| 1357 | |
| 1358 | class regioncfg_r(Union): |
| 1359 | class _bitfield(Structure): |
| 1360 | _fields_ = [ |
| 1361 | ("region0", c_uint32, 2), |
| 1362 | ("region1", c_uint32, 2), |
| 1363 | ("region2", c_uint32, 2), |
| 1364 | ("region3", c_uint32, 2), |
| 1365 | ("region4", c_uint32, 2), |
| 1366 | ("region5", c_uint32, 2), |
| 1367 | ("region6", c_uint32, 2), |
| 1368 | ("region7", c_uint32, 2), |
| 1369 | ("reserved0", c_uint32, 16), |
| 1370 | ] |
| 1371 | _fields_ = [("bits", _bitfield), |
| 1372 | ("word", c_uint32)] |
| 1373 | def set_region0(self, value): self.bits.region0 = value |
| 1374 | def get_region0(self): value = self.bits.region0; return value |
| 1375 | def set_region1(self, value): self.bits.region1 = value |
| 1376 | def get_region1(self): value = self.bits.region1; return value |
| 1377 | def set_region2(self, value): self.bits.region2 = value |
| 1378 | def get_region2(self): value = self.bits.region2; return value |
| 1379 | def set_region3(self, value): self.bits.region3 = value |
| 1380 | def get_region3(self): value = self.bits.region3; return value |
| 1381 | def set_region4(self, value): self.bits.region4 = value |
| 1382 | def get_region4(self): value = self.bits.region4; return value |
| 1383 | def set_region5(self, value): self.bits.region5 = value |
| 1384 | def get_region5(self): value = self.bits.region5; return value |
| 1385 | def set_region6(self, value): self.bits.region6 = value |
| 1386 | def get_region6(self): value = self.bits.region6; return value |
| 1387 | def set_region7(self, value): self.bits.region7 = value |
| 1388 | def get_region7(self): value = self.bits.region7; return value |
| 1389 | |
| 1390 | |
| 1391 | class axi_limit0_r(Union): |
| 1392 | class _bitfield(Structure): |
| 1393 | _fields_ = [ |
| 1394 | ("max_beats", c_uint32, 2), |
| 1395 | ("reserved0", c_uint32, 2), |
| 1396 | ("memtype", c_uint32, 4), |
| 1397 | ("reserved1", c_uint32, 8), |
| 1398 | ("max_outstanding_read_m1", c_uint32, 8), |
| 1399 | ("max_outstanding_write_m1", c_uint32, 8), |
| 1400 | ] |
| 1401 | _fields_ = [("bits", _bitfield), |
| 1402 | ("word", c_uint32)] |
| 1403 | def set_max_beats(self, value): self.bits.max_beats = value |
| 1404 | def get_max_beats(self): value = self.bits.max_beats; return value |
| 1405 | def set_memtype(self, value): self.bits.memtype = value |
| 1406 | def get_memtype(self): value = self.bits.memtype; return value |
| 1407 | def set_max_outstanding_read_m1(self, value): self.bits.max_outstanding_read_m1 = value |
| 1408 | def get_max_outstanding_read_m1(self): value = self.bits.max_outstanding_read_m1; return value |
| 1409 | def set_max_outstanding_write_m1(self, value): self.bits.max_outstanding_write_m1 = value |
| 1410 | def get_max_outstanding_write_m1(self): value = self.bits.max_outstanding_write_m1; return value |
| 1411 | |
| 1412 | |
| 1413 | class axi_limit1_r(Union): |
| 1414 | class _bitfield(Structure): |
| 1415 | _fields_ = [ |
| 1416 | ("max_beats", c_uint32, 2), |
| 1417 | ("reserved0", c_uint32, 2), |
| 1418 | ("memtype", c_uint32, 4), |
| 1419 | ("reserved1", c_uint32, 8), |
| 1420 | ("max_outstanding_read_m1", c_uint32, 8), |
| 1421 | ("max_outstanding_write_m1", c_uint32, 8), |
| 1422 | ] |
| 1423 | _fields_ = [("bits", _bitfield), |
| 1424 | ("word", c_uint32)] |
| 1425 | def set_max_beats(self, value): self.bits.max_beats = value |
| 1426 | def get_max_beats(self): value = self.bits.max_beats; return value |
| 1427 | def set_memtype(self, value): self.bits.memtype = value |
| 1428 | def get_memtype(self): value = self.bits.memtype; return value |
| 1429 | def set_max_outstanding_read_m1(self, value): self.bits.max_outstanding_read_m1 = value |
| 1430 | def get_max_outstanding_read_m1(self): value = self.bits.max_outstanding_read_m1; return value |
| 1431 | def set_max_outstanding_write_m1(self, value): self.bits.max_outstanding_write_m1 = value |
| 1432 | def get_max_outstanding_write_m1(self): value = self.bits.max_outstanding_write_m1; return value |
| 1433 | |
| 1434 | |
| 1435 | class axi_limit2_r(Union): |
| 1436 | class _bitfield(Structure): |
| 1437 | _fields_ = [ |
| 1438 | ("max_beats", c_uint32, 2), |
| 1439 | ("reserved0", c_uint32, 2), |
| 1440 | ("memtype", c_uint32, 4), |
| 1441 | ("reserved1", c_uint32, 8), |
| 1442 | ("max_outstanding_read_m1", c_uint32, 8), |
| 1443 | ("max_outstanding_write_m1", c_uint32, 8), |
| 1444 | ] |
| 1445 | _fields_ = [("bits", _bitfield), |
| 1446 | ("word", c_uint32)] |
| 1447 | def set_max_beats(self, value): self.bits.max_beats = value |
| 1448 | def get_max_beats(self): value = self.bits.max_beats; return value |
| 1449 | def set_memtype(self, value): self.bits.memtype = value |
| 1450 | def get_memtype(self): value = self.bits.memtype; return value |
| 1451 | def set_max_outstanding_read_m1(self, value): self.bits.max_outstanding_read_m1 = value |
| 1452 | def get_max_outstanding_read_m1(self): value = self.bits.max_outstanding_read_m1; return value |
| 1453 | def set_max_outstanding_write_m1(self, value): self.bits.max_outstanding_write_m1 = value |
| 1454 | def get_max_outstanding_write_m1(self): value = self.bits.max_outstanding_write_m1; return value |
| 1455 | |
| 1456 | |
| 1457 | class axi_limit3_r(Union): |
| 1458 | class _bitfield(Structure): |
| 1459 | _fields_ = [ |
| 1460 | ("max_beats", c_uint32, 2), |
| 1461 | ("reserved0", c_uint32, 2), |
| 1462 | ("memtype", c_uint32, 4), |
| 1463 | ("reserved1", c_uint32, 8), |
| 1464 | ("max_outstanding_read_m1", c_uint32, 8), |
| 1465 | ("max_outstanding_write_m1", c_uint32, 8), |
| 1466 | ] |
| 1467 | _fields_ = [("bits", _bitfield), |
| 1468 | ("word", c_uint32)] |
| 1469 | def set_max_beats(self, value): self.bits.max_beats = value |
| 1470 | def get_max_beats(self): value = self.bits.max_beats; return value |
| 1471 | def set_memtype(self, value): self.bits.memtype = value |
| 1472 | def get_memtype(self): value = self.bits.memtype; return value |
| 1473 | def set_max_outstanding_read_m1(self, value): self.bits.max_outstanding_read_m1 = value |
| 1474 | def get_max_outstanding_read_m1(self): value = self.bits.max_outstanding_read_m1; return value |
| 1475 | def set_max_outstanding_write_m1(self, value): self.bits.max_outstanding_write_m1 = value |
| 1476 | def get_max_outstanding_write_m1(self): value = self.bits.max_outstanding_write_m1; return value |
| 1477 | |
| 1478 | |
| 1479 | class pmcr_r(Union): |
| 1480 | class _bitfield(Structure): |
| 1481 | _fields_ = [ |
| 1482 | ("cnt_en", c_uint32, 1), |
| 1483 | ("event_cnt_rst", c_uint32, 1), |
| 1484 | ("cycle_cnt_rst", c_uint32, 1), |
| 1485 | ("mask_en", c_uint32, 1), |
| 1486 | ("reserved0", c_uint32, 7), |
| 1487 | ("num_event_cnt", c_uint32, 5), |
| 1488 | ("reserved1", c_uint32, 16), |
| 1489 | ] |
| 1490 | _fields_ = [("bits", _bitfield), |
| 1491 | ("word", c_uint32)] |
| 1492 | def set_cnt_en(self, value): self.bits.cnt_en = value |
| 1493 | def get_cnt_en(self): value = self.bits.cnt_en; return value |
| 1494 | def set_event_cnt_rst(self, value): self.bits.event_cnt_rst = value |
| 1495 | def get_event_cnt_rst(self): value = self.bits.event_cnt_rst; return value |
| 1496 | def set_cycle_cnt_rst(self, value): self.bits.cycle_cnt_rst = value |
| 1497 | def get_cycle_cnt_rst(self): value = self.bits.cycle_cnt_rst; return value |
| 1498 | def set_mask_en(self, value): self.bits.mask_en = value |
| 1499 | def get_mask_en(self): value = self.bits.mask_en; return value |
| 1500 | def set_num_event_cnt(self, value): self.bits.num_event_cnt = value |
| 1501 | def get_num_event_cnt(self): value = self.bits.num_event_cnt; return value |
| 1502 | |
| 1503 | |
| 1504 | class pmcntenset_r(Union): |
| 1505 | class _bitfield(Structure): |
| 1506 | _fields_ = [ |
| 1507 | ("event_cnt_0", c_uint32, 1), |
| 1508 | ("event_cnt_1", c_uint32, 1), |
| 1509 | ("event_cnt_2", c_uint32, 1), |
| 1510 | ("event_cnt_3", c_uint32, 1), |
| 1511 | ("reserved0", c_uint32, 27), |
| 1512 | ("cycle_cnt", c_uint32, 1), |
| 1513 | ] |
| 1514 | _fields_ = [("bits", _bitfield), |
| 1515 | ("word", c_uint32)] |
| 1516 | def set_event_cnt_0(self, value): self.bits.event_cnt_0 = value |
| 1517 | def get_event_cnt_0(self): value = self.bits.event_cnt_0; return value |
| 1518 | def set_event_cnt_1(self, value): self.bits.event_cnt_1 = value |
| 1519 | def get_event_cnt_1(self): value = self.bits.event_cnt_1; return value |
| 1520 | def set_event_cnt_2(self, value): self.bits.event_cnt_2 = value |
| 1521 | def get_event_cnt_2(self): value = self.bits.event_cnt_2; return value |
| 1522 | def set_event_cnt_3(self, value): self.bits.event_cnt_3 = value |
| 1523 | def get_event_cnt_3(self): value = self.bits.event_cnt_3; return value |
| 1524 | def set_cycle_cnt(self, value): self.bits.cycle_cnt = value |
| 1525 | def get_cycle_cnt(self): value = self.bits.cycle_cnt; return value |
| 1526 | |
| 1527 | |
| 1528 | class pmcntenclr_r(Union): |
| 1529 | class _bitfield(Structure): |
| 1530 | _fields_ = [ |
| 1531 | ("event_cnt_0", c_uint32, 1), |
| 1532 | ("event_cnt_1", c_uint32, 1), |
| 1533 | ("event_cnt_2", c_uint32, 1), |
| 1534 | ("event_cnt_3", c_uint32, 1), |
| 1535 | ("reserved0", c_uint32, 27), |
| 1536 | ("cycle_cnt", c_uint32, 1), |
| 1537 | ] |
| 1538 | _fields_ = [("bits", _bitfield), |
| 1539 | ("word", c_uint32)] |
| 1540 | def set_event_cnt_0(self, value): self.bits.event_cnt_0 = value |
| 1541 | def get_event_cnt_0(self): value = self.bits.event_cnt_0; return value |
| 1542 | def set_event_cnt_1(self, value): self.bits.event_cnt_1 = value |
| 1543 | def get_event_cnt_1(self): value = self.bits.event_cnt_1; return value |
| 1544 | def set_event_cnt_2(self, value): self.bits.event_cnt_2 = value |
| 1545 | def get_event_cnt_2(self): value = self.bits.event_cnt_2; return value |
| 1546 | def set_event_cnt_3(self, value): self.bits.event_cnt_3 = value |
| 1547 | def get_event_cnt_3(self): value = self.bits.event_cnt_3; return value |
| 1548 | def set_cycle_cnt(self, value): self.bits.cycle_cnt = value |
| 1549 | def get_cycle_cnt(self): value = self.bits.cycle_cnt; return value |
| 1550 | |
| 1551 | |
| 1552 | class pmovsset_r(Union): |
| 1553 | class _bitfield(Structure): |
| 1554 | _fields_ = [ |
| 1555 | ("event_cnt_0_ovf", c_uint32, 1), |
| 1556 | ("event_cnt_1_ovf", c_uint32, 1), |
| 1557 | ("event_cnt_2_ovf", c_uint32, 1), |
| 1558 | ("event_cnt_3_ovf", c_uint32, 1), |
| 1559 | ("reserved0", c_uint32, 27), |
| 1560 | ("cycle_cnt_ovf", c_uint32, 1), |
| 1561 | ] |
| 1562 | _fields_ = [("bits", _bitfield), |
| 1563 | ("word", c_uint32)] |
| 1564 | def set_event_cnt_0_ovf(self, value): self.bits.event_cnt_0_ovf = value |
| 1565 | def get_event_cnt_0_ovf(self): value = self.bits.event_cnt_0_ovf; return value |
| 1566 | def set_event_cnt_1_ovf(self, value): self.bits.event_cnt_1_ovf = value |
| 1567 | def get_event_cnt_1_ovf(self): value = self.bits.event_cnt_1_ovf; return value |
| 1568 | def set_event_cnt_2_ovf(self, value): self.bits.event_cnt_2_ovf = value |
| 1569 | def get_event_cnt_2_ovf(self): value = self.bits.event_cnt_2_ovf; return value |
| 1570 | def set_event_cnt_3_ovf(self, value): self.bits.event_cnt_3_ovf = value |
| 1571 | def get_event_cnt_3_ovf(self): value = self.bits.event_cnt_3_ovf; return value |
| 1572 | def set_cycle_cnt_ovf(self, value): self.bits.cycle_cnt_ovf = value |
| 1573 | def get_cycle_cnt_ovf(self): value = self.bits.cycle_cnt_ovf; return value |
| 1574 | |
| 1575 | |
| 1576 | class pmovsclr_r(Union): |
| 1577 | class _bitfield(Structure): |
| 1578 | _fields_ = [ |
| 1579 | ("event_cnt_0_ovf", c_uint32, 1), |
| 1580 | ("event_cnt_1_ovf", c_uint32, 1), |
| 1581 | ("event_cnt_2_ovf", c_uint32, 1), |
| 1582 | ("event_cnt_3_ovf", c_uint32, 1), |
| 1583 | ("reserved0", c_uint32, 27), |
| 1584 | ("cycle_cnt_ovf", c_uint32, 1), |
| 1585 | ] |
| 1586 | _fields_ = [("bits", _bitfield), |
| 1587 | ("word", c_uint32)] |
| 1588 | def set_event_cnt_0_ovf(self, value): self.bits.event_cnt_0_ovf = value |
| 1589 | def get_event_cnt_0_ovf(self): value = self.bits.event_cnt_0_ovf; return value |
| 1590 | def set_event_cnt_1_ovf(self, value): self.bits.event_cnt_1_ovf = value |
| 1591 | def get_event_cnt_1_ovf(self): value = self.bits.event_cnt_1_ovf; return value |
| 1592 | def set_event_cnt_2_ovf(self, value): self.bits.event_cnt_2_ovf = value |
| 1593 | def get_event_cnt_2_ovf(self): value = self.bits.event_cnt_2_ovf; return value |
| 1594 | def set_event_cnt_3_ovf(self, value): self.bits.event_cnt_3_ovf = value |
| 1595 | def get_event_cnt_3_ovf(self): value = self.bits.event_cnt_3_ovf; return value |
| 1596 | def set_cycle_cnt_ovf(self, value): self.bits.cycle_cnt_ovf = value |
| 1597 | def get_cycle_cnt_ovf(self): value = self.bits.cycle_cnt_ovf; return value |
| 1598 | |
| 1599 | |
| 1600 | class pmintset_r(Union): |
| 1601 | class _bitfield(Structure): |
| 1602 | _fields_ = [ |
| 1603 | ("event_cnt_0_int", c_uint32, 1), |
| 1604 | ("event_cnt_1_int", c_uint32, 1), |
| 1605 | ("event_cnt_2_int", c_uint32, 1), |
| 1606 | ("event_cnt_3_int", c_uint32, 1), |
| 1607 | ("reserved0", c_uint32, 27), |
| 1608 | ("cycle_cnt_int", c_uint32, 1), |
| 1609 | ] |
| 1610 | _fields_ = [("bits", _bitfield), |
| 1611 | ("word", c_uint32)] |
| 1612 | def set_event_cnt_0_int(self, value): self.bits.event_cnt_0_int = value |
| 1613 | def get_event_cnt_0_int(self): value = self.bits.event_cnt_0_int; return value |
| 1614 | def set_event_cnt_1_int(self, value): self.bits.event_cnt_1_int = value |
| 1615 | def get_event_cnt_1_int(self): value = self.bits.event_cnt_1_int; return value |
| 1616 | def set_event_cnt_2_int(self, value): self.bits.event_cnt_2_int = value |
| 1617 | def get_event_cnt_2_int(self): value = self.bits.event_cnt_2_int; return value |
| 1618 | def set_event_cnt_3_int(self, value): self.bits.event_cnt_3_int = value |
| 1619 | def get_event_cnt_3_int(self): value = self.bits.event_cnt_3_int; return value |
| 1620 | def set_cycle_cnt_int(self, value): self.bits.cycle_cnt_int = value |
| 1621 | def get_cycle_cnt_int(self): value = self.bits.cycle_cnt_int; return value |
| 1622 | |
| 1623 | |
| 1624 | class pmintclr_r(Union): |
| 1625 | class _bitfield(Structure): |
| 1626 | _fields_ = [ |
| 1627 | ("event_cnt_0_int", c_uint32, 1), |
| 1628 | ("event_cnt_1_int", c_uint32, 1), |
| 1629 | ("event_cnt_2_int", c_uint32, 1), |
| 1630 | ("event_cnt_3_int", c_uint32, 1), |
| 1631 | ("reserved0", c_uint32, 27), |
| 1632 | ("cycle_cnt_int", c_uint32, 1), |
| 1633 | ] |
| 1634 | _fields_ = [("bits", _bitfield), |
| 1635 | ("word", c_uint32)] |
| 1636 | def set_event_cnt_0_int(self, value): self.bits.event_cnt_0_int = value |
| 1637 | def get_event_cnt_0_int(self): value = self.bits.event_cnt_0_int; return value |
| 1638 | def set_event_cnt_1_int(self, value): self.bits.event_cnt_1_int = value |
| 1639 | def get_event_cnt_1_int(self): value = self.bits.event_cnt_1_int; return value |
| 1640 | def set_event_cnt_2_int(self, value): self.bits.event_cnt_2_int = value |
| 1641 | def get_event_cnt_2_int(self): value = self.bits.event_cnt_2_int; return value |
| 1642 | def set_event_cnt_3_int(self, value): self.bits.event_cnt_3_int = value |
| 1643 | def get_event_cnt_3_int(self): value = self.bits.event_cnt_3_int; return value |
| 1644 | def set_cycle_cnt_int(self, value): self.bits.cycle_cnt_int = value |
| 1645 | def get_cycle_cnt_int(self): value = self.bits.cycle_cnt_int; return value |
| 1646 | |
| 1647 | |
| 1648 | class pmccntr_lo_r(Union): |
| 1649 | class _bitfield(Structure): |
| 1650 | _fields_ = [ |
| 1651 | ("cycle_cnt_lo", c_uint32, 32), |
| 1652 | ] |
| 1653 | _fields_ = [("bits", _bitfield), |
| 1654 | ("word", c_uint32)] |
| 1655 | def set_cycle_cnt_lo(self, value): self.bits.cycle_cnt_lo = value |
| 1656 | def get_cycle_cnt_lo(self): value = self.bits.cycle_cnt_lo; return value |
| 1657 | |
| 1658 | |
| 1659 | class pmccntr_hi_r(Union): |
| 1660 | class _bitfield(Structure): |
| 1661 | _fields_ = [ |
| 1662 | ("cycle_cnt_hi", c_uint32, 16), |
| 1663 | ("reserved0", c_uint32, 16), |
| 1664 | ] |
| 1665 | _fields_ = [("bits", _bitfield), |
| 1666 | ("word", c_uint32)] |
| 1667 | def set_cycle_cnt_hi(self, value): self.bits.cycle_cnt_hi = value |
| 1668 | def get_cycle_cnt_hi(self): value = self.bits.cycle_cnt_hi; return value |
| 1669 | |
| 1670 | |
| 1671 | class pmccntr_cfg_r(Union): |
| 1672 | class _bitfield(Structure): |
| 1673 | _fields_ = [ |
| 1674 | ("cycle_cnt_cfg_start", c_uint32, 10), |
| 1675 | ("reserved0", c_uint32, 6), |
| 1676 | ("cycle_cnt_cfg_stop", c_uint32, 10), |
| 1677 | ("reserved1", c_uint32, 6), |
| 1678 | ] |
| 1679 | _fields_ = [("bits", _bitfield), |
| 1680 | ("word", c_uint32)] |
| 1681 | def set_cycle_cnt_cfg_start(self, value): self.bits.cycle_cnt_cfg_start = value |
| 1682 | def get_cycle_cnt_cfg_start(self): value = self.bits.cycle_cnt_cfg_start; return value |
| 1683 | def set_cycle_cnt_cfg_stop(self, value): self.bits.cycle_cnt_cfg_stop = value |
| 1684 | def get_cycle_cnt_cfg_stop(self): value = self.bits.cycle_cnt_cfg_stop; return value |
| 1685 | |
| 1686 | |
| 1687 | class pmcaxi_chan_r(Union): |
| 1688 | class _bitfield(Structure): |
| 1689 | _fields_ = [ |
| 1690 | ("axi_chan", c_uint32, 4), |
| 1691 | ("reserved0", c_uint32, 3), |
| 1692 | ("rw", c_uint32, 1), |
| 1693 | ("axi_cnt", c_uint32, 2), |
| 1694 | ("reserved1", c_uint32, 22), |
| 1695 | ] |
| 1696 | _fields_ = [("bits", _bitfield), |
| 1697 | ("word", c_uint32)] |
| 1698 | def set_axi_chan(self, value): self.bits.axi_chan = value |
| 1699 | def get_axi_chan(self): value = self.bits.axi_chan; return value |
| 1700 | def set_rw(self, value): self.bits.rw = value |
| 1701 | def get_rw(self): value = self.bits.rw; return value |
| 1702 | def set_axi_cnt(self, value): self.bits.axi_cnt = value |
| 1703 | def get_axi_cnt(self): value = self.bits.axi_cnt; return value |
| 1704 | |
| 1705 | |
| 1706 | class pmevtyper0_r(Union): |
| 1707 | class _bitfield(Structure): |
| 1708 | _fields_ = [ |
| 1709 | ("ev_type", c_uint32, 10), |
| 1710 | ("reserved0", c_uint32, 22), |
| 1711 | ] |
| 1712 | _fields_ = [("bits", _bitfield), |
| 1713 | ("word", c_uint32)] |
| 1714 | def set_ev_type(self, value): self.bits.ev_type = value |
| 1715 | def get_ev_type(self): value = self.bits.ev_type; return value |
| 1716 | |
| 1717 | |
| 1718 | class pmevtyper1_r(Union): |
| 1719 | class _bitfield(Structure): |
| 1720 | _fields_ = [ |
| 1721 | ("ev_type", c_uint32, 10), |
| 1722 | ("reserved0", c_uint32, 22), |
| 1723 | ] |
| 1724 | _fields_ = [("bits", _bitfield), |
| 1725 | ("word", c_uint32)] |
| 1726 | def set_ev_type(self, value): self.bits.ev_type = value |
| 1727 | def get_ev_type(self): value = self.bits.ev_type; return value |
| 1728 | |
| 1729 | |
| 1730 | class pmevtyper2_r(Union): |
| 1731 | class _bitfield(Structure): |
| 1732 | _fields_ = [ |
| 1733 | ("ev_type", c_uint32, 10), |
| 1734 | ("reserved0", c_uint32, 22), |
| 1735 | ] |
| 1736 | _fields_ = [("bits", _bitfield), |
| 1737 | ("word", c_uint32)] |
| 1738 | def set_ev_type(self, value): self.bits.ev_type = value |
| 1739 | def get_ev_type(self): value = self.bits.ev_type; return value |
| 1740 | |
| 1741 | |
| 1742 | class pmevtyper3_r(Union): |
| 1743 | class _bitfield(Structure): |
| 1744 | _fields_ = [ |
| 1745 | ("ev_type", c_uint32, 10), |
| 1746 | ("reserved0", c_uint32, 22), |
| 1747 | ] |
| 1748 | _fields_ = [("bits", _bitfield), |
| 1749 | ("word", c_uint32)] |
| 1750 | def set_ev_type(self, value): self.bits.ev_type = value |
| 1751 | def get_ev_type(self): value = self.bits.ev_type; return value |
| 1752 | |
| 1753 | class command_no_payload_t(Structure): |
| 1754 | _fields_ = [ |
| 1755 | ("cmd_code", c_uint32, 10), |
| 1756 | ("must_be_zero0", c_uint32, 6), |
| 1757 | ("param", c_uint32, 16), |
| 1758 | ] |
| 1759 | def valid(self): return must_be_zero0==0; |
| 1760 | def get_cmd_code(self): return cmd_code |
| 1761 | def set_cmd_code(self, value): cmd_code = value |
| 1762 | def get_param(self): return param |
| 1763 | def set_param(self, value): param = value |
| 1764 | |
| 1765 | class command_with_payload_t(Structure): |
| 1766 | _fields_ = [ |
| 1767 | ("cmd_code", c_uint32, 10), |
| 1768 | ("must_be_zero", c_uint32, 4), |
| 1769 | ("payload_size", c_uint32, 2), |
| 1770 | ("param", c_uint32, 16), |
| 1771 | ("data", c_uint32, 32), |
| 1772 | ] |
| 1773 | def valid(self): return must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 1774 | def get_cmd_code(self): return cmd_code |
| 1775 | def set_cmd_code(self, value): cmd_code = value |
| 1776 | def get_data(self): return data |
| 1777 | def set_data(self, value): data = value |
| 1778 | def get_param(self): return param |
| 1779 | def set_param(self, value): param = value |
| 1780 | def get_payload_size(self): return payload_size |
| 1781 | def set_payload_size(self, value): payload_size = value |
| 1782 | |
| 1783 | class npu_op_stop_t(Structure): |
| 1784 | _fields_ = [ |
| 1785 | ("cmd_code", c_uint32, 10), |
| 1786 | ("must_be_zero0", c_uint32, 6), |
| 1787 | ("mask", c_uint32, 16), |
| 1788 | ] |
| 1789 | def valid(self): return cmd_code==cmd0.NPU_OP_STOP and must_be_zero0==0; |
| 1790 | def get_cmd_code(self): return cmd_code |
| 1791 | def set_cmd_code(self, value): cmd_code = value |
| 1792 | def get_mask(self): return mask |
| 1793 | def set_mask(self, value): mask = value |
| 1794 | |
| 1795 | class npu_op_irq_t(Structure): |
| 1796 | _fields_ = [ |
| 1797 | ("cmd_code", c_uint32, 10), |
| 1798 | ("must_be_zero0", c_uint32, 6), |
| 1799 | ("mask", c_uint32, 16), |
| 1800 | ] |
| 1801 | def valid(self): return cmd_code==cmd0.NPU_OP_IRQ and must_be_zero0==0; |
| 1802 | def get_cmd_code(self): return cmd_code |
| 1803 | def set_cmd_code(self, value): cmd_code = value |
| 1804 | def get_mask(self): return mask |
| 1805 | def set_mask(self, value): mask = value |
| 1806 | |
| 1807 | class npu_op_conv_t(Structure): |
| 1808 | _fields_ = [ |
| 1809 | ("cmd_code", c_uint32, 10), |
| 1810 | ("must_be_zero0", c_uint32, 6), |
| 1811 | ("reserved0", c_uint32, 16), |
| 1812 | ] |
| 1813 | def valid(self): return cmd_code==cmd0.NPU_OP_CONV and must_be_zero0==0; |
| 1814 | def get_cmd_code(self): return cmd_code |
| 1815 | def set_cmd_code(self, value): cmd_code = value |
| 1816 | |
| 1817 | class npu_op_depthwise_t(Structure): |
| 1818 | _fields_ = [ |
| 1819 | ("cmd_code", c_uint32, 10), |
| 1820 | ("must_be_zero0", c_uint32, 6), |
| 1821 | ("reserved0", c_uint32, 16), |
| 1822 | ] |
| 1823 | def valid(self): return cmd_code==cmd0.NPU_OP_DEPTHWISE and must_be_zero0==0; |
| 1824 | def get_cmd_code(self): return cmd_code |
| 1825 | def set_cmd_code(self, value): cmd_code = value |
| 1826 | |
| 1827 | class npu_op_pool_t(Structure): |
| 1828 | _fields_ = [ |
| 1829 | ("cmd_code", c_uint32, 10), |
| 1830 | ("must_be_zero0", c_uint32, 6), |
| 1831 | ("mode", c_uint32, 16), |
| 1832 | ] |
| 1833 | def valid(self): return cmd_code==cmd0.NPU_OP_POOL and must_be_zero0==0; |
| 1834 | def get_cmd_code(self): return cmd_code |
| 1835 | def set_cmd_code(self, value): cmd_code = value |
| 1836 | def get_mode(self): return mode |
| 1837 | def set_mode(self, value): mode = value |
| 1838 | |
| 1839 | class npu_op_elementwise_t(Structure): |
| 1840 | _fields_ = [ |
| 1841 | ("cmd_code", c_uint32, 10), |
| 1842 | ("must_be_zero0", c_uint32, 6), |
| 1843 | ("mode", c_uint32, 16), |
| 1844 | ] |
| 1845 | def valid(self): return cmd_code==cmd0.NPU_OP_ELEMENTWISE and must_be_zero0==0; |
| 1846 | def get_cmd_code(self): return cmd_code |
| 1847 | def set_cmd_code(self, value): cmd_code = value |
| 1848 | def get_mode(self): return mode |
| 1849 | def set_mode(self, value): mode = value |
| 1850 | |
| 1851 | class npu_op_dma_start_t(Structure): |
| 1852 | _fields_ = [ |
| 1853 | ("cmd_code", c_uint32, 10), |
| 1854 | ("must_be_zero0", c_uint32, 6), |
| 1855 | ("channel_mode", c_uint32, 16), |
| 1856 | ] |
| 1857 | def valid(self): return cmd_code==cmd0.NPU_OP_DMA_START and must_be_zero0==0; |
| 1858 | def get_channel_mode(self): return channel_mode |
| 1859 | def set_channel_mode(self, value): channel_mode = value |
| 1860 | def get_cmd_code(self): return cmd_code |
| 1861 | def set_cmd_code(self, value): cmd_code = value |
| 1862 | |
| 1863 | class npu_op_dma_wait_t(Structure): |
| 1864 | _fields_ = [ |
| 1865 | ("cmd_code", c_uint32, 10), |
| 1866 | ("must_be_zero0", c_uint32, 6), |
| 1867 | ("reserved0", c_uint32, 16), |
| 1868 | ] |
| 1869 | def valid(self): return cmd_code==cmd0.NPU_OP_DMA_WAIT and must_be_zero0==0; |
| 1870 | def get_cmd_code(self): return cmd_code |
| 1871 | def set_cmd_code(self, value): cmd_code = value |
| 1872 | |
| 1873 | class npu_op_kernel_wait_t(Structure): |
| 1874 | _fields_ = [ |
| 1875 | ("cmd_code", c_uint32, 10), |
| 1876 | ("must_be_zero0", c_uint32, 6), |
| 1877 | ("param", c_uint32, 16), |
| 1878 | ] |
| 1879 | def valid(self): return cmd_code==cmd0.NPU_OP_KERNEL_WAIT and must_be_zero0==0; |
| 1880 | def get_cmd_code(self): return cmd_code |
| 1881 | def set_cmd_code(self, value): cmd_code = value |
| 1882 | def get_param(self): return param |
| 1883 | def set_param(self, value): param = value |
| 1884 | |
| 1885 | class npu_op_pmu_mask_t(Structure): |
| 1886 | _fields_ = [ |
| 1887 | ("cmd_code", c_uint32, 10), |
| 1888 | ("must_be_zero0", c_uint32, 6), |
| 1889 | ("param", c_uint32, 16), |
| 1890 | ] |
| 1891 | def valid(self): return cmd_code==cmd0.NPU_OP_PMU_MASK and must_be_zero0==0; |
| 1892 | def get_cmd_code(self): return cmd_code |
| 1893 | def set_cmd_code(self, value): cmd_code = value |
| 1894 | def get_param(self): return param |
| 1895 | def set_param(self, value): param = value |
| 1896 | |
| 1897 | class npu_set_ifm_pad_top_t(Structure): |
| 1898 | _fields_ = [ |
| 1899 | ("cmd_code", c_uint32, 10), |
| 1900 | ("must_be_zero0", c_uint32, 6), |
| 1901 | ("param", c_uint32, 16), |
| 1902 | ] |
| 1903 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM_PAD_TOP and must_be_zero0==0; |
| 1904 | def get_cmd_code(self): return cmd_code |
| 1905 | def set_cmd_code(self, value): cmd_code = value |
| 1906 | def get_param(self): return param |
| 1907 | def set_param(self, value): param = value |
| 1908 | |
| 1909 | class npu_set_ifm_pad_left_t(Structure): |
| 1910 | _fields_ = [ |
| 1911 | ("cmd_code", c_uint32, 10), |
| 1912 | ("must_be_zero0", c_uint32, 6), |
| 1913 | ("param", c_uint32, 16), |
| 1914 | ] |
| 1915 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM_PAD_LEFT and must_be_zero0==0; |
| 1916 | def get_cmd_code(self): return cmd_code |
| 1917 | def set_cmd_code(self, value): cmd_code = value |
| 1918 | def get_param(self): return param |
| 1919 | def set_param(self, value): param = value |
| 1920 | |
| 1921 | class npu_set_ifm_pad_right_t(Structure): |
| 1922 | _fields_ = [ |
| 1923 | ("cmd_code", c_uint32, 10), |
| 1924 | ("must_be_zero0", c_uint32, 6), |
| 1925 | ("param", c_uint32, 16), |
| 1926 | ] |
| 1927 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM_PAD_RIGHT and must_be_zero0==0; |
| 1928 | def get_cmd_code(self): return cmd_code |
| 1929 | def set_cmd_code(self, value): cmd_code = value |
| 1930 | def get_param(self): return param |
| 1931 | def set_param(self, value): param = value |
| 1932 | |
| 1933 | class npu_set_ifm_pad_bottom_t(Structure): |
| 1934 | _fields_ = [ |
| 1935 | ("cmd_code", c_uint32, 10), |
| 1936 | ("must_be_zero0", c_uint32, 6), |
| 1937 | ("param", c_uint32, 16), |
| 1938 | ] |
| 1939 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM_PAD_BOTTOM and must_be_zero0==0; |
| 1940 | def get_cmd_code(self): return cmd_code |
| 1941 | def set_cmd_code(self, value): cmd_code = value |
| 1942 | def get_param(self): return param |
| 1943 | def set_param(self, value): param = value |
| 1944 | |
| 1945 | class npu_set_ifm_depth_m1_t(Structure): |
| 1946 | _fields_ = [ |
| 1947 | ("cmd_code", c_uint32, 10), |
| 1948 | ("must_be_zero0", c_uint32, 6), |
| 1949 | ("param", c_uint32, 16), |
| 1950 | ] |
| 1951 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM_DEPTH_M1 and must_be_zero0==0; |
| 1952 | def get_cmd_code(self): return cmd_code |
| 1953 | def set_cmd_code(self, value): cmd_code = value |
| 1954 | def get_param(self): return param |
| 1955 | def set_param(self, value): param = value |
| 1956 | |
| 1957 | class npu_set_ifm_precision_t(Structure): |
| 1958 | _fields_ = [ |
| 1959 | ("cmd_code", c_uint32, 10), |
| 1960 | ("must_be_zero0", c_uint32, 6), |
Diqing Zhong | fed918b | 2020-04-27 10:27:34 +0200 | [diff] [blame^] | 1961 | ("precision", c_uint32, 4), |
Tim Hall | 79d07d2 | 2020-04-27 18:20:16 +0100 | [diff] [blame] | 1962 | ("reserved0", c_uint32, 2), |
| 1963 | ("format", c_uint32, 2), |
| 1964 | ("scale_mode", c_uint32, 2), |
| 1965 | ("reserved1", c_uint32, 4), |
| 1966 | ("round_mode", c_uint32, 2), |
| 1967 | ] |
| 1968 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM_PRECISION and must_be_zero0==0; |
| 1969 | def get_cmd_code(self): return cmd_code |
| 1970 | def set_cmd_code(self, value): cmd_code = value |
| 1971 | def get_format(self): return format |
| 1972 | def set_format(self, value): format = value |
Diqing Zhong | fed918b | 2020-04-27 10:27:34 +0200 | [diff] [blame^] | 1973 | def get_precision(self): return precision |
| 1974 | def set_precision(self, value): precision = value |
Tim Hall | 79d07d2 | 2020-04-27 18:20:16 +0100 | [diff] [blame] | 1975 | def get_round_mode(self): return round_mode |
| 1976 | def set_round_mode(self, value): round_mode = value |
| 1977 | def get_scale_mode(self): return scale_mode |
| 1978 | def set_scale_mode(self, value): scale_mode = value |
| 1979 | |
| 1980 | class npu_set_ifm_upscale_t(Structure): |
| 1981 | _fields_ = [ |
| 1982 | ("cmd_code", c_uint32, 10), |
| 1983 | ("must_be_zero0", c_uint32, 6), |
| 1984 | ("mode", c_uint32, 2), |
| 1985 | ("reserved0", c_uint32, 14), |
| 1986 | ] |
| 1987 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM_UPSCALE and must_be_zero0==0; |
| 1988 | def get_cmd_code(self): return cmd_code |
| 1989 | def set_cmd_code(self, value): cmd_code = value |
| 1990 | def get_mode(self): return mode |
| 1991 | def set_mode(self, value): mode = value |
| 1992 | |
| 1993 | class npu_set_ifm_zero_point_t(Structure): |
| 1994 | _fields_ = [ |
| 1995 | ("cmd_code", c_uint32, 10), |
| 1996 | ("must_be_zero0", c_uint32, 6), |
| 1997 | ("param", c_uint32, 16), |
| 1998 | ] |
| 1999 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM_ZERO_POINT and must_be_zero0==0; |
| 2000 | def get_cmd_code(self): return cmd_code |
| 2001 | def set_cmd_code(self, value): cmd_code = value |
| 2002 | def get_param(self): return param |
| 2003 | def set_param(self, value): param = value |
| 2004 | |
| 2005 | class npu_set_ifm_width0_m1_t(Structure): |
| 2006 | _fields_ = [ |
| 2007 | ("cmd_code", c_uint32, 10), |
| 2008 | ("must_be_zero0", c_uint32, 6), |
| 2009 | ("param", c_uint32, 16), |
| 2010 | ] |
| 2011 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM_WIDTH0_M1 and must_be_zero0==0; |
| 2012 | def get_cmd_code(self): return cmd_code |
| 2013 | def set_cmd_code(self, value): cmd_code = value |
| 2014 | def get_param(self): return param |
| 2015 | def set_param(self, value): param = value |
| 2016 | |
| 2017 | class npu_set_ifm_height0_m1_t(Structure): |
| 2018 | _fields_ = [ |
| 2019 | ("cmd_code", c_uint32, 10), |
| 2020 | ("must_be_zero0", c_uint32, 6), |
| 2021 | ("param", c_uint32, 16), |
| 2022 | ] |
| 2023 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM_HEIGHT0_M1 and must_be_zero0==0; |
| 2024 | def get_cmd_code(self): return cmd_code |
| 2025 | def set_cmd_code(self, value): cmd_code = value |
| 2026 | def get_param(self): return param |
| 2027 | def set_param(self, value): param = value |
| 2028 | |
| 2029 | class npu_set_ifm_height1_m1_t(Structure): |
| 2030 | _fields_ = [ |
| 2031 | ("cmd_code", c_uint32, 10), |
| 2032 | ("must_be_zero0", c_uint32, 6), |
| 2033 | ("param", c_uint32, 16), |
| 2034 | ] |
| 2035 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM_HEIGHT1_M1 and must_be_zero0==0; |
| 2036 | def get_cmd_code(self): return cmd_code |
| 2037 | def set_cmd_code(self, value): cmd_code = value |
| 2038 | def get_param(self): return param |
| 2039 | def set_param(self, value): param = value |
| 2040 | |
| 2041 | class npu_set_ifm_ib_end_t(Structure): |
| 2042 | _fields_ = [ |
| 2043 | ("cmd_code", c_uint32, 10), |
| 2044 | ("must_be_zero0", c_uint32, 6), |
| 2045 | ("param", c_uint32, 16), |
| 2046 | ] |
| 2047 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM_IB_END and must_be_zero0==0; |
| 2048 | def get_cmd_code(self): return cmd_code |
| 2049 | def set_cmd_code(self, value): cmd_code = value |
| 2050 | def get_param(self): return param |
| 2051 | def set_param(self, value): param = value |
| 2052 | |
| 2053 | class npu_set_ifm_region_t(Structure): |
| 2054 | _fields_ = [ |
| 2055 | ("cmd_code", c_uint32, 10), |
| 2056 | ("must_be_zero0", c_uint32, 6), |
| 2057 | ("param", c_uint32, 16), |
| 2058 | ] |
| 2059 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM_REGION and must_be_zero0==0; |
| 2060 | def get_cmd_code(self): return cmd_code |
| 2061 | def set_cmd_code(self, value): cmd_code = value |
| 2062 | def get_param(self): return param |
| 2063 | def set_param(self, value): param = value |
| 2064 | |
| 2065 | class npu_set_ofm_width_m1_t(Structure): |
| 2066 | _fields_ = [ |
| 2067 | ("cmd_code", c_uint32, 10), |
| 2068 | ("must_be_zero0", c_uint32, 6), |
| 2069 | ("param", c_uint32, 16), |
| 2070 | ] |
| 2071 | def valid(self): return cmd_code==cmd0.NPU_SET_OFM_WIDTH_M1 and must_be_zero0==0; |
| 2072 | def get_cmd_code(self): return cmd_code |
| 2073 | def set_cmd_code(self, value): cmd_code = value |
| 2074 | def get_param(self): return param |
| 2075 | def set_param(self, value): param = value |
| 2076 | |
| 2077 | class npu_set_ofm_height_m1_t(Structure): |
| 2078 | _fields_ = [ |
| 2079 | ("cmd_code", c_uint32, 10), |
| 2080 | ("must_be_zero0", c_uint32, 6), |
| 2081 | ("param", c_uint32, 16), |
| 2082 | ] |
| 2083 | def valid(self): return cmd_code==cmd0.NPU_SET_OFM_HEIGHT_M1 and must_be_zero0==0; |
| 2084 | def get_cmd_code(self): return cmd_code |
| 2085 | def set_cmd_code(self, value): cmd_code = value |
| 2086 | def get_param(self): return param |
| 2087 | def set_param(self, value): param = value |
| 2088 | |
| 2089 | class npu_set_ofm_depth_m1_t(Structure): |
| 2090 | _fields_ = [ |
| 2091 | ("cmd_code", c_uint32, 10), |
| 2092 | ("must_be_zero0", c_uint32, 6), |
| 2093 | ("param", c_uint32, 16), |
| 2094 | ] |
| 2095 | def valid(self): return cmd_code==cmd0.NPU_SET_OFM_DEPTH_M1 and must_be_zero0==0; |
| 2096 | def get_cmd_code(self): return cmd_code |
| 2097 | def set_cmd_code(self, value): cmd_code = value |
| 2098 | def get_param(self): return param |
| 2099 | def set_param(self, value): param = value |
| 2100 | |
| 2101 | class npu_set_ofm_precision_t(Structure): |
| 2102 | _fields_ = [ |
| 2103 | ("cmd_code", c_uint32, 10), |
| 2104 | ("must_be_zero0", c_uint32, 6), |
| 2105 | ("precision", c_uint32, 3), |
| 2106 | ("reserved0", c_uint32, 3), |
| 2107 | ("format", c_uint32, 2), |
| 2108 | ("scaling", c_uint32, 1), |
| 2109 | ("reserved1", c_uint32, 5), |
| 2110 | ("rounding", c_uint32, 2), |
| 2111 | ] |
| 2112 | def valid(self): return cmd_code==cmd0.NPU_SET_OFM_PRECISION and must_be_zero0==0; |
| 2113 | def get_cmd_code(self): return cmd_code |
| 2114 | def set_cmd_code(self, value): cmd_code = value |
| 2115 | def get_format(self): return format |
| 2116 | def set_format(self, value): format = value |
| 2117 | def get_precision(self): return precision |
| 2118 | def set_precision(self, value): precision = value |
| 2119 | def get_rounding(self): return rounding |
| 2120 | def set_rounding(self, value): rounding = value |
| 2121 | def get_scaling(self): return scaling |
| 2122 | def set_scaling(self, value): scaling = value |
| 2123 | |
| 2124 | class npu_set_ofm_blk_width_m1_t(Structure): |
| 2125 | _fields_ = [ |
| 2126 | ("cmd_code", c_uint32, 10), |
| 2127 | ("must_be_zero0", c_uint32, 6), |
| 2128 | ("param", c_uint32, 16), |
| 2129 | ] |
| 2130 | def valid(self): return cmd_code==cmd0.NPU_SET_OFM_BLK_WIDTH_M1 and must_be_zero0==0; |
| 2131 | def get_cmd_code(self): return cmd_code |
| 2132 | def set_cmd_code(self, value): cmd_code = value |
| 2133 | def get_param(self): return param |
| 2134 | def set_param(self, value): param = value |
| 2135 | |
| 2136 | class npu_set_ofm_blk_height_m1_t(Structure): |
| 2137 | _fields_ = [ |
| 2138 | ("cmd_code", c_uint32, 10), |
| 2139 | ("must_be_zero0", c_uint32, 6), |
| 2140 | ("param", c_uint32, 16), |
| 2141 | ] |
| 2142 | def valid(self): return cmd_code==cmd0.NPU_SET_OFM_BLK_HEIGHT_M1 and must_be_zero0==0; |
| 2143 | def get_cmd_code(self): return cmd_code |
| 2144 | def set_cmd_code(self, value): cmd_code = value |
| 2145 | def get_param(self): return param |
| 2146 | def set_param(self, value): param = value |
| 2147 | |
| 2148 | class npu_set_ofm_blk_depth_m1_t(Structure): |
| 2149 | _fields_ = [ |
| 2150 | ("cmd_code", c_uint32, 10), |
| 2151 | ("must_be_zero0", c_uint32, 6), |
| 2152 | ("param", c_uint32, 16), |
| 2153 | ] |
| 2154 | def valid(self): return cmd_code==cmd0.NPU_SET_OFM_BLK_DEPTH_M1 and must_be_zero0==0; |
| 2155 | def get_cmd_code(self): return cmd_code |
| 2156 | def set_cmd_code(self, value): cmd_code = value |
| 2157 | def get_param(self): return param |
| 2158 | def set_param(self, value): param = value |
| 2159 | |
| 2160 | class npu_set_ofm_zero_point_t(Structure): |
| 2161 | _fields_ = [ |
| 2162 | ("cmd_code", c_uint32, 10), |
| 2163 | ("must_be_zero0", c_uint32, 6), |
| 2164 | ("param", c_uint32, 16), |
| 2165 | ] |
| 2166 | def valid(self): return cmd_code==cmd0.NPU_SET_OFM_ZERO_POINT and must_be_zero0==0; |
| 2167 | def get_cmd_code(self): return cmd_code |
| 2168 | def set_cmd_code(self, value): cmd_code = value |
| 2169 | def get_param(self): return param |
| 2170 | def set_param(self, value): param = value |
| 2171 | |
| 2172 | class npu_set_ofm_width0_m1_t(Structure): |
| 2173 | _fields_ = [ |
| 2174 | ("cmd_code", c_uint32, 10), |
| 2175 | ("must_be_zero0", c_uint32, 6), |
| 2176 | ("param", c_uint32, 16), |
| 2177 | ] |
| 2178 | def valid(self): return cmd_code==cmd0.NPU_SET_OFM_WIDTH0_M1 and must_be_zero0==0; |
| 2179 | def get_cmd_code(self): return cmd_code |
| 2180 | def set_cmd_code(self, value): cmd_code = value |
| 2181 | def get_param(self): return param |
| 2182 | def set_param(self, value): param = value |
| 2183 | |
| 2184 | class npu_set_ofm_height0_m1_t(Structure): |
| 2185 | _fields_ = [ |
| 2186 | ("cmd_code", c_uint32, 10), |
| 2187 | ("must_be_zero0", c_uint32, 6), |
| 2188 | ("param", c_uint32, 16), |
| 2189 | ] |
| 2190 | def valid(self): return cmd_code==cmd0.NPU_SET_OFM_HEIGHT0_M1 and must_be_zero0==0; |
| 2191 | def get_cmd_code(self): return cmd_code |
| 2192 | def set_cmd_code(self, value): cmd_code = value |
| 2193 | def get_param(self): return param |
| 2194 | def set_param(self, value): param = value |
| 2195 | |
| 2196 | class npu_set_ofm_height1_m1_t(Structure): |
| 2197 | _fields_ = [ |
| 2198 | ("cmd_code", c_uint32, 10), |
| 2199 | ("must_be_zero0", c_uint32, 6), |
| 2200 | ("param", c_uint32, 16), |
| 2201 | ] |
| 2202 | def valid(self): return cmd_code==cmd0.NPU_SET_OFM_HEIGHT1_M1 and must_be_zero0==0; |
| 2203 | def get_cmd_code(self): return cmd_code |
| 2204 | def set_cmd_code(self, value): cmd_code = value |
| 2205 | def get_param(self): return param |
| 2206 | def set_param(self, value): param = value |
| 2207 | |
| 2208 | class npu_set_ofm_region_t(Structure): |
| 2209 | _fields_ = [ |
| 2210 | ("cmd_code", c_uint32, 10), |
| 2211 | ("must_be_zero0", c_uint32, 6), |
| 2212 | ("param", c_uint32, 16), |
| 2213 | ] |
| 2214 | def valid(self): return cmd_code==cmd0.NPU_SET_OFM_REGION and must_be_zero0==0; |
| 2215 | def get_cmd_code(self): return cmd_code |
| 2216 | def set_cmd_code(self, value): cmd_code = value |
| 2217 | def get_param(self): return param |
| 2218 | def set_param(self, value): param = value |
| 2219 | |
| 2220 | class npu_set_kernel_width_m1_t(Structure): |
| 2221 | _fields_ = [ |
| 2222 | ("cmd_code", c_uint32, 10), |
| 2223 | ("must_be_zero0", c_uint32, 6), |
| 2224 | ("param", c_uint32, 16), |
| 2225 | ] |
| 2226 | def valid(self): return cmd_code==cmd0.NPU_SET_KERNEL_WIDTH_M1 and must_be_zero0==0; |
| 2227 | def get_cmd_code(self): return cmd_code |
| 2228 | def set_cmd_code(self, value): cmd_code = value |
| 2229 | def get_param(self): return param |
| 2230 | def set_param(self, value): param = value |
| 2231 | |
| 2232 | class npu_set_kernel_height_m1_t(Structure): |
| 2233 | _fields_ = [ |
| 2234 | ("cmd_code", c_uint32, 10), |
| 2235 | ("must_be_zero0", c_uint32, 6), |
| 2236 | ("param", c_uint32, 16), |
| 2237 | ] |
| 2238 | def valid(self): return cmd_code==cmd0.NPU_SET_KERNEL_HEIGHT_M1 and must_be_zero0==0; |
| 2239 | def get_cmd_code(self): return cmd_code |
| 2240 | def set_cmd_code(self, value): cmd_code = value |
| 2241 | def get_param(self): return param |
| 2242 | def set_param(self, value): param = value |
| 2243 | |
| 2244 | class npu_set_kernel_stride_t(Structure): |
| 2245 | _fields_ = [ |
| 2246 | ("cmd_code", c_uint32, 10), |
| 2247 | ("must_be_zero0", c_uint32, 6), |
| 2248 | ("param", c_uint32, 16), |
| 2249 | ] |
| 2250 | def valid(self): return cmd_code==cmd0.NPU_SET_KERNEL_STRIDE and must_be_zero0==0; |
| 2251 | def get_cmd_code(self): return cmd_code |
| 2252 | def set_cmd_code(self, value): cmd_code = value |
| 2253 | def get_param(self): return param |
| 2254 | def set_param(self, value): param = value |
| 2255 | |
| 2256 | class npu_set_parallel_mode_t(Structure): |
| 2257 | _fields_ = [ |
| 2258 | ("cmd_code", c_uint32, 10), |
| 2259 | ("must_be_zero0", c_uint32, 6), |
| 2260 | ("param", c_uint32, 16), |
| 2261 | ] |
| 2262 | def valid(self): return cmd_code==cmd0.NPU_SET_PARALLEL_MODE and must_be_zero0==0; |
| 2263 | def get_cmd_code(self): return cmd_code |
| 2264 | def set_cmd_code(self, value): cmd_code = value |
| 2265 | def get_param(self): return param |
| 2266 | def set_param(self, value): param = value |
| 2267 | |
| 2268 | class npu_set_acc_format_t(Structure): |
| 2269 | _fields_ = [ |
| 2270 | ("cmd_code", c_uint32, 10), |
| 2271 | ("must_be_zero0", c_uint32, 6), |
| 2272 | ("param", c_uint32, 16), |
| 2273 | ] |
| 2274 | def valid(self): return cmd_code==cmd0.NPU_SET_ACC_FORMAT and must_be_zero0==0; |
| 2275 | def get_cmd_code(self): return cmd_code |
| 2276 | def set_cmd_code(self, value): cmd_code = value |
| 2277 | def get_param(self): return param |
| 2278 | def set_param(self, value): param = value |
| 2279 | |
| 2280 | class npu_set_activation_t(Structure): |
| 2281 | _fields_ = [ |
| 2282 | ("cmd_code", c_uint32, 10), |
| 2283 | ("must_be_zero0", c_uint32, 6), |
| 2284 | ("type", c_uint32, 12), |
| 2285 | ("act_clip_range", c_uint32, 4), |
| 2286 | ] |
| 2287 | def valid(self): return cmd_code==cmd0.NPU_SET_ACTIVATION and must_be_zero0==0; |
| 2288 | def get_act_clip_range(self): return act_clip_range |
| 2289 | def set_act_clip_range(self, value): act_clip_range = value |
| 2290 | def get_cmd_code(self): return cmd_code |
| 2291 | def set_cmd_code(self, value): cmd_code = value |
| 2292 | def get_type(self): return type |
| 2293 | def set_type(self, value): type = value |
| 2294 | |
| 2295 | class npu_set_activation_min_t(Structure): |
| 2296 | _fields_ = [ |
| 2297 | ("cmd_code", c_uint32, 10), |
| 2298 | ("must_be_zero0", c_uint32, 6), |
| 2299 | ("param", c_uint32, 16), |
| 2300 | ] |
| 2301 | def valid(self): return cmd_code==cmd0.NPU_SET_ACTIVATION_MIN and must_be_zero0==0; |
| 2302 | def get_cmd_code(self): return cmd_code |
| 2303 | def set_cmd_code(self, value): cmd_code = value |
| 2304 | def get_param(self): return param |
| 2305 | def set_param(self, value): param = value |
| 2306 | |
| 2307 | class npu_set_activation_max_t(Structure): |
| 2308 | _fields_ = [ |
| 2309 | ("cmd_code", c_uint32, 10), |
| 2310 | ("must_be_zero0", c_uint32, 6), |
| 2311 | ("param", c_uint32, 16), |
| 2312 | ] |
| 2313 | def valid(self): return cmd_code==cmd0.NPU_SET_ACTIVATION_MAX and must_be_zero0==0; |
| 2314 | def get_cmd_code(self): return cmd_code |
| 2315 | def set_cmd_code(self, value): cmd_code = value |
| 2316 | def get_param(self): return param |
| 2317 | def set_param(self, value): param = value |
| 2318 | |
| 2319 | class npu_set_weight_region_t(Structure): |
| 2320 | _fields_ = [ |
| 2321 | ("cmd_code", c_uint32, 10), |
| 2322 | ("must_be_zero0", c_uint32, 6), |
| 2323 | ("param", c_uint32, 16), |
| 2324 | ] |
| 2325 | def valid(self): return cmd_code==cmd0.NPU_SET_WEIGHT_REGION and must_be_zero0==0; |
| 2326 | def get_cmd_code(self): return cmd_code |
| 2327 | def set_cmd_code(self, value): cmd_code = value |
| 2328 | def get_param(self): return param |
| 2329 | def set_param(self, value): param = value |
| 2330 | |
| 2331 | class npu_set_scale_region_t(Structure): |
| 2332 | _fields_ = [ |
| 2333 | ("cmd_code", c_uint32, 10), |
| 2334 | ("must_be_zero0", c_uint32, 6), |
| 2335 | ("param", c_uint32, 16), |
| 2336 | ] |
| 2337 | def valid(self): return cmd_code==cmd0.NPU_SET_SCALE_REGION and must_be_zero0==0; |
| 2338 | def get_cmd_code(self): return cmd_code |
| 2339 | def set_cmd_code(self, value): cmd_code = value |
| 2340 | def get_param(self): return param |
| 2341 | def set_param(self, value): param = value |
| 2342 | |
| 2343 | class npu_set_ab_start_t(Structure): |
| 2344 | _fields_ = [ |
| 2345 | ("cmd_code", c_uint32, 10), |
| 2346 | ("must_be_zero0", c_uint32, 6), |
| 2347 | ("param", c_uint32, 16), |
| 2348 | ] |
| 2349 | def valid(self): return cmd_code==cmd0.NPU_SET_AB_START and must_be_zero0==0; |
| 2350 | def get_cmd_code(self): return cmd_code |
| 2351 | def set_cmd_code(self, value): cmd_code = value |
| 2352 | def get_param(self): return param |
| 2353 | def set_param(self, value): param = value |
| 2354 | |
| 2355 | class npu_set_blockdep_t(Structure): |
| 2356 | _fields_ = [ |
| 2357 | ("cmd_code", c_uint32, 10), |
| 2358 | ("must_be_zero0", c_uint32, 6), |
| 2359 | ("param", c_uint32, 16), |
| 2360 | ] |
| 2361 | def valid(self): return cmd_code==cmd0.NPU_SET_BLOCKDEP and must_be_zero0==0; |
| 2362 | def get_cmd_code(self): return cmd_code |
| 2363 | def set_cmd_code(self, value): cmd_code = value |
| 2364 | def get_param(self): return param |
| 2365 | def set_param(self, value): param = value |
| 2366 | |
| 2367 | class npu_set_dma0_src_region_t(Structure): |
| 2368 | _fields_ = [ |
| 2369 | ("cmd_code", c_uint32, 10), |
| 2370 | ("must_be_zero0", c_uint32, 6), |
| 2371 | ("region", c_uint32, 8), |
| 2372 | ("internal", c_uint32, 1), |
| 2373 | ("stride_mode", c_uint32, 2), |
| 2374 | ("reserved0", c_uint32, 5), |
| 2375 | ] |
| 2376 | def valid(self): return cmd_code==cmd0.NPU_SET_DMA0_SRC_REGION and must_be_zero0==0; |
| 2377 | def get_cmd_code(self): return cmd_code |
| 2378 | def set_cmd_code(self, value): cmd_code = value |
| 2379 | def get_internal(self): return internal |
| 2380 | def set_internal(self, value): internal = value |
| 2381 | def get_region(self): return region |
| 2382 | def set_region(self, value): region = value |
| 2383 | def get_stride_mode(self): return stride_mode |
| 2384 | def set_stride_mode(self, value): stride_mode = value |
| 2385 | |
| 2386 | class npu_set_dma0_dst_region_t(Structure): |
| 2387 | _fields_ = [ |
| 2388 | ("cmd_code", c_uint32, 10), |
| 2389 | ("must_be_zero0", c_uint32, 6), |
| 2390 | ("region", c_uint32, 8), |
| 2391 | ("internal", c_uint32, 1), |
| 2392 | ("stride_mode", c_uint32, 2), |
| 2393 | ("reserved0", c_uint32, 5), |
| 2394 | ] |
| 2395 | def valid(self): return cmd_code==cmd0.NPU_SET_DMA0_DST_REGION and must_be_zero0==0; |
| 2396 | def get_cmd_code(self): return cmd_code |
| 2397 | def set_cmd_code(self, value): cmd_code = value |
| 2398 | def get_internal(self): return internal |
| 2399 | def set_internal(self, value): internal = value |
| 2400 | def get_region(self): return region |
| 2401 | def set_region(self, value): region = value |
| 2402 | def get_stride_mode(self): return stride_mode |
| 2403 | def set_stride_mode(self, value): stride_mode = value |
| 2404 | |
| 2405 | class npu_set_dma0_size0_t(Structure): |
| 2406 | _fields_ = [ |
| 2407 | ("cmd_code", c_uint32, 10), |
| 2408 | ("must_be_zero0", c_uint32, 6), |
| 2409 | ("param", c_uint32, 16), |
| 2410 | ] |
| 2411 | def valid(self): return cmd_code==cmd0.NPU_SET_DMA0_SIZE0 and must_be_zero0==0; |
| 2412 | def get_cmd_code(self): return cmd_code |
| 2413 | def set_cmd_code(self, value): cmd_code = value |
| 2414 | def get_param(self): return param |
| 2415 | def set_param(self, value): param = value |
| 2416 | |
| 2417 | class npu_set_dma0_size1_t(Structure): |
| 2418 | _fields_ = [ |
| 2419 | ("cmd_code", c_uint32, 10), |
| 2420 | ("must_be_zero0", c_uint32, 6), |
| 2421 | ("param", c_uint32, 16), |
| 2422 | ] |
| 2423 | def valid(self): return cmd_code==cmd0.NPU_SET_DMA0_SIZE1 and must_be_zero0==0; |
| 2424 | def get_cmd_code(self): return cmd_code |
| 2425 | def set_cmd_code(self, value): cmd_code = value |
| 2426 | def get_param(self): return param |
| 2427 | def set_param(self, value): param = value |
| 2428 | |
| 2429 | class npu_set_ifm2_broadcast_t(Structure): |
| 2430 | _fields_ = [ |
| 2431 | ("cmd_code", c_uint32, 10), |
| 2432 | ("must_be_zero0", c_uint32, 6), |
| 2433 | ("broadcast_height", c_uint32, 1), |
| 2434 | ("broadcast_width", c_uint32, 1), |
| 2435 | ("broadcast_depth", c_uint32, 1), |
| 2436 | ("reserved0", c_uint32, 3), |
| 2437 | ("operand_order", c_uint32, 1), |
| 2438 | ("broadcast_scalar", c_uint32, 1), |
| 2439 | ("reserved1", c_uint32, 8), |
| 2440 | ] |
| 2441 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM2_BROADCAST and must_be_zero0==0; |
| 2442 | def get_broadcast_depth(self): return broadcast_depth |
| 2443 | def set_broadcast_depth(self, value): broadcast_depth = value |
| 2444 | def get_broadcast_height(self): return broadcast_height |
| 2445 | def set_broadcast_height(self, value): broadcast_height = value |
| 2446 | def get_broadcast_scalar(self): return broadcast_scalar |
| 2447 | def set_broadcast_scalar(self, value): broadcast_scalar = value |
| 2448 | def get_broadcast_width(self): return broadcast_width |
| 2449 | def set_broadcast_width(self, value): broadcast_width = value |
| 2450 | def get_cmd_code(self): return cmd_code |
| 2451 | def set_cmd_code(self, value): cmd_code = value |
| 2452 | def get_operand_order(self): return operand_order |
| 2453 | def set_operand_order(self, value): operand_order = value |
| 2454 | |
| 2455 | class npu_set_ifm2_scalar_t(Structure): |
| 2456 | _fields_ = [ |
| 2457 | ("cmd_code", c_uint32, 10), |
| 2458 | ("must_be_zero0", c_uint32, 6), |
| 2459 | ("param", c_uint32, 16), |
| 2460 | ] |
| 2461 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM2_SCALAR and must_be_zero0==0; |
| 2462 | def get_cmd_code(self): return cmd_code |
| 2463 | def set_cmd_code(self, value): cmd_code = value |
| 2464 | def get_param(self): return param |
| 2465 | def set_param(self, value): param = value |
| 2466 | |
| 2467 | class npu_set_ifm2_precision_t(Structure): |
| 2468 | _fields_ = [ |
| 2469 | ("cmd_code", c_uint32, 10), |
| 2470 | ("must_be_zero0", c_uint32, 6), |
Diqing Zhong | fed918b | 2020-04-27 10:27:34 +0200 | [diff] [blame^] | 2471 | ("precision", c_uint32, 4), |
Tim Hall | 79d07d2 | 2020-04-27 18:20:16 +0100 | [diff] [blame] | 2472 | ("reserved0", c_uint32, 2), |
| 2473 | ("format", c_uint32, 2), |
| 2474 | ("reserved1", c_uint32, 8), |
| 2475 | ] |
| 2476 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM2_PRECISION and must_be_zero0==0; |
| 2477 | def get_cmd_code(self): return cmd_code |
| 2478 | def set_cmd_code(self, value): cmd_code = value |
| 2479 | def get_format(self): return format |
| 2480 | def set_format(self, value): format = value |
Diqing Zhong | fed918b | 2020-04-27 10:27:34 +0200 | [diff] [blame^] | 2481 | def get_precision(self): return precision |
| 2482 | def set_precision(self, value): precision = value |
Tim Hall | 79d07d2 | 2020-04-27 18:20:16 +0100 | [diff] [blame] | 2483 | |
| 2484 | class npu_set_ifm2_zero_point_t(Structure): |
| 2485 | _fields_ = [ |
| 2486 | ("cmd_code", c_uint32, 10), |
| 2487 | ("must_be_zero0", c_uint32, 6), |
| 2488 | ("param", c_uint32, 16), |
| 2489 | ] |
| 2490 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM2_ZERO_POINT and must_be_zero0==0; |
| 2491 | def get_cmd_code(self): return cmd_code |
| 2492 | def set_cmd_code(self, value): cmd_code = value |
| 2493 | def get_param(self): return param |
| 2494 | def set_param(self, value): param = value |
| 2495 | |
| 2496 | class npu_set_ifm2_width0_m1_t(Structure): |
| 2497 | _fields_ = [ |
| 2498 | ("cmd_code", c_uint32, 10), |
| 2499 | ("must_be_zero0", c_uint32, 6), |
| 2500 | ("param", c_uint32, 16), |
| 2501 | ] |
| 2502 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM2_WIDTH0_M1 and must_be_zero0==0; |
| 2503 | def get_cmd_code(self): return cmd_code |
| 2504 | def set_cmd_code(self, value): cmd_code = value |
| 2505 | def get_param(self): return param |
| 2506 | def set_param(self, value): param = value |
| 2507 | |
| 2508 | class npu_set_ifm2_height0_m1_t(Structure): |
| 2509 | _fields_ = [ |
| 2510 | ("cmd_code", c_uint32, 10), |
| 2511 | ("must_be_zero0", c_uint32, 6), |
| 2512 | ("param", c_uint32, 16), |
| 2513 | ] |
| 2514 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM2_HEIGHT0_M1 and must_be_zero0==0; |
| 2515 | def get_cmd_code(self): return cmd_code |
| 2516 | def set_cmd_code(self, value): cmd_code = value |
| 2517 | def get_param(self): return param |
| 2518 | def set_param(self, value): param = value |
| 2519 | |
| 2520 | class npu_set_ifm2_height1_m1_t(Structure): |
| 2521 | _fields_ = [ |
| 2522 | ("cmd_code", c_uint32, 10), |
| 2523 | ("must_be_zero0", c_uint32, 6), |
| 2524 | ("param", c_uint32, 16), |
| 2525 | ] |
| 2526 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM2_HEIGHT1_M1 and must_be_zero0==0; |
| 2527 | def get_cmd_code(self): return cmd_code |
| 2528 | def set_cmd_code(self, value): cmd_code = value |
| 2529 | def get_param(self): return param |
| 2530 | def set_param(self, value): param = value |
| 2531 | |
| 2532 | class npu_set_ifm2_ib_start_t(Structure): |
| 2533 | _fields_ = [ |
| 2534 | ("cmd_code", c_uint32, 10), |
| 2535 | ("must_be_zero0", c_uint32, 6), |
| 2536 | ("param", c_uint32, 16), |
| 2537 | ] |
| 2538 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM2_IB_START and must_be_zero0==0; |
| 2539 | def get_cmd_code(self): return cmd_code |
| 2540 | def set_cmd_code(self, value): cmd_code = value |
| 2541 | def get_param(self): return param |
| 2542 | def set_param(self, value): param = value |
| 2543 | |
| 2544 | class npu_set_ifm2_region_t(Structure): |
| 2545 | _fields_ = [ |
| 2546 | ("cmd_code", c_uint32, 10), |
| 2547 | ("must_be_zero0", c_uint32, 6), |
| 2548 | ("param", c_uint32, 16), |
| 2549 | ] |
| 2550 | def valid(self): return cmd_code==cmd0.NPU_SET_IFM2_REGION and must_be_zero0==0; |
| 2551 | def get_cmd_code(self): return cmd_code |
| 2552 | def set_cmd_code(self, value): cmd_code = value |
| 2553 | def get_param(self): return param |
| 2554 | def set_param(self, value): param = value |
| 2555 | |
| 2556 | class npu_set_ifm_base0_t(Structure): |
| 2557 | _fields_ = [ |
| 2558 | ("cmd_code", c_uint32, 10), |
| 2559 | ("must_be_zero", c_uint32, 4), |
| 2560 | ("payload_size", c_uint32, 2), |
| 2561 | ("reserved0", c_uint32, 16), |
| 2562 | ("data", c_uint32, 32), |
| 2563 | ] |
| 2564 | def valid(self): return cmd_code==cmd1.NPU_SET_IFM_BASE0 and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2565 | def get_cmd_code(self): return cmd_code |
| 2566 | def set_cmd_code(self, value): cmd_code = value |
| 2567 | def get_data(self): return data |
| 2568 | def set_data(self, value): data = value |
| 2569 | def get_payload_size(self): return payload_size |
| 2570 | def set_payload_size(self, value): payload_size = value |
| 2571 | |
| 2572 | class npu_set_ifm_base1_t(Structure): |
| 2573 | _fields_ = [ |
| 2574 | ("cmd_code", c_uint32, 10), |
| 2575 | ("must_be_zero", c_uint32, 4), |
| 2576 | ("payload_size", c_uint32, 2), |
| 2577 | ("reserved0", c_uint32, 16), |
| 2578 | ("data", c_uint32, 32), |
| 2579 | ] |
| 2580 | def valid(self): return cmd_code==cmd1.NPU_SET_IFM_BASE1 and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2581 | def get_cmd_code(self): return cmd_code |
| 2582 | def set_cmd_code(self, value): cmd_code = value |
| 2583 | def get_data(self): return data |
| 2584 | def set_data(self, value): data = value |
| 2585 | def get_payload_size(self): return payload_size |
| 2586 | def set_payload_size(self, value): payload_size = value |
| 2587 | |
| 2588 | class npu_set_ifm_base2_t(Structure): |
| 2589 | _fields_ = [ |
| 2590 | ("cmd_code", c_uint32, 10), |
| 2591 | ("must_be_zero", c_uint32, 4), |
| 2592 | ("payload_size", c_uint32, 2), |
| 2593 | ("reserved0", c_uint32, 16), |
| 2594 | ("data", c_uint32, 32), |
| 2595 | ] |
| 2596 | def valid(self): return cmd_code==cmd1.NPU_SET_IFM_BASE2 and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2597 | def get_cmd_code(self): return cmd_code |
| 2598 | def set_cmd_code(self, value): cmd_code = value |
| 2599 | def get_data(self): return data |
| 2600 | def set_data(self, value): data = value |
| 2601 | def get_payload_size(self): return payload_size |
| 2602 | def set_payload_size(self, value): payload_size = value |
| 2603 | |
| 2604 | class npu_set_ifm_base3_t(Structure): |
| 2605 | _fields_ = [ |
| 2606 | ("cmd_code", c_uint32, 10), |
| 2607 | ("must_be_zero", c_uint32, 4), |
| 2608 | ("payload_size", c_uint32, 2), |
| 2609 | ("reserved0", c_uint32, 16), |
| 2610 | ("data", c_uint32, 32), |
| 2611 | ] |
| 2612 | def valid(self): return cmd_code==cmd1.NPU_SET_IFM_BASE3 and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2613 | def get_cmd_code(self): return cmd_code |
| 2614 | def set_cmd_code(self, value): cmd_code = value |
| 2615 | def get_data(self): return data |
| 2616 | def set_data(self, value): data = value |
| 2617 | def get_payload_size(self): return payload_size |
| 2618 | def set_payload_size(self, value): payload_size = value |
| 2619 | |
| 2620 | class npu_set_ifm_stride_x_t(Structure): |
| 2621 | _fields_ = [ |
| 2622 | ("cmd_code", c_uint32, 10), |
| 2623 | ("must_be_zero", c_uint32, 4), |
| 2624 | ("payload_size", c_uint32, 2), |
| 2625 | ("reserved0", c_uint32, 16), |
| 2626 | ("data", c_uint32, 32), |
| 2627 | ] |
| 2628 | def valid(self): return cmd_code==cmd1.NPU_SET_IFM_STRIDE_X and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2629 | def get_cmd_code(self): return cmd_code |
| 2630 | def set_cmd_code(self, value): cmd_code = value |
| 2631 | def get_data(self): return data |
| 2632 | def set_data(self, value): data = value |
| 2633 | def get_payload_size(self): return payload_size |
| 2634 | def set_payload_size(self, value): payload_size = value |
| 2635 | |
| 2636 | class npu_set_ifm_stride_y_t(Structure): |
| 2637 | _fields_ = [ |
| 2638 | ("cmd_code", c_uint32, 10), |
| 2639 | ("must_be_zero", c_uint32, 4), |
| 2640 | ("payload_size", c_uint32, 2), |
| 2641 | ("reserved0", c_uint32, 16), |
| 2642 | ("data", c_uint32, 32), |
| 2643 | ] |
| 2644 | def valid(self): return cmd_code==cmd1.NPU_SET_IFM_STRIDE_Y and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2645 | def get_cmd_code(self): return cmd_code |
| 2646 | def set_cmd_code(self, value): cmd_code = value |
| 2647 | def get_data(self): return data |
| 2648 | def set_data(self, value): data = value |
| 2649 | def get_payload_size(self): return payload_size |
| 2650 | def set_payload_size(self, value): payload_size = value |
| 2651 | |
| 2652 | class npu_set_ifm_stride_c_t(Structure): |
| 2653 | _fields_ = [ |
| 2654 | ("cmd_code", c_uint32, 10), |
| 2655 | ("must_be_zero", c_uint32, 4), |
| 2656 | ("payload_size", c_uint32, 2), |
| 2657 | ("reserved0", c_uint32, 16), |
| 2658 | ("data", c_uint32, 32), |
| 2659 | ] |
| 2660 | def valid(self): return cmd_code==cmd1.NPU_SET_IFM_STRIDE_C and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2661 | def get_cmd_code(self): return cmd_code |
| 2662 | def set_cmd_code(self, value): cmd_code = value |
| 2663 | def get_data(self): return data |
| 2664 | def set_data(self, value): data = value |
| 2665 | def get_payload_size(self): return payload_size |
| 2666 | def set_payload_size(self, value): payload_size = value |
| 2667 | |
| 2668 | class npu_set_ofm_base0_t(Structure): |
| 2669 | _fields_ = [ |
| 2670 | ("cmd_code", c_uint32, 10), |
| 2671 | ("must_be_zero", c_uint32, 4), |
| 2672 | ("payload_size", c_uint32, 2), |
| 2673 | ("reserved0", c_uint32, 16), |
| 2674 | ("data", c_uint32, 32), |
| 2675 | ] |
| 2676 | def valid(self): return cmd_code==cmd1.NPU_SET_OFM_BASE0 and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2677 | def get_cmd_code(self): return cmd_code |
| 2678 | def set_cmd_code(self, value): cmd_code = value |
| 2679 | def get_data(self): return data |
| 2680 | def set_data(self, value): data = value |
| 2681 | def get_payload_size(self): return payload_size |
| 2682 | def set_payload_size(self, value): payload_size = value |
| 2683 | |
| 2684 | class npu_set_ofm_base1_t(Structure): |
| 2685 | _fields_ = [ |
| 2686 | ("cmd_code", c_uint32, 10), |
| 2687 | ("must_be_zero", c_uint32, 4), |
| 2688 | ("payload_size", c_uint32, 2), |
| 2689 | ("reserved0", c_uint32, 16), |
| 2690 | ("data", c_uint32, 32), |
| 2691 | ] |
| 2692 | def valid(self): return cmd_code==cmd1.NPU_SET_OFM_BASE1 and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2693 | def get_cmd_code(self): return cmd_code |
| 2694 | def set_cmd_code(self, value): cmd_code = value |
| 2695 | def get_data(self): return data |
| 2696 | def set_data(self, value): data = value |
| 2697 | def get_payload_size(self): return payload_size |
| 2698 | def set_payload_size(self, value): payload_size = value |
| 2699 | |
| 2700 | class npu_set_ofm_base2_t(Structure): |
| 2701 | _fields_ = [ |
| 2702 | ("cmd_code", c_uint32, 10), |
| 2703 | ("must_be_zero", c_uint32, 4), |
| 2704 | ("payload_size", c_uint32, 2), |
| 2705 | ("reserved0", c_uint32, 16), |
| 2706 | ("data", c_uint32, 32), |
| 2707 | ] |
| 2708 | def valid(self): return cmd_code==cmd1.NPU_SET_OFM_BASE2 and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2709 | def get_cmd_code(self): return cmd_code |
| 2710 | def set_cmd_code(self, value): cmd_code = value |
| 2711 | def get_data(self): return data |
| 2712 | def set_data(self, value): data = value |
| 2713 | def get_payload_size(self): return payload_size |
| 2714 | def set_payload_size(self, value): payload_size = value |
| 2715 | |
| 2716 | class npu_set_ofm_base3_t(Structure): |
| 2717 | _fields_ = [ |
| 2718 | ("cmd_code", c_uint32, 10), |
| 2719 | ("must_be_zero", c_uint32, 4), |
| 2720 | ("payload_size", c_uint32, 2), |
| 2721 | ("reserved0", c_uint32, 16), |
| 2722 | ("data", c_uint32, 32), |
| 2723 | ] |
| 2724 | def valid(self): return cmd_code==cmd1.NPU_SET_OFM_BASE3 and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2725 | def get_cmd_code(self): return cmd_code |
| 2726 | def set_cmd_code(self, value): cmd_code = value |
| 2727 | def get_data(self): return data |
| 2728 | def set_data(self, value): data = value |
| 2729 | def get_payload_size(self): return payload_size |
| 2730 | def set_payload_size(self, value): payload_size = value |
| 2731 | |
| 2732 | class npu_set_ofm_stride_x_t(Structure): |
| 2733 | _fields_ = [ |
| 2734 | ("cmd_code", c_uint32, 10), |
| 2735 | ("must_be_zero", c_uint32, 4), |
| 2736 | ("payload_size", c_uint32, 2), |
| 2737 | ("reserved0", c_uint32, 16), |
| 2738 | ("data", c_uint32, 32), |
| 2739 | ] |
| 2740 | def valid(self): return cmd_code==cmd1.NPU_SET_OFM_STRIDE_X and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2741 | def get_cmd_code(self): return cmd_code |
| 2742 | def set_cmd_code(self, value): cmd_code = value |
| 2743 | def get_data(self): return data |
| 2744 | def set_data(self, value): data = value |
| 2745 | def get_payload_size(self): return payload_size |
| 2746 | def set_payload_size(self, value): payload_size = value |
| 2747 | |
| 2748 | class npu_set_ofm_stride_y_t(Structure): |
| 2749 | _fields_ = [ |
| 2750 | ("cmd_code", c_uint32, 10), |
| 2751 | ("must_be_zero", c_uint32, 4), |
| 2752 | ("payload_size", c_uint32, 2), |
| 2753 | ("reserved0", c_uint32, 16), |
| 2754 | ("data", c_uint32, 32), |
| 2755 | ] |
| 2756 | def valid(self): return cmd_code==cmd1.NPU_SET_OFM_STRIDE_Y and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2757 | def get_cmd_code(self): return cmd_code |
| 2758 | def set_cmd_code(self, value): cmd_code = value |
| 2759 | def get_data(self): return data |
| 2760 | def set_data(self, value): data = value |
| 2761 | def get_payload_size(self): return payload_size |
| 2762 | def set_payload_size(self, value): payload_size = value |
| 2763 | |
| 2764 | class npu_set_ofm_stride_c_t(Structure): |
| 2765 | _fields_ = [ |
| 2766 | ("cmd_code", c_uint32, 10), |
| 2767 | ("must_be_zero", c_uint32, 4), |
| 2768 | ("payload_size", c_uint32, 2), |
| 2769 | ("reserved0", c_uint32, 16), |
| 2770 | ("data", c_uint32, 32), |
| 2771 | ] |
| 2772 | def valid(self): return cmd_code==cmd1.NPU_SET_OFM_STRIDE_C and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2773 | def get_cmd_code(self): return cmd_code |
| 2774 | def set_cmd_code(self, value): cmd_code = value |
| 2775 | def get_data(self): return data |
| 2776 | def set_data(self, value): data = value |
| 2777 | def get_payload_size(self): return payload_size |
| 2778 | def set_payload_size(self, value): payload_size = value |
| 2779 | |
| 2780 | class npu_set_weight_base_t(Structure): |
| 2781 | _fields_ = [ |
| 2782 | ("cmd_code", c_uint32, 10), |
| 2783 | ("must_be_zero", c_uint32, 4), |
| 2784 | ("payload_size", c_uint32, 2), |
| 2785 | ("reserved0", c_uint32, 16), |
| 2786 | ("data", c_uint32, 32), |
| 2787 | ] |
| 2788 | def valid(self): return cmd_code==cmd1.NPU_SET_WEIGHT_BASE and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2789 | def get_cmd_code(self): return cmd_code |
| 2790 | def set_cmd_code(self, value): cmd_code = value |
| 2791 | def get_data(self): return data |
| 2792 | def set_data(self, value): data = value |
| 2793 | def get_payload_size(self): return payload_size |
| 2794 | def set_payload_size(self, value): payload_size = value |
| 2795 | |
| 2796 | class npu_set_weight_length_t(Structure): |
| 2797 | _fields_ = [ |
| 2798 | ("cmd_code", c_uint32, 10), |
| 2799 | ("must_be_zero", c_uint32, 4), |
| 2800 | ("payload_size", c_uint32, 2), |
| 2801 | ("reserved0", c_uint32, 16), |
| 2802 | ("data", c_uint32, 32), |
| 2803 | ] |
| 2804 | def valid(self): return cmd_code==cmd1.NPU_SET_WEIGHT_LENGTH and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2805 | def get_cmd_code(self): return cmd_code |
| 2806 | def set_cmd_code(self, value): cmd_code = value |
| 2807 | def get_data(self): return data |
| 2808 | def set_data(self, value): data = value |
| 2809 | def get_payload_size(self): return payload_size |
| 2810 | def set_payload_size(self, value): payload_size = value |
| 2811 | |
| 2812 | class npu_set_scale_base_t(Structure): |
| 2813 | _fields_ = [ |
| 2814 | ("cmd_code", c_uint32, 10), |
| 2815 | ("must_be_zero", c_uint32, 4), |
| 2816 | ("payload_size", c_uint32, 2), |
| 2817 | ("reserved0", c_uint32, 16), |
| 2818 | ("data", c_uint32, 32), |
| 2819 | ] |
| 2820 | def valid(self): return cmd_code==cmd1.NPU_SET_SCALE_BASE and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2821 | def get_cmd_code(self): return cmd_code |
| 2822 | def set_cmd_code(self, value): cmd_code = value |
| 2823 | def get_data(self): return data |
| 2824 | def set_data(self, value): data = value |
| 2825 | def get_payload_size(self): return payload_size |
| 2826 | def set_payload_size(self, value): payload_size = value |
| 2827 | |
| 2828 | class npu_set_scale_length_t(Structure): |
| 2829 | _fields_ = [ |
| 2830 | ("cmd_code", c_uint32, 10), |
| 2831 | ("must_be_zero", c_uint32, 4), |
| 2832 | ("payload_size", c_uint32, 2), |
| 2833 | ("reserved0", c_uint32, 16), |
| 2834 | ("data", c_uint32, 32), |
| 2835 | ] |
| 2836 | def valid(self): return cmd_code==cmd1.NPU_SET_SCALE_LENGTH and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2837 | def get_cmd_code(self): return cmd_code |
| 2838 | def set_cmd_code(self, value): cmd_code = value |
| 2839 | def get_data(self): return data |
| 2840 | def set_data(self, value): data = value |
| 2841 | def get_payload_size(self): return payload_size |
| 2842 | def set_payload_size(self, value): payload_size = value |
| 2843 | |
| 2844 | class npu_set_ofm_scale_t(Structure): |
| 2845 | _fields_ = [ |
| 2846 | ("cmd_code", c_uint32, 10), |
| 2847 | ("must_be_zero", c_uint32, 4), |
| 2848 | ("payload_size", c_uint32, 2), |
| 2849 | ("shift", c_uint32, 16), |
| 2850 | ("data", c_uint32, 32), |
| 2851 | ] |
| 2852 | def valid(self): return cmd_code==cmd1.NPU_SET_OFM_SCALE and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2853 | def get_cmd_code(self): return cmd_code |
| 2854 | def set_cmd_code(self, value): cmd_code = value |
| 2855 | def get_data(self): return data |
| 2856 | def set_data(self, value): data = value |
| 2857 | def get_payload_size(self): return payload_size |
| 2858 | def set_payload_size(self, value): payload_size = value |
| 2859 | def get_shift(self): return shift |
| 2860 | def set_shift(self, value): shift = value |
| 2861 | |
| 2862 | class npu_set_opa_scale_t(Structure): |
| 2863 | _fields_ = [ |
| 2864 | ("cmd_code", c_uint32, 10), |
| 2865 | ("must_be_zero", c_uint32, 4), |
| 2866 | ("payload_size", c_uint32, 2), |
| 2867 | ("shift", c_uint32, 16), |
| 2868 | ("data", c_uint32, 32), |
| 2869 | ] |
| 2870 | def valid(self): return cmd_code==cmd1.NPU_SET_OPA_SCALE and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2871 | def get_cmd_code(self): return cmd_code |
| 2872 | def set_cmd_code(self, value): cmd_code = value |
| 2873 | def get_data(self): return data |
| 2874 | def set_data(self, value): data = value |
| 2875 | def get_payload_size(self): return payload_size |
| 2876 | def set_payload_size(self, value): payload_size = value |
| 2877 | def get_shift(self): return shift |
| 2878 | def set_shift(self, value): shift = value |
| 2879 | |
| 2880 | class npu_set_opb_scale_t(Structure): |
| 2881 | _fields_ = [ |
| 2882 | ("cmd_code", c_uint32, 10), |
| 2883 | ("must_be_zero", c_uint32, 4), |
| 2884 | ("payload_size", c_uint32, 2), |
| 2885 | ("reserved0", c_uint32, 16), |
| 2886 | ("data", c_uint32, 32), |
| 2887 | ] |
| 2888 | def valid(self): return cmd_code==cmd1.NPU_SET_OPB_SCALE and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2889 | def get_cmd_code(self): return cmd_code |
| 2890 | def set_cmd_code(self, value): cmd_code = value |
| 2891 | def get_data(self): return data |
| 2892 | def set_data(self, value): data = value |
| 2893 | def get_payload_size(self): return payload_size |
| 2894 | def set_payload_size(self, value): payload_size = value |
| 2895 | |
| 2896 | class npu_set_dma0_src_t(Structure): |
| 2897 | _fields_ = [ |
| 2898 | ("cmd_code", c_uint32, 10), |
| 2899 | ("must_be_zero", c_uint32, 4), |
| 2900 | ("payload_size", c_uint32, 2), |
| 2901 | ("reserved0", c_uint32, 16), |
| 2902 | ("data", c_uint32, 32), |
| 2903 | ] |
| 2904 | def valid(self): return cmd_code==cmd1.NPU_SET_DMA0_SRC and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2905 | def get_cmd_code(self): return cmd_code |
| 2906 | def set_cmd_code(self, value): cmd_code = value |
| 2907 | def get_data(self): return data |
| 2908 | def set_data(self, value): data = value |
| 2909 | def get_payload_size(self): return payload_size |
| 2910 | def set_payload_size(self, value): payload_size = value |
| 2911 | |
| 2912 | class npu_set_dma0_dst_t(Structure): |
| 2913 | _fields_ = [ |
| 2914 | ("cmd_code", c_uint32, 10), |
| 2915 | ("must_be_zero", c_uint32, 4), |
| 2916 | ("payload_size", c_uint32, 2), |
| 2917 | ("reserved0", c_uint32, 16), |
| 2918 | ("data", c_uint32, 32), |
| 2919 | ] |
| 2920 | def valid(self): return cmd_code==cmd1.NPU_SET_DMA0_DST and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2921 | def get_cmd_code(self): return cmd_code |
| 2922 | def set_cmd_code(self, value): cmd_code = value |
| 2923 | def get_data(self): return data |
| 2924 | def set_data(self, value): data = value |
| 2925 | def get_payload_size(self): return payload_size |
| 2926 | def set_payload_size(self, value): payload_size = value |
| 2927 | |
| 2928 | class npu_set_dma0_len_t(Structure): |
| 2929 | _fields_ = [ |
| 2930 | ("cmd_code", c_uint32, 10), |
| 2931 | ("must_be_zero", c_uint32, 4), |
| 2932 | ("payload_size", c_uint32, 2), |
| 2933 | ("reserved0", c_uint32, 16), |
| 2934 | ("data", c_uint32, 32), |
| 2935 | ] |
| 2936 | def valid(self): return cmd_code==cmd1.NPU_SET_DMA0_LEN and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2937 | def get_cmd_code(self): return cmd_code |
| 2938 | def set_cmd_code(self, value): cmd_code = value |
| 2939 | def get_data(self): return data |
| 2940 | def set_data(self, value): data = value |
| 2941 | def get_payload_size(self): return payload_size |
| 2942 | def set_payload_size(self, value): payload_size = value |
| 2943 | |
| 2944 | class npu_set_dma0_skip0_t(Structure): |
| 2945 | _fields_ = [ |
| 2946 | ("cmd_code", c_uint32, 10), |
| 2947 | ("must_be_zero", c_uint32, 4), |
| 2948 | ("payload_size", c_uint32, 2), |
| 2949 | ("param", c_uint32, 16), |
| 2950 | ("data", c_uint32, 32), |
| 2951 | ] |
| 2952 | def valid(self): return cmd_code==cmd1.NPU_SET_DMA0_SKIP0 and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2953 | def get_cmd_code(self): return cmd_code |
| 2954 | def set_cmd_code(self, value): cmd_code = value |
| 2955 | def get_data(self): return data |
| 2956 | def set_data(self, value): data = value |
| 2957 | def get_param(self): return param |
| 2958 | def set_param(self, value): param = value |
| 2959 | def get_payload_size(self): return payload_size |
| 2960 | def set_payload_size(self, value): payload_size = value |
| 2961 | |
| 2962 | class npu_set_dma0_skip1_t(Structure): |
| 2963 | _fields_ = [ |
| 2964 | ("cmd_code", c_uint32, 10), |
| 2965 | ("must_be_zero", c_uint32, 4), |
| 2966 | ("payload_size", c_uint32, 2), |
| 2967 | ("param", c_uint32, 16), |
| 2968 | ("data", c_uint32, 32), |
| 2969 | ] |
| 2970 | def valid(self): return cmd_code==cmd1.NPU_SET_DMA0_SKIP1 and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2971 | def get_cmd_code(self): return cmd_code |
| 2972 | def set_cmd_code(self, value): cmd_code = value |
| 2973 | def get_data(self): return data |
| 2974 | def set_data(self, value): data = value |
| 2975 | def get_param(self): return param |
| 2976 | def set_param(self, value): param = value |
| 2977 | def get_payload_size(self): return payload_size |
| 2978 | def set_payload_size(self, value): payload_size = value |
| 2979 | |
| 2980 | class npu_set_ifm2_base0_t(Structure): |
| 2981 | _fields_ = [ |
| 2982 | ("cmd_code", c_uint32, 10), |
| 2983 | ("must_be_zero", c_uint32, 4), |
| 2984 | ("payload_size", c_uint32, 2), |
| 2985 | ("reserved0", c_uint32, 16), |
| 2986 | ("data", c_uint32, 32), |
| 2987 | ] |
| 2988 | def valid(self): return cmd_code==cmd1.NPU_SET_IFM2_BASE0 and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 2989 | def get_cmd_code(self): return cmd_code |
| 2990 | def set_cmd_code(self, value): cmd_code = value |
| 2991 | def get_data(self): return data |
| 2992 | def set_data(self, value): data = value |
| 2993 | def get_payload_size(self): return payload_size |
| 2994 | def set_payload_size(self, value): payload_size = value |
| 2995 | |
| 2996 | class npu_set_ifm2_base1_t(Structure): |
| 2997 | _fields_ = [ |
| 2998 | ("cmd_code", c_uint32, 10), |
| 2999 | ("must_be_zero", c_uint32, 4), |
| 3000 | ("payload_size", c_uint32, 2), |
| 3001 | ("reserved0", c_uint32, 16), |
| 3002 | ("data", c_uint32, 32), |
| 3003 | ] |
| 3004 | def valid(self): return cmd_code==cmd1.NPU_SET_IFM2_BASE1 and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 3005 | def get_cmd_code(self): return cmd_code |
| 3006 | def set_cmd_code(self, value): cmd_code = value |
| 3007 | def get_data(self): return data |
| 3008 | def set_data(self, value): data = value |
| 3009 | def get_payload_size(self): return payload_size |
| 3010 | def set_payload_size(self, value): payload_size = value |
| 3011 | |
| 3012 | class npu_set_ifm2_base2_t(Structure): |
| 3013 | _fields_ = [ |
| 3014 | ("cmd_code", c_uint32, 10), |
| 3015 | ("must_be_zero", c_uint32, 4), |
| 3016 | ("payload_size", c_uint32, 2), |
| 3017 | ("reserved0", c_uint32, 16), |
| 3018 | ("data", c_uint32, 32), |
| 3019 | ] |
| 3020 | def valid(self): return cmd_code==cmd1.NPU_SET_IFM2_BASE2 and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 3021 | def get_cmd_code(self): return cmd_code |
| 3022 | def set_cmd_code(self, value): cmd_code = value |
| 3023 | def get_data(self): return data |
| 3024 | def set_data(self, value): data = value |
| 3025 | def get_payload_size(self): return payload_size |
| 3026 | def set_payload_size(self, value): payload_size = value |
| 3027 | |
| 3028 | class npu_set_ifm2_base3_t(Structure): |
| 3029 | _fields_ = [ |
| 3030 | ("cmd_code", c_uint32, 10), |
| 3031 | ("must_be_zero", c_uint32, 4), |
| 3032 | ("payload_size", c_uint32, 2), |
| 3033 | ("reserved0", c_uint32, 16), |
| 3034 | ("data", c_uint32, 32), |
| 3035 | ] |
| 3036 | def valid(self): return cmd_code==cmd1.NPU_SET_IFM2_BASE3 and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 3037 | def get_cmd_code(self): return cmd_code |
| 3038 | def set_cmd_code(self, value): cmd_code = value |
| 3039 | def get_data(self): return data |
| 3040 | def set_data(self, value): data = value |
| 3041 | def get_payload_size(self): return payload_size |
| 3042 | def set_payload_size(self, value): payload_size = value |
| 3043 | |
| 3044 | class npu_set_ifm2_stride_x_t(Structure): |
| 3045 | _fields_ = [ |
| 3046 | ("cmd_code", c_uint32, 10), |
| 3047 | ("must_be_zero", c_uint32, 4), |
| 3048 | ("payload_size", c_uint32, 2), |
| 3049 | ("reserved0", c_uint32, 16), |
| 3050 | ("data", c_uint32, 32), |
| 3051 | ] |
| 3052 | def valid(self): return cmd_code==cmd1.NPU_SET_IFM2_STRIDE_X and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 3053 | def get_cmd_code(self): return cmd_code |
| 3054 | def set_cmd_code(self, value): cmd_code = value |
| 3055 | def get_data(self): return data |
| 3056 | def set_data(self, value): data = value |
| 3057 | def get_payload_size(self): return payload_size |
| 3058 | def set_payload_size(self, value): payload_size = value |
| 3059 | |
| 3060 | class npu_set_ifm2_stride_y_t(Structure): |
| 3061 | _fields_ = [ |
| 3062 | ("cmd_code", c_uint32, 10), |
| 3063 | ("must_be_zero", c_uint32, 4), |
| 3064 | ("payload_size", c_uint32, 2), |
| 3065 | ("reserved0", c_uint32, 16), |
| 3066 | ("data", c_uint32, 32), |
| 3067 | ] |
| 3068 | def valid(self): return cmd_code==cmd1.NPU_SET_IFM2_STRIDE_Y and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 3069 | def get_cmd_code(self): return cmd_code |
| 3070 | def set_cmd_code(self, value): cmd_code = value |
| 3071 | def get_data(self): return data |
| 3072 | def set_data(self, value): data = value |
| 3073 | def get_payload_size(self): return payload_size |
| 3074 | def set_payload_size(self, value): payload_size = value |
| 3075 | |
| 3076 | class npu_set_ifm2_stride_c_t(Structure): |
| 3077 | _fields_ = [ |
| 3078 | ("cmd_code", c_uint32, 10), |
| 3079 | ("must_be_zero", c_uint32, 4), |
| 3080 | ("payload_size", c_uint32, 2), |
| 3081 | ("reserved0", c_uint32, 16), |
| 3082 | ("data", c_uint32, 32), |
| 3083 | ] |
| 3084 | def valid(self): return cmd_code==cmd1.NPU_SET_IFM2_STRIDE_C and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 3085 | def get_cmd_code(self): return cmd_code |
| 3086 | def set_cmd_code(self, value): cmd_code = value |
| 3087 | def get_data(self): return data |
| 3088 | def set_data(self, value): data = value |
| 3089 | def get_payload_size(self): return payload_size |
| 3090 | def set_payload_size(self, value): payload_size = value |
| 3091 | |
| 3092 | class npu_set_weight1_base_t(Structure): |
| 3093 | _fields_ = [ |
| 3094 | ("cmd_code", c_uint32, 10), |
| 3095 | ("must_be_zero", c_uint32, 4), |
| 3096 | ("payload_size", c_uint32, 2), |
| 3097 | ("param", c_uint32, 16), |
| 3098 | ("data", c_uint32, 32), |
| 3099 | ] |
| 3100 | def valid(self): return cmd_code==cmd1.NPU_SET_WEIGHT1_BASE and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 3101 | def get_cmd_code(self): return cmd_code |
| 3102 | def set_cmd_code(self, value): cmd_code = value |
| 3103 | def get_data(self): return data |
| 3104 | def set_data(self, value): data = value |
| 3105 | def get_param(self): return param |
| 3106 | def set_param(self, value): param = value |
| 3107 | def get_payload_size(self): return payload_size |
| 3108 | def set_payload_size(self, value): payload_size = value |
| 3109 | |
| 3110 | class npu_set_weight1_length_t(Structure): |
| 3111 | _fields_ = [ |
| 3112 | ("cmd_code", c_uint32, 10), |
| 3113 | ("must_be_zero", c_uint32, 4), |
| 3114 | ("payload_size", c_uint32, 2), |
| 3115 | ("reserved0", c_uint32, 16), |
| 3116 | ("data", c_uint32, 32), |
| 3117 | ] |
| 3118 | def valid(self): return cmd_code==cmd1.NPU_SET_WEIGHT1_LENGTH and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 3119 | def get_cmd_code(self): return cmd_code |
| 3120 | def set_cmd_code(self, value): cmd_code = value |
| 3121 | def get_data(self): return data |
| 3122 | def set_data(self, value): data = value |
| 3123 | def get_payload_size(self): return payload_size |
| 3124 | def set_payload_size(self, value): payload_size = value |
| 3125 | |
| 3126 | class npu_set_scale1_base_t(Structure): |
| 3127 | _fields_ = [ |
| 3128 | ("cmd_code", c_uint32, 10), |
| 3129 | ("must_be_zero", c_uint32, 4), |
| 3130 | ("payload_size", c_uint32, 2), |
| 3131 | ("param", c_uint32, 16), |
| 3132 | ("data", c_uint32, 32), |
| 3133 | ] |
| 3134 | def valid(self): return cmd_code==cmd1.NPU_SET_SCALE1_BASE and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 3135 | def get_cmd_code(self): return cmd_code |
| 3136 | def set_cmd_code(self, value): cmd_code = value |
| 3137 | def get_data(self): return data |
| 3138 | def set_data(self, value): data = value |
| 3139 | def get_param(self): return param |
| 3140 | def set_param(self, value): param = value |
| 3141 | def get_payload_size(self): return payload_size |
| 3142 | def set_payload_size(self, value): payload_size = value |
| 3143 | |
| 3144 | class npu_set_scale1_length_t(Structure): |
| 3145 | _fields_ = [ |
| 3146 | ("cmd_code", c_uint32, 10), |
| 3147 | ("must_be_zero", c_uint32, 4), |
| 3148 | ("payload_size", c_uint32, 2), |
| 3149 | ("reserved0", c_uint32, 16), |
| 3150 | ("data", c_uint32, 32), |
| 3151 | ] |
| 3152 | def valid(self): return cmd_code==cmd1.NPU_SET_SCALE1_LENGTH and must_be_zero==0 and payload_size>=1 and payload_size<=2; |
| 3153 | def get_cmd_code(self): return cmd_code |
| 3154 | def set_cmd_code(self, value): cmd_code = value |
| 3155 | def get_data(self): return data |
| 3156 | def set_data(self, value): data = value |
| 3157 | def get_payload_size(self): return payload_size |
| 3158 | def set_payload_size(self, value): payload_size = value |
Diqing Zhong | b731170 | 2020-04-14 12:31:44 +0200 | [diff] [blame] | 3159 | |