新增recv_symb2bit的数据接口
This commit is contained in:
parent
52c386ef8d
commit
386d1c6475
@ -27,6 +27,7 @@
|
||||
#include "ByteCopy.h"
|
||||
#include "ByteShift.h"
|
||||
#include "LdpcDecBG1AllZc.h"
|
||||
#include "interface_rec_symb2_rec_bit.h"
|
||||
|
||||
|
||||
//微码配置空间偏移结构体
|
||||
@ -39,6 +40,7 @@ extern uint32_t *receiver_bit_config_dm3_ptr;
|
||||
void Receiver_Bit_Init();
|
||||
void Receiver_Bit_Task(void* msg_ptr, uint32_t msg_len);
|
||||
void Receiver_Bit_Proc(
|
||||
receiver_symb2bit_t* symb2bit_info,
|
||||
uint32_t* param_ptr,
|
||||
int32_t* temp_dm0_ptr,
|
||||
int32_t* temp_dm1_ptr,
|
||||
|
@ -16,6 +16,7 @@
|
||||
* @Date: 2024年10月30日
|
||||
*/
|
||||
void Receiver_Bit_Proc(
|
||||
receiver_symb2bit_t* symb2bit_info,
|
||||
uint32_t *param_ptr,
|
||||
int32_t *temp_dm0_ptr,
|
||||
int32_t *temp_dm1_ptr,
|
||||
@ -36,7 +37,7 @@ void Receiver_Bit_Proc(
|
||||
uint32_t temp_u32;
|
||||
uint32_t time_data_dm0_ptr = ((((uint32_t)&temp_dm0_ptr[0] + 4095)>>12)<<12);
|
||||
uint32_t res_ptr = RECEIVER_OUT3;
|
||||
|
||||
//LOG_ERROR_S("%d %d 0x%08x %d\n", symb2bit_info->sfn, symb2bit_info->slot, symb2bit_info->data_ptr, symb2bit_info->proc_id);
|
||||
// 16QAM_LDPC-----------------------------------------------------------------------------------------------
|
||||
int i;
|
||||
int NumCB = 28;
|
||||
@ -68,7 +69,11 @@ void Receiver_Bit_Proc(
|
||||
|
||||
int out_len = 4576 / 8;
|
||||
for (i=0; i<NumCB; i++){
|
||||
time_data_ddr_ptr = (uint32_t)*param_ptr + 4 * i * ReNum;//addr->4;(ReNum*4)byte/4=(ReNum)word
|
||||
//TODO: test data ptr
|
||||
//time_data_ddr_ptr = (uint32_t)*param_ptr + 4 * i * ReNum;//addr->4;(ReNum*4)byte/4=(ReNum)word
|
||||
//symb2bit data ptr
|
||||
time_data_ddr_ptr = (uint32_t)(symb2bit_info->data_ptr + 4 * i * ReNum);
|
||||
|
||||
time_data_length = (uint32_t)*(param_ptr + 1) / NumCB;
|
||||
ape_csu_dma_1D_G2L_ch0ch1_transfer((uint64_t)time_data_ddr_ptr,
|
||||
(uint64_t)DM_TO_CSU_ADDR(time_data_dm0_ptr),
|
||||
@ -131,7 +136,7 @@ void Receiver_Bit_Proc(
|
||||
MPU_ADDR((uint32_t)de_ldpc_lmn3_addr), // temp_3
|
||||
MPU_ADDR((uint32_t)de_ldpc_check_para0_addr), // BG1_Check_Matrix_0,译码校验矩阵
|
||||
MPU_ADDR((uint32_t)de_ldpc_check_para1_addr), // BG1_Check_Matrix_1,译码校验矩阵
|
||||
// MPU_ADDR(LdpcOut)); // data_out
|
||||
// MPU_ADDR(LdpcOut)); // data_out
|
||||
MPU_ADDR(time_data_dm0_ptr));
|
||||
SVRReg[0] = MPU_ADDR(cfg_addr);
|
||||
LdpcDecBG1AllZcAsm(SVRReg);
|
||||
|
@ -24,7 +24,9 @@ void Receiver_Bit_Task(void* msg_ptr, uint32_t msg_len)
|
||||
g_time_start[0] = TIME_NS();
|
||||
RUN_CNT(TRACE_RECEIVER_BIT_ADDR, 0);
|
||||
|
||||
|
||||
receiver_symb2bit_t symb2bit_info;
|
||||
memcpy_ext(&symb2bit_info, msg_ptr, msg_len);
|
||||
//LOG_ERROR_S("0x%08x %d %d 0x%08x %d\n", msg_ptr, symb2bit_info.sfn, symb2bit_info.slot, symb2bit_info.data_ptr, symb2bit_info.proc_id);
|
||||
int32_t *receiver_bit_malloc_dm0_ptr;
|
||||
int32_t *receiver_bit_malloc_dm1_ptr;
|
||||
int32_t *receiver_bit_malloc_dm2_ptr;
|
||||
@ -154,6 +156,7 @@ void Receiver_Bit_Task(void* msg_ptr, uint32_t msg_len)
|
||||
|
||||
//6. 计算流程
|
||||
Receiver_Bit_Proc(
|
||||
&symb2bit_info,
|
||||
(uint32_t*)receiver_bit_param_ptr,
|
||||
receiver_bit_temp_dm0_ptr,
|
||||
receiver_bit_temp_dm1_ptr,
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "freOffEstImpl.h"
|
||||
#include "freOffCompImpl.h"
|
||||
#include "Transform.h"
|
||||
#include "interface_rec_symb2_rec_bit.h"
|
||||
//include mpu header files
|
||||
|
||||
|
||||
|
@ -49,11 +49,6 @@ typedef struct receiver_symb_table_param_s
|
||||
|
||||
}receiver_symb_table_param_t;
|
||||
|
||||
//TODO:需要接口设计
|
||||
typedef struct receiver_symb2bit_s
|
||||
{
|
||||
uint8_t rev[4];
|
||||
}receiver_symb2bit_t;
|
||||
|
||||
//=======================================================================
|
||||
#endif
|
@ -10,7 +10,7 @@
|
||||
*****************************************************************/
|
||||
#include "receiver_symb_func.h"
|
||||
|
||||
|
||||
extern uint32_t g_symb2bit_buffer_sel;
|
||||
/*!
|
||||
* @brief: Receiver任务启动前的初始化工作
|
||||
* 初始化全局参数,ddr查找表搬入SM
|
||||
@ -32,7 +32,7 @@ void Receiver_Symb_Init()
|
||||
|
||||
//SM
|
||||
|
||||
|
||||
g_symb2bit_buffer_sel = 0;
|
||||
|
||||
//9. 微码配置文件ddr地址初始化
|
||||
ret = osp_get_cfgfile("Receiver_Symb_cfg_dm0.dat",
|
||||
@ -63,4 +63,6 @@ void Receiver_Symb_Init()
|
||||
{
|
||||
LOG_ERROR_S("Receiver_Symb_cfg_dm3.dat not found!\n");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -9,7 +9,8 @@
|
||||
|
||||
*****************************************************************/
|
||||
#include "receiver_symb_func.h"
|
||||
|
||||
uint32_t g_symb2bit_buffer_sel;
|
||||
receiver_symb2bit_t data_send2bit_task;
|
||||
/*!
|
||||
* @brief: Receiver_sync链路处理
|
||||
* @author: HUOHUO
|
||||
@ -37,12 +38,11 @@ void Receiver_Symb_Proc(
|
||||
//data读入
|
||||
//获取源数据地址
|
||||
receiver_sync2symb_t* para_dm_ptr = param_ptr;
|
||||
//TODO: 计算完成结果需要存到下面两个buffer地址中的一个
|
||||
uint32_t cur_out_ddr_ptr = (0 == g_symb2bit_buffer_sel) ? ((uint32_t)RECEIVER_SYMB2BIT_BUFFER0_ADDR) : ((uint32_t)RECEIVER_SYMB2BIT_BUFFER1_ADDR);
|
||||
|
||||
uint32_t cur_sfn = get_rx_nr_sfn();
|
||||
uint32_t cur_slot = get_rx_nr_slot();
|
||||
uint32_t cur_time = TIME_NS();
|
||||
LOG_ERROR_S("%d %d %d %d %d %d %d 0x%08x 0x%08x %d %d\n", cur_sfn, cur_slot, cur_time, para_dm_ptr->sfn, para_dm_ptr->slot, para_dm_ptr->num_data_section,
|
||||
para_dm_ptr->proc_id, para_dm_ptr->data_section0_ptr, para_dm_ptr->data_section1_ptr, para_dm_ptr->data_section0_length, para_dm_ptr->data_section1_length);
|
||||
//LOG_ERROR_S("%d %d %d %d 0x%08x 0x%08x %d %d\n",para_dm_ptr->sfn, para_dm_ptr->slot, para_dm_ptr->num_data_section,
|
||||
// para_dm_ptr->proc_id, para_dm_ptr->data_section0_ptr, para_dm_ptr->data_section1_ptr, para_dm_ptr->data_section0_length, para_dm_ptr->data_section1_length);
|
||||
|
||||
// if(1 == para_dm_ptr->num_data_section)
|
||||
// {
|
||||
@ -68,52 +68,66 @@ void Receiver_Symb_Proc(
|
||||
|
||||
|
||||
|
||||
return ;
|
||||
// return ;
|
||||
|
||||
// //计算结果搬移到外存
|
||||
// temp_u32 = 1000;//计算byte数
|
||||
// WAIT_MPU_STOP;
|
||||
// ape_csu_task_lookup(DMA_TAG_G2L, 1);
|
||||
TRACE(TRACE_RECEIVER_SYMB_ADDR, 3, 2);
|
||||
time0 = Time_offset(0);
|
||||
TRACE_MAX(TRACE_RECEIVER_SYMB_ADDR, 4, time0);
|
||||
// // //计算结果搬移到外存
|
||||
// // temp_u32 = 1000;//计算byte数
|
||||
// // WAIT_MPU_STOP;
|
||||
// // ape_csu_task_lookup(DMA_TAG_G2L, 1);
|
||||
// TRACE(TRACE_RECEIVER_SYMB_ADDR, 3, 2);
|
||||
// time0 = Time_offset(0);
|
||||
// TRACE_MAX(TRACE_RECEIVER_SYMB_ADDR, 4, time0);
|
||||
|
||||
FreOff_Proc((uint32_t*)para_dm_ptr->data_section0_ptr, temp_dm0_ptr, temp_dm1_ptr, temp_dm2_ptr, temp_dm3_ptr);
|
||||
TRACE(TRACE_RECEIVER_SYMB_ADDR, 3, 3);
|
||||
time1 = Time_offset(0);
|
||||
TRACE_MAX(TRACE_RECEIVER_SYMB_ADDR, 5, time1 -time0);
|
||||
time0 = time1;
|
||||
// FreOff_Proc((uint32_t*)para_dm_ptr->data_section0_ptr, temp_dm0_ptr, temp_dm1_ptr, temp_dm2_ptr, temp_dm3_ptr);
|
||||
// TRACE(TRACE_RECEIVER_SYMB_ADDR, 3, 3);
|
||||
// time1 = Time_offset(0);
|
||||
// TRACE_MAX(TRACE_RECEIVER_SYMB_ADDR, 5, time1 -time0);
|
||||
// time0 = time1;
|
||||
|
||||
ChannelEst_Proc(param_ptr,temp_dm0_ptr,temp_dm1_ptr,temp_dm2_ptr,temp_dm3_ptr);
|
||||
TRACE(TRACE_RECEIVER_SYMB_ADDR, 3, 4);
|
||||
time1 = Time_offset(0);
|
||||
TRACE_MAX(TRACE_RECEIVER_SYMB_ADDR, 6, time1 -time0);
|
||||
time0 = time1;
|
||||
// ChannelEst_Proc(param_ptr,temp_dm0_ptr,temp_dm1_ptr,temp_dm2_ptr,temp_dm3_ptr);
|
||||
// TRACE(TRACE_RECEIVER_SYMB_ADDR, 3, 4);
|
||||
// time1 = Time_offset(0);
|
||||
// TRACE_MAX(TRACE_RECEIVER_SYMB_ADDR, 6, time1 -time0);
|
||||
// time0 = time1;
|
||||
|
||||
ChannelEqu_Proc(param_ptr, temp_dm0_ptr, temp_dm1_ptr, temp_dm2_ptr, temp_dm3_ptr);
|
||||
TRACE(TRACE_RECEIVER_SYMB_ADDR, 3, 5);
|
||||
time1 = Time_offset(0);
|
||||
TRACE_MAX(TRACE_RECEIVER_SYMB_ADDR, 7, time1 -time0);
|
||||
time0 = time1;
|
||||
// ChannelEqu_Proc(param_ptr, temp_dm0_ptr, temp_dm1_ptr, temp_dm2_ptr, temp_dm3_ptr);
|
||||
// TRACE(TRACE_RECEIVER_SYMB_ADDR, 3, 5);
|
||||
// time1 = Time_offset(0);
|
||||
// TRACE_MAX(TRACE_RECEIVER_SYMB_ADDR, 7, time1 -time0);
|
||||
// time0 = time1;
|
||||
|
||||
Transform_Proc(param_ptr, temp_dm0_ptr, temp_dm1_ptr, temp_dm2_ptr, temp_dm3_ptr);
|
||||
TRACE(TRACE_RECEIVER_SYMB_ADDR, 3, 6);
|
||||
time1 = Time_offset(0);
|
||||
TRACE_MAX(TRACE_RECEIVER_SYMB_ADDR, 8, time1 -time0);
|
||||
time0 = time1;
|
||||
// Transform_Proc(param_ptr, temp_dm0_ptr, temp_dm1_ptr, temp_dm2_ptr, temp_dm3_ptr);
|
||||
// TRACE(TRACE_RECEIVER_SYMB_ADDR, 3, 6);
|
||||
// time1 = Time_offset(0);
|
||||
// TRACE_MAX(TRACE_RECEIVER_SYMB_ADDR, 8, time1 -time0);
|
||||
// time0 = time1;
|
||||
|
||||
#ifdef IDE_TEST
|
||||
printf("DataTrans");
|
||||
#endif
|
||||
|
||||
return ;
|
||||
// #ifdef IDE_TEST
|
||||
// printf("DataTrans");
|
||||
// #endif
|
||||
//return ;
|
||||
|
||||
//7.核间消息to APE2
|
||||
//需要定义结构体
|
||||
receiver_symb2bit_t data_send2bit_task;
|
||||
|
||||
//更新buffer
|
||||
g_symb2bit_buffer_sel = (g_symb2bit_buffer_sel + 1) & 0x1;
|
||||
|
||||
data_send2bit_task.proc_id = para_dm_ptr->proc_id;
|
||||
data_send2bit_task.sfn = para_dm_ptr->sfn;
|
||||
data_send2bit_task.slot = para_dm_ptr->slot;
|
||||
data_send2bit_task.data_ptr = cur_out_ddr_ptr;
|
||||
data_send2bit_task.data_length = 57344;//TODO:待确认,单位WORD
|
||||
//LOG_ERROR_S("%d 0x%08x %d\n",data_send2bit_task.proc_id, data_send2bit_task.data_ptr, g_symb2bit_buffer_sel);
|
||||
#ifdef CORE_ODD
|
||||
uint8_t cur_core_id = APE3_CORE_ID;
|
||||
#else
|
||||
uint8_t cur_core_id = APE5_CORE_ID;
|
||||
#endif
|
||||
phy_et_msg_send((uint32_t)(&data_send2bit_task),
|
||||
sizeof(receiver_symb2bit_t),
|
||||
UCP4008_KERNEL_INTER,
|
||||
APE5_CORE_ID,
|
||||
cur_core_id,
|
||||
APE6_CORE_ID,
|
||||
PHY_TASK_RECEIVER_SYMB,
|
||||
PHY_TASK_RECEIVER_BIT);
|
||||
|
@ -41,6 +41,8 @@
|
||||
//SM3
|
||||
#define SM3_NR_PUCCH_LUT_LEN (0x00040000) //256K
|
||||
#define SM3_PHY_MSG_BUFFER_LEN (0x00000400) //1K
|
||||
//SM5
|
||||
#define SM5_SYMB2_BIT_LEN (0x00038000)
|
||||
//DDR
|
||||
#define TRACE_GRP_LEN (0x00000200) //128Word
|
||||
|
||||
@ -81,7 +83,15 @@
|
||||
#define RECEIVER_SYNC2SYNC_FIRST_INF_ADDR (RECEIVER_SYNC2SYMB_BUFFER_REV_ADDR + TIME_DATA_SLOT_LEN) //LEN: sizeof(receiver_sync_status_t)
|
||||
|
||||
/************************************SM5--1.5M***********************************************/
|
||||
|
||||
//SM5前面区域被占用
|
||||
#define RECEIVER_SYMB2BIT_BUFFER_BASE_ADDR (RECEIVER_SYNC2SYNC_FIRST_INF_ADDR + 0x1000) //LEN: sizeof(receiver_sync_status_t)
|
||||
#ifdef CORE_ODD
|
||||
#define RECEIVER_SYMB2BIT_BUFFER0_ADDR (RECEIVER_SYMB2BIT_BUFFER_BASE_ADDR + 0*SM5_SYMB2_BIT_LEN)
|
||||
#define RECEIVER_SYMB2BIT_BUFFER1_ADDR (RECEIVER_SYMB2BIT_BUFFER_BASE_ADDR + 1*SM5_SYMB2_BIT_LEN)
|
||||
#else
|
||||
#define RECEIVER_SYMB2BIT_BUFFER0_ADDR (RECEIVER_SYMB2BIT_BUFFER_BASE_ADDR + 2*SM5_SYMB2_BIT_LEN)
|
||||
#define RECEIVER_SYMB2BIT_BUFFER1_ADDR (RECEIVER_SYMB2BIT_BUFFER_BASE_ADDR + 3*SM5_SYMB2_BIT_LEN)
|
||||
#endif
|
||||
/**************************************DDR***************************************************/
|
||||
//1.93GB可用0x14400000-0x8FFFFFFF
|
||||
#define DDR_PHY_BASE (0x14400000)
|
||||
|
@ -278,7 +278,7 @@ int32_t phy_et_msg_send(uint32_t msg_addr,
|
||||
}
|
||||
else
|
||||
{
|
||||
//TASK_MSG_RECORD(src_core_id, src_task_id, TASK_MSG_SEND_ERR);
|
||||
LOG_ERROR_S("osp_send_msg ERR\n");
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
18
Interface/interface_rec_symb2_rec_bit.h
Normal file
18
Interface/interface_rec_symb2_rec_bit.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef INTERFACE_REC_SYMB2_REC_BIT_H
|
||||
#define INTERFACE_REC_SYMB2_REC_BIT_H
|
||||
#include "type_define.h"
|
||||
|
||||
typedef struct receiver_symb2bit_s
|
||||
{
|
||||
uint16_t sfn;//创建任务时刻的sfn
|
||||
uint16_t slot;//创建任务时刻的slot
|
||||
uint16_t proc_id;//记录包的顺序
|
||||
uint16_t rev;
|
||||
uint32_t data_ptr;
|
||||
uint32_t data_length;//单位Word
|
||||
}receiver_symb2bit_t;
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /*INTERFACE_REC_SYMB2_REC_BIT_H*/
|
Loading…
x
Reference in New Issue
Block a user