Merge remote-tracking branch 'origin/develop' into develop-CSI

# Conflicts:
#	openair1/PHY/INIT/nr_init.c
#	openair1/PHY/INIT/nr_init_ue.c
#	openair1/PHY/NR_REFSIG/nr_gold.c
#	openair1/PHY/NR_TRANSPORT/nr_csi_rs.c
#	openair1/PHY/defs_nr_common.h
#	openair2/LAYER2/NR_MAC_gNB/config.c
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
This commit is contained in:
rmagueta
2022-03-28 13:32:46 +01:00
121 changed files with 1520 additions and 3273 deletions
-6
View File
@@ -1387,12 +1387,6 @@ int setup_RU_buffers(RU_t *ru) {
else if (frame_parms->N_RB_DL == 50) ru->N_TA_offset = 624/2;
else if (frame_parms->N_RB_DL == 25) ru->N_TA_offset = 624/4;
if(IS_SOFTMODEM_BASICSIM)
/* this is required for the basic simulator in TDD mode
* TODO: find a proper cleaner solution
*/
ru->N_TA_offset = 0;
if (frame_parms->N_RB_DL == 100) /* no scaling to do */;
else if (frame_parms->N_RB_DL == 50) {
ru->sf_extension /= 2;
+15 -17
View File
@@ -360,12 +360,6 @@ void init_UE(int nb_inst,
}
} else UE->N_TA_offset = 0;
if( IS_SOFTMODEM_BASICSIM)
/* this is required for the basic simulator in TDD mode
* TODO: find a proper cleaner solution
*/
UE->N_TA_offset = 0;
LOG_I(PHY,"Intializing UE Threads for instance %d (%p,%p)...\n",inst,PHY_vars_UE_g[inst],PHY_vars_UE_g[inst][0]);
init_UE_threads(inst);
@@ -883,7 +877,7 @@ static void *UE_thread_rxn_txnp4(void *arg)
proc->instance_cnt_rxtx--;
if ( IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM ) {
if (IS_SOFTMODEM_RFSIM) {
if (pthread_cond_signal(&proc->cond_rxtx) != 0) abort();
}
@@ -1998,12 +1992,6 @@ void *UE_thread(void *arg)
log_scheduler(__func__);
while (!oai_exit) {
if (IS_SOFTMODEM_BASICSIM)
while (!(UE->proc.instance_cnt_synch < 0)) {
printf("ue sync not ready\n");
usleep(500*1000);
}
AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), "");
int instance_cnt_synch = UE->proc.instance_cnt_synch;
int is_synchronized = UE->is_synchronized;
@@ -2011,8 +1999,18 @@ void *UE_thread(void *arg)
if (is_synchronized == 0) {
if (instance_cnt_synch < 0) { // we can invoke the synch
// grab 10 ms of signal and wakeup synch thread
// we shift in time flow because the UE doesn't detect sync when frame alignment is not easy
for (int i=0; i<UE->frame_parms.nb_antennas_rx; i++)
rxp[i] = (void *)&dummy_rx[i][0];
UE->rfdevice.trx_read_func(&UE->rfdevice,
&timestamp,
rxp,
UE->frame_parms.samples_per_tti/2,
UE->frame_parms.nb_antennas_rx);
// grab 10 ms of signal and wakeup synch thread
if (UE->mode != loop_through_memory) {
if (IS_SOFTMODEM_RFSIM ) {
for(int sf=0; sf<10; sf++) {
@@ -2121,7 +2119,7 @@ void *UE_thread(void *arg)
// update thread index for received subframe
UE->current_thread_id[sub_frame] = thread_idx;
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM ) {
if (IS_SOFTMODEM_RFSIM ) {
int t;
for (t = 0; t < 2; t++) {
@@ -2213,8 +2211,8 @@ void *UE_thread(void *arg)
LOG_E(PHY,"can't compensate: diff =%d\n", first_symbols);
}
/* no timeout in IS_SOFTMODEM_BASICSIM or IS_SOFTMODEM_RFSIM mode */
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM) {
/* no timeout in IS_SOFTMODEM_RFSIM mode */
if (IS_SOFTMODEM_RFSIM) {
ret = pthread_mutex_lock(&proc->mutex_rxtx);
} else {
struct timespec tv;
+1 -1
View File
@@ -519,7 +519,7 @@ int restart_L1L2(module_id_t enb_id) {
static void init_pdcp(int ue_id) {
uint32_t pdcp_initmask = (!IS_SOFTMODEM_NOS1) ? LINK_ENB_PDCP_TO_GTPV1U_BIT : (LINK_ENB_PDCP_TO_GTPV1U_BIT | PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT);
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM || (nfapi_getmode()==NFAPI_UE_STUB_PNF)) {
if (IS_SOFTMODEM_RFSIM || (nfapi_getmode()==NFAPI_UE_STUB_PNF)) {
pdcp_initmask = pdcp_initmask | UE_NAS_USE_TUN_BIT;
}