Commit adaa8e13 authored by Raymond Knopp's avatar Raymond Knopp

debugging of DCI indication and UE-FAPI interface

parent 597519f6
...@@ -2558,8 +2558,8 @@ target_link_libraries(ldpctest SIMU PHY PHY_NR m ${ATLAS_LIBRARIES}) ...@@ -2558,8 +2558,8 @@ target_link_libraries(ldpctest SIMU PHY PHY_NR m ${ATLAS_LIBRARIES})
add_executable(nr_pbchsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c ${T_SOURCE}) add_executable(nr_pbchsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c ${T_SOURCE})
target_link_libraries(nr_pbchsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl) target_link_libraries(nr_pbchsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl)
add_executable(nr_dlsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlsim.c ${T_SOURCE}) add_executable(nr_dlsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlsim.c ${T_SOURCE})
target_link_libraries(nr_dlsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl) target_link_libraries(nr_dlsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR RRC_LIB NR_RRC_LIB CONFIG_LIB L2_NR -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl)
foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim) foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim)
......
...@@ -3,11 +3,11 @@ set(PACKAGE_NAME "unitary_tests_simulators") ...@@ -3,11 +3,11 @@ set(PACKAGE_NAME "unitary_tests_simulators")
set(PHYSIM True) set(PHYSIM True)
set(RF_BOARD None) set(RF_BOARD None)
set(XFORMS True) set(XFORMS True)
set(ENABLE_ITTI False) set(ENABLE_ITTI True)
set(DEBUG_PHY False) set(DEBUG_PHY False)
set(MU_RECIEVER False) set(MU_RECIEVER False)
set(NAS_UE False) set(NAS_UE False)
set(MESSAGE_CHART_GENERATOR False) set(MESSAGE_CHART_GENERATOR False)
set(RRC_ASN1_VERSION "Rel14") set(RRC_ASN1_VERSION "Rel15")
set(T_TRACER True) set(T_TRACER True)
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt) include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
This diff is collapsed.
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include "NR_PHY_INTERFACE/NR_IF_Module.h" #include "NR_PHY_INTERFACE/NR_IF_Module.h"
#include "NR_UE_PHY_INTERFACE/NR_IF_Module.h" #include "NR_UE_PHY_INTERFACE/NR_IF_Module.h"
PHY_VARS_gNB *gNB; PHY_VARS_gNB *gNB;
PHY_VARS_NR_UE *UE; PHY_VARS_NR_UE *UE;
RAN_CONTEXT_t RC; RAN_CONTEXT_t RC;
...@@ -105,6 +106,7 @@ void config_common(int Mod_idP, ...@@ -105,6 +106,7 @@ void config_common(int Mod_idP,
uint32_t dl_BandwidthP uint32_t dl_BandwidthP
); );
// needed for some functions // needed for some functions
PHY_VARS_NR_UE ***PHY_vars_UE_g; PHY_VARS_NR_UE ***PHY_vars_UE_g;
uint16_t conjugate[8]__attribute__((aligned(32))) = {-1,1,-1,1,-1,1,-1,1}; uint16_t conjugate[8]__attribute__((aligned(32))) = {-1,1,-1,1,-1,1,-1,1};
...@@ -475,7 +477,7 @@ int main(int argc, char **argv) ...@@ -475,7 +477,7 @@ int main(int argc, char **argv)
memcpy(&UE->frame_parms,frame_parms,sizeof(NR_DL_FRAME_PARMS)); memcpy(&UE->frame_parms,frame_parms,sizeof(NR_DL_FRAME_PARMS));
if (run_initial_sync==1) UE->is_synchronized = 0; if (run_initial_sync==1) UE->is_synchronized = 0;
else UE->is_synchronized = 1; else {UE->is_synchronized = 1; UE->UE_mode[0]=PUSCH;}
UE->perfect_ce = 0; UE->perfect_ce = 0;
...@@ -500,7 +502,7 @@ int main(int argc, char **argv) ...@@ -500,7 +502,7 @@ int main(int argc, char **argv)
UE->if_inst = nr_ue_if_module_init(0); UE->if_inst = nr_ue_if_module_init(0);
UE->if_inst->scheduled_response = nr_ue_scheduled_response; UE->if_inst->scheduled_response = nr_ue_scheduled_response;
UE->if_inst->phy_config_request = nr_ue_phy_config_request; UE->if_inst->phy_config_request = nr_ue_phy_config_request;
UE->if_inst->dl_indication = dummy_nr_ue_dl_indication; UE->if_inst->dl_indication = nr_ue_dl_indication;
UE->if_inst->ul_indication = dummy_nr_ue_ul_indication; UE->if_inst->ul_indication = dummy_nr_ue_ul_indication;
...@@ -582,6 +584,13 @@ int main(int argc, char **argv) ...@@ -582,6 +584,13 @@ int main(int argc, char **argv)
//Configure UE //Configure UE
rrc_gNB_carrier_data_t carrier;
uint32_t pdcch_ConfigSIB1 = 0;
uint32_t ssb_SubcarrierOffset = 0;
carrier.MIB = (uint8_t*) malloc(4);
carrier.sizeof_MIB = do_MIB_NR(&carrier,0,ssb_SubcarrierOffset,pdcch_ConfigSIB1,30,2);
nr_rrc_mac_config_req_ue(0,0,0,carrier.mib.message.choice.mib,NULL,NULL,NULL);
fapi_nr_dl_config_request_t dl_config; fapi_nr_dl_config_request_t dl_config;
// Type0 PDCCH search space // Type0 PDCCH search space
dl_config.number_pdus = 1; dl_config.number_pdus = 1;
......
This diff is collapsed.
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include <asn_application.h> #include <asn_application.h>
#include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */ #include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */
#include <per_encoder.h> #include <per_encoder.h>
//#include "COMMON/messages_types.h"
#include "assertions.h" #include "assertions.h"
#include "RRCConnectionRequest.h" #include "RRCConnectionRequest.h"
#include "UL-CCCH-Message.h" #include "UL-CCCH-Message.h"
......
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#include "asn1_msg.h" #include "asn1_msg.h"
#include "RRC/NR/nr_rrc_extern.h" #include "RRC/NR/nr_rrc_extern.h"
#if defined(NR_Rel15) #if defined(NR_Rel15)
#include "NR_SCS-SpecificCarrier.h" #include "NR_SCS-SpecificCarrier.h"
#include "NR_TDD-UL-DL-ConfigCommon.h" #include "NR_TDD-UL-DL-ConfigCommon.h"
......
...@@ -634,7 +634,7 @@ static void *UE_thread_rxn_txnp4(void *arg) { ...@@ -634,7 +634,7 @@ static void *UE_thread_rxn_txnp4(void *arg) {
proc->instance_cnt_rxtx=-1; proc->instance_cnt_rxtx=-1;
proc->subframe_rx=proc->sub_frame_start; proc->subframe_rx=proc->sub_frame_start;
proc->dci_err_cnt=0; proc->dci_err_cnt=0;
char threadname[256]; char threadname[256];
sprintf(threadname,"UE_%d_proc_%d", UE->Mod_id, proc->sub_frame_start); sprintf(threadname,"UE_%d_proc_%d", UE->Mod_id, proc->sub_frame_start);
cpu_set_t cpuset; cpu_set_t cpuset;
...@@ -1114,42 +1114,42 @@ void *UE_thread(void *arg) { ...@@ -1114,42 +1114,42 @@ void *UE_thread(void *arg) {
// pickStaticTime(lastTime); // pickStaticTime(lastTime);
} //UE->mode != loop_through_memory } //UE->mode != loop_through_memory
else { else {
proc->nr_tti_rx=subframe_nr; proc->nr_tti_rx=subframe_nr;
proc->subframe_rx=subframe_nr; proc->subframe_rx=subframe_nr;
if(subframe_nr == 0) { if(subframe_nr == 0) {
for (th_id=0; th_id < RX_NB_TH; th_id++) { for (th_id=0; th_id < RX_NB_TH; th_id++) {
UE->proc.proc_rxtx[th_id].frame_rx++; UE->proc.proc_rxtx[th_id].frame_rx++;
}
} }
proc->frame_tx = proc->frame_rx; }
proc->nr_tti_tx= subframe_nr + DURATION_RX_TO_TX; proc->frame_tx = proc->frame_rx;
if (proc->nr_tti_tx > NR_NUMBER_OF_SUBFRAMES_PER_FRAME) { proc->nr_tti_tx= subframe_nr + DURATION_RX_TO_TX;
proc->frame_tx = (proc->frame_tx + 1)%MAX_FRAME_NUMBER; if (proc->nr_tti_tx > NR_NUMBER_OF_SUBFRAMES_PER_FRAME) {
proc->nr_tti_tx %= NR_NUMBER_OF_SUBFRAMES_PER_FRAME; proc->frame_tx = (proc->frame_tx + 1)%MAX_FRAME_NUMBER;
} proc->nr_tti_tx %= NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
proc->subframe_tx=proc->nr_tti_tx; }
proc->subframe_tx=proc->nr_tti_tx;
printf("Processing subframe %d\n",proc->subframe_rx);
printf("Processing subframe %d\n",proc->subframe_rx);
if(UE->if_inst != NULL && UE->if_inst->ul_indication != NULL){
UE->ul_indication.module_id = 0; if(UE->if_inst != NULL && UE->if_inst->ul_indication != NULL){
UE->ul_indication.gNB_index = 0; UE->ul_indication.module_id = 0;
UE->ul_indication.cc_id = 0; UE->ul_indication.gNB_index = 0;
UE->ul_indication.slot = 0; // to be fill UE->ul_indication.cc_id = 0;
UE->ul_indication.frame = 0; // to be fill UE->ul_indication.slot = 0; // to be fill
// [TODO] mapping right after NR initial sync UE->ul_indication.frame = 0; // to be fill
UE->ul_indication.frame = proc->frame_rx; // [TODO] mapping right after NR initial sync
UE->ul_indication.slot = proc->nr_tti_rx; UE->ul_indication.frame = proc->frame_rx;
UE->ul_indication.slot = proc->nr_tti_rx;
UE->if_inst->ul_indication(&UE->ul_indication);
} UE->if_inst->ul_indication(&UE->ul_indication);
}
phy_procedures_nrUE_RX( UE, proc, 0, 1, UE->mode);
getchar(); phy_procedures_nrUE_RX( UE, proc, 0, 1, UE->mode);
getchar();
} // else loop_through_memory } // else loop_through_memory
} // start_rx_stream==1 } // start_rx_stream==1
} // UE->is_synchronized==1 } // UE->is_synchronized==1
} // while !oai_exit } // while !oai_exit
return NULL; return NULL;
} }
......
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