mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
coding: replace UE pointer with polar interface
Signed-off-by: Abdennour ABDI <abdennour.abdi@open-cells.com>
This commit is contained in:
committed by
Romain Beurdouche
parent
65f7c084ce
commit
844658ad0b
@@ -12,7 +12,6 @@
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||
#include <math.h>
|
||||
#include "PHY/nr_phy_common/inc/nr_phy_common.h"
|
||||
#include "PHY/CODING/nrPolar_tools/nr_polar_psbch_defs.h"
|
||||
#include "common/utils/bits.h"
|
||||
|
||||
#define NR_PUSCH_x 2 // UCI placeholder bit TS 38.212 V15.4.0 subclause 5.3.3.1
|
||||
|
||||
@@ -1190,7 +1190,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
return;
|
||||
}
|
||||
|
||||
nr_uci_encoding(UE, pusch_pdu->pusch_uci.harq_payload,
|
||||
nr_uci_encoding(&UE->polar_interface, pusch_pdu->pusch_uci.harq_payload,
|
||||
pusch_pdu->pusch_uci.harq_ack_bit_length,
|
||||
pucch_pdu->prb_size,
|
||||
true,
|
||||
@@ -1210,7 +1210,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
uint64_t b_csi1[16] = {0}; // limit to 1024-bit encoded length
|
||||
uint64_t b_csi2[16] = {0}; // limit to 1024-bit encoded length
|
||||
if (pusch_pdu->pusch_uci.csi_payload.p1_bits != 0) {
|
||||
nr_uci_encoding(UE, pusch_pdu->pusch_uci.csi_payload.part1_payload,
|
||||
nr_uci_encoding(&UE->polar_interface, pusch_pdu->pusch_uci.csi_payload.part1_payload,
|
||||
pusch_pdu->pusch_uci.csi_payload.p1_bits,
|
||||
pucch_pdu->prb_size,
|
||||
true,
|
||||
@@ -1220,7 +1220,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
|
||||
// Process CSI Part 2 if any
|
||||
if (pusch_pdu->pusch_uci.csi_payload.p2_bits > 0)
|
||||
nr_uci_encoding(UE, pusch_pdu->pusch_uci.csi_payload.part2_payload,
|
||||
nr_uci_encoding(&UE->polar_interface, pusch_pdu->pusch_uci.csi_payload.part2_payload,
|
||||
pusch_pdu->pusch_uci.csi_payload.p2_bits,
|
||||
pucch_pdu->prb_size,
|
||||
true,
|
||||
|
||||
@@ -536,7 +536,7 @@ static inline void nr_pucch2_3_4_scrambling(uint16_t M_bit, uint16_t rnti, uint1
|
||||
#endif
|
||||
}
|
||||
|
||||
void nr_uci_encoding(const PHY_VARS_NR_UE *ue, uint64_t payload, uint8_t nr_bit, uint8_t nrofPRB, bool uci_on_pusch, uint16_t E, uint8_t Qm, uint64_t *b)
|
||||
void nr_uci_encoding(const polar_interface_t *polar_interface, uint64_t payload, uint8_t nr_bit, uint8_t nrofPRB, bool uci_on_pusch, uint16_t E, uint8_t Qm, uint64_t *b)
|
||||
{
|
||||
/*
|
||||
* Implementing TS 38.212 Subclause 6.3.1.2 and 6.3.2
|
||||
@@ -674,7 +674,7 @@ void nr_uci_encoding(const PHY_VARS_NR_UE *ue, uint64_t payload, uint8_t nr_bit,
|
||||
} else if (A >= 12) {
|
||||
// Encoder reversal
|
||||
payload = reverse_bits(payload, A);
|
||||
ue->polar_interface.polar_encoder(&payload, b, NR_POLAR_UCI_MESSAGE_TYPE, A, nrofPRB, 0);
|
||||
polar_interface->polar_encoder(&payload, b, NR_POLAR_UCI_MESSAGE_TYPE, A, nrofPRB, 0);
|
||||
}
|
||||
|
||||
if (uci_on_pusch) {
|
||||
@@ -724,7 +724,7 @@ void nr_uci_encoding(const PHY_VARS_NR_UE *ue, uint64_t payload, uint8_t nr_bit,
|
||||
}
|
||||
}
|
||||
//#if 0
|
||||
void nr_generate_pucch2(PHY_VARS_NR_UE *ue, c16_t **txdataF,
|
||||
void nr_generate_pucch2(polar_interface_t *polar_interface, c16_t **txdataF,
|
||||
const NR_DL_FRAME_PARMS *frame_parms,
|
||||
const int16_t amp16,
|
||||
const int nr_slot_tx,
|
||||
@@ -737,7 +737,7 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue, c16_t **txdataF,
|
||||
uint64_t b[16] = {0}; // limit to 1024-bit encoded length
|
||||
// M_bit is the number of bits of block b (payload after encoding)
|
||||
uint16_t M_bit = nr_pucch_output_sequence_length(pucch_pdu->format_type, pucch_pdu->nr_of_symbols, pucch_pdu->prb_size, 0, 0, 0);
|
||||
nr_uci_encoding(ue, pucch_pdu->payload, pucch_pdu->n_bit, pucch_pdu->prb_size, false, M_bit, 0, &b[0]);
|
||||
nr_uci_encoding(polar_interface, pucch_pdu->payload, pucch_pdu->n_bit, pucch_pdu->prb_size, false, M_bit, 0, &b[0]);
|
||||
/*
|
||||
* Implementing TS 38.211
|
||||
* Subclauses 6.3.2.5.1 Scrambling (PUCCH format 2)
|
||||
@@ -908,7 +908,7 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue, c16_t **txdataF,
|
||||
}
|
||||
}
|
||||
//#if 0
|
||||
void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,c16_t **txdataF,
|
||||
void nr_generate_pucch3_4(polar_interface_t *polar_interface,c16_t **txdataF,
|
||||
const NR_DL_FRAME_PARMS *frame_parms,
|
||||
const int16_t amp16,
|
||||
const int nr_slot_tx,
|
||||
@@ -954,7 +954,7 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,c16_t **txdataF,
|
||||
is_pi_over_2_bpsk_enabled,
|
||||
add_dmrs);
|
||||
|
||||
nr_uci_encoding(ue, pucch_pdu->payload, pucch_pdu->n_bit, nrofPRB, false, M_bit, 0, b);
|
||||
nr_uci_encoding(polar_interface, pucch_pdu->payload, pucch_pdu->n_bit, nrofPRB, false, M_bit, 0, b);
|
||||
/*
|
||||
* Implementing TS 38.211
|
||||
* Subclauses 6.3.2.6.1 Scrambling (PUCCH formats 3 and 4)
|
||||
|
||||
@@ -30,19 +30,19 @@ void nr_generate_pucch1(c16_t **txdataF,
|
||||
const int nr_slot_tx,
|
||||
const fapi_nr_ul_config_pucch_pdu *pucch_pdu);
|
||||
|
||||
void nr_generate_pucch2(PHY_VARS_NR_UE *ue, c16_t **txdataF,
|
||||
void nr_generate_pucch2(polar_interface_t *polar_interface, c16_t **txdataF,
|
||||
const NR_DL_FRAME_PARMS *frame_parms,
|
||||
const int16_t amp,
|
||||
const int nr_slot_tx,
|
||||
const fapi_nr_ul_config_pucch_pdu *pucch_pdu);
|
||||
|
||||
void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,c16_t **txdataF,
|
||||
void nr_generate_pucch3_4(polar_interface_t *polar_interface,c16_t **txdataF,
|
||||
const NR_DL_FRAME_PARMS *frame_parms,
|
||||
const int16_t amp,
|
||||
const int nr_slot_tx,
|
||||
const fapi_nr_ul_config_pucch_pdu *pucch_pdu);
|
||||
|
||||
void nr_uci_encoding(const PHY_VARS_NR_UE *ue, uint64_t payload, uint8_t nr_bit, uint8_t nrofPRB, bool uci_on_pusch, uint16_t E, uint8_t Qm, uint64_t *b);
|
||||
void nr_uci_encoding(const polar_interface_t *polar_interface, uint64_t payload, uint8_t nr_bit, uint8_t nrofPRB, bool uci_on_pusch, uint16_t E, uint8_t Qm, uint64_t *b);
|
||||
|
||||
static const uint8_t list_of_prime_numbers[46] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29,
|
||||
31, 37, 41, 43, 47, 53, 59, 61, 67, 71,
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include "PHY/MODULATION/modulation_UE.h"
|
||||
#include "PHY/NR_UE_ESTIMATION/nr_estimation.h"
|
||||
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
|
||||
#include "PHY/CODING/nrPolar_tools/nr_polar_psbch_defs.h"
|
||||
#include "openair1/PHY/nr_phy_common/inc/nr_phy_common.h"
|
||||
|
||||
void nr_fill_sl_indication(nr_sidelink_indication_t *sl_ind,
|
||||
|
||||
@@ -166,11 +166,11 @@ void pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue,
|
||||
nr_generate_pucch1(txdataF, &ue->frame_parms, tx_amp, nr_slot_tx, pucch_pdu);
|
||||
break;
|
||||
case 2:
|
||||
nr_generate_pucch2(ue, txdataF, &ue->frame_parms, tx_amp, nr_slot_tx, pucch_pdu);
|
||||
nr_generate_pucch2(&ue->polar_interface, txdataF, &ue->frame_parms, tx_amp, nr_slot_tx, pucch_pdu);
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
nr_generate_pucch3_4(ue, txdataF, &ue->frame_parms, tx_amp, nr_slot_tx, pucch_pdu);
|
||||
nr_generate_pucch3_4(&ue->polar_interface, txdataF, &ue->frame_parms, tx_amp, nr_slot_tx, pucch_pdu);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user