debugging for TDD
This commit is contained in:
@@ -2660,7 +2660,7 @@ void fill_ulsch(PHY_VARS_eNB *eNB,nfapi_ul_config_ulsch_pdu *ulsch_pdu,int frame
|
|||||||
else if(ulsch->harq_processes[harq_pid]->n_DMRS == 7)
|
else if(ulsch->harq_processes[harq_pid]->n_DMRS == 7)
|
||||||
ulsch->harq_processes[harq_pid]->n_DMRS2 = 9;
|
ulsch->harq_processes[harq_pid]->n_DMRS2 = 9;
|
||||||
|
|
||||||
LOG_I(PHY,"[eNB %d][PUSCH %d] Frame %d, Subframe %d Programming PUSCH with n_DMRS2 %d (cshift %d) ulsch:ndi:%d ulsch_pdu:ndi:%d new_ulsch:%d status:%d ulsch_pdu:rvidx:%d\n",
|
LOG_D(PHY,"[eNB %d][PUSCH %d] Frame %d, Subframe %d Programming PUSCH with n_DMRS2 %d (cshift %d) ulsch:ndi:%d ulsch_pdu:ndi:%d new_ulsch:%d status:%d ulsch_pdu:rvidx:%d\n",
|
||||||
eNB->Mod_id,harq_pid,frame,subframe,
|
eNB->Mod_id,harq_pid,frame,subframe,
|
||||||
ulsch->harq_processes[harq_pid]->n_DMRS2,
|
ulsch->harq_processes[harq_pid]->n_DMRS2,
|
||||||
ulsch->harq_processes[harq_pid]->n_DMRS,
|
ulsch->harq_processes[harq_pid]->n_DMRS,
|
||||||
@@ -2692,7 +2692,7 @@ void fill_ulsch(PHY_VARS_eNB *eNB,nfapi_ul_config_ulsch_pdu *ulsch_pdu,int frame
|
|||||||
else ulsch->harq_processes[harq_pid]->round++;
|
else ulsch->harq_processes[harq_pid]->round++;
|
||||||
|
|
||||||
ulsch->rnti = ulsch_pdu->ulsch_pdu_rel8.rnti;
|
ulsch->rnti = ulsch_pdu->ulsch_pdu_rel8.rnti;
|
||||||
LOG_I(PHY,"Filling ULSCH %x (UE_id %d) (new_ulsch %d) for Frame %d, Subframe %d : harq_pid %d, status %d, handled %d, first_rb %d, nb_rb %d, rvidx %d, Qm %d, TBS %d, round %d \n",
|
LOG_D(PHY,"Filling ULSCH %x (UE_id %d) (new_ulsch %d) for Frame %d, Subframe %d : harq_pid %d, status %d, handled %d, first_rb %d, nb_rb %d, rvidx %d, Qm %d, TBS %d, round %d \n",
|
||||||
ulsch->rnti,
|
ulsch->rnti,
|
||||||
UE_id,
|
UE_id,
|
||||||
new_ulsch,
|
new_ulsch,
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
|
|||||||
if (ru->idx==0) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 1 );
|
if (ru->idx==0) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 1 );
|
||||||
|
|
||||||
if (packet_type == IF4p5_PDLFFT) {
|
if (packet_type == IF4p5_PDLFFT) {
|
||||||
//LOG_D(PHY,"send DL_IF4p5: RU %d frame %d, subframe %d\n",ru->idx,frame,subframe);
|
LOG_D(PHY,"send DL_IF4p5: RU %d frame %d, subframe %d\n",ru->idx,frame,subframe);
|
||||||
|
|
||||||
if (subframe_select(fp,subframe)==SF_S)
|
if (subframe_select(fp,subframe)==SF_S)
|
||||||
nsym=fp->dl_symbols_in_S_subframe;
|
nsym=fp->dl_symbols_in_S_subframe;
|
||||||
@@ -125,6 +125,8 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
|
|||||||
slotoffsetF = 0;
|
slotoffsetF = 0;
|
||||||
blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength;
|
blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength;
|
||||||
|
|
||||||
|
LOG_D(PHY,"send UL_IF4p5: RU %d frame %d, subframe %d\n",ru->idx,frame,subframe);
|
||||||
|
|
||||||
if (subframe_select(fp,subframe)==SF_S) {
|
if (subframe_select(fp,subframe)==SF_S) {
|
||||||
nsym=fp->ul_symbols_in_S_subframe;
|
nsym=fp->ul_symbols_in_S_subframe;
|
||||||
slotoffsetF += (fp->ofdm_symbol_size*(fp->symbols_per_tti-nsym));
|
slotoffsetF += (fp->ofdm_symbol_size*(fp->symbols_per_tti-nsym));
|
||||||
@@ -410,7 +412,7 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
|
|||||||
for (idx=0;idx<ru->num_eNB;idx++) ru->wakeup_prach_eNB(ru->eNB_list[idx],ru,*frame,*subframe);
|
for (idx=0;idx<ru->num_eNB;idx++) ru->wakeup_prach_eNB(ru->eNB_list[idx],ru,*frame,*subframe);
|
||||||
|
|
||||||
} else if (*packet_type == IF4p5_PULTICK) {
|
} else if (*packet_type == IF4p5_PULTICK) {
|
||||||
|
if (ru->idx==0) LOG_D(PHY,"UL_IF4p5: RU %d : frame %d, subframe %d, PULTICK\n",ru->idx,*frame,*subframe);
|
||||||
} else {
|
} else {
|
||||||
AssertFatal(1==0, "recv_IF4p5 - Unknown packet_type %x", *packet_type);
|
AssertFatal(1==0, "recv_IF4p5 - Unknown packet_type %x", *packet_type);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -336,7 +336,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
|
|||||||
#ifdef DEBUG_INITIAL_SYNCH
|
#ifdef DEBUG_INITIAL_SYNCH
|
||||||
LOG_I(PHY,"FDD Normal prefix: SSS error condition: sync_pos %d, sync_pos_slot %d\n", sync_pos, sync_pos_slot);
|
LOG_I(PHY,"FDD Normal prefix: SSS error condition: sync_pos %d, sync_pos_slot %d\n", sync_pos, sync_pos_slot);
|
||||||
#endif
|
#endif
|
||||||
write_output("rxdata.m","rxd",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
|
//write_output("rxdata.m","rxd",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -513,6 +513,18 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
|
|||||||
|
|
||||||
ue->pbch_vars[0]->pdu_errors_conseq=0;
|
ue->pbch_vars[0]->pdu_errors_conseq=0;
|
||||||
|
|
||||||
|
if (ue->frame_parms.frame_type==FDD) {
|
||||||
|
ue->N_TA_offset = 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (ue->frame_parms.N_RB_DL == 100)
|
||||||
|
ue->N_TA_offset = 624;
|
||||||
|
else if (ue->frame_parms.N_RB_DL == 50)
|
||||||
|
ue->N_TA_offset = 624/2;
|
||||||
|
else if (ue->frame_parms.N_RB_DL == 25)
|
||||||
|
ue->N_TA_offset = 624/4;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DISABLE_LOG_X
|
#if DISABLE_LOG_X
|
||||||
|
|||||||
@@ -1512,6 +1512,7 @@ void generate_phich_top(PHY_VARS_eNB *eNB,
|
|||||||
uint32_t pusch_frame;
|
uint32_t pusch_frame;
|
||||||
int subframe = proc->subframe_tx;
|
int subframe = proc->subframe_tx;
|
||||||
phich_config_t *phich;
|
phich_config_t *phich;
|
||||||
|
int absSF = subframe+(proc->frame_tx*10);
|
||||||
|
|
||||||
// compute Ngroup_PHICH (see formula at beginning of Section 6.9 in 36-211
|
// compute Ngroup_PHICH (see formula at beginning of Section 6.9 in 36-211
|
||||||
|
|
||||||
@@ -1523,15 +1524,19 @@ void generate_phich_top(PHY_VARS_eNB *eNB,
|
|||||||
if (frame_parms->Ncp == 1)
|
if (frame_parms->Ncp == 1)
|
||||||
NSF_PHICH = 2;
|
NSF_PHICH = 2;
|
||||||
|
|
||||||
if (eNB->phich_vars[subframe&1].num_hi > 0) {
|
|
||||||
|
|
||||||
|
|
||||||
|
for (i=0; i<MAX_NUM_PHICH; i++) {
|
||||||
|
|
||||||
|
phich = &eNB->phich_vars.config[i];
|
||||||
|
if (phich->active == 0 || phich->absSF != absSF) continue;
|
||||||
|
|
||||||
pusch_frame = phich_frame2_pusch_frame(frame_parms,proc->frame_tx,subframe);
|
pusch_frame = phich_frame2_pusch_frame(frame_parms,proc->frame_tx,subframe);
|
||||||
pusch_subframe = phich_subframe2_pusch_subframe(frame_parms,subframe);
|
pusch_subframe = phich_subframe2_pusch_subframe(frame_parms,subframe);
|
||||||
harq_pid = subframe2harq_pid(frame_parms,pusch_frame,pusch_subframe);
|
harq_pid = subframe2harq_pid(frame_parms,pusch_frame,pusch_subframe);
|
||||||
}
|
|
||||||
|
|
||||||
for (i=0; i<eNB->phich_vars[subframe&1].num_hi; i++) {
|
phich->active = 0;
|
||||||
|
|
||||||
phich = &eNB->phich_vars[subframe&1].config[i];
|
|
||||||
|
|
||||||
ngroup_PHICH = (phich->first_rb +
|
ngroup_PHICH = (phich->first_rb +
|
||||||
phich->n_DMRS)%Ngroup_PHICH;
|
phich->n_DMRS)%Ngroup_PHICH;
|
||||||
@@ -1565,6 +1570,6 @@ void generate_phich_top(PHY_VARS_eNB *eNB,
|
|||||||
phich->hi,
|
phich->hi,
|
||||||
subframe,
|
subframe,
|
||||||
txdataF);
|
txdataF);
|
||||||
}// for (i=0; i<eNB->phich_vars[subframe&1].num_hi; i++) {
|
}
|
||||||
eNB->phich_vars[subframe&1].num_hi=0;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2438,9 +2438,9 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
|
|||||||
} // aa
|
} // aa
|
||||||
|
|
||||||
|
|
||||||
LOG_D(PHY,"PUCCH 1a/b: subframe %d : stat %d,%d (pos %d)\n",subframe,stat_re,stat_im,
|
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]));
|
(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe]));
|
||||||
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);
|
LOG_I(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);
|
||||||
|
|
||||||
eNB->pucch1ab_stats[UE_id][(subframe<<11) + 2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_re);
|
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[UE_id][(subframe<<11) + 1+2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_im);
|
||||||
@@ -2454,11 +2454,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
|
|||||||
if (fmt==pucch_format1b)
|
if (fmt==pucch_format1b)
|
||||||
*(1+payload) = (stat_im<0) ? 1 : 2;
|
*(1+payload) = (stat_im<0) ? 1 : 2;
|
||||||
} else { // insufficient energy on PUCCH so NAK
|
} else { // insufficient energy on PUCCH so NAK
|
||||||
#if defined(USRP_REC_PLAY)
|
LOG_I(PHY,"PUCCH 1a/b (DTX): subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
|
||||||
LOG_D(PHY,"PUCCH 1a/b: NAK subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
|
|
||||||
#else
|
|
||||||
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);
|
|
||||||
#endif
|
|
||||||
*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);
|
||||||
|
|||||||
+1
-1
@@ -1020,7 +1020,7 @@ typedef struct PHY_VARS_eNB_s {
|
|||||||
#endif
|
#endif
|
||||||
Sched_Rsp_t Sched_INFO;
|
Sched_Rsp_t Sched_INFO;
|
||||||
LTE_eNB_PDCCH pdcch_vars[2];
|
LTE_eNB_PDCCH pdcch_vars[2];
|
||||||
LTE_eNB_PHICH phich_vars[2];
|
LTE_eNB_PHICH phich_vars;
|
||||||
#ifdef Rel14
|
#ifdef Rel14
|
||||||
LTE_eNB_EPDCCH epdcch_vars[2];
|
LTE_eNB_EPDCCH epdcch_vars[2];
|
||||||
LTE_eNB_MPDCCH mpdcch_vars[2];
|
LTE_eNB_MPDCCH mpdcch_vars[2];
|
||||||
|
|||||||
@@ -839,22 +839,24 @@ typedef struct {
|
|||||||
uint8_t dci_pdu[8];
|
uint8_t dci_pdu[8];
|
||||||
} mDCI_ALLOC_t;
|
} mDCI_ALLOC_t;
|
||||||
|
|
||||||
|
#define MAX_NUM_PDCCH 32
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t num_dci;
|
uint8_t num_dci;
|
||||||
uint8_t num_pdcch_symbols;
|
uint8_t num_pdcch_symbols;
|
||||||
DCI_ALLOC_t dci_alloc[32];
|
DCI_ALLOC_t dci_alloc[MAX_NUM_PDCCH];
|
||||||
} LTE_eNB_PDCCH;
|
} LTE_eNB_PDCCH;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
uint16_t absSF;
|
||||||
|
uint16_t active;
|
||||||
uint8_t hi;
|
uint8_t hi;
|
||||||
uint8_t first_rb;
|
uint8_t first_rb;
|
||||||
uint8_t n_DMRS;
|
uint8_t n_DMRS;
|
||||||
} phich_config_t;
|
} phich_config_t;
|
||||||
|
|
||||||
|
#define MAX_NUM_PHICH 32
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t num_hi;
|
phich_config_t config[MAX_NUM_PHICH];
|
||||||
phich_config_t config[32];
|
|
||||||
} LTE_eNB_PHICH;
|
} LTE_eNB_PHICH;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|||||||
@@ -95,7 +95,8 @@ void handle_nfapi_hi_dci0_dci_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_r
|
|||||||
void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t *proc,
|
void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t *proc,
|
||||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_config_pdu)
|
nfapi_hi_dci0_request_pdu_t *hi_dci0_config_pdu)
|
||||||
{
|
{
|
||||||
LTE_eNB_PHICH *phich = &eNB->phich_vars[subframe&1];
|
LTE_eNB_PHICH *phich = &eNB->phich_vars;
|
||||||
|
int i;
|
||||||
|
|
||||||
// copy dci configuration in to eNB structure
|
// copy dci configuration in to eNB structure
|
||||||
LOG_D(PHY,"Received HI PDU with value %d (rbstart %d,cshift %d)\n",
|
LOG_D(PHY,"Received HI PDU with value %d (rbstart %d,cshift %d)\n",
|
||||||
@@ -104,11 +105,14 @@ void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rx
|
|||||||
hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms);
|
hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms);
|
||||||
|
|
||||||
// DJP - TODO FIXME - transmission power ignored
|
// DJP - TODO FIXME - transmission power ignored
|
||||||
phich->config[phich->num_hi].hi = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.hi_value;
|
for (i=0;i<32;i++) if (phich->config[i].active==0) break;
|
||||||
phich->config[phich->num_hi].first_rb = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.resource_block_start;
|
AssertFatal(i<32,"no free PHICH allocation\n");
|
||||||
phich->config[phich->num_hi].n_DMRS = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms;
|
|
||||||
phich->num_hi++;
|
phich->config[i].active = 0;
|
||||||
AssertFatal(phich->num_hi<32,"Maximum number of phich reached in subframe\n");
|
phich->config[i].absSF = (frame*10)+subframe;
|
||||||
|
phich->config[i].hi = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.hi_value;
|
||||||
|
phich->config[i].first_rb = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.resource_block_start;
|
||||||
|
phich->config[i].n_DMRS = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms;
|
||||||
}
|
}
|
||||||
|
|
||||||
void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
|
void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
|
||||||
@@ -488,7 +492,7 @@ void handle_uci_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu
|
|||||||
{
|
{
|
||||||
LTE_eNB_UCI *uci = &eNB->uci_vars[UE_id];
|
LTE_eNB_UCI *uci = &eNB->uci_vars[UE_id];
|
||||||
|
|
||||||
LOG_D(PHY,"Frame %d, Subframe %d: Programming UCI_HARQ process (type %d)\n",frame,subframe,HARQ);
|
LOG_I(PHY,"Frame %d, Subframe %d: Programming UCI_HARQ process (type %d)\n",frame,subframe,HARQ);
|
||||||
uci->frame = frame;
|
uci->frame = frame;
|
||||||
uci->subframe = subframe;
|
uci->subframe = subframe;
|
||||||
uci->rnti = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti;
|
uci->rnti = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti;
|
||||||
@@ -537,7 +541,7 @@ void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
|
|||||||
if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_PDU_TYPE) {
|
if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_PDU_TYPE) {
|
||||||
AssertFatal((UE_id = find_ulsch(ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE))>=0,
|
AssertFatal((UE_id = find_ulsch(ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE))>=0,
|
||||||
"No existing UE ULSCH for rnti %x\n",rel8->rnti);
|
"No existing UE ULSCH for rnti %x\n",rel8->rnti);
|
||||||
LOG_I(PHY,"Applying UL config for UE %d, rnti %x in frame %d, subframe %d, modulation %d, rvidx %d\n", UE_id,rel8->rnti,frame,subframe,rel8->modulation_type,rel8->redundancy_version);
|
LOG_D(PHY,"Applying UL config for UE %d, rnti %x in frame %d, subframe %d, modulation %d, rvidx %d\n", UE_id,rel8->rnti,frame,subframe,rel8->modulation_type,rel8->redundancy_version);
|
||||||
|
|
||||||
fill_ulsch(eNB,&ul_config_pdu->ulsch_pdu,frame,subframe);
|
fill_ulsch(eNB,&ul_config_pdu->ulsch_pdu,frame,subframe);
|
||||||
|
|
||||||
@@ -653,7 +657,6 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
|
|||||||
|
|
||||||
eNB->pdcch_vars[subframe&1].num_pdcch_symbols = number_pdcch_ofdm_symbols;
|
eNB->pdcch_vars[subframe&1].num_pdcch_symbols = number_pdcch_ofdm_symbols;
|
||||||
eNB->pdcch_vars[subframe&1].num_dci = 0;
|
eNB->pdcch_vars[subframe&1].num_dci = 0;
|
||||||
eNB->phich_vars[subframe&1].num_hi = 0;
|
|
||||||
|
|
||||||
LOG_I(PHY,"NFAPI: Sched_INFO:SFN/SF:%04d%d DL_req:SFN/SF:%04d%d:dl_pdu:%d tx_req:SFN/SF:%04d%d:pdus:%d hi_dci0:SFN/SF:%04d%d:pdus:%d ul_cfg:SFN/SF:%04d%d:pdus:%d num_pdcch_symbols:%d\n",
|
LOG_I(PHY,"NFAPI: Sched_INFO:SFN/SF:%04d%d DL_req:SFN/SF:%04d%d:dl_pdu:%d tx_req:SFN/SF:%04d%d:pdus:%d hi_dci0:SFN/SF:%04d%d:pdus:%d ul_cfg:SFN/SF:%04d%d:pdus:%d num_pdcch_symbols:%d\n",
|
||||||
frame,subframe,
|
frame,subframe,
|
||||||
|
|||||||
@@ -841,7 +841,7 @@ lte_subframe_t get_subframe_direction(uint8_t Mod_id,uint8_t CC_id,uint8_t subfr
|
|||||||
uint8_t phich_subframe_to_harq_pid(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t subframe)
|
uint8_t phich_subframe_to_harq_pid(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t subframe)
|
||||||
{
|
{
|
||||||
|
|
||||||
LOG_I(PHY,"phich_subframe_to_harq_pid.c: frame %d, subframe %d\n",frame,subframe);
|
LOG_D(PHY,"phich_subframe_to_harq_pid.c: frame %d, subframe %d\n",frame,subframe);
|
||||||
return(subframe2harq_pid(frame_parms,
|
return(subframe2harq_pid(frame_parms,
|
||||||
phich_frame2_pusch_frame(frame_parms,frame,subframe),
|
phich_frame2_pusch_frame(frame_parms,frame,subframe),
|
||||||
phich_subframe2_pusch_subframe(frame_parms,subframe)));
|
phich_subframe2_pusch_subframe(frame_parms,subframe)));
|
||||||
|
|||||||
@@ -773,7 +773,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
|||||||
frame,subframe,
|
frame,subframe,
|
||||||
pucch_b0b1[0][0],metric[0]);
|
pucch_b0b1[0][0],metric[0]);
|
||||||
|
|
||||||
uci->stat = metric[0];
|
uci->stat = metric[0];
|
||||||
fill_uci_harq_indication(eNB,uci,frame,subframe,pucch_b0b1[0],0,0xffff);
|
fill_uci_harq_indication(eNB,uci,frame,subframe,pucch_b0b1[0],0,0xffff);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -782,12 +782,12 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
|||||||
|
|
||||||
// if SR was detected, use the n1_pucch from SR
|
// if SR was detected, use the n1_pucch from SR
|
||||||
if (SR_payload==1) {
|
if (SR_payload==1) {
|
||||||
#ifdef DEBUG_PHY_PROC
|
|
||||||
LOG_D(PHY,"[eNB %d][PDSCH %x] Frame %d subframe %d Checking ACK/NAK (%d,%d,%d,%d) format %d with SR\n",eNB->Mod_id,
|
LOG_D(PHY,"[eNB %d][PDSCH %x] Frame %d subframe %d Checking ACK/NAK format %d with SR\n",eNB->Mod_id,
|
||||||
eNB->dlsch[UE_id][0]->rnti,
|
uci->rnti,
|
||||||
frame,subframe,
|
frame,subframe,
|
||||||
n1_pucch0,n1_pucch1,n1_pucch2,n1_pucch3,format);
|
uci->pucch_fmt);
|
||||||
#endif
|
|
||||||
|
|
||||||
metric[0] = rx_pucch(eNB,
|
metric[0] = rx_pucch(eNB,
|
||||||
pucch_format1b,
|
pucch_format1b,
|
||||||
@@ -800,9 +800,9 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
|||||||
subframe,
|
subframe,
|
||||||
PUCCH1a_THRES);
|
PUCCH1a_THRES);
|
||||||
} else { //using assigned pucch resources
|
} else { //using assigned pucch resources
|
||||||
#ifdef DEBUG_PHY_PROC
|
|
||||||
LOG_D(PHY,"[eNB %d][PDSCH %x] Frame %d subframe %d Checking ACK/NAK M=%d (%d,%d,%d,%d) format %d\n",eNB->Mod_id,
|
LOG_I(PHY,"[eNB %d][PDSCH %x] Frame %d subframe %d Checking ACK/NAK M=%d (%d,%d,%d,%d) format %d\n",eNB->Mod_id,
|
||||||
eNB->dlsch[UE_id][0]->rnti,
|
uci->rnti,
|
||||||
frame,subframe,
|
frame,subframe,
|
||||||
uci->num_pucch_resources,
|
uci->num_pucch_resources,
|
||||||
uci->n_pucch_1[res][0],
|
uci->n_pucch_1[res][0],
|
||||||
@@ -810,7 +810,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
|||||||
uci->n_pucch_1[res][2],
|
uci->n_pucch_1[res][2],
|
||||||
uci->n_pucch_1[res][3],
|
uci->n_pucch_1[res][3],
|
||||||
uci->pucch_fmt);
|
uci->pucch_fmt);
|
||||||
#endif
|
|
||||||
for (res=0;res<uci->num_pucch_resources;res++)
|
for (res=0;res<uci->num_pucch_resources;res++)
|
||||||
metric[res] = rx_pucch(eNB,
|
metric[res] = rx_pucch(eNB,
|
||||||
uci->pucch_fmt,
|
uci->pucch_fmt,
|
||||||
@@ -844,7 +844,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
|||||||
else if (pucch_b0b1[1][0] != 1 && pucch_b0b1[1][1] != 1) { // 0 ACKs, or at least one DL assignment missed
|
else if (pucch_b0b1[1][0] != 1 && pucch_b0b1[1][1] != 1) { // 0 ACKs, or at least one DL assignment missed
|
||||||
harq_ack[0] = 0;
|
harq_ack[0] = 0;
|
||||||
}
|
}
|
||||||
uci->stat = metric[0];
|
uci->stat = metric[0];
|
||||||
fill_uci_harq_indication(eNB,uci,frame,subframe,harq_ack,2,0xffff); // special_bundling mode
|
fill_uci_harq_indication(eNB,uci,frame,subframe,harq_ack,2,0xffff); // special_bundling mode
|
||||||
}
|
}
|
||||||
else if ((uci->tdd_bundling == 0) && (uci->num_pucch_resources==2)){ // multiplexing + no SR, implement Table 10.1.3-5 (Rel14) for multiplexing with M=2
|
else if ((uci->tdd_bundling == 0) && (uci->num_pucch_resources==2)){ // multiplexing + no SR, implement Table 10.1.3-5 (Rel14) for multiplexing with M=2
|
||||||
@@ -886,7 +886,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uci->stat = max(metric[0],metric[1]);
|
uci->stat = max(metric[0],metric[1]);
|
||||||
fill_uci_harq_indication(eNB,uci,frame,subframe,harq_ack,1,tdd_multiplexing_mask); // multiplexing mode
|
fill_uci_harq_indication(eNB,uci,frame,subframe,harq_ack,1,tdd_multiplexing_mask); // multiplexing mode
|
||||||
} //else if ((uci->tdd_bundling == 0) && (res==2))
|
} //else if ((uci->tdd_bundling == 0) && (res==2))
|
||||||
else if ((uci->tdd_bundling == 0) && (uci->num_pucch_resources==3)){ // multiplexing + no SR, implement Table 10.1.3-6 (Rel14) for multiplexing with M=3
|
else if ((uci->tdd_bundling == 0) && (uci->num_pucch_resources==3)){ // multiplexing + no SR, implement Table 10.1.3-6 (Rel14) for multiplexing with M=3
|
||||||
@@ -1105,22 +1105,22 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uci->stat = max_metric;
|
uci->stat = max_metric;
|
||||||
fill_uci_harq_indication(eNB,uci,frame,subframe,harq_ack,1,tdd_multiplexing_mask); // multiplexing mode
|
fill_uci_harq_indication(eNB,uci,frame,subframe,harq_ack,1,tdd_multiplexing_mask); // multiplexing mode
|
||||||
} // else if ((uci->tdd_bundling == 0) && (res==4))
|
} // else if ((uci->tdd_bundling == 0) && (res==4))
|
||||||
else { // bundling
|
else { // bundling
|
||||||
harq_ack[0] = pucch_b0b1[0][0];
|
harq_ack[0] = pucch_b0b1[0][0];
|
||||||
harq_ack[1] = pucch_b0b1[0][1];
|
harq_ack[1] = pucch_b0b1[0][1];
|
||||||
uci->stat = metric[0];
|
uci->stat = metric[0];
|
||||||
fill_uci_harq_indication(eNB,uci,frame,subframe,harq_ack,0,0xffff); // special_bundling mode
|
fill_uci_harq_indication(eNB,uci,frame,subframe,harq_ack,0,0xffff); // special_bundling mode
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_PHY_PROC
|
|
||||||
LOG_D(PHY,"[eNB %d][PDSCH %x] Frame %d subframe %d ACK/NAK metric 0 %d, metric 1 %d, (%d,%d)\n",eNB->Mod_id,
|
LOG_I(PHY,"[eNB %d][PDSCH %x] Frame %d subframe %d ACK/NAK metric 0 %d, metric 1 %d, (%d,%d)\n",eNB->Mod_id,
|
||||||
eNB->dlsch[UE_id][0]->rnti,
|
uci->rnti,
|
||||||
frame,subframe,
|
frame,subframe,
|
||||||
metric0,metric1,pucch_b0b1[0],pucch_b0b1[1]);
|
metric[0],metric[1],pucch_b0b1[0][0],pucch_b0b1[0][1]);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -1159,11 +1159,11 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
|||||||
|
|
||||||
harq_pid = ((10*frame) + subframe)&7;
|
harq_pid = ((10*frame) + subframe)&7;
|
||||||
|
|
||||||
LOG_I(PHY,"Running eNB pusch procedures in %d.%d, harq_pid %d\n",frame,subframe,harq_pid);
|
LOG_D(PHY,"Running eNB pusch procedures in %d.%d, harq_pid %d\n",frame,subframe,harq_pid);
|
||||||
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
|
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
|
||||||
ulsch = eNB->ulsch[i];
|
ulsch = eNB->ulsch[i];
|
||||||
ulsch_harq = ulsch->harq_processes[harq_pid];
|
ulsch_harq = ulsch->harq_processes[harq_pid];
|
||||||
if (ulsch->rnti>0) LOG_I(PHY,"eNB->ulsch[%d]->harq_processes[harq_pid:%d] SFN/SF:%04d%d: PUSCH procedures, UE %d/%x ulsch_harq[status:%d SFN/SF:%04d%d handled:%d]\n",
|
if (ulsch->rnti>0) LOG_D(PHY,"eNB->ulsch[%d]->harq_processes[harq_pid:%d] SFN/SF:%04d%d: PUSCH procedures, UE %d/%x ulsch_harq[status:%d SFN/SF:%04d%d handled:%d]\n",
|
||||||
i, harq_pid, frame,subframe,i,ulsch->rnti,
|
i, harq_pid, frame,subframe,i,ulsch->rnti,
|
||||||
ulsch_harq->status, ulsch_harq->frame, ulsch_harq->subframe, ulsch_harq->handled);
|
ulsch_harq->status, ulsch_harq->frame, ulsch_harq->subframe, ulsch_harq->handled);
|
||||||
|
|
||||||
@@ -1182,7 +1182,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
|||||||
eNB->rb_mask_ul[rb2>>5] |= (1<<(rb2&31));
|
eNB->rb_mask_ul[rb2>>5] |= (1<<(rb2&31));
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_I(PHY,"[eNB %d] frame %d, subframe %d: Scheduling ULSCH Reception for UE %d \n", eNB->Mod_id, frame, subframe, i);
|
LOG_D(PHY,"[eNB %d] frame %d, subframe %d: Scheduling ULSCH Reception for UE %d \n", eNB->Mod_id, frame, subframe, i);
|
||||||
|
|
||||||
nPRS = fp->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[subframe<<1];
|
nPRS = fp->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[subframe<<1];
|
||||||
|
|
||||||
@@ -1190,7 +1190,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
|||||||
fp->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift +
|
fp->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift +
|
||||||
nPRS)%12;
|
nPRS)%12;
|
||||||
|
|
||||||
LOG_I(PHY,
|
LOG_D(PHY,
|
||||||
"[eNB %d][PUSCH %d] Frame %d Subframe %d Demodulating PUSCH: dci_alloc %d, rar_alloc %d, round %d, first_rb %d, nb_rb %d, Qm %d, TBS %d, rv %d, cyclic_shift %d (n_DMRS2 %d, cyclicShift_common %d, ), O_ACK %d, beta_cqi %d \n",
|
"[eNB %d][PUSCH %d] Frame %d Subframe %d Demodulating PUSCH: dci_alloc %d, rar_alloc %d, round %d, first_rb %d, nb_rb %d, Qm %d, TBS %d, rv %d, cyclic_shift %d (n_DMRS2 %d, cyclicShift_common %d, ), O_ACK %d, beta_cqi %d \n",
|
||||||
eNB->Mod_id,harq_pid,frame,subframe,
|
eNB->Mod_id,harq_pid,frame,subframe,
|
||||||
ulsch_harq->dci_alloc,
|
ulsch_harq->dci_alloc,
|
||||||
@@ -1223,7 +1223,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
|||||||
|
|
||||||
stop_meas(&eNB->ulsch_decoding_stats);
|
stop_meas(&eNB->ulsch_decoding_stats);
|
||||||
|
|
||||||
LOG_I(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d RNTI %x RX power (%d,%d) N0 (%d,%d) dB ACK (%d,%d), decoding iter %d ulsch_harq->cqi_crc_status:%d ackBits:%d ulsch_decoding_stats[t:%lld max:%lld]\n",
|
LOG_D(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d RNTI %x RX power (%d,%d) N0 (%d,%d) dB ACK (%d,%d), decoding iter %d ulsch_harq->cqi_crc_status:%d ackBits:%d ulsch_decoding_stats[t:%lld max:%lld]\n",
|
||||||
eNB->Mod_id,harq_pid,
|
eNB->Mod_id,harq_pid,
|
||||||
frame,subframe,
|
frame,subframe,
|
||||||
ulsch->rnti,
|
ulsch->rnti,
|
||||||
@@ -1259,7 +1259,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
|||||||
fill_crc_indication(eNB,i,frame,subframe,1); // indicate NAK to MAC
|
fill_crc_indication(eNB,i,frame,subframe,1); // indicate NAK to MAC
|
||||||
fill_rx_indication(eNB,i,frame,subframe); // indicate SDU to MAC
|
fill_rx_indication(eNB,i,frame,subframe); // indicate SDU to MAC
|
||||||
|
|
||||||
LOG_I(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d UE %d Error receiving ULSCH, round %d/%d (ACK %d,%d)\n",
|
LOG_D(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d UE %d Error receiving ULSCH, round %d/%d (ACK %d,%d)\n",
|
||||||
eNB->Mod_id,harq_pid,
|
eNB->Mod_id,harq_pid,
|
||||||
frame,subframe, i,
|
frame,subframe, i,
|
||||||
ulsch_harq->round,
|
ulsch_harq->round,
|
||||||
@@ -1830,7 +1830,7 @@ void fill_uci_harq_indication(PHY_VARS_eNB *eNB,
|
|||||||
|
|
||||||
|
|
||||||
eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs++;
|
eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs++;
|
||||||
LOG_D(PHY,"Incremented eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs:%d\n", eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs);
|
LOG_I(PHY,"Incremented eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs:%d\n", eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs);
|
||||||
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
|
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1878,7 +1878,7 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const
|
|||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC, 1 );
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC, 1 );
|
||||||
|
|
||||||
LOG_D(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_uespec_RX(%d)\n",eNB->Mod_id,frame, subframe);
|
LOG_I(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_uespec_RX(%d)\n",eNB->Mod_id,frame, subframe);
|
||||||
|
|
||||||
eNB->rb_mask_ul[0]=0;
|
eNB->rb_mask_ul[0]=0;
|
||||||
eNB->rb_mask_ul[1]=0;
|
eNB->rb_mask_ul[1]=0;
|
||||||
|
|||||||
@@ -2161,7 +2161,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
|
|||||||
&len);
|
&len);
|
||||||
|
|
||||||
|
|
||||||
LOG_D(PHY,"PUCCH feedback AbsSubframe %d.%d SR %d NbCW %d (%d %d) AckNack %d.%d CQI %d RI %d format %d pucch_resource %d pucch_payload %d %d \n",
|
LOG_I(PHY,"PUCCH feedback AbsSubframe %d.%d SR %d NbCW %d (%d %d) AckNack %d.%d CQI %d RI %d format %d pucch_resource %d pucch_payload %d %d \n",
|
||||||
frame_tx%1024, subframe_tx, SR_payload, nb_cw, ack_status_cw0, ack_status_cw1, pucch_ack_payload[0], pucch_ack_payload[1], cqi_status, ri_status, format, pucch_resource,pucch_payload[0],pucch_payload[1]);
|
frame_tx%1024, subframe_tx, SR_payload, nb_cw, ack_status_cw0, ack_status_cw1, pucch_ack_payload[0], pucch_ack_payload[1], cqi_status, ri_status, format, pucch_resource,pucch_payload[0],pucch_payload[1]);
|
||||||
|
|
||||||
// Part - IV
|
// Part - IV
|
||||||
|
|||||||
@@ -108,8 +108,7 @@ schedule_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
|||||||
if ((1 << tmp) & deltaTSFC) {
|
if ((1 << tmp) & deltaTSFC) {
|
||||||
// This is an SRS subframe, loop over UEs
|
// This is an SRS subframe, loop over UEs
|
||||||
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
|
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
|
||||||
if (RC.mac[module_idP]->UE_list.active[UE_id] != TRUE)
|
if (RC.mac[module_idP]->UE_list.active[UE_id] != TRUE) continue;
|
||||||
continue;
|
|
||||||
ul_req = &RC.mac[module_idP]->UL_req[CC_id].ul_config_request_body;
|
ul_req = &RC.mac[module_idP]->UL_req[CC_id].ul_config_request_body;
|
||||||
// drop the allocation if the UE hasn't send RRCConnectionSetupComplete yet
|
// drop the allocation if the UE hasn't send RRCConnectionSetupComplete yet
|
||||||
if (mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED) continue;
|
if (mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED) continue;
|
||||||
@@ -124,6 +123,7 @@ schedule_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
|||||||
soundingRS_UL_ConfigDedicated->choice.
|
soundingRS_UL_ConfigDedicated->choice.
|
||||||
setup.srs_ConfigIndex,
|
setup.srs_ConfigIndex,
|
||||||
&srsPeriodicity, &srsOffset);
|
&srsPeriodicity, &srsOffset);
|
||||||
|
|
||||||
if (((10 * frameP + subframeP) % srsPeriodicity) == srsOffset) {
|
if (((10 * frameP + subframeP) % srsPeriodicity) == srsOffset) {
|
||||||
// Program SRS
|
// Program SRS
|
||||||
ul_req->srs_present = 1;
|
ul_req->srs_present = 1;
|
||||||
@@ -262,7 +262,7 @@ schedule_SR(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
|||||||
ul_req_body = &ul_req->ul_config_request_body;
|
ul_req_body = &ul_req->ul_config_request_body;
|
||||||
|
|
||||||
// drop the allocation if the UE hasn't send RRCConnectionSetupComplete yet
|
// drop the allocation if the UE hasn't send RRCConnectionSetupComplete yet
|
||||||
if (mac_eNB_get_rrc_status(module_idP, UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED) continue;
|
//if (mac_eNB_get_rrc_status(module_idP, UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED) continue;
|
||||||
|
|
||||||
AssertFatal(UE_list->
|
AssertFatal(UE_list->
|
||||||
UE_template[CC_id][UE_id].physicalConfigDedicated!= NULL,
|
UE_template[CC_id][UE_id].physicalConfigDedicated!= NULL,
|
||||||
|
|||||||
@@ -1053,11 +1053,17 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
|
|||||||
"Frame %d, Subframe %d: Preparing for Msg4 retransmission currently %d.%d\n",
|
"Frame %d, Subframe %d: Preparing for Msg4 retransmission currently %d.%d\n",
|
||||||
frameP, subframeP, ra->Msg4_frame,
|
frameP, subframeP, ra->Msg4_frame,
|
||||||
ra->Msg4_subframe);
|
ra->Msg4_subframe);
|
||||||
if (ra->Msg4_subframe > 1)
|
if (cc[CC_idP].tdd_Config == NULL) {
|
||||||
|
if (ra->Msg4_subframe > 1)
|
||||||
ra->Msg4_frame++;
|
ra->Msg4_frame++;
|
||||||
ra->Msg4_frame &= 1023;
|
ra->Msg4_frame &= 1023;
|
||||||
ra->Msg4_subframe = (ra->Msg4_subframe + 8) % 10;
|
ra->Msg4_subframe = (ra->Msg4_subframe + 8) % 10;
|
||||||
LOG_D(MAC,
|
}
|
||||||
|
else {
|
||||||
|
ra->Msg4_frame++;
|
||||||
|
ra->Msg4_frame &= 1023;
|
||||||
|
}
|
||||||
|
LOG_I(MAC,
|
||||||
"Frame %d, Subframe %d: Msg4 retransmission in %d.%d\n",
|
"Frame %d, Subframe %d: Msg4 retransmission in %d.%d\n",
|
||||||
frameP, subframeP, ra->Msg4_frame,
|
frameP, subframeP, ra->Msg4_frame,
|
||||||
ra->Msg4_subframe);
|
ra->Msg4_subframe);
|
||||||
@@ -1132,7 +1138,7 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
|
|||||||
|
|
||||||
dl_req->sfn_sf = mac->TX_req[CC_idP].sfn_sf;
|
dl_req->sfn_sf = mac->TX_req[CC_idP].sfn_sf;
|
||||||
|
|
||||||
LOG_D(MAC, "Filling UCI ACK/NAK information, cce_idx %d\n",
|
LOG_I(MAC, "Filling UCI ACK/NAK information, cce_idx %d\n",
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.cce_idx);
|
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
|
||||||
@@ -1321,20 +1327,24 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
|
|||||||
dci_dl_pdu_rel8.cce_idx);
|
dci_dl_pdu_rel8.cce_idx);
|
||||||
|
|
||||||
// prepare frame for retransmission
|
// prepare frame for retransmission
|
||||||
if (ra->Msg4_subframe > 1)
|
if (cc->tdd_Config==NULL) {
|
||||||
|
if (ra->Msg4_subframe > 1)
|
||||||
ra->Msg4_frame++;
|
ra->Msg4_frame++;
|
||||||
ra->Msg4_frame &= 1023;
|
ra->Msg4_frame &= 1023;
|
||||||
ra->Msg4_subframe = (ra->Msg4_subframe + 8) % 10;
|
ra->Msg4_subframe = (ra->Msg4_subframe + 8) % 10;
|
||||||
|
}
|
||||||
|
else ra->Msg4_frame++;
|
||||||
|
|
||||||
LOG_W(MAC,
|
LOG_W(MAC,
|
||||||
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Msg4 not acknowledged, adding ue specific dci (rnti %x) for RA (Msg4 Retransmission round %d in %d.%d)\n",
|
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Msg4 not acknowledged, adding ue specific dci (rnti %x) for RA (Msg4 Retransmission round %d in %d.%d)\n",
|
||||||
module_idP, CC_idP, frameP, subframeP, ra->rnti,
|
module_idP, CC_idP, frameP, subframeP, ra->rnti,
|
||||||
round, ra->Msg4_frame, ra->Msg4_subframe);
|
round, ra->Msg4_frame, ra->Msg4_subframe);
|
||||||
|
AssertFatal(1==0,"Shouldn't happen exit\n");
|
||||||
|
|
||||||
} // Msg4 frame/subframe
|
} // Msg4 frame/subframe
|
||||||
} // regular LTE case
|
} // regular LTE case
|
||||||
} else {
|
} else {
|
||||||
LOG_D(MAC,
|
LOG_I(MAC,
|
||||||
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d : Msg4 acknowledged\n",
|
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d : Msg4 acknowledged\n",
|
||||||
module_idP, CC_idP, frameP, subframeP);
|
module_idP, CC_idP, frameP, subframeP);
|
||||||
ra->state = IDLE;
|
ra->state = IDLE;
|
||||||
@@ -1370,7 +1380,7 @@ schedule_RA(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
|||||||
|
|
||||||
ra = (RA_t *) & cc[CC_id].ra[i];
|
ra = (RA_t *) & cc[CC_id].ra[i];
|
||||||
|
|
||||||
LOG_I(MAC,"RA[state:%d]\n",ra->state);
|
LOG_D(MAC,"RA[state:%d]\n",ra->state);
|
||||||
|
|
||||||
if (ra->state == MSG2)
|
if (ra->state == MSG2)
|
||||||
generate_Msg2(module_idP, CC_id, frameP, subframeP, ra);
|
generate_Msg2(module_idP, CC_id, frameP, subframeP, ra);
|
||||||
|
|||||||
@@ -627,7 +627,7 @@ uint16_t get_pucch1_absSF(COMMON_channels_t * cc, uint16_t dlsch_absSF)
|
|||||||
case 3:
|
case 3:
|
||||||
if ((sf == 5) || (sf == 6) || (sf == 7) || (sf == 8)
|
if ((sf == 5) || (sf == 6) || (sf == 7) || (sf == 8)
|
||||||
|| (sf == 9))
|
|| (sf == 9))
|
||||||
return ((10 * nextf) + (sf >> 1)); // ACK/NAK in 2,3,4 resp. next frame
|
return ((10 * nextf) + ((sf-1) >> 1)); // ACK/NAK in 2,3,4 resp. next frame
|
||||||
else if (sf == 1)
|
else if (sf == 1)
|
||||||
return ((10 * nextf) + 2); // ACK/NAK in 2 next frame
|
return ((10 * nextf) + 2); // ACK/NAK in 2 next frame
|
||||||
else if (sf == 0)
|
else if (sf == 0)
|
||||||
@@ -1380,7 +1380,7 @@ fill_nfapi_uci_acknak(module_id_t module_idP,
|
|||||||
rntiP,
|
rntiP,
|
||||||
absSFP,
|
absSFP,
|
||||||
&ul_config_pdu->uci_harq_pdu.harq_information, cce_idxP);
|
&ul_config_pdu->uci_harq_pdu.harq_information, cce_idxP);
|
||||||
LOG_D(MAC,
|
LOG_I(MAC,
|
||||||
"Filled in UCI HARQ request for rnti %x SF %d.%d acknakSF %d.%d, cce_idxP %d-> n1_pucch %d\n",
|
"Filled in UCI HARQ request for rnti %x SF %d.%d acknakSF %d.%d, cce_idxP %d-> n1_pucch %d\n",
|
||||||
rntiP, absSFP / 10, absSFP % 10, ackNAK_absSF / 10,
|
rntiP, absSFP / 10, absSFP % 10, ackNAK_absSF / 10,
|
||||||
ackNAK_absSF % 10, cce_idxP,
|
ackNAK_absSF % 10, cce_idxP,
|
||||||
@@ -3255,14 +3255,89 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
|
|||||||
AssertFatal(numCC == 1,
|
AssertFatal(numCC == 1,
|
||||||
"numCC %d > 1, should not be using Format1a/b\n",
|
"numCC %d > 1, should not be using Format1a/b\n",
|
||||||
numCC);
|
numCC);
|
||||||
break;
|
|
||||||
|
uint8_t harq_pid = ((10 * frameP) + subframeP + 10236) & 7;
|
||||||
|
|
||||||
|
LOG_I(MAC,"frame %d subframe %d harq_pid %d mode %d tmode[0] %d num_ack_nak %d round %d\n",frameP,subframeP,harq_pid,harq_indication_fdd->mode,tmode[0],num_ack_nak,sched_ctl->round[CC_idP][harq_pid]);
|
||||||
|
|
||||||
|
AssertFatal(numCC == 1,
|
||||||
|
"numCC %d > 1, should not be using Format1a/b\n",
|
||||||
|
numCC);
|
||||||
|
|
||||||
|
|
||||||
|
if (tmode[0] == 1 || tmode[0] == 2 || tmode[0] == 5 || tmode[0] == 6 || tmode[0] == 7) { // NOTE: have to handle the case of TM9-10 with 1 antenna port
|
||||||
|
// single ACK/NAK bit
|
||||||
|
AssertFatal(num_ack_nak == 1,
|
||||||
|
"num_ack_nak %d > 1 for 1 CC and single-layer transmission frame:%d subframe:%d\n",
|
||||||
|
num_ack_nak,frameP,subframeP);
|
||||||
|
AssertFatal(sched_ctl->round[CC_idP][harq_pid] < 8,
|
||||||
|
"Got ACK/NAK for inactive harq_pid %d for UE %d/%x\n",
|
||||||
|
harq_pid, UE_id, rnti);
|
||||||
|
AssertFatal(pdu[0] == 1 || pdu[0] == 2
|
||||||
|
|| pdu[0] == 4,
|
||||||
|
"Received ACK/NAK %d which is not 1 or 2 for harq_pid %d from UE %d/%x\n",
|
||||||
|
pdu[0], harq_pid, UE_id, rnti);
|
||||||
|
LOG_D(MAC, "Received %d for harq_pid %d\n", pdu[0],
|
||||||
|
harq_pid);
|
||||||
|
|
||||||
|
pdu = &harq_indication_fdd->harq_data[0].bundling.value_0;
|
||||||
|
if (pdu[0] == 1) { // ACK
|
||||||
|
sched_ctl->round[CC_idP][harq_pid] = 8; // release HARQ process
|
||||||
|
sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
|
||||||
|
} else if (pdu[0] == 2 || pdu[0] == 4) // NAK (treat DTX as NAK)
|
||||||
|
sched_ctl->round[CC_idP][harq_pid]++; // increment round
|
||||||
|
} else {
|
||||||
|
// one or two ACK/NAK bits
|
||||||
|
AssertFatal(num_ack_nak <= 2,
|
||||||
|
"num_ack_nak %d > 2 for 1 CC and TM3/4/8/9/10\n",
|
||||||
|
num_ack_nak);
|
||||||
|
if ((num_ack_nak == 2)
|
||||||
|
&& (sched_ctl->round[CC_idP][harq_pid] < 8)
|
||||||
|
&& (sched_ctl->tbcnt[CC_idP][harq_pid] == 1)
|
||||||
|
&& (pdu[0] == 1) && (pdu[1] == 1)) {
|
||||||
|
sched_ctl->round[CC_idP][harq_pid] = 8;
|
||||||
|
sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
|
||||||
|
}
|
||||||
|
if ((num_ack_nak == 2)
|
||||||
|
&& (sched_ctl->round[CC_idP][harq_pid] < 8)
|
||||||
|
&& (sched_ctl->tbcnt[CC_idP][harq_pid] == 1)
|
||||||
|
&& (pdu[0] == 2) && (pdu[1] == 2))
|
||||||
|
sched_ctl->round[CC_idP][harq_pid]++;
|
||||||
|
else if (((num_ack_nak == 2)
|
||||||
|
&& (sched_ctl->round[CC_idP][harq_pid] < 8)
|
||||||
|
&& (sched_ctl->tbcnt[0][harq_pid] == 2)
|
||||||
|
&& (pdu[0] == 1) && (pdu[1] == 2))
|
||||||
|
|| ((num_ack_nak == 2)
|
||||||
|
&& (sched_ctl->round[CC_idP][harq_pid] < 8)
|
||||||
|
&& (sched_ctl->tbcnt[CC_idP][harq_pid] == 2)
|
||||||
|
&& (pdu[0] == 2) && (pdu[1] == 1))) {
|
||||||
|
sched_ctl->round[CC_idP][harq_pid]++;
|
||||||
|
sched_ctl->tbcnt[CC_idP][harq_pid] = 1;
|
||||||
|
} else if ((num_ack_nak == 2)
|
||||||
|
&& (sched_ctl->round[CC_idP][harq_pid] < 8)
|
||||||
|
&& (sched_ctl->tbcnt[CC_idP][harq_pid] == 2)
|
||||||
|
&& (pdu[0] == 2) && (pdu[1] == 2))
|
||||||
|
sched_ctl->round[CC_idP][harq_pid]++;
|
||||||
|
else
|
||||||
|
AssertFatal(1 == 0,
|
||||||
|
"Illegal ACK/NAK/round combination (%d,%d,%d,%d,%d) for harq_pid %d, UE %d/%x\n",
|
||||||
|
num_ack_nak,
|
||||||
|
sched_ctl->round[CC_idP][harq_pid],
|
||||||
|
sched_ctl->round[CC_idP][harq_pid], pdu[0],
|
||||||
|
pdu[1], harq_pid, UE_id, rnti);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 1: // Channel Selection
|
case 1: // Channel Selection
|
||||||
|
AssertFatal(1==0,"Can't do channel selection yet in TDD\n");
|
||||||
break;
|
break;
|
||||||
case 2: // Format 3
|
case 2: // Format 2
|
||||||
|
AssertFatal(1==0,"Can't do Format 2 yet in TDD\n");
|
||||||
break;
|
break;
|
||||||
case 3: // Format 4
|
case 3: // Format 3
|
||||||
|
AssertFatal(1==0,"Can't do Format 3 yet in TDD\n");
|
||||||
break;
|
break;
|
||||||
case 4: // Format 5
|
case 4: // Format 5
|
||||||
|
AssertFatal(1==0,"Can't do Format 4 yet in TDD\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -3272,7 +3347,7 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
|
|||||||
|
|
||||||
uint8_t harq_pid = ((10 * frameP) + subframeP + 10236) & 7;
|
uint8_t harq_pid = ((10 * frameP) + subframeP + 10236) & 7;
|
||||||
|
|
||||||
LOG_D(MAC,"frame %d subframe %d harq_pid %d mode %d tmode[0] %d num_ack_nak %d round %d\n",frameP,subframeP,harq_pid,harq_indication_fdd->mode,tmode[0],num_ack_nak,sched_ctl->round[CC_idP][harq_pid]);
|
LOG_I(MAC,"frame %d subframe %d harq_pid %d mode %d tmode[0] %d num_ack_nak %d round %d\n",frameP,subframeP,harq_pid,harq_indication_fdd->mode,tmode[0],num_ack_nak,sched_ctl->round[CC_idP][harq_pid]);
|
||||||
|
|
||||||
switch (harq_indication_fdd->mode) {
|
switch (harq_indication_fdd->mode) {
|
||||||
case 0: // Format 1a/b (10.1.2.1)
|
case 0: // Format 1a/b (10.1.2.1)
|
||||||
@@ -4026,8 +4101,12 @@ static int nack_or_dtx_reported(
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (cc->tdd_Config) {
|
if (cc->tdd_Config) {
|
||||||
AssertFatal(0==1, "TDD to be done. FAPI structures (see nfapi_harq_indication_tdd_rel13_t) are not clean. To be cleaned as well?\n");
|
LOG_W(MAC,"FAPI structures (see nfapi_harq_indication_tdd_rel13_t) are not clean. To be cleaned as well?\n");
|
||||||
abort();
|
nfapi_harq_indication_tdd_rel13_t *hi = &harq_pdu->harq_indication_tdd_rel13;
|
||||||
|
for (i = 0; i < hi->number_of_ack_nack; hi++)
|
||||||
|
if (hi->harq_data[i].bundling.value_0 != 1)
|
||||||
|
return 1;
|
||||||
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
nfapi_harq_indication_fdd_rel13_t *hi = &harq_pdu->harq_indication_fdd_rel13;
|
nfapi_harq_indication_fdd_rel13_t *hi = &harq_pdu->harq_indication_fdd_rel13;
|
||||||
for (i = 0; i < hi->number_of_ack_nack; hi++)
|
for (i = 0; i < hi->number_of_ack_nack; hi++)
|
||||||
@@ -4054,7 +4133,7 @@ harq_indication(module_id_t mod_idP, int CC_idP, frame_t frameP,
|
|||||||
UE_sched_ctrl *sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
|
UE_sched_ctrl *sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
|
||||||
COMMON_channels_t *cc = &RC.mac[mod_idP]->common_channels[CC_idP];
|
COMMON_channels_t *cc = &RC.mac[mod_idP]->common_channels[CC_idP];
|
||||||
// extract HARQ Information
|
// extract HARQ Information
|
||||||
LOG_D(MAC,
|
LOG_I(MAC,
|
||||||
"Frame %d, subframe %d: Received harq indication (%d) from UE %d/%x, ul_cqi %d\n",
|
"Frame %d, subframe %d: Received harq indication (%d) from UE %d/%x, ul_cqi %d\n",
|
||||||
frameP, subframeP, channel, UE_id, rnti, ul_cqi);
|
frameP, subframeP, channel, UE_id, rnti, ul_cqi);
|
||||||
if (cc->tdd_Config)
|
if (cc->tdd_Config)
|
||||||
|
|||||||
@@ -160,8 +160,8 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
|
|
||||||
if (UE_id != -1) {
|
if (UE_id != -1) {
|
||||||
LOG_D(MAC,
|
LOG_D(MAC,
|
||||||
"[eNB %d][PUSCH %d] CC_id %d Received ULSCH sdu round %d from PHY (rnti %x, UE_id %d) ul_cqi %d\n",
|
"[eNB %d][PUSCH %d] SFN.SF %d.%d : CC_id %d Received ULSCH sdu round %d from PHY (rnti %x, UE_id %d) ul_cqi %d\n",
|
||||||
enb_mod_idP, harq_pid, CC_idP,
|
enb_mod_idP, harq_pid, frameP,subframeP, CC_idP,
|
||||||
UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid],
|
UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid],
|
||||||
current_rnti, UE_id, ul_cqi);
|
current_rnti, UE_id, ul_cqi);
|
||||||
|
|
||||||
@@ -225,8 +225,8 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
maxHARQ_Msg3Tx);
|
maxHARQ_Msg3Tx);
|
||||||
|
|
||||||
LOG_I(MAC,
|
LOG_I(MAC,
|
||||||
"[eNB %d][PUSCH %d] CC_id %d [RAPROC Msg3] Received ULSCH sdu round %d from PHY (rnti %x, RA_id %d) ul_cqi %d\n",
|
"[eNB %d][PUSCH %d] SFN.SF %d.%d CC_id %d [RAPROC Msg3] : Received ULSCH sdu round %d from PHY (rnti %x, RA_id %d) ul_cqi %d\n",
|
||||||
enb_mod_idP, harq_pid, CC_idP, ra[RA_id].msg3_round,
|
enb_mod_idP, harq_pid, frameP,subframeP,CC_idP, ra[RA_id].msg3_round,
|
||||||
current_rnti, RA_id, ul_cqi);
|
current_rnti, RA_id, ul_cqi);
|
||||||
|
|
||||||
first_rb = ra->msg3_first_rb;
|
first_rb = ra->msg3_first_rb;
|
||||||
@@ -247,9 +247,15 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
first_rb = UE_list->UE_template[CC_idP][UE_id].first_rb_ul[harq_pid];
|
first_rb = UE_list->UE_template[CC_idP][UE_id].first_rb_ul[harq_pid];
|
||||||
ra[RA_id].msg3_round++;
|
ra[RA_id].msg3_round++;
|
||||||
// prepare handling of retransmission
|
// prepare handling of retransmission
|
||||||
ra[RA_id].Msg3_frame = (ra[RA_id].Msg3_frame + ((ra[RA_id].Msg3_subframe > 1) ? 1 : 0)) % 1024;
|
if (RC.mac[enb_mod_idP]->common_channels[CC_idP].tdd_Config == NULL) {
|
||||||
ra[RA_id].Msg3_subframe = (ra[RA_id].Msg3_subframe + 8) % 10;
|
ra[RA_id].Msg3_frame = (ra[RA_id].Msg3_frame + ((ra[RA_id].Msg3_subframe > 1) ? 1 : 0)) % 1024;
|
||||||
add_msg3(enb_mod_idP, CC_idP, &ra[RA_id], frameP, subframeP);
|
ra[RA_id].Msg3_subframe = (ra[RA_id].Msg3_subframe + 8) % 10;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ra[RA_id].Msg3_frame++;
|
||||||
|
ra[RA_id].Msg3_frame&=1023;
|
||||||
|
}
|
||||||
|
// add_msg3(enb_mod_idP, CC_idP, &ra[RA_id], frameP, subframeP);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -561,6 +567,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
|
|
||||||
|
|
||||||
// Program Msg4 PDCCH+DLSCH/MPDCCH transmission 4 subframes from now, // Check if this is ok for BL/CE, or if the rule is different
|
// Program Msg4 PDCCH+DLSCH/MPDCCH transmission 4 subframes from now, // Check if this is ok for BL/CE, or if the rule is different
|
||||||
|
// make sure this works for all TDD configurations!
|
||||||
ra->Msg4_frame = frameP + ((subframeP > 5) ? 1 : 0);
|
ra->Msg4_frame = frameP + ((subframeP > 5) ? 1 : 0);
|
||||||
ra->Msg4_subframe = (subframeP + 4) % 10;
|
ra->Msg4_subframe = (subframeP + 4) % 10;
|
||||||
|
|
||||||
|
|||||||
@@ -391,6 +391,8 @@ void eNB_top(PHY_VARS_eNB *eNB, int frame_rx, int subframe_rx, char *string)
|
|||||||
proc->frame_tx = proc_rxtx->frame_tx;
|
proc->frame_tx = proc_rxtx->frame_tx;
|
||||||
proc_rxtx->timestamp_tx = proc->timestamp_tx;
|
proc_rxtx->timestamp_tx = proc->timestamp_tx;
|
||||||
|
|
||||||
|
LOG_I(PHY,"RXTX for TX: %d.%d, RX: %d.%d\n",proc_rxtx->frame_tx,proc_rxtx->subframe_tx,proc_rxtx->frame_rx,proc_rxtx->subframe_rx);
|
||||||
|
|
||||||
if (rxtx(eNB,proc_rxtx,string) < 0) LOG_E(PHY,"eNB %d CC_id %d failed during execution\n",eNB->Mod_id,eNB->CC_id);
|
if (rxtx(eNB,proc_rxtx,string) < 0) LOG_E(PHY,"eNB %d CC_id %d failed during execution\n",eNB->Mod_id,eNB->CC_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1648,8 +1648,8 @@ static void* ru_thread_control( void* param ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
AssertFatal((ru->rfdevice.trx_config_func(&ru->rfdevice,&ru->openair0_cfg)==0),
|
if (ru->rfdevice.trx_config_func) AssertFatal((ru->rfdevice.trx_config_func(&ru->rfdevice,&ru->openair0_cfg)==0),
|
||||||
"Failed to configure RF device for RU %d\n",ru->idx);
|
"Failed to configure RF device for RU %d\n",ru->idx);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1908,7 +1908,6 @@ static void* ru_thread( void* param ) {
|
|||||||
LOG_D(PHY,"RU thread %d, frame %d, subframe %d \n",
|
LOG_D(PHY,"RU thread %d, frame %d, subframe %d \n",
|
||||||
ru->idx,frame,subframe);
|
ru->idx,frame,subframe);
|
||||||
|
|
||||||
|
|
||||||
if ((ru->do_prach>0) && (is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)==1)) {
|
if ((ru->do_prach>0) && (is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)==1)) {
|
||||||
wakeup_prach_ru(ru);
|
wakeup_prach_ru(ru);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -740,8 +740,8 @@ l2l1_task (void *args_p)
|
|||||||
while (all_done==0) {
|
while (all_done==0) {
|
||||||
|
|
||||||
pthread_mutex_lock(&subframe_mutex);
|
pthread_mutex_lock(&subframe_mutex);
|
||||||
int subframe_ru_mask_local = subframe_ru_mask; //((1<<NB_RU)-1));
|
int subframe_ru_mask_local = (subframe_select(&RC.ru[0]->frame_parms,(sf+4)%10)!=SF_UL) ? subframe_ru_mask : ((1<<NB_RU)-1);
|
||||||
int subframe_UE_mask_local = subframe_UE_mask;
|
int subframe_UE_mask_local = (subframe_select(&RC.ru[0]->frame_parms,(sf+4)%10)!=SF_DL) ? subframe_UE_mask : ((1<<NB_UE_INST)-1);
|
||||||
pthread_mutex_unlock(&subframe_mutex);
|
pthread_mutex_unlock(&subframe_mutex);
|
||||||
LOG_D(EMU,"Frame %d, Subframe %d, NB_RU %d, NB_UE %d: Checking masks %x,%x\n",frame,sf,NB_RU,NB_UE_INST,subframe_ru_mask_local,subframe_UE_mask_local);
|
LOG_D(EMU,"Frame %d, Subframe %d, NB_RU %d, NB_UE %d: Checking masks %x,%x\n",frame,sf,NB_RU,NB_UE_INST,subframe_ru_mask_local,subframe_UE_mask_local);
|
||||||
if ((subframe_ru_mask_local == ((1<<NB_RU)-1)) &&
|
if ((subframe_ru_mask_local == ((1<<NB_RU)-1)) &&
|
||||||
|
|||||||
@@ -1087,20 +1087,21 @@ int ru_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **
|
|||||||
|
|
||||||
|
|
||||||
subframe = (last_ru_rx_timestamp[ru_id][CC_id]/RC.ru[ru_id]->frame_parms.samples_per_tti)%10;
|
subframe = (last_ru_rx_timestamp[ru_id][CC_id]/RC.ru[ru_id]->frame_parms.samples_per_tti)%10;
|
||||||
LOG_D(EMU,"RU_trx_read generating UL subframe %d (Ts %llu, current TS %llu)\n",
|
if (subframe_select(&RC.ru[ru_id]->frame_parms,subframe) != SF_DL) {
|
||||||
subframe,(unsigned long long)*ptimestamp,
|
LOG_D(EMU,"RU_trx_read generating UL subframe %d (Ts %llu, current TS %llu)\n",
|
||||||
(unsigned long long)current_ru_rx_timestamp[ru_id][CC_id]);
|
subframe,(unsigned long long)*ptimestamp,
|
||||||
|
(unsigned long long)current_ru_rx_timestamp[ru_id][CC_id]);
|
||||||
do_UL_sig(UE2RU,
|
|
||||||
enb_data,
|
|
||||||
ue_data,
|
|
||||||
subframe,
|
|
||||||
0, // abstraction_flag
|
|
||||||
&RC.ru[ru_id]->frame_parms,
|
|
||||||
0, // frame is only used for abstraction
|
|
||||||
ru_id,
|
|
||||||
CC_id);
|
|
||||||
|
|
||||||
|
do_UL_sig(UE2RU,
|
||||||
|
enb_data,
|
||||||
|
ue_data,
|
||||||
|
subframe,
|
||||||
|
0, // abstraction_flag
|
||||||
|
&RC.ru[ru_id]->frame_parms,
|
||||||
|
0, // frame is only used for abstraction
|
||||||
|
ru_id,
|
||||||
|
CC_id);
|
||||||
|
}
|
||||||
last_ru_rx_timestamp[ru_id][CC_id] += RC.ru[ru_id]->frame_parms.samples_per_tti;
|
last_ru_rx_timestamp[ru_id][CC_id] += RC.ru[ru_id]->frame_parms.samples_per_tti;
|
||||||
sample_count += RC.ru[ru_id]->frame_parms.samples_per_tti;
|
sample_count += RC.ru[ru_id]->frame_parms.samples_per_tti;
|
||||||
}
|
}
|
||||||
@@ -1352,9 +1353,6 @@ void init_devices(void){
|
|||||||
PHY_vars_UE_g[UE_id][CC_id]->rfdevice.trx_set_freq_func = UE_trx_set_freq;
|
PHY_vars_UE_g[UE_id][CC_id]->rfdevice.trx_set_freq_func = UE_trx_set_freq;
|
||||||
PHY_vars_UE_g[UE_id][CC_id]->rfdevice.trx_set_gains_func = UE_trx_set_gains;
|
PHY_vars_UE_g[UE_id][CC_id]->rfdevice.trx_set_gains_func = UE_trx_set_gains;
|
||||||
last_UE_rx_timestamp[UE_id][CC_id] = 0;
|
last_UE_rx_timestamp[UE_id][CC_id] = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user