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