NR UE: Implement DCI format 11 type0 for contiguous allocations

This commit is contained in:
Laurent THOMAS
2024-04-26 10:07:23 +02:00
committed by Robert Schmidt
parent 749779247d
commit a07461813d
4 changed files with 71 additions and 37 deletions
@@ -1694,7 +1694,7 @@ int get_nr_prach_occasion_info_from_index(uint8_t index,
if (pointa > 2016666) { //FR2
x = table_6_3_3_2_4_prachConfig_Index[index][2];
s_map = table_6_3_3_2_4_prachConfig_Index[index][5];
*N_RA_sfn += count_bits_set(s_map);
*N_RA_sfn += count_bits64(s_map);
*N_RA_slot = table_6_3_3_2_4_prachConfig_Index[index][7]; // Number of RACH slots within a subframe
*max_association_period = 160/(x * 10);
if (start_symbol != NULL && N_t_slot != NULL && N_dur != NULL && format != NULL){
@@ -1721,7 +1721,7 @@ int get_nr_prach_occasion_info_from_index(uint8_t index,
if (unpaired) {
x = table_6_3_3_2_3_prachConfig_Index[index][2];
s_map = table_6_3_3_2_3_prachConfig_Index[index][4];
*N_RA_sfn += count_bits_set(s_map);
*N_RA_sfn += count_bits64(s_map);
*N_RA_slot = table_6_3_3_2_3_prachConfig_Index[index][6]; // Number of RACH slots within a subframe
*max_association_period = 160/(x * 10);
if (start_symbol != NULL && N_t_slot != NULL && N_dur != NULL && format != NULL){
@@ -1746,7 +1746,7 @@ int get_nr_prach_occasion_info_from_index(uint8_t index,
else { // FDD
x = table_6_3_3_2_2_prachConfig_Index[index][2];
s_map = table_6_3_3_2_2_prachConfig_Index[index][4];
*N_RA_sfn += count_bits_set(s_map);
*N_RA_sfn += count_bits64(s_map);
*N_RA_slot = table_6_3_3_2_2_prachConfig_Index[index][6];
if (start_symbol != NULL && N_t_slot != NULL && N_dur != NULL && format != NULL){
*start_symbol = table_6_3_3_2_2_prachConfig_Index[index][5];
@@ -293,6 +293,7 @@ int8_t nr_ue_process_dci_freq_dom_resource_assignment(nfapi_nr_ue_pusch_pdu_t *p
pdsch_Config->resourceAllocation == NR_PDSCH_Config__resourceAllocation_resourceAllocationType0) {
// TS 38.214 subclause 5.1.2.2.1 Downlink resource allocation type 0
dlsch_config_pdu->resource_alloc = 0;
memset(dlsch_config_pdu->rb_bitmap, 0, sizeof(dlsch_config_pdu->rb_bitmap));
int P = getRBGSize(n_RB_DLBWP, pdsch_Config->rbg_Size);
int n_RBG = frequency_domain_assignment.nbits;
int index = 0;
@@ -312,6 +313,23 @@ int8_t nr_ue_process_dci_freq_dom_resource_assignment(nfapi_nr_ue_pusch_pdu_t *p
dlsch_config_pdu->rb_bitmap[j / 8] |= bit_rbg << (j % 8);
index += size_RBG;
}
dlsch_config_pdu->number_rbs = count_bits(dlsch_config_pdu->rb_bitmap, sizeofArray(dlsch_config_pdu->rb_bitmap));
// Temporary code to process type0 as type1 when the RB allocation is contiguous
int state = 0;
for (int i = 0; i < sizeof(dlsch_config_pdu->rb_bitmap) * 8; i++) {
int allocated = dlsch_config_pdu->rb_bitmap[i / 8] & (1 << (i % 8));
if (allocated) {
if (state == 0) {
dlsch_config_pdu->start_rb = i;
state = 1;
} else
AssertFatal(state == 1, "hole, not implemented\n");
} else {
if (state == 1) {
state = 2;
}
}
}
}
else if (pdsch_Config &&
pdsch_Config->resourceAllocation == NR_PDSCH_Config__resourceAllocation_dynamicSwitch)