Merge branch 'dev_ck_v2.1_bug#1038#' into 'dev_ck_v2.1'

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

See merge request ucp/driver/ucp4008_platform_spu!28
This commit is contained in:
Xianfeng Du 2023-09-06 08:00:46 +00:00
commit 7db03c2c35
5 changed files with 274 additions and 270 deletions

View File

@ -18,12 +18,22 @@
#include "log_client.h"
#include "ucp_utility.h"
#include "spu_shell.h"
#include "hwque.h"
int32_t main(int32_t argc, char* argv[])
{
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);
/* 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();
ecs_rfm_spu0_drv_init();

View File

@ -27,14 +27,12 @@
#include "ecs_rfm_spu1_oam.h"
#include "phy_para.h"
#include "hw_cpri.h"
#include "hwque.h"
#ifdef TEST_ENABLE
#include "fh_test.h"
#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
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());
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_server_init();

View File

@ -19,12 +19,22 @@
#include "ucp_utility.h"
#include "spu_shell.h"
#include "pet_rfm_spu1_oam.h"
#include "hwque.h"
int32_t main(int32_t argc, char* argv[])
{
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);
/* 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();
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 B_128_16BLCOKS 0
#define B_128_16BLCOKS 8
#define B_256_32BLOCKS 32
#define BLOCKS_64 64
@ -84,6 +84,8 @@ typedef struct{
unsigned int in_failed_cnt;
unsigned int out_success_cnt;
unsigned int in_success_cnt;
unsigned int in_que_depth_val;
unsigned int out_que_depth_val;
}hwq_db_info ;
@ -99,8 +101,8 @@ typedef struct{
: cpuid
: int
0
è¿åžå?: 0 表示æˆ<EFBFBD>功
彿°åŠŸèƒ½ï¼? 硬ä»é˜Ÿåˆåˆ<EFBFBD>å§åŒ?
0
*/
extern int smart_hq_init(int cpuid);
@ -111,75 +113,45 @@ extern int smart_hq_init(int cpuid);
queid
: int
0
彿°åŠŸèƒ½ï¼? 获å<EFBFBD>å½å<EFBFBD>硬ä»é˜Ÿåˆä¸­æ­å<EFBFBD>?
*/
extern int smart_get_hq_vector(int cpuid,int queid);
/***************
彿°å<EFBFBD><EFBFBD>称:smart_in_que
彿°å<EFBFBD>æ°ï¼šqueid 队åˆç¼å<EFBFBD>·
彿°å<EFBFBD>æ°ï¼šval å¥é˜Ÿå¼
彿°åŠŸèƒ½ï¼šç¡¬ä»é˜Ÿåˆå¥é˜Ÿ
彿°ä½¿ç¨æ³¨æ<EFBFBD>ç¹1: å½å<EFBFBD>彿°ä¸<EFBFBD>能在中æ­å¤ç<EFBFBD>彿°ä¸­è°ƒç¨
彿°ä½¿ç¨æ³¨æ<EFBFBD>ç¹2: 多核çŸäº§èå¥é˜Ÿæéœè¦<EFBFBD>加é<EFBFBD>
/********************
smart_in_que
queid
val
使1
******************/
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
: queid
int
1 true
è¿åžå?: 0 表示 false
说明:ä¸ä¸?çˆæœ¬è¿åžå¼ä¼šæ´æ¹enum ï¼?
enum hwque_status smart_que_is_full(int queid);
è¿åžå¼å<EFBFBD>ªèƒ½é?æ© hwque_false åŒhwque_true
: 0 false
*/
extern int smart_que_is_full(int queid);
/*********************
彿°å<EFBFBD><EFBFBD>称:smart_out_que
彿°å<EFBFBD>æ°ï¼šqueid 队åˆç¼å<EFBFBD>·
è¾åºå<EFBFBD>æ°ï¼šidx 获å<EFBFBD>å½å<EFBFBD>队åˆçšç´¢å¼å¼
彿°åŠŸèƒ½ï¼šé˜Ÿåˆåºé˜ŸèŽ·å<EFBFBD>å½å<EFBFBD>队åˆçšç´¢å¼å¼
彿°ä½¿ç¨æ³¨æ<EFBFBD>ç¹1:å½å<EFBFBD>彿°ä¸<EFBFBD>能在中æ­å¤ç<EFBFBD>彿°ä¸­è°ƒç¨
smart_out_que
queid
idx
*********************/
extern int smart_out_que(int queid,uint32_t *val);
/*
@ -198,41 +170,47 @@ extern int smart_que_is_empty(int queid);
*dep
: *width
: *used
è¾åºå<EFBFBD>æ°ï¼?*cpuid
: *cpuid
: int
è¿åžå¼ï¼š é<EFBFBD>?0 表示失败
è¿åžå?: 0 表示æˆ<EFBFBD>功
:0 0
*/
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
è¿åžå¼ï¼š æ?
int
:使
*/
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
è¿åžå¼ï¼š æ?
彿°åŠŸèƒ½ï¼šä½¿èƒ½é<EFBFBD>žç©ºä¸­æ?
int
:使
************************************/
*/
extern void smart_disable_q_nempty(int queid);
//extern void smart_hq_nempty_int_disable(int queid);
/*
smart_que_bind
: queid
cpuid
int
è¿åžå? ï¼? é<EFBFBD>?0 表示失败
è¿åžå¼ï¼š 0 表示æˆ<EFBFBD>功
: 0 0
使
*/
@ -245,14 +223,13 @@ extern int smart_que_bind(int cpuid,int queid);
: debug_base_addr
len_bytes
int
è¿åžå? ï¼? é<EFBFBD>?0 表示失败
0
注æ<EFBFBD>ï¼?
éšè¿åœ°å<EFBFBD>与,é¿åº¦æŒå®šç¸åºçšbuf æ°æ<EFBFBD>®ç©ºé´ï¼Œå­˜æ¾ç¸åºçšä¸­æ­è°ƒè¯ä¿¡æ<EFBFBD>¯ã?
:
buf
len_bytes sizeof(hwq_debug_t)
æ°æ<EFBFBD>®æ ¼å¼<EFBFBD>åŒå容是 hwq_debug_t
: hwq_debug_t
example:
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
: queid
int
è¿åžå? ï¼? å°<EFBFBD>于ç­äºŽ0表示失败
彿°åŠŸèƒ½ï¼šèŽ·å<EFBFBD>å½å<EFBFBD>å¥é˜Ÿæˆ<EFBFBD>功计æ?
: 0
*/
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
: queid
int
è¿åžå? ï¼? å°<EFBFBD>于ç­äºŽ0表示失败
彿°åŠŸèƒ½ï¼šèŽ·å<EFBFBD>å½å<EFBFBD>å¥é˜Ÿå¤±è´¥è®¡æ?
: 0
*/
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
: queid
int
è¿åžå? ï¼? å°<EFBFBD>于ç­äºŽ0表示失败
彿°åŠŸèƒ½ï¼šèŽ·å<EFBFBD>å½å<EFBFBD>åºé˜Ÿæˆ<EFBFBD>功计æ?
0
*/
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
: queid
int
è¿åžå? ï¼? å°<EFBFBD>于ç­äºŽ0表示失败
彿°åŠŸèƒ½ï¼šèŽ·å<EFBFBD>å½å<EFBFBD>åºé˜Ÿå¤±è´¥è®¡æ?
: 00
*/
extern int smart_get_outque_failed_cnt(int queid);