merge branch dev_ck_v2.1_bug#1038# to dev_ck_v2.1

1. update libhwque.a and hwque.h
2. pet_rfm1/ecs_rfm0/ecs_rfm1 main.c add call smart_hq_debug_init()
3. spu(case14)+arm(case3): pass
4. spu(case21)+arm(case21):pass
5. spu(case34)+arm(case0): pass
6. spu(case44)+arm(case0): pass
This commit is contained in:
lishuang.xie 2023-09-06 15:48:54 +08:00
parent cbec92356a
commit bbf0b958cf
5 changed files with 274 additions and 270 deletions

View File

@ -18,12 +18,22 @@
#include "log_client.h" #include "log_client.h"
#include "ucp_utility.h" #include "ucp_utility.h"
#include "spu_shell.h" #include "spu_shell.h"
#include "hwque.h"
int32_t main(int32_t argc, char* argv[]) int32_t main(int32_t argc, char* argv[])
{ {
UCP_PRINT_EMPTY("Hello world from ECS RFM SPU0,coreId[0x%x]", get_core_id()); UCP_PRINT_EMPTY("Hello world from ECS RFM SPU0,coreId[0x%x]", get_core_id());
debug_write(DBG_DDR_COMMON_IDX(get_core_id(), 0), PLATFORM_BUILD_DATA); debug_write(DBG_DDR_COMMON_IDX(get_core_id(), 0), PLATFORM_BUILD_DATA);
/* hw_debug_init */
int32_t core_id = get_core_id();
int ret = 0;
ret = smart_hq_debug_init((DBG_DDR_HW_ADDR_BASE+DBG_DDR_HW_LEN*core_id), DBG_DDR_HW_LEN); // 推荐384实际512
if (0 != ret)
{
debug_write(DBG_DDR_ERR_IDX(core_id, 46), ret);
}
spu_log_client_init(); spu_log_client_init();
ecs_rfm_spu0_drv_init(); ecs_rfm_spu0_drv_init();

View File

@ -27,14 +27,12 @@
#include "ecs_rfm_spu1_oam.h" #include "ecs_rfm_spu1_oam.h"
#include "phy_para.h" #include "phy_para.h"
#include "hw_cpri.h" #include "hw_cpri.h"
#include "hwque.h"
#ifdef TEST_ENABLE #ifdef TEST_ENABLE
#include "fh_test.h" #include "fh_test.h"
#endif #endif
extern void ecs_rfm1_build_cell(uint32_t scsId, uint32_t flag);
extern void ecs_rfm1_delete_cell(uint32_t scsId, uint32_t nflag);
#ifdef DDR_MONITOR #ifdef DDR_MONITOR
void spu_ddr_monitor() void spu_ddr_monitor()
{ {
@ -61,6 +59,15 @@ int32_t main(int32_t argc, char* argv[])
UCP_PRINT_EMPTY("Hello world from ECS RFM SPU1,coreId[0x%x]", get_core_id()); UCP_PRINT_EMPTY("Hello world from ECS RFM SPU1,coreId[0x%x]", get_core_id());
debug_write(DBG_DDR_COMMON_IDX(get_core_id(), 0), PLATFORM_BUILD_DATA); debug_write(DBG_DDR_COMMON_IDX(get_core_id(), 0), PLATFORM_BUILD_DATA);
/* hw_debug_init */
int32_t core_id = get_core_id();
int ret = 0;
ret = smart_hq_debug_init((DBG_DDR_HW_ADDR_BASE+DBG_DDR_HW_LEN*core_id), DBG_DDR_HW_LEN); // 推荐384实际512
if (0 != ret)
{
debug_write(DBG_DDR_ERR_IDX(core_id, 46), ret);
}
spu_log_client_init(); spu_log_client_init();
spu_log_server_init(); spu_log_server_init();

View File

@ -19,12 +19,22 @@
#include "ucp_utility.h" #include "ucp_utility.h"
#include "spu_shell.h" #include "spu_shell.h"
#include "pet_rfm_spu1_oam.h" #include "pet_rfm_spu1_oam.h"
#include "hwque.h"
int32_t main(int32_t argc, char* argv[]) int32_t main(int32_t argc, char* argv[])
{ {
UCP_PRINT_EMPTY("Hello world from PET RFM SPU1,coreId[0x%x]", get_core_id()); UCP_PRINT_EMPTY("Hello world from PET RFM SPU1,coreId[0x%x]", get_core_id());
debug_write(DBG_DDR_COMMON_IDX(get_core_id(), 0), PLATFORM_BUILD_DATA); debug_write(DBG_DDR_COMMON_IDX(get_core_id(), 0), PLATFORM_BUILD_DATA);
/* hw_debug_init */
int32_t core_id = get_core_id();
int ret = 0;
ret = smart_hq_debug_init((DBG_DDR_HW_ADDR_BASE+DBG_DDR_HW_LEN*core_id), DBG_DDR_HW_LEN); // 推荐384实际512
if (0 != ret)
{
debug_write(DBG_DDR_ERR_IDX(core_id, 46), ret);
}
spu_log_client_init(); spu_log_client_init();
pet_rfm_spu1_drv_init(); pet_rfm_spu1_drv_init();

Binary file not shown.

View File

@ -34,7 +34,7 @@ typedef unsigned long long uint64_t;
#define QUE_NR 16 #define QUE_NR 16
#define B_128_16BLCOKS 0 #define B_128_16BLCOKS 8
#define B_256_32BLOCKS 32 #define B_256_32BLOCKS 32
#define BLOCKS_64 64 #define BLOCKS_64 64
@ -84,156 +84,134 @@ typedef struct{
unsigned int in_failed_cnt; unsigned int in_failed_cnt;
unsigned int out_success_cnt; unsigned int out_success_cnt;
unsigned int in_success_cnt; unsigned int in_success_cnt;
unsigned int in_que_depth_val;
unsigned int out_que_depth_val;
}hwq_db_info ; }hwq_db_info ;
typedef struct{ typedef struct{
hwq_db_info per_hwq[QUE_MAX_NR]; hwq_db_info per_hwq[QUE_MAX_NR];
}hwq_debug_t; }hwq_debug_t;
/* /*
彿°å<EFBFBD><EFBFBD>称:smart_hq_init smart_hq_init
è¾å¥å<EFBFBD>æ°: cpuid : cpuid
è¿åžç±»åž: int : int
è¿åžå¼ï¼š å°<EFBFBD>于0 表示失败 0
è¿åžå?: 0 表示æˆ<EFBFBD>功 0
彿°åŠŸèƒ½ï¼? 硬ä»é˜Ÿåˆåˆ<EFBFBD>å§åŒ?
*/ */
extern int smart_hq_init(int cpuid); extern int smart_hq_init(int cpuid);
/* /*
彿°å<EFBFBD><EFBFBD>称:smart_get_hq_vector smart_get_hq_vector
è¾å¥å<EFBFBD>æ°: cpuid : cpuid
è¾å¥å<EFBFBD>æ°ï¼šqueid queid
è¿åžç±»åž: int : int
è¿åžå¼ï¼šå°<EFBFBD>于ç­äºŽ0 表示失败 0
彿°åŠŸèƒ½ï¼? 获å<EFBFBD>å½å<EFBFBD>硬ä»é˜Ÿåˆä¸­æ­å<EFBFBD>?
*/ */
extern int smart_get_hq_vector(int cpuid,int queid); extern int smart_get_hq_vector(int cpuid,int queid);
/*************** /********************
彿°å<EFBFBD><EFBFBD>称:smart_in_que
彿°å<EFBFBD>æ°ï¼šqueid 队åˆç¼å<EFBFBD>· smart_in_que
彿°å<EFBFBD>æ°ï¼šval å¥é˜Ÿå¼ queid
彿°åŠŸèƒ½ï¼šç¡¬ä»é˜Ÿåˆå¥é˜Ÿ val
彿°ä½¿ç¨æ³¨æ<EFBFBD>ç¹1: å½å<EFBFBD>彿°ä¸<EFBFBD>能在中æ­å¤ç<EFBFBD>彿°ä¸­è°ƒç¨
彿°ä½¿ç¨æ³¨æ<EFBFBD>ç¹2: 多核çŸäº§èå¥é˜Ÿæéœè¦<EFBFBD>加é<EFBFBD> 使1
******************/ ******************/
extern int smart_in_que(int queid,uint32_t val); extern int smart_in_que(int queid,uint32_t val);
/***************
彿°å<EFBFBD><EFBFBD>称:smart_intr_in_que
彿°å<EFBFBD>æ°ï¼šqueid 队åˆç¼å<EFBFBD>·
彿°å<EFBFBD>æ°ï¼šval å¥é˜Ÿå¼
彿°åŠŸèƒ½ï¼šç¡¬ä»é˜Ÿåˆå¥é˜Ÿ
彿°ä½¿ç¨æ³¨æ<EFBFBD>ç¹1: å½å<EFBFBD>彿°å<EFBFBD>ªèƒ½åœ¨ä¸­æ­å¤ç<EFBFBD>彿°ä¸­è°ƒç¨
彿°ä½¿ç¨æ³¨æ<EFBFBD>ç¹2: 多核çŸäº§èå¥é˜Ÿæéœè¦<EFBFBD>加é<EFBFBD>
******************/
extern int smart_intr_in_que(int queid,uint32_t val);
/***************
彿°å<EFBFBD><EFBFBD>称:smart_intr_out_que
彿°å<EFBFBD>æ°ï¼šqueid 队åˆç¼å<EFBFBD>·
彿°å<EFBFBD>æ°ï¼šval å¥é˜Ÿå¼
彿°åŠŸèƒ½ï¼šç¡¬ä»é˜Ÿåˆå¥é˜Ÿ
彿°ä½¿ç¨æ³¨æ<EFBFBD>ç¹1: å½å<EFBFBD>彿°å<EFBFBD>ªèƒ½åœ¨ä¸­æ­å¤ç<EFBFBD>彿°ä¸­è°ƒç¨
******************/
extern int smart_intr_out_que(int queid,uint32_t *val);
/* /*
彿°å<EFBFBD><EFBFBD>称:smart_que_is_full smart_que_is_full
è¾å¥å<EFBFBD>æ°: queid : queid
è¿åžç±»åžï¼šint int
è¿åžå¼ï¼š 1 表示 true 1 true
è¿åžå?: 0 表示 false : 0 false
说明:ä¸ä¸?çˆæœ¬è¿åžå¼ä¼šæ´æ¹enum ï¼?
enum hwque_status smart_que_is_full(int queid);
è¿åžå¼å<EFBFBD>ªèƒ½é?æ© hwque_false åŒhwque_true
*/ */
extern int smart_que_is_full(int queid); extern int smart_que_is_full(int queid);
/********************* /*********************
彿°å<EFBFBD><EFBFBD>称:smart_out_que smart_out_que
彿°å<EFBFBD>æ°ï¼šqueid 队åˆç¼å<EFBFBD>· queid
è¾åºå<EFBFBD>æ°ï¼šidx 获å<EFBFBD>å½å<EFBFBD>队åˆçšç´¢å¼å¼ idx
彿°åŠŸèƒ½ï¼šé˜Ÿåˆåºé˜ŸèŽ·å<EFBFBD>å½å<EFBFBD>队åˆçšç´¢å¼å¼
彿°ä½¿ç¨æ³¨æ<EFBFBD>ç¹1:å½å<EFBFBD>彿°ä¸<EFBFBD>能在中æ­å¤ç<EFBFBD>彿°ä¸­è°ƒç¨
*********************/ *********************/
extern int smart_out_que(int queid,uint32_t *val); extern int smart_out_que(int queid,uint32_t *val);
/* /*
彿°å<EFBFBD><EFBFBD>称:smart_que_is_empty smart_que_is_empty
è¾å¥å<EFBFBD>æ°: queid : queid
è¿åžç±»åž: int : int
è¿åžå¼ï¼š 1 表示true 1 true
è¿åžå¼ï¼š0 表示false 0 false
*/ */
extern int smart_que_is_empty(int queid); extern int smart_que_is_empty(int queid);
/* /*
彿°å<EFBFBD><EFBFBD>称:smart_get_que_info smart_get_que_info
è¾å¥å<EFBFBD>æ°: queid : queid
è¾åºå<EFBFBD>æ° *dep *dep
è¾åºå<EFBFBD>æ°: *width : *width
è¾åºå<EFBFBD>æ°: *used : *used
è¾åºå<EFBFBD>æ°ï¼?*cpuid : *cpuid
è¿åžç±»åž: int : int
è¿åžå¼ï¼š é<EFBFBD>?0 表示失败 :0 0
è¿åžå?: 0 表示æˆ<EFBFBD>功
*/ */
extern int smart_get_que_info(int queid,int *dep,int *width,int *used,int *cpuid); extern int smart_get_que_info(int queid,int *dep,int *width,int *used,int *cpuid);
/* /*
彿°å<EFBFBD><EFBFBD>称:smart_enable_q_nempty // 函数名称smart_enable_q_nempty
è¾å¥å<EFBFBD>æ°: queid smart_hq_nempty_int_enable
è¿åžå¼ï¼š æ? : queid
int
:使
*/ */
extern void smart_enable_q_nempty(int queid); extern void smart_enable_q_nempty(int queid);
//extern void smart_hq_nempty_int_enable(int queid);
/********************************
彿°å<EFBFBD><EFBFBD>称:smart_disable_q_nempty
è¾å¥å<EFBFBD>æ°: queid
è¿åžå¼ï¼š æ?
彿°åŠŸèƒ½ï¼šä½¿èƒ½é<EFBFBD>žç©ºä¸­æ?
************************************/
extern void smart_disable_q_nempty(int queid);
/* /*
彿°å<EFBFBD><EFBFBD>称:smart_que_bind // 函数名称smart_disable_q_nempty
è¾å¥å<EFBFBD>æ°: queid :smart_hq_nempty_int_disable
è¾å¥å<EFBFBD>æ°ï¼cpuid : queid
è¿åžç±»åžï¼šint int
è¿åžå? ï¼? é<EFBFBD>?0 表示失败 :使
è¿åžå¼ï¼š 0 表示æˆ<EFBFBD>功
彿°åŠŸèƒ½ï¼šåŽ»ä½¿èƒ½é<EFBFBD>žç©ºä¸­æ­ */
extern void smart_disable_q_nempty(int queid);
//extern void smart_hq_nempty_int_disable(int queid);
/*
smart_que_bind
: queid
cpuid
int
: 0 0
使
*/ */
@ -241,75 +219,74 @@ extern int smart_que_bind(int cpuid,int queid);
/* /*
彿°å<EFBFBD><EFBFBD>称:smart_hq_debug_init smart_hq_debug_init
è¾å¥å<EFBFBD>æ°: debug_base_addr : debug_base_addr
è¾å¥å<EFBFBD>æ°ï¼len_bytes len_bytes
è¿åžç±»åžï¼šint int
è¿åžå? ï¼? é<EFBFBD>?0 表示失败 0
è¿åžå¼ï¼š0 表示æˆ<EFBFBD>功
彿°åŠŸèƒ½ï¼šè°ƒè¯åˆ<EFBFBD>å§åŒæŽ¥å<EFBFBD>£
注æ<EFBFBD>ï¼? :
éšè¿åœ°å<EFBFBD>与,é¿åº¦æŒå®šç¸åºçšbuf æ°æ<EFBFBD>®ç©ºé´ï¼Œå­˜æ¾ç¸åºçšä¸­æ­è°ƒè¯ä¿¡æ<EFBFBD>¯ã? buf
è¿äºè°ƒè¯ä¿¡æ<EFBFBD>¯å·²ç»<EFBFBD>æ ¼å¼<EFBFBD>åŒï¼Œåœ°å<EFBFBD>ç±ç¨æˆ·æŒå®šï¼Œlen_bytes ä¸<EFBFBD>能å°<EFBFBD>于sizeof(hwq_debug_t) len_bytes sizeof(hwq_debug_t)
æ°æ<EFBFBD>®æ ¼å¼<EFBFBD>åŒå容是 hwq_debug_t : hwq_debug_t
æ°æ<EFBFBD>®æ ¼å¼<EFBFBD> example: example:
typedef struct{ typedef struct{
unsigned int out_failed_cnt; unsigned int out_failed_cnt;
unsigned int in_failed_cnt; unsigned int in_failed_cnt;
unsigned int out_success_cnt; unsigned int out_success_cnt;
unsigned int in_success_cnt; unsigned int in_success_cnt;
unsigned int cur_que_depth; unsigned int cur_que_depth;
unsigned int bind_cpuid; unsigned int bind_cpuid;
}hwq_db_info ; }hwq_db_info ;
typedef struct{ typedef struct{
hwq_db_info per_hwq[HW_QUE_NR]; hwq_db_info per_hwq[HW_QUE_NR];
}hwq_debug_t; }hwq_debug_t;
*/ */
extern int smart_hq_debug_init( uint32_t debug_base_addr, uint32_t len_bytes); extern int smart_hq_debug_init( uint32_t debug_base_addr, uint32_t len_bytes);
/* /*
彿°å<EFBFBD><EFBFBD>称:smart_get_inque_ok_cnt smart_get_inque_ok_cnt
è¾å¥å<EFBFBD>æ°: queid : queid
è¿åžç±»åžï¼šint int
è¿åžå? ï¼? å°<EFBFBD>于ç­äºŽ0表示失败 : 0
彿°åŠŸèƒ½ï¼šèŽ·å<EFBFBD>å½å<EFBFBD>å¥é˜Ÿæˆ<EFBFBD>功计æ?
*/ */
extern int smart_get_inque_ok_cnt(int queid); extern int smart_get_inque_ok_cnt(int queid);
/* /*
彿°å<EFBFBD><EFBFBD>称:smart_get_inque_failed_cnt smart_get_inque_failed_cnt
è¾å¥å<EFBFBD>æ°: queid : queid
è¿åžç±»åžï¼šint int
è¿åžå? ï¼? å°<EFBFBD>于ç­äºŽ0表示失败 : 0
彿°åŠŸèƒ½ï¼šèŽ·å<EFBFBD>å½å<EFBFBD>å¥é˜Ÿå¤±è´¥è®¡æ?
*/ */
extern int smart_get_inque_failed_cnt(int queid); extern int smart_get_inque_failed_cnt(int queid);
/* /*
彿°å<EFBFBD><EFBFBD>称:smart_get_outque_ok_cnt smart_get_outque_ok_cnt
è¾å¥å<EFBFBD>æ°: queid : queid
è¿åžç±»åžï¼šint int
è¿åžå? ï¼? å°<EFBFBD>于ç­äºŽ0表示失败 0
彿°åŠŸèƒ½ï¼šèŽ·å<EFBFBD>å½å<EFBFBD>åºé˜Ÿæˆ<EFBFBD>功计æ?
*/ */
extern int smart_get_outque_ok_cnt(int queid); extern int smart_get_outque_ok_cnt(int queid);
/* /*
彿°å<EFBFBD><EFBFBD>称:smart_get_outque_failed_cnt smart_get_outque_failed_cnt
è¾å¥å<EFBFBD>æ°: queid : queid
è¿åžç±»åžï¼šint int
è¿åžå? ï¼? å°<EFBFBD>于ç­äºŽ0表示失败 : 00
彿°åŠŸèƒ½ï¼šèŽ·å<EFBFBD>å½å<EFBFBD>åºé˜Ÿå¤±è´¥è®¡æ?
*/ */
extern int smart_get_outque_failed_cnt(int queid); extern int smart_get_outque_failed_cnt(int queid);