mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-17 14:40:31 +00:00
Compare commits
8 Commits
pre-commit
...
benetel_dp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
411fdb455b | ||
|
|
5690260a55 | ||
|
|
6abc979caf | ||
|
|
f10c8e7e68 | ||
|
|
60b2897e59 | ||
|
|
72c73995cf | ||
|
|
015717c6ca | ||
|
|
ad7d03f944 |
@@ -936,8 +936,6 @@ set_target_properties(tcp_bridge_oai PROPERTIES COMPILE_FLAGS "-fvisibility=hidd
|
||||
######################################################################
|
||||
|
||||
|
||||
include_directories ("/usr/include/dpdk")
|
||||
|
||||
set(HWLIB_BENETEL_4G_SOURCE
|
||||
${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/4g/benetel.c
|
||||
${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/4g/shared_buffers.c
|
||||
@@ -947,9 +945,10 @@ set(HWLIB_BENETEL_4G_SOURCE
|
||||
)
|
||||
add_library(benetel_4g MODULE ${HWLIB_BENETEL_4G_SOURCE} )
|
||||
|
||||
set_target_properties(benetel_4g PROPERTIES COMPILE_FLAGS "-fvisibility=hidden -march=native -I$ENV{RTE_SDK}/$ENV{RTE_TARGET}/include")
|
||||
set_target_properties(benetel_4g PROPERTIES COMPILE_FLAGS "-fvisibility=hidden -march=native -I/usr/local/include")
|
||||
|
||||
SET(DPDK_LIBS "-Wl,-rpath,/usr/local/lib64 -L/usr/local/lib64 -ldl -lm -lnuma -lpcap -lrte_acl -lrte_bbdev -lrte_bitratestats -lrte_bpf -lrte_bus_dpaa -lrte_bus_fslmc -lrte_bus_ifpga -lrte_bus_pci -lrte_bus_vdev -lrte_bus_vmbus -lrte_cfgfile -lrte_cmdline -lrte_common_cpt -lrte_common_dpaax -lrte_common_iavf -lrte_common_octeontx -lrte_common_octeontx2 -lrte_compressdev -lrte_cryptodev -lrte_distributor -lrte_eal -lrte_efd -lrte_ethdev -lrte_eventdev -lrte_fib -lrte_flow_classify -lrte_graph -lrte_gro -lrte_gso -lrte_hash -lrte_ip_frag -lrte_ipsec -lrte_jobstats -lrte_kni -lrte_kvargs -lrte_latencystats -lrte_lpm -lrte_mbuf -lrte_member -lrte_mempool -lrte_mempool_bucket -lrte_mempool_dpaa -lrte_mempool_dpaa2 -lrte_mempool_octeontx -lrte_mempool_octeontx2 -lrte_mempool_ring -lrte_mempool_stack -lrte_meter -lrte_metrics -lrte_net -lrte_node -lrte_pci -lrte_pdump -lrte_pipeline -lrte_pmd_af_packet -lrte_pmd_ark -lrte_pmd_bbdev_fpga_5gnr_fec -lrte_pmd_bbdev_null -lrte_pmd_caam_jr -lrte_pmd_ccp -lrte_pmd_crypto_scheduler -lrte_pmd_dpaa2_event -lrte_pmd_dpaa2_sec -lrte_pmd_dpaa_event -lrte_pmd_dpaa_sec -lrte_pmd_dsw_event -lrte_pmd_hns3 -lrte_pmd_hpac_sdfec_pmd -lrte_pmd_iavf -lrte_pmd_ice -lrte_pmd_ifc -lrte_pmd_igc -lrte_pmd_ixgbe -lrte_pmd_kni -lrte_pmd_liquidio -lrte_pmd_memif -lrte_pmd_netvsc -lrte_pmd_nfp -lrte_pmd_nitrox -lrte_pmd_null -lrte_pmd_null_crypto -lrte_pmd_octeontx -lrte_pmd_octeontx2 -lrte_pmd_octeontx2_crypto -lrte_pmd_octeontx2_event -lrte_pmd_octeontx_compress -lrte_pmd_octeontx_crypto -lrte_pmd_octeontx_event -lrte_pmd_opdl_event -lrte_pmd_openssl -lrte_pmd_pcap -lrte_pmd_pfe -lrte_pmd_qat -lrte_pmd_qede -lrte_pmd_ring -lrte_pmd_sfc -lrte_pmd_skeleton_event -lrte_pmd_softnic -lrte_pmd_sw_event -lrte_pmd_tap -lrte_pmd_thunderx -lrte_pmd_vdev_netvsc -lrte_pmd_vhost -lrte_pmd_virtio -lrte_pmd_virtio_crypto -lrte_pmd_vmxnet3 -lrte_pmd_zlib -lrte_port -lrte_power -lrte_rawdev -lrte_rawdev_dpaa2_cmdif -lrte_rawdev_dpaa2_qdma -lrte_rawdev_ioat -lrte_rawdev_ntb -lrte_rawdev_octeontx2_dma -lrte_rawdev_octeontx2_ep -lrte_rawdev_skeleton -lrte_rcu -lrte_reorder -lrte_rib -lrte_ring -lrte_sched -lrte_security -lrte_stack -lrte_table -lrte_telemetry -lrte_timer -lrte_vhost -pthread")
|
||||
|
||||
SET(DPDK_LIBS "-Wl,-rpath,$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -Wl,--whole-archive -L$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -ldpdk -Wl,--no-whole-archive")
|
||||
TARGET_LINK_LIBRARIES(benetel_4g ${DPDK_LIBS})
|
||||
TARGET_LINK_LIBRARIES(benetel_4g pthread dl rt m numa)
|
||||
|
||||
@@ -967,7 +966,6 @@ add_library(benetel_5g MODULE ${HWLIB_BENETEL_5G_SOURCE} )
|
||||
|
||||
set_target_properties(benetel_5g PROPERTIES COMPILE_FLAGS "-fvisibility=hidden -march=native -I$ENV{RTE_SDK}/$ENV{RTE_TARGET}/include")
|
||||
|
||||
SET(DPDK_LIBS "-Wl,-rpath,$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -Wl,--whole-archive -L$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -ldpdk -Wl,--no-whole-archive")
|
||||
TARGET_LINK_LIBRARIES(benetel_5g ${DPDK_LIBS})
|
||||
TARGET_LINK_LIBRARIES(benetel_5g pthread dl rt m numa)
|
||||
|
||||
|
||||
@@ -88,10 +88,10 @@ static void gnb_main_gui(gnb_gui *e, gui *g, event_handler *h, void *database,
|
||||
widget_add_child(g, top_container, line, -1);
|
||||
|
||||
/* PUCCH/PUSCH IQ data */
|
||||
w = new_xy_plot(g, 55, 55, "", 50);
|
||||
w = new_xy_plot(g, 550, 550, "", 50);
|
||||
e->pucch_pusch_iq_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, -1000, 1000, -1000, 1000);
|
||||
xy_plot_set_range(g, w, -512, 512, -512, 512);
|
||||
xy_plot_set_title(g, w, "rxdataF");
|
||||
l = new_iqlog_full(h, database, "GNB_PHY_PUCCH_PUSCH_IQ", "rxdataF");
|
||||
v = new_view_xy(300*12*14,10,g,w,new_color(g,"#000"),XY_FORCED_MODE);
|
||||
@@ -115,6 +115,9 @@ int main(int n, char **v)
|
||||
|
||||
for (i = 1; i < n; i++) {
|
||||
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
|
||||
if (!strcmp(v[i], "-ip")) { if (i > n-2) usage(); ip = v[++i]; continue; }
|
||||
if (!strcmp(v[i], "-p"))
|
||||
{ if (i > n-2) usage(); port = atoi(v[++i]); continue; }
|
||||
if (!strcmp(v[i], "-d"))
|
||||
{ if (i > n-2) usage(); database_filename = v[++i]; continue; }
|
||||
usage();
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "common/utils/assertions.h"
|
||||
#include "common/utils/system.h"
|
||||
#include "common/ran_context.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
|
||||
#include "../../ARCH/COMMON/common_lib.h"
|
||||
#include "../../ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
||||
@@ -1272,12 +1273,12 @@ void *ru_thread( void *param ) {
|
||||
LOG_I(PHY,"Starting IF interface for RU %d\n",ru->idx);
|
||||
AssertFatal(ru->nr_start_if(ru,NULL) == 0, "Could not start the IF device\n");
|
||||
|
||||
if (ru->has_ctrl_prt > 0) {
|
||||
//if (ru->has_ctrl_prt > 0) {
|
||||
if (ru->if_south == LOCAL_RF) ret = connect_rau(ru);
|
||||
else ret = attach_rru(ru);
|
||||
|
||||
AssertFatal(ret==0,"Cannot connect to remote radio\n");
|
||||
}
|
||||
//}
|
||||
|
||||
}
|
||||
else if (ru->if_south == LOCAL_RF) { // configure RF parameters only
|
||||
@@ -1550,19 +1551,26 @@ int check_capabilities(RU_t *ru,RRU_capabilities_t *cap) {
|
||||
FH_fmt_options_t fmt = cap->FH_fmt;
|
||||
int i;
|
||||
int found_band=0;
|
||||
int band_table_idx=0;
|
||||
LOG_I(PHY,"RRU %d, num_bands %d, looking for band %d\n",ru->idx,cap->num_bands,ru->nr_frame_parms->nr_band);
|
||||
|
||||
for (i=0; i<cap->num_bands; i++) {
|
||||
LOG_I(PHY,"band %d on RRU %d\n",cap->band_list[i],ru->idx);
|
||||
LOG_I(PHY,"Checking if carrier freq and scs is in band %d on RRU %d\n",cap->band_list[i],ru->idx);
|
||||
|
||||
if (ru->nr_frame_parms->nr_band == cap->band_list[i]) {
|
||||
band_table_idx = get_nr_table_idx(cap->band_list[i], cap->scs_idx[i]);
|
||||
|
||||
if (ru->nr_frame_parms->ul_CarrierFreq/1000 >= nr_bandtable[band_table_idx].ul_min &&
|
||||
ru->nr_frame_parms->ul_CarrierFreq/1000 <= nr_bandtable[band_table_idx].ul_max &&
|
||||
ru->nr_frame_parms->dl_CarrierFreq/1000 >= nr_bandtable[band_table_idx].dl_min &&
|
||||
ru->nr_frame_parms->dl_CarrierFreq/1000 <= nr_bandtable[band_table_idx].dl_max &&
|
||||
ru->nr_frame_parms->numerology_index == cap->scs_idx[i]) {
|
||||
found_band=1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (found_band == 0) {
|
||||
LOG_I(PHY,"Couldn't find target NR band %d on RRU %d\n",ru->nr_frame_parms->nr_band,ru->idx);
|
||||
LOG_I(PHY,"Carrier Frequencies and/or SCS not supported on RRU %d\n",ru->idx);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
||||
@@ -151,15 +151,15 @@ int nr_phy_init_RU(RU_t *ru) {
|
||||
} // for p
|
||||
} //for i
|
||||
}
|
||||
|
||||
ru->common.beam_id = (uint8_t**)malloc16_clear(ru->nb_tx*sizeof(uint8_t*));
|
||||
for(i=0; i< ru->nb_tx; ++i) {
|
||||
ru->common.beam_id[i] = (uint8_t*)malloc16_clear(fp->symbols_per_slot*fp->slots_per_frame*sizeof(uint8_t));
|
||||
memset(ru->common.beam_id[i],255,fp->symbols_per_slot*fp->slots_per_frame);
|
||||
}
|
||||
}
|
||||
} // !=IF5
|
||||
|
||||
ru->common.beam_id = (uint8_t**)malloc16_clear(ru->nb_tx*sizeof(uint8_t*));
|
||||
for(i=0; i< ru->nb_tx; ++i) {
|
||||
ru->common.beam_id[i] = (uint8_t*)malloc16_clear(fp->symbols_per_slot*fp->slots_per_frame*sizeof(uint8_t));
|
||||
memset(ru->common.beam_id[i],255,fp->symbols_per_slot*fp->slots_per_frame);
|
||||
}
|
||||
|
||||
ru->common.sync_corr = (uint32_t*)malloc16_clear( LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(uint32_t)*fp->samples_per_subframe_wCP );
|
||||
|
||||
init_prach_ru_list(ru);
|
||||
|
||||
@@ -686,6 +686,8 @@ typedef struct RRU_capabilities_s {
|
||||
uint8_t num_bands;
|
||||
/// EUTRA band list supported by RRU
|
||||
uint8_t band_list[MAX_BANDS_PER_RRU];
|
||||
/// supported subcarrier spacing (0=15kHZ, 1=30kHz, etc)
|
||||
uint8_t scs_idx[MAX_BANDS_PER_RRU];
|
||||
/// Number of concurrent bands (component carriers)
|
||||
uint8_t num_concurrent_bands;
|
||||
/// Maximum TX EPRE of each band
|
||||
|
||||
@@ -2145,8 +2145,11 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
|
||||
const int subframe = proc->subframe_rx;
|
||||
const int frame = proc->frame_rx;
|
||||
/* TODO: use correct rxdata */
|
||||
T (T_ENB_PHY_INPUT_SIGNAL, T_INT (eNB->Mod_id), T_INT (frame), T_INT (subframe), T_INT (0),
|
||||
T_BUFFER (&eNB->RU_list[0]->common.rxdata[0][subframe * eNB->frame_parms.samples_per_tti], eNB->frame_parms.samples_per_tti * 4));
|
||||
|
||||
if (eNB->RU_list[0]->common.rxdata && eNB->RU_list[0]->common.rxdata[0]) {
|
||||
T (T_ENB_PHY_INPUT_SIGNAL, T_INT (eNB->Mod_id), T_INT (frame), T_INT (subframe), T_INT (0),
|
||||
T_BUFFER (&eNB->RU_list[0]->common.rxdata[0][subframe * eNB->frame_parms.samples_per_tti], eNB->frame_parms.samples_per_tti * 4));
|
||||
}
|
||||
|
||||
if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) return;
|
||||
|
||||
|
||||
@@ -812,7 +812,8 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
||||
}
|
||||
|
||||
if (pucch_decode_done || pusch_decode_done) {
|
||||
T(T_GNB_PHY_PUCCH_PUSCH_IQ, T_INT(frame_rx), T_INT(slot_rx), T_BUFFER(&gNB->common_vars.rxdataF[0][0], gNB->frame_parms.symbols_per_slot * gNB->frame_parms.ofdm_symbol_size * 4));
|
||||
//T(T_GNB_PHY_PUCCH_PUSCH_IQ, T_INT(frame_rx), T_INT(slot_rx), T_BUFFER(&gNB->common_vars.rxdataF[0][0], gNB->frame_parms.symbols_per_slot * gNB->frame_parms.ofdm_symbol_size * 4));
|
||||
T(T_GNB_PHY_PUCCH_PUSCH_IQ, T_INT(frame_rx), T_INT(slot_rx), T_BUFFER(&gNB->pusch_vars[0]->rxdataF_comp[0][0], gNB->frame_parms.symbols_per_slot * gNB->frame_parms.N_RB_UL * 12 * 4));
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_UESPEC_RX,0);
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "low.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "rte_version.h"
|
||||
|
||||
typedef struct {
|
||||
eth_state_t e;
|
||||
@@ -40,6 +41,7 @@ typedef struct {
|
||||
int trx_benetel_start(openair0_device *device)
|
||||
{
|
||||
printf("BENETEL: %s\n", __FUNCTION__);
|
||||
printf("DPDK Version %s\n", rte_version());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ static int mac_updating = 1;
|
||||
static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
|
||||
static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
|
||||
/* ethernet addresses of ports */
|
||||
static struct ether_addr l2fwd_ports_eth_addr[RTE_MAX_ETHPORTS];
|
||||
static struct rte_ether_addr l2fwd_ports_eth_addr[RTE_MAX_ETHPORTS];
|
||||
/* mask of enabled ports */
|
||||
static uint32_t l2fwd_enabled_port_mask = 0;
|
||||
/* list of enabled ports */
|
||||
@@ -149,7 +149,7 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs)
|
||||
{
|
||||
unsigned char *buf, *buf_tx;
|
||||
unsigned int len;
|
||||
struct ether_hdr *eth;
|
||||
struct rte_ether_hdr *eth;
|
||||
|
||||
unsigned dst_port;
|
||||
int sent, prach_ctrl = 0;
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "shared_buffers.h"
|
||||
#include "low.h"
|
||||
#include "openair1/PHY/defs_gNB.h"
|
||||
#include "rte_version.h"
|
||||
|
||||
typedef struct {
|
||||
eth_state_t e;
|
||||
@@ -39,6 +40,7 @@ typedef struct {
|
||||
int trx_benetel_start(openair0_device *device)
|
||||
{
|
||||
printf("BENETEL: %s\n", __FUNCTION__);
|
||||
printf("DPDK Version %s\n", rte_version());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -162,6 +164,7 @@ 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->scs_idx[0] = 1; //30kHz
|
||||
/* 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;
|
||||
|
||||
@@ -69,7 +69,7 @@ static int mac_updating = 1;
|
||||
static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
|
||||
static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
|
||||
/* ethernet addresses of ports */
|
||||
static struct ether_addr l2fwd_ports_eth_addr[RTE_MAX_ETHPORTS];
|
||||
static struct rte_ether_addr l2fwd_ports_eth_addr[RTE_MAX_ETHPORTS];
|
||||
/* mask of enabled ports */
|
||||
static uint32_t l2fwd_enabled_port_mask = 0;
|
||||
/* list of enabled ports */
|
||||
@@ -149,7 +149,7 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs)
|
||||
{
|
||||
unsigned char *buf, *buf_tx;
|
||||
unsigned int len;
|
||||
struct ether_hdr *eth;
|
||||
struct rte_ether_hdr *eth;
|
||||
|
||||
unsigned dst_port;
|
||||
int sent, prach_ctrl = 0;
|
||||
|
||||
@@ -49,11 +49,12 @@ old = t;
|
||||
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[a][bs->next_slot[a]] + bs->next_symbol[a] * 1272*4,
|
||||
0, 1272*4);
|
||||
bs->buffers->ul_busy[a][bs->next_slot[a]] |= (1 << bs->next_symbol[a]);
|
||||
@@ -72,10 +73,12 @@ old = t;
|
||||
}
|
||||
|
||||
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[a][bs->next_slot[a]] + bs->next_symbol[a] * 1272*4,
|
||||
ul->iq, 1272*4);
|
||||
@@ -106,7 +109,7 @@ void store_prach(benetel_t *bs, int frame, int slot, void *data)
|
||||
|
||||
lock_ul_buffer(bs->buffers, slot);
|
||||
if (bs->buffers->prach_busy[slot]) {
|
||||
printf("store_prach: fatal: previous prach buffer not processed\n");
|
||||
//printf("store_prach: fatal: previous prach buffer not processed\n");
|
||||
unlock_ul_buffer(bs->buffers, slot);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ gNBs =
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
ssb_SubcarrierOffset = 31; //0;
|
||||
ssb_SubcarrierOffset = 0; //31;
|
||||
pdsch_AntennaPorts = 1;
|
||||
pusch_AntennaPorts = 1;
|
||||
|
||||
@@ -48,7 +48,7 @@ gNBs =
|
||||
#initialDownlinkBWP
|
||||
#genericParameters
|
||||
# this is RBstart=84,L=13 (275*(L-1))+RBstart
|
||||
initialDLBWPlocationAndBandwidth = 6368;
|
||||
initialDLBWPlocationAndBandwidth = 6358;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialDLBWPsubcarrierSpacing = 1;
|
||||
@@ -77,7 +77,7 @@ gNBs =
|
||||
pMax = 20;
|
||||
#initialUplinkBWP
|
||||
#genericParameters
|
||||
initialULBWPlocationAndBandwidth = 6368;
|
||||
initialULBWPlocationAndBandwidth = 6358;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialULBWPsubcarrierSpacing = 1;
|
||||
|
||||
Reference in New Issue
Block a user