mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
Compare commits
16 Commits
statsMonit
...
inter-RRU-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba9ad48166 | ||
|
|
d310551467 | ||
|
|
3b638d1848 | ||
|
|
55e8acd26c | ||
|
|
703677955d | ||
|
|
b2318567b8 | ||
|
|
39b07e792c | ||
|
|
4a87791a74 | ||
|
|
74b1850cde | ||
|
|
06bae02383 | ||
|
|
7d0c9393ae | ||
|
|
6c6e54f851 | ||
|
|
bbaec98c6a | ||
|
|
2cb279d633 | ||
|
|
06c4da479b | ||
|
|
401549af59 |
@@ -88,6 +88,8 @@ typedef struct {
|
||||
int *nb_L1_CC;
|
||||
/// Number of RU instances in this node
|
||||
int nb_RU;
|
||||
/// Flag to start collecting channel estimates sent from the RRUs
|
||||
int collect;
|
||||
/// FlexRAN context variables
|
||||
flexran_agent_info_t **flexran;
|
||||
/// eNB context variables
|
||||
|
||||
@@ -45,6 +45,22 @@ ID = ENB_PHY_INPUT_SIGNAL
|
||||
DESC = eNodeB received signal in the time domain for a duration of 1ms
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:ENB
|
||||
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
|
||||
DESC = RAU received DMRS from the RRUs
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:ENB
|
||||
FORMAT = int,tag : int,frame : int,subframe : buffer,rxdataF_ext
|
||||
ID = CALIBRATION_CHANNEL_ESTIMATES
|
||||
DESC = RAU received DMRS estimates from the RRUs
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:ENB
|
||||
FORMAT = int,tag : int,frame : int,subframe : int,symbol : buffer,calib_ch
|
||||
ID = CALIBRATION_CHANNEL_ESTIMATES_TIME
|
||||
DESC = RAU received DMRS estimates in the time domain from the RRUs
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:ENB
|
||||
FORMAT = int,tag : int,frame : int,subframe : buffer,calib_ch_time
|
||||
ID = ENB_PHY_OUTPUT_SIGNAL
|
||||
DESC = eNodeB sent signal in the time domain for a duration of 1ms
|
||||
GROUP = ALL:PHY:HEAVY:ENB
|
||||
|
||||
@@ -18,6 +18,8 @@ void usage(void)
|
||||
" (you can use several -f options)\n"
|
||||
" -after <raw time> <nsec> 'event' time has to be greater than this\n"
|
||||
" -count <n> dump 'n' matching events (less if EOF reached)\n"
|
||||
" -modulo <n> dump frame which modulo <rru-count> is <n>\n"
|
||||
" -rru-count <n> set rru count\n"
|
||||
);
|
||||
exit(1);
|
||||
}
|
||||
@@ -51,10 +53,13 @@ int main(int n, char **v)
|
||||
int filter_arg[n];
|
||||
int filter_value[n];
|
||||
int filter_count = 0;
|
||||
int filter_frame;
|
||||
int buffer_arg;
|
||||
int found;
|
||||
int count = 1;
|
||||
int check_time = 0;
|
||||
int modulo = 0;
|
||||
int rru_count = 1;
|
||||
time_t sec;
|
||||
long nsec;
|
||||
|
||||
@@ -77,6 +82,10 @@ int main(int n, char **v)
|
||||
}
|
||||
if (!strcmp(v[i], "-count"))
|
||||
{ if (i > n-2) usage(); count = atoi(v[++i]); continue; }
|
||||
if (!strcmp(v[i], "-modulo"))
|
||||
{ if (i > n-2) usage(); modulo = atoi(v[++i]); continue; }
|
||||
if (!strcmp(v[i], "-rru-count"))
|
||||
{ if (i > n-2) usage(); rru_count = atoi(v[++i]); continue; }
|
||||
if (file == NULL) { file = v[i]; continue; }
|
||||
if (event_name == NULL) { event_name = v[i]; continue; }
|
||||
if (buffer_name == NULL) { buffer_name = v[i]; continue; }
|
||||
@@ -108,6 +117,8 @@ int main(int n, char **v)
|
||||
for (i = 0; i < filter_count; i++)
|
||||
filter_arg[i] = get_filter_arg(&f, filter[i], "int");
|
||||
|
||||
filter_frame = get_filter_arg(&f, "frame", "int");
|
||||
|
||||
fd = open(file, O_RDONLY);
|
||||
if (fd == -1) { perror(file); exit(1); }
|
||||
|
||||
@@ -125,6 +136,8 @@ int main(int n, char **v)
|
||||
break;
|
||||
if (i != filter_count)
|
||||
continue;
|
||||
if (e.e[filter_frame].i % rru_count != modulo)
|
||||
continue;
|
||||
if (check_time &&
|
||||
!(e.sending_time.tv_sec > sec ||
|
||||
(e.sending_time.tv_sec == sec && e.sending_time.tv_nsec >= nsec)))
|
||||
|
||||
@@ -453,42 +453,43 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
|
||||
prach_vars->rxsigF[ce_level] = (int16_t **) malloc16_clear (64 * sizeof (int16_t *));
|
||||
}
|
||||
|
||||
/* number of elements of an array X is computed as sizeof(X) / sizeof(X[0])
|
||||
AssertFatal(fp->nb_antennas_rx <= sizeof(prach_vars->rxsigF) / sizeof(prach_vars->rxsigF[0]),
|
||||
"nb_antennas_rx too large");
|
||||
for (i=0; i<fp->nb_antennas_rx; i++) {
|
||||
prach_vars->rxsigF[i] = (int16_t*)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
|
||||
LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n",i,prach_vars->rxsigF[i]);
|
||||
}*/
|
||||
/* number of elements of an array X is computed as sizeof(X) / sizeof(X[0])
|
||||
AssertFatal(fp->nb_antennas_rx <= sizeof(prach_vars->rxsigF) / sizeof(prach_vars->rxsigF[0]),
|
||||
"nb_antennas_rx too large");
|
||||
for (i=0; i<fp->nb_antennas_rx; i++) {
|
||||
prach_vars->rxsigF[i] = (int16_t*)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
|
||||
LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n",i,prach_vars->rxsigF[i]);
|
||||
}*/
|
||||
|
||||
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
|
||||
|
||||
//FIXME
|
||||
pusch_vars[UE_id] = (LTE_eNB_PUSCH *) malloc16_clear (NUMBER_OF_UE_MAX * sizeof (LTE_eNB_PUSCH));
|
||||
|
||||
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
|
||||
//FIXME
|
||||
pusch_vars[UE_id] = (LTE_eNB_PUSCH *) malloc16_clear (NUMBER_OF_UE_MAX * sizeof (LTE_eNB_PUSCH));
|
||||
pusch_vars[UE_id]->rxdataF_ext = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->rxdataF_ext2 = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->drs_ch_estimates = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->drs_ch_estimates_time = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->rxdataF_comp = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->ul_ch_mag = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->ul_ch_magb = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
AssertFatal (fp->ofdm_symbol_size > 127, "fp->ofdm_symbol_size %d<128\n", fp->ofdm_symbol_size);
|
||||
AssertFatal (fp->symbols_per_tti > 11, "fp->symbols_per_tti %d < 12\n", fp->symbols_per_tti);
|
||||
AssertFatal (fp->N_RB_UL > 5, "fp->N_RB_UL %d < 6\n", fp->N_RB_UL);
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
// RK 2 times because of output format of FFT!
|
||||
// FIXME We should get rid of this
|
||||
pusch_vars[UE_id]->rxdataF_ext[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
|
||||
pusch_vars[UE_id]->rxdataF_ext2[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
|
||||
pusch_vars[UE_id]->drs_ch_estimates[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
|
||||
pusch_vars[UE_id]->drs_ch_estimates_time[i] = (int32_t *)malloc16_clear( 2*sizeof(int32_t)*fp->ofdm_symbol_size );
|
||||
pusch_vars[UE_id]->rxdataF_comp[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
|
||||
pusch_vars[UE_id]->ul_ch_mag[i] = (int32_t *)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 );
|
||||
pusch_vars[UE_id]->ul_ch_magb[i] = (int32_t *)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 );
|
||||
pusch_vars[UE_id]->rxdataF_ext = (int32_t **) malloc16 (NB_PUSCH_ANT_PORTS * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->rxdataF_ext2 = (int32_t **) malloc16 (NB_PUSCH_ANT_PORTS * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->drs_ch_estimates = (int32_t **) malloc16 (NB_PUSCH_ANT_PORTS * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->drs_ch_estimates_time = (int32_t **) malloc16 (NB_PUSCH_ANT_PORTS * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->rxdataF_comp = (int32_t **) malloc16 (NB_PUSCH_ANT_PORTS * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->ul_ch_mag = (int32_t **) malloc16 (NB_PUSCH_ANT_PORTS * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->ul_ch_magb = (int32_t **) malloc16 (NB_PUSCH_ANT_PORTS * sizeof (int32_t *));
|
||||
AssertFatal (fp->ofdm_symbol_size > 127, "fp->ofdm_symbol_size %d<128\n", fp->ofdm_symbol_size);
|
||||
AssertFatal (fp->symbols_per_tti > 11, "fp->symbols_per_tti %d < 12\n", fp->symbols_per_tti);
|
||||
AssertFatal (fp->N_RB_UL > 5, "fp->N_RB_UL %d < 6\n", fp->N_RB_UL);
|
||||
for (i = 0; i < NB_PUSCH_ANT_PORTS; i++) {
|
||||
// RK 2 times because of output format of FFT!
|
||||
// FIXME We should get rid of this
|
||||
pusch_vars[UE_id]->rxdataF_ext[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
|
||||
pusch_vars[UE_id]->rxdataF_ext2[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
|
||||
pusch_vars[UE_id]->drs_ch_estimates[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
|
||||
pusch_vars[UE_id]->drs_ch_estimates_time[i] = (int32_t*)malloc16_clear( NB_PUSCH_ANT_PORTS*sizeof(int32_t)*fp->ofdm_symbol_size );
|
||||
pusch_vars[UE_id]->rxdataF_comp[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
|
||||
pusch_vars[UE_id]->ul_ch_mag[i] = (int32_t*)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 );
|
||||
pusch_vars[UE_id]->ul_ch_magb[i] = (int32_t*)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 );
|
||||
}
|
||||
|
||||
pusch_vars[UE_id]->llr = (int16_t *)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
|
||||
} //UE_id
|
||||
|
||||
pusch_vars[UE_id]->llr = (int16_t*)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
|
||||
} //UE_id
|
||||
|
||||
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++)
|
||||
eNB->UE_stats_ptr[UE_id] = &eNB->UE_stats[UE_id];
|
||||
@@ -549,7 +550,7 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB) {
|
||||
free_and_zero(prach_vars->rxsigF[0]);
|
||||
|
||||
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
|
||||
for (i = 0; i < 2; i++) {
|
||||
for (i = 0; i < NB_PUSCH_ANT_PORTS; i++) {
|
||||
free_and_zero(pusch_vars[UE_id]->rxdataF_ext[i]);
|
||||
free_and_zero(pusch_vars[UE_id]->rxdataF_ext2[i]);
|
||||
free_and_zero(pusch_vars[UE_id]->drs_ch_estimates[i]);
|
||||
|
||||
@@ -41,9 +41,7 @@ int phy_init_RU(RU_t *ru) {
|
||||
//load_dftslib();
|
||||
LOG_I(PHY,"Initializing RU signal buffers (if_south %s) nb_tx %d\n",ru_if_types[ru->if_south],ru->nb_tx);
|
||||
|
||||
if (ru->is_slave == 1) {
|
||||
generate_ul_ref_sigs_rx();
|
||||
}
|
||||
generate_ul_ref_sigs_rx();
|
||||
|
||||
if (ru->if_south <= REMOTE_IF5) { // this means REMOTE_IF5 or LOCAL_RF, so allocate memory for time-domain signals
|
||||
// Time-domain signals
|
||||
@@ -57,13 +55,14 @@ int phy_init_RU(RU_t *ru) {
|
||||
fp->samples_per_tti*10*sizeof(int32_t));
|
||||
}
|
||||
|
||||
if (ru->is_slave == 1) {
|
||||
calibration->drs_ch_estimates_time = (int32_t **)malloc16_clear(ru->nb_rx*sizeof(int32_t *));
|
||||
calibration->drs_ch_estimates_time = (int32_t**)malloc16_clear(ru->nb_rx*sizeof(int32_t*));
|
||||
for (i=0; i<ru->nb_rx; i++) {
|
||||
calibration->drs_ch_estimates_time[i] = (int32_t*)malloc16_clear(2*sizeof(int32_t)*fp->ofdm_symbol_size);
|
||||
}
|
||||
|
||||
for (i=0; i<ru->nb_rx; i++) {
|
||||
calibration->drs_ch_estimates_time[i] = (int32_t *)malloc16_clear(2*sizeof(int32_t)*fp->ofdm_symbol_size);
|
||||
}
|
||||
}
|
||||
|
||||
for (i=0; i<ru->nb_rx; i++) {
|
||||
ru->common.rxdata[i] = (int32_t *)malloc16_clear( fp->samples_per_tti*10*sizeof(int32_t) );
|
||||
@@ -104,19 +103,16 @@ int phy_init_RU(RU_t *ru) {
|
||||
ru->common.rxdataF[i] = (int32_t *)malloc16_clear(sizeof(int32_t)*(2*fp->ofdm_symbol_size*fp->symbols_per_tti) );
|
||||
LOG_I(PHY,"rxdataF[%d] %p for RU %d\n",i,ru->common.rxdataF[i],ru->idx);
|
||||
}
|
||||
|
||||
if (ru->is_slave == 1) {
|
||||
// allocate FFT output buffers after extraction (RX)
|
||||
calibration->rxdataF_ext = (int32_t **)malloc16(2*sizeof(int32_t *));
|
||||
calibration->drs_ch_estimates = (int32_t **)malloc16(2*sizeof(int32_t *));
|
||||
|
||||
for (i=0; i<ru->nb_rx; i++) {
|
||||
// allocate 2 subframes of I/Q signal data (frequency)
|
||||
calibration->rxdataF_ext[i] = (int32_t *)malloc16_clear(sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
|
||||
LOG_I(PHY,"rxdataF_ext[%d] %p for RU %d\n",i,calibration->rxdataF_ext[i],ru->idx);
|
||||
calibration->drs_ch_estimates[i] = (int32_t *)malloc16_clear(sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti);
|
||||
}
|
||||
}
|
||||
|
||||
// allocate FFT output buffers after extraction (RX)
|
||||
calibration->rxdataF_ext = (int32_t**)malloc16(2*sizeof(int32_t*));
|
||||
calibration->drs_ch_estimates = (int32_t**)malloc16(2*sizeof(int32_t*));
|
||||
for (i=0; i<ru->nb_rx; i++) {
|
||||
// allocate 2 subframes of I/Q signal data (frequency)
|
||||
calibration->rxdataF_ext[i] = (int32_t*)malloc16_clear(sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
|
||||
LOG_I(PHY,"rxdataF_ext[%d] %p for RU %d\n",i,calibration->rxdataF_ext[i],ru->idx);
|
||||
calibration->drs_ch_estimates[i] = (int32_t*)malloc16_clear(sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti);
|
||||
}
|
||||
|
||||
/* number of elements of an array X is computed as sizeof(X) / sizeof(X[0]) */
|
||||
//AssertFatal(ru->nb_rx <= sizeof(ru->prach_rxsigF) / sizeof(ru->prach_rxsigF[0]),
|
||||
@@ -191,15 +187,10 @@ void phy_free_RU(RU_t *ru) {
|
||||
for (i = 0; i < ru->nb_tx; i++) free_and_zero(ru->common.txdata[i]);
|
||||
|
||||
for (i = 0; i < ru->nb_rx; i++) free_and_zero(ru->common.rxdata[i]);
|
||||
|
||||
if (ru->is_slave == 1) {
|
||||
for (i = 0; i < ru->nb_rx; i++) {
|
||||
free_and_zero(calibration->drs_ch_estimates_time[i]);
|
||||
}
|
||||
|
||||
free_and_zero(calibration->drs_ch_estimates_time);
|
||||
for (i = 0; i < ru->nb_rx; i++) {
|
||||
free_and_zero(calibration->drs_ch_estimates_time[i]);
|
||||
}
|
||||
|
||||
free_and_zero(calibration->drs_ch_estimates_time);
|
||||
free_and_zero(ru->common.txdata);
|
||||
free_and_zero(ru->common.rxdata);
|
||||
} // else: IF5 or local RF -> nothing to free()
|
||||
@@ -218,16 +209,13 @@ void phy_free_RU(RU_t *ru) {
|
||||
for (i = 0; i < ru->nb_rx; i++) free_and_zero(ru->common.rxdataF[i]);
|
||||
|
||||
free_and_zero(ru->common.rxdataF);
|
||||
|
||||
if (ru->is_slave == 1) {
|
||||
for (i = 0; i < ru->nb_rx; i++) {
|
||||
for (i = 0; i < ru->nb_rx; i++) {
|
||||
free_and_zero(calibration->rxdataF_ext[i]);
|
||||
free_and_zero(calibration->drs_ch_estimates[i]);
|
||||
}
|
||||
free_and_zero(calibration->drs_ch_estimates[i]);
|
||||
}
|
||||
|
||||
free_and_zero(calibration->rxdataF_ext);
|
||||
free_and_zero(calibration->drs_ch_estimates);
|
||||
}
|
||||
|
||||
for (i = 0; i < ru->nb_rx; i++) {
|
||||
free_and_zero(ru->prach_rxsigF[0][i]);
|
||||
|
||||
@@ -122,7 +122,7 @@ int lte_est_timing_advance_pusch(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int sync_pos = (frame_parms->ofdm_symbol_size-cyclic_shift*frame_parms->ofdm_symbol_size/12)%(frame_parms->ofdm_symbol_size);
|
||||
|
||||
AssertFatal(frame_parms->ofdm_symbol_size > 127,"frame_parms->ofdm_symbol_size %d<128\n",frame_parms->ofdm_symbol_size);
|
||||
AssertFatal(frame_parms->nb_antennas_rx >0 && frame_parms->nb_antennas_rx<3,"frame_parms->nb_antennas_rx %d not in [0,1]\n",
|
||||
AssertFatal(frame_parms->nb_antennas_rx >0 && frame_parms->nb_antennas_rx<NB_PUSCH_ANT_PORTS+1,"frame_parms->nb_antennas_rx %d not in [0,1,2]\n",
|
||||
frame_parms->nb_antennas_rx);
|
||||
for (i = 0; i < frame_parms->ofdm_symbol_size; i++) {
|
||||
temp = 0;
|
||||
|
||||
@@ -116,6 +116,57 @@ void send_IF4p5(RU_t *ru,
|
||||
slotoffsetF += fp->ofdm_symbol_size;
|
||||
blockoffsetF += fp->ofdm_symbol_size;
|
||||
}
|
||||
} else if (packet_type == IF4p5_PULCALIB) {
|
||||
LOG_D(PHY,"send PULCALIB_IF4p5: RU %d frame %d, subframe %d\n",ru->idx,frame,subframe);
|
||||
|
||||
AssertFatal(subframe_select(fp,subframe)==SF_S, "calling PULCALIB in non-S subframe\n");
|
||||
db_fulllength = 12*fp->N_RB_UL;
|
||||
db_halflength = (db_fulllength)>>1;
|
||||
slotoffsetF = 0;
|
||||
blockoffsetF = (fp->ofdm_symbol_size)-db_halflength;
|
||||
|
||||
|
||||
if (eth->flags == ETH_RAW_IF4p5_MODE) {
|
||||
packet_header = (IF4p5_header_t *)(tx_buffer + MAC_HEADER_SIZE_BYTES);
|
||||
data_block = (uint16_t*)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t);
|
||||
} else {
|
||||
packet_header = (IF4p5_header_t *)(tx_buffer);
|
||||
data_block = (uint16_t*)(tx_buffer + sizeof_IF4p5_header_t);
|
||||
}
|
||||
gen_IF4p5_ul_header(packet_header, packet_type, frame, subframe);
|
||||
|
||||
AssertFatal(rxdataF[0]!=NULL,"rxdataF[0] is null\n");
|
||||
for (symbol_id=0; symbol_id<11; symbol_id++) {
|
||||
if (symbol_id==3 || symbol_id==10) {
|
||||
for (int antenna_id=0; antenna_id<ru->nb_tx; antenna_id++) {
|
||||
for (element_id=0; element_id<db_halflength; element_id++) {
|
||||
i = (uint16_t*) &rxdataF[antenna_id][blockoffsetF+element_id];
|
||||
data_block[element_id] = ((uint16_t) lin2alaw_if4p5[*i]) | (lin2alaw_if4p5[*(i+1)]<<8);
|
||||
|
||||
i = (uint16_t*) &rxdataF[antenna_id][slotoffsetF+element_id];
|
||||
data_block[element_id+db_halflength] = ((uint16_t) lin2alaw_if4p5[*i]) | (lin2alaw_if4p5[*(i+1)]<<8);
|
||||
}
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_COMPR_IF, 0 );
|
||||
packet_header->frame_status &= ~(0x7);
|
||||
packet_header->frame_status |= (ru->nb_rx-1);
|
||||
|
||||
packet_header->frame_status &= ~(0x000f<<26);
|
||||
packet_header->frame_status |= (symbol_id&0x000f)<<26;
|
||||
if (ru->idx<=1) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF0+ru->idx, 1 );
|
||||
if ((ru->ifdevice.trx_write_func(&ru->ifdevice,
|
||||
symbol_id,
|
||||
&tx_buffer,
|
||||
db_fulllength*ru->nb_rx,
|
||||
1,
|
||||
IF4p5_PULCALIB)) < 0) {
|
||||
perror("ETHERNET write for IF4p5_PULCALIB\n");
|
||||
}
|
||||
if (ru->idx<=1) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF0+ru->idx, 0 );
|
||||
}
|
||||
slotoffsetF += fp->ofdm_symbol_size;
|
||||
blockoffsetF += fp->ofdm_symbol_size;
|
||||
}
|
||||
} else if ((packet_type == IF4p5_PULFFT)||
|
||||
(packet_type == IF4p5_PULTICK)) {
|
||||
db_fulllength = 12*fp->N_RB_UL;
|
||||
@@ -383,6 +434,38 @@ void recv_IF4p5(RU_t *ru,
|
||||
signal_energy((int *)&rxdataF[antenna_id][blockoffsetF],db_halflength)));
|
||||
data_block+=db_fulllength;
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF, 0 );
|
||||
} else if (*packet_type == IF4p5_PULCALIB) {
|
||||
db_fulllength/=ru->nb_rx;
|
||||
db_halflength/=ru->nb_rx;
|
||||
*symbol_number = ((packet_header->frame_status)>>26)&0x000f;
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RECV_IF4_SYMBOL, *symbol_number );
|
||||
if (ru->idx==0) LOG_D(PHY,"UL_IF4p5: RU %d : frame %d, subframe %d, symbol %d\n",ru->idx,*frame,*subframe,*symbol_number);
|
||||
|
||||
|
||||
slotoffsetF = (*symbol_number)*(fp->ofdm_symbol_size);
|
||||
blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF, 1 );
|
||||
for (int antenna_id=0;antenna_id<ru->nb_rx;antenna_id++) {
|
||||
for (element_id=0; element_id<db_halflength; element_id++) {
|
||||
i = (uint16_t*) &rxdataF[antenna_id][blockoffsetF+element_id];
|
||||
*i = alaw2lin_if4p5[ (data_block[element_id] & 0xff) ];
|
||||
*(i+1) = alaw2lin_if4p5[ (data_block[element_id]>>8) ];
|
||||
|
||||
i = (uint16_t*) &rxdataF[antenna_id][slotoffsetF+element_id];
|
||||
*i = alaw2lin_if4p5[ (data_block[element_id+db_halflength] & 0xff) ];
|
||||
*(i+1) = alaw2lin_if4p5[ (data_block[element_id+db_halflength]>>8) ];
|
||||
|
||||
//if (element_id==0) LOG_I(PHY,"recv_if4p5: symbol %d rxdata0 = (%u,%u)\n",*symbol_number,*i,*(i+1));
|
||||
}
|
||||
LOG_D(PHY,"PULCALIB_IF4p5: CC_id %d : frame %d, subframe %d (symbol %d)=> %d dB\n",ru->idx,*frame,*subframe,*symbol_number,
|
||||
dB_fixed(signal_energy((int*)&rxdataF[antenna_id][slotoffsetF],db_halflength)+
|
||||
signal_energy((int*)&rxdataF[antenna_id][blockoffsetF],db_halflength)));
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF, 0 );
|
||||
} else if (*packet_type >= IF4p5_PRACH &&
|
||||
*packet_type <= IF4p5_PRACH + 4) {
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF, 0 );
|
||||
} else if (*packet_type >= IF4p5_PRACH &&
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#define IF4p5_PRACH_BR_CE2 0x0024
|
||||
#define IF4p5_PRACH_BR_CE3 0x0025
|
||||
#define IF4p5_PULTICK 0x0026
|
||||
#define IF4p5_PULCALIB 0x0027
|
||||
|
||||
struct IF4p5_header {
|
||||
/// Type
|
||||
|
||||
@@ -689,8 +689,9 @@ void ulsch_extract_rbs_single(int32_t **rxdataF,
|
||||
int32_t *rxF,*rxF_ext;
|
||||
//uint8_t symbol = l+Ns*frame_parms->symbols_per_tti/2;
|
||||
uint8_t symbol = l+((7-frame_parms->Ncp)*(Ns&1)); ///symbol within sub-frame
|
||||
AssertFatal((frame_parms->nb_antennas_rx>0) && (frame_parms->nb_antennas_rx<5),
|
||||
"nb_antennas_rx not in (1-4)\n");
|
||||
|
||||
AssertFatal((frame_parms->nb_antennas_rx>0) && (frame_parms->nb_antennas_rx<7),
|
||||
"nb_antennas_rx not in (1-6)\n");
|
||||
|
||||
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
|
||||
nb_rb1 = cmin(cmax((int)(frame_parms->N_RB_UL) - (int)(2*first_rb),(int)0),(int)(2*nb_rb)); // 2 times no. RBs before the DC
|
||||
|
||||
@@ -154,7 +154,19 @@ void remove_7_5_kHz(RU_t *ru,uint8_t slot)
|
||||
(2*frame_parms->nb_prefix_samples)+
|
||||
frame_parms->nb_prefix_samples0],
|
||||
(frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples)*sizeof(int32_t));
|
||||
}
|
||||
}
|
||||
|
||||
// undo 7.5 kHz offset for symbol 10 (for calibration)
|
||||
if (slot == 3){
|
||||
memcpy((void*)&rxdata_7_5kHz[aa][(10*frame_parms->ofdm_symbol_size)+
|
||||
(8*frame_parms->nb_prefix_samples)+
|
||||
2*frame_parms->nb_prefix_samples0],
|
||||
(void*)&rxdata[aa][slot_offset+ru->N_TA_offset+
|
||||
(3*frame_parms->ofdm_symbol_size)+
|
||||
(2*frame_parms->nb_prefix_samples)+
|
||||
frame_parms->nb_prefix_samples0],
|
||||
(frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples)*sizeof(int32_t));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -227,7 +227,6 @@ int32_t signal_energy_nodc(int32_t *input,uint32_t length)
|
||||
register int32x4_t tmpE;
|
||||
int32x2_t tmpE2;
|
||||
int16x4_t *in = (int16x4_t *)input;
|
||||
|
||||
tmpE = vdupq_n_s32(0);
|
||||
|
||||
for (i=0; i<length>>1; i++) {
|
||||
|
||||
@@ -430,6 +430,10 @@ typedef enum {
|
||||
|
||||
|
||||
typedef struct RU_t_s {
|
||||
/// tag of this ru
|
||||
uint32_t tag;
|
||||
/// number of RRUs
|
||||
uint32_t p;
|
||||
/// index of this ru
|
||||
uint32_t idx;
|
||||
/// Pointer to configuration file
|
||||
@@ -466,6 +470,8 @@ typedef struct RU_t_s {
|
||||
int wait_cnt;
|
||||
/// counter to delay start of slave RUs until stable synchronization
|
||||
int wait_check;
|
||||
/// counter to count missed synch events during synchronization of RU
|
||||
int missed_synch_events;
|
||||
/// Total gain of receive chain
|
||||
uint32_t rx_total_gain_dB;
|
||||
/// number of bands that this device can support
|
||||
@@ -686,6 +692,10 @@ typedef struct RRU_capabilities_s {
|
||||
|
||||
|
||||
typedef struct RRU_config_s {
|
||||
/// tag of an RU
|
||||
uint32_t tag;
|
||||
/// number of slave RRUs
|
||||
uint32_t p;
|
||||
/// Fronthaul format
|
||||
RU_if_south_t FH_fmt;
|
||||
/// number of EUTRA bands (<=4) configured in RRU
|
||||
|
||||
@@ -165,7 +165,7 @@ typedef struct {
|
||||
/// - second index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
|
||||
int32_t **ul_ch_magb;
|
||||
/// measured RX power based on DRS
|
||||
int ulsch_power[2];
|
||||
int ulsch_power[6];
|
||||
/// measured Interference power based on DRS
|
||||
int ulsch_interference_power[2];
|
||||
/// \brief llr values.
|
||||
|
||||
@@ -175,6 +175,7 @@
|
||||
#define SLOT_TIME_NS (SLOT_LENGTH_SAMPLES*(1e3)/7.68) // slot time in ns
|
||||
|
||||
#define NB_ANTENNA_PORTS_ENB 6 // total number of eNB antenna ports
|
||||
#define NB_PUSCH_ANT_PORTS 6 // total number of eNB pusch antenna ports
|
||||
|
||||
#ifdef EXMIMO
|
||||
#define TARGET_RX_POWER 55 // Target digital power for the AGC
|
||||
|
||||
@@ -138,11 +138,11 @@ void feptx0(RU_t *ru,
|
||||
fp->frame_type,ru->is_slave);
|
||||
*/
|
||||
int num_symb = 7;
|
||||
|
||||
/*
|
||||
if (subframe_select(fp,subframe) == SF_S)
|
||||
num_symb = fp->dl_symbols_in_S_subframe+1;
|
||||
|
||||
if (ru->generate_dmrs_sync == 1 && slot == 0 && subframe == 1 && aa==0) {
|
||||
*/
|
||||
if (ru->generate_dmrs_sync == 1 && /*slot == 2 &&*/ subframe == 1 && aa==0) {
|
||||
//int32_t dmrs[ru->frame_parms.ofdm_symbol_size*14] __attribute__((aligned(32)));
|
||||
//int32_t *dmrsp[2] ={dmrs,NULL}; //{&dmrs[(3-ru->frame_parms.Ncp)*ru->frame_parms.ofdm_symbol_size],NULL};
|
||||
|
||||
@@ -258,7 +258,9 @@ void feptx_ofdm_2thread(RU_t *ru,
|
||||
|
||||
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM , 1 );
|
||||
|
||||
if (subframe_select(fp,subframe)==SF_DL) {
|
||||
//The 2nd check is to force the RRUs to send DMRS at symbol 10-subframe 1-slot 1 (for calibration)
|
||||
if (subframe_select(fp,subframe)==SF_DL || ((subframe_select(fp,subframe)==SF_DL || subframe==1))) {
|
||||
//if (subframe_select(fp,subframe)==SF_DL) {
|
||||
// If this is not an S-subframe
|
||||
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);
|
||||
@@ -654,7 +656,7 @@ void ru_fep_full_2thread(RU_t *ru,
|
||||
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
|
||||
RU_CALIBRATION *calibration = &ru->calibration;
|
||||
RRU_CONFIG_msg_t rru_config_msg;
|
||||
int check_sync_pos;
|
||||
int check_sync_pos,Ns,l;
|
||||
|
||||
struct timespec wait;
|
||||
|
||||
@@ -703,37 +705,93 @@ void ru_fep_full_2thread(RU_t *ru,
|
||||
printf("delay in fep wait on condition in frame_rx: %d subframe_rx: %d \n", proc->frame_rx, proc->tti_rx);
|
||||
}
|
||||
|
||||
if (proc->tti_rx/*proc->subframe_rx*/==1 && ru->is_slave==1/* && ru->state == RU_CHECK_SYNC*/)
|
||||
{
|
||||
//LOG_I(PHY,"Running check synchronization procedure for frame %d\n", proc->frame_rx);
|
||||
if (proc->tti_rx==1 && ru->is_slave==0) {
|
||||
|
||||
Ns = 1;
|
||||
l = 10;
|
||||
ulsch_extract_rbs_single(ru->common.rxdataF,
|
||||
calibration->rxdataF_ext,
|
||||
0,
|
||||
fp->N_RB_DL,
|
||||
3%(fp->symbols_per_tti/2),// l = symbol within slot
|
||||
3/(fp->symbols_per_tti/2),// Ns = slot number
|
||||
fp);
|
||||
calibration->rxdataF_ext,
|
||||
0,
|
||||
fp->N_RB_DL,
|
||||
3%(fp->symbols_per_tti/2),// l = symbol within slot
|
||||
Ns,// Ns = slot number
|
||||
fp);
|
||||
|
||||
lte_ul_channel_estimation_RRU(fp,
|
||||
calibration->drs_ch_estimates,
|
||||
calibration->drs_ch_estimates_time,
|
||||
calibration->rxdataF_ext,
|
||||
fp->N_RB_DL,
|
||||
proc->frame_rx,
|
||||
proc->tti_rx,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
l,
|
||||
0,
|
||||
0);
|
||||
|
||||
T(T_CALIBRATION_CHANNEL_ESTIMATES, T_INT(ru->idx), T_INT(proc->frame_rx), T_INT(proc->tti_rx),
|
||||
T_INT(l),T_BUFFER(&calibration->drs_ch_estimates[0][l*12*fp->N_RB_UL],
|
||||
12*fp->N_RB_UL*sizeof(int32_t)));
|
||||
}
|
||||
|
||||
|
||||
if (proc->tti_rx==1 && ru->is_slave==1) {
|
||||
|
||||
Ns = 0;
|
||||
l = 3;
|
||||
|
||||
//LOG_I(PHY,"Running check synchronization procedure for frame %d\n", proc->frame_rx);
|
||||
ulsch_extract_rbs_single(ru->common.rxdataF,
|
||||
calibration->rxdataF_ext,
|
||||
0,
|
||||
fp->N_RB_DL,
|
||||
3%(fp->symbols_per_tti/2),// l = symbol within slot
|
||||
Ns,// Ns = slot number
|
||||
fp);
|
||||
|
||||
lte_ul_channel_estimation_RRU(fp,
|
||||
calibration->drs_ch_estimates,
|
||||
calibration->drs_ch_estimates_time,
|
||||
calibration->rxdataF_ext,
|
||||
fp->N_RB_DL, //N_rb_alloc,
|
||||
proc->frame_rx,
|
||||
proc->tti_rx,//proc->subframe_rx,
|
||||
0,//u = 0..29
|
||||
0,//v = 0,1
|
||||
/*eNB->ulsch[ru->idx]->cyclicShift,cyclic_shift,0..7*/0,
|
||||
3,//l,
|
||||
0,//interpolate,
|
||||
0 /*eNB->ulsch[ru->idx]->rnti rnti or ru->ulsch[eNB_id]->rnti*/);
|
||||
proc->frame_rx,
|
||||
proc->tti_rx,
|
||||
0,//u = 0..29
|
||||
0,//v = 0,1
|
||||
/*eNB->ulsch[ru->idx]->cyclicShift,cyclic_shift,0..7*/0,
|
||||
l,//l
|
||||
0,//interpolate,
|
||||
0 /*eNB->ulsch[ru->idx]->rnti rnti or ru->ulsch[eNB_id]->rnti*/);
|
||||
|
||||
|
||||
|
||||
//check_sync_pos = lte_est_timing_advance_pusch((PHY_VARS_eNB *)NULL,ru->idx);
|
||||
check_sync_pos = lte_est_timing_advance_pusch(ru->frame_parms, ru->calibration.drs_ch_estimates_time);
|
||||
|
||||
check_sync_pos = lte_est_timing_advance_pusch(ru->frame_parms, ru->calibration.drs_ch_estimates_time);
|
||||
if (ru->state == RU_CHECK_SYNC) {
|
||||
if ((check_sync_pos >= 0 && check_sync_pos<8) || (check_sync_pos < 0 && check_sync_pos>-8)) {
|
||||
LOG_I(PHY,"~~~~~~~~~~~ check_sync_pos %d, frame %d, cnt %d\n",check_sync_pos,proc->frame_rx,ru->wait_check);
|
||||
ru->wait_check++;
|
||||
}
|
||||
else {
|
||||
ru->missed_synch_events++;
|
||||
LOG_I(PHY,"!!!!!!!!!!!! check_sync_pos %d, frame %d, cnt %d, missed %d\n",check_sync_pos,proc->frame_rx,ru->wait_check,ru->missed_synch_events);
|
||||
}
|
||||
|
||||
if (ru->missed_synch_events > 2) {
|
||||
ru->in_synch = 0;
|
||||
if (ru->stop_rf) {
|
||||
ru->stop_rf(ru);
|
||||
ru->state = RU_SYNC;
|
||||
ru->cmd = EMPTY;
|
||||
LOG_I(PHY,"RU %d rf device stopped\n",ru->idx);
|
||||
LOG_M("rxdata.m","rxdata",&ru->common.rxdata[0][0], fp->samples_per_tti*2,1,1);
|
||||
exit(-1);
|
||||
} else AssertFatal(1==0,"ru->stop_rf doesn't exist\n");
|
||||
}
|
||||
|
||||
|
||||
if (ru->wait_check==20) {
|
||||
ru->state = RU_RUN;
|
||||
|
||||
@@ -204,7 +204,11 @@ int trx_eth_write_raw_IF4p5(openair0_device *device, openair0_timestamp timestam
|
||||
} else if (flags == IF4p5_PULFFT) {
|
||||
packet_size = RAW_IF4p5_PULFFT_SIZE_BYTES(nblocks);
|
||||
} else if (flags == IF4p5_PULTICK) {
|
||||
packet_size = RAW_IF4p5_PULTICK_SIZE_BYTES;
|
||||
packet_size = RAW_IF4p5_PULTICK_SIZE_BYTES;
|
||||
} else if (flags == IF4p5_PULCALIB) {
|
||||
packet_size = RAW_IF4p5_PULCALIB_SIZE_BYTES(nblocks);
|
||||
} else if (flags == IF5_MOBIPASS) {
|
||||
packet_size = RAW_IF5_MOBIPASS_SIZE_BYTES;
|
||||
} else {
|
||||
packet_size = RAW_IF4p5_PRACH_SIZE_BYTES;
|
||||
}
|
||||
|
||||
@@ -236,7 +236,9 @@ int trx_eth_write_udp_IF4p5(openair0_device *device, openair0_timestamp timestam
|
||||
} else if (flags == IF4p5_PULFFT) {
|
||||
packet_size = UDP_IF4p5_PULFFT_SIZE_BYTES(nblocks);
|
||||
} else if (flags == IF4p5_PULTICK) {
|
||||
packet_size = UDP_IF4p5_PULTICK_SIZE_BYTES;
|
||||
packet_size = UDP_IF4p5_PULTICK_SIZE_BYTES;
|
||||
} else if (flags == IF4p5_PULCALIB) {
|
||||
packet_size = UDP_IF4p5_PULCALIB_SIZE_BYTES(nblocks);
|
||||
} else if ((flags >= IF4p5_PRACH)&&
|
||||
(flags <= (IF4p5_PRACH+4))) {
|
||||
packet_size = UDP_HEADER_SIZE_BYTES + IPV4_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + (nsamps<<1);
|
||||
|
||||
@@ -76,10 +76,12 @@
|
||||
#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_PRACH_SIZE_BYTES (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + PRACH_BLOCK_SIZE_BYTES)
|
||||
#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_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_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(nblocks) (UDP_HEADER_SIZE_BYTES + IPV4_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks))
|
||||
|
||||
// Mobipass packet sizes
|
||||
#define RAW_IF5_MOBIPASS_BLOCK_SIZE_BYTES 1280
|
||||
|
||||
@@ -140,6 +140,7 @@ static struct {
|
||||
} sync_phy_proc;
|
||||
|
||||
extern double cpuf;
|
||||
extern char ru_states[6][9];
|
||||
|
||||
|
||||
void init_eNB(int,int);
|
||||
@@ -153,6 +154,7 @@ void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,RU_t *ru, int frame, int subframe);
|
||||
|
||||
extern void oai_subframe_ind(uint16_t sfn, uint16_t sf);
|
||||
extern void add_subframe(uint16_t *frameP, uint16_t *subframeP, int offset);
|
||||
extern int check_sync(RU_t *ru, RU_t *ru_master, int subframe);
|
||||
|
||||
//#define TICK_TO_US(ts) (ts.diff)
|
||||
#define TICK_TO_US(ts) (ts.trials==0?0:ts.diff/ts.trials)
|
||||
@@ -864,8 +866,8 @@ void init_eNB_proc(int inst) {
|
||||
proc->CC_id = CC_id;
|
||||
proc->first_rx =1;
|
||||
proc->first_tx =1;
|
||||
proc->RU_mask_tx = (1<<eNB->num_RU)-1;
|
||||
memset((void *)proc->RU_mask,0,10*sizeof(proc->RU_mask[0]));
|
||||
proc->RU_mask_tx = 0; // (1<<eNB->num_RU)-1;
|
||||
memset((void*)proc->RU_mask,0,10*sizeof(proc->RU_mask[0]));
|
||||
proc->RU_mask_prach =0;
|
||||
pthread_mutex_init( &eNB->UL_INFO_mutex, NULL);
|
||||
pthread_mutex_init( &L1_proc->mutex, NULL);
|
||||
|
||||
@@ -110,6 +110,7 @@ extern void phy_init_RU(RU_t *);
|
||||
|
||||
void stop_RU(int nb_ru);
|
||||
void do_ru_synch(RU_t *ru);
|
||||
int check_sync(RU_t *ru, RU_t *ru_master, int subframe);
|
||||
|
||||
void configure_ru(int idx,
|
||||
void *arg);
|
||||
@@ -215,46 +216,56 @@ void fh_if4p5_south_in(RU_t *ru,
|
||||
int *subframe) {
|
||||
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
int f,sf;
|
||||
int f,sf,Ns,l,u;
|
||||
RU_CALIBRATION *calibration = &ru->calibration;
|
||||
uint16_t packet_type;
|
||||
uint32_t symbol_number=0;
|
||||
uint32_t symbol_mask_full;
|
||||
int pultick_received=0;
|
||||
|
||||
if ((fp->frame_type == TDD) && (subframe_select(fp,*subframe)==SF_S))
|
||||
symbol_mask_full = (1<<fp->ul_symbols_in_S_subframe)-1;
|
||||
else
|
||||
symbol_mask_full = (1<<fp->symbols_per_tti)-1;
|
||||
if (ru->is_slave==1 && ru->wait_cnt!=0) RC.collect = 0;
|
||||
|
||||
if ((fp->frame_type == TDD) && (subframe_select(fp,*subframe)==SF_S)) {
|
||||
if (*subframe == 1) {
|
||||
symbol_mask_full = (1<<11)-1;
|
||||
} else {
|
||||
symbol_mask_full = (1<<fp->ul_symbols_in_S_subframe)-1;
|
||||
}
|
||||
} else {
|
||||
symbol_mask_full = (1<<fp->symbols_per_tti)-1;
|
||||
}
|
||||
|
||||
LOG_D(PHY,"fh_if4p5_south_in: RU %d, frame %d, subframe %d, ru %d, mask %x\n",ru->idx,*frame,*subframe,ru->idx,proc->symbol_mask[*subframe]);
|
||||
if (proc->symbol_mask[*subframe] == symbol_mask_full) proc->symbol_mask[*subframe] = 0;
|
||||
AssertFatal(proc->symbol_mask[*subframe]==0 || proc->symbol_mask[*subframe]==symbol_mask_full,"rx_fh_if4p5: proc->symbol_mask[%d] = %x\n",*subframe,proc->symbol_mask[*subframe]);
|
||||
|
||||
if (proc->symbol_mask[*subframe]==0) { // this is normal case, if not true then we received a PULTICK before the previous subframe was finished
|
||||
do {
|
||||
recv_IF4p5(ru, &f, &sf, &packet_type, &symbol_number);
|
||||
LOG_D(PHY,"fh_if4p5_south_in: RU %d, frame %d, subframe %d, f %d, sf %d\n",ru->idx,*frame,*subframe,f,sf);
|
||||
|
||||
if (oai_exit == 1 || ru->cmd== STOP_RU) break;
|
||||
|
||||
if (packet_type == IF4p5_PULFFT) proc->symbol_mask[sf] = proc->symbol_mask[sf] | (1<<symbol_number);
|
||||
else if (packet_type == IF4p5_PULTICK) {
|
||||
proc->symbol_mask[sf] = symbol_mask_full;
|
||||
pultick_received++;
|
||||
|
||||
/*
|
||||
if ((proc->first_rx==0) && (f!=*frame)) LOG_E(PHY,"rx_fh_if4p5: PULTICK received frame %d != expected %d (RU %d) \n",f,*frame, ru->idx);
|
||||
else if ((proc->first_rx==0) && (sf!=*subframe)) LOG_E(PHY,"rx_fh_if4p5: PULTICK received subframe %d != expected %d (first_rx %d)\n",sf,*subframe,proc->first_rx);
|
||||
else break; */
|
||||
if (f==*frame || sf==*subframe) break;
|
||||
} else if (packet_type == IF4p5_PRACH) {
|
||||
// nothing in RU for RAU
|
||||
}
|
||||
|
||||
LOG_D(PHY,"rx_fh_if4p5 for RU %d: subframe %d, sf %d, symbol mask %x\n",ru->idx,*subframe,sf,proc->symbol_mask[sf]);
|
||||
} while(proc->symbol_mask[sf] != symbol_mask_full);
|
||||
} else {
|
||||
f = *frame;
|
||||
sf = *subframe;
|
||||
if (proc->symbol_mask[*subframe]==0) { // this is normal case, if not true then we received a PULTICK before the previous subframe was finished
|
||||
do {
|
||||
recv_IF4p5(ru, &f, &sf, &packet_type, &symbol_number);
|
||||
LOG_D(PHY,"fh_if4p5_south_in: RU %d, frame %d, subframe %d, f %d, sf %d\n",ru->idx,*frame,*subframe,f,sf);
|
||||
if (oai_exit == 1 || ru->cmd== STOP_RU) break;
|
||||
if (packet_type == IF4p5_PULFFT) proc->symbol_mask[sf] = proc->symbol_mask[sf] | (1<<symbol_number);
|
||||
else if (packet_type == IF4p5_PULCALIB) {
|
||||
proc->symbol_mask[sf] = (2<<symbol_number)-1;
|
||||
LOG_D(PHY,"symbol_mask[%d] %d\n",sf,proc->symbol_mask[sf]);
|
||||
}
|
||||
else if (packet_type == IF4p5_PULTICK) {
|
||||
proc->symbol_mask[sf] = symbol_mask_full;
|
||||
pultick_received++;
|
||||
/*
|
||||
if ((proc->first_rx==0) && (f!=*frame)) LOG_E(PHY,"rx_fh_if4p5: PULTICK received frame %d != expected %d (RU %d) \n",f,*frame, ru->idx);
|
||||
else if ((proc->first_rx==0) && (sf!=*subframe)) LOG_E(PHY,"rx_fh_if4p5: PULTICK received subframe %d != expected %d (first_rx %d)\n",sf,*subframe,proc->first_rx);
|
||||
else break; */
|
||||
if (f==*frame || sf==*subframe) break;
|
||||
} else if (packet_type == IF4p5_PRACH) {
|
||||
// nothing in RU for RAU
|
||||
}
|
||||
LOG_D(PHY,"rx_fh_if4p5 for RU %d: subframe %d, sf %d, symbol mask %x\n",ru->idx,*subframe,sf,proc->symbol_mask[sf]);
|
||||
} while(proc->symbol_mask[sf] != symbol_mask_full);
|
||||
}
|
||||
else {
|
||||
f = *frame;
|
||||
sf = *subframe;
|
||||
}
|
||||
|
||||
//calculate timestamp_rx, timestamp_tx based on frame and subframe
|
||||
@@ -301,6 +312,64 @@ void fh_if4p5_south_in(RU_t *ru,
|
||||
}*/
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_IF4P5_SOUTH_IN_RU+ru->idx,f);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_IF4P5_SOUTH_IN_RU+ru->idx,sf);
|
||||
|
||||
if (ru->is_slave==1 && ru->wait_cnt==0) RC.collect = 1;
|
||||
|
||||
if (ru->wait_cnt==0 && packet_type == IF4p5_PULCALIB && RC.collect==1) {
|
||||
|
||||
T(T_RAU_INPUT_SIGNAL, T_INT(ru->idx), T_INT(f), T_INT(sf),
|
||||
T_BUFFER(&ru->common.rxdataF[0][0],
|
||||
fp->symbols_per_tti*fp->ofdm_symbol_size*sizeof(int32_t)));
|
||||
|
||||
// Estimate calibration channel estimates:
|
||||
Ns = (ru->is_slave==0 ? 1 : 1);
|
||||
l = (ru->is_slave==0 ? 10 : 10);
|
||||
u = (ru->is_slave==0 ? 0 : 0);
|
||||
ru->frame_parms->nb_antennas_rx = ru->nb_rx;
|
||||
ulsch_extract_rbs_single(ru->common.rxdataF,
|
||||
calibration->rxdataF_ext,
|
||||
0,
|
||||
fp->N_RB_DL,
|
||||
3%(fp->symbols_per_tti/2),// l = symbol within slot
|
||||
Ns,
|
||||
fp);
|
||||
|
||||
// OR should I call just: lte_ul_channel_estimation();
|
||||
/*lte_ul_channel_estimation((PHY_VARS_eNB *)NULL,
|
||||
proc,
|
||||
ru->idx,
|
||||
3%(fp->symbols_per_tti/2),
|
||||
Ns);
|
||||
*/
|
||||
lte_ul_channel_estimation_RRU(fp,
|
||||
calibration->drs_ch_estimates,
|
||||
calibration->drs_ch_estimates_time,
|
||||
calibration->rxdataF_ext,
|
||||
fp->N_RB_DL,
|
||||
f,
|
||||
sf,
|
||||
u,
|
||||
0,
|
||||
0,
|
||||
l,
|
||||
0,
|
||||
0);
|
||||
|
||||
T(T_CALIBRATION_CHANNEL_ESTIMATES, T_INT(ru->idx), T_INT(f), T_INT(sf),
|
||||
T_INT(l),T_BUFFER(&calibration->drs_ch_estimates[0][l*12*fp->N_RB_UL],
|
||||
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)));
|
||||
|
||||
T(T_CALIBRATION_CHANNEL_ESTIMATES_TIME, T_INT(ru->idx), T_INT(f), T_INT(sf),
|
||||
T_BUFFER(calibration->drs_ch_estimates_time[0],
|
||||
fp->ofdm_symbol_size*sizeof(int32_t)));
|
||||
|
||||
}
|
||||
|
||||
|
||||
proc->symbol_mask[sf] = 0;
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, proc->timestamp_rx&0xffffffff);
|
||||
LOG_D(PHY,"RU %d: fh_if4p5_south_in returning ...\n",ru->idx);
|
||||
@@ -530,7 +599,17 @@ void fh_if4p5_north_out(RU_t *ru) {
|
||||
|
||||
if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) {
|
||||
/// **** in TDD during DL send_IF4 of ULTICK to RCC **** ///
|
||||
send_IF4p5(ru, proc->frame_rx, proc->tti_rx, IF4p5_PULTICK);
|
||||
if (subframe_select(fp,subframe)==SF_S && subframe==1) {
|
||||
send_IF4p5(ru, proc->frame_rx, proc->tti_rx, IF4p5_PULCALIB);
|
||||
LOG_D(PHY,"Sending PULCALIB frame %d, subframe %d\n",proc->frame_rx,proc->tti_rx);
|
||||
T(T_RAU_INPUT_DMRS, T_INT(ru->idx), T_INT(proc->frame_rx), T_INT(proc->tti_rx),
|
||||
T_BUFFER(&ru->common.rxdataF[0][proc->tti_rx*fp->symbols_per_tti*fp->ofdm_symbol_size],
|
||||
fp->symbols_per_tti*fp->ofdm_symbol_size*sizeof(int32_t)));
|
||||
} else {
|
||||
send_IF4p5(ru, proc->frame_rx, proc->tti_rx, IF4p5_PULTICK);
|
||||
LOG_D(PHY,"Sending PULTICK frame %d, subframe %d\n",proc->frame_rx,proc->tti_rx);
|
||||
}
|
||||
LOG_D(PHY,"fh_if4p5_north_out: Sending IF4p5_PULCALIB SFN.SF %d.%d\n",proc->frame_rx,proc->tti_rx);
|
||||
ru->north_out_cnt++;
|
||||
return;
|
||||
}
|
||||
@@ -737,9 +816,9 @@ void tx_rf(RU_t *ru,
|
||||
int subframe,
|
||||
uint64_t timestamp) {
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
|
||||
void *txp[ru->nb_tx];
|
||||
unsigned int txs;
|
||||
LTE_DL_FRAME_PARMS *fp = &ru->frame_parms;
|
||||
void *txp[ru->nb_tx],*txp1[ru->nb_tx];
|
||||
unsigned int txs,txs1;
|
||||
int i;
|
||||
T(T_ENB_PHY_OUTPUT_SIGNAL, T_INT(0), T_INT(0), T_INT(frame), T_INT(subframe),
|
||||
T_INT(0), T_BUFFER(&ru->common.txdata[0][subframe * fp->samples_per_tti], fp->samples_per_tti * 4));
|
||||
@@ -750,30 +829,37 @@ void tx_rf(RU_t *ru,
|
||||
|
||||
if ((SF_type == SF_DL) ||
|
||||
(SF_type == SF_S)) {
|
||||
int siglen=fp->samples_per_tti,flags=1;
|
||||
|
||||
if (SF_type == SF_S) {
|
||||
int txsymb = fp->dl_symbols_in_S_subframe+(ru->is_slave==0 ? 1 : 0);
|
||||
AssertFatal(txsymb>0,"illegal txsymb %d\n",txsymb);
|
||||
/* end_of_burst_delay is used to stop TX only "after a while".
|
||||
* If we stop right after effective signal, with USRP B210 and
|
||||
* B200mini, we observe a high EVM on the S subframe (on the
|
||||
* PSS).
|
||||
* A value of 400 (for 30.72MHz) solves this issue. This is
|
||||
* the default.
|
||||
*/
|
||||
siglen = (fp->ofdm_symbol_size + fp->nb_prefix_samples0)
|
||||
+ (txsymb - 1) * (fp->ofdm_symbol_size + fp->nb_prefix_samples)
|
||||
+ ru->end_of_burst_delay;
|
||||
flags=3; // end of burst
|
||||
}
|
||||
int siglen=fp->samples_per_tti,flags=1;
|
||||
int siglen2=fp->samples_per_tti+fp->nb_prefix_samples;
|
||||
int sigoff2=2*fp->nb_prefix_samples0+8*fp->nb_prefix_samples+10*fp->ofdm_symbol_size;
|
||||
|
||||
if (fp->frame_type == TDD &&
|
||||
SF_type == SF_DL &&
|
||||
prevSF_type == SF_UL) {
|
||||
flags = 2; // start of burst
|
||||
sf_extension = ru->sf_extension;
|
||||
}
|
||||
if (SF_type == SF_S) {
|
||||
int txsymb = fp->dl_symbols_in_S_subframe+(ru->is_slave==0 ? 1 : -1);
|
||||
AssertFatal(txsymb>0,"illegal txsymb %d\n",txsymb);
|
||||
|
||||
/* end_of_burst_delay is used to stop TX only "after a while".
|
||||
* If we stop right after effective signal, with USRP B210 and
|
||||
* B200mini, we observe a high EVM on the S subframe (on the
|
||||
* PSS).
|
||||
* A value of 400 (for 30.72MHz) solves this issue. This is
|
||||
* the default.
|
||||
*/
|
||||
siglen = (fp->ofdm_symbol_size + fp->nb_prefix_samples0)
|
||||
+ (txsymb - 1) * (fp->ofdm_symbol_size + fp->nb_prefix_samples)
|
||||
+ ru->end_of_burst_delay;
|
||||
if (ru->state==RU_RUN && proc->frame_tx%ru->p==ru->tag) {
|
||||
siglen2 = fp->ofdm_symbol_size + fp->nb_prefix_samples + ru->end_of_burst_delay; // length of symbol 10
|
||||
}
|
||||
flags=3; // end of burst
|
||||
}
|
||||
|
||||
if (fp->frame_type == TDD &&
|
||||
SF_type == SF_DL &&
|
||||
prevSF_type == SF_UL) {
|
||||
flags = 2; // start of burst
|
||||
sf_extension = ru->sf_extension;
|
||||
}
|
||||
|
||||
#if defined(__x86_64) || defined(__i386__)
|
||||
#ifdef __AVX2__
|
||||
@@ -785,8 +871,10 @@ void tx_rf(RU_t *ru,
|
||||
sf_extension = (sf_extension)&0xfffffffc;
|
||||
#endif
|
||||
|
||||
for (i=0; i<ru->nb_tx; i++)
|
||||
txp[i] = (void *)&ru->common.txdata[i][(subframe*fp->samples_per_tti)-sf_extension];
|
||||
for (i=0; i<ru->nb_tx; i++) {
|
||||
txp[i] = (void *)&ru->common.txdata[i][(subframe*fp->samples_per_tti)-sf_extension];
|
||||
txp1[i] = (void*)&ru->common.txdata[i][(subframe*fp->samples_per_tti)+(sigoff2)-sf_extension]; // pointer to 1st sample of 10th symbol
|
||||
}
|
||||
|
||||
/* add fail safe for late command */
|
||||
if(late_control!=STATE_BURST_NORMAL) { //stop burst
|
||||
@@ -826,21 +914,44 @@ void tx_rf(RU_t *ru,
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 );
|
||||
// prepare tx buffer pointers
|
||||
txs = ru->rfdevice.trx_write_func(&ru->rfdevice,
|
||||
timestamp+ru->ts_offset-ru->openair0_cfg.tx_sample_advance-sf_extension,
|
||||
txp,
|
||||
siglen+sf_extension,
|
||||
ru->nb_tx,
|
||||
flags);
|
||||
timestamp+ru->ts_offset-ru->openair0_cfg.tx_sample_advance-sf_extension,
|
||||
txp,
|
||||
siglen+sf_extension,
|
||||
ru->nb_tx,
|
||||
flags);
|
||||
if (ru->p!=0){
|
||||
if (ru->state==RU_RUN && proc->frame_tx%ru->p==ru->tag && proc->tti_tx==1) {
|
||||
txs1 = ru->rfdevice.trx_write_func(&ru->rfdevice,
|
||||
proc->timestamp_tx+(ru->ts_offset+sigoff2)-ru->openair0_cfg.tx_sample_advance-sf_extension,
|
||||
txp1,
|
||||
siglen2+sf_extension,
|
||||
ru->nb_tx,
|
||||
flags);
|
||||
//LOG_M("txdata.m","txdata",&ru->common.txdata[0][0], fp->samples_per_tti*10,1,1); // save 1 frame
|
||||
//exit(-1);
|
||||
int se1 = dB_fixed(signal_energy(txp1[0],siglen2+sf_extension));
|
||||
LOG_D(PHY,"******** frame %d subframe %d RRU sends DMRS of energy10 %d, energy3 %d\n",proc->frame_tx,proc->tti_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);
|
||||
}
|
||||
}
|
||||
|
||||
ru->south_out_cnt++;
|
||||
LOG_D(PHY,"south_out_cnt %d\n",ru->south_out_cnt);
|
||||
int se = dB_fixed(signal_energy(txp[0],siglen+sf_extension));
|
||||
//int se = dB_fixed(signal_energy(txp[0],siglen+sf_extension));
|
||||
|
||||
if (SF_type == SF_S) LOG_D(PHY,"[TXPATH] RU %d tx_rf (en %d,len %d), writing to TS %llu, frame %d, unwrapped_frame %d, subframe %d\n",ru->idx, se,
|
||||
siglen+sf_extension, (long long unsigned int)timestamp, frame, proc->frame_tx_unwrap, subframe);
|
||||
//if (SF_type == SF_S) LOG_D(PHY,"[TXPATH] RU %d tx_rf (en %d,len %d), writing to TS %llu, frame %d, unwrapped_frame %d, subframe %d\n",ru->idx, se,
|
||||
// siglen+sf_extension, (long long unsigned int)timestamp, frame, proc->frame_tx_unwrap, subframe);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 );
|
||||
if (ru->p!=0) {
|
||||
if (ru->state==RU_RUN && proc->frame_tx%ru->p==ru->tag && proc->tti_tx==1) {
|
||||
if( (txs1!=siglen2+sf_extension) && (late_control==STATE_BURST_NORMAL) ){ /* add fail safe for late command */
|
||||
late_control=STATE_BURST_TERMINATE;
|
||||
LOG_E(PHY,"TX : Timeout (sent %d/%d) state =%d\n",txs1, siglen2,late_control);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// AssertFatal(txs == siglen+sf_extension,"TX : Timeout (sent %d/%d)\n",txs, siglen);
|
||||
if( (txs != siglen+sf_extension) && (late_control==STATE_BURST_NORMAL) ) { /* add fail safe for late command */
|
||||
late_control=STATE_BURST_TERMINATE;
|
||||
LOG_E(PHY,"TX : Timeout (sent %d/%d) state =%d\n",txs, siglen,late_control);
|
||||
@@ -1563,7 +1674,7 @@ static void *ru_thread_tx( void *param ) {
|
||||
AssertFatal((ret=pthread_mutex_lock(&eNB_proc->mutex_RU_tx))==0,"mutex_lock returns %d\n",ret);
|
||||
|
||||
for (int j=0; j<eNB->num_RU; j++) {
|
||||
if (ru == eNB->RU_list[j]) {
|
||||
if (ru == eNB->RU_list[j] && eNB->RU_list[j]->wait_cnt == 0) {
|
||||
if ((eNB_proc->RU_mask_tx&(1<<j)) > 0)
|
||||
LOG_E(PHY,"eNB %d frame %d, subframe %d : previous information from RU tx %d (num_RU %d,mask %x) has not been served yet!\n",
|
||||
eNB->Mod_id,eNB_proc->frame_rx,eNB_proc->subframe_rx,ru->idx,eNB->num_RU,eNB_proc->RU_mask_tx);
|
||||
@@ -1708,7 +1819,6 @@ static void *ru_thread( void *param ) {
|
||||
pthread_cond_signal(&proc->cond_asynch_rxtx);
|
||||
AssertFatal((ret=pthread_mutex_unlock(&proc->mutex_asynch_rxtx))==0,"mutex_unlock returns %d\n",ret);
|
||||
} else LOG_D(PHY,"RU %d no asynch_south interface\n",ru->idx);
|
||||
|
||||
// if this is a slave RRU, try to synchronize on the DL frequency
|
||||
if ((ru->is_slave == 1) && (ru->if_south == LOCAL_RF)) do_ru_synch(ru);
|
||||
|
||||
@@ -1925,7 +2035,7 @@ void *ru_thread_synch(void *arg) {
|
||||
// if we're not in synch, then run initial synch
|
||||
if (ru->in_synch == 0) {
|
||||
// run intial synch like UE
|
||||
LOG_I(PHY,"Running initial synchronization\n");
|
||||
LOG_D(PHY,"Running initial synchronization\n");
|
||||
ru->rx_offset = ru_sync_time(ru,
|
||||
&peak_val,
|
||||
&avg);
|
||||
@@ -2680,13 +2790,10 @@ void init_RU(char *rf_config_file, int send_dmrssync) {
|
||||
ru->south_out_cnt = 0;
|
||||
// use eNB_list[0] as a reference for RU frame parameters
|
||||
// NOTE: multiple CC_id are not handled here yet!
|
||||
|
||||
//ru->generate_dmrs_sync = (ru->is_slave == 0) ? 1 : 0;
|
||||
if ((ru->is_slave == 0) && (ru->ota_sync_enable == 1))
|
||||
ru->generate_dmrs_sync = 1;
|
||||
else
|
||||
ru->generate_dmrs_sync = 0;
|
||||
|
||||
if (ru->ota_sync_enable == 1){
|
||||
ru->generate_dmrs_sync = 1;
|
||||
generate_ul_ref_sigs();
|
||||
}
|
||||
ru->wakeup_L1_sleeptime = 2000;
|
||||
ru->wakeup_L1_sleep_cnt_max = 3;
|
||||
|
||||
|
||||
@@ -121,8 +121,9 @@ int send_config(RU_t *ru,
|
||||
rru_config_msg.type = RRU_config;
|
||||
rru_config_msg.len = sizeof(RRU_CONFIG_msg_t)-MAX_RRU_CONFIG_SIZE+sizeof(RRU_config_t);
|
||||
|
||||
LOG_I(PHY,"Sending Configuration to RRU %d (num_bands %d,band0 %d,txfreq %u,rxfreq %u,att_tx %d,att_rx %d,N_RB_DL %d,N_RB_UL %d,3/4FS %d, prach_FO %d, prach_CI %d\n",
|
||||
ru->idx,
|
||||
LOG_I(PHY,"Sending Configuration to RRU %d (RRU p %d,RRU tag %d,num_bands %d,band0 %d,txfreq %u,rxfreq %u,att_tx %d,att_rx %d,N_RB_DL %d,N_RB_UL %d,3/4FS %d, prach_FO %d, prach_CI %d\n",ru->idx,
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->p,
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->tag,
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->num_bands,
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->band_list[0],
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->tx_freq[0],
|
||||
@@ -229,7 +230,9 @@ int attach_rru(RU_t *ru)
|
||||
|
||||
rru_config_msg.type = RRU_config;
|
||||
rru_config_msg.len = sizeof(RRU_CONFIG_msg_t)-MAX_RRU_CONFIG_SIZE+sizeof(RRU_config_t);
|
||||
LOG_I(PHY,"Sending Configuration to RRU %d (num_bands %d,band0 %d,txfreq %u,rxfreq %u,att_tx %d,att_rx %d,N_RB_DL %d,N_RB_UL %d,3/4FS %d, prach_FO %d, prach_CI %d)\n",ru->idx,
|
||||
LOG_I(PHY,"Sending Configuration to RRU %d (RRU p %d,RRU tag %d,num_bands %d,band0 %d,txfreq %u,rxfreq %u,att_tx %d,att_rx %d,N_RB_DL %d,N_RB_UL %d,3/4FS %d, prach_FO %d, prach_CI %d)\n",ru->idx,
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->p,
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->tag,
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->num_bands,
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->band_list[0],
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->tx_freq[0],
|
||||
@@ -322,7 +325,9 @@ int connect_rau(RU_t *ru)
|
||||
LOG_I(PHY,"Waiting for configuration from RAU\n");
|
||||
}
|
||||
else {
|
||||
LOG_I(PHY,"Configuration received from RAU (num_bands %d,band0 %d,txfreq %u,rxfreq %u,att_tx %d,att_rx %d,N_RB_DL %d,N_RB_UL %d,3/4FS %d, prach_FO %d, prach_CI %d)\n",
|
||||
LOG_I(PHY,"Configuration received from RAU (RRU p %d,RRU tag %d,num_bands %d,band0 %d,txfreq %u,rxfreq %u,att_tx %d,att_rx %d,N_RB_DL %d,N_RB_UL %d,3/4FS %d, prach_FO %d, prach_CI %d)\n",
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->p,
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->tag,
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->num_bands,
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->band_list[0],
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->tx_freq[0],
|
||||
@@ -422,6 +427,8 @@ void configure_ru(int idx,
|
||||
config->N_RB_DL[0] = ru->frame_parms->N_RB_DL;
|
||||
config->N_RB_UL[0] = ru->frame_parms->N_RB_UL;
|
||||
config->threequarter_fs[0] = ru->frame_parms->threequarter_fs;
|
||||
config->tag = idx;
|
||||
config->p = RC.nb_RU;
|
||||
if (ru->if_south==REMOTE_IF4p5) {
|
||||
config->prach_FreqOffset[0] = ru->frame_parms->prach_config_common.prach_ConfigInfo.prach_FreqOffset;
|
||||
config->prach_ConfigIndex[0] = ru->frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
|
||||
@@ -444,16 +451,18 @@ void configure_rru(int idx,
|
||||
void *arg)
|
||||
{
|
||||
RRU_config_t *config = (RRU_config_t *)arg;
|
||||
RU_t *ru = RC.ru[idx];
|
||||
RU_t *ru = RC.ru[idx];
|
||||
|
||||
ru->tag = config->tag;
|
||||
ru->p = config->p;
|
||||
ru->frame_parms->eutra_band = config->band_list[0];
|
||||
ru->frame_parms->dl_CarrierFreq = config->tx_freq[0];
|
||||
ru->frame_parms->ul_CarrierFreq = config->rx_freq[0];
|
||||
if (ru->frame_parms->dl_CarrierFreq == ru->frame_parms->ul_CarrierFreq) {
|
||||
LOG_I(PHY,"Setting RRU to TDD frame type\n");
|
||||
LOG_I(PHY,"Setting RRU to TDD frame type\n");
|
||||
ru->frame_parms->frame_type = TDD;
|
||||
ru->frame_parms->tdd_config = config->tdd_config[0];
|
||||
ru->frame_parms->tdd_config_S = config->tdd_config_S[0];
|
||||
ru->frame_parms->tdd_config_S = config->tdd_config_S[0];
|
||||
}
|
||||
else ru->frame_parms->frame_type = FDD;
|
||||
|
||||
@@ -589,7 +598,9 @@ void* ru_thread_control( void* param )
|
||||
|
||||
case RRU_config: // RRU
|
||||
if (ru->if_south == LOCAL_RF){
|
||||
LOG_I(PHY,"Configuration received from RAU (num_bands %d,band0 %d,txfreq %u,rxfreq %u,att_tx %d,att_rx %d,N_RB_DL %d,N_RB_UL %d,3/4FS %d, prach_FO %d, prach_CI %d)\n",
|
||||
LOG_I(PHY,"Configuration received from RAU (p %d, tag %d, num_bands %d,band0 %d,txfreq %u,rxfreq %u,att_tx %d,att_rx %d,N_RB_DL %d,N_RB_UL %d,3/4FS %d, prach_FO %d, prach_CI %d)\n",
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->p,
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->tag,
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->num_bands,
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->band_list[0],
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->tx_freq[0],
|
||||
|
||||
Reference in New Issue
Block a user