LCOV - code coverage report
Current view: top level - base_comm/resources/ccu/ccu_representation/reps/data - ccu_rep_buflocread.cc (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 13 13
Test Date: 2026-07-28 12:11:00 Functions: 100.0 % 3 3

            Line data    Source code
       1              : /*
       2              :  * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
       3              :  * Description: ccu representation implementation file
       4              :  * Author: sunzhepeng
       5              :  * Create: 2024-06-17
       6              :  */
       7              : 
       8              : #include "ccu_rep_v1.h"
       9              : #include "ccu_ins_generater_v1.h"
      10              : #include "string_util.h"
      11              : #include "ccu_ins_generater_base.h"
      12              : #include "ccu_kernel.h"
      13              : 
      14              : namespace hcomm {
      15              : namespace CcuRep {
      16              : 
      17            9 : CcuRepBufLocRead::CcuRepBufLocRead(CcuInsGeneraterBase* insGenPtr, LocalAddr src, CcuBuf dst, Variable len, CompletedEvent sem, uint16_t mask)
      18            9 :     : insGenPtr(insGenPtr), src(src), dst(dst), len(len), sem(sem), mask(mask)
      19              : {
      20            9 :     type       = CcuRepType::BUF_LOC_READ;
      21            9 :     instrCount = insGenPtr->GetInstrCount(type);
      22            9 : }
      23              : 
      24            7 : bool CcuRepBufLocRead::Translate(CcuKernel* ccuKernel, CcuInstr *&instr, uint16_t &instrId, const TransDep &dep)
      25              : {
      26            7 :     this->instrId = instrId;
      27            7 :     translated    = true;
      28              : 
      29            7 :     insGenPtr->CcuRepBufLocReadTranslate(ccuKernel, instr, this, dep);
      30            7 :     instrId += instrCount;
      31              : 
      32            7 :     return translated;
      33              : }
      34              : 
      35            7 : std::string CcuRepBufLocRead::Describe()
      36              : {
      37              :     return Hccl::StringFormat("Read Loc Mem[%u] To CcuBuf[%u], len[%u], sem[%u], mask[%04x]",
      38            7 :     src.addr.Id(), dst.Id(), len.Id(), sem.Id(), mask);
      39              : }
      40              : 
      41              : }; // namespace CcuRep
      42              : }; // namespace hcomm
        

Generated by: LCOV version 2.0-1