Commit ccf362fd authored by mir's avatar mir

Capacity added into struct tm_info_t and minors

parent ee99ff9b
......@@ -11,6 +11,7 @@
typedef struct{
uint8_t* buf;
size_t len;
size_t cap; // capacity
task_ans_t* ans;
} thread_info_tm_t;
......
......@@ -552,7 +552,7 @@ int main ( int argc, char **argv )
L1_rxtx_proc_t *L1proctx= &RC.eNB[x][CC_id]->proc.L1_proc_tx;
L1proc->respDecode=(notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
if ( strlen(get_softmodem_params()->threadPoolConfig) > 0 ){
L1proc->man = calloc(1, sizeof(ws_task_manager_t));
L1proc->man = calloc(1, sizeof(task_manager_t));
assert(L1proc->man != NULL && "Memory exhausted");
int core_id[128] = {0};
......@@ -560,7 +560,7 @@ int main ( int argc, char **argv )
parse_num_threads(get_softmodem_params()->threadPoolConfig, &out);
init_task_manager(L1proc->man, out.core_id, out.sz);
}else {
L1proc->man = calloc(1, sizeof(ws_task_manager_t));
L1proc->man = calloc(1, sizeof(task_manager_t));
assert(L1proc->man != NULL && "Memory exhausted");
int lst_core_id = -1;
init_task_manager(L1proc->man, &lst_core_id, 1);
......
......@@ -70,7 +70,7 @@ typedef struct {
uint64_t optmask; //mask to store boolean config options
uint32_t ofdm_offset_divisor; // Divisor for sample offset computation for each OFDM symbol
int max_ldpc_iterations; // number of maximum LDPC iterations
ws_task_manager_t man;
task_manager_t man;
int UE_scan_carrier;
int UE_fo_compensation;
int timing_advance;
......
......@@ -339,7 +339,7 @@ static int ulsch_decoding_data(PHY_VARS_eNB *eNB, L1_rxtx_proc_t *proc, int UE_i
E = ulsch_harq->Qm * ((GpmodC==0?0:1) + (Gp/ulsch_harq->C));
turboDecode_t* rdata = &((turboDecode_t*)t_info->buf)[t_info->len];
assert(t_info->len < 64);
assert(t_info->len < t_info->cap);
rdata->ans = &t_info->ans[t_info->len];
t_info->len += 1;
......
......@@ -449,7 +449,7 @@ int nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
int E = nr_get_E(G, harq_process->C, Qm, n_layers, r);
ldpcDecode_t* rdata = &((ldpcDecode_t*)t_info->buf)[t_info->len];
assert(t_info->len < 64);
assert(t_info->len < t_info->cap);
rdata->ans = &t_info->ans[t_info->len];
t_info->len += 1;
......
......@@ -1330,7 +1330,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
turboDecode_t arr[64] = {0};
task_ans_t ans[64] = {0};
thread_info_tm_t t_info = { .ans = ans, .buf = (uint8_t*)arr };
thread_info_tm_t t_info = { .ans = ans, .cap = 64, .len = 0, .buf = (uint8_t*)arr };
for (i = 0; i < NUMBER_OF_ULSCH_MAX; i++) {
ulsch = eNB->ulsch[i];
......
......@@ -846,7 +846,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
ldpcDecode_t arr[64];
task_ans_t ans[64] = {0};
thread_info_tm_t t_info = {.buf = (uint8_t*)arr, .len = 0, .ans = ans};
thread_info_tm_t t_info = {.buf = (uint8_t*)arr, .len = 0, .cap = 64, .ans = ans};
//int64_t const t0 = time_now_ns();
int totalDecode = 0;
......
......@@ -790,7 +790,7 @@ int main(int argc, char **argv) {
proc_rxtx_ue->subframe_rx = (proc_rxtx->subframe_tx+6)%10;
int lst_core_id = -1;
proc_rxtx->man = calloc(1, sizeof(ws_task_manager_t));
proc_rxtx->man = calloc(1, sizeof(task_manager_t));
assert(proc_rxtx->man != NULL && "Memory exhausted");
init_task_manager(proc_rxtx->man, &lst_core_id, 1);
......
......@@ -595,7 +595,7 @@ int main(int argc, char **argv)
ldpcDecode_t arr[16] = {0};
task_ans_t ans[16] = {0};
thread_info_tm_t t_info = {.buf = (uint8_t*)arr, .len = 0, .ans = ans };
thread_info_tm_t t_info = {.buf = (uint8_t*)arr, .cap = 16, .len = 0, .ans = ans };
int nbDecode = nr_ulsch_decoding(gNB, UE_id, channel_output_fixed, frame_parms, rel15_ul, frame, subframe, harq_pid, G, &t_info);
assert(nbDecode > 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment