+
+
+
+
+
+ |
+
+ Running L3 ITTI simulator
+ |
+
+
+
+This page is valid on the following branches:
+
+- `develop` starting from tag `2020.w48`
+
+# 1. Building the ITTI simulator.
+
+The ITTI simulator is available directly from the standard build.
+
+```bash
+$ source oaienv
+$ cd cmake_targets
+$ sudo ./build_oai -x -w None -c -ittiSIM
+```
+
+# 2. Running the ITTI simulator.
+
+The ITTI simulator establishes ITTI-threaded communication between the gNB RRC task and the UE RRC task.
+
+This allows to test the sequence of NGAP/RRC/NAS messages.
+
+The main limitations are:
+
+- NAS is a simple stub that just sends and receives messages
+- only initial Attach sequence
+
+## 2.1. Starting the ITTI simulator
+
+The ITTI simulator is able to run with a connected 5GC or without any.
+The develop branch tag `2020.w48` only works RRC without 5GC connection.
+
+```bash
+$ sudo -E ./ran_build/build/nr-ittisim -O gnb.conf
+```
+
diff --git a/doc/SW_archi.md b/doc/SW_archi.md
index 412dad402d..d92f802148 100644
--- a/doc/SW_archi.md
+++ b/doc/SW_archi.md
@@ -186,7 +186,7 @@ development], for FR2 does not exist yet.
3) allocate a CCE for the UE (and return if it is not possible)
4) Calculate DMRS stuff (nr_save_pusch_fields()) and the TBS.
5) Mark used resources in vrb_map_UL.
-* loop through all users: get a free HARQ PID using select_ul_harq_pid() and
+* loop through all users: get a free HARQ PID and
update statistics. Fill nFAPI structures directly for PUSCH, and call
config_uldci() and fill_dci_pdu_rel15() for DCI filling and PDCCH messages.
diff --git a/executables/main-ocp.c b/executables/main-ocp.c
index 39e7b558ac..ae1db7195b 100644
--- a/executables/main-ocp.c
+++ b/executables/main-ocp.c
@@ -74,6 +74,7 @@ int config_sync_var=-1;
volatile int oai_exit = 0;
double cpuf;
uint16_t sf_ahead=4;
+//uint16_t slot_ahead=6;
int otg_enabled;
uint64_t downlink_frequency[MAX_NUM_CCs][4];
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c
index be9261a117..cd1bfd14b6 100644
--- a/executables/nr-gnb.c
+++ b/executables/nr-gnb.c
@@ -84,7 +84,7 @@
#include "T.h"
-
+#include "nfapi/oai_integration/vendor_ext.h"
//#define DEBUG_THREADS 1
//#define USRP_DEBUG 1
@@ -137,6 +137,7 @@ void wakeup_prach_gNB(PHY_VARS_gNB *gNB, RU_t *ru, int frame, int subframe);
extern uint8_t nfapi_mode;
extern void oai_subframe_ind(uint16_t sfn, uint16_t sf);
+extern void oai_slot_ind(uint16_t sfn, uint16_t slot);
extern void add_subframe(uint16_t *frameP, uint16_t *subframeP, int offset);
//#define TICK_TO_US(ts) (ts.diff)
@@ -151,13 +152,14 @@ static inline int rxtx(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int frame_t
// *******************************************************************
// NFAPI not yet supported for NR - this code has to be revised
- if (nfapi_mode == 1) {
+ if (NFAPI_MODE == NFAPI_MODE_PNF) {
// I am a PNF and I need to let nFAPI know that we have a (sub)frame tick
//add_subframe(&frame, &subframe, 4);
//oai_subframe_ind(proc->frame_tx, proc->subframe_tx);
//LOG_D(PHY, "oai_subframe_ind(frame:%u, subframe:%d) - NOT CALLED ********\n", frame, subframe);
start_meas(&nfapi_meas);
- oai_subframe_ind(frame_rx, slot_rx);
+ // oai_subframe_ind(frame_rx, slot_rx);
+ oai_slot_ind(frame_rx, slot_rx);
stop_meas(&nfapi_meas);
/*if (gNB->UL_INFO.rx_ind.rx_indication_body.number_of_pdus||
@@ -873,10 +875,7 @@ void init_gNB_proc(int inst) {
gNB->threadPool = (tpool_t*)malloc(sizeof(tpool_t));
gNB->respDecode = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
int numCPU = sysconf(_SC_NPROCESSORS_ONLN);
- uint32_t num_threads_pusch;
- paramdef_t PUSCHThreads[] = NUM_THREADS_DESC;
- config_get( PUSCHThreads,sizeof(PUSCHThreads)/sizeof(paramdef_t),NULL);
- int threadCnt = min(numCPU, num_threads_pusch);
+ int threadCnt = min(numCPU, gNB->pusch_proc_threads);
char ul_pool[80];
sprintf(ul_pool,"-1");
int s_offset = 0;
diff --git a/executables/nr-ru.c b/executables/nr-ru.c
index feff0c29c2..73421d8ed7 100644
--- a/executables/nr-ru.c
+++ b/executables/nr-ru.c
@@ -114,6 +114,7 @@ int attach_rru(RU_t *ru);
int connect_rau(RU_t *ru);
uint16_t sf_ahead;
+uint16_t slot_ahead;
uint16_t sl_ahead;
extern int emulate_rf;
diff --git a/executables/nr-softmodem-common.h b/executables/nr-softmodem-common.h
index c968fee7b6..500819e684 100644
--- a/executables/nr-softmodem-common.h
+++ b/executables/nr-softmodem-common.h
@@ -77,6 +77,7 @@
#define CONFIG_HLP_UE "Set the lte softmodem as a UE\n"
#define CONFIG_HLP_L2MONW "Enable L2 wireshark messages on localhost \n"
#define CONFIG_HLP_L2MONP "Enable L2 pcap messages on localhost \n"
+#define CONFIG_HLP_MAC "Disable the MAC procedures at UE side (default is enabled)\n"
#define CONFIG_HLP_VCD "Enable VCD (generated file will is named openair_dump_eNB.vcd, read it with target/RT/USER/eNB.gtkw\n"
#define CONFIG_HLP_TQFS "Apply three-quarter of sampling frequency, 23.04 Msps to reduce the data rate on USB/PCIe transfers (only valid for 20 MHz)\n"
#define CONFIG_HLP_TPORT "tracer port\n"
diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c
index 463c102d06..19491b4dfa 100644
--- a/executables/nr-softmodem.c
+++ b/executables/nr-softmodem.c
@@ -87,13 +87,13 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "gnb_paramdef.h"
#include "f1ap_cu_task.h"
#include "f1ap_du_task.h"
-
+#include "nfapi/oai_integration/vendor_ext.h"
pthread_cond_t nfapi_sync_cond;
pthread_mutex_t nfapi_sync_mutex;
int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
-uint8_t nfapi_mode = 0; // Default to monolithic mode
+extern uint8_t nfapi_mode; // Default to monolithic mode
pthread_cond_t sync_cond;
pthread_mutex_t sync_mutex;
@@ -836,7 +836,7 @@ if(!IS_SOFTMODEM_NOS1)
nr_read_config_and_init();
} else {
printf("No ITTI, Initializing L1\n");
- RCconfig_L1();
+ RCconfig_NR_L1();
}
if (RC.nb_nr_inst > 0) {
@@ -874,7 +874,7 @@ if(!IS_SOFTMODEM_NOS1)
usleep(1000);
- if (nfapi_mode) {
+ if (NFAPI_MODE) {
printf("NFAPI*** - mutex and cond created - will block shortly for completion of PNF connection\n");
pthread_cond_init(&sync_cond,NULL);
pthread_mutex_init(&sync_mutex, NULL);
@@ -882,7 +882,7 @@ if(!IS_SOFTMODEM_NOS1)
const char *nfapi_mode_str = "