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

testing bronze version

parent 292c37be
......@@ -161,9 +161,9 @@ else()
set (XRAN_LIB_DIR /usr/local/xran)
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_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}")
project (OpenAirInterface)
......@@ -620,7 +620,7 @@ target_link_libraries(benetel_5g PRIVATE asn1_nr_rrc asn1_lte_rrc)
# 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)
set(ORAN_FHLIB_5G_SOURCE
${OPENAIR_DIR}/radio/ETHERNET/oran/5g/sample-app-bronze.c
......
......@@ -752,6 +752,7 @@ function main() {
if [ "$TP" == "oran_fhlib_5g" ]; then
compilations $BUILD_DIR oran_fhlib_5g
ln -sf liboran_fhlib_5g.so liboai_transpro.so
ORAN_BRONZE=1
echo_info "liboai_transpro.so is linked to oran_fhlib_5G transport"
fi
fi
......
......@@ -1198,7 +1198,7 @@ void *ru_thread( void *param ) {
}
// 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);
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
}
......
......@@ -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 GetSlotNum(tti, numSlotPerSfn) ((uint32_t)tti % ((uint32_t)numSlotPerSfn))
#define ORAN_BRONZE 1
#ifdef ORAN_BRONZE
extern struct xran_fh_config xranConf;
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){
first_rx_set = 1;
if (first_read_set == 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);
if (last_slot == -1 || slot2 != last_slot) {
#ifndef USE_POLLING
......@@ -107,7 +108,8 @@ void oai_xran_fh_rx_callback(void *pCallbackTag, xran_status_t status){
info->f = frame;
LOG_D(PHY,"Push %d.%d (slot %d, subframe %d,last_slot %d)\n",frame,info->sl,slot,subframe,last_slot);
#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.f = frame;
#endif
......@@ -228,18 +230,21 @@ int xran_fh_rx_read_slot(ru_info_t *ru, int *frame, int *slot){
*frame = info->f;
delNotifiedFIFO_elt(res);
#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) {}
*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;
while (*slot == last_slot) {
*slot = oran_sync_info.sl;
//while (*slot == last_slot) {
while (tti_in == oran_sync_info.tti) {
//*slot = oran_sync_info.sl;
cnt++;
}
*frame = oran_sync_info.f;
LOG_I(PHY,"cnt %d, Reading %d.%d\n",cnt,*frame,*slot);
LOG_D(PHY,"cnt %d, Reading %d.%d\n",cnt,*frame,*slot);
last_slot = *slot;
#endif
//return(0);
......
......@@ -20,6 +20,7 @@
*/
typedef struct {
uint32_t tti;
uint32_t sl;
uint32_t f;
} 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