Implement MAC/RRC setter/getter functions to support multiple TDD patterns
* set_tdd_bmap_period, config_tdd_patterns: to configure TDD period, including bitmap, in the frame structure * get_tdd_periodicity: to retrieve the periodicity in milliseconds for the given TDD pattern * get_tdd_period_idx: to get the TDD period index based on pattern periodicities * get_ul_slots_per_period: get the number of UL slots (including mixed with UL symbols) in period * get_full_ul_slots_per_period: get the number of full UL slots in period * get_dl_slots_per_period: get the number of DL slots (including mixed with DL symbols) in period * get_full_dl_slots_per_period: get the number of full DL slots in period Co-authored-by: vijay chadachan <vijay.chadachan@firecell.io>
This commit is contained in:
committed by
Guido Casati
co-authored by
vijay chadachan
parent
9cf1ce7427
commit
c3a6700037
@@ -676,6 +676,14 @@ uint64_t from_nrarfcn(int nr_bandP, uint8_t scs_index, uint32_t nrarfcn)
|
||||
return frequency;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the slot index within the period
|
||||
*/
|
||||
int get_slot_idx_in_period(const int slot, const frame_structure_t *fs)
|
||||
{
|
||||
return slot % fs->numb_slots_period;
|
||||
}
|
||||
|
||||
int get_first_ul_slot(int nrofDownlinkSlots, int nrofDownlinkSymbols, int nrofUplinkSymbols)
|
||||
{
|
||||
return (nrofDownlinkSlots + (nrofDownlinkSymbols != 0 && nrofUplinkSymbols == 0));
|
||||
|
||||
@@ -279,6 +279,8 @@ int get_smallest_supported_bandwidth_index(int scs, frequency_range_t frequency_
|
||||
unsigned short get_m_srs(int c_srs, int b_srs);
|
||||
unsigned short get_N_b_srs(int c_srs, int b_srs);
|
||||
|
||||
int get_slot_idx_in_period(const int slot, const frame_structure_t *fs);
|
||||
|
||||
#define CEILIDIV(a,b) ((a+b-1)/b)
|
||||
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user