Commit af4242b5 authored by Sakthivel Velumani's avatar Sakthivel Velumani

UE writes to USRP only on tx slots

Removed the hardcoding of fixed tdd and replaced with tdd config from mac configuration
parent e0b1f612
...@@ -781,13 +781,16 @@ void *UE_thread(void *arg) { ...@@ -781,13 +781,16 @@ void *UE_thread(void *arg) {
decoded_frame_rx, curMsg->proc.frame_rx ); decoded_frame_rx, curMsg->proc.frame_rx );
int flags = 0; int flags = 0;
int slot_tx_usrp = slot_nr + DURATION_RX_TO_TX; uint8_t tdd_period = mac->phy_config.config_req.tdd_table.tdd_period_in_slots;
if (slot_tx_usrp%10==7) 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; flags=2;
else if (slot_tx_usrp%10==8) else if (curMsg->proc.nr_slot_tx%tdd_period==first_tx_slot+num_UL_slots-1)
flags = 1;
else if (slot_tx_usrp%10==9)
flags = 3; flags = 3;
else if (curMsg->proc.nr_slot_tx%tdd_period>first_tx_slot)
flags = 1;
if (flags || IS_SOFTMODEM_RFSIM || IS_SOFTMODEM_NOS1) if (flags || IS_SOFTMODEM_RFSIM || IS_SOFTMODEM_NOS1)
AssertFatal( writeBlockSize == AssertFatal( writeBlockSize ==
......
...@@ -1019,6 +1019,7 @@ typedef struct ...@@ -1019,6 +1019,7 @@ typedef struct
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;//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_max_tdd_periodicity_t* max_tdd_periodicity_list;
} fapi_nr_tdd_table_t; } fapi_nr_tdd_table_t;
......
...@@ -82,6 +82,7 @@ int set_tdd_config_nr_ue(fapi_nr_config_request_t *cfg, ...@@ -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; 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 ) if ( (nrofDownlinkSymbols + nrofUplinkSymbols) == 0 )
AssertFatal(nb_slots_per_period == (nrofDownlinkSlots + nrofUplinkSlots), AssertFatal(nb_slots_per_period == (nrofDownlinkSlots + nrofUplinkSlots),
......
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