Commit 55a39eb2 authored by Raymond Knopp's avatar Raymond Knopp

initial version for testing with nFAPI interfaces. Still lots of debugging traces.

parent d2249d5c
...@@ -1224,7 +1224,7 @@ int fill_dci_and_dlsch(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_ ...@@ -1224,7 +1224,7 @@ int fill_dci_and_dlsch(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_
} }
LOG_I(PHY,"DCI: Set harq_ids[%d] to %d\n",subframe,rel8->harq_process); LOG_I(PHY,"DCI: Set harq_ids[%d] to %d (%p)\n",subframe,rel8->harq_process,dlsch0);
dlsch0->harq_ids[subframe] = rel8->harq_process; dlsch0->harq_ids[subframe] = rel8->harq_process;
...@@ -2275,6 +2275,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_alloc, ...@@ -2275,6 +2275,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_alloc,
((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->rballoc = rballoc; ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->rballoc = rballoc;
// hopping = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->hopping; // hopping = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->hopping;
((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->type = 0; ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->type = 0;
dci_alloc->dci_length = sizeof_DCI0_1_5MHz_TDD_1_6_t;
} else { } else {
((DCI0_1_5MHz_FDD_t *)dci_pdu)->cqi_req = cqi_req; ((DCI0_1_5MHz_FDD_t *)dci_pdu)->cqi_req = cqi_req;
((DCI0_1_5MHz_FDD_t *)dci_pdu)->cshift = cshift; ((DCI0_1_5MHz_FDD_t *)dci_pdu)->cshift = cshift;
...@@ -2284,6 +2285,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_alloc, ...@@ -2284,6 +2285,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_alloc,
((DCI0_1_5MHz_FDD_t *)dci_pdu)->rballoc = rballoc; ((DCI0_1_5MHz_FDD_t *)dci_pdu)->rballoc = rballoc;
// hopping = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->hopping; // hopping = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->hopping;
((DCI0_1_5MHz_FDD_t *)dci_pdu)->type = 0; ((DCI0_1_5MHz_FDD_t *)dci_pdu)->type = 0;
dci_alloc->dci_length = sizeof_DCI0_1_5MHz_FDD_t;
} }
break; break;
...@@ -2299,6 +2301,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_alloc, ...@@ -2299,6 +2301,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_alloc,
((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->rballoc = rballoc; ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->rballoc = rballoc;
// hopping = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->hopping; // hopping = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->hopping;
((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->type = 0; ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->type = 0;
dci_alloc->dci_length = sizeof_DCI0_5MHz_TDD_1_6_t;
} else { } else {
((DCI0_5MHz_FDD_t *)dci_pdu)->cqi_req = cqi_req; ((DCI0_5MHz_FDD_t *)dci_pdu)->cqi_req = cqi_req;
((DCI0_5MHz_FDD_t *)dci_pdu)->cshift = cshift; ((DCI0_5MHz_FDD_t *)dci_pdu)->cshift = cshift;
...@@ -2308,6 +2311,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_alloc, ...@@ -2308,6 +2311,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_alloc,
((DCI0_5MHz_FDD_t *)dci_pdu)->rballoc = rballoc; ((DCI0_5MHz_FDD_t *)dci_pdu)->rballoc = rballoc;
// hopping = ((DCI0_5MHz_FDD_t *)dci_pdu)->hopping; // hopping = ((DCI0_5MHz_FDD_t *)dci_pdu)->hopping;
((DCI0_5MHz_FDD_t *)dci_pdu)->type = 0; ((DCI0_5MHz_FDD_t *)dci_pdu)->type = 0;
dci_alloc->dci_length = sizeof_DCI0_5MHz_FDD_t;
} }
break; break;
...@@ -2323,6 +2327,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_alloc, ...@@ -2323,6 +2327,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_alloc,
((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->rballoc = rballoc; ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->rballoc = rballoc;
// hopping = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->hopping; // hopping = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->hopping;
((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->type = 0; ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->type = 0;
dci_alloc->dci_length = sizeof_DCI0_10MHz_TDD_1_6_t;
} else { } else {
((DCI0_10MHz_FDD_t *)dci_pdu)->cqi_req = cqi_req; ((DCI0_10MHz_FDD_t *)dci_pdu)->cqi_req = cqi_req;
((DCI0_10MHz_FDD_t *)dci_pdu)->cshift = cshift; ((DCI0_10MHz_FDD_t *)dci_pdu)->cshift = cshift;
...@@ -2332,6 +2337,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_alloc, ...@@ -2332,6 +2337,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_alloc,
((DCI0_10MHz_FDD_t *)dci_pdu)->rballoc = rballoc; ((DCI0_10MHz_FDD_t *)dci_pdu)->rballoc = rballoc;
// hopping = ((DCI0_10MHz_FDD_t *)dci_pdu)->hopping; // hopping = ((DCI0_10MHz_FDD_t *)dci_pdu)->hopping;
((DCI0_10MHz_FDD_t *)dci_pdu)->type = 0; ((DCI0_10MHz_FDD_t *)dci_pdu)->type = 0;
dci_alloc->dci_length = sizeof_DCI0_10MHz_FDD_t;
} }
break; break;
...@@ -2347,6 +2353,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_alloc, ...@@ -2347,6 +2353,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_alloc,
((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->rballoc = rballoc; ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->rballoc = rballoc;
// hopping = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->hopping; // hopping = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->hopping;
((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->type = 0; ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->type = 0;
dci_alloc->dci_length = sizeof_DCI0_20MHz_TDD_1_6_t;
} else { } else {
((DCI0_20MHz_FDD_t *)dci_pdu)->cqi_req = cqi_req; ((DCI0_20MHz_FDD_t *)dci_pdu)->cqi_req = cqi_req;
((DCI0_20MHz_FDD_t *)dci_pdu)->cshift = cshift; ((DCI0_20MHz_FDD_t *)dci_pdu)->cshift = cshift;
...@@ -2356,6 +2363,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_alloc, ...@@ -2356,6 +2363,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_alloc,
((DCI0_20MHz_FDD_t *)dci_pdu)->rballoc = rballoc; ((DCI0_20MHz_FDD_t *)dci_pdu)->rballoc = rballoc;
// hopping = ((DCI0_20MHz_FDD_t *)dci_pdu)->hopping; // hopping = ((DCI0_20MHz_FDD_t *)dci_pdu)->hopping;
((DCI0_20MHz_FDD_t *)dci_pdu)->type = 0; ((DCI0_20MHz_FDD_t *)dci_pdu)->type = 0;
dci_alloc->dci_length = sizeof_DCI0_20MHz_FDD_t;
} }
//printf("eNB: rb_alloc (20 MHz dci) %d\n",rballoc); //printf("eNB: rb_alloc (20 MHz dci) %d\n",rballoc);
......
This diff is collapsed.
...@@ -872,7 +872,7 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t ...@@ -872,7 +872,7 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
lcid=0; lcid=0;
// set HARQ process 0 round to 0 for this UE // put HARQ process 0 round to IDLE
if (cc->tdd_Config) harq_pid = ((frameP*10)+subframeP)%10; if (cc->tdd_Config) harq_pid = ((frameP*10)+subframeP)%10;
else harq_pid = ((frameP*10)+subframeP)&7; else harq_pid = ((frameP*10)+subframeP)&7;
UE_list->UE_sched_ctrl[UE_id].round[CC_idP][harq_pid] = 0; UE_list->UE_sched_ctrl[UE_id].round[CC_idP][harq_pid] = 0;
...@@ -1010,7 +1010,6 @@ void check_Msg4_retransmission(module_id_t module_idP,int CC_idP,frame_t frameP, ...@@ -1010,7 +1010,6 @@ void check_Msg4_retransmission(module_id_t module_idP,int CC_idP,frame_t frameP,
// check HARQ status and retransmit if necessary // check HARQ status and retransmit if necessary
// Get candidate harq_pid from PHY
UE_id = find_UE_id(module_idP,RA_template->rnti); UE_id = find_UE_id(module_idP,RA_template->rnti);
AssertFatal(UE_id>=0,"Can't find UE for t-crnti\n"); AssertFatal(UE_id>=0,"Can't find UE for t-crnti\n");
......
...@@ -648,7 +648,7 @@ schedule_ue_spec( ...@@ -648,7 +648,7 @@ schedule_ue_spec(
/* process retransmission */ /* process retransmission */
if (round > 0) { if (round != 8) {
// get freq_allocation // get freq_allocation
nb_rb = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid]; nb_rb = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid];
...@@ -760,6 +760,8 @@ schedule_ue_spec( ...@@ -760,6 +760,8 @@ schedule_ue_spec(
0 // number of beamforming vectors, not used here 0 // number of beamforming vectors, not used here
); );
LOG_I(MAC,"Filled NFAPI configuration for DCI/DLSCH %d, retransmission round %d\n",eNB->pdu_index[CC_id],round);
eNB->pdu_index[CC_id]++; eNB->pdu_index[CC_id]++;
program_dlsch_acknak(module_idP,CC_id,UE_id,frameP,subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.cce_idx); program_dlsch_acknak(module_idP,CC_id,UE_id,frameP,subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.cce_idx);
// No TX request for retransmission (check if null request for FAPI) // No TX request for retransmission (check if null request for FAPI)
...@@ -1202,16 +1204,19 @@ schedule_ue_spec( ...@@ -1202,16 +1204,19 @@ schedule_ue_spec(
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_2 = 1; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_2 = 1;
if (cc[CC_id].tdd_Config != NULL) { //TDD if (cc[CC_id].tdd_Config != NULL) { //TDD
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.downlink_assignment_index = (UE_list->UE_template[CC_id][UE_id].DAI-1)&3; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.downlink_assignment_index = (UE_list->UE_template[CC_id][UE_id].DAI-1)&3;
LOG_D(MAC,"[eNB %d] Retransmission CC_id %d : harq_pid %d, round %d, dai %d, mcs %d\n", LOG_D(MAC,"[eNB %d] Initial transmission CC_id %d : harq_pid %d, dai %d, mcs %d\n",
module_idP,CC_id,harq_pid,round, module_idP,CC_id,harq_pid,
(UE_list->UE_template[CC_id][UE_id].DAI-1), (UE_list->UE_template[CC_id][UE_id].DAI-1),
mcs); mcs);
} else { } else {
LOG_D(MAC,"[eNB %d] Retransmission CC_id %d : harq_pid %d, round %d, mcs %d\n", LOG_D(MAC,"[eNB %d] Initial transmission CC_id %d : harq_pid %d, mcs %d\n",
module_idP,CC_id,harq_pid,round,mcs); module_idP,CC_id,harq_pid,mcs);
} }
if (!CCE_allocation_infeasible(module_idP,CC_id,1,subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level,rnti)) { if (!CCE_allocation_infeasible(module_idP,CC_id,1,subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level,rnti)) {
ue_sched_ctl->round[CC_id][harq_pid] = 0;
dl_req->number_dci++; dl_req->number_dci++;
dl_req->number_pdu++; dl_req->number_pdu++;
...@@ -1256,9 +1261,11 @@ schedule_ue_spec( ...@@ -1256,9 +1261,11 @@ schedule_ue_spec(
&eNB->pdu_index[CC_id], &eNB->pdu_index[CC_id],
eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[harq_pid]); eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[harq_pid]);
LOG_I(MAC,"Filled NFAPI configuration for DCI/DLSCH/TXREQ %d, new SDU\n",eNB->pdu_index[CC_id]);
eNB->pdu_index[CC_id]++; eNB->pdu_index[CC_id]++;
program_dlsch_acknak(module_idP,CC_id,UE_id,frameP,subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.cce_idx); program_dlsch_acknak(module_idP,CC_id,UE_id,frameP,subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.cce_idx);
} }
else { else {
LOG_W(MAC,"Frame %d, Subframe %d: Dropping DLSCH allocation for UE %d/%x, infeasible CCE allocations\n", LOG_W(MAC,"Frame %d, Subframe %d: Dropping DLSCH allocation for UE %d/%x, infeasible CCE allocations\n",
......
...@@ -1636,6 +1636,7 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP,int harq_pidP ...@@ -1636,6 +1636,7 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP,int harq_pidP
for (j=0; j<8; j++) { for (j=0; j<8; j++) {
UE_list->UE_template[cc_idP][UE_id].oldNDI[j] = (j==0)?1:0; // 1 because first transmission is with format1A (Msg4) for harq_pid 0 UE_list->UE_template[cc_idP][UE_id].oldNDI[j] = (j==0)?1:0; // 1 because first transmission is with format1A (Msg4) for harq_pid 0
UE_list->UE_template[cc_idP][UE_id].oldNDI_UL[j] = (j==harq_pidP)?0:1; // 1st transmission is with Msg3; UE_list->UE_template[cc_idP][UE_id].oldNDI_UL[j] = (j==harq_pidP)?0:1; // 1st transmission is with Msg3;
UE_list->UE_sched_ctrl[UE_id].round[cc_idP][j] = 8;
} }
eNB_ulsch_info[mod_idP][cc_idP][UE_id].status = S_UL_WAITING; eNB_ulsch_info[mod_idP][cc_idP][UE_id].status = S_UL_WAITING;
......
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