Line data Source code
1 : /*
2 : * Copyright (c) Huawei Technologies Co., Ltd. 2025-2025. All rights reserved.
3 : * Description: ccu representation base header file
4 : * Create: 2025-02-18
5 : */
6 :
7 : #ifndef HCOMM_CCU_REPRESENTATION_BUFWRITE_H
8 : #define HCOMM_CCU_REPRESENTATION_BUFWRITE_H
9 :
10 : #include "ccu_rep_base_v1.h"
11 : #include "ccu_datatype_v1.h"
12 :
13 : namespace hcomm {
14 : namespace CcuRep {
15 :
16 : class CcuRepBufWrite : public CcuRepBase {
17 : public:
18 : CcuRepBufWrite(CcuInsGeneratorBase* insGenPtr, const ChannelHandle channel, CcuBuf src, RemoteAddr dst, Variable len, CompletedEvent sem,
19 : uint16_t mask);
20 : bool Translate(CcuKernel* ccuKernel, CcuInstr *&instr, uint16_t &instrId, const TransDep &dep) override;
21 : std::string Describe() override;
22 :
23 1 : uint16_t GetSrcId() { return src.Id(); }
24 1 : uint16_t GetDstAddrId() { return dst.addr.Id(); }
25 1 : uint16_t GetDstTokenId() { return dst.token.Id(); }
26 1 : uint16_t GetLenId() { return len.Id(); }
27 1 : uint16_t GetSemId() { return sem.Id(); }
28 : uint32_t GetChannelId() { return channelId; }
29 1 : CcuBuf GetSrc() { return src; }
30 2 : RemoteAddr GetDst() { return dst; }
31 1 : Variable GetLen() { return len; }
32 1 : CompletedEvent GetSem() { return sem; }
33 3 : uint16_t GetMask() { return mask; }
34 2 : ChannelHandle GetChannel() { return channel; }
35 :
36 : private:
37 : CcuInsGeneratorBase* insGenPtr{nullptr};
38 : ChannelHandle channel;
39 : uint32_t channelId{0};
40 :
41 : CcuBuf src;
42 : RemoteAddr dst;
43 : Variable len;
44 :
45 : CompletedEvent sem;
46 : uint16_t mask{0};
47 : };
48 :
49 : }; // namespace CcuRep
50 : }; // namespace hcomm
51 : #endif // HCOMM_CCU_REPRESENTATION_BUFWRITE_H
|