Remove basic simulator

The basic simulator can be replaced with the RF simulator. Use option
--rfsim.
This commit is contained in:
Robert Schmidt
2022-03-17 08:25:16 +01:00
parent 5be1825361
commit 57cfd7bc32
50 changed files with 109 additions and 2001 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;
+4 -16
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;
@@ -2121,7 +2109,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 +2201,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;
}