diff --git a/common/utils/T/T_defs.h b/common/utils/T/T_defs.h index 7b5304b1cb144fdeb3ffdac617c27a45d398aba1..11c816f002a409c8befb42ff7381126a5e3b00a9 100644 --- a/common/utils/T/T_defs.h +++ b/common/utils/T/T_defs.h @@ -44,7 +44,7 @@ /* let's have 100 RBs functional for the basic simulator */ # define T_BUFFER_MAX (1024*64*2) #else -# define T_BUFFER_MAX (1024*64) +# define T_BUFFER_MAX (1024*64*2) #endif /* size of the local cache for messages (must be pow(2,something)) */ @@ -52,7 +52,7 @@ /* we don't need much space for the basic simulator */ # define T_CACHE_SIZE 1024 #else -# define T_CACHE_SIZE (8192 * 2) +# define T_CACHE_SIZE (8192) #endif /* maximum number of bytes a message can contain */ diff --git a/common/utils/T/T_messages.txt b/common/utils/T/T_messages.txt index 06ee5bf12bb6d43a254f215419f29c74d0293298..bad6444e1303d385c9808608a599cf6e43330bab 100644 --- a/common/utils/T/T_messages.txt +++ b/common/utils/T/T_messages.txt @@ -1,3 +1,7 @@ +ID = BENETEL + GROUP = ALL + FORMAT = int,frame : int,slot : buffer,rxdataF + #general logs ID = ENB_MASTER_TICK DESC = eNodeB master tick - one tick per ms, to be used as "reference clock", mostly for ticktime view diff --git a/doc/TESTING_GNB_W_COTS_UE.md b/doc/TESTING_GNB_W_COTS_UE.md index 610cc5bdd47539b823c00917c530911fc211b093..73ae18351f2f1458a687ea41408321c3cc36180f 100644 --- a/doc/TESTING_GNB_W_COTS_UE.md +++ b/doc/TESTING_GNB_W_COTS_UE.md @@ -30,8 +30,6 @@ http://www.saelig.com/MFR00066/ste2300.htm ## Configuration Overview * Non Standalone (NSA) configuration : initial Control Plane established between UE and RAN eNB, then User Plane established between UE and gNB, Core network is 4G based supporting rel 15 - -* Commercial UE: Oppo Reno 5G * OAI Software Defined gNB and eNB * eNB RF front end: USRP (ETTUS) B200 Mini or B210 * gNB RF front end: USRP (ETTUS) B200 Mini or B210 (N310 will be needed for MIMO and wider BW's) @@ -40,6 +38,17 @@ http://www.saelig.com/MFR00066/ste2300.htm * BW: 40MHz * Antenna scheme: SISO +## COTS UEs + +Our code might not work with all 5G phones yet, but we are constantly improving it. Here is a list of COTS UEs that we know that work with OAI. + +* Oppo Reno 5G +* Samsung A90 5G +* Google Pixel 5G +* Simcom SIMCOM8200EA +* Quectel RM500Q-GL + + ## Repository https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index 13b53202794fe1b6a90d20e63575d5a1722038ca..0d2ffbc2c326f4ecb65f522b9ef816e7a17bd0c7 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -466,7 +466,13 @@ void init_eNB_afterRU(void) { for (i=0; i<gNB->RU_list[ru_id]->nb_rx; aa++,i++) { LOG_I(PHY,"Attaching RU %d antenna %d to gNB antenna %d\n",gNB->RU_list[ru_id]->idx,i,aa); gNB->prach_vars.rxsigF[aa] = gNB->RU_list[ru_id]->prach_rxsigF[0][i]; +#if 0 +printf("before %p\n", gNB->common_vars.rxdataF[aa]); +#endif gNB->common_vars.rxdataF[aa] = gNB->RU_list[ru_id]->common.rxdataF[i]; +#if 0 +printf("after %p\n", gNB->common_vars.rxdataF[aa]); +#endif } } diff --git a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c index 713e71674b979f47fb4040a7712d7a875a1afc51..38b35dcf6d39a93969b7b3f1ee3cbb73158e7622 100644 --- a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c +++ b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c @@ -158,6 +158,8 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, #endif for (aarx=0; aarx<gNB->frame_parms.nb_antennas_rx; aarx++) { + re_offset = k; /* Initializing the Resource element offset for each Rx antenna */ + pil = (int16_t *)&pilot[0]; rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+k+nushift)]; ul_ch = (int16_t *)&ul_ch_estimates[aarx][ch_offset]; diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index f775eb9130824c6f2897ac2a7c238b9034e37bb4..9d7422745eef7122e9ef501cddda5544cae8ba55 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -551,6 +551,11 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) gNB_I0_measurements(gNB); + // measure enegry in SS=10 L=4, nb_rb = 18, first_rb = 0 (corresponds to msg3) + int offset = 10*gNB->frame_parms.ofdm_symbol_size + gNB->frame_parms.first_carrier_offset; + int power_rxF = signal_energy_nodc(&gNB->common_vars.rxdataF[0][offset],12*18); + LOG_D(PHY,"frame %d, slot %d: UL signal energy %d\n",frame_rx,slot_rx,power_rxF); + for (int i=0;i<NUMBER_OF_NR_PUCCH_MAX;i++){ NR_gNB_PUCCH_t *pucch = gNB->pucch[i]; if (pucch) { @@ -646,6 +651,8 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) } #endif +T(T_BENETEL, T_INT(frame_rx), T_INT(slot_rx), T_BUFFER(&gNB->common_vars.rxdataF[0][0], 2048*4*14)); + uint8_t symbol_start = ulsch_harq->ulsch_pdu.start_symbol_index; uint8_t symbol_end = symbol_start + ulsch_harq->ulsch_pdu.nr_of_symbols; VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,1); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index 7201b295968aa53ffee85285aabc4ec56533dae5..ede68b11efbdf5f8a5a118449a8037e68edbd4ac 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -371,7 +371,13 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, #define BIT(x) (1 << (x)) const uint64_t dlsch_in_slot_bitmap = BIT( 1) | BIT( 2) | BIT( 3) | BIT( 4) | BIT( 5) | BIT( 6) | BIT(11) | BIT(12) | BIT(13) | BIT(14) | BIT(15) | BIT(16); - const uint64_t ulsch_in_slot_bitmap = BIT( 8) | BIT(18); + + uint8_t prach_config_index = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.prach_ConfigurationIndex; + uint64_t ulsch_in_slot_bitmap; + if (prach_config_index==4) //this is the PRACH config used in the Benetel RRU. TODO: make this generic for any PRACH config. + ulsch_in_slot_bitmap = BIT( 8) | BIT( 9); + else + ulsch_in_slot_bitmap = BIT( 8) | BIT(18); memset(RC.nrmac[module_idP]->cce_list[bwp_id][0],0,MAX_NUM_CCE*sizeof(int)); // coreset0 memset(RC.nrmac[module_idP]->cce_list[bwp_id][1],0,MAX_NUM_CCE*sizeof(int)); // coresetid 1 diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 938ba17165dbf7f68923b9aca9e0d639062118de..08736719211a625246a5d9b760653455fe8cfadc 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -395,7 +395,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, T_BUFFER(sduP, sdu_lenP)); UE_info->mac_stats[UE_id].ulsch_total_bytes_rx += sdu_lenP; - LOG_D(MAC, "[gNB %d][PUSCH %d] CC_id %d %d.%d Received ULSCH sdu from PHY (rnti %x, UE_id %d) ul_cqi %d\n", + LOG_D(MAC, "[gNB %d][PUSCH %d] CC_id %d %d.%d Received ULSCH sdu from PHY (rnti %x, UE_id %d) ul_cqi %d sduP %p\n", gnb_mod_idP, harq_pid, CC_idP, @@ -403,7 +403,8 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, slotP, current_rnti, UE_id, - ul_cqi); + ul_cqi, + sduP); // if not missed detection (10dB threshold for now) if (UE_scheduling_control->ul_rssi < (100+rssi)) { diff --git a/targets/ARCH/ETHERNET/benetel/4g/benetel.c b/targets/ARCH/ETHERNET/benetel/4g/benetel.c index 76855111e11828389e24b04aa0b59cbaa4a44a0c..d3b72463b495a1cfd4579cf770350a12f94dd5c1 100644 --- a/targets/ARCH/ETHERNET/benetel/4g/benetel.c +++ b/targets/ARCH/ETHERNET/benetel/4g/benetel.c @@ -163,8 +163,8 @@ int trx_benetel_ctlrecv(openair0_device *device, void *msg, ssize_t msg_len) cap->FH_fmt = OAI_IF4p5_only; cap->num_bands = 1; cap->band_list[0] = 7; - cap->nb_rx[0] = 1; - cap->nb_tx[0] = 1; + cap->nb_rx[0] = device->openair0_cfg->rx_num_channels; + cap->nb_tx[0] = device->openair0_cfg->tx_num_channels; cap->max_pdschReferenceSignalPower[0] = -27; cap->max_rxgain[0] = 90; @@ -194,11 +194,12 @@ void benetel_fh_if4p5_south_in(RU_t *ru, LTE_DL_FRAME_PARMS *fp; int symbol; int32_t *rxdata; - int antenna = 0; + int antenna; lock_ul_buffer(&s->buffers, *subframe); next: - while (!(s->buffers.ul_busy[*subframe] == 0x3fff || + while (!((s->buffers.ul_busy[0][*subframe] == 0x3fff && + s->buffers.ul_busy[1][*subframe] == 0x3fff) || s->buffers.prach_busy[*subframe] == 1)) wait_ul_buffer(&s->buffers, *subframe); if (s->buffers.prach_busy[*subframe] == 1) { @@ -217,24 +218,27 @@ next: eNB = eNB_list[0]; fp = &eNB->frame_parms; - for (symbol = 0; symbol < 14; symbol++) { - int i; - uint16_t *p = (uint16_t *)(&s->buffers.ul[*subframe][symbol*1200*4]); - for (i = 0; i < 1200*2; i++) { - p[i] = htons(p[i]); - } - rxdata = &ru->common.rxdataF[antenna][symbol * fp->ofdm_symbol_size]; + for (antenna = 0; antenna < ru->nb_rx; antenna++) { + for (symbol = 0; symbol < 14; symbol++) { + int i; + uint16_t *p = (uint16_t *)(&s->buffers.ul[antenna][*subframe][symbol*1200*4]); + for (i = 0; i < 1200*2; i++) { + p[i] = htons(p[i]); + } + rxdata = &ru->common.rxdataF[antenna][symbol * fp->ofdm_symbol_size]; #if 1 - memcpy(rxdata + 2048 - 600, - &s->buffers.ul[*subframe][symbol*1200*4], - 600 * 4); - memcpy(rxdata, - &s->buffers.ul[*subframe][symbol*1200*4] + 600*4, - 600 * 4); + memcpy(rxdata + 2048 - 600, + &s->buffers.ul[antenna][*subframe][symbol*1200*4], + 600 * 4); + memcpy(rxdata, + &s->buffers.ul[antenna][*subframe][symbol*1200*4] + 600*4, + 600 * 4); #endif + } } - s->buffers.ul_busy[*subframe] = 0; + s->buffers.ul_busy[0][*subframe] = 0; + s->buffers.ul_busy[1][*subframe] = 0; signal_ul_buffer(&s->buffers, *subframe); unlock_ul_buffer(&s->buffers, *subframe); @@ -272,45 +276,49 @@ void benetel_fh_if4p5_south_out(RU_t *ru, LTE_DL_FRAME_PARMS *fp; int symbol; int32_t *txdata; - int aa = 0; + int aa; //printf("BENETEL: %s (f.sf %d.%d ts %ld)\n", __FUNCTION__, frame, subframe, timestamp); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff ); lock_dl_buffer(&s->buffers, subframe); - if (s->buffers.dl_busy[subframe]) { + if (s->buffers.dl_busy[0][subframe] || + s->buffers.dl_busy[1][subframe]) { printf("%s: fatal: DL buffer busy for subframe %d\n", __FUNCTION__, subframe); unlock_dl_buffer(&s->buffers, subframe); return; } eNB = eNB_list[0]; fp = &eNB->frame_parms; - if (ru->num_eNB != 1 || ru->nb_tx != 1 || fp->ofdm_symbol_size != 2048 || + if (ru->num_eNB != 1 || fp->ofdm_symbol_size != 2048 || fp->Ncp != NORMAL || fp->symbols_per_tti != 14) { printf("%s:%d:%s: unsupported configuration\n", __FILE__, __LINE__, __FUNCTION__); exit(1); } - for (symbol = 0; symbol < 14; symbol++) { - txdata = &ru->common.txdataF_BF[aa][symbol * fp->ofdm_symbol_size]; + for (aa = 0; aa < ru->nb_tx; aa++) { + for (symbol = 0; symbol < 14; symbol++) { + txdata = &ru->common.txdataF_BF[aa][symbol * fp->ofdm_symbol_size]; #if 1 - memcpy(&s->buffers.dl[subframe][symbol*1200*4], - txdata + 2048 - 600, - 600 * 4); - memcpy(&s->buffers.dl[subframe][symbol*1200*4] + 600*4, - txdata + 1, - 600 * 4); + memcpy(&s->buffers.dl[aa][subframe][symbol*1200*4], + txdata + 2048 - 600, + 600 * 4); + memcpy(&s->buffers.dl[aa][subframe][symbol*1200*4] + 600*4, + txdata + 1, + 600 * 4); #endif - int i; - uint16_t *p = (uint16_t *)(&s->buffers.dl[subframe][symbol*1200*4]); - for (i = 0; i < 1200*2; i++) { - p[i] = htons(p[i]); + int i; + uint16_t *p = (uint16_t *)(&s->buffers.dl[aa][subframe][symbol*1200*4]); + for (i = 0; i < 1200*2; i++) { + p[i] = htons(p[i]); + } } } - s->buffers.dl_busy[subframe] = 0x3fff; + s->buffers.dl_busy[0][subframe] = 0x3fff; + s->buffers.dl_busy[1][subframe] = 0x3fff; unlock_dl_buffer(&s->buffers, subframe); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_IF4P5_SOUTH_OUT_RU+ru->idx, ru->proc.frame_tx); diff --git a/targets/ARCH/ETHERNET/benetel/4g/dpdk_driver.c b/targets/ARCH/ETHERNET/benetel/4g/dpdk_driver.c index 42953d1d4a8be829135d4c80332f6b253fbf9270..2b6ef37e6fa0c242688a9f9f6598b8f1cc9ef9b6 100644 --- a/targets/ARCH/ETHERNET/benetel/4g/dpdk_driver.c +++ b/targets/ARCH/ETHERNET/benetel/4g/dpdk_driver.c @@ -233,19 +233,20 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs) } - if(PAYLOAD_1 == 0x12 && PAYLOAD_2 == 0xce && ANT_NUM == 0x00) { + if(PAYLOAD_1 == 0x12 && PAYLOAD_2 == 0xce) { p.frame = FRAME; p.subframe = SUBFRAME >> 4; p.slot = 0; /* unused */ p.symbol = SYMBOL; - p.antenna = 0; + p.antenna = ANT_NUM; memcpy(p.iq, IQ_ptr, 4800); store_ul(bs, &p); } - // U-PLANE UL ANT_0 PROCESSING - if(PAYLOAD_1 == 0x12 && PAYLOAD_2 == 0xce && ANT_NUM == 0x00 && dl_start == 1) + // U-PLANE UL PROCESSING + if(PAYLOAD_1 == 0x12 && PAYLOAD_2 == 0xce && dl_start == 1) { + int a = ANT_NUM; int tx_frame = FRAME; int tx_subframe = SUBFRAME >> 4; int tx_symbol = SYMBOL + 5; @@ -266,33 +267,20 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs) SUBFRAME = tx_subframe << 4; SYMBOL = tx_symbol; - /* antenna 0 - send actual DL data (if available) */ + /* send actual DL data (if available) */ lock_dl_buffer(bs->buffers, tx_subframe); - if (!(bs->buffers->dl_busy[tx_subframe] & (1 << tx_symbol))) { - printf("%s: warning, DL underflow (sf.symbol %d.%d)\n", __FUNCTION__, + if (!(bs->buffers->dl_busy[a][tx_subframe] & (1 << tx_symbol))) { + printf("%s: warning, DL underflow (antenna %d sf.symbol %d.%d)\n", + __FUNCTION__, + a, tx_subframe, tx_symbol); memset(IQ_ptr, 0, 1200 * 4); } else { - memcpy(IQ_ptr, bs->buffers->dl[tx_subframe] + tx_symbol * 1200*4, + memcpy(IQ_ptr, bs->buffers->dl[a][tx_subframe] + tx_symbol * 1200*4, 1200*4); } - bs->buffers->dl_busy[tx_subframe] &= ~(1 << tx_symbol); + bs->buffers->dl_busy[a][tx_subframe] &= ~(1 << tx_symbol); unlock_dl_buffer(bs->buffers, tx_subframe); - - // fill DL Data for ant 0 with 0 value -// memset(IQ_ptr, 0, 4800); - } - - // U-PLANE UL ANT_1 PROCESSING - else if(PAYLOAD_1 == 0x12 && PAYLOAD_2 == 0xce && ANT_NUM == 0x01 && dl_start == 1) - { - -// ANT_NUM = 0x01; - SYMBOL = (SYMBOL + 5) % 14; - PAYLOAD_2 = 0xc8; - - // fill DL Data for ant 1 with 0 value - memset(IQ_ptr, 0, 4800); } // U-PLANE PRACH PROCESSING diff --git a/targets/ARCH/ETHERNET/benetel/4g/low.c b/targets/ARCH/ETHERNET/benetel/4g/low.c index 038592d596c4cac0d21a4f1a79afe1014174f59c..14783a700b46a97dd6d02cd3fae2959a2b0c89f6 100644 --- a/targets/ARCH/ETHERNET/benetel/4g/low.c +++ b/targets/ARCH/ETHERNET/benetel/4g/low.c @@ -27,37 +27,36 @@ void store_ul(benetel_t *bs, ul_packet_t *ul) { - /* only antenna 0 for the moment */ - if (ul->antenna != 0) - return; + int a = ul->antenna; - if (ul->subframe != bs->next_subframe || - ul->symbol != bs->next_symbol) { - printf("%s: fatal, expected frame.sf.symbol %d.%d.%d, got %d.%d.%d\n", + if (ul->subframe != bs->next_subframe[a] || + ul->symbol != bs->next_symbol[a]) { + printf("%s: fatal, antenna %d expected frame.sf.symbol %d.%d.%d, got %d.%d.%d\n", __FUNCTION__, - bs->expected_benetel_frame, bs->next_subframe, bs->next_symbol, + a, + bs->expected_benetel_frame[a], bs->next_subframe[a], bs->next_symbol[a], ul->frame, ul->subframe, ul->symbol); exit(1); } - lock_ul_buffer(bs->buffers, bs->next_subframe); - if (bs->buffers->ul_busy[bs->next_subframe] & (1 << bs->next_symbol)) { + lock_ul_buffer(bs->buffers, bs->next_subframe[a]); + if (bs->buffers->ul_busy[a][bs->next_subframe[a]] & (1 << bs->next_symbol[a])) { printf("%s: warning, UL overflow (sf.symbol %d.%d)\n", __FUNCTION__, - bs->next_subframe, bs->next_symbol); + bs->next_subframe[a], bs->next_symbol[a]); } - memcpy(bs->buffers->ul[bs->next_subframe] + bs->next_symbol * 1200*4, + memcpy(bs->buffers->ul[a][bs->next_subframe[a]] + bs->next_symbol[a] * 1200*4, ul->iq, 1200*4); - bs->buffers->ul_busy[bs->next_subframe] |= (1 << bs->next_symbol); - signal_ul_buffer(bs->buffers, bs->next_subframe); - unlock_ul_buffer(bs->buffers, bs->next_subframe); + bs->buffers->ul_busy[a][bs->next_subframe[a]] |= (1 << bs->next_symbol[a]); + signal_ul_buffer(bs->buffers, bs->next_subframe[a]); + unlock_ul_buffer(bs->buffers, bs->next_subframe[a]); - bs->next_symbol++; - if (bs->next_symbol == 14) { - bs->next_symbol = 0; - bs->next_subframe = (bs->next_subframe + 1) % 10; - if (bs->next_subframe == 0) { - bs->expected_benetel_frame++; - bs->expected_benetel_frame &= 255; + bs->next_symbol[a]++; + if (bs->next_symbol[a] == 14) { + bs->next_symbol[a] = 0; + bs->next_subframe[a] = (bs->next_subframe[a] + 1) % 10; + if (bs->next_subframe[a] == 0) { + bs->expected_benetel_frame[a]++; + bs->expected_benetel_frame[a] &= 255; } } } diff --git a/targets/ARCH/ETHERNET/benetel/4g/low.h b/targets/ARCH/ETHERNET/benetel/4g/low.h index 5e75d9181e84f06447a6631373c043fe3d9779eb..e74bf89163bc54d2a34a0cfb7e9d065fbd2b47eb 100644 --- a/targets/ARCH/ETHERNET/benetel/4g/low.h +++ b/targets/ARCH/ETHERNET/benetel/4g/low.h @@ -26,9 +26,10 @@ typedef struct { shared_buffers *buffers; - int next_subframe; - int next_symbol; - int expected_benetel_frame; + /* [2] is for two antennas */ + int next_subframe[2]; + int next_symbol[2]; + int expected_benetel_frame[2]; char *dpdk_main_command_line; } benetel_t; diff --git a/targets/ARCH/ETHERNET/benetel/4g/low_dpdk.c b/targets/ARCH/ETHERNET/benetel/4g/low_dpdk.c index ecff473010c34f1bfae5ab166ca3c83f663cb5b8..edf62a67e07ab71cda2f6e3f32e9d70ac9c2f565 100644 --- a/targets/ARCH/ETHERNET/benetel/4g/low_dpdk.c +++ b/targets/ARCH/ETHERNET/benetel/4g/low_dpdk.c @@ -68,7 +68,8 @@ void *benetel_start_dpdk(char *ifname, shared_buffers *buffers, char *dpdk_main_ bs->buffers = buffers; - bs->expected_benetel_frame = 255; + bs->expected_benetel_frame[0] = 255; + bs->expected_benetel_frame[1] = 255; bs->dpdk_main_command_line = dpdk_main_command_line; diff --git a/targets/ARCH/ETHERNET/benetel/4g/shared_buffers.c b/targets/ARCH/ETHERNET/benetel/4g/shared_buffers.c index 492a15dfc3833e85b38d196b32903615f8618114..380cbabc73bf618201f7e4864c24afec9521e156 100644 --- a/targets/ARCH/ETHERNET/benetel/4g/shared_buffers.c +++ b/targets/ARCH/ETHERNET/benetel/4g/shared_buffers.c @@ -44,9 +44,12 @@ void init_buffers(shared_buffers *s) /* in FDD the eNB's first transmitted DL subframe is 4 but the device * needs to have subframes 1, 2 and 3 ready. Let's pretend there are ready. */ - s->dl_busy[1] = 0x3fff; - s->dl_busy[2] = 0x3fff; - s->dl_busy[3] = 0x3fff; + s->dl_busy[0][1] = 0x3fff; + s->dl_busy[0][2] = 0x3fff; + s->dl_busy[0][3] = 0x3fff; + s->dl_busy[1][1] = 0x3fff; + s->dl_busy[1][2] = 0x3fff; + s->dl_busy[1][3] = 0x3fff; } void lock_dl_buffer(shared_buffers *s, int subframe) diff --git a/targets/ARCH/ETHERNET/benetel/4g/shared_buffers.h b/targets/ARCH/ETHERNET/benetel/4g/shared_buffers.h index 1d5040b95b55d3ef76fd6d40ede97f7ea686acca..ed174265c5d4fbff11f212b2ae2b0eb1883c5e66 100644 --- a/targets/ARCH/ETHERNET/benetel/4g/shared_buffers.h +++ b/targets/ARCH/ETHERNET/benetel/4g/shared_buffers.h @@ -26,10 +26,11 @@ #include <stdint.h> typedef struct { - unsigned char dl[10][14*1200*4]; - unsigned char ul[10][14*1200*4]; - uint16_t dl_busy[10]; - uint16_t ul_busy[10]; + /* [2] is for two antennas */ + unsigned char dl[2][10][14*1200*4]; + unsigned char ul[2][10][14*1200*4]; + uint16_t dl_busy[2][10]; + uint16_t ul_busy[2][10]; pthread_mutex_t m_ul[10]; pthread_cond_t c_ul[10]; diff --git a/targets/ARCH/ETHERNET/benetel/5g/benetel.c b/targets/ARCH/ETHERNET/benetel/5g/benetel.c index 2f60e7dc49efe15a25325565744cd916744d3bdc..cededa968eddd8c06bfdfcb1f44a8dcf86cfb362 100644 --- a/targets/ARCH/ETHERNET/benetel/5g/benetel.c +++ b/targets/ARCH/ETHERNET/benetel/5g/benetel.c @@ -162,8 +162,9 @@ int trx_benetel_ctlrecv(openair0_device *device, void *msg, ssize_t msg_len) cap->FH_fmt = OAI_IF4p5_only; cap->num_bands = 1; cap->band_list[0] = 78; - cap->nb_rx[0] = 1; - cap->nb_tx[0] = 1; + /* TODO: hardcoded to 1 for the moment, get the real value somehow... */ + cap->nb_rx[0] = 1; //device->openair0_cfg->rx_num_channels; + cap->nb_tx[0] = 1; //device->openair0_cfg->tx_num_channels; cap->max_pdschReferenceSignalPower[0] = -27; cap->max_rxgain[0] = 90; @@ -201,12 +202,13 @@ void benetel_fh_if4p5_south_in(RU_t *ru, NR_DL_FRAME_PARMS *fp; int symbol; int32_t *rxdata; - int antenna = 0; + int antenna; lock_ul_buffer(&s->buffers, *slot); #if 1 next: - while (!(s->buffers.ul_busy[*slot] == 0x3fff || + while (!((s->buffers.ul_busy[0][*slot] == 0x3fff && + s->buffers.ul_busy[1][*slot] == 0x3fff) || s->buffers.prach_busy[*slot] == 1)) wait_ul_buffer(&s->buffers, *slot); if (s->buffers.prach_busy[*slot] == 1) { @@ -226,24 +228,31 @@ next: #endif fp = ru->nr_frame_parms; - for (symbol = 0; symbol < 14; symbol++) { - int i; - uint16_t *p = (uint16_t *)(&s->buffers.ul[*slot][symbol*1272*4]); - for (i = 0; i < 1272*2; i++) { - p[i] = htons(p[i]); - } - rxdata = &ru->common.rxdataF[antenna][symbol * fp->ofdm_symbol_size]; + for (antenna = 0; antenna < ru->nb_rx; antenna++) { + for (symbol = 0; symbol < 14; symbol++) { + int i; + int16_t *p = (int16_t *)(&s->buffers.ul[antenna][*slot][symbol*1272*4]); + for (i = 0; i < 1272*2; i++) { + p[i] = (int16_t)(ntohs(p[i])) / 16; + } + rxdata = &ru->common.rxdataF[antenna][symbol * fp->ofdm_symbol_size]; +#if 0 +if (*slot == 0 && symbol == 0) +printf("rxdata in benetel_fh_if4p5_south_in %p\n", &ru->common.rxdataF[antenna][0]); +#endif #if 1 - memcpy(rxdata + 2048 - 1272/2, - &s->buffers.ul[*slot][symbol*1272*4], - (1272/2) * 4); - memcpy(rxdata, - &s->buffers.ul[*slot][symbol*1272*4] + (1272/2)*4, - (1272/2) * 4); + memcpy(rxdata + 2048 - 1272/2, + &s->buffers.ul[antenna][*slot][symbol*1272*4], + (1272/2) * 4); + memcpy(rxdata, + &s->buffers.ul[antenna][*slot][symbol*1272*4] + (1272/2)*4, + (1272/2) * 4); #endif + } } - s->buffers.ul_busy[*slot] = 0; + s->buffers.ul_busy[0][*slot] = 0; + s->buffers.ul_busy[1][*slot] = 0; signal_ul_buffer(&s->buffers, *slot); unlock_ul_buffer(&s->buffers, *slot); @@ -281,43 +290,47 @@ void benetel_fh_if4p5_south_out(RU_t *ru, NR_DL_FRAME_PARMS *fp; int symbol; int32_t *txdata; - int aa = 0; + int aa; //printf("BENETEL: %s (f.sf %d.%d ts %ld)\n", __FUNCTION__, frame, slot, timestamp); lock_dl_buffer(&s->buffers, slot); - if (s->buffers.dl_busy[slot]) { + if (s->buffers.dl_busy[0][slot] || + s->buffers.dl_busy[1][slot]) { printf("%s: fatal: DL buffer busy for subframe %d\n", __FUNCTION__, slot); unlock_dl_buffer(&s->buffers, slot); return; } fp = ru->nr_frame_parms; - if (ru->num_gNB != 1 || ru->nb_tx != 1 || fp->ofdm_symbol_size != 2048 || + if (ru->num_gNB != 1 || fp->ofdm_symbol_size != 2048 || fp->Ncp != NORMAL || fp->symbols_per_slot != 14) { printf("%s:%d:%s: unsupported configuration\n", __FILE__, __LINE__, __FUNCTION__); exit(1); } - for (symbol = 0; symbol < 14; symbol++) { - txdata = &ru->common.txdataF_BF[aa][symbol * fp->ofdm_symbol_size]; + for (aa = 0; aa < ru->nb_tx; aa++) { + for (symbol = 0; symbol < 14; symbol++) { + txdata = &ru->common.txdataF_BF[aa][symbol * fp->ofdm_symbol_size]; #if 1 - memcpy(&s->buffers.dl[slot][symbol*1272*4], - txdata + 2048 - (1272/2), - (1272/2) * 4); - memcpy(&s->buffers.dl[slot][symbol*1272*4] + (1272/2)*4, - txdata, - (1272/2) * 4); + memcpy(&s->buffers.dl[aa][slot][symbol*1272*4], + txdata + 2048 - (1272/2), + (1272/2) * 4); + memcpy(&s->buffers.dl[aa][slot][symbol*1272*4] + (1272/2)*4, + txdata, + (1272/2) * 4); #endif - int i; - uint16_t *p = (uint16_t *)(&s->buffers.dl[slot][symbol*1272*4]); - for (i = 0; i < 1272*2; i++) { - p[i] = htons(p[i]); + int i; + uint16_t *p = (uint16_t *)(&s->buffers.dl[aa][slot][symbol*1272*4]); + for (i = 0; i < 1272*2; i++) { + p[i] = htons(p[i]); + } } } - s->buffers.dl_busy[slot] = 0x3fff; + s->buffers.dl_busy[0][slot] = 0x3fff; + s->buffers.dl_busy[1][slot] = 0x3fff; unlock_dl_buffer(&s->buffers, slot); } diff --git a/targets/ARCH/ETHERNET/benetel/5g/dpdk_driver.c b/targets/ARCH/ETHERNET/benetel/5g/dpdk_driver.c index dd50603ec544fc91868c1735d23dd3003863d404..88f4ecb4cdebde52d1f8ce2997ad34762c1b5364 100644 --- a/targets/ARCH/ETHERNET/benetel/5g/dpdk_driver.c +++ b/targets/ARCH/ETHERNET/benetel/5g/dpdk_driver.c @@ -243,21 +243,22 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs) } - if(PAYLOAD_1 == 0x13 && PAYLOAD_2 == 0xe4 && ANT_NUM == 0x00) { + if(PAYLOAD_1 == 0x13 && PAYLOAD_2 == 0xe4) { int subframe = SUBFRAME >> 4; int slot = ((SUBFRAME & 0x0f) << 2) | ((SYMBOL >> 6) & 0x03); p.frame = FRAME; p.slot = subframe * 2 + slot; p.symbol = SYMBOL & 0x3f; - p.antenna = 0; + p.antenna = ANT_NUM; memcpy(p.iq, IQ_ptr, 5088); store_ul(bs, &p); // if (p.symbol==0) printf("store ul f.sl.sy %d.%d.%d\n", p.frame, p.slot, p.symbol); } - // U-PLANE UL ANT_0 PROCESSING - if(PAYLOAD_1 == 0x13 && PAYLOAD_2 == 0xe4 && ANT_NUM == 0x00 && dl_start == 1) + // U-PLANE UL PROCESSING + if(PAYLOAD_1 == 0x13 && PAYLOAD_2 == 0xe4 && dl_start == 1) { + int a = ANT_NUM & 0x01; int frame = FRAME; int subframe = SUBFRAME >> 4; int slot = ((SUBFRAME & 0x0f) << 2) | ((SYMBOL >> 6) & 0x03); @@ -282,66 +283,45 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs) } } - ANT_NUM = 0x00; - // Mask the symbol bits from UL packet received and apply the shift. SYMBOL = ((SYMBOL & 0b00111111) + 10) % 14; - ANT_NUM = 0x00; + ANT_NUM = a; SUBFRAME = sf; + if (a == 1) + slot_id_ctrl++; + // Slot id control for DL - if(slot_id_ctrl > 13){ - SYMBOL = SYMBOL | 0b01000000; + if (slot_id_ctrl > 13) { + SYMBOL = SYMBOL | 0b01000000; + + if (a == 1) { + if (slot_id_ctrl > 27) { + slot_id_ctrl = 0; + sf = sf + 0x10; + + if (sf > 0x90){ + sf = 0; + } + } + } } - /* antenna 0 - send actual DL data (if available) */ + /* send actual DL data (if available) */ oai_slot = tx_subframe * 2 + tx_slot; lock_dl_buffer(bs->buffers, oai_slot); - if (!(bs->buffers->dl_busy[oai_slot] & (1 << tx_symbol))) { - printf("%s: warning, DL underflow (sl.symbol %d.%d)\n", __FUNCTION__, - oai_slot, tx_symbol); + if (!(bs->buffers->dl_busy[a][oai_slot] & (1 << tx_symbol))) { + printf("%s: warning, DL underflow (antenna %d sl.symbol %d.%d)\n", __FUNCTION__, + a, oai_slot, tx_symbol); memset(IQ_ptr, 0, 1272 * 4); } else { - memcpy(IQ_ptr, bs->buffers->dl[oai_slot] + tx_symbol * 1272*4, + memcpy(IQ_ptr, bs->buffers->dl[a][oai_slot] + tx_symbol * 1272*4, 1272*4); } //printf("DL buffer f sf slot symbol %d %d %d %d (sf %d)\n", tx_frame, tx_subframe, tx_slot, tx_symbol, (int)sf); - bs->buffers->dl_busy[oai_slot] &= ~(1 << tx_symbol); + bs->buffers->dl_busy[a][oai_slot] &= ~(1 << tx_symbol); unlock_dl_buffer(bs->buffers, oai_slot); - - // fill DL Data for ant 0 with 0 value -// memset(IQ_ptr, 0, 5088); - } - - // U-PLANE UL ANT_1 PROCESSING - if(PAYLOAD_1 == 0x13 && PAYLOAD_2 == 0xe4 && ANT_NUM == 0x01 && dl_start == 1) - { - - // Mask the symbol bits from UL packet received and apply the shift. - SYMBOL = ((SYMBOL & 0b00111111) +10) % 14; - - ANT_NUM = 0x01; - SUBFRAME = sf; - - slot_id_ctrl++; - - // Slot id control for DL - if(slot_id_ctrl > 13){ - SYMBOL = SYMBOL | 0b01000000; - - if(slot_id_ctrl > 27){ - slot_id_ctrl = 0; - sf = sf + 0x10; - - if (sf >0x90){ - sf = 0; - } - } - } - - // fill DL Data for ant 1 with 0 value - memset(IQ_ptr, 0, 5088); } // U-PLANE PRACH PROCESSING diff --git a/targets/ARCH/ETHERNET/benetel/5g/low.c b/targets/ARCH/ETHERNET/benetel/5g/low.c index 52c9f24127ce279d67b82cfa3f4fae4b22de852e..b34d69784f119db177c144c4d42542a798eccdd4 100644 --- a/targets/ARCH/ETHERNET/benetel/5g/low.c +++ b/targets/ARCH/ETHERNET/benetel/5g/low.c @@ -35,63 +35,61 @@ printf("store_ul %d.%ld (%ld)\n", (int)(t.tv_sec % 60), t.tv_nsec, t.tv_nsec - o old = t; #endif - /* only antenna 0 for the moment */ - if (ul->antenna != 0) - return; + int a = ul->antenna; - if (ul->slot != bs->next_slot || - ul->symbol != bs->next_symbol) { - printf("%s: error, expected frame.sl.symbol %d.%d.%d, got %d.%d.%d\n", + if (ul->slot != bs->next_slot[a] || + ul->symbol != bs->next_symbol[a]) { + printf("%s: error, antenna %d expected frame.sl.symbol %d.%d.%d, got %d.%d.%d\n", __FUNCTION__, - bs->expected_benetel_frame, bs->next_slot, bs->next_symbol, + a, bs->expected_benetel_frame[a], bs->next_slot[a], bs->next_symbol[a], ul->frame, ul->slot, ul->symbol); } /* fill missing data with 0s */ - while (ul->slot != bs->next_slot || - ul->symbol != bs->next_symbol) { - lock_ul_buffer(bs->buffers, bs->next_slot); - if (bs->buffers->ul_busy[bs->next_slot] & (1 << bs->next_symbol)) { - printf("%s: warning, UL overflow (sl.symbol %d.%d)\n", __FUNCTION__, - bs->next_slot, bs->next_symbol); + while (ul->slot != bs->next_slot[a] || + ul->symbol != bs->next_symbol[a]) { + lock_ul_buffer(bs->buffers, bs->next_slot[a]); + if (bs->buffers->ul_busy[a][bs->next_slot[a]] & (1 << bs->next_symbol[a])) { + printf("%s: warning, antenna %d UL overflow (sl.symbol %d.%d)\n", __FUNCTION__, + a, bs->next_slot[a], bs->next_symbol[a]); } - memset(bs->buffers->ul[bs->next_slot] + bs->next_symbol * 1272*4, + memset(bs->buffers->ul[a][bs->next_slot[a]] + bs->next_symbol[a] * 1272*4, 0, 1272*4); - bs->buffers->ul_busy[bs->next_slot] |= (1 << bs->next_symbol); - signal_ul_buffer(bs->buffers, bs->next_slot); - unlock_ul_buffer(bs->buffers, bs->next_slot); - - bs->next_symbol++; - if (bs->next_symbol == 14) { - bs->next_symbol = 0; - bs->next_slot = (bs->next_slot + 1) % 20; - if (bs->next_slot == 0) { - bs->expected_benetel_frame++; - bs->expected_benetel_frame &= 255; + bs->buffers->ul_busy[a][bs->next_slot[a]] |= (1 << bs->next_symbol[a]); + signal_ul_buffer(bs->buffers, bs->next_slot[a]); + unlock_ul_buffer(bs->buffers, bs->next_slot[a]); + + bs->next_symbol[a]++; + if (bs->next_symbol[a] == 14) { + bs->next_symbol[a] = 0; + bs->next_slot[a] = (bs->next_slot[a] + 1) % 20; + if (bs->next_slot[a] == 0) { + bs->expected_benetel_frame[a]++; + bs->expected_benetel_frame[a] &= 255; } } } - lock_ul_buffer(bs->buffers, bs->next_slot); - if (bs->buffers->ul_busy[bs->next_slot] & (1 << bs->next_symbol)) { - printf("%s: warning, UL overflow (sl.symbol %d.%d)\n", __FUNCTION__, - bs->next_slot, bs->next_symbol); + lock_ul_buffer(bs->buffers, bs->next_slot[a]); + if (bs->buffers->ul_busy[a][bs->next_slot[a]] & (1 << bs->next_symbol[a])) { + printf("%s: warning, antenna %d UL overflow (sl.symbol %d.%d)\n", __FUNCTION__, + a, bs->next_slot[a], bs->next_symbol[a]); } - memcpy(bs->buffers->ul[bs->next_slot] + bs->next_symbol * 1272*4, + memcpy(bs->buffers->ul[a][bs->next_slot[a]] + bs->next_symbol[a] * 1272*4, ul->iq, 1272*4); - bs->buffers->ul_busy[bs->next_slot] |= (1 << bs->next_symbol); - signal_ul_buffer(bs->buffers, bs->next_slot); - unlock_ul_buffer(bs->buffers, bs->next_slot); - - bs->next_symbol++; - if (bs->next_symbol == 14) { - bs->next_symbol = 0; - bs->next_slot = (bs->next_slot + 1) % 20; - if (bs->next_slot == 0) { - bs->expected_benetel_frame++; - bs->expected_benetel_frame &= 255; + bs->buffers->ul_busy[a][bs->next_slot[a]] |= (1 << bs->next_symbol[a]); + signal_ul_buffer(bs->buffers, bs->next_slot[a]); + unlock_ul_buffer(bs->buffers, bs->next_slot[a]); + + bs->next_symbol[a]++; + if (bs->next_symbol[a] == 14) { + bs->next_symbol[a] = 0; + bs->next_slot[a] = (bs->next_slot[a] + 1) % 20; + if (bs->next_slot[a] == 0) { + bs->expected_benetel_frame[a]++; + bs->expected_benetel_frame[a] &= 255; } } } diff --git a/targets/ARCH/ETHERNET/benetel/5g/low.h b/targets/ARCH/ETHERNET/benetel/5g/low.h index 5e1daee9d1ceaf005e957426526a752291ecaeda..659819296af298b3cdc86e99df4d64238e1c4671 100644 --- a/targets/ARCH/ETHERNET/benetel/5g/low.h +++ b/targets/ARCH/ETHERNET/benetel/5g/low.h @@ -26,9 +26,10 @@ typedef struct { shared_buffers *buffers; - int next_slot; - int next_symbol; - int expected_benetel_frame; + /* [2] is for two antennas */ + int next_slot[2]; + int next_symbol[2]; + int expected_benetel_frame[2]; char *dpdk_main_command_line; } benetel_t; diff --git a/targets/ARCH/ETHERNET/benetel/5g/low_dpdk.c b/targets/ARCH/ETHERNET/benetel/5g/low_dpdk.c index 5e26f6782ea737e0b6b18c23b39bc86a01d74839..b26df0772375afebb7cf327f8fd3546348ef4a08 100644 --- a/targets/ARCH/ETHERNET/benetel/5g/low_dpdk.c +++ b/targets/ARCH/ETHERNET/benetel/5g/low_dpdk.c @@ -68,7 +68,8 @@ void *benetel_start_dpdk(char *ifname, shared_buffers *buffers, char *dpdk_main_ bs->buffers = buffers; - bs->expected_benetel_frame = 255; + bs->expected_benetel_frame[0] = 255; + bs->expected_benetel_frame[1] = 255; bs->dpdk_main_command_line = dpdk_main_command_line; diff --git a/targets/ARCH/ETHERNET/benetel/5g/shared_buffers.c b/targets/ARCH/ETHERNET/benetel/5g/shared_buffers.c index b9da10b380687819a643f0593c152e6879ab9e69..a302400eb41c835e3820c5cb2ae6d5a375ef090c 100644 --- a/targets/ARCH/ETHERNET/benetel/5g/shared_buffers.c +++ b/targets/ARCH/ETHERNET/benetel/5g/shared_buffers.c @@ -45,11 +45,16 @@ void init_buffers(shared_buffers *s) * needs to have slots 1, 2 and 3, 4 and 5 ready. Let's pretend * they are ready. */ - s->dl_busy[1] = 0x3fff; - s->dl_busy[2] = 0x3fff; - s->dl_busy[3] = 0x3fff; - s->dl_busy[4] = 0x3fff; - s->dl_busy[5] = 0x3fff; + s->dl_busy[0][1] = 0x3fff; + s->dl_busy[0][2] = 0x3fff; + s->dl_busy[0][3] = 0x3fff; + s->dl_busy[0][4] = 0x3fff; + s->dl_busy[0][5] = 0x3fff; + s->dl_busy[1][1] = 0x3fff; + s->dl_busy[1][2] = 0x3fff; + s->dl_busy[1][3] = 0x3fff; + s->dl_busy[1][4] = 0x3fff; + s->dl_busy[1][5] = 0x3fff; } void lock_dl_buffer(shared_buffers *s, int slot) diff --git a/targets/ARCH/ETHERNET/benetel/5g/shared_buffers.h b/targets/ARCH/ETHERNET/benetel/5g/shared_buffers.h index ca7dbd9c8f92aef059813f721462812f8e87efc1..9d51b8138dafb5721462c730256c8db3e0d6095a 100644 --- a/targets/ARCH/ETHERNET/benetel/5g/shared_buffers.h +++ b/targets/ARCH/ETHERNET/benetel/5g/shared_buffers.h @@ -26,10 +26,11 @@ #include <stdint.h> typedef struct { - unsigned char dl[20][14*1272*4]; - unsigned char ul[20][14*1272*4]; - uint16_t dl_busy[20]; - uint16_t ul_busy[20]; + /* [2] is for two antennas */ + unsigned char dl[2][20][14*1272*4]; + unsigned char ul[2][20][14*1272*4]; + uint16_t dl_busy[2][20]; + uint16_t ul_busy[2][20]; pthread_mutex_t m_ul[20]; pthread_cond_t c_ul[20]; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-4g.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-4g.conf index 49b4e4441e298b5cb2283a5e5bccbff249630921..aab3876d96355f60c890815876e06132544b4809 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-4g.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-4g.conf @@ -230,12 +230,12 @@ RUs = ( local_if_name = "dpdk"; sdr_addrs = "softmodem -m 2048 -l 35 -n 2 -b 0000:81:00.3 --proc-type auto --file-prefix ggg -- -p 0x1"; #sdr_addrs = "softmodem -l 8 -n 2 -- -p 0x2"; - remote_address = "127.0.0.2"; - local_address = "127.0.0.1"; - local_portc = 50000; - remote_portc = 50000; - local_portd = 50001; - remote_portd = 50001; + #remote_address = "127.0.0.2"; + #local_address = "127.0.0.1"; + #local_portc = 50000; + #remote_portc = 50000; + #local_portd = 50001; + #remote_portd = 50001; local_rf = "no" tr_preference = "raw_if4p5" nb_tx = 1 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf index 037de199dfdc18af5e7f1df666d8d46f6e9e3e93..504d5e7b349d48fb9c047cbcd196d4da020158ee 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf @@ -23,6 +23,8 @@ gNBs = ssb_SubcarrierOffset = 31; //0; pdsch_AntennaPorts = 1; + #pusch_TargetSNRx10 = 200; + #pucch_TargetSNRx10 = 200; pusch_TargetSNRx10 = 200; pucch_TargetSNRx10 = 200; @@ -102,8 +104,9 @@ gNBs = prach_msg1_FDM = 0; prach_msg1_FrequencyStart = 74; zeroCorrelationZoneConfig = 13; - #preambleReceivedTargetPower = -118; - preambleReceivedTargetPower = -104; + preambleReceivedTargetPower = -118; + #preambleReceivedTargetPower = -104; + #preambleReceivedTargetPower = -108; #preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) preambleTransMax = 6; #powerRampingStep @@ -149,14 +152,16 @@ gNBs = initialULBWPstartSymbolAndLength_2 = 52; msg3_DeltaPreamble = 1; - p0_NominalWithGrant =-90; + #p0_NominalWithGrant =-90; + p0_NominalWithGrant =-118; # pucch-ConfigCommon setup : # pucchGroupHopping # 0 = neither, 1= group hopping, 2=sequence hopping pucchGroupHopping = 0; hoppingId = 40; - p0_nominal = -90; + #p0_nominal = -90; + p0_nominal = -118; # ssb_PositionsInBurs_BitmapPR # 1=short, 2=medium, 3=long ssb_PositionsInBurst_PR = 2; @@ -189,7 +194,7 @@ gNBs = nrofUplinkSymbols = 4; //0; //4; #ssPBCH_BlockPower = 10; - ssPBCH_BlockPower = 10; + ssPBCH_BlockPower = -35; } ); @@ -229,9 +234,9 @@ gNBs = { GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.18.195/24"; + GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.18.187/24"; GNB_INTERFACE_NAME_FOR_S1U = "eth0"; - GNB_IPV4_ADDRESS_FOR_S1U = "192.168.18.195/24"; + GNB_IPV4_ADDRESS_FOR_S1U = "192.168.18.187/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_IPV4_ADDRESS_FOR_X2C = "127.0.0.2/24"; GNB_PORT_FOR_X2C = 36422; # Spec 36422 @@ -251,6 +256,7 @@ L1s = ( { num_cc = 1; tr_n_preference = "local_mac"; + pusch_proc_threads = 8; } ); diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index 56c2cb23dd43114975300a5c41b160c38c6a8551..368fd78f9e8c01230ef5f957efb2398e64c03b32 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -2986,6 +2986,7 @@ void RCconfig_RU(void) { RC.ru[j]->if_south = LOCAL_RF; RC.ru[j]->function = NGFI_RRU_IF4p5; RC.ru[j]->eth_params.transp_preference = ETH_RAW_IF4p5_MODE; + RC.ru[j]->has_ctrl_prt =1; LOG_I(PHY,"Setting function for RU %d to NGFI_RRU_IF4p5 (raw)\n",j); } @@ -3039,6 +3040,7 @@ else { RC.ru[j]->if_south = REMOTE_IF4p5; RC.ru[j]->function = NGFI_RAU_IF4p5; RC.ru[j]->eth_params.transp_preference = ETH_RAW_IF4p5_MODE; + RC.ru[j]->has_ctrl_prt = 1; if (strcmp(*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr), "yes") == 0) RC.ru[j]->is_slave=1; else RC.ru[j]->is_slave=0;