Commit 5c0a817f authored by Sakthivel Velumani's avatar Sakthivel Velumani

FR1 works fine in rfsimulator

Initial sync not happening fot FR2
parents be09a9b0 e1647ac6
...@@ -104,6 +104,7 @@ extern openair0_config_t openair0_cfg[MAX_CARDS]; ...@@ -104,6 +104,7 @@ extern openair0_config_t openair0_cfg[MAX_CARDS];
extern int transmission_mode; extern int transmission_mode;
uint16_t sf_ahead=3; uint16_t sf_ahead=3;
uint16_t sl_ahead;
//pthread_t main_gNB_thread; //pthread_t main_gNB_thread;
time_stats_t softmodem_stats_mt; // main thread time_stats_t softmodem_stats_mt; // main thread
...@@ -398,6 +399,7 @@ void gNB_top(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, char *string, struct ...@@ -398,6 +399,7 @@ void gNB_top(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, char *string, struct
RU_proc_t *ru_proc=&ru->proc; RU_proc_t *ru_proc=&ru->proc;
proc->frame_rx = frame_rx; proc->frame_rx = frame_rx;
proc->slot_rx = slot_rx; proc->slot_rx = slot_rx;
sl_ahead = sf_ahead*fp->slots_per_subframe;
if (!oai_exit) { if (!oai_exit) {
T(T_ENB_MASTER_TICK, T_INT(0), T_INT(proc->frame_rx), T_INT(proc->slot_rx)); T(T_ENB_MASTER_TICK, T_INT(0), T_INT(proc->frame_rx), T_INT(proc->slot_rx));
......
...@@ -132,6 +132,7 @@ int attach_rru(RU_t *ru); ...@@ -132,6 +132,7 @@ int attach_rru(RU_t *ru);
int connect_rau(RU_t *ru); int connect_rau(RU_t *ru);
extern uint16_t sf_ahead; extern uint16_t sf_ahead;
extern uint16_t sl_ahead;
extern int emulate_rf; extern int emulate_rf;
extern int numerology; extern int numerology;
......
...@@ -51,6 +51,7 @@ extern int oai_nfapi_sr_indication(nfapi_sr_indication_t *ind); ...@@ -51,6 +51,7 @@ extern int oai_nfapi_sr_indication(nfapi_sr_indication_t *ind);
extern int oai_nfapi_rx_ind(nfapi_rx_indication_t *ind); extern int oai_nfapi_rx_ind(nfapi_rx_indication_t *ind);
extern uint8_t nfapi_mode; extern uint8_t nfapi_mode;
extern uint16_t sf_ahead; extern uint16_t sf_ahead;
extern uint16_t sl_ahead;
void handle_nr_rach(NR_UL_IND_t *UL_info) { void handle_nr_rach(NR_UL_IND_t *UL_info) {
if (UL_info->rach_ind.rach_indication_body.number_of_preambles>0) { if (UL_info->rach_ind.rach_indication_body.number_of_preambles>0) {
...@@ -261,22 +262,22 @@ void NR_UL_indication(NR_UL_IND_t *UL_info) { ...@@ -261,22 +262,22 @@ void NR_UL_indication(NR_UL_IND_t *UL_info) {
if (ifi->CC_mask == ((1<<MAX_NUM_CCs)-1)) { if (ifi->CC_mask == ((1<<MAX_NUM_CCs)-1)) {
/* /*
eNB_dlsch_ulsch_scheduler(module_id, eNB_dlsch_ulsch_scheduler(module_id,
(UL_info->frame+((UL_info->slot>(9-sf_ahead))?1:0)) % 1024, (UL_info->frame+((UL_info->slot>(9-sl_ahead))?1:0)) % 1024,
(UL_info->slot+sf_ahead)%10); (UL_info->slot+sl_ahead)%10);
*/ */
nfapi_nr_config_request_scf_t *cfg = &mac->config[CC_id]; nfapi_nr_config_request_scf_t *cfg = &mac->config[CC_id];
int spf = get_spf(cfg); int spf = get_spf(cfg);
gNB_dlsch_ulsch_scheduler(module_id, gNB_dlsch_ulsch_scheduler(module_id,
UL_info->frame, UL_info->frame,
UL_info->slot, UL_info->slot,
(UL_info->frame+((UL_info->slot>(spf-1-sf_ahead))?1:0)) % 1024, (UL_info->frame+((UL_info->slot>(spf-1-sl_ahead))?1:0)) % 1024,
(UL_info->slot+sf_ahead)%spf); (UL_info->slot+sl_ahead)%spf);
ifi->CC_mask = 0; ifi->CC_mask = 0;
sched_info->module_id = module_id; sched_info->module_id = module_id;
sched_info->CC_id = CC_id; sched_info->CC_id = CC_id;
sched_info->frame = (UL_info->frame + ((UL_info->slot>(spf-1-sf_ahead)) ? 1 : 0)) % 1024; sched_info->frame = (UL_info->frame + ((UL_info->slot>(spf-1-sl_ahead)) ? 1 : 0)) % 1024;
sched_info->slot = (UL_info->slot+sf_ahead)%spf; sched_info->slot = (UL_info->slot+sl_ahead)%spf;
sched_info->DL_req = &mac->DL_req[CC_id]; sched_info->DL_req = &mac->DL_req[CC_id];
sched_info->UL_dci_req = &mac->UL_dci_req[CC_id]; sched_info->UL_dci_req = &mac->UL_dci_req[CC_id];
......
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