Merge remote-tracking branch 'origin/continuous-tx' into integration_2022_wk11
This commit is contained in:
+17
-4
@@ -209,7 +209,6 @@ void rx_func(void *param) {
|
|||||||
if (pthread_mutex_unlock(&rnti_to_remove_mutex)) exit(1);
|
if (pthread_mutex_unlock(&rnti_to_remove_mutex)) exit(1);
|
||||||
|
|
||||||
// RX processing
|
// RX processing
|
||||||
int tx_slot_type = nr_slot_select(cfg,frame_tx,slot_tx);
|
|
||||||
int rx_slot_type = nr_slot_select(cfg,frame_rx,slot_rx);
|
int rx_slot_type = nr_slot_select(cfg,frame_rx,slot_rx);
|
||||||
if (rx_slot_type == NR_UPLINK_SLOT || rx_slot_type == NR_MIXED_SLOT) {
|
if (rx_slot_type == NR_UPLINK_SLOT || rx_slot_type == NR_MIXED_SLOT) {
|
||||||
// UE-specific RX processing for subframe n
|
// UE-specific RX processing for subframe n
|
||||||
@@ -243,7 +242,8 @@ void rx_func(void *param) {
|
|||||||
gNB->if_inst->NR_UL_indication(&gNB->UL_INFO);
|
gNB->if_inst->NR_UL_indication(&gNB->UL_INFO);
|
||||||
pthread_mutex_unlock(&gNB->UL_INFO_mutex);
|
pthread_mutex_unlock(&gNB->UL_INFO_mutex);
|
||||||
stop_meas(&gNB->ul_indication_stats);
|
stop_meas(&gNB->ul_indication_stats);
|
||||||
|
|
||||||
|
int tx_slot_type = nr_slot_select(cfg,frame_rx,slot_tx);
|
||||||
if (tx_slot_type == NR_DOWNLINK_SLOT || tx_slot_type == NR_MIXED_SLOT) {
|
if (tx_slot_type == NR_DOWNLINK_SLOT || tx_slot_type == NR_MIXED_SLOT) {
|
||||||
notifiedFIFO_elt_t *res;
|
notifiedFIFO_elt_t *res;
|
||||||
processingData_L1tx_t *syncMsg;
|
processingData_L1tx_t *syncMsg;
|
||||||
@@ -255,8 +255,17 @@ void rx_func(void *param) {
|
|||||||
syncMsg->timestamp_tx = info->timestamp_tx;
|
syncMsg->timestamp_tx = info->timestamp_tx;
|
||||||
res->key = slot_tx;
|
res->key = slot_tx;
|
||||||
pushTpool(gNB->threadPool, res);
|
pushTpool(gNB->threadPool, res);
|
||||||
|
} else if (get_softmodem_params()->continuous_tx) {
|
||||||
|
notifiedFIFO_elt_t *res = pullTpool(gNB->L1_tx_free, gNB->threadPool);
|
||||||
|
processingData_L1tx_t *syncMsg = (processingData_L1tx_t *)NotifiedFifoData(res);
|
||||||
|
syncMsg->gNB = gNB;
|
||||||
|
syncMsg->timestamp_tx = info->timestamp_tx;
|
||||||
|
syncMsg->frame = frame_tx;
|
||||||
|
syncMsg->slot = slot_tx;
|
||||||
|
res->key = slot_tx;
|
||||||
|
pushNotifiedFIFO(gNB->L1_tx_out, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
LOG_D(PHY, "rxtx:%lld nfapi:%lld phy:%lld tx:%lld rx:%lld prach:%lld ofdm:%lld ",
|
LOG_D(PHY, "rxtx:%lld nfapi:%lld phy:%lld tx:%lld rx:%lld prach:%lld ofdm:%lld ",
|
||||||
softmodem_stats_rxtx_sf.diff_now, nfapi_meas.diff_now,
|
softmodem_stats_rxtx_sf.diff_now, nfapi_meas.diff_now,
|
||||||
@@ -394,7 +403,11 @@ void *tx_reorder_thread(void* param) {
|
|||||||
syncMsgRU.slot_tx = syncMsgL1->slot;
|
syncMsgRU.slot_tx = syncMsgL1->slot;
|
||||||
syncMsgRU.timestamp_tx = syncMsgL1->timestamp_tx;
|
syncMsgRU.timestamp_tx = syncMsgL1->timestamp_tx;
|
||||||
syncMsgRU.ru = gNB->RU_list[0];
|
syncMsgRU.ru = gNB->RU_list[0];
|
||||||
next_tx_slot = get_next_downlink_slot(gNB, &gNB->gNB_config, syncMsgRU.frame_tx, syncMsgRU.slot_tx);
|
if (get_softmodem_params()->continuous_tx) {
|
||||||
|
int slots_per_frame = gNB->frame_parms.slots_per_frame;
|
||||||
|
next_tx_slot = (syncMsgRU.slot_tx + 1) % slots_per_frame;
|
||||||
|
} else
|
||||||
|
next_tx_slot = get_next_downlink_slot(gNB, &gNB->gNB_config, syncMsgRU.frame_tx, syncMsgRU.slot_tx);
|
||||||
pushNotifiedFIFO(gNB->L1_tx_free, resL1);
|
pushNotifiedFIFO(gNB->L1_tx_free, resL1);
|
||||||
if (resL1==resL1Reserve)
|
if (resL1==resL1Reserve)
|
||||||
resL1Reserve=NULL;
|
resL1Reserve=NULL;
|
||||||
|
|||||||
+34
-27
@@ -703,46 +703,53 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
|
|||||||
nfapi_nr_config_request_scf_t *cfg = &ru->config;
|
nfapi_nr_config_request_scf_t *cfg = &ru->config;
|
||||||
void *txp[ru->nb_tx];
|
void *txp[ru->nb_tx];
|
||||||
unsigned int txs;
|
unsigned int txs;
|
||||||
int i,txsymb=fp->symbols_per_slot;
|
int i;
|
||||||
T(T_ENB_PHY_OUTPUT_SIGNAL, T_INT(0), T_INT(0), T_INT(frame), T_INT(slot),
|
T(T_ENB_PHY_OUTPUT_SIGNAL, T_INT(0), T_INT(0), T_INT(frame), T_INT(slot),
|
||||||
T_INT(0), T_BUFFER(&ru->common.txdata[0][fp->get_samples_slot_timestamp(slot,fp,0)], fp->samples_per_subframe * 4));
|
T_INT(0), T_BUFFER(&ru->common.txdata[0][fp->get_samples_slot_timestamp(slot,fp,0)], fp->samples_per_subframe * 4));
|
||||||
int slot_type = nr_slot_select(cfg,frame,slot%fp->slots_per_frame);
|
|
||||||
int prevslot_type = nr_slot_select(cfg,frame,(slot+(fp->slots_per_frame-1))%fp->slots_per_frame);
|
|
||||||
int nextslot_type = nr_slot_select(cfg,frame,(slot+1)%fp->slots_per_frame);
|
|
||||||
int sf_extension = 0;
|
int sf_extension = 0;
|
||||||
int siglen=fp->get_samples_per_slot(slot,fp);
|
int siglen=fp->get_samples_per_slot(slot,fp);
|
||||||
int flags=1;
|
int flags = 0;
|
||||||
|
|
||||||
//nr_subframe_t SF_type = nr_slot_select(cfg,slot%fp->slots_per_frame);
|
if (cfg->cell_config.frame_duplex_type.value == TDD && !get_softmodem_params()->continuous_tx) {
|
||||||
if (slot_type == NR_DOWNLINK_SLOT || slot_type == NR_MIXED_SLOT || IS_SOFTMODEM_RFSIM) {
|
int slot_type = nr_slot_select(cfg,frame,slot%fp->slots_per_frame);
|
||||||
if (cfg->cell_config.frame_duplex_type.value == TDD) {
|
if(slot_type == NR_MIXED_SLOT) {
|
||||||
if(slot_type == NR_MIXED_SLOT) {
|
int txsymb = 0;
|
||||||
txsymb = 0;
|
|
||||||
|
|
||||||
for(int symbol_count = 0; symbol_count<NR_NUMBER_OF_SYMBOLS_PER_SLOT; symbol_count++) {
|
for(int symbol_count = 0; symbol_count<NR_NUMBER_OF_SYMBOLS_PER_SLOT; symbol_count++) {
|
||||||
if (cfg->tdd_table.max_tdd_periodicity_list[slot].max_num_of_symbol_per_slot_list[symbol_count].slot_config.value == 0)
|
if (cfg->tdd_table.max_tdd_periodicity_list[slot].max_num_of_symbol_per_slot_list[symbol_count].slot_config.value == 0)
|
||||||
txsymb++;
|
txsymb++;
|
||||||
}
|
|
||||||
|
|
||||||
AssertFatal(txsymb>0,"illegal txsymb %d\n",txsymb);
|
|
||||||
|
|
||||||
if(slot%(fp->slots_per_subframe/2))
|
|
||||||
siglen = txsymb * (fp->ofdm_symbol_size + fp->nb_prefix_samples);
|
|
||||||
else
|
|
||||||
siglen = (fp->ofdm_symbol_size + fp->nb_prefix_samples0) + (txsymb - 1) * (fp->ofdm_symbol_size + fp->nb_prefix_samples);
|
|
||||||
|
|
||||||
//+ ru->end_of_burst_delay;
|
|
||||||
flags = 3; // end of burst
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (slot_type == NR_DOWNLINK_SLOT && prevslot_type == NR_UPLINK_SLOT) {
|
AssertFatal(txsymb>0,"illegal txsymb %d\n",txsymb);
|
||||||
|
|
||||||
|
if(slot%(fp->slots_per_subframe/2))
|
||||||
|
siglen = txsymb * (fp->ofdm_symbol_size + fp->nb_prefix_samples);
|
||||||
|
else
|
||||||
|
siglen = (fp->ofdm_symbol_size + fp->nb_prefix_samples0) + (txsymb - 1) * (fp->ofdm_symbol_size + fp->nb_prefix_samples);
|
||||||
|
|
||||||
|
//+ ru->end_of_burst_delay;
|
||||||
|
flags = 3; // end of burst
|
||||||
|
} else if (slot_type == NR_DOWNLINK_SLOT) {
|
||||||
|
int prevslot_type = nr_slot_select(cfg,frame,(slot+(fp->slots_per_frame-1))%fp->slots_per_frame);
|
||||||
|
int nextslot_type = nr_slot_select(cfg,frame,(slot+1)%fp->slots_per_frame);
|
||||||
|
if (prevslot_type == NR_UPLINK_SLOT) {
|
||||||
flags = 2; // start of burst
|
flags = 2; // start of burst
|
||||||
sf_extension = ru->sf_extension;
|
sf_extension = ru->sf_extension;
|
||||||
}
|
} else if (nextslot_type == NR_UPLINK_SLOT) {
|
||||||
if (slot_type == NR_DOWNLINK_SLOT && nextslot_type == NR_UPLINK_SLOT)
|
|
||||||
flags = 3; // end of burst
|
flags = 3; // end of burst
|
||||||
|
} else {
|
||||||
|
flags = 1; // middle of burst
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} else { // FDD
|
||||||
|
if (proc->first_tx == 1) {
|
||||||
|
flags = 2; // start of burst
|
||||||
|
} else {
|
||||||
|
flags = 1; // middle of burst
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (flags) {
|
||||||
if (fp->freq_range==nr_FR2) {
|
if (fp->freq_range==nr_FR2) {
|
||||||
// the beam index is written in bits 8-10 of the flags
|
// the beam index is written in bits 8-10 of the flags
|
||||||
// bit 11 enables the gpio programming
|
// bit 11 enables the gpio programming
|
||||||
|
|||||||
+3
-3
@@ -1126,9 +1126,8 @@ void *UE_thread(void *arg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
int slot_tx_usrp = slot_nr + DURATION_RX_TO_TX - NR_RX_NB_TH;
|
|
||||||
|
|
||||||
if (openair0_cfg[0].duplex_mode == duplex_mode_TDD) {
|
if (openair0_cfg[0].duplex_mode == duplex_mode_TDD && !get_softmodem_params()->continuous_tx) {
|
||||||
|
|
||||||
uint8_t tdd_period = mac->phy_config.config_req.tdd_table.tdd_period_in_slots;
|
uint8_t tdd_period = mac->phy_config.config_req.tdd_table.tdd_period_in_slots;
|
||||||
int nrofUplinkSlots, nrofUplinkSymbols;
|
int nrofUplinkSlots, nrofUplinkSymbols;
|
||||||
@@ -1140,8 +1139,9 @@ void *UE_thread(void *arg) {
|
|||||||
nrofUplinkSlots = mac->scc_SIB->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots;
|
nrofUplinkSlots = mac->scc_SIB->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots;
|
||||||
nrofUplinkSymbols = mac->scc_SIB->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSymbols;
|
nrofUplinkSymbols = mac->scc_SIB->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSymbols;
|
||||||
}
|
}
|
||||||
uint8_t num_UL_slots = nrofUplinkSlots + (nrofUplinkSymbols != 0);
|
|
||||||
|
|
||||||
|
int slot_tx_usrp = slot_nr + DURATION_RX_TO_TX - NR_RX_NB_TH;
|
||||||
|
uint8_t num_UL_slots = nrofUplinkSlots + (nrofUplinkSymbols != 0);
|
||||||
uint8_t first_tx_slot = tdd_period - num_UL_slots;
|
uint8_t first_tx_slot = tdd_period - num_UL_slots;
|
||||||
|
|
||||||
if (slot_tx_usrp % tdd_period == first_tx_slot)
|
if (slot_tx_usrp % tdd_period == first_tx_slot)
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ extern "C"
|
|||||||
#define CONFIG_HLP_USRP_THREAD "having extra thead for usrp tx\n"
|
#define CONFIG_HLP_USRP_THREAD "having extra thead for usrp tx\n"
|
||||||
#define CONFIG_HLP_NFAPI "Change the nFAPI mode for NR\n"
|
#define CONFIG_HLP_NFAPI "Change the nFAPI mode for NR\n"
|
||||||
#define CONFIG_L1_EMULATOR "Run in L1 emulated mode (disable PHY layer)\n"
|
#define CONFIG_L1_EMULATOR "Run in L1 emulated mode (disable PHY layer)\n"
|
||||||
|
#define CONFIG_HLP_CONTINUOUS_TX "perform continuous transmission, even in TDD mode (to work around USRP issues)\n"
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
/* command line parameters common to eNodeB and UE */
|
/* command line parameters common to eNodeB and UE */
|
||||||
@@ -126,6 +127,7 @@ extern "C"
|
|||||||
#define NODE_NUMBER softmodem_params.node_number
|
#define NODE_NUMBER softmodem_params.node_number
|
||||||
#define NON_STOP softmodem_params.non_stop
|
#define NON_STOP softmodem_params.non_stop
|
||||||
#define EMULATE_L1 softmodem_params.emulate_l1
|
#define EMULATE_L1 softmodem_params.emulate_l1
|
||||||
|
#define CONTINUOUS_TX softmodem_params.continuous_tx
|
||||||
|
|
||||||
#define DEFAULT_RFCONFIG_FILE "/usr/local/etc/syriq/ue.band7.tm1.PRB100.NR40.dat";
|
#define DEFAULT_RFCONFIG_FILE "/usr/local/etc/syriq/ue.band7.tm1.PRB100.NR40.dat";
|
||||||
|
|
||||||
@@ -163,7 +165,8 @@ extern int usrp_tx_thread;
|
|||||||
{"do-prb-interpolation", CONFIG_HLP_PRBINTER, PARAMFLAG_BOOL, iptr:&PRB_INTERPOLATION, defintval:0, TYPE_INT, 0}, \
|
{"do-prb-interpolation", CONFIG_HLP_PRBINTER, PARAMFLAG_BOOL, iptr:&PRB_INTERPOLATION, defintval:0, TYPE_INT, 0}, \
|
||||||
{"nfapi", CONFIG_HLP_NFAPI, 0, u8ptr:&nfapi_mode, defintval:0, TYPE_UINT8, 0}, \
|
{"nfapi", CONFIG_HLP_NFAPI, 0, u8ptr:&nfapi_mode, defintval:0, TYPE_UINT8, 0}, \
|
||||||
{"non-stop", CONFIG_HLP_NONSTOP, PARAMFLAG_BOOL, iptr:&NON_STOP, defintval:0, TYPE_INT, 0}, \
|
{"non-stop", CONFIG_HLP_NONSTOP, PARAMFLAG_BOOL, iptr:&NON_STOP, defintval:0, TYPE_INT, 0}, \
|
||||||
{"emulate-l1", CONFIG_L1_EMULATOR, PARAMFLAG_BOOL, iptr:&EMULATE_L1, defintval:0, TYPE_INT, 0} \
|
{"emulate-l1", CONFIG_L1_EMULATOR, PARAMFLAG_BOOL, iptr:&EMULATE_L1, defintval:0, TYPE_INT, 0}, \
|
||||||
|
{"continuous-tx", CONFIG_HLP_CONTINUOUS_TX,PARAMFLAG_BOOL, iptr:&CONTINUOUS_TX, defintval:0, TYPE_INT, 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CONFIG_HLP_NSA "Enable NSA mode \n"
|
#define CONFIG_HLP_NSA "Enable NSA mode \n"
|
||||||
@@ -254,6 +257,7 @@ typedef struct {
|
|||||||
uint16_t node_number;
|
uint16_t node_number;
|
||||||
int non_stop;
|
int non_stop;
|
||||||
int emulate_l1;
|
int emulate_l1;
|
||||||
|
int continuous_tx;
|
||||||
} softmodem_params_t;
|
} softmodem_params_t;
|
||||||
|
|
||||||
extern uint64_t get_softmodem_optmask(void);
|
extern uint64_t get_softmodem_optmask(void);
|
||||||
|
|||||||
Reference in New Issue
Block a user