Commit 440e9a59 authored by Raymond Knopp's avatar Raymond Knopp

intermediate commit to test on another platform

parent 64be738e
......@@ -632,6 +632,7 @@ if (ORAN_BRONZE)
else()
set(ORAN_FHLIB_5G_SOURCE
${OPENAIR_DIR}/radio/ETHERNET/oran/5g/sample-app-G.c
${OPENAIR_DIR}/radio/ETHERNET/oran/5g/app_io_fh_xran-G.c
${OPENAIR_DIR}/radio/ETHERNET/oran/5g/common-G.c
${OPENAIR_DIR}/radio/ETHERNET/oran/5g/config-G.c
${OPENAIR_DIR}/radio/ETHERNET/oran/5g/oran_isolate.c
......@@ -651,7 +652,7 @@ set_target_properties(oran_fhlib_5g PROPERTIES COMPILE_FLAGS "-fvisibility=hidde
#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")
execute_process(
COMMAND bash -c "pkg-config --libs libdpdk | tr -d i '\n'| sed 's/[[:space:]]*$//'"
COMMAND bash -c "pkg-config --libs libdpdk --static | tr -d '\n'| sed 's/[[:space:]]*$//'"
OUTPUT_VARIABLE DPDK_LIBS
)
TARGET_LINK_LIBRARIES(oran_fhlib_5g PRIVATE ${DPDK_LIBS})
......
......@@ -1198,7 +1198,7 @@ void *ru_thread( void *param ) {
}
// synchronization on input FH interface, acquire signals/data and block
LOG_D(PHY,"[RU_thread] read data: frame_rx = %d, tti_rx = %d\n", frame, slot);
LOG_I(PHY,"[RU_thread] read data: frame_rx = %d, tti_rx = %d\n", frame, slot);
if (ru->fh_south_in) ru->fh_south_in(ru,&frame,&slot);
else AssertFatal(1==0, "No fronthaul interface at south port");
......@@ -1301,7 +1301,7 @@ void *ru_thread( void *param ) {
#ifndef USE_MSGQ
pushTpool(&gNB->threadPool, res);
#else
pushNotifiedFIFO(&gNB->resp_L1, res);
// pushNotifiedFIFO(&gNB->resp_L1, res);
#endif
}
......
......@@ -37,7 +37,9 @@
#include "xran_compression.h"
#include "xran_cp_api.h"
#include "xran_sync_api.h"
#if 0
#include "xran_mlog_task_id.h"
#endif
#include "app_io_fh_xran.h"
#ifdef FWK_ENABLED
#include "app_bbu_pool.h"
......@@ -195,6 +197,7 @@ app_io_xran_fh_rx_callback(void *pCallbackTag, xran_status_t status)
return;
}
oai_xran_fh_rx_callback(pCallbackTag, status);
if(sym == XRAN_FULL_CB_SYM) //full slot callback only
{
for(ant_id = 0; ant_id < xran_max_antenna_nr; ant_id++) {
......@@ -211,7 +214,6 @@ app_io_xran_fh_rx_callback(void *pCallbackTag, xran_status_t status)
}
}
}
oai_xran_rh_rx_callback(pCallbackTag, status);
rte_pause();
#if 0
MLogTask(PID_GNB_SYM_CB, t1, MLogTick());
......@@ -711,6 +713,10 @@ app_io_xran_interface(uint32_t o_xu_id, RuntimeConfig *p_o_xu_cfg, UsecaseConfig
} else {
xran_init_PrbMap_from_cfg(p_o_xu_cfg->p_PrbMapUl, ptr, p_o_xu_cfg->mtu);
}
for (int i=0;i<p_o_xu_cfg->p_PrbMapUl->nPrbElm;i++)
printf("IN %d.%d idxElm %d, p_pRbMapElm->nRBStart %d p_pRbMapElm->nRBSize %d\n",j,z,i,p_o_xu_cfg->p_PrbMapUl->prbMap[i].nRBStart,p_o_xu_cfg->p_PrbMapUl->prbMap[i].nRBSize);
for (int i=0;i<p_rb_map->nPrbElm;i++)
printf("OUT %d.%d idxElm %d, p_pRbMapElm->nRBStart %d p_pRbMapElm->nRBSize %d\n",j,z,i,p_rb_map->prbMap[i].nRBStart,p_rb_map->prbMap[i].nRBSize);
} else {
if(p_o_xu_cfg->RunSlotPrbMapEnabled) {
if(p_o_xu_cfg->RunSlotPrbMapBySymbolEnable){
......@@ -835,7 +841,7 @@ app_io_xran_interface(uint32_t o_xu_id, RuntimeConfig *p_o_xu_cfg, UsecaseConfig
psIoCtrl->sFHPrachRxBbuIoBufCtrl[j][i][z].sBufferList.pBuffers[k].nNumberOfElements = 1;
psIoCtrl->sFHPrachRxBbuIoBufCtrl[j][i][z].sBufferList.pBuffers[k].nOffsetInBytes = 0;
if (p_o_xu_cfg->appMode == APP_O_RU) {
// if (p_o_xu_cfg->appMode == APP_O_RU) {
status = xran_bm_allocate_buffer(psBbuIo->nInstanceHandle[o_xu_id][i],psBbuIo->nBufPoolIndex[o_xu_id][nSectorIndex[i]][eInterfaceType],&ptr, &mb);
if(XRAN_STATUS_SUCCESS != status) {
rte_panic("Failed at xran_bm_allocate_buffer, status %d\n",status);
......@@ -847,7 +853,7 @@ app_io_xran_interface(uint32_t o_xu_id, RuntimeConfig *p_o_xu_cfg, UsecaseConfig
memset(u32dptr, 0x0, PRACH_PLAYBACK_BUFFER_BYTES);
}
psIoCtrl->sFHPrachRxBbuIoBufCtrlDecomp[j][i][z].sBufferList.pBuffers[k].pData= (uint8_t *)ptr;
}
// }
}
}
}
......@@ -1157,7 +1163,6 @@ app_io_xran_ext_type11_populate(struct xran_prb_elm* p_pRbMapElm, char *p_tx_dl_
return status;
}
#if 0
int32_t
app_io_xran_iq_content_init_cp_rb_map(struct xran_prb_map* pRbMap,
enum xran_pkt_dir dir, int32_t cc_id, int32_t ant_id, int32_t sym_id, int32_t tti, uint16_t nRBs)
......@@ -1707,7 +1712,6 @@ app_io_xran_iq_content_init(uint32_t o_xu_id, RuntimeConfig *p_o_xu_cfg)
return 0;
}
#endif
void app_io_xran_if_stop(void)
{
......
This diff is collapsed.
......@@ -30,6 +30,8 @@
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "openair1/PHY/defs_gNB.h"
#include "common/utils/threadPool/thread-pool.h"
#include "oaioran.h"
typedef struct {
eth_state_t e;
......@@ -38,6 +40,7 @@ typedef struct {
void *oran_priv;
} oran_eth_state_t;
notifiedFIFO_t oran_sync_fifo;
int trx_oran_start(openair0_device *device)
{
......@@ -220,24 +223,25 @@ void oran_fh_if4p5_south_in(RU_t *ru,
extern uint16_t sl_ahead;
int f, sl;
int ret = xran_fh_rx_read_slot(&ru_info, &f, &sl, *frame, *slot, sync);
int ret = xran_fh_rx_read_slot(&ru_info, &f, &sl);
LOG_D(PHY,"Read %d.%d\n",f,sl);
if (ret != 0){
printf("ORAN: ORAN_fh_if4p5_south_in ERROR in RX function \n");
printf("ORAN: %d.%d ORAN_fh_if4p5_south_in ERROR in RX function \n",f,sl);
}
proc->tti_rx = sl;
proc->frame_rx = f;
proc->tti_tx = (sl+sl_ahead)%20;
proc->frame_tx = (sl>(19-sl_ahead)) ? (f+1)&1023 : f;
if (proc->first_rx == 0) {
if (proc->tti_rx != *slot) {
LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->frame_rx.proc->tti_rx %d.%d, slot %d)\n",proc->frame_rx,proc->tti_rx,*slot);
LOG_E(PHY,"Received Time doesn't correspond to the time we think it is (slot mismatch, received %d.%d, expected %d.%d)\n",proc->frame_rx,proc->tti_rx,*frame,*slot);
*slot = proc->tti_rx;
}
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 proc->tti_rx %d tti %d)\n",proc->frame_rx,*frame,proc->tti_rx,*slot);
LOG_E(PHY,"Received Time doesn't correspond to the time we think it is (frame mismatch, %d.%d , expected %d.%d)\n",proc->frame_rx,proc->tti_rx,*frame,*slot);
*frame=proc->frame_rx;
}
} else {
......@@ -303,6 +307,8 @@ void make_args(char **argv, int *argc, char *string)
}
*argc=i;
}
__attribute__((__visibility__("default")))
int transport_init(openair0_device *device,
openair0_config_t *openair0_cfg,
......@@ -348,44 +354,16 @@ int transport_init(openair0_device *device,
printf("ORAN: %s\n", __FUNCTION__);
// Check if the machine is PTP sync
check_xran_ptp_sync();
int argc;
char *argv[20]={0x0};
make_args(&argv,&argc,openair0_cfg->sdr_addrs);
/*
// SetUp
if ( setup_oran(s->oran_priv) !=0 ){
printf("%s:%d:%s: SetUp ORAN failed ... Exit\n",
__FILE__, __LINE__, __FUNCTION__);
ose
//c/xit(1);
}else{
printf("SetUp ORAN. Done\n");
}
// Check if the machine is PTP sync
check_xran_ptp_sync();
// Dump ORAN config
dump_oran_config(s->oran_priv);
// Register physide callbacks
register_physide_callbacks(s->oran_priv);
printf("Register physide callbacks. Done\n");
// Open callbacks
open_oran_callback(s->oran_priv);
printf("Open Oran callbacks. Done\n");
// Init ORAN
initialize_oran(s->oran_priv);
printf("Init Oran. Done\n");
// Open ORAN
open_oran(s->oran_priv);
printf("xran_open. Done\n");
*/
int argc;
char *argv[20]={0x0};
make_args(&argv,&argc,openair0_cfg->sdr_addrs);
for (int c=0;c<argc;c++)
printf("Running oran with param %d : %s\n",c,argv[c]);
printf("Running oran with param %d : %s\n",c,argv[c]);
initNotifiedFIFO(&oran_sync_fifo);
eth->oran_priv = oai_main(argc,argv);
// create message queues for ORAN sync
return 0;
}
......@@ -44,7 +44,7 @@ typedef struct ru_info_s{
int **prach_buf;
} ru_info_t;
int xran_fh_rx_read_slot(ru_info_t *ru, int *frame, int *slot, int oframe, int oslot, uint8_t sync);
int xran_fh_rx_read_slot(ru_info_t *ru, int *frame, int *slot);
int xran_fh_tx_send_slot(ru_info_t *ru, int frame, int slot, uint64_t timestamp);
......
......@@ -536,7 +536,7 @@ app_setup_o_xu_buffers(UsecaseConfig* p_use_cfg, RuntimeConfig* p_o_xu_cfg, str
//printf("numSlots=%u\n", p_o_xu_cfg->numSlots);
//getchar();
#if 0
p_iq->iq_playback_buffer_size_dl = (p_o_xu_cfg->numSlots * N_SYM_PER_SLOT * N_SC_PER_PRB *
app_xran_get_num_rbs(p_o_xu_cfg->xranTech, p_o_xu_cfg->mu_number,
......@@ -570,13 +570,14 @@ app_setup_o_xu_buffers(UsecaseConfig* p_use_cfg, RuntimeConfig* p_o_xu_cfg, str
if (p_iq->p_tx_play_buffer[i] == NULL)
exit(-1);
#if 0
p_iq->tx_play_buffer_size[i] = sys_load_file_to_buff(p_o_xu_cfg->ant_file[i],
"DL IFFT IN IQ Samples in binary format",
(uint8_t*)p_iq->p_tx_play_buffer[i],
p_iq->tx_play_buffer_size[i],
1);
}
#endif
}
if (p_o_xu_cfg->appMode == APP_O_DU && p_o_xu_cfg->xranCat == XRAN_CATEGORY_B) {
for (i = 0; i < MAX_ANT_CARRIER_SUPPORTED && i < (uint32_t)(p_o_xu_cfg->numCC * p_o_xu_cfg->numAxc); i++) {
......@@ -586,13 +587,14 @@ app_setup_o_xu_buffers(UsecaseConfig* p_use_cfg, RuntimeConfig* p_o_xu_cfg, str
if (p_iq->p_tx_dl_bfw_buffer[i] == NULL)
exit(-1);
#if 0
p_iq->tx_dl_bfw_buffer_size[i] = sys_load_file_to_buff(p_o_xu_cfg->dl_bfw_file[i],
"DL BF weights IQ Samples in binary format",
(uint8_t*) p_iq->p_tx_dl_bfw_buffer[i],
p_iq->tx_dl_bfw_buffer_size[i],
1);
}
#endif
}
}
if (p_o_xu_cfg->appMode == APP_O_DU && p_o_xu_cfg->xranCat == XRAN_CATEGORY_B) {
......@@ -603,12 +605,13 @@ app_setup_o_xu_buffers(UsecaseConfig* p_use_cfg, RuntimeConfig* p_o_xu_cfg, str
if (p_iq->p_tx_ul_bfw_buffer[i] == NULL)
exit(-1);
#if 0
p_iq->tx_ul_bfw_buffer_size[i] = sys_load_file_to_buff(p_o_xu_cfg->ul_bfw_file[i],
"UL BF weights IQ Samples in binary format",
(uint8_t*) p_iq->p_tx_ul_bfw_buffer[i],
p_iq->tx_ul_bfw_buffer_size[i],
1);
#endif
}
}
......@@ -621,12 +624,13 @@ app_setup_o_xu_buffers(UsecaseConfig* p_use_cfg, RuntimeConfig* p_o_xu_cfg, str
exit(-1);
memset(p_iq->p_tx_prach_play_buffer[i], 0, PRACH_PLAYBACK_BUFFER_BYTES);
#if 0
p_iq->tx_prach_play_buffer_size[i] = sys_load_file_to_buff(p_o_xu_cfg->prach_file[i],
"PRACH IQ Samples in binary format",
(uint8_t*) p_iq->p_tx_prach_play_buffer[i],
p_iq->tx_prach_play_buffer_size[i],
1);
#endif
p_iq->tx_prach_play_buffer_position[i] = 0;
}
}
......@@ -643,12 +647,13 @@ app_setup_o_xu_buffers(UsecaseConfig* p_use_cfg, RuntimeConfig* p_o_xu_cfg, str
exit(-1);
memset(p_iq->p_tx_srs_play_buffer[i], 0, p_iq->iq_srs_buffer_size_ul);
#if 0
p_iq->tx_srs_play_buffer_size[i] = sys_load_file_to_buff(p_o_xu_cfg->ul_srs_file[i],
"SRS IQ Samples in binary format",
(uint8_t*) p_iq->p_tx_srs_play_buffer[i],
p_iq->tx_srs_play_buffer_size[i],
1);
#endif
p_iq->tx_srs_play_buffer_position[i] = 0;
}
}
......@@ -719,7 +724,7 @@ app_setup_o_xu_buffers(UsecaseConfig* p_use_cfg, RuntimeConfig* p_o_xu_cfg, str
memset(p_iq->p_tx_ul_bfw_log_buffer[i], 0, p_iq->iq_bfw_buffer_size_ul);
}
}
#if 0
for (i = 0; i < MAX_ANT_CARRIER_SUPPORTED && i < (uint32_t)(p_o_xu_cfg->numCC * p_o_xu_cfg->numAxc); i++) {
snprintf(filename, sizeof(filename), "./logs/%s%d-play_ant%d.txt",((p_o_xu_cfg->appMode == APP_O_DU) ? "o-du" : "o-ru"), p_o_xu_cfg->o_xu_id, i);
......@@ -874,6 +879,7 @@ app_setup_o_xu_buffers(UsecaseConfig* p_use_cfg, RuntimeConfig* p_o_xu_cfg, str
}
}
}
#endif
#if 0
for (i = 0; i < MAX_ANT_CARRIER_SUPPORTED && i < (uint32_t)(p_o_xu_cfg->numCC * p_o_xu_cfg->numAxc); i++) {
......@@ -926,7 +932,6 @@ app_setup_o_xu_buffers(UsecaseConfig* p_use_cfg, RuntimeConfig* p_o_xu_cfg, str
}
}
#endif
#if 0
for (i = 0; i < MAX_ANT_CARRIER_SUPPORTED && i < (uint32_t)(p_o_xu_cfg->numCC * p_o_xu_cfg->numAxc); i++) {
......@@ -1327,9 +1332,9 @@ void *oai_main(int argc, char *argv[])
nActiveCoreMask[0] |= ((1 << app_io_xran_fh_init.io_cfg.timing_core) | app_io_xran_fh_init.io_cfg.pkt_proc_core);
nActiveCoreMask[1] |= app_io_xran_fh_init.io_cfg.pkt_proc_core_64_127;
#if 0
MLogSetup(nActiveCoreMask[0], nActiveCoreMask[1], nActiveCoreMask[2], nActiveCoreMask[3]);
#endif
for (o_xu_id = 0; o_xu_id < p_usecaseConfiguration->oXuNum; o_xu_id++) {
RuntimeConfig* p_o_xu_cfg = p_startupConfiguration[o_xu_id];
totalCC += p_o_xu_cfg->numCC;
......@@ -1370,9 +1375,7 @@ void *oai_main(int argc, char *argv[])
}
if (app_io_xran_interface(o_xu_id, p_startupConfiguration[o_xu_id], p_usecaseConfiguration, &app_io_xran_fh_init) != 0)
exit(-1);
#if 0
app_io_xran_iq_content_init(o_xu_id, p_startupConfiguration[o_xu_id]);
#endif
#ifdef FWK_ENABLED
if(p_o_xu_cfg->appMode == APP_O_DU && p_usecaseConfiguration->bbu_offload) {
if ((xret = xran_reg_physide_cb(app_io_xran_handle, app_bbu_dl_tti_call_back, NULL, 10, XRAN_CB_TTI)) != XRAN_STATUS_SUCCESS) {
......
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