debugging for TDD

This commit is contained in:
Raymond Knopp
2018-03-19 01:10:10 -07:00
parent c4a81c2215
commit d312f9c805
19 changed files with 234 additions and 119 deletions
+2 -2
View File
@@ -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)
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,
ulsch->harq_processes[harq_pid]->n_DMRS2,
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++;
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,
UE_id,
new_ulsch,
+4 -2
View File
@@ -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 (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)
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;
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) {
nsym=fp->ul_symbols_in_S_subframe;
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);
} 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 {
AssertFatal(1==0, "recv_IF4p5 - Unknown packet_type %x", *packet_type);
}
+13 -1
View File
@@ -336,7 +336,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
#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);
#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;
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
+13 -8
View File
@@ -1512,6 +1512,7 @@ void generate_phich_top(PHY_VARS_eNB *eNB,
uint32_t pusch_frame;
int subframe = proc->subframe_tx;
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
@@ -1523,16 +1524,20 @@ void generate_phich_top(PHY_VARS_eNB *eNB,
if (frame_parms->Ncp == 1)
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_subframe = phich_subframe2_pusch_subframe(frame_parms,subframe);
harq_pid = subframe2harq_pid(frame_parms,pusch_frame,pusch_subframe);
}
phich->active = 0;
for (i=0; i<eNB->phich_vars[subframe&1].num_hi; i++) {
phich = &eNB->phich_vars[subframe&1].config[i];
ngroup_PHICH = (phich->first_rb +
phich->n_DMRS)%Ngroup_PHICH;
@@ -1565,6 +1570,6 @@ void generate_phich_top(PHY_VARS_eNB *eNB,
phich->hi,
subframe,
txdataF);
}// for (i=0; i<eNB->phich_vars[subframe&1].num_hi; i++) {
eNB->phich_vars[subframe&1].num_hi=0;
}
}
+3 -7
View File
@@ -2438,9 +2438,9 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
} // 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]));
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) + 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)
*(1+payload) = (stat_im<0) ? 1 : 2;
} else { // insufficient energy on PUCCH so NAK
#if defined(USRP_REC_PLAY)
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
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);
*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])])[1] = (int16_t)(stat_im);
+1 -1
View File
@@ -1020,7 +1020,7 @@ typedef struct PHY_VARS_eNB_s {
#endif
Sched_Rsp_t Sched_INFO;
LTE_eNB_PDCCH pdcch_vars[2];
LTE_eNB_PHICH phich_vars[2];
LTE_eNB_PHICH phich_vars;
#ifdef Rel14
LTE_eNB_EPDCCH epdcch_vars[2];
LTE_eNB_MPDCCH mpdcch_vars[2];
+6 -4
View File
@@ -839,22 +839,24 @@ typedef struct {
uint8_t dci_pdu[8];
} mDCI_ALLOC_t;
#define MAX_NUM_PDCCH 32
typedef struct {
uint8_t num_dci;
uint8_t num_pdcch_symbols;
DCI_ALLOC_t dci_alloc[32];
DCI_ALLOC_t dci_alloc[MAX_NUM_PDCCH];
} LTE_eNB_PDCCH;
typedef struct {
uint16_t absSF;
uint16_t active;
uint8_t hi;
uint8_t first_rb;
uint8_t n_DMRS;
} phich_config_t;
#define MAX_NUM_PHICH 32
typedef struct {
uint8_t num_hi;
phich_config_t config[32];
phich_config_t config[MAX_NUM_PHICH];
} LTE_eNB_PHICH;
typedef struct {
+12 -9
View File
@@ -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,
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
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);
// DJP - TODO FIXME - transmission power ignored
phich->config[phich->num_hi].hi = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.hi_value;
phich->config[phich->num_hi].first_rb = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.resource_block_start;
phich->config[phich->num_hi].n_DMRS = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms;
phich->num_hi++;
AssertFatal(phich->num_hi<32,"Maximum number of phich reached in subframe\n");
for (i=0;i<32;i++) if (phich->config[i].active==0) break;
AssertFatal(i<32,"no free PHICH allocation\n");
phich->config[i].active = 0;
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,
@@ -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];
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->subframe = subframe;
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) {
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);
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);
@@ -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_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",
frame,subframe,
+1 -1
View File
@@ -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)
{
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,
phich_frame2_pusch_frame(frame_parms,frame,subframe),
phich_subframe2_pusch_subframe(frame_parms,subframe)));
+29 -29
View File
@@ -749,7 +749,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
/* cancel SR detection if reception on n1_pucch0 is better than on SR PUCCH resource index, otherwise send it up to MAC */
if (uci->type==HARQ_SR && metric[0] > metric_SR) SR_payload = 0;
else if (SR_payload == 1) fill_sr_indication(eNB,uci->rnti,frame,subframe,metric_SR);
if (uci->type==HARQ_SR && metric[0] <= metric_SR) {
/* when transmitting ACK/NACK on SR PUCCH resource index, SR payload is always 1 */
SR_payload = 1;
@@ -772,8 +772,8 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
uci->rnti,
frame,subframe,
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);
}
@@ -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_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,
eNB->dlsch[UE_id][0]->rnti,
LOG_D(PHY,"[eNB %d][PDSCH %x] Frame %d subframe %d Checking ACK/NAK format %d with SR\n",eNB->Mod_id,
uci->rnti,
frame,subframe,
n1_pucch0,n1_pucch1,n1_pucch2,n1_pucch3,format);
#endif
uci->pucch_fmt);
metric[0] = rx_pucch(eNB,
pucch_format1b,
@@ -800,9 +800,9 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
subframe,
PUCCH1a_THRES);
} 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,
eNB->dlsch[UE_id][0]->rnti,
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,
uci->rnti,
frame,subframe,
uci->num_pucch_resources,
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][3],
uci->pucch_fmt);
#endif
for (res=0;res<uci->num_pucch_resources;res++)
metric[res] = rx_pucch(eNB,
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
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
}
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
} //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
@@ -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
} // else if ((uci->tdd_bundling == 0) && (res==4))
else { // bundling
harq_ack[0] = pucch_b0b1[0][0];
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
}
#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,
eNB->dlsch[UE_id][0]->rnti,
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,
uci->rnti,
frame,subframe,
metric0,metric1,pucch_b0b1[0],pucch_b0b1[1]);
#endif
metric[0],metric[1],pucch_b0b1[0][0],pucch_b0b1[0][1]);
}
break;
default:
@@ -1159,11 +1159,11 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
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++) {
ulsch = eNB->ulsch[i];
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,
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));
}
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];
@@ -1190,7 +1190,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
fp->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift +
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->Mod_id,harq_pid,frame,subframe,
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);
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,
frame,subframe,
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_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,
frame,subframe, i,
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++;
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);
}
@@ -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 );
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[1]=0;
+1 -1
View File
@@ -2161,7 +2161,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
&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]);
// Part - IV
+3 -3
View File
@@ -108,8 +108,7 @@ schedule_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
if ((1 << tmp) & deltaTSFC) {
// This is an SRS subframe, loop over UEs
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
if (RC.mac[module_idP]->UE_list.active[UE_id] != TRUE)
continue;
if (RC.mac[module_idP]->UE_list.active[UE_id] != TRUE) continue;
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
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.
setup.srs_ConfigIndex,
&srsPeriodicity, &srsOffset);
if (((10 * frameP + subframeP) % srsPeriodicity) == srsOffset) {
// Program SRS
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;
// 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->
UE_template[CC_id][UE_id].physicalConfigDedicated!= NULL,
+21 -11
View File
@@ -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",
frameP, subframeP, ra->Msg4_frame,
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 &= 1023;
ra->Msg4_subframe = (ra->Msg4_subframe + 8) % 10;
LOG_D(MAC,
ra->Msg4_frame &= 1023;
ra->Msg4_subframe = (ra->Msg4_subframe + 8) % 10;
}
else {
ra->Msg4_frame++;
ra->Msg4_frame &= 1023;
}
LOG_I(MAC,
"Frame %d, Subframe %d: Msg4 retransmission in %d.%d\n",
frameP, subframeP, ra->Msg4_frame,
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;
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);
// Program PUCCH1a for ACK/NAK
// 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);
// 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 &= 1023;
ra->Msg4_subframe = (ra->Msg4_subframe + 8) % 10;
ra->Msg4_frame &= 1023;
ra->Msg4_subframe = (ra->Msg4_subframe + 8) % 10;
}
else ra->Msg4_frame++;
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",
module_idP, CC_idP, frameP, subframeP, ra->rnti,
round, ra->Msg4_frame, ra->Msg4_subframe);
AssertFatal(1==0,"Shouldn't happen exit\n");
} // Msg4 frame/subframe
} // regular LTE case
} else {
LOG_D(MAC,
LOG_I(MAC,
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d : Msg4 acknowledged\n",
module_idP, CC_idP, frameP, subframeP);
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];
LOG_I(MAC,"RA[state:%d]\n",ra->state);
LOG_D(MAC,"RA[state:%d]\n",ra->state);
if (ra->state == MSG2)
generate_Msg2(module_idP, CC_id, frameP, subframeP, ra);
+89 -10
View File
@@ -627,7 +627,7 @@ uint16_t get_pucch1_absSF(COMMON_channels_t * cc, uint16_t dlsch_absSF)
case 3:
if ((sf == 5) || (sf == 6) || (sf == 7) || (sf == 8)
|| (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)
return ((10 * nextf) + 2); // ACK/NAK in 2 next frame
else if (sf == 0)
@@ -1380,7 +1380,7 @@ fill_nfapi_uci_acknak(module_id_t module_idP,
rntiP,
absSFP,
&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",
rntiP, absSFP / 10, absSFP % 10, ackNAK_absSF / 10,
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,
"numCC %d > 1, should not be using Format1a/b\n",
numCC);
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
AssertFatal(1==0,"Can't do channel selection yet in TDD\n");
break;
case 1: // Channel Selection
case 2: // Format 2
AssertFatal(1==0,"Can't do Format 2 yet in TDD\n");
break;
case 2: // Format 3
break;
case 3: // Format 4
case 3: // Format 3
AssertFatal(1==0,"Can't do Format 3 yet in TDD\n");
break;
case 4: // Format 5
AssertFatal(1==0,"Can't do Format 4 yet in TDD\n");
break;
}
} 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;
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) {
case 0: // Format 1a/b (10.1.2.1)
@@ -4026,8 +4101,12 @@ static int nack_or_dtx_reported(
int i;
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");
abort();
LOG_W(MAC,"FAPI structures (see nfapi_harq_indication_tdd_rel13_t) are not clean. To be cleaned as well?\n");
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 {
nfapi_harq_indication_fdd_rel13_t *hi = &harq_pdu->harq_indication_fdd_rel13;
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];
COMMON_channels_t *cc = &RC.mac[mod_idP]->common_channels[CC_idP];
// 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",
frameP, subframeP, channel, UE_id, rnti, ul_cqi);
if (cc->tdd_Config)
+15 -8
View File
@@ -160,8 +160,8 @@ rx_sdu(const module_id_t enb_mod_idP,
if (UE_id != -1) {
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_mod_idP, harq_pid, CC_idP,
"[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, frameP,subframeP, CC_idP,
UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid],
current_rnti, UE_id, ul_cqi);
@@ -225,8 +225,8 @@ rx_sdu(const module_id_t enb_mod_idP,
maxHARQ_Msg3Tx);
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_mod_idP, harq_pid, CC_idP, ra[RA_id].msg3_round,
"[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, frameP,subframeP,CC_idP, ra[RA_id].msg3_round,
current_rnti, RA_id, ul_cqi);
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];
ra[RA_id].msg3_round++;
// prepare handling of retransmission
ra[RA_id].Msg3_frame = (ra[RA_id].Msg3_frame + ((ra[RA_id].Msg3_subframe > 1) ? 1 : 0)) % 1024;
ra[RA_id].Msg3_subframe = (ra[RA_id].Msg3_subframe + 8) % 10;
add_msg3(enb_mod_idP, CC_idP, &ra[RA_id], frameP, subframeP);
if (RC.mac[enb_mod_idP]->common_channels[CC_idP].tdd_Config == NULL) {
ra[RA_id].Msg3_frame = (ra[RA_id].Msg3_frame + ((ra[RA_id].Msg3_subframe > 1) ? 1 : 0)) % 1024;
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;
}
@@ -561,9 +567,10 @@ 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
// make sure this works for all TDD configurations!
ra->Msg4_frame = frameP + ((subframeP > 5) ? 1 : 0);
ra->Msg4_subframe = (subframeP + 4) % 10;
} // if process is active
} // loop on RA processes
+2
View File
@@ -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_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);
}
}
+2 -3
View File
@@ -1648,8 +1648,8 @@ static void* ru_thread_control( void* param ) {
}
AssertFatal((ru->rfdevice.trx_config_func(&ru->rfdevice,&ru->openair0_cfg)==0),
"Failed to configure RF device for RU %d\n",ru->idx);
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);
@@ -1908,7 +1908,6 @@ static void* ru_thread( void* param ) {
LOG_D(PHY,"RU thread %d, frame %d, subframe %d \n",
ru->idx,frame,subframe);
if ((ru->do_prach>0) && (is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)==1)) {
wakeup_prach_ru(ru);
}
+2 -2
View File
@@ -740,8 +740,8 @@ l2l1_task (void *args_p)
while (all_done==0) {
pthread_mutex_lock(&subframe_mutex);
int subframe_ru_mask_local = subframe_ru_mask; //((1<<NB_RU)-1));
int subframe_UE_mask_local = subframe_UE_mask;
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_select(&RC.ru[0]->frame_parms,(sf+4)%10)!=SF_DL) ? subframe_UE_mask : ((1<<NB_UE_INST)-1);
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);
if ((subframe_ru_mask_local == ((1<<NB_RU)-1)) &&
+15 -17
View File
@@ -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;
LOG_D(EMU,"RU_trx_read generating UL subframe %d (Ts %llu, current TS %llu)\n",
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);
if (subframe_select(&RC.ru[ru_id]->frame_parms,subframe) != SF_DL) {
LOG_D(EMU,"RU_trx_read generating UL subframe %d (Ts %llu, current TS %llu)\n",
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);
}
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;
}
@@ -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_gains_func = UE_trx_set_gains;
last_UE_rx_timestamp[UE_id][CC_id] = 0;
}
}
}