NR PDCCH development: V15.2.0 modifications
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -42,70 +42,80 @@
|
||||
|
||||
#define NR_PDCCH_DCI_H
|
||||
#ifdef NR_PDCCH_DCI_H
|
||||
|
||||
struct NR_DCI_INFO_EXTRACTED {
|
||||
uint8_t carrier_ind ; // 0 CARRIER_IND: 0 or 3 bits, as defined in Subclause x.x of [5, TS38.213]
|
||||
uint8_t sul_ind_0_1 ; // 1 SUL_IND_0_1:
|
||||
uint8_t identifier_dci_formats ; // 2 IDENTIFIER_DCI_FORMATS:
|
||||
uint8_t identifier_dci_formats ; // 0 IDENTIFIER_DCI_FORMATS:
|
||||
uint8_t carrier_ind ; // 1 CARRIER_IND: 0 or 3 bits, as defined in Subclause x.x of [5, TS38.213]
|
||||
uint8_t sul_ind_0_1 ; // 2 SUL_IND_0_1:
|
||||
uint8_t slot_format_ind ; // 3 SLOT_FORMAT_IND: size of DCI format 2_0 is configurable by higher layers up to 128 bits, according to Subclause 11.1.1 of [5, TS 38.213]
|
||||
uint8_t pre_emption_ind ; // 4 PRE_EMPTION_IND: size of DCI format 2_1 is configurable by higher layers up to 126 bits, according to Subclause 11.2 of [5, TS 38.213]. Each pre-emption indication is 14 bits
|
||||
uint8_t tpc_cmd_number ; // 5 TPC_CMD_NUMBER: The parameter xxx provided by higher layers determines the index to the TPC command number for an UL of a cell. Each TPC command number is 2 bits
|
||||
uint8_t block_number ; // 6 BLOCK_NUMBER: starting position of a block is determined by the parameter startingBitOfFormat2_3
|
||||
uint8_t bandwidth_part_ind ; // 7 BANDWIDTH_PART_IND:
|
||||
uint16_t freq_dom_resource_assignment_UL; // 8 FREQ_DOM_RESOURCE_ASSIGNMENT_UL: PUSCH hopping with resource allocation type 1 not considered
|
||||
// (NOTE 1) If DCI format 0_0 is monitored in common search space
|
||||
// and if the number of information bits in the DCI format 0_0 prior to padding
|
||||
// is larger than the payload size of the DCI format 1_0 monitored in common search space
|
||||
// the bitwidth of the frequency domain resource allocation field in the DCI format 0_0
|
||||
// is reduced such that the size of DCI format 0_0 equals to the size of the DCI format 1_0
|
||||
uint16_t freq_dom_resource_assignment_DL; // 9 FREQ_DOM_RESOURCE_ASSIGNMENT_DL:
|
||||
uint8_t time_dom_resource_assignment ; // 10 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 6.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits,
|
||||
// where I the number of entries in the higher layer parameter pusch-AllocationList
|
||||
uint8_t vrb_to_prb_mapping ; // 11 VRB_TO_PRB_MAPPING: 0 bit if only resource allocation type 0
|
||||
uint8_t prb_bundling_size_ind ; // 12 PRB_BUNDLING_SIZE_IND:0 bit if the higher layer parameter PRB_bundling is not configured or is set to 'static', or 1 bit if the higher layer parameter PRB_bundling is set to 'dynamic' according to Subclause 5.1.2.3 of [6, TS 38.214]
|
||||
uint8_t rate_matching_ind ; // 13 RATE_MATCHING_IND: 0, 1, or 2 bits according to higher layer parameter rate-match-PDSCH-resource-set
|
||||
uint8_t zp_csi_rs_trigger ; // 14 ZP_CSI_RS_TRIGGER:
|
||||
uint8_t freq_hopping_flag ; // 15 FREQ_HOPPING_FLAG: 0 bit if only resource allocation type 0
|
||||
uint8_t tb1_mcs ; // 16 TB1_MCS:
|
||||
uint8_t tb1_ndi ; // 17 TB1_NDI:
|
||||
uint8_t tb1_rv ; // 18 TB1_RV:
|
||||
uint8_t tb2_mcs ; // 19 TB2_MCS:
|
||||
uint8_t tb2_ndi ; // 20 TB2_NDI:
|
||||
uint8_t tb2_rv ; // 21 TB2_RV:
|
||||
uint8_t mcs ; // 22 MCS:
|
||||
uint8_t ndi ; // 23 NDI:
|
||||
uint8_t rv ; // 24 RV:
|
||||
uint8_t harq_process_number ; // 25 HARQ_PROCESS_NUMBER:
|
||||
uint8_t dai ; // 26 DAI: For format1_1: 4 if more than one serving cell are configured in the DL and the higher layer parameter HARQ-ACK-codebook=dynamic, where the 2 MSB bits are the counter DAI and the 2 LSB bits are the total DAI
|
||||
// 2 if one serving cell is configured in the DL and the higher layer parameter HARQ-ACK-codebook=dynamic, where the 2 bits are the counter DAI
|
||||
// 0 otherwise
|
||||
uint8_t first_dai ; // 27 FIRST_DAI: (1 or 2 bits) 1 bit for semi-static HARQ-ACK
|
||||
uint8_t second_dai ; // 28 SECOND_DAI: (0 or 2 bits) 2 bits for dynamic HARQ-ACK codebook with two HARQ-ACK sub-codebooks
|
||||
uint8_t tpc_pusch ; // 29 TPC_PUSCH:
|
||||
uint8_t tpc_pucch ; // 30 TPC_PUCCH:
|
||||
uint8_t pucch_resource_ind ; // 31 PUCCH_RESOURCE_IND:
|
||||
uint8_t pdsch_to_harq_feedback_time_ind ; // 32 PDSCH_TO_HARQ_FEEDBACK_TIME_IND:
|
||||
uint8_t short_message_ind ; // 33 SHORT_MESSAGE_IND: 1 bit if crc scrambled with P-RNTI
|
||||
uint8_t srs_resource_ind ; // 34 SRS_RESOURCE_IND:
|
||||
uint8_t precod_nbr_layers ; // 35 PRECOD_NBR_LAYERS:
|
||||
uint8_t antenna_ports ; // 36 ANTENNA_PORTS:
|
||||
uint8_t tci ; // 37 TCI: 0 bit if higher layer parameter tci-PresentInDCI is not enabled; otherwise 3 bits
|
||||
uint8_t srs_request ; // 38 SRS_REQUEST:
|
||||
uint8_t tpc_cmd_number_format2_3 ; // 39 TPC_CMD_NUMBER_FORMAT2_3:
|
||||
uint8_t csi_request ; // 40 CSI_REQUEST:
|
||||
uint8_t cbgti ; // 41 CBGTI: 0, 2, 4, 6, or 8 bits determined by higher layer parameter maxCodeBlockGroupsPerTransportBlock for the PDSCH
|
||||
uint8_t cbgfi ; // 42 CBGFI: 0 or 1 bit determined by higher layer parameter codeBlockGroupFlushIndicator
|
||||
uint8_t ptrs_dmrs ; // 43 PTRS_DMRS:
|
||||
uint8_t beta_offset_ind ; // 44 BETA_OFFSET_IND:
|
||||
uint8_t dmrs_seq_ini ; // 45 DMRS_SEQ_INI: 1 bit if the cell has two ULs and the number of bits for DCI format 1_0 before padding
|
||||
// is larger than the number of bits for DCI format 0_0 before padding; 0 bit otherwise
|
||||
uint8_t sul_ind_0_0 ; // 46 SUL_IND_0_0:
|
||||
uint16_t padding ; // 47 PADDING: (Note 2) If DCI format 0_0 is monitored in common search space
|
||||
// and if the number of information bits in the DCI format 0_0 prior to padding
|
||||
// is less than the payload size of the DCI format 1_0 monitored in common search space
|
||||
// zeros shall be appended to the DCI format 0_0
|
||||
// until the payload size equals that of the DCI format 1_0
|
||||
|
||||
uint8_t short_message_ind ; // 8 SHORT_MESSAGE_IND:
|
||||
uint8_t short_messages ; // 9 SHORT_MESSAGES:
|
||||
uint16_t freq_dom_resource_assignment_UL; // 10 FREQ_DOM_RESOURCE_ASSIGNMENT_UL: PUSCH hopping with resource allocation type 1 not considered
|
||||
// (NOTE 1) If DCI format 0_0 is monitored in common search space
|
||||
// and if the number of information bits in the DCI format 0_0 prior to padding
|
||||
// is larger than the payload size of the DCI format 1_0 monitored in common search space
|
||||
// the bitwidth of the frequency domain resource allocation field in the DCI format 0_0
|
||||
// is reduced such that the size of DCI format 0_0 equals to the size of the DCI format 1_0
|
||||
uint16_t freq_dom_resource_assignment_DL; // 11 FREQ_DOM_RESOURCE_ASSIGNMENT_DL:
|
||||
uint8_t time_dom_resource_assignment ; // 12 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 6.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits,
|
||||
// where I the number of entries in the higher layer parameter pusch-AllocationList
|
||||
uint8_t vrb_to_prb_mapping ; // 13 VRB_TO_PRB_MAPPING: 0 bit if only resource allocation type 0
|
||||
uint8_t prb_bundling_size_ind ; // 14 PRB_BUNDLING_SIZE_IND:0 bit if the higher layer parameter PRB_bundling is not configured or is set to 'static', or 1 bit if the higher layer parameter PRB_bundling is set to 'dynamic' according to Subclause 5.1.2.3 of [6, TS 38.214]
|
||||
uint8_t rate_matching_ind ; // 15 RATE_MATCHING_IND: 0, 1, or 2 bits according to higher layer parameter rate-match-PDSCH-resource-set
|
||||
uint8_t zp_csi_rs_trigger ; // 16 ZP_CSI_RS_TRIGGER:
|
||||
uint8_t freq_hopping_flag ; // 17 FREQ_HOPPING_FLAG: 0 bit if only resource allocation type 0
|
||||
uint8_t tb1_mcs ; // 18 TB1_MCS:
|
||||
uint8_t tb1_ndi ; // 19 TB1_NDI:
|
||||
uint8_t tb1_rv ; // 20 TB1_RV:
|
||||
uint8_t tb2_mcs ; // 21 TB2_MCS:
|
||||
uint8_t tb2_ndi ; // 22 TB2_NDI:
|
||||
uint8_t tb2_rv ; // 23 TB2_RV:
|
||||
uint8_t mcs ; // 24 MCS:
|
||||
uint8_t ndi ; // 25 NDI:
|
||||
uint8_t rv ; // 26 RV:
|
||||
uint8_t harq_process_number ; // 27 HARQ_PROCESS_NUMBER:
|
||||
uint8_t dai ; // 28 DAI: For format1_1: 4 if more than one serving cell are configured in the DL and the higher layer parameter HARQ-ACK-codebook=dynamic, where the 2 MSB bits are the counter DAI and the 2 LSB bits are the total DAI
|
||||
// 2 if one serving cell is configured in the DL and the higher layer parameter HARQ-ACK-codebook=dynamic, where the 2 bits are the counter DAI
|
||||
// 0 otherwise
|
||||
uint8_t first_dai ; // 29 FIRST_DAI: (1 or 2 bits) 1 bit for semi-static HARQ-ACK
|
||||
uint8_t second_dai ; // 30 SECOND_DAI: (0 or 2 bits) 2 bits for dynamic HARQ-ACK codebook with two HARQ-ACK sub-codebooks
|
||||
uint8_t tb_scaling ; // 31 TB_SCALING:
|
||||
uint8_t tpc_pusch ; // 32 TPC_PUSCH:
|
||||
uint8_t tpc_pucch ; // 33 TPC_PUCCH:
|
||||
uint8_t pucch_resource_ind ; // 34 PUCCH_RESOURCE_IND:
|
||||
uint8_t pdsch_to_harq_feedback_time_ind ; // 35 PDSCH_TO_HARQ_FEEDBACK_TIME_IND:
|
||||
uint8_t srs_resource_ind ; // 36 SRS_RESOURCE_IND:
|
||||
uint8_t precod_nbr_layers ; // 37 PRECOD_NBR_LAYERS:
|
||||
uint8_t antenna_ports ; // 38 ANTENNA_PORTS:
|
||||
uint8_t tci ; // 39 TCI: 0 bit if higher layer parameter tci-PresentInDCI is not enabled; otherwise 3 bits
|
||||
uint8_t srs_request ; // 40 SRS_REQUEST:
|
||||
uint8_t tpc_cmd_number_format2_3 ; // 41 TPC_CMD_NUMBER_FORMAT2_3:
|
||||
uint8_t csi_request ; // 42 CSI_REQUEST:
|
||||
uint8_t cbgti ; // 43 CBGTI: 0, 2, 4, 6, or 8 bits determined by higher layer parameter maxCodeBlockGroupsPerTransportBlock for the PDSCH
|
||||
uint8_t cbgfi ; // 44 CBGFI: 0 or 1 bit determined by higher layer parameter codeBlockGroupFlushIndicator
|
||||
uint8_t ptrs_dmrs ; // 45 PTRS_DMRS:
|
||||
uint8_t beta_offset_ind ; // 46 BETA_OFFSET_IND:
|
||||
uint8_t dmrs_seq_ini ; // 47 DMRS_SEQ_INI: 1 bit if the cell has two ULs and the number of bits for DCI format 1_0 before padding
|
||||
// is larger than the number of bits for DCI format 0_0 before padding; 0 bit otherwise
|
||||
uint8_t ul_sch_ind ; // 48 UL_SCH_IND: value of "1" indicates UL-SCH shall be transmitted on the PUSCH and a value of "0" indicates UL-SCH shall not be transmitted on the PUSCH
|
||||
uint16_t padding_nr_dci ; // 49 PADDING_NR_DCI: (Note 2) If DCI format 0_0 is monitored in common search space
|
||||
// and if the number of information bits in the DCI format 0_0 prior to padding
|
||||
// is less than the payload size of the DCI format 1_0 monitored in common search space
|
||||
// zeros shall be appended to the DCI format 0_0
|
||||
// until the payload size equals that of the DCI format 1_0
|
||||
uint8_t sul_ind_0_0 ; // 50 SUL_IND_0_0:
|
||||
uint8_t ra_preamble_index ; // 51 RA_PREAMBLE_INDEX:
|
||||
uint8_t sul_ind_1_0 ; // 52 SUL_IND_1_0:
|
||||
uint8_t ss_pbch_index ; // 53 SS_PBCH_INDEX
|
||||
uint8_t prach_mask_index ; // 54 PRACH_MASK_INDEX
|
||||
uint8_t reserved_nr_dci ; // 55 RESERVED_NR_DCI
|
||||
};
|
||||
typedef struct NR_DCI_INFO_EXTRACTED NR_DCI_INFO_EXTRACTED_t;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -3951,25 +3951,23 @@ int dump_dci(NR_DL_FRAME_PARMS *frame_parms, DCI_ALLOC_t *dci)
|
||||
}
|
||||
#endif //(0)
|
||||
#ifdef NR_PDCCH_DCI_TOOLS
|
||||
|
||||
int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
||||
uint8_t eNB_id,
|
||||
lte_frame_type_t frame_type,
|
||||
uint8_t dci_length,
|
||||
uint16_t rnti,
|
||||
void *dci_pdu,
|
||||
NR_DCI_INFO_EXTRACTED_t *nr_pdci_info_extracted,
|
||||
uint8_t dci_fields_sizes[48],
|
||||
uint8_t dci_fields_sizes[NBR_NR_DCI_FIELDS][NBR_NR_FORMATS],
|
||||
NR_DL_UE_HARQ_t *pdlsch0_harq,
|
||||
NR_UE_DLSCH_t *pdlsch0,
|
||||
NR_UE_ULSCH_t *ulsch0,
|
||||
NR_DCI_format_t dci_format,
|
||||
uint8_t nr_tti_rx,
|
||||
uint16_t rnti,
|
||||
uint16_t si_rnti,
|
||||
uint16_t p_rnti,
|
||||
uint16_t ra_rnti,
|
||||
uint16_t tc_rnti,
|
||||
uint16_t n_RB_ULBWP,
|
||||
uint16_t n_RB_DLBWP)
|
||||
uint16_t n_RB_DLBWP,
|
||||
uint16_t crc_scrambled_values[TOTAL_NBR_SCRAMBLED_VALUES])
|
||||
{
|
||||
/*
|
||||
* This function will extract the different elements of the dci pdu and interpret the values extracted to update correctly the parameters in:
|
||||
@@ -3979,7 +3977,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
||||
* We need to know the dci length and the dci_fields_sizes (array containing each field size in number of bits)
|
||||
* In order to get the value of a specific field we will proceed as follows (let's have a look to an example:
|
||||
* If the length of the pdu is 38 bits and the content of the dci_pdu is 0x3A8900789A (pdu is 11 1010 1000 1001 0000 0000 0111 1000 1001 1010)
|
||||
* If the dci_fields_sizes is {0 0 1 0 0 0 0 0 0 13 0 1 0 0 0 0 0 0 0 0 0 0 5 1 2 4 2 0 0 0 2 3 3 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0}
|
||||
* If the dci_fields_sizes is {0 0 1 0 0 0 0 0 0 13 0 1 0 0 0 0 0 0 0 0 0 0 5 1 2 4 2 0 0 0 2 3 3 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...}
|
||||
* This means:
|
||||
* number bits for carrier_ind field is 0
|
||||
* number bits for sul_ind_0_1 field is 0
|
||||
@@ -3997,33 +3995,39 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
||||
*
|
||||
* At the moment we have implemented:
|
||||
* Format 0_0, that contains the following fields according to Specification 38.212 V15.1.1 Section 7.3.1
|
||||
* 2 IDENTIFIER_DCI_FORMATS:
|
||||
* 8 FREQ_DOM_RESOURCE_ASSIGNMENT_UL: PUSCH hopping with resource allocation type 1 not considered
|
||||
* 10 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 6.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits,
|
||||
* 15 FREQ_HOPPING_FLAG: 0 bit if only resource allocation type 0
|
||||
* 22 MCS:
|
||||
* 23 NDI:
|
||||
* 24 RV:
|
||||
* 25 HARQ_PROCESS_NUMBER:
|
||||
* 29 TPC_PUSCH:
|
||||
* 46 SUL_IND_0_0:
|
||||
* 47 PADDING: (Note 2) If DCI format 0_0 is monitored in common search space
|
||||
* 0 IDENTIFIER_DCI_FORMATS:
|
||||
* 10 FREQ_DOM_RESOURCE_ASSIGNMENT_UL: PUSCH hopping with resource allocation type 1 not considered
|
||||
* 12 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 6.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits,
|
||||
* 17 FREQ_HOPPING_FLAG: 0 bit if only resource allocation type 0
|
||||
* 24 MCS:
|
||||
* 25 NDI:
|
||||
* 26 RV:
|
||||
* 27 HARQ_PROCESS_NUMBER:
|
||||
* 32 TPC_PUSCH:
|
||||
* 49 PADDING_NR_DCI: (Note 2) If DCI format 0_0 is monitored in common search space
|
||||
* 50 SUL_IND_0_0:
|
||||
*
|
||||
* Format 1_0, that contains the following fields
|
||||
* 2 IDENTIFIER_DCI_FORMATS:
|
||||
* 9 FREQ_DOM_RESOURCE_ASSIGNMENT_DL:
|
||||
* 10 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 5.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits,
|
||||
* 11 VRB_TO_PRB_MAPPING: 0 bit if only resource allocation type 0
|
||||
* 22 MCS:
|
||||
* 23 NDI:
|
||||
* 24 RV:
|
||||
* 25 HARQ_PROCESS_NUMBER:
|
||||
* 26 DAI: For format1_1: 4 if more than one serving cell are configured in the DL and the higher layer parameter HARQ-ACK-codebook=dynamic, where the 2 MSB bits are the counter DAI and the 2 LSB bits are the total DAI
|
||||
* 30 TPC_PUCCH:
|
||||
* 31 PUCCH_RESOURCE_IND:
|
||||
* 32 PDSCH_TO_HARQ_FEEDBACK_TIME_IND:
|
||||
* 33 SHORT_MESSAGE_IND: 1 bit if crc scrambled with P-RNTI
|
||||
* 47 PADDING: (Note 2) If DCI format 0_0 is monitored in common search space
|
||||
* 0 IDENTIFIER_DCI_FORMATS:
|
||||
* 8 SHORT_MESSAGE_IND
|
||||
* 9 SHORT_MESSAGES
|
||||
* 11 FREQ_DOM_RESOURCE_ASSIGNMENT_DL:
|
||||
* 12 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 5.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits,
|
||||
* 13 VRB_TO_PRB_MAPPING: 0 bit if only resource allocation type 0
|
||||
* 24 MCS:
|
||||
* 25 NDI:
|
||||
* 26 RV:
|
||||
* 27 HARQ_PROCESS_NUMBER:
|
||||
* 28 DAI_: For format1_1: 4 if more than one serving cell are configured in the DL and the higher layer parameter HARQ-ACK-codebook=dynamic, where the 2 MSB bits are the counter DAI and the 2 LSB bits are the total DAI
|
||||
* 31 TB_SCALING
|
||||
* 33 TPC_PUCCH:
|
||||
* 34 PUCCH_RESOURCE_IND:
|
||||
* 35 PDSCH_TO_HARQ_FEEDBACK_TIME_IND:
|
||||
* 51 RA_PREAMBLE_INDEX:
|
||||
* 52 SUL_IND_1_0:
|
||||
* 53 SS_PBCH_INDEX:
|
||||
* 54 PRACH_MASK_INDEX:
|
||||
* 55 RESERVED_NR_DCI
|
||||
*
|
||||
*/
|
||||
uint64_t pdu_bitmap = 0xFFFFFFFFFFFFFFFF;
|
||||
@@ -4031,12 +4035,13 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
||||
uint8_t dci_field=0;
|
||||
uint8_t sizes_count=0;
|
||||
uint8_t left_shift=0;
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> Entering function nr_extract_dci_info() with dci_pdu=%llx with pdu_bitmap=%llx dci_length=%d\n",(*(uint64_t *)dci_pdu), pdu_bitmap, dci_length);
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> dci_fields_sizes {");
|
||||
for (int i=0; i<NBR_NR_DCI_FIELDS; i++) printf("%d ",dci_fields_sizes[i]);
|
||||
printf("}\n");
|
||||
#endif
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> Entering function nr_extract_dci_info() with dci_pdu=%llx with pdu_bitmap=%llx dci_length=%d\n",(*(uint64_t *)dci_pdu), pdu_bitmap, dci_length);
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> for format %d, dci_fields_sizes {",dci_format-15);
|
||||
for (int i=0; i<NBR_NR_DCI_FIELDS; i++) printf("%d ",dci_fields_sizes[i][dci_format-15]);
|
||||
printf("}\n");
|
||||
#endif
|
||||
|
||||
uint8_t prev_ndi = pdlsch0_harq->DCINdi;
|
||||
uint16_t l_RB;
|
||||
uint16_t start_RB;
|
||||
@@ -4045,12 +4050,13 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
||||
uint16_t start_symbol;
|
||||
uint16_t tmp_symbol;
|
||||
|
||||
|
||||
/*
|
||||
* Some dci fields need to be interpreted before the others.
|
||||
*/
|
||||
if (dci_fields_sizes[HARQ_PROCESS_NUMBER] != 0) { // E.g: 25 HARQ_PROCESS_NUMBER (25 is the position in dci_fields_sizes array for field HARQ_PROCESS_NUMBER)
|
||||
for (int i=0; i<=HARQ_PROCESS_NUMBER; i++) left_shift = left_shift + dci_fields_sizes[i];
|
||||
nr_pdci_info_extracted->harq_process_number = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[HARQ_PROCESS_NUMBER]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[HARQ_PROCESS_NUMBER]));
|
||||
if (dci_fields_sizes[HARQ_PROCESS_NUMBER][dci_format-15] != 0) { // E.g: 27 HARQ_PROCESS_NUMBER (27 is the position in dci_fields_sizes array for field HARQ_PROCESS_NUMBER)
|
||||
for (int i=0; i<=HARQ_PROCESS_NUMBER; i++) left_shift = left_shift + dci_fields_sizes[i][dci_format-15];
|
||||
nr_pdci_info_extracted->harq_process_number = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[HARQ_PROCESS_NUMBER][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[HARQ_PROCESS_NUMBER][dci_format-15]));
|
||||
left_shift = 0;
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->harq_process_number=%x\n",nr_pdci_info_extracted->harq_process_number);
|
||||
@@ -4058,11 +4064,11 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
||||
}
|
||||
|
||||
if ((dci_format == format1_0) || (dci_format == format1_1)) {
|
||||
if (rnti==si_rnti) {
|
||||
if (rnti==crc_scrambled_values[_SI_RNTI_]) {
|
||||
ue->dlsch_SI[eNB_id]->active = 1;
|
||||
} else if (rnti==p_rnti) {
|
||||
} else if (rnti==crc_scrambled_values[_P_RNTI_]) {
|
||||
ue->dlsch_p[eNB_id]->active = 1;
|
||||
} else if (rnti==ra_rnti) {
|
||||
} else if (rnti==crc_scrambled_values[_RA_RNTI_]) {
|
||||
ue->dlsch_ra[eNB_id]->active = 1;
|
||||
} else {
|
||||
pdlsch0->active = 1;
|
||||
@@ -4073,7 +4079,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
||||
// pdlsch0_harq->mimo_mode = frame_parms->mode1_flag == 1 ?SISO : ALAMOUTI;
|
||||
pdlsch0_harq->dl_power_off = 1; //no power offset
|
||||
|
||||
if ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti)) {
|
||||
if ((rnti==crc_scrambled_values[_SI_RNTI_]) || (rnti==crc_scrambled_values[_P_RNTI_]) || (rnti==crc_scrambled_values[_RA_RNTI_])) {
|
||||
pdlsch0_harq->round = 0;
|
||||
pdlsch0_harq->status = ACTIVE;
|
||||
} else {
|
||||
@@ -4081,77 +4087,91 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
||||
}
|
||||
|
||||
for (dci_field=0; dci_field<NBR_NR_DCI_FIELDS; dci_field++) {
|
||||
left_shift = left_shift + dci_fields_sizes[dci_field];
|
||||
if (dci_fields_sizes[dci_field] != 0){
|
||||
sizes_count = dci_fields_sizes[dci_field];
|
||||
left_shift = left_shift + dci_fields_sizes[dci_field][dci_format-15];
|
||||
if (dci_fields_sizes[dci_field][dci_format-15] != 0){
|
||||
sizes_count = dci_fields_sizes[dci_field][dci_format-15];
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> sizes_count = dci_fields_sizes[%d] = %d\n",dci_field,sizes_count);
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> sizes_count = dci_fields_sizes[%d][%d] = %d\n",dci_field,dci_format-15,sizes_count);
|
||||
#endif
|
||||
|
||||
switch (dci_field){
|
||||
case 0: // 0 CARRIER_IND: (field defined for -,format0_1,-,format1_1,-,-,-,-)
|
||||
// 0 or 3 bits, as defined in Subclause x.x of [5, TS38.213]
|
||||
nr_pdci_info_extracted->carrier_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->carrier_ind=%x\n",nr_pdci_info_extracted->carrier_ind);
|
||||
#endif
|
||||
break;
|
||||
case 1: // 1 SUL_IND_0_1: (field defined for -,format0_1,-,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->sul_ind_0_1 = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->sul_ind_0_1=%x\n",nr_pdci_info_extracted->sul_ind_0_1);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 2: // 2 IDENTIFIER_DCI_FORMATS: (field defined for format0_0,format0_1,format1_0,format1_1,format2_0,format2_1,format2_2,format2_3)
|
||||
case IDENTIFIER_DCI_FORMATS: // 0 IDENTIFIER_DCI_FORMATS: (field defined for format0_0,format0_1,format1_0,format1_1,format2_0,format2_1,format2_2,format2_3)
|
||||
// if format 0_0: The value of this bit field is always set to 0, indicating an UL DCI format (TS38.212 Section 7.3.1.1.1)
|
||||
// if format 1_0: The value of this bit field is always set to 1, indicating a DL DCI format (TS38.212 Section 7.3.1.2.1)
|
||||
nr_pdci_info_extracted->identifier_dci_formats = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->identifier_dci_formats = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->identifier_dci_formats=%x\n",nr_pdci_info_extracted->identifier_dci_formats);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 3: // 3 SLOT_FORMAT_IND: (field defined for -,-,-,-,format2_0,-,-,-)
|
||||
case CARRIER_IND: // 1 CARRIER_IND: (field defined for -,format0_1,-,format1_1,-,-,-,-)
|
||||
// 0 or 3 bits, as defined in Subclause x.x of [5, TS38.213]
|
||||
nr_pdci_info_extracted->carrier_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->carrier_ind=%x\n",nr_pdci_info_extracted->carrier_ind);
|
||||
#endif
|
||||
break;
|
||||
case SUL_IND_0_1: // 2 SUL_IND_0_1: (field defined for -,format0_1,-,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->sul_ind_0_1 = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->sul_ind_0_1=%x\n",nr_pdci_info_extracted->sul_ind_0_1);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case SLOT_FORMAT_IND: // 3 SLOT_FORMAT_IND: (field defined for -,-,-,-,format2_0,-,-,-)
|
||||
// size of DCI format 2_0 is configurable by higher layers up to 128 bits, according to Subclause 11.1.1 of [5, TS 38.213]
|
||||
nr_pdci_info_extracted->slot_format_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->slot_format_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->slot_format_ind=%x\n",nr_pdci_info_extracted->slot_format_ind);
|
||||
#endif
|
||||
break;
|
||||
case 4: // 4 PRE_EMPTION_IND: (field defined for -,-,-,-,-,format2_1,-,-)
|
||||
case PRE_EMPTION_IND: // 4 PRE_EMPTION_IND: (field defined for -,-,-,-,-,format2_1,-,-)
|
||||
// size of DCI format 2_1 is configurable by higher layers up to 126 bits, according to Subclause 11.2 of [5, TS 38.213]. Each pre-emption indication is 14 bits
|
||||
nr_pdci_info_extracted->pre_emption_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->pre_emption_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->pre_emption_ind=%x\n",nr_pdci_info_extracted->pre_emption_ind);
|
||||
#endif
|
||||
break;
|
||||
case 5: // 5 TPC_CMD_NUMBER: (field defined for -,-,-,-,-,-,format2_2,-)
|
||||
case TPC_CMD_NUMBER: // 5 TPC_CMD_NUMBER: (field defined for -,-,-,-,-,-,format2_2,-)
|
||||
// The parameter xxx provided by higher layers determines the index to the TPC command number for an UL of a cell. Each TPC command number is 2 bits
|
||||
nr_pdci_info_extracted->tpc_cmd_number = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->tpc_cmd_number = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tpc_cmd_number=%x\n",nr_pdci_info_extracted->tpc_cmd_number);
|
||||
#endif
|
||||
break;
|
||||
case 6: // 6 BLOCK_NUMBER: (field defined for -,-,-,-,-,-,-,format2_3)
|
||||
case BLOCK_NUMBER: // 6 BLOCK_NUMBER: (field defined for -,-,-,-,-,-,-,format2_3)
|
||||
// starting position of a block is determined by the parameter startingBitOfFormat2_3
|
||||
nr_pdci_info_extracted->block_number = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->block_number = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->block_number=%x\n",nr_pdci_info_extracted->block_number);
|
||||
#endif
|
||||
break;
|
||||
case 7: // 7 BANDWIDTH_PART_IND: (field defined for -,format0_1,-,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->bandwidth_part_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case BANDWIDTH_PART_IND: // 7 BANDWIDTH_PART_IND: (field defined for -,format0_1,-,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->bandwidth_part_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->bandwidth_part_ind=%x\n",nr_pdci_info_extracted->bandwidth_part_ind);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 8: // 8 FREQ_DOM_RESOURCE_ASSIGNMENT_UL: (field defined for format0_0,format0_1,-,-,-,-,-,-)
|
||||
case SHORT_MESSAGE_IND: // 8 SHORT_MESSAGE_IND: (field defined for -,-,format1_0,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->short_message_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->short_message_ind=%x\n",nr_pdci_info_extracted->short_message_ind);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case SHORT_MESSAGES: // 9 SHORT_MESSAGES: (field defined for -,-,format1_0,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->short_messages = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->short_messages=%x\n",nr_pdci_info_extracted->short_messages);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case FREQ_DOM_RESOURCE_ASSIGNMENT_UL: // 10 FREQ_DOM_RESOURCE_ASSIGNMENT_UL: (field defined for format0_0,format0_1,-,-,-,-,-,-)
|
||||
// PUSCH hopping with resource allocation type 1 not considered
|
||||
// According to 38.214 V15.1.0 Section 6.1.2.2 Two uplink resource allocation schemes, type 0 and type 1, are supported.
|
||||
// The UE shall assume that when the scheduling PDCCH is received with DCI format 0_0, then uplink resource allocation type 1 is used.
|
||||
nr_pdci_info_extracted->freq_dom_resource_assignment_UL = (uint16_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->freq_dom_resource_assignment_UL = (uint16_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
if (dci_format == format0_1){ // uplink resource allocation type 0 or 1 can be used
|
||||
}
|
||||
if (dci_format == format0_0){ // only uplink resource allocation type 1
|
||||
@@ -4177,10 +4197,10 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 9: // 9 FREQ_DOM_RESOURCE_ASSIGNMENT_DL: (field defined for -,-,format1_0,format1_1,-,-,-,-)
|
||||
case FREQ_DOM_RESOURCE_ASSIGNMENT_DL: // 11 FREQ_DOM_RESOURCE_ASSIGNMENT_DL: (field defined for -,-,format1_0,format1_1,-,-,-,-)
|
||||
// According to 38.214 V15.1.0 Section 5.1.2.2 Two downlink resource allocation schemes, type 0 and type 1, are supported.
|
||||
// The UE shall assume that when the scheduling grant is received with DCI format 1_0, then downlink resource allocation type 1 is used.
|
||||
nr_pdci_info_extracted->freq_dom_resource_assignment_DL = (uint16_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->freq_dom_resource_assignment_DL = (uint16_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
if (dci_format == format1_1){ // uplink resource allocation type 0 or 1 can be used
|
||||
}
|
||||
if (dci_format == format1_0){ // only uplink resource allocation type 1
|
||||
@@ -4205,7 +4225,20 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->freq_dom_resource_assignment_DL=%x, RIV = %d\n",nr_pdci_info_extracted->freq_dom_resource_assignment_DL,nr_pdci_info_extracted->freq_dom_resource_assignment_DL);
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> l_RB=%d, start_RB=%d, n_RB_DLBWP=%d\n",l_RB,start_RB,n_RB_DLBWP);
|
||||
/*
|
||||
/*
|
||||
* According to TC 38.212 Subclause 7.3.1.2.1 (V15.2.0) (not implemented FIXME!!!)
|
||||
* If the CRC of the DCI format 1_0 is scrambled by C-RNTI
|
||||
* and the "Frequency domain resource assignment" field are of all ones,
|
||||
* the DCI format 1_0 is for random access procedure initiated by a PDCCH order,
|
||||
* with all remaining fields set as follows:
|
||||
* - Random Access Preamble index (6 bits)
|
||||
* - UL/SUL indicator (1 bit)
|
||||
* - SS/PBCH index (6 bits)
|
||||
* - PRACH Mask index (4 bits)
|
||||
* - Reserved bits (10 bits)
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* The following commented code is used to verify that l_RB and start_RB are correctly calculated
|
||||
*
|
||||
*
|
||||
@@ -4235,13 +4268,13 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 10: // 10 TIME_DOM_RESOURCE_ASSIGNMENT: (field defined for format0_0,format0_1,format1_0,format1_1,-,-,-,-)
|
||||
case TIME_DOM_RESOURCE_ASSIGNMENT: // 12 TIME_DOM_RESOURCE_ASSIGNMENT: (field defined for format0_0,format0_1,format1_0,format1_1,-,-,-,-)
|
||||
// 0, 1, 2, 3, or 4 bits as defined in:
|
||||
// Subclause 6.1.2.1 of [6, TS 38.214] for formats format0_0,format0_1
|
||||
// Subclause 5.1.2.1 of [6, TS 38.214] for formats format1_0,format1_1
|
||||
// The bitwidth for this field is determined as log2(I) bits,
|
||||
// where I the number of entries in the higher layer parameter pusch-AllocationList
|
||||
nr_pdci_info_extracted->time_dom_resource_assignment = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->time_dom_resource_assignment = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
if (dci_format == format0_0 || dci_format == format0_1){ // Subclause 6.1.2.1 of [6, TS 38.214]
|
||||
|
||||
}
|
||||
@@ -4254,13 +4287,13 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 11: // 11 VRB_TO_PRB_MAPPING: (field defined for -,format0_1,format1_0,format1_1,-,-,-,-)
|
||||
case VRB_TO_PRB_MAPPING: // 13 VRB_TO_PRB_MAPPING: (field defined for -,format0_1,format1_0,format1_1,-,-,-,-)
|
||||
//0 bit if resource allocation type 0
|
||||
//1 bit if resource allocation type 1
|
||||
//Table 7.3.1.1.2-33: VRB-to-PRB mapping
|
||||
// 0 Non-interleaved
|
||||
// 1 Interleaved
|
||||
nr_pdci_info_extracted->vrb_to_prb_mapping = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->vrb_to_prb_mapping = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
if (nr_pdci_info_extracted->vrb_to_prb_mapping == 0) { // Non-interleaved
|
||||
} else { // Interleaved
|
||||
// format 0_1 defined in TS 38.211 Section 6.3.1.7
|
||||
@@ -4271,31 +4304,31 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 12: // 12 PRB_BUNDLING_SIZE_IND: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
case PRB_BUNDLING_SIZE_IND: // 14 PRB_BUNDLING_SIZE_IND: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
// 0 bit if the higher layer parameter PRB_bundling is not configured or is set to 'static', or 1 bit if the higher layer parameter PRB_bundling is set to 'dynamic' according to Subclause 5.1.2.3 of [6, TS 38.214]
|
||||
nr_pdci_info_extracted->prb_bundling_size_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->prb_bundling_size_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->prb_bundling_size_ind=%x\n",nr_pdci_info_extracted->prb_bundling_size_ind);
|
||||
#endif
|
||||
break;
|
||||
case 13: // 13 RATE_MATCHING_IND: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
case RATE_MATCHING_IND: // 15 RATE_MATCHING_IND: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
// 0, 1, or 2 bits according to higher layer parameter rate-match-PDSCH-resource-set
|
||||
nr_pdci_info_extracted->rate_matching_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->rate_matching_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->rate_matching_ind=%x\n",nr_pdci_info_extracted->rate_matching_ind);
|
||||
#endif
|
||||
break;
|
||||
case 14: // 14 ZP_CSI_RS_TRIGGER: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->zp_csi_rs_trigger = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case ZP_CSI_RS_TRIGGER: // 16 ZP_CSI_RS_TRIGGER: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->zp_csi_rs_trigger = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->zp_csi_rs_trigger=%x\n",nr_pdci_info_extracted->zp_csi_rs_trigger);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 15: // 15 FREQ_HOPPING_FLAG: (field defined for format0_0,format0_1,-,-,-,-,-,-)
|
||||
case FREQ_HOPPING_FLAG: // 17 FREQ_HOPPING_FLAG: (field defined for format0_0,format0_1,-,-,-,-,-,-)
|
||||
// 0 bit if only resource allocation type 0
|
||||
// 1 bit otherwise, only applicable to resource allocation type 1, as defined in Subclause 6.3 of [6, TS 38.214]
|
||||
nr_pdci_info_extracted->freq_hopping_flag = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->freq_hopping_flag = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
if (nr_pdci_info_extracted->freq_hopping_flag != 0) { // PUSCH frequency hopping is performed (only resource allocation type 1)
|
||||
|
||||
} else { // PUSCH frequency hopping is not performed (only resource allocation type 1)
|
||||
@@ -4306,51 +4339,51 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 16: // 16 TB1_MCS: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->tb1_mcs = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case TB1_MCS: // 18 TB1_MCS: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->tb1_mcs = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
if (nr_pdci_info_extracted->mcs < 29) pdlsch0_harq->mcs = nr_pdci_info_extracted->tb1_mcs;
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tb1_mcs=%x\n",nr_pdci_info_extracted->tb1_mcs);
|
||||
#endif
|
||||
break;
|
||||
case 17: // 17 TB1_NDI: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->tb1_ndi = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case TB1_NDI: // 19 TB1_NDI: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->tb1_ndi = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
pdlsch0_harq->DCINdi = nr_pdci_info_extracted->tb1_ndi;
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tb1_ndi=%x\n",nr_pdci_info_extracted->tb1_ndi);
|
||||
#endif
|
||||
break;
|
||||
case 18: // 18 TB1_RV: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->tb1_rv = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case TB1_RV: // 20 TB1_RV: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->tb1_rv = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
pdlsch0_harq->rvidx = nr_pdci_info_extracted->tb1_rv;
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tb1_rv=%x\n",nr_pdci_info_extracted->tb1_rv);
|
||||
#endif
|
||||
break;
|
||||
case 19: // 19 TB2_MCS: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->tb2_mcs = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case TB2_MCS: // 21 TB2_MCS: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->tb2_mcs = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
if (nr_pdci_info_extracted->mcs < 29) pdlsch0_harq->mcs = nr_pdci_info_extracted->tb2_mcs;
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tb2_mcs=%x\n",nr_pdci_info_extracted->tb2_mcs);
|
||||
#endif
|
||||
break;
|
||||
case 20: // 20 TB2_NDI: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->tb2_ndi = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case TB2_NDI: // 22 TB2_NDI: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->tb2_ndi = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
pdlsch0_harq->DCINdi = nr_pdci_info_extracted->tb2_ndi;
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tb2_ndi=%x\n",nr_pdci_info_extracted->tb2_ndi);
|
||||
#endif
|
||||
break;
|
||||
case 21: // 21 TB2_RV: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->tb2_rv = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case TB2_RV: // 23 TB2_RV: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->tb2_rv = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
pdlsch0_harq->rvidx = nr_pdci_info_extracted->tb2_rv;
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tb2_rv=%x\n",nr_pdci_info_extracted->tb2_rv);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 22: // 22 MCS: (field defined for format0_0,format0_1,format1_0,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->mcs = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case MCS: // 24 MCS: (field defined for format0_0,format0_1,format1_0,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->mcs = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
if (nr_pdci_info_extracted->mcs < 29) {
|
||||
if (dci_format == format0_0 || dci_format == format0_1)
|
||||
ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->mcs = nr_pdci_info_extracted->mcs;
|
||||
@@ -4364,8 +4397,8 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 23: // 23 NDI: (field defined for format0_0,format0_1,format1_0,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->ndi = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case NDI: // 25 NDI: (field defined for format0_0,format0_1,format1_0,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->ndi = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
if (dci_format == format0_0 || dci_format == format0_1) {
|
||||
ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->DCINdi = nr_pdci_info_extracted->ndi;
|
||||
if (ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->first_tx==1) {
|
||||
@@ -4379,7 +4412,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (rnti == tc_rnti) { //fix for standalone Contention Resolution Id
|
||||
if (rnti == crc_scrambled_values[_TC_RNTI_]) { //fix for standalone Contention Resolution Id
|
||||
pdlsch0_harq->DCINdi = (uint8_t)-1;
|
||||
} else {
|
||||
if ((prev_ndi != nr_pdci_info_extracted->ndi) || (pdlsch0_harq->first_tx==1)) {
|
||||
@@ -4395,8 +4428,8 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 24: // 24 RV: (field defined for format0_0,format0_1,format1_0,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->rv = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case RV: // 26 RV: (field defined for format0_0,format0_1,format1_0,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->rv = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
if (dci_format == format0_0 || dci_format == format0_1)
|
||||
ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->rvidx = nr_pdci_info_extracted->rv;
|
||||
else
|
||||
@@ -4420,44 +4453,52 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 25: // 25 HARQ_PROCESS_NUMBER: (field defined for format0_0,format0_1,format1_0,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->harq_process_number = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case HARQ_PROCESS_NUMBER: // 27 HARQ_PROCESS_NUMBER: (field defined for format0_0,format0_1,format1_0,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->harq_process_number = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
pdlsch0->current_harq_pid = nr_pdci_info_extracted->harq_process_number;
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->harq_process_number=%x\n",nr_pdci_info_extracted->harq_process_number);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 26: // 26 DAI: (field defined for -,-,format1_0,format1_1,-,-,-,-)
|
||||
case DAI_: // 28 DAI_: (field defined for -,-,format1_0,format1_1,-,-,-,-)
|
||||
// For format1_0: 2 bits as defined in Subclause 9.1.3 at TS 38.213
|
||||
// For format1_1: 4 if more than one serving cell are configured in the DL and the higher layer parameter HARQ-ACK-codebook=dynamic, where the 2 MSB bits are the counter DAI and the 2 LSB bits are the total DAI
|
||||
// 2 if one serving cell is configured in the DL and the higher layer parameter HARQ-ACK-codebook=dynamic, where the 2 bits are the counter DAI
|
||||
// 0 otherwise
|
||||
nr_pdci_info_extracted->dai = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->dai = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
pdlsch0->harq_ack[nr_tti_rx].vDAI_DL = nr_pdci_info_extracted->dai+1;
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->dai=%x\n",nr_pdci_info_extracted->dai);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 27: // 27 FIRST_DAI: (field defined for -,format0_1,-,-,-,-,-,-)
|
||||
case FIRST_DAI: // 29 FIRST_DAI: (field defined for -,format0_1,-,-,-,-,-,-)
|
||||
// (1 or 2 bits) 1 bit for semi-static HARQ-ACK
|
||||
nr_pdci_info_extracted->first_dai = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->first_dai = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->first_dai=%x\n",nr_pdci_info_extracted->first_dai);
|
||||
#endif
|
||||
break;
|
||||
case 28: // 28 SECOND_DAI: (field defined for -,format0_1,-,-,-,-,-,-)
|
||||
case SECOND_DAI: // 30 SECOND_DAI: (field defined for -,format0_1,-,-,-,-,-,-)
|
||||
// (0 or 2 bits) 2 bits for dynamic HARQ-ACK codebook with two HARQ-ACK sub-codebooks
|
||||
nr_pdci_info_extracted->second_dai = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->second_dai = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->second_dai=%x\n",nr_pdci_info_extracted->second_dai);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 29: // 29 TPC_PUSCH: (field defined for format0_0,format0_1,-,-,-,-,-,-)
|
||||
case TB_SCALING: // 31 TB_SCALING: (field defined for -,format0_1,-,-,-,-,-,-)
|
||||
// (0 or 2 bits) 2 bits for dynamic HARQ-ACK codebook with two HARQ-ACK sub-codebooks
|
||||
nr_pdci_info_extracted->tb_scaling = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tb_scaling=%x\n",nr_pdci_info_extracted->tb_scaling);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TPC_PUSCH: // 32 TPC_PUSCH: (field defined for format0_0,format0_1,-,-,-,-,-,-)
|
||||
// defined in Subclause 7.1.1 TS 38.213
|
||||
nr_pdci_info_extracted->tpc_pusch = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->tpc_pusch = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->TPC = nr_pdci_info_extracted->tpc_pusch;
|
||||
if (ue->ul_power_control_dedicated[eNB_id].accumulationEnabled == 1) {
|
||||
ulsch0->f_pusch += delta_PUSCH_acc[ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->TPC];
|
||||
@@ -4469,133 +4510,167 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 30: // 30 TPC_PUCCH: (field defined for -,-,format1_0,format1_1,-,-,-,-)
|
||||
case TPC_PUCCH: // 33 TPC_PUCCH: (field defined for -,-,format1_0,format1_1,-,-,-,-)
|
||||
// defined in Subclause 7.2.1 TS 38.213
|
||||
nr_pdci_info_extracted->tpc_pucch = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->tpc_pucch = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
pdlsch0_harq->delta_PUCCH = delta_PUCCH_lut[nr_pdci_info_extracted->tpc_pucch &3];
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tpc_pucch=%x\n",nr_pdci_info_extracted->tpc_pucch);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 31: // 31 PUCCH_RESOURCE_IND: (field defined for -,-,format1_0,format1_1,-,-,-,-)
|
||||
case PUCCH_RESOURCE_IND: // 34 PUCCH_RESOURCE_IND: (field defined for -,-,format1_0,format1_1,-,-,-,-)
|
||||
// defined in Subclause 9.2.3 TS 38.213
|
||||
// PUCCH_RESOURCE_IND points to PUCCH-ResourceId, but PUCCH-ResourceId is not defined yet
|
||||
nr_pdci_info_extracted->pucch_resource_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->pucch_resource_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->pucch_resource_ind=%x\n",nr_pdci_info_extracted->pucch_resource_ind);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 32: // 32 PDSCH_TO_HARQ_FEEDBACK_TIME_IND: (field defined for -,-,format1_0,format1_1,-,-,-,-)
|
||||
case PDSCH_TO_HARQ_FEEDBACK_TIME_IND: // 35 PDSCH_TO_HARQ_FEEDBACK_TIME_IND: (field defined for -,-,format1_0,format1_1,-,-,-,-)
|
||||
// defined in Subclause 9.2.3 TS 38.213
|
||||
// PDSCH_TO_HARQ_FEEDBACK_TIME_IND points to DL-data-DL-acknowledgement, but DL-data-DL-acknowledgement is not defined yet
|
||||
nr_pdci_info_extracted->pdsch_to_harq_feedback_time_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->pdsch_to_harq_feedback_time_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->pdsch_to_harq_feedback_time_ind=%x\n",nr_pdci_info_extracted->pdsch_to_harq_feedback_time_ind);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 33: // 33 SHORT_MESSAGE_IND: (field defined for -,-,format1_0,-,-,-,-,-)
|
||||
// 1 bit if crc scrambled with P-RNTI
|
||||
if (rnti == p_rnti) {
|
||||
nr_pdci_info_extracted->short_message_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
// short message indication flag not implemented in NR_UE_DLSCH_t
|
||||
}
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->short_message_ind=%x\n",nr_pdci_info_extracted->short_message_ind);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 34: // 34 SRS_RESOURCE_IND: (field defined for -,format0_1,-,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->srs_resource_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case SRS_RESOURCE_IND: // 36 SRS_RESOURCE_IND: (field defined for -,format0_1,-,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->srs_resource_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->srs_resource_ind=%x\n",nr_pdci_info_extracted->srs_resource_ind);
|
||||
#endif
|
||||
break;
|
||||
case 35: // 35 PRECOD_NBR_LAYERS: (field defined for -,format0_1,-,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->precod_nbr_layers = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case PRECOD_NBR_LAYERS: // 37 PRECOD_NBR_LAYERS: (field defined for -,format0_1,-,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->precod_nbr_layers = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->precod_nbr_layers=%x\n",nr_pdci_info_extracted->precod_nbr_layers);
|
||||
#endif
|
||||
break;
|
||||
case 36: // 36 ANTENNA_PORTS: (field defined for -,format0_1,-,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->antenna_ports = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case ANTENNA_PORTS: // 38 ANTENNA_PORTS: (field defined for -,format0_1,-,format1_1,-,-,-,-)
|
||||
nr_pdci_info_extracted->antenna_ports = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->antenna_ports=%x\n",nr_pdci_info_extracted->antenna_ports);
|
||||
#endif
|
||||
break;
|
||||
case 37: // 37 TCI: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
case TCI: // 39 TCI: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
// 0 bit if higher layer parameter tci-PresentInDCI is not enabled; otherwise 3 bits
|
||||
nr_pdci_info_extracted->tci = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->tci = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tci=%x\n",nr_pdci_info_extracted->tci);
|
||||
#endif
|
||||
break;
|
||||
case 38: // 38 SRS_REQUEST: (field defined for -,format0_1,-,format1_1,-,-,-,format2_3)
|
||||
nr_pdci_info_extracted->srs_request = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case SRS_REQUEST: // 40 SRS_REQUEST: (field defined for -,format0_1,-,format1_1,-,-,-,format2_3)
|
||||
nr_pdci_info_extracted->srs_request = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->srs_request=%x\n",nr_pdci_info_extracted->srs_request);
|
||||
#endif
|
||||
break;
|
||||
case 39: // 39 TPC_CMD_NUMBER_FORMAT2_3: (field defined for -,-,-,-,-,-,-,format2_3)
|
||||
nr_pdci_info_extracted->tpc_cmd_number_format2_3 = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case TPC_CMD_NUMBER_FORMAT2_3: // 41 TPC_CMD_NUMBER_FORMAT2_3: (field defined for -,-,-,-,-,-,-,format2_3)
|
||||
nr_pdci_info_extracted->tpc_cmd_number_format2_3 = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tpc_cmd_number_format2_3=%x\n",nr_pdci_info_extracted->tpc_cmd_number_format2_3);
|
||||
#endif
|
||||
break;
|
||||
case 40: // 40 CSI_REQUEST: (field defined for -,format0_1,-,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->csi_request = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case CSI_REQUEST: // 42 CSI_REQUEST: (field defined for -,format0_1,-,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->csi_request = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->csi_request=%x\n",nr_pdci_info_extracted->csi_request);
|
||||
#endif
|
||||
break;
|
||||
case 41: // 41 CBGTI: (field defined for -,format0_1,-,format1_1,-,-,-,-)
|
||||
case CBGTI: // 43 CBGTI: (field defined for -,format0_1,-,format1_1,-,-,-,-)
|
||||
// 0, 2, 4, 6, or 8 bits determined by higher layer parameter maxCodeBlockGroupsPerTransportBlock for the PDSCH
|
||||
nr_pdci_info_extracted->cbgti = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->cbgti = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->cbgti=%x\n",nr_pdci_info_extracted->cbgti);
|
||||
#endif
|
||||
break;
|
||||
case 42: // 42 CBGFI: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
// 0 or 1 bit determined by higher layer parameter codeBlockGroupFlushIndicator
|
||||
nr_pdci_info_extracted->cbgfi = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case CBGFI: // 44 CBGFI: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||
// 0 or 1 bit determined by higher layer parameter codeBlockGroupFlushIndicator
|
||||
nr_pdci_info_extracted->cbgfi = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->cbgfi=%x\n",nr_pdci_info_extracted->cbgfi);
|
||||
#endif
|
||||
break;
|
||||
case 43: // 43 PTRS_DMRS: (field defined for -,format0_1,-,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->ptrs_dmrs = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case PTRS_DMRS: // 45 PTRS_DMRS: (field defined for -,format0_1,-,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->ptrs_dmrs = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->ptrs_dmrs=%x\n",nr_pdci_info_extracted->ptrs_dmrs);
|
||||
#endif
|
||||
break;
|
||||
case 44: // 44 BETA_OFFSET_IND: (field defined for -,format0_1,-,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->beta_offset_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case BETA_OFFSET_IND: // 46 BETA_OFFSET_IND: (field defined for -,format0_1,-,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->beta_offset_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->beta_offset_ind=%x\n",nr_pdci_info_extracted->beta_offset_ind);
|
||||
#endif
|
||||
break;
|
||||
case 45: // 45 DMRS_SEQ_INI: (field defined for -,format0_1,-,format1_1,-,-,-,-)
|
||||
case DMRS_SEQ_INI: // 47 DMRS_SEQ_INI: (field defined for -,format0_1,-,format1_1,-,-,-,-)
|
||||
// 1 bit if the cell has two ULs and the number of bits for DCI format 1_0 before padding is larger than the number of bits for DCI format 0_0 before padding; 0 bit otherwise
|
||||
nr_pdci_info_extracted->dmrs_seq_ini = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
nr_pdci_info_extracted->dmrs_seq_ini = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->dmrs_seq_ini=%x\n",nr_pdci_info_extracted->dmrs_seq_ini);
|
||||
#endif
|
||||
break;
|
||||
case 46: // 46 SUL_IND_0_0: (field defined for format0_0,-,-,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->sul_ind_0_0 = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
case UL_SCH_IND: // 48 UL_SCH_IND: (field defined for -,format0_1,-,-,-,-,-,-)
|
||||
// value of "1" indicates UL-SCH shall be transmitted on the PUSCH and a value of "0" indicates UL-SCH shall not be transmitted on the PUSCH
|
||||
nr_pdci_info_extracted->ul_sch_ind = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->dmrs_seq_ini=%x\n",nr_pdci_info_extracted->ul_sch_ind);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case PADDING_NR_DCI: // 49 PADDING_NR_DCI: (field defined for format0_0,-,format1_0,-,-,-,-,-)
|
||||
// (Note 2) If DCI format 0_0 is monitored in common search space
|
||||
nr_pdci_info_extracted->padding_nr_dci = (uint16_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->padding=%x\n",nr_pdci_info_extracted->padding_nr_dci);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case SUL_IND_0_0: // 50 SUL_IND_0_0: (field defined for format0_0,-,-,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->sul_ind_0_0 = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->sul_ind_0_0=%x\n",nr_pdci_info_extracted->sul_ind_0_0);
|
||||
#endif
|
||||
break;
|
||||
case 47: // 47 PADDING: (field defined for format0_0,-,format1_0,-,-,-,-,-)
|
||||
// (Note 2) If DCI format 0_0 is monitored in common search space
|
||||
nr_pdci_info_extracted->padding = (uint16_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field]));
|
||||
|
||||
case RA_PREAMBLE_INDEX: // 51 RA_PREAMBLE_INDEX: (field defined for format0_0,-,-,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->ra_preamble_index = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->padding=%x\n",nr_pdci_info_extracted->padding);
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->ra_preamble_index=%x\n",nr_pdci_info_extracted->ra_preamble_index);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case SUL_IND_1_0: // 52 SUL_IND_1_0: (field defined for -,-,format1_0,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->sul_ind_1_0 = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->sul_ind_1_0=%x\n",nr_pdci_info_extracted->sul_ind_1_0);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case SS_PBCH_INDEX: // 53 SS_PBCH_INDEX: (field defined for -,-,format1_0,-,-,-,-,-)
|
||||
nr_pdci_info_extracted->ss_pbch_index = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->ss_pbch_index=%x\n",nr_pdci_info_extracted->ss_pbch_index);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case PRACH_MASK_INDEX: // 54 PRACH_MASK_INDEX: (field defined for -,-,-,format1_0,-,-,-,-)
|
||||
nr_pdci_info_extracted->prach_mask_index = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->prach_mask_index=%x\n",nr_pdci_info_extracted->prach_mask_index);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case RESERVED_NR_DCI: // 55 RESERVED_NR_DCI: (field defined for -,-,-,format1_0,-,-,-,-)
|
||||
nr_pdci_info_extracted->reserved_nr_dci = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format-15]));
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->reserved_nr_dci=%x\n",nr_pdci_info_extracted->reserved_nr_dci);
|
||||
#endif
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4604,6 +4679,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
||||
#endif
|
||||
return(1);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
@@ -6698,12 +6774,14 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format,
|
||||
#endif //(0)
|
||||
|
||||
#ifdef NR_PDCCH_DCI_TOOLS
|
||||
|
||||
int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue,
|
||||
uint8_t eNB_id,
|
||||
int frame,
|
||||
uint8_t nr_tti_rx,
|
||||
void *dci_pdu,
|
||||
uint16_t rnti,
|
||||
uint8_t dci_length,
|
||||
NR_DCI_format_t dci_format,
|
||||
NR_UE_PDCCH *pdcch_vars,
|
||||
NR_UE_PDSCH *pdsch_vars,
|
||||
@@ -6711,15 +6789,11 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue,
|
||||
NR_UE_ULSCH_t *ulsch,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
|
||||
uint16_t si_rnti,
|
||||
uint16_t ra_rnti,
|
||||
uint16_t p_rnti,
|
||||
uint8_t beamforming_mode,
|
||||
uint16_t tc_rnti,
|
||||
uint8_t dci_length,
|
||||
uint8_t dci_fields_sizes[NBR_NR_DCI_FIELDS],
|
||||
uint8_t dci_fields_sizes[NBR_NR_DCI_FIELDS][NBR_NR_FORMATS],
|
||||
uint16_t n_RB_ULBWP,
|
||||
uint16_t n_RB_DLBWP)
|
||||
uint16_t n_RB_DLBWP,
|
||||
uint16_t crc_scrambled_values[TOTAL_NBR_SCRAMBLED_VALUES])
|
||||
{
|
||||
/*
|
||||
* Note only format0_0 and format1_0 are implemented
|
||||
@@ -6738,14 +6812,16 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue,
|
||||
|
||||
dlsch0 = dlsch[0];
|
||||
dlsch0->active = 0;
|
||||
if (dci_fields_sizes[HARQ_PROCESS_NUMBER] != 0) { // 25 HARQ_PROCESS_NUMBER (25 is the position in dci_fields_sizes array for field HARQ_PROCESS_NUMBER)
|
||||
for (int i=0; i<=HARQ_PROCESS_NUMBER; i++) left_shift = left_shift + dci_fields_sizes[i];
|
||||
nr_dci_info_extracted.harq_process_number = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[HARQ_PROCESS_NUMBER]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[HARQ_PROCESS_NUMBER]));
|
||||
if (dci_fields_sizes[HARQ_PROCESS_NUMBER][dci_format-15] != 0) { // 27 HARQ_PROCESS_NUMBER (27 is the position in dci_fields_sizes array for field HARQ_PROCESS_NUMBER)
|
||||
for (int i=0; i<=HARQ_PROCESS_NUMBER; i++) left_shift = left_shift + dci_fields_sizes[i][dci_format-15];
|
||||
nr_dci_info_extracted.harq_process_number = (uint8_t)(((((*(uint64_t *)dci_pdu) << (left_shift - dci_fields_sizes[HARQ_PROCESS_NUMBER][dci_format-15]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[HARQ_PROCESS_NUMBER][dci_format-15]));
|
||||
left_shift = 0;
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> nr_dci_info_extracted->harq_process_number=%x\n",nr_dci_info_extracted.harq_process_number);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
dlsch0_harq = dlsch[0]->harq_processes[nr_dci_info_extracted.harq_process_number];
|
||||
ulsch0 = ulsch;
|
||||
/* printf("nr_dci_info_extracted.harq_process_number = %d\n",nr_dci_info_extracted.harq_process_number);
|
||||
@@ -6757,16 +6833,17 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue,
|
||||
|
||||
memset(&nr_dci_info_extracted,0,sizeof(nr_dci_info_extracted));
|
||||
// printf("we reach this point\n");
|
||||
switch (dci_format) {
|
||||
// switch (dci_format) {
|
||||
|
||||
case format0_0:
|
||||
// case format0_0:
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> Entering function nr_extract_dci_info(dci_format=%d) for PUSCH allocation\n",dci_format);
|
||||
printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> Entering function nr_extract_dci_info(dci_format=%d) \n",dci_format);
|
||||
#endif
|
||||
status = nr_extract_dci_info(ue,
|
||||
eNB_id,
|
||||
frame_type,
|
||||
dci_length,
|
||||
rnti,
|
||||
dci_pdu,
|
||||
&nr_dci_info_extracted,
|
||||
dci_fields_sizes,
|
||||
@@ -6775,13 +6852,9 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue,
|
||||
ulsch0,
|
||||
dci_format,
|
||||
nr_tti_rx,
|
||||
rnti,
|
||||
si_rnti,
|
||||
p_rnti,
|
||||
ra_rnti,
|
||||
tc_rnti,
|
||||
n_RB_ULBWP,
|
||||
n_RB_DLBWP);
|
||||
n_RB_DLBWP,
|
||||
crc_scrambled_values);
|
||||
//status = check_dci_format1_1a_coherency(format1_1, frame_parms->N_RB_DL, rnti, tc_rnti, si_rnti, ra_rnti, p_rnti,frame,nr_tti_rx, &nr_dci_info_extracted, dlsch0_harq);
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
if(status == 0)
|
||||
@@ -6790,8 +6863,8 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue,
|
||||
return(-1);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
// break;
|
||||
/*
|
||||
case format0_1:
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> format %d not implemented yet\n",dci_format);
|
||||
@@ -6806,7 +6879,7 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue,
|
||||
eNB_id,
|
||||
frame_type,
|
||||
dci_length,
|
||||
dci_pdu,
|
||||
dci_pdu,rnti,
|
||||
&nr_dci_info_extracted,
|
||||
dci_fields_sizes,
|
||||
dlsch0_harq,
|
||||
@@ -6814,13 +6887,8 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue,
|
||||
ulsch0,
|
||||
dci_format,
|
||||
nr_tti_rx,
|
||||
rnti,
|
||||
si_rnti,
|
||||
p_rnti,
|
||||
ra_rnti,
|
||||
tc_rnti,
|
||||
n_RB_ULBWP,
|
||||
n_RB_DLBWP);
|
||||
n_RB_DLBWP,crc_scrambled_values);
|
||||
//status = check_dci_format1_1a_coherency(format1_1, frame_parms->N_RB_DL, rnti, tc_rnti, si_rnti, ra_rnti, p_rnti,frame,nr_tti_rx, &nr_dci_info_extracted, dlsch0_harq);
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
if(status == 0)
|
||||
@@ -6866,12 +6934,16 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue,
|
||||
//LOG_E(PHY,"format %d not yet implemented\n",dci_format);
|
||||
return(-1);
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> Ending function nr_extract_dci_info()\n");
|
||||
#endif
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
#if 0
|
||||
int generate_ue_dlsch_params_from_dci(int frame,
|
||||
|
||||
+97
-45
@@ -578,57 +578,109 @@ typedef struct {
|
||||
#define NR_NBR_SEARCHSPACE_ACT_BWP 10 // The number of SearchSpaces per BWP is limited to 10 (including initial SEARCHSPACE: SearchSpaceId 0)
|
||||
#ifdef NR_PDCCH_DEFS_NR_UE
|
||||
|
||||
#define MAX_NR_DCI_DECODED_SLOT 10
|
||||
#define NBR_NR_FORMATS 8
|
||||
#define NBR_NR_DCI_FIELDS 48
|
||||
// The following parameters define 'position' of each DCI field described in TS 38.212
|
||||
#define CARRIER_IND 0
|
||||
#define SUL_IND_0_1 1
|
||||
#define IDENTIFIER_DCI_FORMATS 2
|
||||
#define NBR_NR_DCI_FIELDS 56
|
||||
|
||||
#define IDENTIFIER_DCI_FORMATS 0
|
||||
#define CARRIER_IND 1
|
||||
#define SUL_IND_0_1 2
|
||||
#define SLOT_FORMAT_IND 3
|
||||
#define PRE_EMPTION_IND 4
|
||||
#define TPC_CMD_NUMBER 5
|
||||
#define BLOCK_NUMBER 6
|
||||
#define BANDWIDTH_PART_IND 7
|
||||
#define FREQ_DOM_RESOURCE_ASSIGNMENT_UL 8
|
||||
#define FREQ_DOM_RESOURCE_ASSIGNMENT_DL 9
|
||||
#define TIME_DOM_RESOURCE_ASSIGNMENT 10
|
||||
#define VRB_TO_PRB_MAPPING 11
|
||||
#define PRB_BUNDLING_SIZE_IND 12
|
||||
#define RATE_MATCHING_IND 13
|
||||
#define ZP_CSI_RS_TRIGGER 14
|
||||
#define FREQ_HOPPING_FLAG 15
|
||||
#define TB1_MCS 16
|
||||
#define TB1_NDI 17
|
||||
#define TB1_RV 18
|
||||
#define TB2_MCS 19
|
||||
#define TB2_NDI 20
|
||||
#define TB2_RV 21
|
||||
#define MCS 22
|
||||
#define NDI 23
|
||||
#define RV 24
|
||||
#define HARQ_PROCESS_NUMBER 25
|
||||
#define DAI_ 26
|
||||
#define FIRST_DAI 27
|
||||
#define SECOND_DAI 28
|
||||
#define TPC_PUSCH 29
|
||||
#define TPC_PUCCH 30
|
||||
#define PUCCH_RESOURCE_IND 31
|
||||
#define PDSCH_TO_HARQ_FEEDBACK_TIME_IND 32
|
||||
#define SHORT_MESSAGE_IND 33
|
||||
#define SRS_RESOURCE_IND 34
|
||||
#define PRECOD_NBR_LAYERS 35
|
||||
#define ANTENNA_PORTS 36
|
||||
#define TCI 37
|
||||
#define SRS_REQUEST 38
|
||||
#define TPC_CMD_NUMBER_FORMAT2_3 39
|
||||
#define CSI_REQUEST 40
|
||||
#define CBGTI 41
|
||||
#define CBGFI 42
|
||||
#define PTRS_DMRS 43
|
||||
#define BETA_OFFSET_IND 44
|
||||
#define DMRS_SEQ_INI 45
|
||||
#define SUL_IND_0_0 46
|
||||
#define PADDING 47
|
||||
#define SHORT_MESSAGE_IND 8
|
||||
#define SHORT_MESSAGES 9
|
||||
#define FREQ_DOM_RESOURCE_ASSIGNMENT_UL 10
|
||||
#define FREQ_DOM_RESOURCE_ASSIGNMENT_DL 11
|
||||
#define TIME_DOM_RESOURCE_ASSIGNMENT 12
|
||||
#define VRB_TO_PRB_MAPPING 13
|
||||
#define PRB_BUNDLING_SIZE_IND 14
|
||||
#define RATE_MATCHING_IND 15
|
||||
#define ZP_CSI_RS_TRIGGER 16
|
||||
#define FREQ_HOPPING_FLAG 17
|
||||
#define TB1_MCS 18
|
||||
#define TB1_NDI 19
|
||||
#define TB1_RV 20
|
||||
#define TB2_MCS 21
|
||||
#define TB2_NDI 22
|
||||
#define TB2_RV 23
|
||||
#define MCS 24
|
||||
#define NDI 25
|
||||
#define RV 26
|
||||
#define HARQ_PROCESS_NUMBER 27
|
||||
#define DAI_ 28
|
||||
#define FIRST_DAI 29
|
||||
#define SECOND_DAI 30
|
||||
#define TB_SCALING 31
|
||||
#define TPC_PUSCH 32
|
||||
#define TPC_PUCCH 33
|
||||
#define PUCCH_RESOURCE_IND 34
|
||||
#define PDSCH_TO_HARQ_FEEDBACK_TIME_IND 35
|
||||
//#define SHORT_MESSAGE_IND 33
|
||||
#define SRS_RESOURCE_IND 36
|
||||
#define PRECOD_NBR_LAYERS 37
|
||||
#define ANTENNA_PORTS 38
|
||||
#define TCI 39
|
||||
#define SRS_REQUEST 40
|
||||
#define TPC_CMD_NUMBER_FORMAT2_3 41
|
||||
#define CSI_REQUEST 42
|
||||
#define CBGTI 43
|
||||
#define CBGFI 44
|
||||
#define PTRS_DMRS 45
|
||||
#define BETA_OFFSET_IND 46
|
||||
#define DMRS_SEQ_INI 47
|
||||
#define UL_SCH_IND 48
|
||||
#define PADDING_NR_DCI 49
|
||||
#define SUL_IND_0_0 50
|
||||
#define RA_PREAMBLE_INDEX 51
|
||||
#define SUL_IND_1_0 52
|
||||
#define SS_PBCH_INDEX 53
|
||||
#define PRACH_MASK_INDEX 54
|
||||
#define RESERVED_NR_DCI 55
|
||||
|
||||
|
||||
typedef enum {
|
||||
_format_0_0_found=0,
|
||||
_format_0_1_found=1,
|
||||
_format_1_0_found=2,
|
||||
_format_1_1_found=3,
|
||||
_format_2_0_found=4,
|
||||
_format_2_1_found=5,
|
||||
_format_2_2_found=6,
|
||||
_format_2_3_found=7} format_found_t;
|
||||
#define TOTAL_NBR_SCRAMBLED_VALUES 13
|
||||
#define _C_RNTI_ 0
|
||||
#define _CS_RNTI_ 1
|
||||
#define _NEW_RNTI_ 2
|
||||
#define _TC_RNTI_ 3
|
||||
#define _P_RNTI_ 4
|
||||
#define _SI_RNTI_ 5
|
||||
#define _RA_RNTI_ 6
|
||||
#define _SP_CSI_RNTI_ 7
|
||||
#define _SFI_RNTI_ 8
|
||||
#define _INT_RNTI_ 9
|
||||
#define _TPC_PUSCH_RNTI_ 10
|
||||
#define _TPC_PUCCH_RNTI_ 11
|
||||
#define _TPC_SRS_RNTI_ 12
|
||||
typedef enum {
|
||||
_c_rnti = _C_RNTI_,
|
||||
_cs_rnti = _CS_RNTI_,
|
||||
_new_rnti = _NEW_RNTI_,
|
||||
_tc_rnti = _TC_RNTI_,
|
||||
_p_rnti = _P_RNTI_,
|
||||
_si_rnti = _SI_RNTI_,
|
||||
_ra_rnti = _RA_RNTI_,
|
||||
_sp_csi_rnti = _SP_CSI_RNTI_,
|
||||
_sfi_rnti = _SFI_RNTI_,
|
||||
_int_rnti = _INT_RNTI_,
|
||||
_tpc_pusch_rnti = _TPC_PUSCH_RNTI_,
|
||||
_tpc_pucch_rnti = _TPC_PUCCH_RNTI_,
|
||||
_tpc_srs_rnti = _TPC_SRS_RNTI_} crc_scrambled_t;
|
||||
|
||||
|
||||
|
||||
|
||||
typedef enum {bundle_n2=2,bundle_n3=3,bundle_n6=6} NR_UE_CORESET_REG_bundlesize_t;
|
||||
|
||||
|
||||
@@ -3089,6 +3089,7 @@ void ue_pbch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *pro
|
||||
#endif //(0)
|
||||
|
||||
#ifdef NR_PDCCH_SCHED
|
||||
|
||||
int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t abstraction_flag)
|
||||
{
|
||||
|
||||
@@ -3103,6 +3104,11 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
|
||||
uint8_t next1_thread_id = ue->current_thread_id[nr_tti_rx]== (RX_NB_TH-1) ? 0:(ue->current_thread_id[nr_tti_rx]+1);
|
||||
uint8_t next2_thread_id = next1_thread_id== (RX_NB_TH-1) ? 0:(next1_thread_id+1);
|
||||
|
||||
// this table contains dci_fields_sizes for each time a dci is decoded in the slot. Each element represents the size in bits for each dci field
|
||||
// each time a dci is decode at dci_cnt, the values of the table dci_fields_sizes[i][j] will be copied at table dci_fields_sizes_cnt[dci_cnt-1][i][j]
|
||||
// table dci_fields_sizes_cnt[dci_cnt-1][i][j] will then be used in function nr_extract_dci_info
|
||||
uint8_t dci_fields_sizes_cnt[MAX_NR_DCI_DECODED_SLOT][NBR_NR_DCI_FIELDS][NBR_NR_FORMATS] = {0};
|
||||
|
||||
uint16_t tc_rnti = 1; // FIXME
|
||||
uint16_t int_rnti = 1; // FIXME
|
||||
uint16_t sfi_rnti = 1; // FIXME
|
||||
@@ -3137,6 +3143,25 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
|
||||
* For PDCCH monitoring when overlap with SS/PBCH according to 38.213 v15.1.0 Section 10
|
||||
* To be implemented LATER !!!
|
||||
*/
|
||||
int _offset,_index,_M;
|
||||
int searchSpace_id = pdcch_vars2->searchSpace[nb_searchspace_active].searchSpaceId;
|
||||
if (searchSpace_id == 0){ // Implementing TS 38.213 subclause 13, UE procedure for monitoring Type0-PDCCH common search space
|
||||
/*
|
||||
* according to TS 38.213 subclause 13
|
||||
* For the SS/PBCH block and control resource set (CORESET) multiplexing pattern 1,
|
||||
* a UE monitors PDCCH in the Type0-PDCCH common search space over two consecutive slots starting from slot n0
|
||||
*/
|
||||
if (frame_rx%2 == 0) {
|
||||
if ((((_offset*2+((_index*_M)/20))%2) != 0) || ((((_offset*2)+(_index*_M))%20) != nr_tti_rx) || ((((_offset*2)+(_index*_M))%20) != nr_tti_rx-1)){
|
||||
do_pdcch_monitoring_current_slot = 0;
|
||||
}
|
||||
}
|
||||
if (frame_rx%2 == 1) {
|
||||
if ((((_offset*2+((_index*_M)/20))%2) != 1) || ((((_offset*2)+(_index*_M))%20) != nr_tti_rx) || ((((_offset*2)+(_index*_M))%20) != nr_tti_rx-1)){
|
||||
do_pdcch_monitoring_current_slot = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef NR_PDCCH_SCHED_DEBUG
|
||||
printf("<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> nb_searchspace_active=%d do_pdcch_monitoring_current_slot=%d\n",
|
||||
nb_searchspace_active,
|
||||
@@ -3146,7 +3171,6 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
|
||||
if (do_pdcch_monitoring_current_slot) {
|
||||
// the searchSpace indicates that we need to monitor PDCCH in current nr_tti_rx
|
||||
// get the parameters describing the current SEARCHSPACE
|
||||
int searchSpace_id = pdcch_vars2->searchSpace[nb_searchspace_active].searchSpaceId;
|
||||
// the CORESET id applicable to the current SearchSpace
|
||||
int searchSpace_coreset_id = pdcch_vars2->searchSpace[nb_searchspace_active].controlResourceSetId;
|
||||
// FIXME this variable is a bit string (14 bits) identifying every OFDM symbol in a slot.
|
||||
@@ -3165,8 +3189,8 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
|
||||
while ((searchSpace_coreset_id != pdcch_vars2->coreset[nb_coreset_active].controlResourceSetId) && (nb_coreset_active<nb_coreset_total)) {
|
||||
// we need to identify the CORESET associated to the active searchSpace
|
||||
nb_coreset_active++;
|
||||
}
|
||||
if (nb_coreset_active >= nb_coreset_total) return 0; // the coreset_id could not be found. There is a problem
|
||||
}
|
||||
|
||||
unsigned int dci_cnt=0, i;
|
||||
|
||||
@@ -3181,8 +3205,8 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
|
||||
int tci_present = pdcch_vars2->coreset[nb_coreset_active].tciPresentInDCI;
|
||||
uint16_t pdcch_DMRS_scrambling_id = pdcch_vars2->coreset[nb_coreset_active].pdcchDMRSScramblingID;
|
||||
|
||||
// this table contains 48 (NBR_NR_DCI_FIELDS) elements for each dci field described in TS 38.212. Each element represents the size in bits for each dci field
|
||||
uint8_t dci_fields_sizes[NBR_NR_DCI_FIELDS] = {0};
|
||||
// this table contains 56 (NBR_NR_DCI_FIELDS) elements for each dci field and format described in TS 38.212. Each element represents the size in bits for each dci field
|
||||
uint8_t dci_fields_sizes[NBR_NR_DCI_FIELDS][NBR_NR_FORMATS] = {0};
|
||||
// this is the UL bandwidth part. FIXME! To be defined where this value comes from
|
||||
uint16_t n_RB_ULBWP = 100;
|
||||
// this is the DL bandwidth part. FIXME! To be defined where this value comes from
|
||||
@@ -3235,7 +3259,7 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
|
||||
proc->frame_rx,
|
||||
nr_tti_rx,
|
||||
eNB_id,
|
||||
//(ue->frame_parms.mode1_flag == 1) ? SISO : ALAMOUTI, // NR_DL_FRAME_PARMS struct has been modified, and 'mode1_flag' needs to be included
|
||||
//(ue->frame_parms.mode1_flag == 1) ? SISO : ALAMOUTI,
|
||||
SISO,
|
||||
ue->high_speed_flag,
|
||||
ue->is_secondary_ue,
|
||||
@@ -3276,6 +3300,9 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
|
||||
nr_tti_rx);
|
||||
}
|
||||
*/ //removed for nr_ue_pdcch_procedures
|
||||
crc_scrambled_t crc_scrambled;
|
||||
format_found_t format_found=255;
|
||||
|
||||
if (searchSpaceType == common) { // search all possible dci's for COMMON SEARCH SPACES according to the current SEARCHSPACE configuration
|
||||
#ifdef NR_PDCCH_SCHED_DEBUG
|
||||
printf("<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> Entering function nr_dci_decoding_procedure(searchSpaceType=%d, nb_searchspace_active=%d, nb_coreset_active=%d) -> dci_cnt=%d\n",
|
||||
@@ -3292,9 +3319,11 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
|
||||
// later when we need paging or RA during connection, update this ...
|
||||
eNB_id,
|
||||
nr_tti_rx,
|
||||
dci_fields_sizes,
|
||||
dci_fields_sizes,dci_fields_sizes_cnt,
|
||||
n_RB_ULBWP,
|
||||
n_RB_DLBWP);
|
||||
n_RB_DLBWP,
|
||||
&crc_scrambled,
|
||||
&format_found);
|
||||
#ifdef NR_PDCCH_SCHED_DEBUG
|
||||
printf("<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> Ending function nr_dci_decoding_procedure() -> dci_cnt=%d\n",dci_cnt);
|
||||
#endif
|
||||
@@ -3315,9 +3344,11 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
|
||||
// later when we need paging or RA during connection, update this ...
|
||||
eNB_id,
|
||||
nr_tti_rx,
|
||||
dci_fields_sizes,
|
||||
dci_fields_sizes,dci_fields_sizes_cnt,
|
||||
n_RB_ULBWP,
|
||||
n_RB_DLBWP);
|
||||
n_RB_DLBWP,
|
||||
&crc_scrambled,
|
||||
&format_found);
|
||||
#ifdef NR_PDCCH_SCHED_DEBUG
|
||||
printf("<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> Ending function nr_dci_decoding_procedure() -> dci_cnt=%d\n",dci_cnt);
|
||||
#endif
|
||||
@@ -3332,7 +3363,7 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PHICH, VCD_FUNCTION_OUT);
|
||||
}*/ //removed for nr_ue_pdcch_procedures
|
||||
}
|
||||
#if 0
|
||||
|
||||
#ifdef PHY_ABSTRACTION
|
||||
else {
|
||||
for (i=0; i<NB_eNB_INST; i++) {
|
||||
@@ -3346,7 +3377,7 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
|
||||
|
||||
if (i==NB_eNB_INST) {
|
||||
LOG_E(PHY,"[UE %d] phy_procedures_lte_ue.c: FATAL : Could not find attached eNB for DCI emulation (Nid_cell %d)!!!!\n",ue->Mod_id,ue->frame_parms.Nid_cell);
|
||||
//mac_xface->macphy_exit("Could not find attached eNB for DCI emulation");
|
||||
mac_xface->macphy_exit("Could not find attached eNB for DCI emulation");
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PDCCH_PROCEDURES, VCD_FUNCTION_OUT);
|
||||
return(-1);
|
||||
}
|
||||
@@ -3359,26 +3390,28 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
|
||||
dci_alloc_rx,
|
||||
eNB_id);
|
||||
// printf("DCI: dci_cnt %d\n",dci_cnt);
|
||||
UE_id = (uint32_t)nr_find_ue((int16_t)ue->pdcch_vars[nr_tti_rx&1][eNB_id]->crnti,PHY_vars_eNB_g[i][CC_id]);
|
||||
UE_id = (uint32_t)find_ue((int16_t)ue->pdcch_vars[nr_tti_rx&1][eNB_id]->crnti,PHY_vars_eNB_g[i][CC_id]);
|
||||
|
||||
if (UE_id>=0) {
|
||||
// printf("Checking PHICH for UE %d (eNB %d)\n",UE_id,i);
|
||||
//if (is_phich_subframe(&ue->frame_parms,nr_tti_rx)) {
|
||||
//harq_pid = phich_subframe_to_harq_pid(&ue->frame_parms,frame_rx,nr_tti_rx);
|
||||
//if (ue->ulsch[eNB_id]->harq_processes[harq_pid]->status == ACTIVE) {
|
||||
//ue->ulsch[eNB_id]->harq_processes[harq_pid]->phich_ACK=1;
|
||||
//ue->ulsch[eNB_id]->harq_processes[harq_pid]->subframe_scheduling_flag =0;
|
||||
//ue->ulsch[eNB_id]->harq_processes[harq_pid]->status = IDLE;
|
||||
//ue->ulsch_Msg3_active[eNB_id] = 0;
|
||||
//ue->ulsch[eNB_id]->harq_processes[harq_pid]->round = 0;
|
||||
//LOG_D(PHY,"Msg3 inactive\n");
|
||||
//} // harq_pid is ACTIVE
|
||||
//} // This is a PHICH nr_tti_rx
|
||||
if (is_phich_subframe(&ue->frame_parms,nr_tti_rx)) {
|
||||
harq_pid = phich_subframe_to_harq_pid(&ue->frame_parms,frame_rx,nr_tti_rx);
|
||||
|
||||
if (ue->ulsch[eNB_id]->harq_processes[harq_pid]->status == ACTIVE) {
|
||||
// ue->ulsch[eNB_id]->harq_processes[harq_pid]->phich_ACK=1;
|
||||
ue->ulsch[eNB_id]->harq_processes[harq_pid]->subframe_scheduling_flag =0;
|
||||
ue->ulsch[eNB_id]->harq_processes[harq_pid]->status = IDLE;
|
||||
ue->ulsch_Msg3_active[eNB_id] = 0;
|
||||
ue->ulsch[eNB_id]->harq_processes[harq_pid]->round = 0;
|
||||
LOG_D(PHY,"Msg3 inactive\n");
|
||||
|
||||
} // harq_pid is ACTIVE
|
||||
} // This is a PHICH nr_tti_rx
|
||||
} // UE_id exists
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
uint8_t *nCCE_current = &ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->nCCE[nr_tti_rx];
|
||||
uint8_t *nCCE_dest = &ue->pdcch_vars[next1_thread_id][eNB_id]->nCCE[nr_tti_rx];
|
||||
uint8_t *nCCE_dest1 = &ue->pdcch_vars[next2_thread_id][eNB_id]->nCCE[nr_tti_rx];
|
||||
@@ -3403,135 +3436,59 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
|
||||
/*
|
||||
* This is the NR part
|
||||
*/
|
||||
if ((dci_alloc_rx[i].rnti == SI_RNTI) && (dci_alloc_rx[i].format == format1_0)){
|
||||
nr_generate_ue_ul_dlsch_params_from_dci(ue,
|
||||
eNB_id,
|
||||
frame_rx,
|
||||
nr_tti_rx,
|
||||
(void *)&dci_alloc_rx[i].dci_pdu,
|
||||
ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->crnti,
|
||||
dci_alloc_rx[i].dci_length,
|
||||
dci_alloc_rx[i].format,
|
||||
ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id],
|
||||
ue->pdsch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id],
|
||||
ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id],
|
||||
ue->ulsch[eNB_id],
|
||||
&ue->frame_parms,
|
||||
ue->pdsch_config_dedicated,
|
||||
SI_RNTI,
|
||||
0,
|
||||
P_RNTI,
|
||||
ue->transmission_mode[eNB_id]<7?0:ue->transmission_mode[eNB_id],
|
||||
ue->pdcch_vars[0%RX_NB_TH][eNB_id]->crnti_is_temporary? ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->crnti: 0,
|
||||
&dci_fields_sizes,
|
||||
n_RB_ULBWP,
|
||||
n_RB_DLBWP);
|
||||
ue->dlsch_SI_received[eNB_id]++;
|
||||
}
|
||||
uint16_t c_rnti=pdcch_vars[eNB_id]->crnti;
|
||||
uint16_t cs_rnti,new_rnti,tc_rnti;
|
||||
uint16_t p_rnti=P_RNTI;
|
||||
uint16_t si_rnti=SI_RNTI;
|
||||
uint16_t ra_rnti=99;
|
||||
uint16_t sp_csi_rnti,sfi_rnti,int_rnti,tpc_pusch_rnti,tpc_pucch_rnti,tpc_srs_rnti; //FIXME
|
||||
uint16_t crc_scrambled_values[TOTAL_NBR_SCRAMBLED_VALUES] =
|
||||
{c_rnti,cs_rnti,new_rnti,tc_rnti,p_rnti,si_rnti,ra_rnti,sp_csi_rnti,sfi_rnti,int_rnti,tpc_pusch_rnti,tpc_pucch_rnti,tpc_srs_rnti};
|
||||
|
||||
if ((dci_alloc_rx[i].rnti == P_RNTI) && (dci_alloc_rx[i].format == format1_0)){
|
||||
ue->dlsch_p_received[eNB_id]++;
|
||||
if ((dci_alloc_rx[i].format == format0_0))
|
||||
if ((dci_alloc_rx[i].format == format1_0) &&
|
||||
(dci_alloc_rx[i].rnti != crc_scrambled_values[_P_RNTI_]) &&
|
||||
(dci_alloc_rx[i].rnti != crc_scrambled_values[_SI_RNTI_]) &&
|
||||
(dci_alloc_rx[i].rnti != crc_scrambled_values[_RA_RNTI_])) ue->dlsch_received[eNB_id]++;
|
||||
if ((dci_alloc_rx[i].rnti == crc_scrambled_values[_SI_RNTI_]) && (dci_alloc_rx[i].format == format1_0)) ue->dlsch_SI_received[eNB_id]++;
|
||||
if ((dci_alloc_rx[i].rnti == crc_scrambled_values[_P_RNTI_]) && (dci_alloc_rx[i].format == format1_0)) ue->dlsch_p_received[eNB_id]++;
|
||||
if ((dci_alloc_rx[i].rnti == crc_scrambled_values[_RA_RNTI_]) && (dci_alloc_rx[i].format == format1_0)) ue->dlsch_ra_received[eNB_id]++;
|
||||
if ((dci_alloc_rx[i].format == format2_0)){
|
||||
}
|
||||
|
||||
if ((dci_alloc_rx[i].rnti == ue->prach_resources[eNB_id]->ra_RNTI) && (dci_alloc_rx[i].format == format1_0)){
|
||||
nr_generate_ue_ul_dlsch_params_from_dci(ue,
|
||||
eNB_id,
|
||||
frame_rx,
|
||||
nr_tti_rx,
|
||||
(void *)&dci_alloc_rx[i].dci_pdu,
|
||||
ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->crnti,
|
||||
dci_alloc_rx[i].dci_length,
|
||||
dci_alloc_rx[i].format,
|
||||
ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id],
|
||||
ue->pdsch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id],
|
||||
ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id],
|
||||
ue->ulsch[eNB_id],
|
||||
&ue->frame_parms,
|
||||
ue->pdsch_config_dedicated,
|
||||
SI_RNTI,
|
||||
ue->prach_resources[eNB_id]->ra_RNTI,
|
||||
P_RNTI,
|
||||
ue->transmission_mode[eNB_id]<7?0:ue->transmission_mode[eNB_id],
|
||||
ue->pdcch_vars[0%RX_NB_TH][eNB_id]->crnti_is_temporary? ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->crnti: 0,
|
||||
&dci_fields_sizes,
|
||||
n_RB_ULBWP,
|
||||
n_RB_DLBWP);
|
||||
ue->dlsch_ra_received[eNB_id]++;
|
||||
if ((dci_alloc_rx[i].format == format2_1)){
|
||||
}
|
||||
|
||||
if ((dci_alloc_rx[i].rnti == sfi_rnti) && (dci_alloc_rx[i].format == format2_0)){
|
||||
if ((dci_alloc_rx[i].format == format2_2)){
|
||||
}
|
||||
|
||||
if ((dci_alloc_rx[i].rnti == int_rnti) && (dci_alloc_rx[i].format == format2_1)){
|
||||
if ((dci_alloc_rx[i].format == format2_3)){
|
||||
}
|
||||
|
||||
if ((dci_alloc_rx[i].rnti == tpc_pusch_rnti) && (dci_alloc_rx[i].format == format2_2)){
|
||||
if ((dci_alloc_rx[i].format == format0_1)){ // This format not implemented at a first time. FIXME
|
||||
}
|
||||
|
||||
if ((dci_alloc_rx[i].rnti == tpc_srs_rnti) && (dci_alloc_rx[i].format == format2_3)){
|
||||
if ((dci_alloc_rx[i].format == format1_1)){ // This format not implemented at a first time. FIXME
|
||||
}
|
||||
nr_generate_ue_ul_dlsch_params_from_dci(ue,
|
||||
eNB_id,
|
||||
frame_rx,
|
||||
nr_tti_rx,
|
||||
(void *)&dci_alloc_rx[i].dci_pdu,
|
||||
dci_alloc_rx[i].rnti,
|
||||
dci_alloc_rx[i].dci_length,
|
||||
dci_alloc_rx[i].format,
|
||||
ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id],
|
||||
ue->pdsch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id],
|
||||
ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id],
|
||||
ue->ulsch[eNB_id],
|
||||
&ue->frame_parms,
|
||||
ue->pdsch_config_dedicated,
|
||||
ue->transmission_mode[eNB_id]<7?0:ue->transmission_mode[eNB_id],
|
||||
dci_fields_sizes_cnt[i],
|
||||
n_RB_ULBWP,
|
||||
n_RB_DLBWP,
|
||||
crc_scrambled_values);
|
||||
|
||||
if ((dci_alloc_rx[i].rnti == ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->crnti) && (dci_alloc_rx[i].format == format0_0)){
|
||||
nr_generate_ue_ul_dlsch_params_from_dci(ue,
|
||||
eNB_id,
|
||||
frame_rx,
|
||||
nr_tti_rx,
|
||||
(void *)&dci_alloc_rx[i].dci_pdu,
|
||||
ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->crnti,
|
||||
dci_alloc_rx[i].dci_length,
|
||||
dci_alloc_rx[i].format,
|
||||
ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id],
|
||||
ue->pdsch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id],
|
||||
ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id],
|
||||
ue->ulsch[eNB_id],
|
||||
&ue->frame_parms,
|
||||
ue->pdsch_config_dedicated,
|
||||
SI_RNTI,
|
||||
0,
|
||||
P_RNTI,
|
||||
ue->transmission_mode[eNB_id]<7?0:ue->transmission_mode[eNB_id],
|
||||
ue->pdcch_vars[0%RX_NB_TH][eNB_id]->crnti_is_temporary? ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->crnti: 0,
|
||||
&dci_fields_sizes,
|
||||
n_RB_ULBWP,
|
||||
n_RB_DLBWP);
|
||||
}
|
||||
|
||||
if ((dci_alloc_rx[i].rnti == ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->crnti) && (dci_alloc_rx[i].format == format0_1)){ // This format not implemented at a first time. FIXME
|
||||
}
|
||||
|
||||
if ((dci_alloc_rx[i].rnti == ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->crnti) && (dci_alloc_rx[i].format == format1_0)){
|
||||
nr_generate_ue_ul_dlsch_params_from_dci(ue,
|
||||
eNB_id,
|
||||
frame_rx,
|
||||
nr_tti_rx,
|
||||
(void *)&dci_alloc_rx[i].dci_pdu,
|
||||
ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->crnti,
|
||||
dci_alloc_rx[i].dci_length,
|
||||
dci_alloc_rx[i].format,
|
||||
ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id],
|
||||
ue->pdsch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id],
|
||||
ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id],
|
||||
ue->ulsch[eNB_id],
|
||||
&ue->frame_parms,
|
||||
ue->pdsch_config_dedicated,
|
||||
SI_RNTI,
|
||||
0,
|
||||
P_RNTI,
|
||||
ue->transmission_mode[eNB_id]<7?0:ue->transmission_mode[eNB_id],
|
||||
ue->pdcch_vars[0%RX_NB_TH][eNB_id]->crnti_is_temporary? ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->crnti: 0,
|
||||
&dci_fields_sizes,
|
||||
n_RB_ULBWP,
|
||||
n_RB_DLBWP);
|
||||
ue->dlsch_received[eNB_id]++;
|
||||
}
|
||||
|
||||
if ((dci_alloc_rx[i].rnti == ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->crnti) && (dci_alloc_rx[i].format == format1_1)){ // This format not implemented at a first time. FIXME
|
||||
}
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* This is the LTE part to be removed
|
||||
*/
|
||||
|
||||
if ((ue->UE_mode[eNB_id]>PRACH) && (dci_alloc_rx[i].rnti == ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->crnti) && (dci_alloc_rx[i].format != format0)) {
|
||||
|
||||
LOG_D(PHY,"[UE %d][DCI][PDSCH %x] AbsSubframe %d.%d: format %d, num_pdcch_symbols %d, nCCE %d, total CCEs %d\n",
|
||||
@@ -3732,9 +3689,9 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
|
||||
0)==0)) {
|
||||
#if T_TRACER
|
||||
NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||
uint8_t harq_pid = nr_subframe2harq_pid(frame_parms,
|
||||
nr_pdcch_alloc2ul_frame(frame_parms,proc->frame_rx,proc->nr_tti_rx),
|
||||
nr_pdcch_alloc2ul_subframe(frame_parms,proc->nr_tti_rx));
|
||||
uint8_t harq_pid = subframe2harq_pid(frame_parms,
|
||||
pdcch_alloc2ul_frame(frame_parms,proc->frame_rx,proc->nr_tti_rx),
|
||||
pdcch_alloc2ul_subframe(frame_parms,proc->nr_tti_rx));
|
||||
|
||||
T(T_UE_PHY_ULSCH_UE_DCI, T_INT(eNB_id), T_INT(proc->frame_rx%1024), T_INT(proc->nr_tti_rx), T_INT(ue->Mod_id),
|
||||
T_INT(dci_alloc_rx[i].rnti), T_INT(harq_pid),
|
||||
@@ -3759,7 +3716,7 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
|
||||
/*
|
||||
if (((frame_rx%100) == 0) || (frame_rx < 20))
|
||||
dump_dci(&ue->frame_parms, &dci_alloc_rx[i]);
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
ue->ulsch_no_allocation_counter[eNB_id] = 0;
|
||||
@@ -3795,10 +3752,7 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
|
||||
|
||||
// dump_dci(&ue->frame_parms, &dci_alloc_rx[i]);
|
||||
#endif
|
||||
}
|
||||
#endif //(0)
|
||||
|
||||
|
||||
}*/
|
||||
|
||||
} // end for loop dci_cnt
|
||||
#if UE_TIMING_TRACE
|
||||
@@ -3807,9 +3761,12 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PDCCH_PROCEDURES, VCD_FUNCTION_OUT);
|
||||
|
||||
} // end if do_pdcch_monitoring_current_slot
|
||||
} // end for loop nb_searchspacet_active
|
||||
} // end for loop nb_searchspace_active
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
|
||||
Reference in New Issue
Block a user