update feature#1694# merge dev_ck_v2.1_xls_feature#1694# to dev_ck_v2.1

1. Four-channel support
2. OAM ul change 32 blocks to 16 blocks, so modified the cases
3. Test:
   3.1 spu_case0_arm_case0_cpri:  Pass
   3.2 spu_case14_arm_case20_cpri:Pass
   3.3 spu_case20_arm_case20_cpri:Pass
   3.4 spu_case24_arm_case24_cpri:Pass
   3.5 spu_case34_arm_case5:      Pass
   3.6 spu_case44_arm_case5:      Pass
This commit is contained in:
lishuang.xie 2024-03-18 15:23:35 +08:00
parent 2a4c4c7089
commit 5831721775
14 changed files with 425 additions and 264 deletions

View File

@ -17,7 +17,7 @@
#include "typedef.h" #include "typedef.h"
#define MAX_INSTANCE_NUM (2) #define MAX_INSTANCE_NUM (4) //(2)
#define MAX_PORT_NUM (4) #define MAX_PORT_NUM (4)
#define SUCCESS (0) #define SUCCESS (0)

View File

@ -17,7 +17,7 @@
#include "typedef.h" #include "typedef.h"
#define MAX_INSTANCE_NUM (2) #define MAX_INSTANCE_NUM (4) //(2)
#define MAX_PORT_NUM (4) #define MAX_PORT_NUM (4)
#define SUCCESS (0) #define SUCCESS (0)

View File

@ -111,10 +111,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;

View File

@ -113,10 +113,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;

View File

@ -142,10 +142,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;

View File

@ -141,10 +141,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;

View File

@ -141,10 +141,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;

View File

@ -36,6 +36,12 @@ uint32_t gu32_tick_receive_ctrl = 0;
uint32_t gu32_tick_from_tx_ctrl = 0; uint32_t gu32_tick_from_tx_ctrl = 0;
uint32_t gu32_rx_callback_data_cnt = 0; uint32_t gu32_rx_callback_data_cnt = 0;
uint32_t gu32_switch = 0;
void osp_switch(uint32_t u32_switch)
{
gu32_switch = u32_switch;
}
uint32_t rx_callback_data(const char* buf,uint32_t payloadSize) uint32_t rx_callback_data(const char* buf,uint32_t payloadSize)
{ {
@ -65,9 +71,12 @@ uint32_t rx_callback_data(const char* buf,uint32_t payloadSize)
g_slot_time = stc_cnt; g_slot_time = stc_cnt;
if ((diff > 1020000) || (diff < 980000)) if ((diff > 1020000) || (diff < 980000))
{
if((gu32_switch & 0x01) == 1)
{ {
UCP_PRINT_ERROR("[0],qNO[%d],sfn[%d],slot[%d],diff[%d]",UCP4008_TRAFFIC_NR_eMBB_DATA,sfn,slot,diff); UCP_PRINT_ERROR("[0],qNO[%d],sfn[%d],slot[%d],diff[%d]",UCP4008_TRAFFIC_NR_eMBB_DATA,sfn,slot,diff);
} }
}
return payloadSize; return payloadSize;
} }
@ -96,9 +105,12 @@ uint32_t rx1_callback_data(const char* buf,uint32_t payloadSize)
gu32_rx1_slot_time = stc_cnt; gu32_rx1_slot_time = stc_cnt;
if ((diff > 1020000) || (diff < 980000)) if ((diff > 1020000) || (diff < 980000))
{
if((gu32_switch & 0x10) == 1)
{ {
UCP_PRINT_ERROR("[1],qNO[%d],sfn[%d],slot[%d],diff[%d]",UCP4008_TRAFFIC_NR_eMBB_DATA,sfn,slot,diff); UCP_PRINT_ERROR("[1],qNO[%d],sfn[%d],slot[%d],diff[%d]",UCP4008_TRAFFIC_NR_eMBB_DATA,sfn,slot,diff);
} }
}
return payloadSize; return payloadSize;
} }
@ -129,7 +141,10 @@ uint32_t rx2_callback_data(const char* buf,uint32_t payloadSize)
if ((diff > 1020000) || (diff < 980000)) if ((diff > 1020000) || (diff < 980000))
{ {
UCP_PRINT_ERROR("[1],qNO[%d],sfn[%d],slot[%d],diff[%d]",UCP4008_TRAFFIC_NR_eMBB_DATA,sfn,slot,diff); if((gu32_switch & 0x100) == 1)
{
UCP_PRINT_ERROR("[2],qNO[%d],sfn[%d],slot[%d],diff[%d]",UCP4008_TRAFFIC_NR_eMBB_DATA,sfn,slot,diff);
}
} }
return payloadSize; return payloadSize;
@ -161,7 +176,10 @@ uint32_t rx3_callback_data(const char* buf,uint32_t payloadSize)
if ((diff > 1020000) || (diff < 980000)) if ((diff > 1020000) || (diff < 980000))
{ {
UCP_PRINT_ERROR("[1],qNO[%d],sfn[%d],slot[%d],diff[%d]",UCP4008_TRAFFIC_NR_eMBB_DATA,sfn,slot,diff); if((gu32_switch & 0x1000) == 1)
{
UCP_PRINT_ERROR("[3],qNO[%d],sfn[%d],slot[%d],diff[%d]",UCP4008_TRAFFIC_NR_eMBB_DATA,sfn,slot,diff);
}
} }
return payloadSize; return payloadSize;
@ -213,10 +231,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;
@ -332,7 +350,7 @@ void cell_setup_simulation(uint8_t scs_id, uint8_t cell_id, uint32_t run_core, u
int32_t test_case(uint32_t argc, int32_t* argvp) int32_t test_case(uint32_t argc, int32_t* argvp)
{ {
UCP_PRINT_DEBUG("start running testcase 22 (8 ape 15K case)."); UCP_PRINT_DEBUG("start running testcase 24 (8 ape 15K case, 4 cells).");
osp_read_spe_cfg_file("/ramfs/cfgDat"); osp_read_spe_cfg_file("/ramfs/cfgDat");
@ -362,6 +380,7 @@ int32_t test_case(uint32_t argc, int32_t* argvp)
cell_setup_simulation(scs_id, cell_id, run_ape, frame_type); /* the first cell */ cell_setup_simulation(scs_id, cell_id, run_ape, frame_type); /* the first cell */
UCP_PRINT_DEBUG("call cell setup(1)"); UCP_PRINT_DEBUG("call cell setup(1)");
osp_insert_cmd("sw", (OSP_FUNCPTR)osp_switch, "osp_switch", 1);
while(1) while(1)
{ {
@ -408,25 +427,166 @@ int32_t test_case(uint32_t argc, int32_t* argvp)
slot_ind_flag = 0; slot_ind_flag = 0;
handler.inst_id = 0; handler.inst_id = 0;
/************C_PLANE***************/
cu_flag = C_PLANE;
ret = msg_transfer_send_start(handler.value,cu_flag);
ret = msg_transfer_alloc_msg(handler.value, cu_flag, size, &buf, &availableSize, &offset);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,c_plane alloc error\r\n");
continue;
} }
ptr = (uint8_t *)buf;
*(uint32_t*)(ptr + 0) = gu32_value;
*(uint32_t*)(ptr + 4) = gu32_tick_from_tx_ctrl;
*(uint32_t*)(ptr + 8) = gu32_tick_receive_ctrl;
*(uint32_t*)(ptr + 12) = read_stc_local_timer();
ret = msg_transfer_send_msg(handler.value, cu_flag, (uint8_t *)buf, offset, size);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,c_plane send error\r\n");
}
ret = msg_transfer_send_end(handler.value,cu_flag);
/************U_PLANE***************/
cu_flag = U_PLANE;
ret = msg_transfer_send_start(handler.value,cu_flag);
ret = msg_transfer_alloc_msg(handler.value, cu_flag, size, &buf, &availableSize, &offset);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,u_plane alloc error\r\n");
continue;
}
ptr = (uint8_t *)buf;
*(uint32_t*)(ptr + 0) = gu32_value;
*(uint32_t*)(ptr + 4) = gu32_tick_from_tx_ctrl;
*(uint32_t*)(ptr + 8) = gu32_tick_receive_ctrl;
*(uint32_t*)(ptr + 12) = read_stc_local_timer();
ret = msg_transfer_send_msg(handler.value, cu_flag, (uint8_t *)buf, offset, size);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,u_plane send error\r\n");
}
ret = msg_transfer_send_end(handler.value,cu_flag);
}
if (1 == gu32_rx1_slot_ind_flag) if (1 == gu32_rx1_slot_ind_flag)
{ {
gu32_rx1_slot_ind_flag = 0; gu32_rx1_slot_ind_flag = 0;
handler.inst_id = 1; handler.inst_id = 1;
/************C_PLANE***************/
cu_flag = C_PLANE;
ret = msg_transfer_send_start(handler.value,cu_flag);
ret = msg_transfer_alloc_msg(handler.value, cu_flag, size, &buf, &availableSize, &offset);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,c_plane alloc error\r\n");
continue;
} }
ptr = (uint8_t *)buf;
*(uint32_t*)(ptr + 0) = gu32_value;
*(uint32_t*)(ptr + 4) = gu32_tick_from_tx_ctrl;
*(uint32_t*)(ptr + 8) = gu32_tick_receive_ctrl;
*(uint32_t*)(ptr + 12) = read_stc_local_timer();
ret = msg_transfer_send_msg(handler.value, cu_flag, (uint8_t *)buf, offset, size);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,c_plane send error\r\n");
}
ret = msg_transfer_send_end(handler.value,cu_flag);
/************U_PLANE***************/
cu_flag = U_PLANE;
ret = msg_transfer_send_start(handler.value,cu_flag);
ret = msg_transfer_alloc_msg(handler.value, cu_flag, size, &buf, &availableSize, &offset);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,u_plane alloc error\r\n");
continue;
}
ptr = (uint8_t *)buf;
*(uint32_t*)(ptr + 0) = gu32_value;
*(uint32_t*)(ptr + 4) = gu32_tick_from_tx_ctrl;
*(uint32_t*)(ptr + 8) = gu32_tick_receive_ctrl;
*(uint32_t*)(ptr + 12) = read_stc_local_timer();
ret = msg_transfer_send_msg(handler.value, cu_flag, (uint8_t *)buf, offset, size);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,u_plane send error\r\n");
}
ret = msg_transfer_send_end(handler.value,cu_flag);
}
if (1 == gu32_rx2_slot_ind_flag) if (1 == gu32_rx2_slot_ind_flag)
{ {
gu32_rx2_slot_ind_flag = 0; gu32_rx2_slot_ind_flag = 0;
handler.inst_id = 2; handler.inst_id = 2;
/************C_PLANE***************/
cu_flag = C_PLANE;
ret = msg_transfer_send_start(handler.value,cu_flag);
ret = msg_transfer_alloc_msg(handler.value, cu_flag, size, &buf, &availableSize, &offset);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,c_plane alloc error\r\n");
continue;
} }
ptr = (uint8_t *)buf;
*(uint32_t*)(ptr + 0) = gu32_value;
*(uint32_t*)(ptr + 4) = gu32_tick_from_tx_ctrl;
*(uint32_t*)(ptr + 8) = gu32_tick_receive_ctrl;
*(uint32_t*)(ptr + 12) = read_stc_local_timer();
ret = msg_transfer_send_msg(handler.value, cu_flag, (uint8_t *)buf, offset, size);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,c_plane send error\r\n");
}
ret = msg_transfer_send_end(handler.value,cu_flag);
/************U_PLANE***************/
cu_flag = U_PLANE;
ret = msg_transfer_send_start(handler.value,cu_flag);
ret = msg_transfer_alloc_msg(handler.value, cu_flag, size, &buf, &availableSize, &offset);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,u_plane alloc error\r\n");
continue;
}
ptr = (uint8_t *)buf;
*(uint32_t*)(ptr + 0) = gu32_value;
*(uint32_t*)(ptr + 4) = gu32_tick_from_tx_ctrl;
*(uint32_t*)(ptr + 8) = gu32_tick_receive_ctrl;
*(uint32_t*)(ptr + 12) = read_stc_local_timer();
ret = msg_transfer_send_msg(handler.value, cu_flag, (uint8_t *)buf, offset, size);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,u_plane send error\r\n");
}
ret = msg_transfer_send_end(handler.value,cu_flag);
}
if (1 == gu32_rx3_slot_ind_flag) if (1 == gu32_rx3_slot_ind_flag)
{ {
gu32_rx3_slot_ind_flag = 0; gu32_rx3_slot_ind_flag = 0;
handler.inst_id = 3; handler.inst_id = 3;
}
/************C_PLANE***************/ /************C_PLANE***************/
cu_flag = C_PLANE; cu_flag = C_PLANE;
ret = msg_transfer_send_start(handler.value,cu_flag); ret = msg_transfer_send_start(handler.value,cu_flag);
@ -474,6 +634,7 @@ int32_t test_case(uint32_t argc, int32_t* argvp)
ret = msg_transfer_send_end(handler.value,cu_flag); ret = msg_transfer_send_end(handler.value,cu_flag);
} }
} }
}
return 0; return 0;
} }

View File

@ -62,10 +62,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;

View File

@ -203,11 +203,11 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam_spu; c_plane.rx_callback = rx_callback_oam_spu;
//c_plane.rx_callback = rx_callback_oam; //c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;

View File

@ -118,10 +118,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;

View File

@ -118,10 +118,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;

View File

@ -118,10 +118,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;

View File

@ -111,10 +111,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;