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,6 +84,8 @@ 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 ;
@ -99,8 +101,8 @@ typedef struct{
: cpuid : cpuid
: int : int
0 0
è¿åžå?: 0 表示æˆ<EFBFBD>功 0
彿°åŠŸèƒ½ï¼? 硬ä»é˜Ÿåˆåˆ<EFBFBD>å§åŒ?
*/ */
extern int smart_hq_init(int cpuid); extern int smart_hq_init(int cpuid);
@ -111,60 +113,33 @@ extern int smart_hq_init(int cpuid);
queid queid
: int : int
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);
/*************** /********************
smart_in_que smart_in_que
queid queid
val val
彿°ä½¿ç¨æ³¨æ<EFBFBD>ç¹1: å½å<EFBFBD>彿°ä¸<EFBFBD>能在中æ­å¤ç<EFBFBD>彿°ä¸­è°ƒç¨ 使1
彿°ä½¿ç¨æ³¨æ<EFBFBD>ç¹2: 多核çŸäº§èå¥é˜Ÿæéœè¦<EFBFBD>加é<EFBFBD>
******************/ ******************/
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);
/* /*
smart_que_is_full smart_que_is_full
: 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);
@ -174,12 +149,9 @@ extern int smart_que_is_full(int queid);
queid queid
idx idx
彿°ä½¿ç¨æ³¨æ<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);
/* /*
@ -198,41 +170,47 @@ extern int smart_que_is_empty(int queid);
*dep *dep
: *width : *width
: *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
smart_hq_nempty_int_enable
: queid : 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 /*
// 函数名称smart_disable_q_nempty
:smart_hq_nempty_int_disable
: queid : queid
è¿åžå¼ï¼š æ? int
彿°åŠŸèƒ½ï¼šä½¿èƒ½é<EFBFBD>žç©ºä¸­æ? :使
************************************/ */
extern void smart_disable_q_nempty(int queid); extern void smart_disable_q_nempty(int queid);
//extern void smart_hq_nempty_int_disable(int queid);
/* /*
smart_que_bind smart_que_bind
: queid : queid
cpuid cpuid
int int
è¿åžå? ï¼? é<EFBFBD>?0 表示失败 : 0 0
è¿åžå¼ï¼š 0 表示æˆ<EFBFBD>功
使 使
*/ */
@ -245,14 +223,13 @@ extern int smart_que_bind(int cpuid,int queid);
: debug_base_addr : debug_base_addr
len_bytes len_bytes
int int
è¿åžå? ï¼? é<EFBFBD>?0 表示失败
0 0
注æ<EFBFBD>ï¼? :
éšè¿åœ°å<EFBFBD>与,é¿åº¦æŒå®šç¸åºçšbuf æ°æ<EFBFBD>®ç©ºé´ï¼Œå­˜æ¾ç¸åºçšä¸­æ­è°ƒè¯ä¿¡æ<EFBFBD>¯ã? buf
len_bytes sizeof(hwq_debug_t) len_bytes sizeof(hwq_debug_t)
æ°æ<EFBFBD>®æ ¼å¼<EFBFBD>åŒå容是 hwq_debug_t : hwq_debug_t
example: example:
typedef struct{ typedef struct{
@ -278,8 +255,8 @@ extern int smart_hq_debug_init( uint32_t debug_base_addr, uint32_t len_bytes);
smart_get_inque_ok_cnt smart_get_inque_ok_cnt
: 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);
@ -288,8 +265,8 @@ extern int smart_get_inque_ok_cnt(int queid);
smart_get_inque_failed_cnt smart_get_inque_failed_cnt
: 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);
@ -298,8 +275,8 @@ extern int smart_get_inque_failed_cnt(int queid);
smart_get_outque_ok_cnt smart_get_outque_ok_cnt
: 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);
@ -308,8 +285,8 @@ extern int smart_get_outque_ok_cnt(int queid);
smart_get_outque_failed_cnt smart_get_outque_failed_cnt
: 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);