Commit b046b071 authored by knopp's avatar knopp

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

Merge branch 'enhancement-10-harmony' of https://gitlab.eurecom.fr/oai/openairinterface5g into enhancement-10-harmony

Conflicts:
	targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf
parents 64121aaf 95453cf3
......@@ -96,7 +96,7 @@ void send_IF4(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type,
} else if (packet_type == IF4_PULFFT) {
db_fulllength = 12*fp->N_RB_UL;
db_halflength = (db_fulllength)>>1;
slotoffsetF = (subframe)*(fp->ofdm_symbol_size)*((fp->Ncp==1) ? 12 : 14) + 1;
slotoffsetF = 1;
blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength - 1;
IF4_header_t *ul_header = (IF4_header_t *)(tx_buffer + MAC_HEADER_SIZE_BYTES);
......@@ -212,7 +212,7 @@ void recv_IF4(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_typ
} else if (*packet_type == IF4_PULFFT) {
*symbol_number = ((packet_header->frame_status)>>26)&0x000f;
slotoffsetF = (*symbol_number)*(fp->ofdm_symbol_size) + (*subframe)*(fp->ofdm_symbol_size)*((fp->Ncp==1) ? 12 : 14) + 1;
slotoffsetF = (*symbol_number)*(fp->ofdm_symbol_size) + 1;
blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength - 1;
for (element_id=0; element_id<db_halflength; element_id++) {
......
......@@ -1104,12 +1104,7 @@ void rx_prach(PHY_VARS_eNB *eNB,
for (aa=0; aa<nb_ant_rx; aa++) {
prach[aa] = (int16_t*)&eNB->common_vars.rxdata[0][aa][subframe*eNB->frame_parms.samples_per_tti-eNB->N_TA_offset];
}
int energy = dB_fixed(signal_energy(prach[0], eNB->frame_parms.samples_per_tti));
//if (energy >= 45) {
// printf("prach subframe energy %d\n",energy);
//}
// First compute physical root sequence
if (restricted_set == 0) {
if (Ncs_config>15) {
......@@ -1290,13 +1285,6 @@ void rx_prach(PHY_VARS_eNB *eNB,
send_IF4(eNB, eNB->proc.frame_rx, eNB->proc.subframe_rx, IF4_PRACH, k);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 0 );
energy = dB_fixed(signal_energy(&rxsigF[0][k], 839));
if (energy >=45) {
printf("<frame %d> prach freq-domain energy %d\n",eNB->proc.frame_rx, energy);
//write_output("beforecomp.m","rxF",&rxsigF[0][k],839*2,1,0);
//exit(1);
}
return;
} else if (eNB->node_function == NGFI_RCC_IF4) {
k = (12*n_ra_prb) - 6*eNB->frame_parms.N_RB_UL;
......@@ -1313,13 +1301,6 @@ void rx_prach(PHY_VARS_eNB *eNB,
memmove((&rxsigF[0][k]),
(&rxsigF[0][0]),
839*2*sizeof(int16_t));
energy = dB_fixed(signal_energy(&rxsigF[0][k], 839));
if (energy >=45) {
printf("<frame %d> prach freq-domain energy %d\n",eNB->proc.frame_rx, energy);
//write_output("aftercomp.m","rxF",&rxsigF[0][k],839*2,1,0);
//exit(1);
}
}
// in case of RCC and prach received rx_thread wakes up prach
......
......@@ -6817,7 +6817,7 @@ void dft60(int16_t *x,int16_t *y,unsigned char scale)
for (i=0; i<60; i++) {
y128[i] = mulhi_int16(y128[i],norm128);
printf("y[%d] = (%d,%d)\n",i,((int16_t*)&y128[i])[0],((int16_t*)&y128[i])[1]);
// printf("y[%d] = (%d,%d)\n",i,((int16_t*)&y128[i])[0],((int16_t*)&y128[i])[1]);
}
}
......@@ -23,6 +23,9 @@ eNBs =
component_carriers = (
{
node_function = "eNodeB_3GPP";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "FDD";
tdd_config = 3;
tdd_config_s = 0;
......
......@@ -23,6 +23,9 @@ eNBs =
component_carriers = (
{
node_function = "eNodeB_3GPP";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "FDD";
tdd_config = 3;
tdd_config_s = 0;
......
......@@ -23,6 +23,9 @@ eNBs =
component_carriers = (
{
node_function = "eNodeB_3GPP";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "FDD";
tdd_config = 3;
tdd_config_s = 0;
......
......@@ -17,7 +17,7 @@ eNBs =
mobile_country_code = "208";
mobile_network_code = "93";
mobile_network_code = "92";
////////// Physical parameters:
......@@ -34,7 +34,7 @@ eNBs =
downlink_frequency = 2660000000L;
uplink_frequency_offset = -120000000;
Nid_cell = 0;
N_RB_DL = 25;
N_RB_DL = 50;
Nid_cell_mbsfn = 0;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
......@@ -133,7 +133,7 @@ eNBs =
};
////////// MME parameters:
mme_ip_address = ( { ipv4 = "127.0.0.3";
mme_ip_address = ( { ipv4 = "192.168.12.26";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
......@@ -142,11 +142,11 @@ eNBs =
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "lo";
ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24";
ENB_INTERFACE_NAME_FOR_S1_MME = "eth1";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.147/24";
ENB_INTERFACE_NAME_FOR_S1U = "lo";
ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.4/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth1";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.147/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
......
......@@ -22,6 +22,9 @@ eNBs =
component_carriers = (
{
node_function = "eNodeB_3GPP";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "FDD";
tdd_config = 3;
tdd_config_s = 0;
......
......@@ -302,6 +302,7 @@ static void* eNB_thread_rxtx( void* param ) {
uint16_t packet_type;
uint32_t symbol_number=0;
uint32_t symbol_mask, symbol_mask_full;
uint8_t seqno=0;
......@@ -503,10 +504,16 @@ static void* eNB_thread_rxtx( void* param ) {
}
} else if (PHY_vars_eNB_g[0][proc->CC_id]->node_function == NGFI_RRU_IF4) {
/// **** recv_IF4 of txdataF from RCC **** ///
symbol_number = 0;
symbol_mask = 0;
symbol_mask_full = (1<<PHY_vars_eNB_g[0][proc->CC_id]->frame_parms.symbols_per_tti)-1;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4, 1 );
do {
recv_IF4(PHY_vars_eNB_g[0][proc->CC_id], &proc->frame_tx, &proc->subframe_tx, &packet_type, &symbol_number);
} while (symbol_number < PHY_vars_eNB_g[0][proc->CC_id]->frame_parms.symbols_per_tti-1);
symbol_mask = symbol_mask | (1<<symbol_number);
} while (symbol_mask != symbol_mask_full);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4, 0 );
......@@ -812,13 +819,12 @@ static void* eNB_thread_asynch_rx( void* param ) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4, 0 );
if (packet_type == IF4_PULFFT) {
symbol_mask = symbol_mask | (1<<symbol_number);
symbol_mask = symbol_mask | (1<<symbol_number);
prach_rx = (is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)>0) ? 1 : 0;
} else if (packet_type == IF4_PRACH) {
// wake up thread for PRACH RX
prach_rx = 1;
prach_rx = 0;
}
} while( (symbol_mask != symbol_mask_full) && (prach_rx == 0));
} while( (symbol_mask != symbol_mask_full) || (prach_rx == 1));
if (proc->first_rx == 0) {
if (subframe_rx < proc->subframe_rx+2){
......@@ -977,7 +983,7 @@ static void* eNB_thread_FH( void* param ) {
pthread_mutex_unlock(&sync_mutex);
printf( "got sync (eNB_thread FH)\n" );
printf( "got sync (eNB_thread_FH)\n" );
#if defined(ENABLE_ITTI)
wait_system_ready ("Waiting for eNB application to be ready %s\r", &start_eNB);
......@@ -1129,32 +1135,33 @@ static void* eNB_thread_FH( void* param ) {
symbol_mask = 0;
symbol_mask_full = (1<<fp->symbols_per_tti)-1;
prach_rx = 0;
do { // Blocking, we need a timeout on this !!!!!!!!!!!!!!!!!!!!!!!
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4, 1 );
recv_IF4(eNB, &proc->frame_rx, &proc->subframe_rx, &packet_type, &symbol_number);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4, 0 );
if (packet_type == IF4_PULFFT) {
symbol_mask = symbol_mask | (1<<symbol_number);
symbol_mask = symbol_mask | (1<<symbol_number);
prach_rx = (is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)>0) ? 1 : 0;
} else if (packet_type == IF4_PRACH) {
// wake up thread for PRACH RX
prach_rx = 1;
}
} while( (symbol_mask != symbol_mask_full) && (prach_rx == 0));
prach_rx = 0;
}
} while( (symbol_mask != symbol_mask_full) || (prach_rx == 1));
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");
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");
exit_fun("Exiting");
}
} 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