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 "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();
|
||||||
|
@ -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();
|
||||||
|
@ -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.
@ -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,75 +113,45 @@ 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);
|
||||||
|
|
||||||
|
|
||||||
/***************
|
/********************
|
||||||
函数å<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);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
函数名称: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);
|
||||||
|
|
||||||
/*********************
|
/*********************
|
||||||
函数å<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);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -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表示失败
|
返回值: 0表示成功,非0表示失败
|
||||||
函数功能:获å<EFBFBD>–当å‰<EFBFBD>出队失败计æ•?
|
函数功能:获取当前出队失败计数
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern int smart_get_outque_failed_cnt(int queid);
|
extern int smart_get_outque_failed_cnt(int queid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user