Commit c76951a3 authored by Sandeep Kumar's avatar Sandeep Kumar

handle per cc device for some tx/rx cases

parent dd6e1f9d
...@@ -73,7 +73,8 @@ void exit_fun(const char* s); ...@@ -73,7 +73,8 @@ void exit_fun(const char* s);
extern int exit_openair; extern int exit_openair;
extern openair0_device openair0; // Fix per CC openair rf/if device update
// extern openair0_device openair0;
unsigned char dlsch_input_buffer[2700] __attribute__ ((aligned(32))); unsigned char dlsch_input_buffer[2700] __attribute__ ((aligned(32)));
int eNB_sync_buffer0[640*6] __attribute__ ((aligned(32))); int eNB_sync_buffer0[640*6] __attribute__ ((aligned(32)));
...@@ -2522,7 +2523,7 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl ...@@ -2522,7 +2523,7 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl
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];
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 1 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 1 );
rxs = openair0.trx_read_func(&openair0, rxs = eNB->rfdevice.trx_read_func(&eNB->rfdevice,
&proc->timestamp_rx, &proc->timestamp_rx,
rxp, rxp,
fp->samples_per_tti, fp->samples_per_tti,
......
...@@ -120,8 +120,8 @@ struct timing_info_t { ...@@ -120,8 +120,8 @@ struct timing_info_t {
unsigned int n_samples; unsigned int n_samples;
} timing_info; } timing_info;
// Fix per CC openair rf/if device update
extern openair0_device openair0; // extern openair0_device openair0;
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
extern volatile int start_eNB; extern volatile int start_eNB;
...@@ -524,7 +524,7 @@ static void* eNB_thread_rxtx( void* param ) ...@@ -524,7 +524,7 @@ static void* eNB_thread_rxtx( void* param )
for (i=0; i<PHY_vars_eNB_g[0][0]->frame_parms.nb_antennas_tx; i++) for (i=0; i<PHY_vars_eNB_g[0][0]->frame_parms.nb_antennas_tx; i++)
txp[i] = (void*)&PHY_vars_eNB_g[0][0]->common_vars.txdata[0][i][proc->subframe_tx*PHY_vars_eNB_g[0][0]->frame_parms.samples_per_tti]; txp[i] = (void*)&PHY_vars_eNB_g[0][0]->common_vars.txdata[0][i][proc->subframe_tx*PHY_vars_eNB_g[0][0]->frame_parms.samples_per_tti];
// if symb_written < spp ==> error // if symb_written < spp ==> error
openair0.trx_write_func(&openair0, PHY_vars_eNB_g[0][proc->CC_id]->rfdevice.trx_write_func(&PHY_vars_eNB_g[0][proc->CC_id]->rfdevice,
(proc->timestamp_tx-openair0_cfg[0].tx_sample_advance), (proc->timestamp_tx-openair0_cfg[0].tx_sample_advance),
txp, txp,
PHY_vars_eNB_g[0][0]->frame_parms.samples_per_tti, PHY_vars_eNB_g[0][0]->frame_parms.samples_per_tti,
...@@ -741,8 +741,19 @@ static void* eNB_thread_rx_common( void* param ) ...@@ -741,8 +741,19 @@ static void* eNB_thread_rx_common( void* param )
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
wait_system_ready ("Waiting for eNB application to be ready %s\r", &start_eNB); wait_system_ready ("Waiting for eNB application to be ready %s\r", &start_eNB);
#endif #endif
if (openair0.trx_start_func(&openair0) != 0 )
LOG_E(HW,"Could not start the device\n"); // Start RF device for this CC
if (eNB->node_function == eNodeB_3GPP || eNB->node_function == NGFI_RRU_IF4) {
if (eNB->rfdevice.trx_start_func(&eNB->rfdevice) != 0 )
LOG_E(HW,"Could not start the RF device\n");
}
// Start IF device for this CC
if (eNB->node_function == NGFI_RCC_IF4 || eNB->node_function == NGFI_RRU_IF4) {
if (eNB->ifdevice.trx_start_func(&eNB->ifdevice) != 0 )
LOG_E(HW,"Could not start the IF device\n");
}
// This is a forever while loop, it loops over subframes which are scheduled by incoming samples from HW devices // This is a forever while loop, it loops over subframes which are scheduled by incoming samples from HW devices
while (!oai_exit) { while (!oai_exit) {
......
...@@ -280,6 +280,9 @@ eth_params_t *eth_params; ...@@ -280,6 +280,9 @@ eth_params_t *eth_params;
openair0_config_t openair0_cfg[MAX_CARDS]; openair0_config_t openair0_cfg[MAX_CARDS];
// Change to openair_global to handle UE
openair0_device openair0;
double cpuf; double cpuf;
char uecap_xer[1024],uecap_xer_in=0; char uecap_xer[1024],uecap_xer_in=0;
...@@ -1592,11 +1595,11 @@ int main( int argc, char **argv ) ...@@ -1592,11 +1595,11 @@ int main( int argc, char **argv )
} }
/* device host type is set*/ /* device host type is set*/
//openair0.host_type = BBU_HOST; openair0.host_type = BBU_HOST;
/* device type is initialized NONE_DEV (no RF device) when the RF device will be initiated device type will be set */ /* device type is initialized NONE_DEV (no RF device) when the RF device will be initiated device type will be set */
//openair0.type = NONE_DEV; openair0.type = NONE_DEV;
/* transport type is initialized NONE_TP (no transport protocol) when the transport protocol will be initiated transport protocol type will be set */ /* transport type is initialized NONE_TP (no transport protocol) when the transport protocol will be initiated transport protocol type will be set */
//openair0.transp_type = NONE_TP; openair0.transp_type = NONE_TP;
//openair0_cfg[0].log_level = glog_level; //openair0_cfg[0].log_level = glog_level;
// Legacy BBU - RRH init // Legacy BBU - RRH init
...@@ -1661,6 +1664,7 @@ int main( int argc, char **argv ) ...@@ -1661,6 +1664,7 @@ int main( int argc, char **argv )
else if (mode==loop_through_memory) { else if (mode==loop_through_memory) {
} }
} }
}
printf("Done initializing RF and IF devices\n"); printf("Done initializing RF and IF devices\n");
......
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