added node func BBU and marked split for rf/if read and write
This commit is contained in:
+5
-4
@@ -157,10 +157,11 @@ enum transmission_access_mode {
|
|||||||
SCHEDULED_ACCESS,
|
SCHEDULED_ACCESS,
|
||||||
CBA_ACCESS};
|
CBA_ACCESS};
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
eNodeB_3GPP=0, // classical eNodeB function
|
eNodeB_3GPP=0, // classical eNodeB function
|
||||||
NGFI_RRU_IF4, // NGFI_RRU (NGFI remote radio-unit, currently split at common - ue_specific interface, IF4)
|
eNodeB_3GPP_BBU, // classical eNodeB function with transport interface
|
||||||
NGFI_RCC_IF4 // NGFI_RCC (NGFI radio cloud center, currently split at common - ue_specific interface, IF4)
|
NGFI_RRU_IF4, // NGFI_RRU (NGFI remote radio-unit, currently split at common - ue_specific interface, IF4)
|
||||||
|
NGFI_RCC_IF4, // NGFI_RCC (NGFI radio cloud center, currently split at common - ue_specific interface, IF4)
|
||||||
} eNB_func_t;
|
} eNB_func_t;
|
||||||
|
|
||||||
typedef struct UE_SCAN_INFO_s {
|
typedef struct UE_SCAN_INFO_s {
|
||||||
|
|||||||
@@ -2524,11 +2524,7 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl
|
|||||||
uint16_t packet_type;
|
uint16_t packet_type;
|
||||||
uint32_t symbol_number=0;
|
uint32_t symbol_number=0;
|
||||||
uint32_t symbol_mask, symbol_mask_full;
|
uint32_t symbol_mask, symbol_mask_full;
|
||||||
|
|
||||||
struct timespec time_req, time_rem;
|
|
||||||
time_req.tv_sec = 0;
|
|
||||||
time_req.tv_nsec = 300000;
|
|
||||||
|
|
||||||
if (subframe==9) {
|
if (subframe==9) {
|
||||||
subframe=0;
|
subframe=0;
|
||||||
frame++;
|
frame++;
|
||||||
@@ -2547,7 +2543,7 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl
|
|||||||
if (abstraction_flag==0) { // grab signal in chunks of 500 us (1 slot)
|
if (abstraction_flag==0) { // grab signal in chunks of 500 us (1 slot)
|
||||||
|
|
||||||
if ((eNB->node_function == NGFI_RRU_IF4) ||
|
if ((eNB->node_function == NGFI_RRU_IF4) ||
|
||||||
(eNB->node_function == eNodeB_3GPP)) { // acquisition from RF and front-end processing
|
(eNB->node_function == eNodeB_3GPP)) { // acquisition from RF
|
||||||
|
|
||||||
for (i=0; i<fp->nb_antennas_rx; i++)
|
for (i=0; i<fp->nb_antennas_rx; i++)
|
||||||
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];
|
||||||
@@ -2563,13 +2559,13 @@ 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;
|
||||||
}
|
}
|
||||||
@@ -2585,6 +2581,16 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl
|
|||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 0 );
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 0 );
|
||||||
|
|
||||||
|
} else if(eNB->node_function == eNodeB_3GPP_BBU) { // acquisition from IF
|
||||||
|
/// **** trx_read_func from IF device **** ///
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ((eNB->node_function == NGFI_RRU_IF4) ||
|
||||||
|
(eNB->node_function == eNodeB_3GPP) ||
|
||||||
|
(eNB->node_function == eNodeB_3GPP_BBU)) { // front-end processing
|
||||||
|
|
||||||
// now do common RX processing for first slot in subframe
|
// now do common RX processing for first slot in subframe
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_SLOT_FEP,1);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_SLOT_FEP,1);
|
||||||
remove_7_5_kHz(eNB,proc->subframe_rx<<1);
|
remove_7_5_kHz(eNB,proc->subframe_rx<<1);
|
||||||
@@ -2608,12 +2614,10 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl
|
|||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_SLOT_FEP,0);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_SLOT_FEP,0);
|
||||||
|
|
||||||
if (eNB->node_function == NGFI_RRU_IF4 && is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)<=0) {
|
if (eNB->node_function == NGFI_RRU_IF4 && is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)<=0) {
|
||||||
|
/// **** send_IF4 of rxdataF to RCC (no prach now) **** ///
|
||||||
/// **** send_IF4 of rxdataF to RCC (no prach now) **** ///
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 1 );
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 1 );
|
||||||
send_IF4(eNB, frame, subframe, IF4_PULFFT, 0);
|
send_IF4(eNB, frame, subframe, IF4_PULFFT, 0);
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 0 );
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 0 );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// **** send_IF4 of prach to RCC **** /// done in prach thread (below)
|
/// **** send_IF4 of prach to RCC **** /// done in prach thread (below)
|
||||||
@@ -2657,10 +2661,6 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl
|
|||||||
symbol_mask = 0;
|
symbol_mask = 0;
|
||||||
symbol_mask_full = (1<<fp->symbols_per_tti)-1;
|
symbol_mask_full = (1<<fp->symbols_per_tti)-1;
|
||||||
prach_rx = 0;
|
prach_rx = 0;
|
||||||
|
|
||||||
// Block from loop while testing
|
|
||||||
//symbol_mask = symbol_mask_full;
|
|
||||||
//nanosleep(&time_req, &time_rem);
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4, 1 );
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4, 1 );
|
||||||
|
|||||||
@@ -500,12 +500,13 @@ static void* eNB_thread_rxtx( void* param ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// eNodeB_3GPP and RRU create txdata and write to RF device
|
// eNodeB_3GPP, _BBU and RRU create txdata
|
||||||
if (PHY_vars_eNB_g[0][proc->CC_id]->node_function != NGFI_RCC_IF4) {
|
if (PHY_vars_eNB_g[0][proc->CC_id]->node_function != NGFI_RCC_IF4) {
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_SFGEN , 1 );
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_SFGEN , 1 );
|
||||||
do_OFDM_mod_rt( proc->subframe_tx, PHY_vars_eNB_g[0][proc->CC_id] );
|
do_OFDM_mod_rt( proc->subframe_tx, PHY_vars_eNB_g[0][proc->CC_id] );
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_SFGEN , 0 );
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_SFGEN , 0 );
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
short *txdata = (short*)&PHY_vars_eNB_g[0][proc->CC_id]->common_vars.txdata[0][0][proc->subframe_tx*PHY_vars_eNB_g[0][proc->CC_id]->frame_parms.samples_per_tti];
|
short *txdata = (short*)&PHY_vars_eNB_g[0][proc->CC_id]->common_vars.txdata[0][0][proc->subframe_tx*PHY_vars_eNB_g[0][proc->CC_id]->frame_parms.samples_per_tti];
|
||||||
int i;
|
int i;
|
||||||
@@ -518,8 +519,12 @@ static void* eNB_thread_rxtx( void* param ) {
|
|||||||
txdata[i+5] = 0;
|
txdata[i+5] = 0;
|
||||||
txdata[i+6] = 0;
|
txdata[i+6] = 0;
|
||||||
txdata[i+7] = -2047; }
|
txdata[i+7] = -2047; }
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// eNodeB_3GPP, RRU write to RF device
|
||||||
|
if (PHY_vars_eNB_g[0][proc->CC_id]->node_function == eNodeB_3GPP ||
|
||||||
|
PHY_vars_eNB_g[0][proc->CC_id]->node_function == NGFI_RRU_IF4) {
|
||||||
// Transmit TX buffer based on timestamp from RX
|
// Transmit TX buffer based on timestamp from RX
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 );
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 );
|
||||||
// prepare tx buffer pointers
|
// prepare tx buffer pointers
|
||||||
@@ -539,13 +544,15 @@ static void* eNB_thread_rxtx( void* param ) {
|
|||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (proc->timestamp_tx-openair0_cfg[0].tx_sample_advance)&0xffffffff );
|
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (proc->timestamp_tx-openair0_cfg[0].tx_sample_advance)&0xffffffff );
|
||||||
|
|
||||||
|
} else if (PHY_vars_eNB_g[0][proc->CC_id]->node_function == eNodeB_3GPP_BBU) {
|
||||||
|
/// **** trx_write_func to IF device **** ///
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
/// **** send_IF4 of txdataF to RRU **** ///
|
/// **** send_IF4 of txdataF to RRU **** ///
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 1 );
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 1 );
|
||||||
send_IF4(PHY_vars_eNB_g[0][proc->CC_id], proc->frame_tx, proc->subframe_tx, IF4_PDLFFT, 0);
|
send_IF4(PHY_vars_eNB_g[0][proc->CC_id], proc->frame_tx, proc->subframe_tx, IF4_PDLFFT, 0);
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 0 );
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 0 );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pthread_mutex_lock(&proc->mutex_rxtx) != 0) {
|
if (pthread_mutex_lock(&proc->mutex_rxtx) != 0) {
|
||||||
@@ -744,7 +751,7 @@ static void* eNB_thread_rx_common( void* param ) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Start RF device for this CC
|
// Start RF device for this CC
|
||||||
if (eNB->node_function != NGFI_RCC_IF4) {
|
if (eNB->node_function == eNodeB_3GPP || eNB->node_function == NGFI_RRU_IF4) {
|
||||||
if (eNB->rfdevice.trx_start_func(&eNB->rfdevice) != 0 )
|
if (eNB->rfdevice.trx_start_func(&eNB->rfdevice) != 0 )
|
||||||
LOG_E(HW,"Could not start the RF device\n");
|
LOG_E(HW,"Could not start the RF device\n");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -686,7 +686,8 @@ static void get_options (int argc, char **argv)
|
|||||||
LONG_OPTION_PHYTEST,
|
LONG_OPTION_PHYTEST,
|
||||||
LONG_OPTION_RCC,
|
LONG_OPTION_RCC,
|
||||||
LONG_OPTION_RRU,
|
LONG_OPTION_RRU,
|
||||||
LONG_OPTION_ENB
|
LONG_OPTION_ENB,
|
||||||
|
LONG_OPTION_ENB_BBU
|
||||||
#if T_TRACER
|
#if T_TRACER
|
||||||
,
|
,
|
||||||
LONG_OPTION_T_PORT,
|
LONG_OPTION_T_PORT,
|
||||||
@@ -713,6 +714,7 @@ static void get_options (int argc, char **argv)
|
|||||||
{"RCC", no_argument, NULL, LONG_OPTION_RCC},
|
{"RCC", no_argument, NULL, LONG_OPTION_RCC},
|
||||||
{"RRU", no_argument, NULL, LONG_OPTION_RRU},
|
{"RRU", no_argument, NULL, LONG_OPTION_RRU},
|
||||||
{"eNB", no_argument, NULL, LONG_OPTION_ENB},
|
{"eNB", no_argument, NULL, LONG_OPTION_ENB},
|
||||||
|
{"BBU", no_argument, NULL, LONG_OPTION_ENB_BBU},
|
||||||
#if T_TRACER
|
#if T_TRACER
|
||||||
{"T_port", required_argument, 0, LONG_OPTION_T_PORT},
|
{"T_port", required_argument, 0, LONG_OPTION_T_PORT},
|
||||||
{"T_nowait", no_argument, 0, LONG_OPTION_T_NOWAIT},
|
{"T_nowait", no_argument, 0, LONG_OPTION_T_NOWAIT},
|
||||||
@@ -815,6 +817,10 @@ static void get_options (int argc, char **argv)
|
|||||||
case LONG_OPTION_ENB:
|
case LONG_OPTION_ENB:
|
||||||
node_function = eNodeB_3GPP;
|
node_function = eNodeB_3GPP;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case LONG_OPTION_ENB_BBU:
|
||||||
|
node_function = eNodeB_3GPP_BBU;
|
||||||
|
break;
|
||||||
|
|
||||||
#if T_TRACER
|
#if T_TRACER
|
||||||
case LONG_OPTION_T_PORT: {
|
case LONG_OPTION_T_PORT: {
|
||||||
@@ -1694,7 +1700,7 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
// Handle spatially distributed MIMO antenna ports
|
// Handle spatially distributed MIMO antenna ports
|
||||||
// Load RF device and initialize
|
// Load RF device and initialize
|
||||||
if (node_function != NGFI_RCC_IF4) {
|
if (node_function == NGFI_RRU_IF4 || node_function == eNodeB_3GPP) {
|
||||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||||
if (mode!=loop_through_memory) {
|
if (mode!=loop_through_memory) {
|
||||||
returns=openair0_device_load(&(PHY_vars_eNB_g[0][CC_id]->rfdevice), &openair0_cfg[0]);
|
returns=openair0_device_load(&(PHY_vars_eNB_g[0][CC_id]->rfdevice), &openair0_cfg[0]);
|
||||||
@@ -1710,7 +1716,7 @@ int main( int argc, char **argv )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Load transport protocol and initialize
|
// Load transport protocol and initialize
|
||||||
if (node_function != eNodeB_3GPP){
|
if (node_function != eNodeB_3GPP) {
|
||||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||||
if (mode!=loop_through_memory) {
|
if (mode!=loop_through_memory) {
|
||||||
returns=openair0_transport_load(&(PHY_vars_eNB_g[0][CC_id]->ifdevice), &openair0_cfg[0], (eth_params+CC_id));
|
returns=openair0_transport_load(&(PHY_vars_eNB_g[0][CC_id]->ifdevice), &openair0_cfg[0], (eth_params+CC_id));
|
||||||
|
|||||||
Reference in New Issue
Block a user