improved real-time performance:
- gNB now only sends samples to USRP when DL slot. (should do the same for UE) - increased sf_ahead to 6 - fixed timestamp for usrp_write at UE
This commit is contained in:
@@ -108,8 +108,8 @@ extern openair0_config_t openair0_cfg[MAX_CARDS];
|
||||
|
||||
extern int transmission_mode;
|
||||
|
||||
uint16_t sl_ahead=4;
|
||||
uint16_t sf_ahead=4;
|
||||
uint16_t sl_ahead=6;
|
||||
uint16_t sf_ahead=6;
|
||||
//pthread_t main_gNB_thread;
|
||||
|
||||
time_stats_t softmodem_stats_mt; // main thread
|
||||
|
||||
+11
-2
@@ -732,9 +732,17 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
|
||||
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][slot * fp->samples_per_slot], fp->samples_per_slot * 4));
|
||||
int sf_extension = 0;
|
||||
//nr_subframe_t SF_type = nr_slot_select(cfg,slot%fp->slots_per_frame);
|
||||
nr_subframe_t SF_type = nr_slot_select(cfg,slot%fp->slots_per_frame);
|
||||
|
||||
if ((slot == 0) ||
|
||||
(slot == 1)) {
|
||||
int siglen=fp->samples_per_slot;
|
||||
int flags;
|
||||
if (slot==0)
|
||||
flags = 2;
|
||||
else if (slot==1)
|
||||
flags=3;
|
||||
|
||||
int siglen=fp->samples_per_slot,flags=1;
|
||||
/*
|
||||
if (SF_type == SF_S) {
|
||||
siglen = fp->dl_symbols_in_S_subframe*(fp->ofdm_symbol_size+fp->nb_prefix_samples0);
|
||||
@@ -774,6 +782,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
|
||||
(long long unsigned int)timestamp,frame,proc->frame_tx_unwrap,slot);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 );
|
||||
AssertFatal(txs == siglen+sf_extension,"TX : Timeout (sent %d/%d)\n",txs, siglen);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -699,7 +699,7 @@ void *UE_thread(void *arg) {
|
||||
slot_nr*UE->frame_parms.samples_per_slot];
|
||||
|
||||
for (int i=0; i<UE->frame_parms.nb_antennas_tx; i++)
|
||||
txp[i] = (void *)&UE->common_vars.txdata[i][((curMsg->proc.nr_tti_rx + 2)%nb_slot_frame)*UE->frame_parms.samples_per_slot];
|
||||
txp[i] = (void *)&UE->common_vars.txdata[i][((curMsg->proc.nr_tti_rx + DURATION_RX_TO_TX)%nb_slot_frame)*UE->frame_parms.samples_per_slot];
|
||||
|
||||
int readBlockSize, writeBlockSize;
|
||||
|
||||
@@ -725,7 +725,7 @@ void *UE_thread(void *arg) {
|
||||
AssertFatal( writeBlockSize ==
|
||||
UE->rfdevice.trx_write_func(&UE->rfdevice,
|
||||
timestamp+
|
||||
(2*UE->frame_parms.samples_per_slot) -
|
||||
(DURATION_RX_TO_TX*UE->frame_parms.samples_per_slot) -
|
||||
UE->frame_parms.ofdm_symbol_size-UE->frame_parms.nb_prefix_samples0 -
|
||||
openair0_cfg[0].tx_sample_advance,
|
||||
txp,
|
||||
|
||||
@@ -808,11 +808,10 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
}
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).N_RB_DL[j]= N_RB_DL;
|
||||
if(N_RB_DL == 217) sf_ahead = 2;
|
||||
else if(N_RB_DL == 106) sf_ahead = 4;
|
||||
else sf_ahead = 4;
|
||||
/*else AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for N_RB_DL choice: 106, 217 !\n",
|
||||
RC.config_file_name, i, N_RB_DL);*/
|
||||
//if(N_RB_DL == 217) sf_ahead = 2;
|
||||
//else if(N_RB_DL == 106) sf_ahead = 4;
|
||||
if ((N_RB_DL != 217) && (N_RB_DL != 106))
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for N_RB_DL choice: 106, 217 !\n", RC.config_file_name, i, N_RB_DL);
|
||||
|
||||
/*
|
||||
if ((N_RB_DL!=6) && (N_RB_DL!=15) && (N_RB_DL!=25) && (N_RB_DL!=50) && (N_RB_DL!=75) && (N_RB_DL!=100)) {
|
||||
|
||||
Reference in New Issue
Block a user