UE writes to USRP only on tx slots

Removed the hardcoding of fixed tdd and replaced with tdd config from mac configuration
This commit is contained in:
Sakthivel Velumani
2021-01-19 16:20:50 +01:00
parent e0b1f61235
commit af4242b508
3 changed files with 10 additions and 5 deletions
+8 -5
View File
@@ -781,13 +781,16 @@ void *UE_thread(void *arg) {
decoded_frame_rx, curMsg->proc.frame_rx );
int flags = 0;
int slot_tx_usrp = slot_nr + DURATION_RX_TO_TX;
if (slot_tx_usrp%10==7)
uint8_t tdd_period = mac->phy_config.config_req.tdd_table.tdd_period_in_slots;
uint8_t num_UL_slots = mac->scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots +
(mac->scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSymbols!=0);
uint8_t first_tx_slot = tdd_period - num_UL_slots;
if (curMsg->proc.nr_slot_tx%tdd_period==first_tx_slot)
flags=2;
else if (slot_tx_usrp%10==8)
flags = 1;
else if (slot_tx_usrp%10==9)
else if (curMsg->proc.nr_slot_tx%tdd_period==first_tx_slot+num_UL_slots-1)
flags = 3;
else if (curMsg->proc.nr_slot_tx%tdd_period>first_tx_slot)
flags = 1;
if (flags || IS_SOFTMODEM_RFSIM || IS_SOFTMODEM_NOS1)
AssertFatal( writeBlockSize ==
@@ -1019,6 +1019,7 @@ typedef struct
typedef struct
{
uint8_t tdd_period;//DL UL Transmission Periodicity. Value:0: ms0p5 1: ms0p625 2: ms1 3: ms1p25 4: ms2 5: ms2p5 6: ms5 7: ms10 8: ms3 9: ms4
uint8_t tdd_period_in_slots;
fapi_nr_max_tdd_periodicity_t* max_tdd_periodicity_list;
} fapi_nr_tdd_table_t;
+1
View File
@@ -82,6 +82,7 @@ int set_tdd_config_nr_ue(fapi_nr_config_request_t *cfg,
}
int nb_slots_per_period = ((1<<mu) * NR_NUMBER_OF_SUBFRAMES_PER_FRAME)/nb_periods_per_frame;
cfg->tdd_table.tdd_period_in_slots = nb_slots_per_period;
if ( (nrofDownlinkSymbols + nrofUplinkSymbols) == 0 )
AssertFatal(nb_slots_per_period == (nrofDownlinkSlots + nrofUplinkSlots),