handling of harq_pid in RA procedure and cce_idx in allocate_CCEs
This commit is contained in:
@@ -2388,14 +2388,14 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
|
|||||||
} //re
|
} //re
|
||||||
} // aa
|
} // aa
|
||||||
|
|
||||||
#ifdef DEBUG_PUCCH_RX
|
|
||||||
LOG_I(PHY,"PUCCH 1a/b: subframe %d : stat %d,%d (pos %d)\n",subframe,stat_re,stat_im,
|
|
||||||
(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe]));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
eNB->pucch1ab_stats[UE_id][(subframe<<11) + 2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_re);
|
LOG_D(PHY,"PUCCH 1a/b: subframe %d : stat %d,%d (pos %d)\n",subframe,stat_re,stat_im,
|
||||||
eNB->pucch1ab_stats[UE_id][(subframe<<11) + 1+2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_im);
|
(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe]));
|
||||||
eNB->pucch1ab_stats_cnt[UE_id][subframe] = (eNB->pucch1ab_stats_cnt[UE_id][subframe]+1)&1023;
|
|
||||||
|
|
||||||
|
eNB->pucch1ab_stats[UE_id][(subframe<<11) + 2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_re);
|
||||||
|
eNB->pucch1ab_stats[UE_id][(subframe<<11) + 1+2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_im);
|
||||||
|
eNB->pucch1ab_stats_cnt[UE_id][subframe] = (eNB->pucch1ab_stats_cnt[UE_id][subframe]+1)&1023;
|
||||||
|
|
||||||
/* frame not available here - set to -1 for the moment */
|
/* frame not available here - set to -1 for the moment */
|
||||||
T(T_ENB_PHY_PUCCH_1AB_IQ, T_INT(eNB->Mod_id), T_INT(UE_id), T_INT(-1), T_INT(subframe), T_INT(stat_re), T_INT(stat_im));
|
T(T_ENB_PHY_PUCCH_1AB_IQ, T_INT(eNB->Mod_id), T_INT(UE_id), T_INT(-1), T_INT(subframe), T_INT(stat_re), T_INT(stat_im));
|
||||||
@@ -2406,6 +2406,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
|
|||||||
if (fmt==pucch_format1b)
|
if (fmt==pucch_format1b)
|
||||||
*(1+payload) = (stat_im<0) ? 1 : 0;
|
*(1+payload) = (stat_im<0) ? 1 : 0;
|
||||||
} else { // insufficient energy on PUCCH so NAK
|
} else { // insufficient energy on PUCCH so NAK
|
||||||
|
LOG_D(PHY,"PUCCH 1a/b: subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
|
||||||
*payload = 4; // DTX
|
*payload = 4; // DTX
|
||||||
((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[0] = (int16_t)(stat_re);
|
((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[0] = (int16_t)(stat_re);
|
||||||
((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[1] = (int16_t)(stat_im);
|
((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[1] = (int16_t)(stat_im);
|
||||||
|
|||||||
@@ -877,6 +877,8 @@ typedef struct {
|
|||||||
uint8_t generate_Msg4;
|
uint8_t generate_Msg4;
|
||||||
/// Flag to indicate that eNB is waiting for ACK that UE has received Msg3.
|
/// Flag to indicate that eNB is waiting for ACK that UE has received Msg3.
|
||||||
uint8_t wait_ack_Msg4;
|
uint8_t wait_ack_Msg4;
|
||||||
|
/// harq_pid used for Msg4 transmission
|
||||||
|
uint8_t harq_pid;
|
||||||
/// UE RNTI allocated during RAR
|
/// UE RNTI allocated during RAR
|
||||||
rnti_t rnti;
|
rnti_t rnti;
|
||||||
/// RA RNTI allocated from received PRACH
|
/// RA RNTI allocated from received PRACH
|
||||||
|
|||||||
@@ -499,7 +499,6 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
|
|||||||
nfapi_ul_config_request_body_t *ul_req;
|
nfapi_ul_config_request_body_t *ul_req;
|
||||||
uint8_t lcid;
|
uint8_t lcid;
|
||||||
uint8_t offset;
|
uint8_t offset;
|
||||||
int harq_pid;
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef Rel14
|
#ifdef Rel14
|
||||||
@@ -568,8 +567,8 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
|
|||||||
|
|
||||||
// set HARQ process round to 0 for this UE
|
// set HARQ process round to 0 for this UE
|
||||||
|
|
||||||
if (cc->tdd_Config) harq_pid = ((frameP*10)+subframeP)%10;
|
if (cc->tdd_Config) RA_template->harq_pid = ((frameP*10)+subframeP)%10;
|
||||||
else harq_pid = ((frameP*10)+subframeP)&7;
|
else RA_template->harq_pid = ((frameP*10)+subframeP)&7;
|
||||||
|
|
||||||
|
|
||||||
// Get RRCConnectionSetup for Piggyback
|
// Get RRCConnectionSetup for Piggyback
|
||||||
@@ -642,7 +641,7 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
|
|||||||
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.pdsch_reptition_levels = 4; // fix to 4 for now
|
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.pdsch_reptition_levels = 4; // fix to 4 for now
|
||||||
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.redundancy_version = 0;
|
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.redundancy_version = 0;
|
||||||
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.new_data_indicator = 0;
|
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.new_data_indicator = 0;
|
||||||
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.harq_process = harq_pid;
|
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.harq_process = RA_template->harq_pid;
|
||||||
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.tpmi_length = 0;
|
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.tpmi_length = 0;
|
||||||
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.tpmi = 0;
|
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.tpmi = 0;
|
||||||
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.pmi_flag = 0;
|
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.pmi_flag = 0;
|
||||||
@@ -729,7 +728,7 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
|
|||||||
|
|
||||||
lcid=0;
|
lcid=0;
|
||||||
|
|
||||||
UE_list->UE_sched_ctrl[UE_id].round[CC_idP][harq_pid] = 0;
|
UE_list->UE_sched_ctrl[UE_id].round[CC_idP][RA_template->harq_pid] = 0;
|
||||||
msg4_header = 1+6+1; // CR header, CR CE, SDU header
|
msg4_header = 1+6+1; // CR header, CR CE, SDU header
|
||||||
|
|
||||||
if ((RA_template->msg4_TBsize - rrc_sdu_length - msg4_header) <= 2) {
|
if ((RA_template->msg4_TBsize - rrc_sdu_length - msg4_header) <= 2) {
|
||||||
@@ -853,7 +852,7 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
|
|||||||
4, // aggregation_level
|
4, // aggregation_level
|
||||||
RA_template->rnti, // rnti
|
RA_template->rnti, // rnti
|
||||||
1, // rnti_type, CRNTI
|
1, // rnti_type, CRNTI
|
||||||
harq_pid, // harq_process
|
RA_template->harq_pid, // harq_process
|
||||||
1, // tpc, none
|
1, // tpc, none
|
||||||
getRIV(N_RB_DL,first_rb,4), // resource_block_coding
|
getRIV(N_RB_DL,first_rb,4), // resource_block_coding
|
||||||
RA_template->msg4_mcs, // mcs
|
RA_template->msg4_mcs, // mcs
|
||||||
@@ -861,7 +860,9 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
|
|||||||
0, // rv
|
0, // rv
|
||||||
0); // vrb_flag
|
0); // vrb_flag
|
||||||
|
|
||||||
if (!CCE_allocation_infeasible(module_idP,CC_idP,0,subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level,RA_template->rnti)) {
|
if (!CCE_allocation_infeasible(module_idP,CC_idP,0,
|
||||||
|
subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level,
|
||||||
|
RA_template->rnti)) {
|
||||||
dl_req->number_dci++;
|
dl_req->number_dci++;
|
||||||
dl_req->number_pdu++;
|
dl_req->number_pdu++;
|
||||||
|
|
||||||
@@ -872,10 +873,10 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
|
|||||||
|
|
||||||
lcid=0;
|
lcid=0;
|
||||||
|
|
||||||
// put HARQ process 0 round to IDLE
|
// put HARQ process round to 0
|
||||||
if (cc->tdd_Config) harq_pid = ((frameP*10)+subframeP)%10;
|
if (cc->tdd_Config) RA_template->harq_pid = ((frameP*10)+subframeP)%10;
|
||||||
else harq_pid = ((frameP*10)+subframeP)&7;
|
else RA_template->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][RA_template->harq_pid] = 0;
|
||||||
|
|
||||||
if ((RA_template->msg4_TBsize - rrc_sdu_length - msg4_header) <= 2) {
|
if ((RA_template->msg4_TBsize - rrc_sdu_length - msg4_header) <= 2) {
|
||||||
msg4_padding = RA_template->msg4_TBsize - rrc_sdu_length - msg4_header;
|
msg4_padding = RA_template->msg4_TBsize - rrc_sdu_length - msg4_header;
|
||||||
@@ -936,6 +937,7 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
|
|||||||
&eNB->pdu_index[CC_idP],
|
&eNB->pdu_index[CC_idP],
|
||||||
eNB->UE_list.DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0]);
|
eNB->UE_list.DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0]);
|
||||||
|
|
||||||
|
LOG_D(MAC,"Filling UCI ACK/NAK information, cce_idx %d\n",dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.cce_idx);
|
||||||
// Program PUCCH1a for ACK/NAK
|
// Program PUCCH1a for ACK/NAK
|
||||||
// Program ACK/NAK for Msg4 PDSCH
|
// Program ACK/NAK for Msg4 PDSCH
|
||||||
fill_nfapi_uci_acknak(module_idP,
|
fill_nfapi_uci_acknak(module_idP,
|
||||||
@@ -973,7 +975,7 @@ void check_Msg4_retransmission(module_id_t module_idP,int CC_idP,frame_t frameP,
|
|||||||
UE_list_t *UE_list=&eNB->UE_list;
|
UE_list_t *UE_list=&eNB->UE_list;
|
||||||
nfapi_dl_config_request_body_t *dl_req;
|
nfapi_dl_config_request_body_t *dl_req;
|
||||||
|
|
||||||
int round,harq_pid;
|
int round;
|
||||||
/*
|
/*
|
||||||
#ifdef Rel14
|
#ifdef Rel14
|
||||||
COMMON_channels_t *cc = eNB->common_channels;
|
COMMON_channels_t *cc = eNB->common_channels;
|
||||||
@@ -1013,18 +1015,16 @@ void check_Msg4_retransmission(module_id_t module_idP,int CC_idP,frame_t frameP,
|
|||||||
|
|
||||||
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");
|
||||||
if (cc[CC_idP].tdd_Config) harq_pid = ((frameP*10)+subframeP)%10;
|
|
||||||
else harq_pid = ((frameP*10)+subframeP)&7;
|
|
||||||
|
|
||||||
round = UE_list->UE_sched_ctrl[UE_id].round[CC_idP][harq_pid];
|
round = UE_list->UE_sched_ctrl[UE_id].round[CC_idP][RA_template->harq_pid];
|
||||||
vrb_map = cc[CC_idP].vrb_map;
|
vrb_map = cc[CC_idP].vrb_map;
|
||||||
|
|
||||||
dl_req = &eNB->DL_req[CC_idP].dl_config_request_body;
|
dl_req = &eNB->DL_req[CC_idP].dl_config_request_body;
|
||||||
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
||||||
N_RB_DL = to_prb(cc[CC_idP].mib->message.dl_Bandwidth);
|
N_RB_DL = to_prb(cc[CC_idP].mib->message.dl_Bandwidth);
|
||||||
|
|
||||||
LOG_D(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Checking if Msg4 was acknowledged (round %d)\n",
|
LOG_D(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Checking if Msg4 for harq_pid %d was acknowledged (round %d)\n",
|
||||||
module_idP,CC_idP,frameP,subframeP,round);
|
module_idP,CC_idP,frameP,subframeP,RA_template->harq_pid,round);
|
||||||
|
|
||||||
if (round!=8) {
|
if (round!=8) {
|
||||||
|
|
||||||
|
|||||||
@@ -1229,7 +1229,8 @@ uint16_t fill_nfapi_uci_acknak(module_id_t module_idP,
|
|||||||
absSFP,
|
absSFP,
|
||||||
&ul_config_pdu->uci_harq_pdu.harq_information,
|
&ul_config_pdu->uci_harq_pdu.harq_information,
|
||||||
cce_idxP);
|
cce_idxP);
|
||||||
LOG_D(MAC,"Filled in HARQ for rnti %x, cce_idxP %d-> n1_pucch %d\n",rntiP,cce_idxP,ul_config_pdu->uci_harq_pdu.harq_information.harq_information_rel9_fdd.n_pucch_1_0);
|
LOG_D(MAC,"Filled in HARQ for rnti %x SF %d.%d acknakSF %d.%d, cce_idxP %d-> n1_pucch %d\n",rntiP,
|
||||||
|
absSFP/10,absSFP%10,ackNAK_absSF/10,ackNAK_absSF%10,cce_idxP,ul_config_pdu->uci_harq_pdu.harq_information.harq_information_rel9_fdd.n_pucch_1_0);
|
||||||
|
|
||||||
ul_req->number_of_pdus++;
|
ul_req->number_of_pdus++;
|
||||||
|
|
||||||
@@ -2909,7 +2910,7 @@ boolean_t CCE_allocation_infeasible(int module_idP,
|
|||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti;
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti;
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = aggregation;
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = aggregation;
|
||||||
DL_req->number_pdu++;
|
DL_req->number_pdu++;
|
||||||
ret = allocate_CCEs(module_idP,CC_idP,subframe,1);
|
ret = allocate_CCEs(module_idP,CC_idP,subframe,0);
|
||||||
if (ret==-1)
|
if (ret==-1)
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
DL_req->number_pdu--;
|
DL_req->number_pdu--;
|
||||||
@@ -2918,7 +2919,7 @@ boolean_t CCE_allocation_infeasible(int module_idP,
|
|||||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.rnti = rnti;
|
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.rnti = rnti;
|
||||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.aggregation_level = aggregation;
|
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.aggregation_level = aggregation;
|
||||||
HI_DCI0_req->number_of_dci++;
|
HI_DCI0_req->number_of_dci++;
|
||||||
ret = allocate_CCEs(module_idP,CC_idP,subframe,1);
|
ret = allocate_CCEs(module_idP,CC_idP,subframe,0);
|
||||||
if (ret==-1)
|
if (ret==-1)
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
HI_DCI0_req->number_of_dci--;
|
HI_DCI0_req->number_of_dci--;
|
||||||
|
|||||||
@@ -205,9 +205,9 @@ int16_t glog_level = LOG_INFO;
|
|||||||
int16_t glog_verbosity = LOG_MED;
|
int16_t glog_verbosity = LOG_MED;
|
||||||
int16_t hw_log_level = LOG_INFO;
|
int16_t hw_log_level = LOG_INFO;
|
||||||
int16_t hw_log_verbosity = LOG_MED;
|
int16_t hw_log_verbosity = LOG_MED;
|
||||||
int16_t phy_log_level = LOG_INFO;
|
int16_t phy_log_level = LOG_DEBUG;
|
||||||
int16_t phy_log_verbosity = LOG_MED;
|
int16_t phy_log_verbosity = LOG_MED;
|
||||||
int16_t mac_log_level = LOG_INFO;
|
int16_t mac_log_level = LOG_DEBUG;
|
||||||
int16_t mac_log_verbosity = LOG_MED;
|
int16_t mac_log_verbosity = LOG_MED;
|
||||||
int16_t rlc_log_level = LOG_INFO;
|
int16_t rlc_log_level = LOG_INFO;
|
||||||
int16_t rlc_log_verbosity = LOG_MED;
|
int16_t rlc_log_verbosity = LOG_MED;
|
||||||
|
|||||||
Reference in New Issue
Block a user