Commit 605975ea authored by Raymond Knopp's avatar Raymond Knopp

testing bronze version

parent 292c37be
...@@ -161,9 +161,9 @@ else() ...@@ -161,9 +161,9 @@ else()
set (XRAN_LIB_DIR /usr/local/xran) set (XRAN_LIB_DIR /usr/local/xran)
endif() endif()
set (XRAN_DIR $ENV{XRAN_LIB_DIR}/src) set (XRAN_DIR $ENV{XRAN_LIB_DIR}/../src)
set (XRAN_COMMON_DIR $ENV{XRAN_LIB_DIR}/../../test/common) set (XRAN_COMMON_DIR $ENV{XRAN_LIB_DIR}/../../test/common)
set (XRAN_LIB_API_DIR $ENV{XRAN_LIB_DIR}/api) set (XRAN_LIB_API_DIR $ENV{XRAN_LIB_DIR}/../api)
Message("XRAN_LIB_DIR: ${XRAN_LIB_DIR}, DPDK_DIR: ${DPDK_DIR}") Message("XRAN_LIB_DIR: ${XRAN_LIB_DIR}, DPDK_DIR: ${DPDK_DIR}")
project (OpenAirInterface) project (OpenAirInterface)
...@@ -620,7 +620,7 @@ target_link_libraries(benetel_5g PRIVATE asn1_nr_rrc asn1_lte_rrc) ...@@ -620,7 +620,7 @@ target_link_libraries(benetel_5g PRIVATE asn1_nr_rrc asn1_lte_rrc)
# ORAN 5G library # ORAN 5G library
###################################################################### ######################################################################
add_boolean_option(ORAN_BRONZE OFF "Build support for Bronze version of ORAN FHI") add_boolean_option(ORAN_BRONZE ON "Build support for Bronze version of ORAN FHI")
if (ORAN_BRONZE) if (ORAN_BRONZE)
set(ORAN_FHLIB_5G_SOURCE set(ORAN_FHLIB_5G_SOURCE
${OPENAIR_DIR}/radio/ETHERNET/oran/5g/sample-app-bronze.c ${OPENAIR_DIR}/radio/ETHERNET/oran/5g/sample-app-bronze.c
......
...@@ -752,6 +752,7 @@ function main() { ...@@ -752,6 +752,7 @@ function main() {
if [ "$TP" == "oran_fhlib_5g" ]; then if [ "$TP" == "oran_fhlib_5g" ]; then
compilations $BUILD_DIR oran_fhlib_5g compilations $BUILD_DIR oran_fhlib_5g
ln -sf liboran_fhlib_5g.so liboai_transpro.so ln -sf liboran_fhlib_5g.so liboai_transpro.so
ORAN_BRONZE=1
echo_info "liboai_transpro.so is linked to oran_fhlib_5G transport" echo_info "liboai_transpro.so is linked to oran_fhlib_5G transport"
fi fi
fi fi
......
...@@ -1198,7 +1198,7 @@ void *ru_thread( void *param ) { ...@@ -1198,7 +1198,7 @@ void *ru_thread( void *param ) {
} }
// synchronization on input FH interface, acquire signals/data and block // synchronization on input FH interface, acquire signals/data and block
LOG_I(PHY,"[RU_thread] read data: frame_rx = %d, tti_rx = %d\n", frame, slot); LOG_D(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); if (ru->fh_south_in) ru->fh_south_in(ru,&frame,&slot);
else AssertFatal(1==0, "No fronthaul interface at south port"); else AssertFatal(1==0, "No fronthaul interface at south port");
...@@ -1301,7 +1301,7 @@ void *ru_thread( void *param ) { ...@@ -1301,7 +1301,7 @@ void *ru_thread( void *param ) {
#ifndef USE_MSGQ #ifndef USE_MSGQ
pushTpool(&gNB->threadPool, res); pushTpool(&gNB->threadPool, res);
#else #else
// pushNotifiedFIFO(&gNB->resp_L1, res); pushNotifiedFIFO(&gNB->resp_L1, res);
#endif #endif
} }
......
...@@ -55,6 +55,7 @@ volatile uint32_t rx_cb_slot = 0; ...@@ -55,6 +55,7 @@ volatile uint32_t rx_cb_slot = 0;
#define GetFrameNum(tti,SFNatSecStart,numSubFramePerSystemFrame, numSlotPerSubFrame) ((((uint32_t)tti / ((uint32_t)numSubFramePerSystemFrame * (uint32_t)numSlotPerSubFrame)) + SFNatSecStart) & 0x3FF) #define GetFrameNum(tti,SFNatSecStart,numSubFramePerSystemFrame, numSlotPerSubFrame) ((((uint32_t)tti / ((uint32_t)numSubFramePerSystemFrame * (uint32_t)numSlotPerSubFrame)) + SFNatSecStart) & 0x3FF)
#define GetSlotNum(tti, numSlotPerSfn) ((uint32_t)tti % ((uint32_t)numSlotPerSfn)) #define GetSlotNum(tti, numSlotPerSfn) ((uint32_t)tti % ((uint32_t)numSlotPerSfn))
#define ORAN_BRONZE 1
#ifdef ORAN_BRONZE #ifdef ORAN_BRONZE
extern struct xran_fh_config xranConf; extern struct xran_fh_config xranConf;
int xran_is_prach_slot(uint32_t subframe_id, uint32_t slot_id); int xran_is_prach_slot(uint32_t subframe_id, uint32_t slot_id);
...@@ -97,7 +98,7 @@ void oai_xran_fh_rx_callback(void *pCallbackTag, xran_status_t status){ ...@@ -97,7 +98,7 @@ void oai_xran_fh_rx_callback(void *pCallbackTag, xran_status_t status){
first_rx_set = 1; first_rx_set = 1;
if (first_read_set == 1) { if (first_read_set == 1) {
slot2=slot+(subframe<<1); slot2=slot+(subframe<<1);
if (last_frame>0 && frame>0 && (slot2>0 && last_frame!=frame) || (slot2 ==0 && last_frame!=(frame-1))) if (last_frame>0 && frame>0 && (slot2>0 && last_frame!=frame) || (slot2 ==0 && last_frame!=((1024+frame-1)&1023)))
LOG_E(PHY,"Jump in frame counter last_frame %d => %d, slot %d\n",last_frame,frame,slot2); LOG_E(PHY,"Jump in frame counter last_frame %d => %d, slot %d\n",last_frame,frame,slot2);
if (last_slot == -1 || slot2 != last_slot) { if (last_slot == -1 || slot2 != last_slot) {
#ifndef USE_POLLING #ifndef USE_POLLING
...@@ -107,7 +108,8 @@ void oai_xran_fh_rx_callback(void *pCallbackTag, xran_status_t status){ ...@@ -107,7 +108,8 @@ void oai_xran_fh_rx_callback(void *pCallbackTag, xran_status_t status){
info->f = frame; info->f = frame;
LOG_D(PHY,"Push %d.%d (slot %d, subframe %d,last_slot %d)\n",frame,info->sl,slot,subframe,last_slot); LOG_D(PHY,"Push %d.%d (slot %d, subframe %d,last_slot %d)\n",frame,info->sl,slot,subframe,last_slot);
#else #else
LOG_I(PHY,"Writing %d.%d (slot %d, subframe %d,last_slot %d)\n",frame,slot2,slot,subframe,last_slot); LOG_D(PHY,"Writing %d.%d (slot %d, subframe %d,last_slot %d)\n",frame,slot2,slot,subframe,last_slot);
oran_sync_info.tti = tti;
oran_sync_info.sl = slot2; oran_sync_info.sl = slot2;
oran_sync_info.f = frame; oran_sync_info.f = frame;
#endif #endif
...@@ -228,18 +230,21 @@ int xran_fh_rx_read_slot(ru_info_t *ru, int *frame, int *slot){ ...@@ -228,18 +230,21 @@ int xran_fh_rx_read_slot(ru_info_t *ru, int *frame, int *slot){
*frame = info->f; *frame = info->f;
delNotifiedFIFO_elt(res); delNotifiedFIFO_elt(res);
#else #else
LOG_I(PHY,"In xran_fh_rx_read_slot, first_rx_set %d\n",first_rx_set); LOG_D(PHY,"In xran_fh_rx_read_slot, first_rx_set %d\n",first_rx_set);
while (first_rx_set ==0) {} while (first_rx_set ==0) {}
*slot = oran_sync_info.sl; *slot = oran_sync_info.sl;
LOG_I(PHY,"oran slot %d, last_slot %d\n",*slot,last_slot); *frame = oran_sync_info.f;
uint32_t tti_in=oran_sync_info.tti;
LOG_D(PHY,"oran slot %d, last_slot %d\n",*slot,last_slot);
int cnt=0; int cnt=0;
while (*slot == last_slot) { //while (*slot == last_slot) {
*slot = oran_sync_info.sl; while (tti_in == oran_sync_info.tti) {
//*slot = oran_sync_info.sl;
cnt++; cnt++;
} }
*frame = oran_sync_info.f; LOG_D(PHY,"cnt %d, Reading %d.%d\n",cnt,*frame,*slot);
LOG_I(PHY,"cnt %d, Reading %d.%d\n",cnt,*frame,*slot);
last_slot = *slot; last_slot = *slot;
#endif #endif
//return(0); //return(0);
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
*/ */
typedef struct { typedef struct {
uint32_t tti;
uint32_t sl; uint32_t sl;
uint32_t f; uint32_t f;
} oran_sync_info_t; } oran_sync_info_t;
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