1:shell线程延时usleep(10)改为osp_delay(2000) 2:扩大shell队列

This commit is contained in:
huanfeng.wang 2024-05-28 18:57:45 +08:00
parent c1db881538
commit a0937fcf7c
3 changed files with 19 additions and 17 deletions

View File

@ -16,7 +16,7 @@
#define __OSP_SW_QUEUE_H__ #define __OSP_SW_QUEUE_H__
#define SPU_APE_RFM_QUE_SIG_SIZE (512) /* 软件队列一个单位的长度为512字节 */ #define SPU_APE_RFM_QUE_SIG_SIZE (512) /* 软件队列一个单位的长度为512字节 */
#define OSP_APE_RFM_SHELL_QUE_DEP (8) /* Shell软件队列的深度为8 */ #define OSP_APE_RFM_SHELL_QUE_DEP (80) /* Shell软件队列的深度为8 */
#define OSP_APE_RFM_QUE_DEP (256) #define OSP_APE_RFM_QUE_DEP (256)
#define OSP_APE_RFM_MSG_QUE_DEP (128) #define OSP_APE_RFM_MSG_QUE_DEP (128)

View File

@ -98,6 +98,7 @@ OSP_CMD_RTN ospCmdRtnTbl[MAX_CMD_NUM] =
{"hb", (OSP_FUNCPTR)osp_shell_wrapper, (OSP_FUNCPTR)get_heartbeat_status, "test heartbeat", 0}, {"hb", (OSP_FUNCPTR)osp_shell_wrapper, (OSP_FUNCPTR)get_heartbeat_status, "test heartbeat", 0},
{"apecmd", (OSP_FUNCPTR)osp_shell_wrapper, (OSP_FUNCPTR)osp_ape_cmd_show, "show ape register cmd", 0}, {"apecmd", (OSP_FUNCPTR)osp_shell_wrapper, (OSP_FUNCPTR)osp_ape_cmd_show, "show ape register cmd", 0},
{"armcmd", (OSP_FUNCPTR)osp_shell_wrapper, (OSP_FUNCPTR)osp_arm_cmd_show, "show arm register cmd", 0}, {"armcmd", (OSP_FUNCPTR)osp_shell_wrapper, (OSP_FUNCPTR)osp_arm_cmd_show, "show arm register cmd", 0},
{"armreg", (OSP_FUNCPTR)osp_shell_wrapper, (OSP_FUNCPTR)osp_insert_cmd, "arm trend register", 4},
{"version", (OSP_FUNCPTR)osp_shell_wrapper, (OSP_FUNCPTR)osp_soft_version_show, "show soft version info", 0}, {"version", (OSP_FUNCPTR)osp_shell_wrapper, (OSP_FUNCPTR)osp_soft_version_show, "show soft version info", 0},
//{"level_ape", (OSP_FUNCPTR)osp_shell_wrapper,(OSP_FUNCPTR)osp_ape_set_log_level, "set ape log level", 1}, //{"level_ape", (OSP_FUNCPTR)osp_shell_wrapper,(OSP_FUNCPTR)osp_ape_set_log_level, "set ape log level", 1},
//{"csu_stop_ape", (OSP_FUNCPTR)osp_shell_wrapper,(OSP_FUNCPTR)osp_ape_csu_stop_cfg, "set csu start or stop", 2}, //{"csu_stop_ape", (OSP_FUNCPTR)osp_shell_wrapper,(OSP_FUNCPTR)osp_ape_csu_stop_cfg, "set csu start or stop", 2},
@ -1646,7 +1647,7 @@ uint64_t osp_shell_task(void)
} }
} }
usleep(10); osp_delay(2000);
return OSP_OK; return OSP_OK;
} }

View File

@ -22,11 +22,11 @@
#define OSP_APE_RFM_LOG_SIZE (0x00080000) /* Log软件队列一个队列的总内存(512K) */ #define OSP_APE_RFM_LOG_SIZE (0x00080000) /* Log软件队列一个队列的总内存(512K) */
#define OSP_APE_RFM_SHELL_OFFSET (0x0B600000)//(0x00800000) #define OSP_APE_RFM_SHELL_OFFSET (0x0B600000)//(0x00800000)
#define OSP_APE_RFM_SHELL_SIZE (0x00001000) /* Shell软件队列一个队列的总内存(512*8) */ #define OSP_APE_RFM_SHELL_SIZE (0x0000A000) /* Shell软件队列一个队列的总内存(512*80) */
#define OSP_APE_RFM_QUE_NUM (36) /* 一共36个软列队 */ #define OSP_APE_RFM_QUE_NUM (36) /* 一共36个软列队 */
#define OSP_APE_SHARE_OFFSET (0x0B618000)//(0x00818000) #define OSP_APE_SHARE_OFFSET (0xB6F0000)//(0x00818000)
#define SPU_APE_RFM_QUE_FLAG_USED (0x5a5a) #define SPU_APE_RFM_QUE_FLAG_USED (0x5a5a)
#define SPU_APE_FRM_QUE_FLAG_POS (2) #define SPU_APE_FRM_QUE_FLAG_POS (2)
@ -84,19 +84,20 @@ uint8_t osp_sw_queue_init()
} }
/* APE_RFM_SHELL */ /* APE_RFM_SHELL */
pvlog_addr = gpsw_que_static_mem + OSP_APE_RFM_SHELL_OFFSET; pvlog_addr = gpsw_que_static_mem + OSP_APE_RFM_SHELL_OFFSET;
for (u8loop = 0; u8loop < OSP_APE_RFM_SHELL_NUM; u8loop++) for (u8loop = 0; u8loop < OSP_APE_RFM_SHELL_NUM; u8loop++)
{ {
gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].pvaddr = pvlog_addr + (u8loop*OSP_APE_RFM_SHELL_SIZE); gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].pvaddr = pvlog_addr + (u8loop*OSP_APE_RFM_SHELL_SIZE);
gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u16queue_id = (OSP_APE_RFM_LOG_NUM + u8loop); gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u16queue_id = (OSP_APE_RFM_LOG_NUM + u8loop);
gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u16queue_type = OSP_SW_QUEUE_SHELL; gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u16queue_type = OSP_SW_QUEUE_SHELL;
gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u8queue_offset = 8; gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u8queue_offset = 8;
gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u16queue_dep = OSP_APE_RFM_SHELL_QUE_DEP; gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u16queue_dep = OSP_APE_RFM_SHELL_QUE_DEP;
gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u16queue_mask = (OSP_APE_RFM_SHELL_QUE_DEP - 1); gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u16queue_mask = (OSP_APE_RFM_SHELL_QUE_DEP - 1);
gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u16queue_mem_idx = 0; gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u16queue_mem_idx = 0;
gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u32queue_full_count = 0; gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u32queue_full_count = 0;
gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u32queue_empty_count = 0; gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u32queue_empty_count = 0;
} }
return OSP_OK; return OSP_OK;
} }