Commit d2e6b9f5 authored by ChiehChun's avatar ChiehChun

Fix indentation, space and warning

parent 40a0ace5
......@@ -465,6 +465,7 @@ uint8_t getN_PRB_DMRS(NR_BWP_Downlink_t *bwp, int numDmrsCdmGrpsNoData) {
return numDmrsCdmGrpsNoData * 4;
}
}
void nr_store_dlsch_buffer(module_id_t module_id,
frame_t frame,
sub_frame_t slot) {
......@@ -496,6 +497,7 @@ void nr_store_dlsch_buffer(module_id_t module_id,
sched_ctrl->rlc_status[lcid].bytes_in_buffer);
}
}
void find_free_CCE(module_id_t module_id,
sub_frame_t slot,
NR_UE_info_t *UE_info,
......@@ -524,6 +526,7 @@ void find_free_CCE(module_id_t module_id,
}
UE_info->num_pdcch_cand[UE_id][cid]++;
}
void allocate_retransmission(module_id_t module_id,
uint8_t *rballoc_mask,
int *n_rb_sched,
......@@ -571,9 +574,10 @@ void allocate_retransmission(module_id_t module_id,
if (!rballoc_mask[i])
continue;
rballoc_mask[i] = 0;
n_rb_ret --;
n_rb_ret--;
}
}
void pf_dl(module_id_t module_id,
frame_t frame,
sub_frame_t slot,
......@@ -584,17 +588,13 @@ void pf_dl(module_id_t module_id,
int max_num_ue) {
const int UE_id = 0;
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
const int current_harq_pid = sched_ctrl->current_harq_pid;
NR_UE_harq_t *harq = &sched_ctrl->harq_processes[current_harq_pid];
NR_UE_ret_info_t *retInfo = &sched_ctrl->retInfo[current_harq_pid];
const uint16_t bwpSize = NRRIV2BW(sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth, 275);
int rbStart = NRRIV2PRBOFFSET(sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth, 275);
/* Loop UE_info->list to check retransmission */
for (int UE_id = UE_info->list.head; UE_id >= 0; UE_id = UE_info->list.next[UE_id]) {
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
const uint16_t rnti = UE_info->rnti[UE_id];
const int current_harq_pid = sched_ctrl->current_harq_pid;
NR_UE_harq_t *harq = &sched_ctrl->harq_processes[current_harq_pid];
/* Calculate Throughput */
......@@ -602,7 +602,7 @@ void pf_dl(module_id_t module_id,
if (harq->round != 0) {
/* Find a free CCE */
find_free_CCE(module_id,slot,UE_info,UE_id);
find_free_CCE(module_id, slot, UE_info, UE_id);
/* Find PUCCH occasion */
nr_acknack_scheduling(module_id,
......@@ -616,7 +616,7 @@ void pf_dl(module_id_t module_id,
AssertFatal(sched_ctrl->pucch_sched_idx >= 0, "no uplink slot for PUCCH found!\n");
/* Allocate retransmission */
allocate_retransmission(module_id,rballoc_mask,&n_rb_sched,UE_info,UE_id);
allocate_retransmission(module_id, rballoc_mask, &n_rb_sched, UE_info, UE_id);
} else {
/* Check DL buffer */
......@@ -628,6 +628,12 @@ void pf_dl(module_id_t module_id,
}
}
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
const uint16_t bwpSize = NRRIV2BW(sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth, 275);
int rbStart = NRRIV2PRBOFFSET(sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth, 275);
const int current_harq_pid = sched_ctrl->current_harq_pid;
NR_UE_harq_t *harq = &sched_ctrl->harq_processes[current_harq_pid];
/* Loop UE_sched to find max coeff and allocate transmission */
//while(n_rb_sched > 0 && UE_sched.head >= 0){
if (harq->round == 0) { // temp
......@@ -635,7 +641,7 @@ void pf_dl(module_id_t module_id,
/* Find max coeff from UE_sched*/
/* Find a free CCE */
find_free_CCE(module_id,slot,UE_info,UE_id);
find_free_CCE(module_id, slot, UE_info, UE_id);
/* Find PUCCH occasion */
nr_acknack_scheduling(module_id,
......@@ -690,7 +696,6 @@ void pf_dl(module_id_t module_id,
rballoc_mask[rb + sched_ctrl->rbStart] = 0;
}
}
}
void nr_simple_dlsch_preprocessor(module_id_t module_id,
......@@ -727,10 +732,10 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
/* Retrieve amount of data to send for this UE */
nr_store_dlsch_buffer(module_id,frame,slot);
nr_store_dlsch_buffer(module_id, frame, slot);
/* pf algo */
pf_dl(module_id,frame,slot,num_slots_per_tdd,
pf_dl(module_id, frame, slot, num_slots_per_tdd,
UE_info,
n_rb_sched,
rballoc_mask,
......
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