remove unused frame config ue phy unit test and all nr ue phy test folder
This commit is contained in:
@@ -58,6 +58,70 @@ static uint8_t sl_get_elapsed_slots(uint32_t slot, uint32_t sl_slot_bitmap)
|
||||
return elapsed_slots;
|
||||
}
|
||||
|
||||
/*
|
||||
* This function determines if the mixed slot is a Sidelink slot
|
||||
*/
|
||||
static uint8_t sl_determine_if_sidelink_slot(uint8_t sl_startsym, uint8_t sl_lensym, uint8_t num_ulsym)
|
||||
{
|
||||
uint8_t ul_startsym = NR_NUMBER_OF_SYMBOLS_PER_SLOT - num_ulsym;
|
||||
|
||||
if ((sl_startsym >= ul_startsym) && (sl_lensym <= NR_NUMBER_OF_SYMBOLS_PER_SLOT)) {
|
||||
LOG_D(MAC,
|
||||
"MIXED SLOT is a SIDELINK SLOT. Sidelink Symbols: %d-%d, Uplink Symbols: %d-%d\n",
|
||||
sl_startsym,
|
||||
sl_lensym - 1,
|
||||
ul_startsym,
|
||||
ul_startsym + num_ulsym - 1);
|
||||
return NR_SIDELINK_SLOT;
|
||||
} else {
|
||||
LOG_D(MAC,
|
||||
"MIXED SLOT is NOT SIDELINK SLOT. Sidelink Symbols: %d-%d, Uplink Symbols: %d-%d\n",
|
||||
sl_startsym,
|
||||
sl_lensym - 1,
|
||||
ul_startsym,
|
||||
ul_startsym + num_ulsym - 1);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* This function determines if the Slot is a SIDELINK SLOT
|
||||
* Every Uplink Slot is a Sidelink slot
|
||||
* Mixed Slot is a sidelink slot if the uplink symbols in Mixed slot
|
||||
* overlaps with Sidelink start symbol and number of symbols.
|
||||
*/
|
||||
int sl_nr_ue_slot_select(const sl_nr_phy_config_request_t *cfg, int slot, uint8_t frame_duplex_type)
|
||||
{
|
||||
int ul_sym = 0, slot_type = 0;
|
||||
|
||||
// All PC5 bands are TDD bands , hence handling only TDD in this function.
|
||||
AssertFatal(frame_duplex_type == TDD, "No Sidelink operation defined for FDD in 3GPP rel16\n");
|
||||
|
||||
if (cfg->tdd_table.max_tdd_periodicity_list == NULL) { // this happens before receiving TDD configuration
|
||||
return slot_type;
|
||||
}
|
||||
|
||||
int period = cfg->tdd_table.tdd_period_in_slots;
|
||||
int rel_slot = slot % period;
|
||||
const fapi_nr_tdd_table_t *tdd_table = &cfg->tdd_table;
|
||||
|
||||
const fapi_nr_max_tdd_periodicity_t *current_slot = &tdd_table->max_tdd_periodicity_list[rel_slot];
|
||||
|
||||
for (int symbol_count = 0; symbol_count < NR_NUMBER_OF_SYMBOLS_PER_SLOT; symbol_count++) {
|
||||
if (current_slot->max_num_of_symbol_per_slot_list[symbol_count].slot_config == 1) {
|
||||
ul_sym++;
|
||||
}
|
||||
}
|
||||
|
||||
if (ul_sym == NR_NUMBER_OF_SYMBOLS_PER_SLOT) {
|
||||
slot_type = NR_SIDELINK_SLOT;
|
||||
} else if (ul_sym) {
|
||||
slot_type = sl_determine_if_sidelink_slot(cfg->sl_bwp_config.sl_start_symbol, cfg->sl_bwp_config.sl_num_symbols, ul_sym);
|
||||
}
|
||||
|
||||
return slot_type;
|
||||
}
|
||||
|
||||
static void sl_determine_slot_bitmap(sl_nr_ue_mac_params_t *sl_mac, int ue_id)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user