53 lines
1.5 KiB
C
Raw Normal View History

// +FHDR------------------------------------------------------------
// Copyright (c) 2022 SmartLogic.
// ALL RIGHTS RESERVED
// -----------------------------------------------------------------
// Filename : log_client.h
// Author : xianfeng.du
// Created On : 2023-02-06
// Last Modified :
// -----------------------------------------------------------------
// Description:
//
//
// -FHDR------------------------------------------------------------
#ifndef __SPU_LOG_CLIENT_H__
2023-07-13 11:27:03 +08:00
#define __SPU_LOG_CLIENT_H__
#include "typedef.h"
#include "ucp_handshake.h"
#define SPU_LOG_CLIENT_BUF_BASE (0xB2E00000) /* 一共15MB当前只用6+2=8MB */
#define SPU_LOG_CLIENT_BUF_SIZE (512) /* Log软件队列一个队列的消息长512Bytes */
#define SPU_LOG_CLIENT_BUF_DEPTH (128) /* Log软件队列每个APE的深度为128个消息*/
typedef struct tSpuLogClientInfo {
uint32_t alloc;
uint32_t bufBase;
uint32_t bufSize;
uint16_t ringSize;
uint16_t ringMask;
} SpuLogClientInfo_t;
2023-07-13 11:27:03 +08:00
typedef struct tSpuLogCommonInfo {
uint32_t alloc[MAX_NUM_SPU];
2023-07-13 11:27:03 +08:00
} SpuLogCommonInfo_t;
typedef union tSpuLogMsgInfo {
uint32_t value;
struct {
uint32_t cell_id : 4;
uint32_t core_id : 4;
uint32_t buf_idx : 8;
uint32_t buf_size : 16;
//uint32_t rsv : 0;
};
2023-07-13 11:27:03 +08:00
} SpuLogMsgInfo_t;
void spu_log_client_init(void);
uint8_t* spu_log_client_mem_alloc(uint16_t* idx);
#endif /* __SPU_LOG_CLIENT_H__ */