
1. modified the function of void handshake_master_with_slave(uint32_t u32_core_mask) add the input parameter. 2. phy should support the function of uint32_t get_core_mask_by_phy(void). 3. Test: 3.1 spu_case0_arm_case0_cpri: Pass 3.2 spu_case14_arm_case20_cpri:Pass 3.3 spu_case20_arm_case20_cpri:Pass 3.4 spu_case21_arm_case21_cpri:Pass 3.5 spu_case34_arm_case5: Pass 3.6 spu_case44_arm_case5: Pass
56 lines
1.5 KiB
C
56 lines
1.5 KiB
C
// +FHDR------------------------------------------------------------
|
|
// Copyright (c) 2022 SmartLogic.
|
|
// ALL RIGHTS RESERVED
|
|
// -----------------------------------------------------------------
|
|
// Filename : ucp_handshake.h
|
|
// Author : xianfeng.du
|
|
// Created On : 2022-07-22
|
|
// Last Modified :
|
|
// -----------------------------------------------------------------
|
|
// Description:
|
|
//
|
|
//
|
|
// -FHDR------------------------------------------------------------
|
|
|
|
#ifndef __UCP_HANDSHAKE_H__
|
|
#define __UCP_HANDSHAKE_H__
|
|
|
|
#include "typedef.h"
|
|
|
|
#define MAX_NUM_APE 8
|
|
#define MAX_NUM_SPU 12
|
|
#define MAX_NUM_CORE (MAX_NUM_SPU+1)
|
|
#define NPU_CORE_ID MAX_NUM_SPU
|
|
#define PET_RFM_SPU0_CORE_ID 8
|
|
#define PET_RFM_SPU1_CORE_ID 9
|
|
#define ECS_RFM_SPU0_CORE_ID 10
|
|
#define ECS_RFM_SPU1_CORE_ID 11
|
|
|
|
#define HANDSHKAE_REQ_VALUE 0x5A5A5A5A
|
|
#define HANDSHKAE_RESP_VALUE 0xA5A5A5A5
|
|
|
|
#ifndef PCIE_BACKHAUL
|
|
#define HANDSHKAE_MASK 0x00000e00//excluded APE cores
|
|
#else
|
|
#define HANDSHKAE_MASK 0x00000f00//excluded APE cores
|
|
#endif
|
|
|
|
typedef struct tUcpHandshake{
|
|
uint32_t request[MAX_NUM_CORE];
|
|
uint32_t response[MAX_NUM_CORE];
|
|
uint32_t heartbeat[MAX_NUM_CORE];
|
|
} UcpHandshake_t;
|
|
|
|
UcpHandshake_t* get_handshake_info(void);
|
|
//void handshake_with_host(void);
|
|
void handshake_master_with_slave(uint32_t u32_core_mask);
|
|
void handshake_slave_with_master(void);
|
|
int32_t get_host_core_id(void);
|
|
void handshake_request_from_host(int32_t core_id);
|
|
void handshake_response_to_host(int32_t core_id);
|
|
|
|
#endif
|
|
|
|
|
|
|