Commit b75407a1 authored by Raymond Knopp's avatar Raymond Knopp

Merge branch 'enhancement-10-harmony' of...

Merge branch 'enhancement-10-harmony' of https://gitlab.eurecom.fr/oai/openairinterface5g into enhancement-10-harmony
parents 03280672 986dfecc
......@@ -51,16 +51,15 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe
uint16_t packet_id=0, i=0;
uint32_t spp_eth = (uint32_t) eNB->ifdevice.openair0_cfg->samples_per_packet;
uint32_t spsf = (uint32_t) eNB->ifdevice.openair0_cfg->samples_per_frame/10;
if (packet_type == IF5_RRH_GW_DL) {
unsigned int spp_eth = eNB->ifdevice.openair0_cfg->samples_per_packet;
unsigned int spsf = eNB->ifdevice.openair0_cfg->samples_per_frame/10;
for (i=0; i < fp->nb_antennas_tx; i++)
txp[i] = (void*)&eNB->common_vars.txdata[0][i][subframe*fp->samples_per_tti];
for (packet_id=0; packet_id < spsf / spp_eth; packet_id++) {
for (i=0; i < fp->nb_antennas_tx; i++)
txp[i] += packet_id*spp_eth;
eNB->ifdevice.trx_write_func(&eNB->ifdevice,
(proc_timestamp + packet_id*spp_eth),
......@@ -68,18 +67,18 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe
spp_eth,
fp->nb_antennas_tx,
0);
for (i=0; i < fp->nb_antennas_tx; i++)
txp[i] += spp_eth;
}
} else if (packet_type == IF5_RRH_GW_UL) {
unsigned int spp_eth = eNB->ifdevice.openair0_cfg->samples_per_packet;
unsigned int spsf = eNB->ifdevice.openair0_cfg->samples_per_frame/10;
for (i=0; i < fp->nb_antennas_rx; i++)
rxp[i] = (void*)&eNB->common_vars.rxdata[0][i][subframe*fp->samples_per_tti];
for (packet_id=0; packet_id < spsf / spp_eth; packet_id++) {
for (i=0; i < fp->nb_antennas_rx; i++)
rxp[i] += packet_id*spp_eth;
eNB->ifdevice.trx_write_func(&eNB->ifdevice,
(proc_timestamp + packet_id*spp_eth),
......@@ -87,6 +86,10 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe
spp_eth,
fp->nb_antennas_rx,
0);
for (i=0; i < fp->nb_antennas_rx; i++)
rxp[i] += spp_eth;
}
} else if (packet_type == IF5_MOBIPASS) {
......@@ -149,49 +152,49 @@ void recv_IF5(PHY_VARS_eNB *eNB, openair0_timestamp *proc_timestamp, int subfram
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
int32_t *txp[fp->nb_antennas_tx], *rxp[fp->nb_antennas_rx];
uint16_t packet_id=0, i=0;
if (packet_type == IF5_RRH_GW_DL) {
unsigned int spp_eth = eNB->ifdevice.openair0_cfg->samples_per_packet;
unsigned int spsf = eNB->ifdevice.openair0_cfg->samples_per_frame/10;
int32_t spp_eth = (int32_t) eNB->ifdevice.openair0_cfg->samples_per_packet;
int32_t spsf = (int32_t) eNB->ifdevice.openair0_cfg->samples_per_frame/10;
openair0_timestamp timestamp[spsf / spp_eth];
if (packet_type == IF5_RRH_GW_DL) {
for (i=0; i < fp->nb_antennas_tx; i++)
txp[i] = (void*)&eNB->common_vars.txdata[0][i][subframe*fp->samples_per_tti];
for (packet_id=0; packet_id < spsf / spp_eth; packet_id++) {
for (i=0; i < fp->nb_antennas_tx; i++)
txp[i] += packet_id*spp_eth;
eNB->ifdevice.trx_read_func(&eNB->ifdevice,
&timestamp[packet_id],
txp,
spp_eth,
fp->nb_antennas_tx);
for (i=0; i < fp->nb_antennas_tx; i++)
txp[i] += spp_eth;
}
*proc_timestamp = timestamp[0];
} else if (packet_type == IF5_RRH_GW_UL) {
unsigned int spp_eth = eNB->ifdevice.openair0_cfg->samples_per_packet;
unsigned int spsf = eNB->ifdevice.openair0_cfg->samples_per_frame/10;
openair0_timestamp timestamp[spsf / spp_eth];
for (i=0; i < fp->nb_antennas_rx; i++)
rxp[i] = (void*)&eNB->common_vars.rxdata[0][i][subframe*fp->samples_per_tti];
for (packet_id=0; packet_id < spsf / spp_eth; packet_id++) {
for (i=0; i < fp->nb_antennas_tx; i++)
rxp[i] += packet_id*spp_eth;
eNB->ifdevice.trx_read_func(&eNB->ifdevice,
&timestamp[packet_id],
rxp,
spp_eth,
fp->nb_antennas_rx);
for (i=0; i < fp->nb_antennas_rx; i++)
rxp[i] += spp_eth;
}
*proc_timestamp = timestamp[0];
......
......@@ -411,7 +411,6 @@ int transport_init(openair0_device *device, openair0_config_t *openair0_cfg, eth
exit(-1);
break;
}
openair0_cfg[0].tx_scheduling_advance = eth_params->tx_scheduling_advance*openair0_cfg[0].samples_per_packet;
}
device->openair0_cfg=&openair0_cfg[0];
......@@ -454,8 +453,6 @@ void dump_dev(openair0_device *device) {
printf(" Log level is %i :\n" ,device->openair0_cfg->log_level);
printf(" RB number: %i, sample rate: %lf \n" ,
device->openair0_cfg->num_rb_dl, device->openair0_cfg->sample_rate);
printf(" Scheduling_advance: %i, Sample_advance: %u \n" ,
device->openair0_cfg->tx_scheduling_advance, device->openair0_cfg->tx_sample_advance);
printf(" BBU configured for %i tx/%i rx channels)\n",
device->openair0_cfg->tx_num_channels,device->openair0_cfg->rx_num_channels);
printf(" Running flags: %s %s %s\n",
......
......@@ -710,14 +710,13 @@ static void check_dev_config( rrh_module_t *mod_enb) {
printf("\n---------------------RF device configuration parameters---------------------\n");
printf("\tMod_id=%d\n \tlog level=%d\n \tDL_RB=%d\n \tsamples_per_frame=%d\n \tsample_rate=%f\n \tsamples_per_packet=%d\n \ttx_scheduling_advance=%d\n \ttx_sample_advance=%d\n \trx_num_channels=%d\n \ttx_num_channels=%d\n \trx_freq_0=%f\n \ttx_freq_0=%f\n \trx_freq_1=%f\n \ttx_freq_1=%f\n \trx_freq_2=%f\n \ttx_freq_2=%f\n \trx_freq_3=%f\n \ttx_freq_3=%f\n \trxg_mode=%d\n \trx_gain_0=%f\n \ttx_gain_0=%f\n \trx_gain_1=%f\n \ttx_gain_1=%f\n \trx_gain_2=%f\n \ttx_gain_2=%f\n \trx_gain_3=%f\n \ttx_gain_3=%f\n \trx_gain_offset_2=%f\n \ttx_gain_offset_3=%f\n \trx_bw=%f\n \ttx_bw=%f\n \tautocal=%d\n",
printf("\tMod_id=%d\n \tlog level=%d\n \tDL_RB=%d\n \tsamples_per_frame=%d\n \tsample_rate=%f\n \tsamples_per_packet=%d\n \ttx_sample_advance=%d\n \trx_num_channels=%d\n \ttx_num_channels=%d\n \trx_freq_0=%f\n \ttx_freq_0=%f\n \trx_freq_1=%f\n \ttx_freq_1=%f\n \trx_freq_2=%f\n \ttx_freq_2=%f\n \trx_freq_3=%f\n \ttx_freq_3=%f\n \trxg_mode=%d\n \trx_gain_0=%f\n \ttx_gain_0=%f\n \trx_gain_1=%f\n \ttx_gain_1=%f\n \trx_gain_2=%f\n \ttx_gain_2=%f\n \trx_gain_3=%f\n \ttx_gain_3=%f\n \trx_gain_offset_2=%f\n \ttx_gain_offset_3=%f\n \trx_bw=%f\n \ttx_bw=%f\n \tautocal=%d\n",
mod_enb->devs->openair0_cfg->Mod_id,
mod_enb->devs->openair0_cfg->log_level,
mod_enb->devs->openair0_cfg->num_rb_dl,
mod_enb->devs->openair0_cfg->samples_per_frame,
mod_enb->devs->openair0_cfg->sample_rate,
mod_enb->devs->openair0_cfg->samples_per_packet,
mod_enb->devs->openair0_cfg->tx_scheduling_advance,
mod_enb->devs->openair0_cfg->tx_sample_advance,
mod_enb->devs->openair0_cfg->rx_num_channels,
mod_enb->devs->openair0_cfg->tx_num_channels,
......
......@@ -1091,8 +1091,6 @@ static void* eNB_thread_FH( void* param ) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 1 );
rxs = eNB->rfdevice.trx_read_func(&eNB->rfdevice,
&proc->timestamp_rx,
rxp,
......@@ -1132,7 +1130,7 @@ static void* eNB_thread_FH( void* param ) {
(eNB->node_function == eNodeB_3GPP_BBU)) { // acquisition from IF
/// **** recv_IF5 of rxdata from RRH **** ///
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 1 );
recv_IF5(eNB, &proc->timestamp_rx, proc->subframe_rx, IF5_RRH_GW_UL);
recv_IF5(eNB, &proc->timestamp_rx, subframe, IF5_RRH_GW_UL);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 0 );
proc->frame_rx = (proc->timestamp_rx / (fp->samples_per_tti*10))&1023;
......@@ -1150,6 +1148,8 @@ static void* eNB_thread_FH( void* param ) {
}
} else {
proc->first_rx = 0;
frame = proc->frame_rx;
subframe = proc->subframe_rx;
}
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, proc->timestamp_rx&0xffffffff );
......
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