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:
commit
7db03c2c35
@ -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();
|
||||
|
@ -1,141 +1,148 @@
|
||||
// +FHDR------------------------------------------------------------
|
||||
// Copyright (c) 2022 SmartLogic.
|
||||
// ALL RIGHTS RESERVED
|
||||
// -----------------------------------------------------------------
|
||||
// Filename : main.c
|
||||
// Author : xianfeng.du
|
||||
// Created On : 2022-06-25
|
||||
// Last Modified :
|
||||
// -----------------------------------------------------------------
|
||||
// Description:
|
||||
//
|
||||
//
|
||||
// -FHDR------------------------------------------------------------
|
||||
|
||||
#include "ucp_printf.h"
|
||||
#include "rfm1_drv.h"
|
||||
#include "ucp_heartbeat.h"
|
||||
#include "ecs_rfm_spu1_top.h"
|
||||
#include "msg_transfer_queue.h"
|
||||
// +FHDR------------------------------------------------------------
|
||||
// Copyright (c) 2022 SmartLogic.
|
||||
// ALL RIGHTS RESERVED
|
||||
// -----------------------------------------------------------------
|
||||
// Filename : main.c
|
||||
// Author : xianfeng.du
|
||||
// Created On : 2022-06-25
|
||||
// Last Modified :
|
||||
// -----------------------------------------------------------------
|
||||
// Description:
|
||||
//
|
||||
//
|
||||
// -FHDR------------------------------------------------------------
|
||||
|
||||
#include "ucp_printf.h"
|
||||
#include "rfm1_drv.h"
|
||||
#include "ucp_heartbeat.h"
|
||||
#include "ecs_rfm_spu1_top.h"
|
||||
#include "msg_transfer_queue.h"
|
||||
#include "log_server.h"
|
||||
#include "ucp_utility.h"
|
||||
#include "phy_queue_proc.h"
|
||||
#include "cpri_test_mode.h"
|
||||
#include "spu_shell.h"
|
||||
#include "gtimer_drv.h"
|
||||
#include "rfm1_gtimer2.h"
|
||||
#include "ecs_rfm_spu1_oam.h"
|
||||
#include "phy_para.h"
|
||||
#include "hw_cpri.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()
|
||||
{
|
||||
if (1 == do_read_volatile(DDR_MONITOR_ENABLE))
|
||||
{
|
||||
clear_rfm1_gtimer2_1_intcnt();
|
||||
gtimer2_int_enable(0);
|
||||
do_write(DDR_MONITOR_ENABLE, 0);
|
||||
}
|
||||
volatile uint32_t nMonitorCnt = do_read_volatile(DDR_MONITOR_CNT);
|
||||
__ucps2_synch(0);
|
||||
if (nMonitorCnt < get_rfm1_gtimer2_1_intcnt())
|
||||
{
|
||||
gtimer2_int_disable(0);
|
||||
do_write(DDR_MONITOR_CNT, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
extern uint32_t gCpriCsuDummyFlag;
|
||||
|
||||
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);
|
||||
#include "cpri_test_mode.h"
|
||||
#include "spu_shell.h"
|
||||
#include "gtimer_drv.h"
|
||||
#include "rfm1_gtimer2.h"
|
||||
#include "ecs_rfm_spu1_oam.h"
|
||||
#include "phy_para.h"
|
||||
#include "hw_cpri.h"
|
||||
#include "hwque.h"
|
||||
|
||||
spu_log_client_init();
|
||||
#ifdef TEST_ENABLE
|
||||
#include "fh_test.h"
|
||||
#endif
|
||||
|
||||
#ifdef DDR_MONITOR
|
||||
void spu_ddr_monitor()
|
||||
{
|
||||
if (1 == do_read_volatile(DDR_MONITOR_ENABLE))
|
||||
{
|
||||
clear_rfm1_gtimer2_1_intcnt();
|
||||
gtimer2_int_enable(0);
|
||||
do_write(DDR_MONITOR_ENABLE, 0);
|
||||
}
|
||||
volatile uint32_t nMonitorCnt = do_read_volatile(DDR_MONITOR_CNT);
|
||||
__ucps2_synch(0);
|
||||
if (nMonitorCnt < get_rfm1_gtimer2_1_intcnt())
|
||||
{
|
||||
gtimer2_int_disable(0);
|
||||
do_write(DDR_MONITOR_CNT, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
extern uint32_t gCpriCsuDummyFlag;
|
||||
|
||||
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();
|
||||
|
||||
ecs_rfm_spu1_drv_init();
|
||||
|
||||
ecs_rfm_spu1_msg_transfer_init();
|
||||
|
||||
spu_shell_init();
|
||||
|
||||
spu_shell_cpri_cmd();
|
||||
|
||||
oam_msg_init();
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
||||
ecs_rfm_spu1_drv_init();
|
||||
|
||||
ecs_rfm_spu1_msg_transfer_init();
|
||||
|
||||
spu_shell_init();
|
||||
|
||||
spu_shell_cpri_cmd();
|
||||
|
||||
oam_msg_init();
|
||||
|
||||
while (1)
|
||||
{
|
||||
#ifdef TEST_ENABLE
|
||||
do_write(CSU_TX_ADVANCE_SAMPLE, 10000); // 10us
|
||||
do_write(CSU_RX_TD_SAMPLE, 10000);
|
||||
|
||||
check_test_outcome(0);
|
||||
do_write(CSU_TX_ADVANCE_SAMPLE, 10000); // 10us
|
||||
do_write(CSU_RX_TD_SAMPLE, 10000);
|
||||
|
||||
check_test_outcome(0);
|
||||
#endif
|
||||
#if 0
|
||||
if (1 == do_read_volatile(0x0A4D726C))
|
||||
{
|
||||
#ifdef CPRI_TIMING_7D2U_TEST
|
||||
ecs_rfm1_build_cell(NR_SCS_30K, 1);
|
||||
#endif
|
||||
#ifdef CPRI_TIMING_LTE_FDD_TEST
|
||||
ecs_rfm1_build_cell(LTE_SCS_ID, 1);
|
||||
#endif
|
||||
do_write(0x0A4D726C, 2);
|
||||
}
|
||||
if (2 == do_read_volatile(0x0A4D726C))
|
||||
{
|
||||
check_phy_cell();
|
||||
}
|
||||
if (3 == do_read_volatile(0x0A4D726C))
|
||||
{
|
||||
#ifdef CPRI_TIMING_7D2U_TEST
|
||||
ecs_rfm1_delete_cell(NR_SCS_30K, 0);
|
||||
#endif
|
||||
|
||||
#ifdef CPRI_TIMING_LTE_FDD_TEST
|
||||
ecs_rfm1_delete_cell(LTE_SCS_ID, 0);
|
||||
#endif
|
||||
do_write(0x0A4D726C, 0);
|
||||
}
|
||||
if (4 == do_read_volatile(0x0A4D726C))
|
||||
{
|
||||
#ifdef CPRI_TIMING_7D2U_TEST
|
||||
ecs_rfm1_delete_cell(NR_SCS_30K, 1);
|
||||
#endif
|
||||
|
||||
#ifdef CPRI_TIMING_LTE_FDD_TEST
|
||||
ecs_rfm1_delete_cell(LTE_SCS_ID, 1);
|
||||
#endif
|
||||
do_write(0x0A4D726C, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
if (1 == do_read_volatile(0x0A4D726C))
|
||||
{
|
||||
#ifdef CPRI_TIMING_7D2U_TEST
|
||||
ecs_rfm1_build_cell(NR_SCS_30K, 1);
|
||||
#endif
|
||||
#ifdef CPRI_TIMING_LTE_FDD_TEST
|
||||
ecs_rfm1_build_cell(LTE_SCS_ID, 1);
|
||||
#endif
|
||||
do_write(0x0A4D726C, 2);
|
||||
}
|
||||
if (2 == do_read_volatile(0x0A4D726C))
|
||||
{
|
||||
check_phy_cell();
|
||||
}
|
||||
if (3 == do_read_volatile(0x0A4D726C))
|
||||
{
|
||||
#ifdef CPRI_TIMING_7D2U_TEST
|
||||
ecs_rfm1_delete_cell(NR_SCS_30K, 0);
|
||||
#endif
|
||||
|
||||
#ifdef CPRI_TIMING_LTE_FDD_TEST
|
||||
ecs_rfm1_delete_cell(LTE_SCS_ID, 0);
|
||||
#endif
|
||||
do_write(0x0A4D726C, 0);
|
||||
}
|
||||
if (4 == do_read_volatile(0x0A4D726C))
|
||||
{
|
||||
#ifdef CPRI_TIMING_7D2U_TEST
|
||||
ecs_rfm1_delete_cell(NR_SCS_30K, 1);
|
||||
#endif
|
||||
|
||||
#ifdef CPRI_TIMING_LTE_FDD_TEST
|
||||
ecs_rfm1_delete_cell(LTE_SCS_ID, 1);
|
||||
#endif
|
||||
do_write(0x0A4D726C, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
phy_queue_polling();
|
||||
|
||||
#ifdef DISTRIBUTED_BS
|
||||
check_cpri();
|
||||
#ifdef DISTRIBUTED_BS
|
||||
check_cpri();
|
||||
|
||||
check_10ms_offset();
|
||||
#endif
|
||||
#endif
|
||||
spu_log_server_proc();
|
||||
spu_shell_task();
|
||||
#ifdef DDR_MONITOR
|
||||
spu_ddr_monitor();
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
spu_shell_task();
|
||||
#ifdef DDR_MONITOR
|
||||
spu_ddr_monitor();
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -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.
@ -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,232 +84,209 @@ 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 ;
|
||||
|
||||
typedef struct{
|
||||
hwq_db_info per_hwq[QUE_MAX_NR];
|
||||
|
||||
hwq_db_info per_hwq[QUE_MAX_NR];
|
||||
|
||||
}hwq_debug_t;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
函数å<EFBFBD><EFBFBD>称:smart_hq_init
|
||||
输入å<EFBFBD>‚æ•°: cpuid
|
||||
返回类型: int
|
||||
返回值: å°<EFBFBD>于0 表示失败
|
||||
返回å€?: 0 表示æˆ<EFBFBD>功
|
||||
函数功能ï¼? 硬件队列åˆ<EFBFBD>å§‹åŒ?
|
||||
函数名称:smart_hq_init
|
||||
输入参数: cpuid
|
||||
返回类型: int
|
||||
返回值: 小于0 表示失败
|
||||
返回值:等于0 表示成功
|
||||
函数功能:硬件队列初始化
|
||||
*/
|
||||
|
||||
extern int smart_hq_init(int cpuid);
|
||||
|
||||
/*
|
||||
函数å<EFBFBD><EFBFBD>称:smart_get_hq_vector
|
||||
输入å<EFBFBD>‚æ•°: cpuid
|
||||
输入å<EFBFBD>‚数:queid
|
||||
返回类型: int
|
||||
返回值:å°<EFBFBD>于ç‰äºŽ0 表示失败
|
||||
函数功能ï¼? 获å<EFBFBD>–当å‰<EFBFBD>ç¡¬ä»¶é˜Ÿåˆ—ä¸æ–å<EFBFBD>?
|
||||
函数名称:smart_get_hq_vector
|
||||
输入参数: cpuid
|
||||
输入参数:queid
|
||||
返回类型: int
|
||||
返回值:小于等于0 表示失败
|
||||
函数功能:获取当前硬件队列中断号
|
||||
|
||||
*/
|
||||
|
||||
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);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
函数å<EFBFBD><EFBFBD>称:smart_que_is_full
|
||||
输入å<EFBFBD>‚æ•°: queid
|
||||
返回类型:int
|
||||
返回值: 1 表示 true
|
||||
返回�: 0 表示 false
|
||||
说明:下�版本返回值会更改enum �
|
||||
enum hwque_status smart_que_is_full(int queid);
|
||||
返回值å<EFBFBD>ªèƒ½é?‰æ‹© hwque_false å’Œhwque_true
|
||||
函数名称:smart_que_is_full
|
||||
输入参数: queid
|
||||
返回类型:int
|
||||
返回值: 1 表示 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);
|
||||
|
||||
/*
|
||||
函数å<EFBFBD><EFBFBD>称:smart_que_is_empty
|
||||
输入å<EFBFBD>‚æ•°: queid
|
||||
返回类型: int
|
||||
返回值: 1 表示true
|
||||
返回值:0 表示false
|
||||
函数名称:smart_que_is_empty
|
||||
输入参数: queid
|
||||
返回类型: int
|
||||
返回值: 1 表示true
|
||||
返回值:0 表示false
|
||||
|
||||
*/
|
||||
extern int smart_que_is_empty(int queid);
|
||||
|
||||
/*
|
||||
函数å<EFBFBD><EFBFBD>称:smart_get_que_info
|
||||
输入å<EFBFBD>‚æ•°: queid
|
||||
输出å<EFBFBD>‚æ•° *dep
|
||||
输出å<EFBFBD>‚æ•°: *width
|
||||
输出å<EFBFBD>‚æ•°: *used
|
||||
输出å<EFBFBD>‚æ•°ï¼?*cpuid
|
||||
返回类型: int
|
||||
返回值: é<EFBFBD>?0 表示失败
|
||||
返回å€?: 0 表示æˆ<EFBFBD>功
|
||||
|
||||
函数名称:smart_get_que_info
|
||||
输入参数: queid
|
||||
输出参数 *dep
|
||||
输出参数: *width
|
||||
输出参数: *used
|
||||
输出参数: *cpuid
|
||||
返回类型: int
|
||||
返回值:0 表示成功,非0 表示失败
|
||||
|
||||
*/
|
||||
|
||||
extern int smart_get_que_info(int queid,int *dep,int *width,int *used,int *cpuid);
|
||||
|
||||
/*
|
||||
函数å<EFBFBD><EFBFBD>称:smart_enable_q_nempty
|
||||
输入å<EFBFBD>‚æ•°: queid
|
||||
返回值: �
|
||||
// 函数名称: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
|
||||
输入å<EFBFBD>‚æ•°: queid
|
||||
返回值: �
|
||||
函数功能:使能é<EFBFBD>žç©ºä¸æ–?
|
||||
|
||||
************************************/
|
||||
|
||||
extern void smart_disable_q_nempty(int queid);
|
||||
|
||||
/*
|
||||
函数å<EFBFBD><EFBFBD>称:smart_que_bind
|
||||
输入å<EFBFBD>‚æ•°: queid
|
||||
输入å<EFBFBD>‚æ•°ï¼›cpuid
|
||||
返回类型:int
|
||||
返回å€? ï¼? é<EFBFBD>?0 表示失败
|
||||
返回值: 0 表示æˆ<EFBFBD>功
|
||||
函数功能:去使能é<EFBFBD>žç©ºä¸æ–
|
||||
|
||||
// 函数名称:smart_disable_q_nempty
|
||||
函数名称:smart_hq_nempty_int_disable
|
||||
输入参数: queid
|
||||
返回值:int
|
||||
函数功能:去使能非空中断
|
||||
|
||||
*/
|
||||
|
||||
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 表示返回失败
|
||||
|
||||
函数功能:去使能非空中断
|
||||
|
||||
*/
|
||||
|
||||
extern int smart_que_bind(int cpuid,int queid);
|
||||
|
||||
|
||||
/*
|
||||
函数å<EFBFBD><EFBFBD>称:smart_hq_debug_init
|
||||
输入å<EFBFBD>‚æ•°: debug_base_addr
|
||||
输入å<EFBFBD>‚æ•°ï¼›len_bytes
|
||||
返回类型:int
|
||||
返回å€? ï¼? é<EFBFBD>?0 表示失败
|
||||
返回值:0 表示æˆ<EFBFBD>功
|
||||
函数功能:调试åˆ<EFBFBD>始化接å<EFBFBD>£
|
||||
函数名称:smart_hq_debug_init
|
||||
输入参数: debug_base_addr
|
||||
输入参数;len_bytes
|
||||
返回类型:int
|
||||
返回值:0 表示成功
|
||||
函数功能:调试初始化接口
|
||||
|
||||
注æ„<EFBFBD>ï¼?
|
||||
通过地å<EFBFBD>€ä¸Žï¼Œé•¿åº¦æŒ‡å®šç›¸åº”çš„buf æ•°æ<EFBFBD>®ç©ºé—´ï¼Œå˜æ”¾ç›¸åº”çš„ä¸æ–调试信æ<EFBFBD>¯ã€?
|
||||
这些调试信æ<EFBFBD>¯å·²ç»<EFBFBD>æ ¼å¼<EFBFBD>化,地å<EFBFBD>€ç”±ç”¨æˆ·æŒ‡å®šï¼Œlen_bytes ä¸<EFBFBD>能å°<EFBFBD>于sizeof(hwq_debug_t)
|
||||
æ•°æ<EFBFBD>®æ ¼å¼<EFBFBD>化内容是 hwq_debug_t
|
||||
注意:
|
||||
通过地址与,长度指定相应的buf 数据空间,存放相应的中断调试信息
|
||||
这些调试信息已经格式化,地址由用户指定,len_bytes 不能小于sizeof(hwq_debug_t)
|
||||
数据格式化结构是: hwq_debug_t
|
||||
|
||||
æ•°æ<EFBFBD>®æ ¼å¼<EFBFBD> example:
|
||||
typedef struct{
|
||||
unsigned int out_failed_cnt;
|
||||
unsigned int in_failed_cnt;
|
||||
unsigned int out_success_cnt;
|
||||
unsigned int in_success_cnt;
|
||||
unsigned int cur_que_depth;
|
||||
unsigned int bind_cpuid;
|
||||
|
||||
}hwq_db_info ;
|
||||
|
||||
typedef struct{
|
||||
hwq_db_info per_hwq[HW_QUE_NR];
|
||||
|
||||
}hwq_debug_t;
|
||||
数据格式 example:
|
||||
typedef struct{
|
||||
unsigned int out_failed_cnt;
|
||||
unsigned int in_failed_cnt;
|
||||
unsigned int out_success_cnt;
|
||||
unsigned int in_success_cnt;
|
||||
unsigned int cur_que_depth;
|
||||
unsigned int bind_cpuid;
|
||||
|
||||
}hwq_db_info ;
|
||||
|
||||
typedef struct{
|
||||
hwq_db_info per_hwq[HW_QUE_NR];
|
||||
|
||||
}hwq_debug_t;
|
||||
|
||||
*/
|
||||
|
||||
extern int smart_hq_debug_init( uint32_t debug_base_addr, uint32_t len_bytes);
|
||||
|
||||
/*
|
||||
函数å<EFBFBD><EFBFBD>称:smart_get_inque_ok_cnt
|
||||
输入å<EFBFBD>‚æ•°: queid
|
||||
返回类型:int
|
||||
返回å€? ï¼? å°<EFBFBD>于ç‰äºŽ0表示失败
|
||||
函数功能:获å<EFBFBD>–当å‰<EFBFBD>入队æˆ<EFBFBD>功计æ•?
|
||||
函数名称:smart_get_inque_ok_cnt
|
||||
输入参数: queid
|
||||
返回类型:int
|
||||
返回值 : 小于等于0表示失败
|
||||
函数功能:获取当前入队成功计数
|
||||
*/
|
||||
|
||||
extern int smart_get_inque_ok_cnt(int queid);
|
||||
|
||||
/*
|
||||
函数å<EFBFBD><EFBFBD>称:smart_get_inque_failed_cnt
|
||||
输入å<EFBFBD>‚æ•°: queid
|
||||
返回类型:int
|
||||
返回å€? ï¼? å°<EFBFBD>于ç‰äºŽ0表示失败
|
||||
函数功能:获å<EFBFBD>–当å‰<EFBFBD>入队失败计æ•?
|
||||
函数名称:smart_get_inque_failed_cnt
|
||||
输入参数: queid
|
||||
返回类型:int
|
||||
返回值 : 小于等于0表示失败
|
||||
函数功能:获取当前入队失败计数
|
||||
*/
|
||||
|
||||
extern int smart_get_inque_failed_cnt(int queid);
|
||||
|
||||
/*
|
||||
函数å<EFBFBD><EFBFBD>称:smart_get_outque_ok_cnt
|
||||
输入å<EFBFBD>‚æ•°: queid
|
||||
返回类型:int
|
||||
返回å€? ï¼? å°<EFBFBD>于ç‰äºŽ0表示失败
|
||||
函数功能:获å<EFBFBD>–当å‰<EFBFBD>出队æˆ<EFBFBD>功计æ•?
|
||||
函数名称:smart_get_outque_ok_cnt
|
||||
输入参数: queid
|
||||
返回类型:int
|
||||
返回值:小于等于0表示失败
|
||||
函数功能:获取当前出队成功计数
|
||||
*/
|
||||
|
||||
extern int smart_get_outque_ok_cnt(int queid);
|
||||
|
||||
/*
|
||||
函数å<EFBFBD><EFBFBD>称:smart_get_outque_failed_cnt
|
||||
输入å<EFBFBD>‚æ•°: queid
|
||||
返回类型:int
|
||||
返回å€? ï¼? å°<EFBFBD>于ç‰äºŽ0表示失败
|
||||
函数功能:获å<EFBFBD>–当å‰<EFBFBD>出队失败计æ•?
|
||||
函数名称:smart_get_outque_failed_cnt
|
||||
输入参数: queid
|
||||
返回类型:int
|
||||
返回值: 0表示成功,非0表示失败
|
||||
函数功能:获取当前出队失败计数
|
||||
*/
|
||||
|
||||
extern int smart_get_outque_failed_cnt(int queid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user