function for precoding information parameters
This commit is contained in:
@@ -32,8 +32,6 @@
|
||||
|
||||
#include "mac_defs.h"
|
||||
|
||||
// DCI
|
||||
extern const uint8_t table_7_3_1_1_2_2_3_4_5[64][20];
|
||||
extern const uint8_t table_7_3_1_1_2_12[14][3];
|
||||
extern const uint8_t table_7_3_1_1_2_13[10][4];
|
||||
extern const uint8_t table_7_3_1_1_2_14[3][5];
|
||||
|
||||
@@ -192,7 +192,11 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac,
|
||||
const NR_SearchSpace_t *ss);
|
||||
|
||||
void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl_config, const frame_t frame, const int slot);
|
||||
|
||||
void set_precoding_information_parameters(nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu,
|
||||
int n_antenna_port,
|
||||
long transformPrecoder,
|
||||
int precoding_information,
|
||||
NR_PUSCH_Config_t *pusch_Config);
|
||||
void set_harq_status(NR_UE_MAC_INST_t *mac,
|
||||
uint8_t pucch_id,
|
||||
uint8_t harq_id,
|
||||
|
||||
@@ -490,3 +490,74 @@ void set_antenna_port_parameters(fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_pdu,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void set_precoding_information_parameters(nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu,
|
||||
int n_antenna_port,
|
||||
long transformPrecoder,
|
||||
int precoding_information,
|
||||
NR_PUSCH_Config_t *pusch_Config)
|
||||
{
|
||||
// 1 antenna port and the higher layer parameter txConfig = codebook 0 bits
|
||||
if (n_antenna_port == 4) { // 4 antenna port and the higher layer parameter txConfig = codebook
|
||||
// Table 7.3.1.1.2-2: transformPrecoder=disabled and maxRank = 2 or 3 or 4
|
||||
if ((transformPrecoder == NR_PUSCH_Config__transformPrecoder_disabled)
|
||||
&& ((*pusch_Config->maxRank == 2) || (*pusch_Config->maxRank == 3) || (*pusch_Config->maxRank == 4))) {
|
||||
if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_fullyAndPartialAndNonCoherent) {
|
||||
pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[precoding_information][0];
|
||||
pusch_config_pdu->Tpmi = table_7_3_1_1_2_2_3_4_5[precoding_information][1];
|
||||
}
|
||||
if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_partialAndNonCoherent){
|
||||
pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[precoding_information][2];
|
||||
pusch_config_pdu->Tpmi = table_7_3_1_1_2_2_3_4_5[precoding_information][3];
|
||||
}
|
||||
if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_nonCoherent){
|
||||
pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[precoding_information][4];
|
||||
pusch_config_pdu->Tpmi = table_7_3_1_1_2_2_3_4_5[precoding_information][5];
|
||||
}
|
||||
}
|
||||
// Table 7.3.1.1.2-3: transformPrecoder= enabled, or transformPrecoder=disabled and maxRank = 1
|
||||
if (((transformPrecoder == NR_PUSCH_Config__transformPrecoder_enabled)
|
||||
|| (transformPrecoder == NR_PUSCH_Config__transformPrecoder_disabled))
|
||||
&& (*pusch_Config->maxRank == 1)) {
|
||||
if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_fullyAndPartialAndNonCoherent) {
|
||||
pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[precoding_information][6];
|
||||
pusch_config_pdu->Tpmi = table_7_3_1_1_2_2_3_4_5[precoding_information][7];
|
||||
}
|
||||
if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_partialAndNonCoherent){
|
||||
pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[precoding_information][8];
|
||||
pusch_config_pdu->Tpmi = table_7_3_1_1_2_2_3_4_5[precoding_information][9];
|
||||
}
|
||||
if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_nonCoherent){
|
||||
pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[precoding_information][10];
|
||||
pusch_config_pdu->Tpmi = table_7_3_1_1_2_2_3_4_5[precoding_information][11];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (n_antenna_port == 2) {
|
||||
// 2 antenna port and the higher layer parameter txConfig = codebook
|
||||
// Table 7.3.1.1.2-4: transformPrecoder=disabled and maxRank = 2
|
||||
if ((transformPrecoder == NR_PUSCH_Config__transformPrecoder_disabled) && (*pusch_Config->maxRank == 2)) {
|
||||
if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_fullyAndPartialAndNonCoherent) {
|
||||
pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[precoding_information][12];
|
||||
pusch_config_pdu->Tpmi = table_7_3_1_1_2_2_3_4_5[precoding_information][13];
|
||||
}
|
||||
if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_nonCoherent){
|
||||
pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[precoding_information][14];
|
||||
pusch_config_pdu->Tpmi = table_7_3_1_1_2_2_3_4_5[precoding_information][15];
|
||||
}
|
||||
}
|
||||
// Table 7.3.1.1.2-5: transformPrecoder= enabled, or transformPrecoder= disabled and maxRank = 1
|
||||
if (((transformPrecoder == NR_PUSCH_Config__transformPrecoder_enabled)
|
||||
|| (transformPrecoder == NR_PUSCH_Config__transformPrecoder_disabled))
|
||||
&& (*pusch_Config->maxRank == 1)) {
|
||||
if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_fullyAndPartialAndNonCoherent) {
|
||||
pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[precoding_information][16];
|
||||
pusch_config_pdu->Tpmi = table_7_3_1_1_2_2_3_4_5[precoding_information][17];
|
||||
}
|
||||
if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_nonCoherent){
|
||||
pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[precoding_information][18];
|
||||
pusch_config_pdu->Tpmi = table_7_3_1_1_2_2_3_4_5[precoding_information][19];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,94 +303,15 @@ void ul_layers_config(NR_UE_MAC_INST_t *mac, nfapi_nr_ue_pusch_pdu_t *pusch_conf
|
||||
NR_UE_UL_BWP_t *current_UL_BWP = mac->current_UL_BWP;
|
||||
NR_SRS_Config_t *srs_config = current_UL_BWP->srs_Config;
|
||||
NR_PUSCH_Config_t *pusch_Config = current_UL_BWP->pusch_Config;
|
||||
|
||||
long transformPrecoder = pusch_config_pdu->transform_precoding;
|
||||
|
||||
/* PRECOD_NBR_LAYERS */
|
||||
// 0 bits if the higher layer parameter txConfig = nonCodeBook
|
||||
|
||||
if (*pusch_Config->txConfig == NR_PUSCH_Config__txConfig_codebook){
|
||||
|
||||
// The UE shall transmit PUSCH using the same antenna port(s) as the SRS port(s) in the SRS resource indicated by the DCI format 0_1
|
||||
// 38.214 Section 6.1.1
|
||||
|
||||
uint8_t n_antenna_port = get_pusch_nb_antenna_ports(pusch_Config, srs_config, dci->srs_resource_indicator);
|
||||
|
||||
// 1 antenna port and the higher layer parameter txConfig = codebook 0 bits
|
||||
|
||||
if (n_antenna_port == 4) { // 4 antenna port and the higher layer parameter txConfig = codebook
|
||||
|
||||
// Table 7.3.1.1.2-2: transformPrecoder=disabled and maxRank = 2 or 3 or 4
|
||||
if ((transformPrecoder == NR_PUSCH_Config__transformPrecoder_disabled)
|
||||
&& ((*pusch_Config->maxRank == 2) || (*pusch_Config->maxRank == 3) || (*pusch_Config->maxRank == 4))) {
|
||||
if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_fullyAndPartialAndNonCoherent) {
|
||||
pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][0];
|
||||
pusch_config_pdu->Tpmi = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][1];
|
||||
}
|
||||
|
||||
if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_partialAndNonCoherent){
|
||||
pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][2];
|
||||
pusch_config_pdu->Tpmi = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][3];
|
||||
}
|
||||
|
||||
if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_nonCoherent){
|
||||
pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][4];
|
||||
pusch_config_pdu->Tpmi = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][5];
|
||||
}
|
||||
}
|
||||
|
||||
// Table 7.3.1.1.2-3: transformPrecoder= enabled, or transformPrecoder=disabled and maxRank = 1
|
||||
if (((transformPrecoder == NR_PUSCH_Config__transformPrecoder_enabled)
|
||||
|| (transformPrecoder == NR_PUSCH_Config__transformPrecoder_disabled))
|
||||
&& (*pusch_Config->maxRank == 1)) {
|
||||
if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_fullyAndPartialAndNonCoherent) {
|
||||
pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][6];
|
||||
pusch_config_pdu->Tpmi = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][7];
|
||||
}
|
||||
|
||||
if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_partialAndNonCoherent){
|
||||
pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][8];
|
||||
pusch_config_pdu->Tpmi = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][9];
|
||||
}
|
||||
|
||||
if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_nonCoherent){
|
||||
pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][10];
|
||||
pusch_config_pdu->Tpmi = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][11];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (n_antenna_port == 2) {
|
||||
// 2 antenna port and the higher layer parameter txConfig = codebook
|
||||
// Table 7.3.1.1.2-4: transformPrecoder=disabled and maxRank = 2
|
||||
if ((transformPrecoder == NR_PUSCH_Config__transformPrecoder_disabled) && (*pusch_Config->maxRank == 2)) {
|
||||
if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_fullyAndPartialAndNonCoherent) {
|
||||
pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][12];
|
||||
pusch_config_pdu->Tpmi = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][13];
|
||||
}
|
||||
|
||||
if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_nonCoherent){
|
||||
pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][14];
|
||||
pusch_config_pdu->Tpmi = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][15];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Table 7.3.1.1.2-5: transformPrecoder= enabled, or transformPrecoder= disabled and maxRank = 1
|
||||
if (((transformPrecoder == NR_PUSCH_Config__transformPrecoder_enabled)
|
||||
|| (transformPrecoder == NR_PUSCH_Config__transformPrecoder_disabled))
|
||||
&& (*pusch_Config->maxRank == 1)) {
|
||||
if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_fullyAndPartialAndNonCoherent) {
|
||||
pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][16];
|
||||
pusch_config_pdu->Tpmi = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][17];
|
||||
}
|
||||
|
||||
if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_nonCoherent){
|
||||
pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][18];
|
||||
pusch_config_pdu->Tpmi = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][19];
|
||||
}
|
||||
}
|
||||
}
|
||||
uint8_t n = get_pusch_nb_antenna_ports(pusch_Config, srs_config, dci->srs_resource_indicator);
|
||||
set_precoding_information_parameters(pusch_config_pdu, n, transformPrecoder, dci->precoding_information.val, pusch_Config);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user