Commit 9cbf5819 authored by Sandeep Kumar's avatar Sandeep Kumar
Browse files

fixes from bbu/rrh trial run

parent f57a8b8c
...@@ -59,9 +59,12 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe ...@@ -59,9 +59,12 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe
txp[i] = (void*)&eNB->common_vars.txdata[0][i][subframe*fp->samples_per_tti]; 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 (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, eNB->ifdevice.trx_write_func(&eNB->ifdevice,
(proc_timestamp - eNB->ifdevice.openair0_cfg->tx_sample_advance + packet_id*spp_eth), (proc_timestamp - eNB->ifdevice.openair0_cfg->tx_sample_advance + packet_id*spp_eth),
(txp + packet_id*spp_eth), txp,
spp_eth, spp_eth,
fp->nb_antennas_tx, fp->nb_antennas_tx,
0); 0);
...@@ -75,9 +78,12 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe ...@@ -75,9 +78,12 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe
rxp[i] = (void*)&eNB->common_vars.rxdata[0][i][subframe*fp->samples_per_tti]; 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 (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, eNB->ifdevice.trx_write_func(&eNB->ifdevice,
(proc_timestamp + packet_id*spp_eth), (proc_timestamp + packet_id*spp_eth),
(rxp + packet_id*spp_eth), rxp,
spp_eth, spp_eth,
fp->nb_antennas_rx, fp->nb_antennas_rx,
0); 0);
...@@ -156,9 +162,12 @@ void recv_IF5(PHY_VARS_eNB *eNB, openair0_timestamp *proc_timestamp, int subfram ...@@ -156,9 +162,12 @@ void recv_IF5(PHY_VARS_eNB *eNB, openair0_timestamp *proc_timestamp, int subfram
txp[i] = (void*)&eNB->common_vars.txdata[0][i][subframe*fp->samples_per_tti]; 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 (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, eNB->ifdevice.trx_read_func(&eNB->ifdevice,
&timestamp[packet_id], &timestamp[packet_id],
(txp + packet_id*spp_eth), txp,
spp_eth, spp_eth,
fp->nb_antennas_tx); fp->nb_antennas_tx);
} }
...@@ -175,9 +184,12 @@ void recv_IF5(PHY_VARS_eNB *eNB, openair0_timestamp *proc_timestamp, int subfram ...@@ -175,9 +184,12 @@ void recv_IF5(PHY_VARS_eNB *eNB, openair0_timestamp *proc_timestamp, int subfram
rxp[i] = (void*)&eNB->common_vars.rxdata[0][i][subframe*fp->samples_per_tti]; 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 (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, eNB->ifdevice.trx_read_func(&eNB->ifdevice,
&timestamp[packet_id], &timestamp[packet_id],
(rxp + packet_id*spp_eth), rxp,
spp_eth, spp_eth,
fp->nb_antennas_rx); fp->nb_antennas_rx);
} }
......
...@@ -2592,29 +2592,33 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl ...@@ -2592,29 +2592,33 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl
} else if(eNB->node_function == eNodeB_3GPP_BBU) { // acquisition from IF } else if(eNB->node_function == eNodeB_3GPP_BBU) { // acquisition from IF
/// **** recv_IF5 of rxdata from RRH **** /// /// **** recv_IF5 of rxdata from RRH **** ///
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 1 ); 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);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 0 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 0 );
nanosleep(&time_req, &time_rem); //nanosleep(&time_req, &time_rem);
//proc->timestamp_rx += fp->samples_per_tti;
proc->timestamp_rx += fp->samples_per_tti;
proc->frame_rx = (proc->timestamp_rx / (fp->samples_per_tti*10))&1023; proc->frame_rx = (proc->timestamp_rx / (fp->samples_per_tti*10))&1023;
proc->subframe_rx = (proc->timestamp_rx / fp->samples_per_tti)%10; proc->subframe_rx = (proc->timestamp_rx / fp->samples_per_tti)%10;
if (proc->first_rx == 0) {
if (proc->subframe_rx != subframe){
LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->subframe_rx %d, subframe %d)\n",proc->subframe_rx,subframe);
//exit_fun("Exiting");
}
if (proc->frame_rx != frame) {
LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->frame_rx %d frame %d)\n",proc->frame_rx,frame);
//exit_fun("Exiting");
}
} else {
proc->first_rx = 0;
}
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, proc->timestamp_rx&0xffffffff ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, proc->timestamp_rx&0xffffffff );
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX_ENB, proc->frame_rx ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX_ENB, proc->frame_rx );
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX_ENB, proc->subframe_rx ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX_ENB, proc->subframe_rx );
} }
if (eNB->node_function == NGFI_RRU_IF5) {
/// **** send_IF5 of rxdata to BBU **** ///
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 1 );
send_IF5(eNB, proc->timestamp_rx, proc->subframe_rx, &seqno, IF5_RRH_GW_UL);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 0 );
}
if ((eNB->node_function == NGFI_RRU_IF4) || if ((eNB->node_function == NGFI_RRU_IF4) ||
(eNB->node_function == eNodeB_3GPP) || (eNB->node_function == eNodeB_3GPP) ||
(eNB->node_function == eNodeB_3GPP_BBU)) { // front-end processing (eNB->node_function == eNodeB_3GPP_BBU)) { // front-end processing
...@@ -2679,6 +2683,12 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl ...@@ -2679,6 +2683,12 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl
} }
} }
} else if (eNB->node_function == NGFI_RRU_IF5) {
/// **** send_IF5 of rxdata to BBU **** ///
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 1 );
send_IF5(eNB, proc->timestamp_rx, proc->subframe_rx, &seqno, IF5_RRH_GW_UL);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 0 );
} else if (eNB->node_function == NGFI_RCC_IF4) { } else if (eNB->node_function == NGFI_RCC_IF4) {
/// **** recv_IF4 of rxdataF from RRU **** /// /// **** recv_IF4 of rxdataF from RRU **** ///
/// **** recv_IF4 of rxsigF from RRU **** /// /// **** recv_IF4 of rxsigF from RRU **** ///
...@@ -2734,11 +2744,11 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl ...@@ -2734,11 +2744,11 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl
if (proc->first_rx == 0) { if (proc->first_rx == 0) {
if (proc->subframe_rx != subframe){ if (proc->subframe_rx != subframe){
LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->subframe_rx %d, subframe %d)\n",proc->subframe_rx,subframe); LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->subframe_rx %d, subframe %d)\n",proc->subframe_rx,subframe);
// exit_fun("Exiting"); //exit_fun("Exiting");
} }
if (proc->frame_rx != frame) { if (proc->frame_rx != frame) {
LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->frame_rx %d frame %d)\n",proc->frame_rx,frame); LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->frame_rx %d frame %d)\n",proc->frame_rx,frame);
// exit_fun("Exiting"); //exit_fun("Exiting");
} }
} else { } else {
proc->first_rx = 0; proc->first_rx = 0;
......
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