Commit 2e37a77c authored by magounak's avatar magounak

udp changes

parent 409b34f4
...@@ -45,10 +45,14 @@ ID = ENB_PHY_INPUT_SIGNAL ...@@ -45,10 +45,14 @@ ID = ENB_PHY_INPUT_SIGNAL
DESC = eNodeB received signal in the time domain for a duration of 1ms DESC = eNodeB received signal in the time domain for a duration of 1ms
GROUP = ALL:PHY:GRAPHIC:HEAVY:ENB GROUP = ALL:PHY:GRAPHIC:HEAVY:ENB
FORMAT = int,eNB_ID : int,frame : int,subframe : int,antenna : buffer,rxdata FORMAT = int,eNB_ID : int,frame : int,subframe : int,antenna : buffer,rxdata
ID = RAU_INPUT_SIGNAL
DESC = RAU received data from the RRUs
GROUP = ALL:PHY:GRAPHIC:HEAVY:ENB
FORMAT = int,tag : int,frame : int,subframe : buffer,rxdataF
ID = RAU_INPUT_DMRS ID = RAU_INPUT_DMRS
DESC = RAU received DMRS from the RRUs DESC = RAU received DMRS from the RRUs
GROUP = ALL:PHY:GRAPHIC:HEAVY:ENB GROUP = ALL:PHY:GRAPHIC:HEAVY:ENB
FORMAT = int,tag : int,frame : int,subframe : buffer,rxdataF FORMAT = int,tag : int,frame : int,subframe : buffer,rxdataF_ext
ID = CALIBRATION_CHANNEL_ESTIMATES ID = CALIBRATION_CHANNEL_ESTIMATES
DESC = RAU received DMRS estimates from the RRUs DESC = RAU received DMRS estimates from the RRUs
GROUP = ALL:PHY:GRAPHIC:HEAVY:ENB GROUP = ALL:PHY:GRAPHIC:HEAVY:ENB
......
...@@ -95,7 +95,7 @@ void feptx0(RU_t *ru,int slot) { ...@@ -95,7 +95,7 @@ void feptx0(RU_t *ru,int slot) {
"ru->generate_dmrs_sync should not be set, frame_type %d, is_slave %d\n", "ru->generate_dmrs_sync should not be set, frame_type %d, is_slave %d\n",
fp->frame_type,ru->is_slave); fp->frame_type,ru->is_slave);
*/ */
// generate_drs_pusch() generates dmrs for both slots (symbols 3,10)
if (ru->generate_dmrs_sync == 1 && slot == 0 && subframe == 1 && aa==0) { if (ru->generate_dmrs_sync == 1 && slot == 0 && subframe == 1 && aa==0) {
generate_drs_pusch((PHY_VARS_UE *)NULL, generate_drs_pusch((PHY_VARS_UE *)NULL,
(UE_rxtx_proc_t*)NULL, (UE_rxtx_proc_t*)NULL,
...@@ -109,18 +109,6 @@ void feptx0(RU_t *ru,int slot) { ...@@ -109,18 +109,6 @@ void feptx0(RU_t *ru,int slot) {
aa); aa);
} }
if (ru->is_slave==1 && ru->generate_dmrs_sync == 1 && slot == 1 && subframe == 1 && aa==0) {
generate_drs_pusch((PHY_VARS_UE *)NULL,
(UE_rxtx_proc_t*)NULL,
fp,
ru->common.txdataF_BF,
0,
AMP,
0,
0,
fp->N_RB_DL,
aa);
}
normal_prefix_mod(&ru->common.txdataF_BF[aa][slot*slot_sizeF], normal_prefix_mod(&ru->common.txdataF_BF[aa][slot*slot_sizeF],
(int*)&ru->common.txdata[aa][slot_offset], (int*)&ru->common.txdata[aa][slot_offset],
7, 7,
...@@ -231,6 +219,7 @@ void feptx_ofdm_2thread(RU_t *ru) { ...@@ -231,6 +219,7 @@ void feptx_ofdm_2thread(RU_t *ru) {
// The 2nd check is to force the slave RRUs to send DMRS at symbol 10-subframe 1-slot 1 // The 2nd check is to force the slave RRUs to send DMRS at symbol 10-subframe 1-slot 1
if (subframe_select(fp,subframe)==SF_DL || ((subframe_select(fp,subframe)==SF_DL || subframe==1) && ru->is_slave==1)) { if (subframe_select(fp,subframe)==SF_DL || ((subframe_select(fp,subframe)==SF_DL || subframe==1) && ru->is_slave==1)) {
// if (subframe_select(fp,subframe)==SF_DL) {
// If this is not an S-subframe // If this is not an S-subframe
if (pthread_mutex_timedlock(&proc->mutex_feptx,&wait) != 0) { if (pthread_mutex_timedlock(&proc->mutex_feptx,&wait) != 0) {
printf("[RU] ERROR pthread_mutex_lock for feptx thread (IC %d)\n", proc->instance_cnt_feptx); printf("[RU] ERROR pthread_mutex_lock for feptx thread (IC %d)\n", proc->instance_cnt_feptx);
...@@ -724,8 +713,25 @@ void ru_fep_full_2thread(RU_t *ru) { ...@@ -724,8 +713,25 @@ void ru_fep_full_2thread(RU_t *ru) {
3%(fp->symbols_per_tti/2),// l = symbol within slot 3%(fp->symbols_per_tti/2),// l = symbol within slot
10/(fp->symbols_per_tti/2),// Ns = slot number 10/(fp->symbols_per_tti/2),// Ns = slot number
fp); fp);
/* if (proc->frame_rx==205) { // libra
lte_ul_channel_estimation_RRU(fp, LOG_I(PHY,"~~~~~~~~~~~~~~~~~~~~~~~~@@@@@@@@@@@@@@@@@@ ru_fep_full_2thread: frame %d, subframe %d\n",$
//LOG_M("rxdata.m","rxdata",&ru->common.rxdata[0][0], fp->samples_per_tti*2,1,1); // save 2 first su$
LOG_M("rxdata.m","rxdata",&ru->common.rxdata[0][0], fp->samples_per_tti*10,1,1); // save 1 frame
//LOG_M("rxdataF.m","rxdataF",&ru->common.rxdataF[0][0],2*fp->ofdm_symbol_size*fp->symbols_per_tti,1$
LOG_M("rxdataF.m","rxdataF",&ru->common.rxdataF[0][0],fp->ofdm_symbol_size*fp->symbols_per_tti*10,1,$
LOG_M("rxdataF_ext.m","rxdataFext",&calibration->rxdataF_ext[0][0], 14*12*(fp->N_RB_DL),1,1);
//exit(-1);
}*/
/* if (proc->frame_rx==204) { //aquila
LOG_I(PHY,"~~~~~~~~~~~~~~~~~~~~~~~~@@@@@@@@@@@@@@@@@@ ru_fep_full_2thread: frame %d, subframe %d\n",$
//LOG_M("rxdata.m","rxdata",&ru->common.rxdata[0][0], fp->samples_per_tti*2,1,1); // save 2 first su$
LOG_M("rxdata.m","rxdata",&ru->common.rxdata[0][0], fp->samples_per_tti*10,1,1); // save 1 frame
//LOG_M("rxdataF.m","rxdataF",&ru->common.rxdataF[0][0],2*fp->ofdm_symbol_size*fp->symbols_per_tti,1$
LOG_M("rxdataF.m","rxdataF",&ru->common.rxdataF[0][0],fp->ofdm_symbol_size*fp->symbols_per_tti*10,1,$
LOG_M("rxdataF_ext.m","rxdataFext",&calibration->rxdataF_ext[0][0], 14*12*(fp->N_RB_DL),1,1);
//exit(-1);
}*/
/*lte_ul_channel_estimation_RRU(fp,
calibration->drs_ch_estimates, calibration->drs_ch_estimates,
calibration->drs_ch_estimates_time, calibration->drs_ch_estimates_time,
calibration->rxdataF_ext, calibration->rxdataF_ext,
...@@ -759,6 +765,17 @@ void ru_fep_full_2thread(RU_t *ru) { ...@@ -759,6 +765,17 @@ void ru_fep_full_2thread(RU_t *ru) {
3/(fp->symbols_per_tti/2),// Ns = slot number 3/(fp->symbols_per_tti/2),// Ns = slot number
fp); fp);
/* if (proc->frame_rx==189) {
LOG_I(PHY,"~~~~~~~~~~~~~~~~~~~~~~~~@@@@@@@@@@@@@@@@@@ ru_fep_full_2thread: su$
//LOG_M("rxdata.m","rxdata",&ru->common.rxdata[0][0], fp->samples_per_tti*2,1$
LOG_M("rxdata.m","rxdata",&ru->common.rxdata[0][0], fp->samples_per_tti*10,1,$
//LOG_M("rxdataF.m","rxdataF",&ru->common.rxdataF[0][0],2*fp->ofdm_symbol_siz$
LOG_M("rxdataF.m","rxdataF",&ru->common.rxdataF[0][0],fp->ofdm_symbol_size*fp$
LOG_M("rxdataF_ext.m","rxdataFext",&calibration->rxdataF_ext[0][0], 14*12*(fp$
//exit(-1);
}
*/
/*lte_ul_channel_estimation((PHY_VARS_eNB *)NULL, /*lte_ul_channel_estimation((PHY_VARS_eNB *)NULL,
proc, proc,
ru->idx, ru->idx,
......
...@@ -229,7 +229,7 @@ int trx_eth_write_raw_IF4p5(openair0_device *device, openair0_timestamp timestam ...@@ -229,7 +229,7 @@ int trx_eth_write_raw_IF4p5(openair0_device *device, openair0_timestamp timestam
} else if (flags == IF4p5_PULTICK) { } else if (flags == IF4p5_PULTICK) {
packet_size = RAW_IF4p5_PULTICK_SIZE_BYTES; packet_size = RAW_IF4p5_PULTICK_SIZE_BYTES;
} else if (flags == IF4p5_PULCALIB) { } else if (flags == IF4p5_PULCALIB) {
packet_size = RAW_IF4p5_PULCALIB_SIZE_BYTES; packet_size = RAW_IF4p5_PULCALIB_SIZE_BYTES(nblocks);
} else if (flags == IF5_MOBIPASS) { } else if (flags == IF5_MOBIPASS) {
packet_size = RAW_IF5_MOBIPASS_SIZE_BYTES; packet_size = RAW_IF5_MOBIPASS_SIZE_BYTES;
} else { } else {
......
...@@ -237,7 +237,7 @@ int trx_eth_write_udp_IF4p5(openair0_device *device, openair0_timestamp timestam ...@@ -237,7 +237,7 @@ int trx_eth_write_udp_IF4p5(openair0_device *device, openair0_timestamp timestam
} else if (flags == IF4p5_PULTICK) { } else if (flags == IF4p5_PULTICK) {
packet_size = UDP_IF4p5_PULTICK_SIZE_BYTES; packet_size = UDP_IF4p5_PULTICK_SIZE_BYTES;
} else if (flags == IF4p5_PULCALIB) { } else if (flags == IF4p5_PULCALIB) {
packet_size = UDP_IF4p5_PULCALIB_SIZE_BYTES; packet_size = UDP_IF4p5_PULCALIB_SIZE_BYTES(nblocks);
} else if ((flags >= IF4p5_PRACH)&& } else if ((flags >= IF4p5_PRACH)&&
(flags <= (IF4p5_PRACH+4))) { (flags <= (IF4p5_PRACH+4))) {
packet_size = UDP_IF4p5_PRACH_SIZE_BYTES; packet_size = UDP_IF4p5_PRACH_SIZE_BYTES;
......
...@@ -75,12 +75,12 @@ ...@@ -75,12 +75,12 @@
#define RAW_IF4p5_PULFFT_SIZE_BYTES(nblocks) (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks)) #define RAW_IF4p5_PULFFT_SIZE_BYTES(nblocks) (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks))
#define RAW_IF4p5_PULTICK_SIZE_BYTES (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t) #define RAW_IF4p5_PULTICK_SIZE_BYTES (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t)
#define RAW_IF4p5_PRACH_SIZE_BYTES (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + PRACH_BLOCK_SIZE_BYTES) #define RAW_IF4p5_PRACH_SIZE_BYTES (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + PRACH_BLOCK_SIZE_BYTES)
#define RAW_IF4p5_PULCALIB_SIZE_BYTES (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t) #define RAW_IF4p5_PULCALIB_SIZE_BYTES(nblocks) (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks))
#define UDP_IF4p5_PDLFFT_SIZE_BYTES(nblocks) (UDP_HEADER_SIZE_BYTES + IPV4_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks)) #define UDP_IF4p5_PDLFFT_SIZE_BYTES(nblocks) (UDP_HEADER_SIZE_BYTES + IPV4_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks))
#define UDP_IF4p5_PULFFT_SIZE_BYTES(nblocks) (UDP_HEADER_SIZE_BYTES + IPV4_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks)) #define UDP_IF4p5_PULFFT_SIZE_BYTES(nblocks) (UDP_HEADER_SIZE_BYTES + IPV4_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks))
#define UDP_IF4p5_PULTICK_SIZE_BYTES (UDP_HEADER_SIZE_BYTES + IPV4_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t) #define UDP_IF4p5_PULTICK_SIZE_BYTES (UDP_HEADER_SIZE_BYTES + IPV4_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t)
#define UDP_IF4p5_PRACH_SIZE_BYTES (UDP_HEADER_SIZE_BYTES + IPV4_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + PRACH_BLOCK_SIZE_BYTES) #define UDP_IF4p5_PRACH_SIZE_BYTES (UDP_HEADER_SIZE_BYTES + IPV4_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + PRACH_BLOCK_SIZE_BYTES)
#define UDP_IF4p5_PULCALIB_SIZE_BYTES (UDP_HEADER_SIZE_BYTES + IPV4_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t) #define UDP_IF4p5_PULCALIB_SIZE_BYTES(nblocks) (UDP_HEADER_SIZE_BYTES + IPV4_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks))
// Mobipass packet sizes // Mobipass packet sizes
#define RAW_IF5_MOBIPASS_BLOCK_SIZE_BYTES 1280 #define RAW_IF5_MOBIPASS_BLOCK_SIZE_BYTES 1280
......
...@@ -248,13 +248,12 @@ void fh_if4p5_south_in(RU_t *ru,int *frame,int *subframe) { ...@@ -248,13 +248,12 @@ void fh_if4p5_south_in(RU_t *ru,int *frame,int *subframe) {
} while(proc->symbol_mask[*subframe] != symbol_mask_full); } while(proc->symbol_mask[*subframe] != symbol_mask_full);
if (ru->wait_cnt==0 && packet_type == IF4p5_PULCALIB) { if (ru->wait_cnt==0 && packet_type == IF4p5_PULCALIB) {
T(T_RAU_INPUT_DMRS, T_INT(ru->idx), T_INT(f), T_INT(sf), T(T_RAU_INPUT_SIGNAL, T_INT(ru->idx), T_INT(f), T_INT(sf),
T_BUFFER(&ru->common.rxdataF[0][0], T_BUFFER(&ru->common.rxdataF[0][0],
fp->symbols_per_tti*fp->ofdm_symbol_size*sizeof(int32_t))); fp->symbols_per_tti*fp->ofdm_symbol_size*sizeof(int32_t)));
// Estimate calibration channel estimates: // Estimate calibration channel estimates:
if (packet_type == IF4p5_PULCALIB) {
Ns = (ru->is_slave==0 ? 1 : 0); Ns = (ru->is_slave==0 ? 1 : 0);
l = (ru->is_slave==0 ? 10 : 3); l = (ru->is_slave==0 ? 10 : 3);
ru->frame_parms.nb_antennas_rx = ru->nb_rx; ru->frame_parms.nb_antennas_rx = ru->nb_rx;
...@@ -278,8 +277,8 @@ void fh_if4p5_south_in(RU_t *ru,int *frame,int *subframe) { ...@@ -278,8 +277,8 @@ void fh_if4p5_south_in(RU_t *ru,int *frame,int *subframe) {
calibration->drs_ch_estimates_time, calibration->drs_ch_estimates_time,
calibration->rxdataF_ext, calibration->rxdataF_ext,
fp->N_RB_DL, fp->N_RB_DL,
proc->frame_rx, f,
proc->subframe_rx, sf,
0, 0,
0, 0,
0, 0,
...@@ -287,11 +286,20 @@ void fh_if4p5_south_in(RU_t *ru,int *frame,int *subframe) { ...@@ -287,11 +286,20 @@ void fh_if4p5_south_in(RU_t *ru,int *frame,int *subframe) {
0, 0,
0); 0);
T(T_CALIBRATION_CHANNEL_ESTIMATES, T_INT(ru->idx), T_INT(proc->frame_rx), T_INT(proc->subframe_rx), T(T_CALIBRATION_CHANNEL_ESTIMATES, T_INT(ru->idx), T_INT(f), T_INT(sf),
T_BUFFER(&calibration->drs_ch_estimates[0][l*12*fp->N_RB_UL], T_BUFFER(&calibration->drs_ch_estimates[0][l*12*fp->N_RB_UL],
12*fp->N_RB_UL*sizeof(int32_t))); 12*fp->N_RB_UL*sizeof(int32_t)));
T(T_RAU_INPUT_DMRS, T_INT(ru->idx), T_INT(f), T_INT(sf),
T_BUFFER(&calibration->rxdataF_ext[0][l*12*fp->N_RB_UL],
12*fp->N_RB_UL*sizeof(int32_t)));
/*if (f==252 && ru->idx==1) {
LOG_M("rxdataF_ext.m","rxdataFext",&calibration->rxdataF_ext[0][0], 14*12*(fp->N_RB_DL),1,1);
exit(-1);
}*/
} }
}
//calculate timestamp_rx, timestamp_tx based on frame and subframe //calculate timestamp_rx, timestamp_tx based on frame and subframe
proc->subframe_rx = sf; proc->subframe_rx = sf;
...@@ -560,9 +568,12 @@ void fh_if4p5_north_out(RU_t *ru) { ...@@ -560,9 +568,12 @@ void fh_if4p5_north_out(RU_t *ru) {
} }
if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) { if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) {
/// **** in TDD during DL send_IF4 of ULTICK to RCC **** /// /// **** in TDD during DL send_IF4 of ULTICK to RCC **** ///
if (subframe_select(fp,subframe)==SF_S && subframe==1) { if (subframe_select(fp,subframe)==SF_S && subframe==1 && ru->state==RU_RUN) {
send_IF4p5(ru, proc->frame_rx, proc->subframe_rx, IF4p5_PULCALIB); send_IF4p5(ru, proc->frame_rx, proc->subframe_rx, IF4p5_PULCALIB);
LOG_D(PHY,"~~~~~~******* Sending PULCALIB frame %d, subframe %d\n",proc->frame_rx,proc->subframe_rx); LOG_D(PHY,"~~~~~~******* Sending PULCALIB frame %d, subframe %d\n",proc->frame_rx,proc->subframe_rx);
T(T_RAU_INPUT_DMRS, T_INT(ru->idx), T_INT(proc->frame_rx), T_INT(proc->subframe_rx),
T_BUFFER(&ru->common.rxdataF[0][proc->subframe_rx*fp->symbols_per_tti*fp->ofdm_symbol_size],
fp->symbols_per_tti*fp->ofdm_symbol_size*sizeof(int32_t)));
} else { } else {
send_IF4p5(ru, proc->frame_rx, proc->subframe_rx, IF4p5_PULTICK); send_IF4p5(ru, proc->frame_rx, proc->subframe_rx, IF4p5_PULTICK);
LOG_D(PHY,"~~~~~~******* Sending PULTICK frame %d, subframe %d\n",proc->frame_rx,proc->subframe_rx); LOG_D(PHY,"~~~~~~******* Sending PULTICK frame %d, subframe %d\n",proc->frame_rx,proc->subframe_rx);
...@@ -877,8 +888,8 @@ void tx_rf(RU_t *ru) { ...@@ -877,8 +888,8 @@ void tx_rf(RU_t *ru) {
ru->nb_tx, ru->nb_tx,
flags); flags);
//int se1 = dB_fixed(signal_energy(txp1[0],siglen2+sf_extension)); int se1 = dB_fixed(signal_energy(txp1[0],siglen2+sf_extension));
//LOG_D(PHY,"******** frame %d subframe %d Slave sends DMRS of energy10 %d, energy3 %d\n",proc->frame_tx,proc->subframe_tx,se1,dB_fixed(signal_energy(txp[0],siglen+sf_extension))); LOG_I(PHY,"******** frame %d subframe %d Slave sends DMRS of energy10 %d, energy3 %d\n",proc->frame_tx,proc->subframe_tx,se1,dB_fixed(signal_energy(txp[0],siglen+sf_extension)));
//LOG_D(PHY,"txs1 %d, siglen2 %d, sf_extension %d\n",txs1,siglen2,sf_extension); //LOG_D(PHY,"txs1 %d, siglen2 %d, sf_extension %d\n",txs1,siglen2,sf_extension);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment