LCOV - code coverage report
Current view: top level - legacy/ascend950/unified_platform/ccu/ccu_microcode - ccu_microcode.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 5 5
Test Date: 2026-08-04 10:52:23 Functions: 100.0 % 1 1

            Line data    Source code
       1              : /**
       2              :  * Copyright (c) 2025 Huawei Technologies Co., Ltd.
       3              :  * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
       4              :  * CANN Open Software License Agreement Version 2.0 (the "License").
       5              :  * Please refer to the License for details. You may not use this file except in compliance with the License.
       6              :  * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
       7              :  * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
       8              :  * See LICENSE in the root of the software repository for the full text of the License.
       9              :  */
      10              : 
      11              : #ifndef HCCL_CCU_MICROCODE_H
      12              : #define HCCL_CCU_MICROCODE_H
      13              : 
      14              : #include <string>
      15              : #include <cstdint>
      16              : 
      17              : namespace Hccl {
      18              : namespace CcuRep {
      19              : 
      20              : constexpr uint16_t CCU_REDUCE_SUM = 0;
      21              : constexpr uint16_t CCU_REDUCE_MAX = 1;
      22              : constexpr uint16_t CCU_REDUCE_MIN = 2;
      23              : 
      24              : constexpr uint16_t CCU_REDUCE_MIN_MS = 2;
      25              : constexpr uint16_t CCU_REDUCE_MAX_MS = 8;
      26              : 
      27              : constexpr uint64_t CCU_MS_SIZE               = 4096;
      28              : constexpr uint64_t CCU_MS_INTERLEAVE         = 8;
      29              : constexpr uint64_t CCU_MS_DEFAULT_LOOP_COUNT = 128;
      30              : 
      31              : constexpr uint16_t CCU_LOAD_TO_XN_SEC_INFO = 1;
      32              : 
      33              : #pragma pack(push, 1)
      34              : // instr common header
      35              : union CcuInstrHeader {
      36              :     struct {
      37              :         uint16_t code : 11;
      38              :         uint16_t type : 4;
      39              :         uint16_t reserved : 1;
      40              :     };
      41              : 
      42              :     uint16_t header;
      43              : };
      44              : #pragma pack(pop)
      45              : 
      46         1188 : inline CcuInstrHeader InstrHeader(uint16_t type, uint16_t code)
      47              : {
      48         1188 :     CcuInstrHeader header = {};
      49         1188 :     header.type           = type;
      50         1188 :     header.code           = code;
      51         1188 :     return header;
      52              : }
      53              : 
      54              : namespace CcuV1 {
      55              : 
      56              : #pragma pack(push, 1)
      57              : // load instruction
      58              : struct CcuInstrLoadSqeArgsToGSA {
      59              :     uint16_t gsaId;
      60              :     uint16_t sqeArgsId;
      61              :     uint16_t reserved[13];
      62              : };
      63              : 
      64              : struct CcuInstrLoadSqeArgsToXn {
      65              :     uint16_t xnId;
      66              :     uint16_t sqeArgsId;
      67              :     uint16_t reserved[13];
      68              : };
      69              : 
      70              : struct CcuInstrLoadImdToGSA {
      71              :     uint16_t gsaId;
      72              :     uint64_t immediate;
      73              :     uint16_t reserved[10];
      74              : };
      75              : 
      76              : struct CcuInstrLoadImdToXn {
      77              :     uint16_t xnId;
      78              :     uint64_t immediate;
      79              :     uint16_t secFlag;
      80              :     uint16_t reserved[9];
      81              : };
      82              : 
      83              : struct CcuInstrLoadGSAXn {
      84              :     uint16_t gsAdId;
      85              :     uint16_t gsAmId;
      86              :     uint16_t xnId;
      87              :     uint16_t reserved[12];
      88              : };
      89              : 
      90              : struct CcuInstrLoadGSAGSA {
      91              :     uint16_t gsAdId;
      92              :     uint16_t gsAmId;
      93              :     uint16_t gsAnId;
      94              :     uint16_t reserved[12];
      95              : };
      96              : 
      97              : struct CcuInstrLoadXX {
      98              :     uint16_t xdId;
      99              :     uint16_t xmId;
     100              :     uint16_t xnId;
     101              :     uint16_t reserved[12];
     102              : };
     103              : 
     104              : // loop control instruction
     105              : struct CcuInstrLoop {
     106              :     uint16_t startInstrId; // 开始指令地址Id
     107              :     uint16_t endInstrId;   // 结束指令地址Id
     108              :     uint16_t xnId;         // LoopCtxId[52:45], Offset[44:13], IterNum[12:0]
     109              :     uint16_t reserved[12];
     110              : };
     111              : 
     112              : struct CcuInstrLoopGroup {
     113              :     uint16_t startLoopInstrId; // 开始loop地址Id
     114              :     uint16_t xnId;             // LoopNum[61:55], RepeatNum[54:48], NoRepeatNum[47:41]
     115              :     uint16_t xmId;             // gsaOffset[52:21], MSOffset[20:10], ckeOffset[9:0]
     116              :     uint16_t highPerfModeEn : 1;
     117              :     uint16_t reserved1 : 15;
     118              :     uint16_t reserved[11];
     119              : };
     120              : 
     121              : struct CcuInstrSetCKE {
     122              :     uint16_t clearType : 1;
     123              :     uint16_t reserved1 : 15;
     124              :     uint16_t setCKEId;
     125              :     uint16_t setCKEMask;
     126              :     uint16_t waitCKEId;
     127              :     uint16_t waitCKEMask;
     128              :     uint16_t reserved[10];
     129              : };
     130              : 
     131              : struct CcuInstrClearCKE {
     132              :     uint16_t clearType : 1;
     133              :     uint16_t reserved1 : 15;
     134              :     uint16_t clearCKEId;
     135              :     uint16_t clearMask;
     136              :     uint16_t waitCKEId;
     137              :     uint16_t waitCKEMask;
     138              :     uint16_t reserved[10];
     139              : };
     140              : 
     141              : struct CcuInstrJmp {
     142              :     uint16_t dstInstrXnId;
     143              :     uint16_t conditionXnId;
     144              :     uint64_t expectData;
     145              : };
     146              : 
     147              : // data transfer instruction
     148              : struct CcuInstrTransLocMemToLocMS {
     149              :     uint16_t locMSId;
     150              :     uint16_t locGSAId;
     151              :     uint16_t locXnId;
     152              :     uint16_t lengthXnId;
     153              :     uint16_t channelId;
     154              :     uint16_t reserved1[5];
     155              :     uint16_t clearType : 1;
     156              :     uint16_t lengthEn : 1;
     157              :     uint16_t reserved : 14;
     158              :     uint16_t setCKEId;
     159              :     uint16_t setCKEMask;
     160              :     uint16_t waitCKEId;
     161              :     uint16_t waitCKEMask;
     162              : };
     163              : 
     164              : struct CcuInstrTransRmtMemToLocMS {
     165              :     uint16_t locMSId;
     166              :     uint16_t rmtGSAId;
     167              :     uint16_t rmtXnId;
     168              :     uint16_t lengthXnId;
     169              :     uint16_t channelId;
     170              :     uint16_t reserved1[5];
     171              :     uint16_t clearType : 1;
     172              :     uint16_t lengthEn : 1;
     173              :     uint16_t reserved : 14;
     174              :     uint16_t setCKEId;
     175              :     uint16_t setCKEMask;
     176              :     uint16_t waitCKEId;
     177              :     uint16_t waitCKEMask;
     178              : };
     179              : 
     180              : struct CcuInstrTransLocMSToLocMem {
     181              :     uint16_t locGSAId;
     182              :     uint16_t locXnId;
     183              :     uint16_t locMSId;
     184              :     uint16_t lengthXnId;
     185              :     uint16_t channelId;
     186              :     uint16_t reserved1[5];
     187              :     uint16_t clearType : 1;
     188              :     uint16_t lengthEn : 1;
     189              :     uint16_t reserved : 14;
     190              :     uint16_t setCKEId;
     191              :     uint16_t setCKEMask;
     192              :     uint16_t waitCKEId;
     193              :     uint16_t waitCKEMask;
     194              : };
     195              : 
     196              : struct CcuInstrTransLocMSToRmtMem {
     197              :     uint16_t rmtGSAId;
     198              :     uint16_t rmtXnId;
     199              :     uint16_t locMSId;
     200              :     uint16_t lengthXnId;
     201              :     uint16_t channelId;
     202              :     uint16_t reserved1[5];
     203              :     uint16_t clearType : 1;
     204              :     uint16_t lengthEn : 1;
     205              :     uint16_t reserved : 14;
     206              :     uint16_t setCKEId;
     207              :     uint16_t setCKEMask;
     208              :     uint16_t waitCKEId;
     209              :     uint16_t waitCKEMask;
     210              : };
     211              : 
     212              : struct CcuInstrTransRmtMSToLocMem {
     213              :     uint16_t locGSAId;
     214              :     uint16_t locXnId;
     215              :     uint16_t rmtMSId;
     216              :     uint16_t lengthXnId;
     217              :     uint16_t channelId;
     218              :     uint16_t reserved1[5];
     219              :     uint16_t clearType : 1;
     220              :     uint16_t lengthEn : 1;
     221              :     uint16_t reserved : 14;
     222              :     uint16_t setCKEId;
     223              :     uint16_t setCKEMask;
     224              :     uint16_t waitCKEId;
     225              :     uint16_t waitCKEMask;
     226              : };
     227              : 
     228              : struct CcuInstrTransLocMSToLocMS {
     229              :     uint16_t dstMSId;
     230              :     uint16_t srcMSId;
     231              :     uint16_t lengthXnId;
     232              :     uint16_t channelId;
     233              :     uint16_t reserved1[6];
     234              :     uint16_t clearType : 1;
     235              :     uint16_t lengthEn : 1;
     236              :     uint16_t reserved : 14;
     237              :     uint16_t setCKEId;
     238              :     uint16_t setCKEMask;
     239              :     uint16_t waitCKEId;
     240              :     uint16_t waitCKEMask;
     241              : };
     242              : 
     243              : struct CcuInstrTransRmtMSToLocMS {
     244              :     uint16_t locMSId;
     245              :     uint16_t rmtMSId;
     246              :     uint16_t lengthXnId;
     247              :     uint16_t channelId;
     248              :     uint16_t reserved1[6];
     249              :     uint16_t clearType : 1;
     250              :     uint16_t lengthEn : 1;
     251              :     uint16_t reserved : 14;
     252              :     uint16_t setCKEId;
     253              :     uint16_t setCKEMask;
     254              :     uint16_t waitCKEId;
     255              :     uint16_t waitCKEMask;
     256              : };
     257              : 
     258              : struct CcuInstrTransLocMSToRmtMS {
     259              :     uint16_t rmtMSId;
     260              :     uint16_t locMSId;
     261              :     uint16_t lengthXnId;
     262              :     uint16_t channelId;
     263              :     uint16_t setRmtCKEId;
     264              :     uint16_t setRmtCKEMask;
     265              :     uint16_t reserved1[4];
     266              :     uint16_t clearType : 1;
     267              :     uint16_t lengthEn : 1;
     268              :     uint16_t reserved : 14;
     269              :     uint16_t setCKEId;
     270              :     uint16_t setCKEMask;
     271              :     uint16_t waitCKEId;
     272              :     uint16_t waitCKEMask;
     273              : };
     274              : 
     275              : struct CcuInstrTransRmtMemToLocMem {
     276              :     uint16_t locGSAId;
     277              :     uint16_t locXnId;
     278              :     uint16_t rmtGSAId;
     279              :     uint16_t rmtXnId;
     280              :     uint16_t lengthXnId;
     281              :     uint16_t channelId;
     282              :     uint16_t udfType : 8;
     283              :     uint16_t reduceDataType : 4;
     284              :     uint16_t reduceOpCode : 4;
     285              :     uint16_t reserved[3];
     286              :     uint16_t clearType : 1;
     287              :     uint16_t lengthEn : 1;
     288              :     uint16_t reduceEn : 1;
     289              :     uint16_t reserved1 : 13;
     290              :     uint16_t setCKEId;
     291              :     uint16_t setCKEMask;
     292              :     uint16_t waitCKEId;
     293              :     uint16_t waitCKEMask;
     294              : };
     295              : 
     296              : struct CcuInstrTransLocMemToRmtMem {
     297              :     uint16_t rmtGSAId;
     298              :     uint16_t rmtXnId;
     299              :     uint16_t locGSAId;
     300              :     uint16_t locXnId;
     301              :     uint16_t lengthXnId;
     302              :     uint16_t channelId;
     303              :     uint16_t udfType : 8;
     304              :     uint16_t reduceDataType : 4;
     305              :     uint16_t reduceOpCode : 4;
     306              :     uint16_t reserved[3];
     307              :     uint16_t clearType : 1;
     308              :     uint16_t lengthEn : 1;
     309              :     uint16_t reduceEn : 1;
     310              :     uint16_t reserved1 : 13;
     311              :     uint16_t setCKEId;
     312              :     uint16_t setCKEMask;
     313              :     uint16_t waitCKEId;
     314              :     uint16_t waitCKEMask;
     315              : };
     316              : 
     317              : struct CcuInstrTransLocMemToLocMem {
     318              :     uint16_t dstGSAId;
     319              :     uint16_t dstXnId;
     320              :     uint16_t srcGSAId;
     321              :     uint16_t srcXnId;
     322              :     uint16_t lengthXnId;
     323              :     uint16_t channelId;
     324              :     uint16_t reserved1[4];
     325              :     uint16_t clearType : 1;
     326              :     uint16_t lengthEn : 1;
     327              :     uint16_t reserved : 14;
     328              :     uint16_t setCKEId;
     329              :     uint16_t setCKEMask;
     330              :     uint16_t waitCKEId;
     331              :     uint16_t waitCKEMask;
     332              : };
     333              : 
     334              : struct CcuInstrSyncCKE {
     335              :     uint16_t rmtCKEId;
     336              :     uint16_t locCKEId;
     337              :     uint16_t locCKEMask;
     338              :     uint16_t channelId;
     339              :     uint16_t reserved[6];
     340              :     uint16_t clearType : 1;
     341              :     uint16_t reserved1 : 15;
     342              :     uint16_t setCKEId;
     343              :     uint16_t setCKEMask;
     344              :     uint16_t waitCKEId;
     345              :     uint16_t waitCKEMask;
     346              : };
     347              : 
     348              : struct CcuInstrSyncGSA {
     349              :     uint16_t rmtGSAId;
     350              :     uint16_t locGSAId;
     351              :     uint16_t reserved2;
     352              :     uint16_t channelId;
     353              :     uint16_t setRmtCKEId;
     354              :     uint16_t setRmtCKEMask;
     355              :     uint16_t reserved[4];
     356              :     uint16_t clearType : 1;
     357              :     uint16_t reserved1 : 15;
     358              :     uint16_t setCKEId;
     359              :     uint16_t setCKEMask;
     360              :     uint16_t waitCKEId;
     361              :     uint16_t waitCKEMask;
     362              : };
     363              : 
     364              : struct CcuInstrSyncXn {
     365              :     uint16_t rmtXnId;
     366              :     uint16_t locXnId;
     367              :     uint16_t reserved2;
     368              :     uint16_t channelId;
     369              :     uint16_t setRmtCKEId;
     370              :     uint16_t setRmtCKEMask;
     371              :     uint16_t reserved[4];
     372              :     uint16_t clearType : 1;
     373              :     uint16_t reserved1 : 15;
     374              :     uint16_t setCKEId;
     375              :     uint16_t setCKEMask;
     376              :     uint16_t waitCKEId;
     377              :     uint16_t waitCKEMask;
     378              : };
     379              : 
     380              : struct CcuInstrAdd {
     381              :     uint16_t msId[CCU_REDUCE_MAX_MS];
     382              :     uint16_t XnIdLength;
     383              :     uint16_t reserved;
     384              :     uint16_t clearType : 1;
     385              :     uint16_t count : 3;
     386              :     uint16_t castEn : 2;
     387              :     uint16_t reserved1 : 5;
     388              :     uint16_t dataType : 5;
     389              :     uint16_t setCKEId;
     390              :     uint16_t setCKEMask;
     391              :     uint16_t waitCKEId;
     392              :     uint16_t waitCKEMask;
     393              : };
     394              : 
     395              : struct CcuInstrMax {
     396              :     uint16_t msId[CCU_REDUCE_MAX_MS];
     397              :     uint16_t XnIdLength;
     398              :     uint16_t reserved;
     399              :     uint16_t clearType : 1;
     400              :     uint16_t count : 3;
     401              :     uint16_t reserved1 : 7;
     402              :     uint16_t dataType : 5;
     403              :     uint16_t setCKEId;
     404              :     uint16_t setCKEMask;
     405              :     uint16_t waitCKEId;
     406              :     uint16_t waitCKEMask;
     407              : };
     408              : 
     409              : struct CcuInstrMin {
     410              :     uint16_t msId[CCU_REDUCE_MAX_MS];
     411              :     uint16_t XnIdLength;
     412              :     uint16_t reserved;
     413              :     uint16_t clearType : 1;
     414              :     uint16_t count : 3;
     415              :     uint16_t reserved1 : 7;
     416              :     uint16_t dataType : 5;
     417              :     uint16_t setCKEId;
     418              :     uint16_t setCKEMask;
     419              :     uint16_t waitCKEId;
     420              :     uint16_t waitCKEMask;
     421              : };
     422              : #pragma pack(pop)
     423              : 
     424              : union CcuMicroCodeV1 {
     425              :     CcuV1::CcuInstrLoadSqeArgsToGSA loadSqeArgsToGSA;
     426              :     CcuV1::CcuInstrLoadSqeArgsToXn  loadSqeArgsToXn;
     427              :     CcuV1::CcuInstrLoadImdToGSA     loadImdToGSA;
     428              :     CcuV1::CcuInstrLoadImdToXn      loadImdToXn;
     429              :     CcuV1::CcuInstrLoadGSAXn        loadGSAXn;
     430              :     CcuV1::CcuInstrLoadGSAGSA       loadGSAGSA;
     431              :     CcuV1::CcuInstrLoadXX           loadXX;
     432              : 
     433              :     CcuV1::CcuInstrLoop      loop;
     434              :     CcuV1::CcuInstrLoopGroup loopGroup;
     435              :     CcuV1::CcuInstrSetCKE    setCKE;
     436              :     CcuV1::CcuInstrClearCKE  clearCKE;
     437              :     CcuV1::CcuInstrJmp       jmp;
     438              : 
     439              :     CcuV1::CcuInstrTransLocMemToLocMS transLocMemToLocMS;
     440              :     CcuV1::CcuInstrTransRmtMemToLocMS transRmtMemToLocMS;
     441              :     CcuV1::CcuInstrTransLocMSToLocMem transLocMSToLocMem;
     442              :     CcuV1::CcuInstrTransLocMSToRmtMem transLocMSToRmtMem;
     443              :     CcuV1::CcuInstrTransRmtMSToLocMem transRmtMSToLocMem;
     444              : 
     445              :     CcuV1::CcuInstrTransLocMSToLocMS transLocMSToLocMS;
     446              :     CcuV1::CcuInstrTransRmtMSToLocMS transRmtMSToLocMS;
     447              :     CcuV1::CcuInstrTransLocMSToRmtMS transLocMSToRmtMS;
     448              : 
     449              :     CcuV1::CcuInstrTransRmtMemToLocMem transRmtMemToLocMem;
     450              :     CcuV1::CcuInstrTransLocMemToRmtMem transLocMemToRmtMem;
     451              :     CcuV1::CcuInstrTransLocMemToLocMem transLocMemToLocMem;
     452              : 
     453              :     CcuV1::CcuInstrSyncCKE syncCKE;
     454              :     CcuV1::CcuInstrSyncGSA syncGSA;
     455              :     CcuV1::CcuInstrSyncXn  syncXn;
     456              : 
     457              :     CcuV1::CcuInstrAdd add;
     458              :     CcuV1::CcuInstrMax max;
     459              :     CcuV1::CcuInstrMin min;
     460              : };
     461              : 
     462              : }; // namespace CcuV1
     463              : 
     464              : namespace CcuV2 {
     465              : 
     466              : struct CacheConfig {
     467              :     uint16_t allocHint;
     468              :     uint16_t victimHint;
     469              : };
     470              : 
     471              : struct TransMemNotifyInfo {
     472              :     uint16_t xnId;
     473              :     uint16_t xntId;
     474              :     uint32_t value;
     475              : };
     476              : 
     477              : struct TransMemReduceInfo {
     478              :     uint16_t udfType;
     479              :     uint16_t reduceDataType;
     480              :     uint16_t reduceOpCode;
     481              : };
     482              : 
     483              : struct TransMemConfig {
     484              :     uint16_t dmaOpCode;
     485              :     uint16_t order;
     486              :     uint16_t fence;
     487              :     uint16_t cqe;
     488              :     uint16_t nf;
     489              :     uint16_t udfEnable;
     490              :     uint16_t splitMode;
     491              :     uint16_t se;
     492              :     uint16_t rmtJettyType;
     493              : };
     494              : 
     495              : #pragma pack(push, 1)
     496              : 
     497              : // load instruction
     498              : struct CcuInstrLoadSqeArgsToX {
     499              :     uint16_t xnId;
     500              :     uint16_t sqeArgsId;
     501              :     uint16_t reserved[11];
     502              :     uint16_t setCKEId;
     503              :     uint16_t setCKEMask;
     504              : };
     505              : 
     506              : struct CcuInstrLoadImdToX {
     507              :     uint16_t xnId;
     508              :     uint64_t immediate;
     509              :     uint16_t reserved[8];
     510              :     uint16_t setCKEId;
     511              :     uint16_t setCKEMask;
     512              : };
     513              : 
     514              : struct CcuInstrLoadStoreX {
     515              :     uint16_t xdId;
     516              :     uint16_t xsId;
     517              :     uint16_t xsoId;
     518              :     uint16_t xdoId;
     519              :     uint16_t oMode : 1;
     520              :     uint16_t reserved : 15;
     521              :     uint16_t reserved1[8];
     522              :     uint16_t setCKEId;
     523              :     uint16_t setCKEMask;
     524              : };
     525              : 
     526              : struct CcuInstrClearX {
     527              :     uint16_t xnId;
     528              :     uint16_t xmId;
     529              :     uint16_t reserved[11];
     530              :     uint16_t setCKEId;
     531              :     uint16_t setCKEMask;
     532              : };
     533              : 
     534              : struct CcuInstrNop {
     535              :     uint16_t reserved[15];
     536              : };
     537              : 
     538              : struct CcuInstrLoad {
     539              :     uint16_t xdId;
     540              :     uint16_t xsId;
     541              :     uint16_t xstId;
     542              :     uint16_t xlId;
     543              :     uint16_t reserved[6];
     544              :     uint16_t dstType : 4;
     545              :     uint16_t allocHint : 2;
     546              :     uint16_t victimHint : 2;
     547              :     uint16_t reserved1 : 8;
     548              :     uint16_t reserved2[2];
     549              :     uint16_t setCKEId;
     550              :     uint16_t setCKEMask;
     551              : };
     552              : 
     553              : struct CcuInstrStore {
     554              :     uint16_t xdId;
     555              :     uint16_t xdtId;
     556              :     uint16_t xsId;
     557              :     uint16_t xlId;
     558              :     uint16_t xhId;
     559              :     uint16_t reserved[5];
     560              :     uint16_t srcType : 4;
     561              :     uint16_t allocHint : 2;
     562              :     uint16_t victimHint : 2;
     563              :     uint16_t storeType : 1;
     564              :     uint16_t hscbType : 1;
     565              :     uint16_t hscbBroadCastDstType : 6;
     566              :     uint16_t reserved1[2];
     567              :     uint16_t setCKEId;
     568              :     uint16_t setCKEMask;
     569              : };
     570              : 
     571              : // 运算符复用相同的结构体
     572              : // 左移右移:需要指定shiftType
     573              : // A = B@C类算子,需要指定xd, xn, xm
     574              : // 按位非,需要指定xd, xn
     575              : // popcnt,需要指定xd, xn
     576              : struct CcuInstrOperator {
     577              :     uint16_t xdId;
     578              :     uint16_t xnId;
     579              :     uint16_t xmId;
     580              :     uint16_t parMode : 1;
     581              :     uint16_t reserved : 15;
     582              :     uint16_t reserved1[6];
     583              :     uint16_t shiftType : 1;
     584              :     uint16_t reserved2 : 15;
     585              :     uint16_t reserved3[2];
     586              :     uint16_t setCKEId;
     587              :     uint16_t setCKEMask;
     588              : };
     589              : 
     590              : // loop control instruction
     591              : struct CcuInstrLoop {
     592              :     uint16_t startInstrId; // 开始指令地址Id
     593              :     uint16_t endInstrId;   // 结束指令地址Id
     594              :     uint16_t xmId;         // IterNum[12:0]
     595              :     uint16_t xnId;         // Offset[31:0]
     596              :     uint16_t xpId;         // LoopCtxId[8:0]
     597              :     uint16_t wishCKEBit;
     598              :     uint16_t mode : 1;
     599              :     uint16_t reserved : 15;
     600              :     uint16_t reserved1[8];
     601              : };
     602              : 
     603              : struct CcuInstrLoopGroup {
     604              :     uint16_t startLoopInstrId; // 开始loop地址Id
     605              :     uint16_t xnId;             // ExtendNum[22:16], RepeatLoopIndex[15:9], LoopNum[8:0]
     606              :     uint16_t xmId;             // gsaOffset[52:21], MSOffset[20:10], ckeOffset[9:0]
     607              :     uint16_t xpId;             // xnOffset[31:0]
     608              :     uint16_t reserved[11];
     609              : };
     610              : 
     611              : struct CcuInstrSetCKE {
     612              :     uint16_t clearType : 1;
     613              :     uint16_t reserved : 15;
     614              :     uint16_t setCKEId;
     615              :     uint16_t setCKEMask;
     616              :     uint16_t waitCKEId;
     617              :     uint16_t waitCKEMask;
     618              :     uint64_t userData;
     619              :     uint16_t reserved1[6];
     620              : };
     621              : 
     622              : struct CcuInstrClearCKE {
     623              :     uint16_t clearType : 1;
     624              :     uint16_t reserved : 15;
     625              :     uint16_t clearCKEId;
     626              :     uint16_t clearMask;
     627              :     uint16_t waitCKEId;
     628              :     uint16_t waitCKEMask;
     629              :     uint16_t reserved1[10];
     630              : };
     631              : 
     632              : struct CcuInstrJmp {
     633              :     uint16_t expectedXnId;
     634              :     uint16_t conditionXnId;
     635              :     uint16_t relTarInstrXnId;
     636              :     uint16_t conditionType : 4;
     637              :     uint16_t reserved : 12;
     638              :     uint16_t reserved1[11];
     639              : };
     640              : 
     641              : struct CcuInstrWait {
     642              :     uint16_t expectedXnId;
     643              :     uint16_t conditionXnId;
     644              :     uint16_t conditionType : 4;
     645              :     uint16_t reserved : 12;
     646              :     uint16_t reserved1[12];
     647              : };
     648              : 
     649              : struct CcuInstrFence {
     650              :     uint16_t reserved[15];
     651              : };
     652              : 
     653              : // data transfer instruction
     654              : struct CcuInstrTransLocMemToLocMS {
     655              :     uint16_t msId;
     656              :     uint16_t xsId;
     657              :     uint16_t xstId;
     658              :     uint16_t xlId;
     659              :     uint16_t xoId;
     660              :     uint16_t allocHint : 2;
     661              :     uint16_t victimHint : 2;
     662              :     uint16_t reserved : 12;
     663              :     uint16_t reserved1[7];
     664              :     uint16_t setCKEId;
     665              :     uint16_t setCKEMask;
     666              : };
     667              : 
     668              : struct CcuInstrTransLocMSToLocMem {
     669              :     uint16_t xdId;
     670              :     uint16_t xdtId;
     671              :     uint16_t msId;
     672              :     uint16_t xlId;
     673              :     uint16_t xoId;
     674              :     uint16_t allocHint : 2;
     675              :     uint16_t victimHint : 2;
     676              :     uint16_t reserved : 12;
     677              :     uint16_t reserved1[7];
     678              :     uint16_t setCKEId;
     679              :     uint16_t setCKEMask;
     680              : };
     681              : 
     682              : struct CcuInstrTransLocMSToLocMS {
     683              :     uint16_t msdId;
     684              :     uint16_t mssId;
     685              :     uint16_t xlId;
     686              :     uint16_t xoId;
     687              :     uint16_t reserved[9];
     688              :     uint16_t setCKEId;
     689              :     uint16_t setCKEMask;
     690              : };
     691              : 
     692              : struct CcuInstrTransLocMemToLocMem {
     693              :     uint16_t xdId;
     694              :     uint16_t xdtId;
     695              :     uint16_t xsId;
     696              :     uint16_t xstId;
     697              :     uint16_t xlId;
     698              :     uint16_t usedMSId;
     699              :     uint16_t srcAllocHint : 2;
     700              :     uint16_t srcVictimHint : 2;
     701              :     uint16_t dstAllocHint : 2;
     702              :     uint16_t dstVictimHint : 2;
     703              :     uint16_t msNum : 8;
     704              :     uint16_t reserved1[6];
     705              :     uint16_t setCKEId;
     706              :     uint16_t setCKEMask;
     707              : };
     708              : 
     709              : struct CcuInstrTransMem {
     710              :     uint16_t xdId;  // 存储目的内存地址
     711              :     uint16_t xdtId; // 存储目的内存Token
     712              :     uint16_t xsId;  // 存储源内存地址
     713              :     uint16_t xstId; // 存储源内存Token
     714              :     uint16_t xlId;  // 存储要搬运的数据长度
     715              :     uint16_t xcId;  // 存储使用的channelId
     716              :     uint16_t xnId;  // 存储notify/atomic的目的地址
     717              :     uint16_t xntId; // 存储notify/atomic的目的Token
     718              :     uint32_t value; // notify value, atomic store add value, immeidata data, 视不同的opCode确定, 只支持32bit
     719              :     uint16_t udfType : 8;
     720              :     uint16_t reduceDataType : 4;
     721              :     uint16_t reduceOpCode : 4;
     722              :     uint16_t dmaOpCode : 8; // wqe中的opcode,支持0x0: send,0x1: send with immediata,0x3: Write,0x5: Write with
     723              :                             // Notify,0x6: Read,0x70: Write with atomic store add
     724              :     uint16_t order : 3;
     725              :     uint16_t fence : 1;
     726              :     uint16_t cqe : 1;
     727              :     uint16_t nf : 1; // No Fragment, 不允许分片
     728              :     uint16_t udfEnable : 1;
     729              :     uint16_t splitMode : 1;
     730              :     uint16_t se : 1;           // Solicited Event,Responder基于se来判断生成CQE时是否产生Completion Event
     731              :     uint16_t rmtJettyType : 2; // 00: JFR, 01: Jetty,10: JettyGroup,11: reserved
     732              :     uint16_t reserved : 5;
     733              :     uint16_t targetHint : 8;
     734              :     uint16_t setCKEId;
     735              :     uint16_t setCKEMask;
     736              : };
     737              : 
     738              : // SyncWtX指令固定将一个指定Xn的信息同步,固定8B
     739              : struct CcuInstrSyncWtX {
     740              :     uint16_t xdId;  // 存储目的Xn寄存器的地址
     741              :     uint16_t xdtId; // 存储目的Xn寄存器Token
     742              :     uint16_t xsId;  // 存储源Xn寄存器Id
     743              :     uint16_t xcId;  // 存储使用的channelId
     744              :     uint16_t xnId;  // 存储notify/atomic的目的地址
     745              :     uint16_t xntId; // 存储notify/atomic的目的Token
     746              :     uint32_t value; // notify value, 只支持32bit
     747              :     uint16_t notifyValid : 1;
     748              :     uint16_t parMode : 1;
     749              :     uint16_t reserved : 14;
     750              :     uint16_t reserved1[4];
     751              :     uint16_t setCKEId;
     752              :     uint16_t setCKEMask;
     753              : };
     754              : 
     755              : // SyncAtX指令以write with atomic store add发往对端,其中write的数据长度为0,本端Xn的值是写在atomic value中进行发送
     756              : struct CcuInstrSyncAtX {
     757              :     uint16_t xdId;  // 存储目的Xn寄存器的地址
     758              :     uint16_t xdtId; // 存储目的Xn寄存器Token
     759              :     uint16_t xsId;  // 存储源Xn寄存器Id
     760              :     uint16_t xcId;  // 存储使用的channelId
     761              :     uint16_t reserved : 1;
     762              :     uint16_t parMode : 1;
     763              :     uint16_t reserved1 : 14;
     764              :     uint16_t reserved2[8];
     765              :     uint16_t setCKEId;
     766              :     uint16_t setCKEMask;
     767              : };
     768              : 
     769              : // reduce instruction
     770              : // add: 配置castEn
     771              : // max和min: castEn保持默认为0
     772              : struct CcuInstrReduce {
     773              :     uint16_t msId[CCU_REDUCE_MAX_MS];
     774              :     uint16_t reserved[2];
     775              :     uint16_t clearType : 1;
     776              :     uint16_t count : 3;
     777              :     uint16_t castEn : 2;
     778              :     uint16_t reserved1 : 5;
     779              :     uint16_t dataType : 5;
     780              :     uint16_t reserved2[2];
     781              :     uint16_t setCKEId;
     782              :     uint16_t setCKEMask;
     783              : };
     784              : 
     785              : #pragma pack(pop)
     786              : 
     787              : union CcuMicroCodeV2 {
     788              :     CcuV2::CcuInstrLoadSqeArgsToX loadSqeArgsToX;
     789              :     CcuV2::CcuInstrLoadImdToX     loadImdToX;
     790              :     CcuV2::CcuInstrLoadStoreX     loadStoreX;
     791              :     CcuV2::CcuInstrClearX         clearX;
     792              :     CcuV2::CcuInstrNop            nop;
     793              :     CcuV2::CcuInstrOperator       operate;
     794              :     CcuV2::CcuInstrLoad           load;
     795              :     CcuV2::CcuInstrStore          store;
     796              : 
     797              :     CcuV2::CcuInstrLoop      loop;
     798              :     CcuV2::CcuInstrLoopGroup loopGroup;
     799              :     CcuV2::CcuInstrSetCKE    setCKE;
     800              :     CcuV2::CcuInstrClearCKE  clearCKE;
     801              :     CcuV2::CcuInstrJmp       jmp;
     802              :     CcuV2::CcuInstrWait      wait;
     803              :     CcuV2::CcuInstrFence     fence;
     804              : 
     805              :     CcuV2::CcuInstrTransLocMemToLocMS  transLocMemToLocMS;
     806              :     CcuV2::CcuInstrTransLocMSToLocMem  transLocMSToLocMem;
     807              :     CcuV2::CcuInstrTransLocMSToLocMS   transLocMSToLocMS;
     808              :     CcuV2::CcuInstrTransLocMemToLocMem transLocMemToLocMem;
     809              :     CcuV2::CcuInstrTransMem            transMem;
     810              :     CcuV2::CcuInstrSyncWtX             syncWtX;
     811              :     CcuV2::CcuInstrSyncAtX             syncAtX;
     812              : 
     813              :     CcuV2::CcuInstrReduce reduce;
     814              : };
     815              : }; // namespace CcuV2
     816              : 
     817              : struct CcuInstr {
     818              :     CcuInstrHeader header;
     819              :     union {
     820              :         CcuV1::CcuMicroCodeV1 v1;
     821              :         CcuV2::CcuMicroCodeV2 v2;
     822              :     };
     823              : };
     824              : 
     825              : std::string ParseInstr(const CcuInstr *instr);
     826              : 
     827              : void LoadSqeArgsToGSAInstr(CcuInstr *instr, uint16_t gsaId, uint16_t sqeArgsId);
     828              : void LoadSqeArgsToXnInstr(CcuInstr *instr, uint16_t xnId, uint16_t sqeArgsId);
     829              : void LoadImdToGSAInstr(CcuInstr *instr, uint16_t gsaId, uint64_t immediate);
     830              : void LoadImdToXnInstr(CcuInstr *instr, uint16_t xnId, uint64_t immediate, uint16_t secFlag = 0);
     831              : void LoadGSAXnInstr(CcuInstr *instr, uint16_t gsAdId, uint16_t gsAmId, uint16_t xnId);
     832              : void LoadGSAGSAInstr(CcuInstr *instr, uint16_t gsAdId, uint16_t gsAmId, uint16_t gsAnId);
     833              : void LoadXXInstr(CcuInstr *instr, uint16_t xdId, uint16_t xmId, uint16_t xnId);
     834              : 
     835              : void LoopInstr(CcuInstr *instr, uint16_t startInstrId, uint16_t endInstrId, uint16_t xnId);
     836              : void LoopGroupInstr(CcuInstr *instr, uint16_t startLoopInstrId, uint16_t xnId, uint16_t xmId, uint16_t highPerfModeEn);
     837              : void JumpInstr(CcuInstr *instr, uint16_t dstInstrXnId, uint16_t conditionXnId, uint64_t expectData);
     838              : void SetCKEInstr(CcuInstr *instr, uint16_t setCKEId, uint16_t setCKEMask, uint16_t waitCKEId, uint16_t waitCKEMask,
     839              :                  uint16_t clearType);
     840              : void ClearCKEInstr(CcuInstr *instr, uint16_t clearCKEId, uint16_t clearMask, uint16_t waitCKEId, uint16_t waitCKEMask,
     841              :                    uint16_t clearType);
     842              : 
     843              : void TransLocMemToLocMSInstr(CcuInstr *instr, uint16_t locMSId, uint16_t locGSAId, uint16_t locXnId,
     844              :                              uint16_t lengthXnId, uint16_t channelId, uint16_t setCKEId, uint16_t setCKEMask,
     845              :                              uint16_t waitCKEId, uint16_t waitCKEMask, uint16_t clearType, uint16_t lengthEn);
     846              : void TransRmtMemToLocMSInstr(CcuInstr *instr, uint16_t locMSId, uint16_t rmtGSAId, uint16_t rmtXnId,
     847              :                              uint16_t lengthXnId, uint16_t channelId, uint16_t setCKEId, uint16_t setCKEMask,
     848              :                              uint16_t waitCKEId, uint16_t waitCKEMask, uint16_t clearType, uint16_t lengthEn);
     849              : void TransLocMSToLocMemInstr(CcuInstr *instr, uint16_t locGSAId, uint16_t locXnId, uint16_t locMSId,
     850              :                              uint16_t lengthXnId, uint16_t channelId, uint16_t setCKEId, uint16_t setCKEMask,
     851              :                              uint16_t waitCKEId, uint16_t waitCKEMask, uint16_t clearType, uint16_t lengthEn);
     852              : void TransLocMSToRmtMemInstr(CcuInstr *instr, uint16_t rmtGSAId, uint16_t rmtXnId, uint16_t locMSId,
     853              :                              uint16_t lengthXnId, uint16_t channelId, uint16_t setCKEId, uint16_t setCKEMask,
     854              :                              uint16_t waitCKEId, uint16_t waitCKEMask, uint16_t clearType, uint16_t lengthEn);
     855              : void TransRmtMSToLocMemInstr(CcuInstr *instr, uint16_t locGSAId, uint16_t locXnId, uint16_t rmtMSId,
     856              :                              uint16_t lengthXnId, uint16_t channelId, uint16_t setCKEId, uint16_t setCKEMask,
     857              :                              uint16_t waitCKEId, uint16_t waitCKEMask, uint16_t clearType, uint16_t lengthEn);
     858              : 
     859              : void TransLocMSToLocMSInstr(CcuInstr *instr, uint16_t dstMSId, uint16_t srcMSId, uint16_t lengthXnId,
     860              :                             uint16_t channelId, uint16_t setCKEId, uint16_t setCKEMask, uint16_t waitCKEId,
     861              :                             uint16_t waitCKEMask, uint16_t clearType, uint16_t lengthEn);
     862              : void TransRmtMSToLocMSInstr(CcuInstr *instr, uint16_t locMSId, uint16_t rmtMSId, uint16_t lengthXnId,
     863              :                             uint16_t channelId, uint16_t setCKEId, uint16_t setCKEMask, uint16_t waitCKEId,
     864              :                             uint16_t waitCKEMask, uint16_t clearType, uint16_t lengthEn);
     865              : void TransLocMSToRmtMSInstr(CcuInstr *instr, uint16_t rmtMSId, uint16_t locMSId, uint16_t lengthXnId,
     866              :                             uint16_t channelId, uint16_t setRmtCKEId, uint16_t setRmtCKEMask, uint16_t setCKEId,
     867              :                             uint16_t setCKEMask, uint16_t waitCKEId, uint16_t waitCKEMask, uint16_t clearType,
     868              :                             uint16_t lengthEn);
     869              : 
     870              : void TransRmtMemToLocMemInstr(CcuInstr *instr, uint16_t locGSAId, uint16_t locXnId, uint16_t rmtGSAId, uint16_t rmtXnId,
     871              :                               uint16_t lengthXnId, uint16_t channelId, uint16_t reduceDataType,
     872              :                               uint16_t reduceOpCode, uint16_t setCKEId, uint16_t setCKEMask, uint16_t waitCKEId,
     873              :                               uint16_t waitCKEMask, uint16_t clearType, uint16_t lengthEn, uint16_t reduceEn);
     874              : void TransLocMemToRmtMemInstr(CcuInstr *instr, uint16_t rmtGSAId, uint16_t rmtXnId, uint16_t locGSAId, uint16_t locXnId,
     875              :                               uint16_t lengthXnId, uint16_t channelId, uint16_t reduceDataType,
     876              :                               uint16_t reduceOpCode, uint16_t setCKEId, uint16_t setCKEMask, uint16_t waitCKEId,
     877              :                               uint16_t waitCKEMask, uint16_t clearType, uint16_t lengthEn, uint16_t reduceEn);
     878              : void TransLocMemToLocMemInstr(CcuInstr *instr, uint16_t dstGSAId, uint16_t dstXnId, uint16_t srcGSAId, uint16_t srcXnId,
     879              :                               uint16_t lengthXnId, uint16_t channelId, uint16_t setCKEId, uint16_t setCKEMask,
     880              :                               uint16_t waitCKEId, uint16_t waitCKEMask, uint16_t clearType, uint16_t lengthEn);
     881              : 
     882              : void SyncCKEInstr(CcuInstr *instr, uint16_t rmtCKEId, uint16_t locCKEId, uint16_t locCKEMask, uint16_t channelId,
     883              :                   uint16_t setCKEId, uint16_t setCKEMask, uint16_t waitCKEId, uint16_t waitCKEMask, uint16_t clearType);
     884              : void SyncGSAInstr(CcuInstr *instr, uint16_t rmtGSAId, uint16_t locGSAId, uint16_t channelId, uint16_t setRmtCKEId,
     885              :                   uint16_t setRmtCKEMask, uint16_t setCKEId, uint16_t setCKEMask, uint16_t waitCKEId,
     886              :                   uint16_t waitCKEMask, uint16_t clearType);
     887              : void SyncXnInstr(CcuInstr *instr, uint16_t rmtXnId, uint16_t locXnId, uint16_t channelId, uint16_t setRmtCKEId,
     888              :                  uint16_t setRmtCKEMask, uint16_t setCKEId, uint16_t setCKEMask, uint16_t waitCKEId,
     889              :                  uint16_t waitCKEMask, uint16_t clearType);
     890              : 
     891              : void AddInstr(CcuInstr *instr, uint16_t *msId, uint16_t count, uint16_t castEn, uint16_t dataType, uint16_t setCKEId,
     892              :               uint16_t setCKEMask, uint16_t waitCKEId, uint16_t waitCKEMask, uint16_t clearType, uint16_t XnIdLength);
     893              : void MaxInstr(CcuInstr *instr, uint16_t *msId, uint16_t count, uint16_t dataType, uint16_t setCKEId,
     894              :               uint16_t setCKEMask, uint16_t waitCKEId, uint16_t waitCKEMask, uint16_t clearType, uint16_t XnIdLength);
     895              : void MinInstr(CcuInstr *instr, uint16_t *msId, uint16_t count, uint16_t dataType, uint16_t setCKEId,
     896              :               uint16_t setCKEMask, uint16_t waitCKEId, uint16_t waitCKEMask, uint16_t clearType, uint16_t XnIdLength);
     897              : 
     898              : namespace CcuV2 {
     899              : void Nop(CcuInstr *instr);
     900              : 
     901              : void LoadSqeArgsToX(CcuInstr *instr, uint16_t xnId, uint16_t sqeArgsId, uint16_t setCKEId = 0, uint16_t setCKEMask = 0);
     902              : void LoadImdToXn(CcuInstr *instr, uint16_t xnId, uint64_t immediate, uint16_t setCKEId = 0, uint16_t setCKEMask = 0);
     903              : void LoadXFromMem(CcuInstr *instr, uint16_t dst, uint16_t src, uint16_t srcToken, uint16_t len,
     904              :                   const CacheConfig &cacheConfig, uint16_t setCKEId, uint16_t setCKEMask);
     905              : void StoreXToMem(CcuInstr *instr, uint16_t dst, uint16_t dstToken, uint16_t src, uint16_t len,
     906              :                  const CacheConfig &cacheConfig, uint16_t setCKEId, uint16_t setCKEMask);
     907              : 
     908              : void Assign(CcuInstr *instr, uint16_t result, uint16_t operand, uint16_t setCKEId = 0, uint16_t setCKEMask = 0);
     909              : 
     910              : void Add(CcuInstr *instr, uint16_t result, uint16_t operand1, uint16_t operand2, uint16_t setCKEId = 0, uint16_t setCKEMask = 0);
     911              : void AddI(CcuInstr *instr, uint16_t result, uint16_t operand, uint16_t imm, uint16_t setCKEId = 0, uint16_t setCKEMask = 0);
     912              : void Mul(CcuInstr *instr, uint16_t result, uint16_t operand1, uint16_t operand2, uint16_t setCKEId = 0, uint16_t setCKEMask = 0);
     913              : void MulI(CcuInstr *instr, uint16_t result, uint16_t operand, uint16_t imm, uint16_t setCKEId = 0, uint16_t setCKEMask = 0);
     914              : 
     915              : void Loop(CcuInstr *instr, uint16_t startInstrId, uint16_t endInstrId, uint16_t iterNum, uint16_t offset,
     916              :           uint16_t contextId);
     917              : void LoopGroup(CcuInstr *instr, uint16_t startLoopInstrId, uint16_t loopGroupConfig, uint16_t resOffset,
     918              :                uint16_t xnOffset);
     919              : void Jump(CcuInstr *instr, uint16_t relTarInstrXnId, uint16_t conditionXnId, uint16_t expectedXnId,
     920              :           uint16_t conditionType);
     921              : 
     922              : void SetCKE(CcuInstr *instr, uint16_t setCKEId, uint16_t setCKEMask, uint16_t waitCKEId, uint16_t waitCKEMask,
     923              :             uint16_t clearType);
     924              : void ClearCKE(CcuInstr *instr, uint16_t clearCKEId, uint16_t clearMask, uint16_t waitCKEId, uint16_t waitCKEMask,
     925              :               uint16_t clearType);
     926              : 
     927              : void TransLocMemToLocMS(CcuInstr *instr, uint16_t ms, uint16_t src, uint16_t srcToken, uint16_t len, uint16_t offset,
     928              :                         uint16_t setCKEId, uint16_t setCKEMask, const CacheConfig &cacheConfig);
     929              : void TransLocMSToLocMem(CcuInstr *instr, uint16_t dst, uint16_t dstToken, uint16_t ms, uint16_t len, uint16_t offset,
     930              :                         uint16_t setCKEId, uint16_t setCKEMask, const CacheConfig &cacheConfig);
     931              : void TransLocMemToLocMem(CcuInstr *instr, uint16_t dst, uint16_t dstToken, uint16_t src, uint16_t srcToken,
     932              :                          uint16_t len, uint16_t usedMSId, uint16_t setCKEId, uint16_t setCKEMask,
     933              :                          const CacheConfig &srcCacheConfig, const CacheConfig &dstcacheConfig);
     934              : void TransMem(CcuInstr *instr, uint16_t dst, uint16_t dstToken, uint16_t src, uint16_t srcToken, uint16_t len,
     935              :               uint16_t channel, const TransMemNotifyInfo &notify, const TransMemReduceInfo &reduce,
     936              :               const TransMemConfig &config, uint16_t setCKEId, uint16_t setCKEMask);
     937              : void SyncWtX(CcuInstr *instr, uint16_t dst, uint16_t dstToken, uint16_t xn, uint16_t channelId, uint16_t setCKEId,
     938              :              uint16_t setCKEMask);
     939              : void SyncWtX(CcuInstr *instr, const TransMemNotifyInfo &notify, uint16_t channelId, uint16_t setCKEId,
     940              :              uint16_t setCKEMask);
     941              : void SyncWtX(CcuInstr *instr, uint16_t dst, uint16_t dstToken, uint16_t xn, uint16_t channelId,
     942              :              const TransMemNotifyInfo &notify, uint16_t setCKEId, uint16_t setCKEMask);
     943              : void SyncAtX(CcuInstr *instr, uint16_t dst, uint16_t dstToken, uint16_t mask, uint16_t channelId, uint16_t setCKEId,
     944              :              uint16_t setCKEMask);
     945              : void ReduceAdd(CcuInstr *instr, uint16_t *ms, uint16_t count, uint16_t castEn, uint16_t dataType, uint16_t setCKEId,
     946              :                uint16_t setCKEMask);
     947              : void ReduceMax(CcuInstr *instr, uint16_t *ms, uint16_t count, uint16_t dataType, uint16_t setCKEId,
     948              :                uint16_t setCKEMask);
     949              : void ReduceMin(CcuInstr *instr, uint16_t *ms, uint16_t count, uint16_t dataType, uint16_t setCKEId,
     950              :                uint16_t setCKEMask);
     951              : }; // namespace CcuV2
     952              : 
     953              : }; // namespace CcuRep
     954              : }; // namespace Hccl
     955              : 
     956              : #endif // HCCL_CCU_MICROCODE_H
        

Generated by: LCOV version 2.0-1