Commit 95453cf3 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 491c23c3 fb2a4529
...@@ -96,7 +96,7 @@ void send_IF4(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type, ...@@ -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) { } else if (packet_type == IF4_PULFFT) {
db_fulllength = 12*fp->N_RB_UL; db_fulllength = 12*fp->N_RB_UL;
db_halflength = (db_fulllength)>>1; 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; blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength - 1;
IF4_header_t *ul_header = (IF4_header_t *)(tx_buffer + MAC_HEADER_SIZE_BYTES); 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 ...@@ -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) { } else if (*packet_type == IF4_PULFFT) {
*symbol_number = ((packet_header->frame_status)>>26)&0x000f; *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; blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength - 1;
for (element_id=0; element_id<db_halflength; element_id++) { for (element_id=0; element_id<db_halflength; element_id++) {
......
...@@ -1104,12 +1104,7 @@ void rx_prach(PHY_VARS_eNB *eNB, ...@@ -1104,12 +1104,7 @@ void rx_prach(PHY_VARS_eNB *eNB,
for (aa=0; aa<nb_ant_rx; aa++) { 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]; 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 // First compute physical root sequence
if (restricted_set == 0) { if (restricted_set == 0) {
if (Ncs_config>15) { if (Ncs_config>15) {
...@@ -1290,13 +1285,6 @@ void rx_prach(PHY_VARS_eNB *eNB, ...@@ -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); 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 ); 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; return;
} else if (eNB->node_function == NGFI_RCC_IF4) { } else if (eNB->node_function == NGFI_RCC_IF4) {
k = (12*n_ra_prb) - 6*eNB->frame_parms.N_RB_UL; k = (12*n_ra_prb) - 6*eNB->frame_parms.N_RB_UL;
...@@ -1313,13 +1301,6 @@ void rx_prach(PHY_VARS_eNB *eNB, ...@@ -1313,13 +1301,6 @@ void rx_prach(PHY_VARS_eNB *eNB,
memmove((&rxsigF[0][k]), memmove((&rxsigF[0][k]),
(&rxsigF[0][0]), (&rxsigF[0][0]),
839*2*sizeof(int16_t)); 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 // in case of RCC and prach received rx_thread wakes up prach
......
...@@ -1105,7 +1105,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, ...@@ -1105,7 +1105,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
uint8_t smbv_alloc_cnt = 1; uint8_t smbv_alloc_cnt = 1;
#endif #endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX,1); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+(subframe&1),1);
start_meas(&eNB->phy_proc_tx); start_meas(&eNB->phy_proc_tx);
for (i=0; i<NUMBER_OF_UE_MAX; i++) { for (i=0; i<NUMBER_OF_UE_MAX; i++) {
...@@ -1406,7 +1406,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, ...@@ -1406,7 +1406,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
#endif #endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX,0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+(subframe&1),0);
stop_meas(&eNB->phy_proc_tx); stop_meas(&eNB->phy_proc_tx);
} }
...@@ -2515,7 +2515,7 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl ...@@ -2515,7 +2515,7 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl
uint8_t seqno=0; uint8_t seqno=0;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON, 1 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON+(subframe&1), 1 );
start_meas(&eNB->phy_proc_rx); start_meas(&eNB->phy_proc_rx);
...@@ -2602,7 +2602,7 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl ...@@ -2602,7 +2602,7 @@ 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_PHY_PROCEDURES_ENB_RX_COMMON, 0 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON+(subframe&1), 0 );
} }
...@@ -2621,7 +2621,7 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const ...@@ -2621,7 +2621,7 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const
const int subframe = proc->subframe_rx; const int subframe = proc->subframe_rx;
const int frame = proc->frame_rx; const int frame = proc->frame_rx;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC, 1 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC+(subframe&1), 1 );
start_meas(&eNB->phy_proc_rx); start_meas(&eNB->phy_proc_rx);
#ifdef DEBUG_PHY_PROC #ifdef DEBUG_PHY_PROC
LOG_D(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_uespec_RX(%d)\n",eNB->Mod_id,frame, subframe); LOG_D(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_uespec_RX(%d)\n",eNB->Mod_id,frame, subframe);
...@@ -3183,7 +3183,7 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const ...@@ -3183,7 +3183,7 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const
phy_procedures_emos_eNB_RX(subframe,eNB); phy_procedures_emos_eNB_RX(subframe,eNB);
#endif #endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC, 0 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC+(subframe&1), 0 );
stop_meas(&eNB->phy_proc_rx); stop_meas(&eNB->phy_proc_rx);
......
...@@ -75,10 +75,14 @@ struct vcd_module_s { ...@@ -75,10 +75,14 @@ struct vcd_module_s {
} vcd_module_s; } vcd_module_s;
const char* eurecomVariablesNames[] = { const char* eurecomVariablesNames[] = {
"frame_number_TX_eNB", "frame_number_TX0_eNB",
"frame_number_RX_eNB", "frame_number_TX1_eNB",
"subframe_number_TX_eNB", "frame_number_RX0_eNB",
"subframe_number_RX_eNB", "frame_number_RX1_eNB",
"subframe_number_TX0_eNB",
"subframe_number_TX1_eNB",
"subframe_number_RX0_eNB",
"subframe_number_RX1_eNB",
"runtime_TX_eNB", "runtime_TX_eNB",
"runtime_RX_eNB", "runtime_RX_eNB",
"frame_number_TX0_UE", "frame_number_TX0_UE",
...@@ -187,8 +191,6 @@ const char* eurecomFunctionsNames[] = { ...@@ -187,8 +191,6 @@ const char* eurecomFunctionsNames[] = {
"trx_write", "trx_write",
"eNB_thread_rxtx0", "eNB_thread_rxtx0",
"eNB_thread_rxtx1", "eNB_thread_rxtx1",
"eNB_thread_rx",
"eNB_thread_prach",
"ue_thread_synch", "ue_thread_synch",
"ue_thread_rxtx0", "ue_thread_rxtx0",
"ue_thread_rxtx1", "ue_thread_rxtx1",
...@@ -213,10 +215,12 @@ const char* eurecomFunctionsNames[] = { ...@@ -213,10 +215,12 @@ const char* eurecomFunctionsNames[] = {
"lte_ue_measurement_procedures", "lte_ue_measurement_procedures",
"lte_ue_pdcch_procedures", "lte_ue_pdcch_procedures",
"lte_ue_pbch_procedures", "lte_ue_pbch_procedures",
"phy_procedures_eNb_tx", "phy_procedures_eNb_tx0",
"phy_procedures_eNb_rx", "phy_procedures_eNb_tx1",
"phy_procedures_eNb_rx_common", "phy_procedures_eNb_rx_common0",
"phy_procedures_eNb_rx_uespec", "phy_procedures_eNb_rx_common1",
"phy_procedures_eNb_rx_uespec0",
"phy_procedures_eNb_rx_uespec1",
"phy_eNB_slot_fep", "phy_eNB_slot_fep",
"phy_procedures_ue_tx", "phy_procedures_ue_tx",
"phy_procedures_ue_rx", "phy_procedures_ue_rx",
......
...@@ -47,10 +47,14 @@ ...@@ -47,10 +47,14 @@
/* WARNING: if you edit the enums below, update also string definitions in vcd_signal_dumper.c */ /* WARNING: if you edit the enums below, update also string definitions in vcd_signal_dumper.c */
typedef enum { typedef enum {
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX_ENB = 0, VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_ENB = 0,
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX_ENB, VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX1_ENB,
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX_ENB, VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_ENB,
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX_ENB, VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX1_ENB,
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_ENB,
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX1_ENB,
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX0_ENB,
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX1_ENB,
VCD_SIGNAL_DUMPER_VARIABLES_RUNTIME_TX_ENB, VCD_SIGNAL_DUMPER_VARIABLES_RUNTIME_TX_ENB,
VCD_SIGNAL_DUMPER_VARIABLES_RUNTIME_RX_ENB, VCD_SIGNAL_DUMPER_VARIABLES_RUNTIME_RX_ENB,
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_UE, VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_UE,
...@@ -161,8 +165,6 @@ typedef enum { ...@@ -161,8 +165,6 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE,
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX0, VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX0,
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX1, VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX1,
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX,
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_PRACH,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_SYNCH, VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_SYNCH,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_RXTX0, VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_RXTX0,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_RXTX1, VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_RXTX1,
...@@ -188,9 +190,11 @@ typedef enum { ...@@ -188,9 +190,11 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PDCCH_PROCEDURES, VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PDCCH_PROCEDURES,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PBCH_PROCEDURES, VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PBCH_PROCEDURES,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX, VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX, VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX1,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON, VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON1,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC, VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC1,
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_SLOT_FEP, VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_SLOT_FEP,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX, VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX,
......
...@@ -23,6 +23,9 @@ eNBs = ...@@ -23,6 +23,9 @@ eNBs =
component_carriers = ( component_carriers = (
{ {
node_function = "eNodeB_3GPP";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "FDD"; frame_type = "FDD";
tdd_config = 3; tdd_config = 3;
tdd_config_s = 0; tdd_config_s = 0;
......
...@@ -23,6 +23,9 @@ eNBs = ...@@ -23,6 +23,9 @@ eNBs =
component_carriers = ( component_carriers = (
{ {
node_function = "eNodeB_3GPP";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "FDD"; frame_type = "FDD";
tdd_config = 3; tdd_config = 3;
tdd_config_s = 0; tdd_config_s = 0;
......
...@@ -23,6 +23,9 @@ eNBs = ...@@ -23,6 +23,9 @@ eNBs =
component_carriers = ( component_carriers = (
{ {
node_function = "eNodeB_3GPP";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "FDD"; frame_type = "FDD";
tdd_config = 3; tdd_config = 3;
tdd_config_s = 0; tdd_config_s = 0;
......
...@@ -23,6 +23,9 @@ eNBs = ...@@ -23,6 +23,9 @@ eNBs =
component_carriers = ( component_carriers = (
{ {
node_function = "eNodeB_3GPP";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "FDD"; frame_type = "FDD";
tdd_config = 3; tdd_config = 3;
tdd_config_s = 0; tdd_config_s = 0;
......
...@@ -17,12 +17,15 @@ eNBs = ...@@ -17,12 +17,15 @@ eNBs =
mobile_country_code = "208"; mobile_country_code = "208";
mobile_network_code = "93"; mobile_network_code = "92";
////////// Physical parameters: ////////// Physical parameters:
component_carriers = ( component_carriers = (
{ {
node_function = "eNodeB_3GPP";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "FDD"; frame_type = "FDD";
tdd_config = 3; tdd_config = 3;
tdd_config_s = 0; tdd_config_s = 0;
...@@ -31,7 +34,7 @@ eNBs = ...@@ -31,7 +34,7 @@ eNBs =
downlink_frequency = 2660000000L; downlink_frequency = 2660000000L;
uplink_frequency_offset = -120000000; uplink_frequency_offset = -120000000;
Nid_cell = 0; Nid_cell = 0;
N_RB_DL = 25; N_RB_DL = 50;
Nid_cell_mbsfn = 0; Nid_cell_mbsfn = 0;
nb_antennas_tx = 1; nb_antennas_tx = 1;
nb_antennas_rx = 1; nb_antennas_rx = 1;
...@@ -130,7 +133,7 @@ eNBs = ...@@ -130,7 +133,7 @@ eNBs =
}; };
////////// MME parameters: ////////// MME parameters:
mme_ip_address = ( { ipv4 = "127.0.0.3"; mme_ip_address = ( { ipv4 = "192.168.12.26";
ipv6 = "192:168:30::17"; ipv6 = "192:168:30::17";
active = "yes"; active = "yes";
preference = "ipv4"; preference = "ipv4";
...@@ -139,11 +142,11 @@ eNBs = ...@@ -139,11 +142,11 @@ eNBs =
NETWORK_INTERFACES : NETWORK_INTERFACES :
{ {
ENB_INTERFACE_NAME_FOR_S1_MME = "lo"; ENB_INTERFACE_NAME_FOR_S1_MME = "eth1";
ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.147/24";
ENB_INTERFACE_NAME_FOR_S1U = "lo"; ENB_INTERFACE_NAME_FOR_S1U = "eth1";
ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.4/24"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.147/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_PORT_FOR_S1U = 2152; # Spec 2152
}; };
......
...@@ -22,6 +22,9 @@ eNBs = ...@@ -22,6 +22,9 @@ eNBs =
component_carriers = ( component_carriers = (
{ {
node_function = "eNodeB_3GPP";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "FDD"; frame_type = "FDD";
tdd_config = 3; tdd_config = 3;
tdd_config_s = 0; tdd_config_s = 0;
......
[*] [*]
[*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI [*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI
[*] Sun May 29 20:10:01 2016 [*] Sun Jul 24 14:21:37 2016
[*] [*]
[dumpfile] "/tmp/openair_dump_eNB.vcd" [dumpfile] "/tmp/openair_dump_eNB.vcd"
[dumpfile_mtime] "Sun May 29 20:07:25 2016" [dumpfile_mtime] "Sun Jul 24 14:18:00 2016"
[dumpfile_size] 16398004 [dumpfile_size] 7104337
[savefile] "/home/papillon/openairinterface5g/targets/RT/USER/eNB_usrp.gtkw" [savefile] "/home/papillon/openairinterface5g/targets/RT/USER/eNB_usrp.gtkw"
[timestart] 10806270000 [timestart] 10621768000
[size] 1535 724 [size] 1535 724
[pos] 309 0 [pos] 309 0
*-18.793451 10806918339 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 *-19.793451 29026062100 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[sst_width] 284 [sst_width] 284
[signals_width] 254 [signals_width] 262
[sst_expanded] 1 [sst_expanded] 1
[sst_vpaned_height] 294 [sst_vpaned_height] 294
@28 @28
...@@ -20,19 +20,24 @@ functions.trx_write ...@@ -20,19 +20,24 @@ functions.trx_write
@24 @24
variables.trx_ts[63:0] variables.trx_ts[63:0]
variables.trx_tst[63:0] variables.trx_tst[63:0]
variables.frame_number_TX_eNB[63:0]
variables.frame_number_RX_eNB[63:0]
variables.subframe_number_TX_eNB[63:0]
variables.subframe_number_RX_eNB[63:0]
@28 @28
functions.eNB_thread_rx0 functions.eNB_thread_rxtx0
functions.eNB_thread_tx0 @24
functions.phy_procedures_eNb_tx variables.frame_number_RX0_eNB[63:0]
variables.subframe_number_RX0_eNB[63:0]
variables.frame_number_TX0_eNB[63:0]
variables.subframe_number_TX0_eNB[63:0]
@28
functions.eNB_thread_rxtx1
@24
variables.frame_number_RX1_eNB[63:0]
variables.subframe_number_RX1_eNB[63:0]
variables.frame_number_TX1_eNB[63:0]
@25
variables.subframe_number_TX1_eNB[63:0]
@28
functions.phy_enb_sfgen functions.phy_enb_sfgen
@29
functions.phy_eNB_slot_fep functions.phy_eNB_slot_fep
@28
functions.phy_procedures_eNb_rx
functions.phy_enb_prach_rx functions.phy_enb_prach_rx
@24 @24
variables.dci_info[63:0] variables.dci_info[63:0]
......
...@@ -301,6 +301,7 @@ static void* eNB_thread_rxtx( void* param ) { ...@@ -301,6 +301,7 @@ static void* eNB_thread_rxtx( void* param ) {
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;
uint8_t seqno=0; uint8_t seqno=0;
...@@ -435,6 +436,9 @@ static void* eNB_thread_rxtx( void* param ) { ...@@ -435,6 +436,9 @@ static void* eNB_thread_rxtx( void* param ) {
if (oai_exit) break; if (oai_exit) break;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_ENB+(proc->subframe_rx&1), proc->frame_rx );
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX0_ENB+(proc->subframe_rx&1), proc->subframe_rx );
// Common procedures // Common procedures
phy_procedures_eNB_common_RX(PHY_vars_eNB_g[0][proc->CC_id], 0); phy_procedures_eNB_common_RX(PHY_vars_eNB_g[0][proc->CC_id], 0);
...@@ -473,8 +477,8 @@ static void* eNB_thread_rxtx( void* param ) { ...@@ -473,8 +477,8 @@ static void* eNB_thread_rxtx( void* param ) {
exit_fun("nothing to add"); exit_fun("nothing to add");
} }
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX_ENB, proc->frame_tx ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_ENB+(proc->subframe_tx&1), proc->frame_tx );
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX_ENB, proc->subframe_tx ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_ENB+(proc->subframe_tx&1), proc->subframe_tx );
if (oai_exit) break; if (oai_exit) break;
...@@ -499,10 +503,16 @@ static void* eNB_thread_rxtx( void* param ) { ...@@ -499,10 +503,16 @@ static void* eNB_thread_rxtx( void* param ) {
} }
} else if (PHY_vars_eNB_g[0][proc->CC_id]->node_function == NGFI_RRU_IF4) { } else if (PHY_vars_eNB_g[0][proc->CC_id]->node_function == NGFI_RRU_IF4) {
/// **** recv_IF4 of txdataF from RCC **** /// /// **** 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 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4, 1 );
do { do {
recv_IF4(PHY_vars_eNB_g[0][proc->CC_id], &proc->frame_tx, &proc->subframe_tx, &packet_type, &symbol_number); 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 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4, 0 );
...@@ -802,13 +812,12 @@ static void* eNB_thread_asynch_rx( void* param ) { ...@@ -802,13 +812,12 @@ static void* eNB_thread_asynch_rx( void* param ) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4, 0 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4, 0 );
if (packet_type == IF4_PULFFT) { 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) { } else if (packet_type == IF4_PRACH) {
// wake up thread for PRACH RX prach_rx = 0;
prach_rx = 1;
} }
} while( (symbol_mask != symbol_mask_full) && (prach_rx == 0)); } while( (symbol_mask != symbol_mask_full) || (prach_rx == 1));
if (proc->first_rx == 0) { if (proc->first_rx == 0) {
if (subframe_rx < proc->subframe_rx+2){ if (subframe_rx < proc->subframe_rx+2){
...@@ -967,7 +976,7 @@ static void* eNB_thread_FH( void* param ) { ...@@ -967,7 +976,7 @@ static void* eNB_thread_FH( void* param ) {
pthread_mutex_unlock(&sync_mutex); pthread_mutex_unlock(&sync_mutex);
printf( "got sync (eNB_thread FH)\n" ); printf( "got sync (eNB_thread_FH)\n" );
#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);
...@@ -1004,6 +1013,14 @@ static void* eNB_thread_FH( void* param ) { ...@@ -1004,6 +1013,14 @@ static void* eNB_thread_FH( void* param ) {
if (oai_exit) break; if (oai_exit) break;
if (subframe==9) {
subframe=0;
frame++;
frame&=1023;
} else {
subframe++;
}
// This case is for synchronization to another thread // This case is for synchronization to another thread
if ((eNB->node_timing == synch_to_other) && if ((eNB->node_timing == synch_to_other) &&
((eNB->node_function == NGFI_RCC_IF4) || ((eNB->node_function == NGFI_RCC_IF4) ||
...@@ -1037,13 +1054,7 @@ static void* eNB_thread_FH( void* param ) { ...@@ -1037,13 +1054,7 @@ static void* eNB_thread_FH( void* param ) {
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 );
if (subframe==9) {
subframe=0;
frame++;
frame&=1023;
} else {
subframe++;
}
rxs = eNB->rfdevice.trx_read_func(&eNB->rfdevice, rxs = eNB->rfdevice.trx_read_func(&eNB->rfdevice,
&proc->timestamp_rx, &proc->timestamp_rx,
...@@ -1073,8 +1084,6 @@ static void* eNB_thread_FH( void* param ) { ...@@ -1073,8 +1084,6 @@ static void* eNB_thread_FH( void* param ) {
//printf("timestamp_rx %lu, frame %d(%d), subframe %d(%d)\n",proc->timestamp_rx,proc->frame_rx,frame,proc->subframe_rx,subframe); //printf("timestamp_rx %lu, frame %d(%d), subframe %d(%d)\n",proc->timestamp_rx,proc->frame_rx,frame,proc->subframe_rx,subframe);
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_SUBFRAME_NUMBER_RX_ENB, proc->subframe_rx );
if (rxs != fp->samples_per_tti) if (rxs != fp->samples_per_tti)
exit_fun( "problem receiving samples" ); exit_fun( "problem receiving samples" );
...@@ -1107,8 +1116,6 @@ static void* eNB_thread_FH( void* param ) { ...@@ -1107,8 +1116,6 @@ static void* eNB_thread_FH( void* param ) {
} }
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_SUBFRAME_NUMBER_RX_ENB, proc->subframe_rx );
} // eNodeB_3GPP_BBU && node_timing == synch_to_ext_device } // eNodeB_3GPP_BBU && node_timing == synch_to_ext_device
else if ((eNB->node_timing == synch_to_ext_device) && else if ((eNB->node_timing == synch_to_ext_device) &&
...@@ -1121,37 +1128,36 @@ static void* eNB_thread_FH( void* param ) { ...@@ -1121,37 +1128,36 @@ static void* eNB_thread_FH( void* param ) {
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;
do { // Blocking, we need a timeout on this !!!!!!!!!!!!!!!!!!!!!!! do { // Blocking, we need a timeout on this !!!!!!!!!!!!!!!!!!!!!!!
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 );
recv_IF4(eNB, &proc->frame_rx, &proc->subframe_rx, &packet_type, &symbol_number); 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 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4, 0 );
if (packet_type == IF4_PULFFT) { 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) { } else if (packet_type == IF4_PRACH) {
// wake up thread for PRACH RX prach_rx = 0;
prach_rx = 1; }
} } while( (symbol_mask != symbol_mask_full) || (prach_rx == 1));
} while( (symbol_mask != symbol_mask_full) && (prach_rx == 0));
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;
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 ); 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_SUBFRAME_NUMBER_RX_ENB, proc->subframe_rx );
} // node_timing == synch_to_externs, node_function = NGFI_IF4 } // node_timing == synch_to_externs, node_function = NGFI_IF4
else { // should not get here else { // should not get here
......
...@@ -526,6 +526,7 @@ static void *scope_thread(void *arg) ...@@ -526,6 +526,7 @@ static void *scope_thread(void *arg)
for(UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) { for(UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
if ((PHY_vars_eNB_g[0][CC_id]->dlsch[UE_id][0]->rnti>0) && (ue_cnt<scope_enb_num_ue)) { if ((PHY_vars_eNB_g[0][CC_id]->dlsch[UE_id][0]->rnti>0) && (ue_cnt<scope_enb_num_ue)) {
//if ((ue_cnt<scope_enb_num_ue)) {
phy_scope_eNB(form_enb[CC_id][ue_cnt], phy_scope_eNB(form_enb[CC_id][ue_cnt],
PHY_vars_eNB_g[0][CC_id], PHY_vars_eNB_g[0][CC_id],
UE_id); UE_id);
......
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