Merge remote-tracking branch 'origin/NR_100MHz_2layers_fixes' into integration_2022_wk33
This commit is contained in:
@@ -40,7 +40,7 @@ typedef struct {
|
||||
uint16_t length;
|
||||
union {
|
||||
uint32_t *ptr;
|
||||
uint32_t direct[16384];
|
||||
uint32_t direct[38016];
|
||||
} value;
|
||||
} nfapi_nr_tx_data_request_tlv_t;
|
||||
|
||||
|
||||
@@ -251,7 +251,7 @@ void nr_modulation(uint32_t *in,
|
||||
|
||||
void nr_layer_mapping(int16_t **mod_symbs,
|
||||
uint8_t n_layers,
|
||||
uint16_t n_symbs,
|
||||
uint32_t n_symbs,
|
||||
int16_t **tx_layers)
|
||||
{
|
||||
LOG_D(PHY,"Doing layer mapping for %d layers, %d symbols\n",n_layers,n_symbs);
|
||||
@@ -323,7 +323,7 @@ void nr_layer_mapping(int16_t **mod_symbs,
|
||||
|
||||
void nr_ue_layer_mapping(int16_t *mod_symbs,
|
||||
uint8_t n_layers,
|
||||
uint16_t n_symbs,
|
||||
uint32_t n_symbs,
|
||||
int16_t **tx_layers) {
|
||||
|
||||
for (int i=0; i<n_symbs/n_layers; i++) {
|
||||
|
||||
@@ -56,7 +56,7 @@ void nr_modulation(uint32_t *in,
|
||||
|
||||
void nr_layer_mapping(int16_t **mod_symbs,
|
||||
uint8_t n_layers,
|
||||
uint16_t n_symbs,
|
||||
uint32_t n_symbs,
|
||||
int16_t **tx_layers);
|
||||
|
||||
/*! \brief Perform NR layer mapping. TS 38.211 V15.4.0 subclause 7.3.1.3
|
||||
@@ -68,7 +68,7 @@ void nr_layer_mapping(int16_t **mod_symbs,
|
||||
|
||||
void nr_ue_layer_mapping(int16_t *mod_symbs,
|
||||
uint8_t n_layers,
|
||||
uint16_t n_symbs,
|
||||
uint32_t n_symbs,
|
||||
int16_t **tx_layers);
|
||||
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
uint32_t ***pdsch_dmrs = gNB->nr_gold_pdsch_dmrs[slot];
|
||||
uint16_t dmrs_symbol_map = rel15->dlDmrsSymbPos;//single DMRS: 010000100 Double DMRS 110001100
|
||||
uint8_t dmrs_len = get_num_dmrs(rel15->dlDmrsSymbPos);
|
||||
uint16_t nb_re = ((12*rel15->NrOfSymbols)-nb_re_dmrs*dmrs_len-xOverhead)*rel15->rbSize*rel15->nrOfLayers;
|
||||
uint32_t nb_re = ((12*rel15->NrOfSymbols)-nb_re_dmrs*dmrs_len-xOverhead)*rel15->rbSize*rel15->nrOfLayers;
|
||||
uint8_t Qm = rel15->qamModOrder[0];
|
||||
uint32_t encoded_length = nb_re*Qm;
|
||||
int16_t mod_dmrs[n_dmrs<<1] __attribute__ ((aligned(16)));
|
||||
@@ -254,7 +254,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
1+dmrs_Type,nl, Wt[0], Wt[1], Wf[0], Wf[1], delta, l_prime, l0, dmrs_symbol);
|
||||
#endif
|
||||
|
||||
uint16_t m=0, dmrs_idx=0;
|
||||
uint32_t m=0, dmrs_idx=0;
|
||||
|
||||
// Loop Over OFDM symbols:
|
||||
for (int l=rel15->StartSymbolIndex; l<rel15->StartSymbolIndex+rel15->NrOfSymbols; l++) {
|
||||
|
||||
@@ -46,18 +46,18 @@ uint32_t nr_compute_tbs(uint16_t Qm,
|
||||
uint8_t Nl)
|
||||
{
|
||||
|
||||
uint16_t nbp_re, nb_re;
|
||||
uint32_t nr_tbs=0;
|
||||
uint32_t Ninfo, Np_info, C;
|
||||
uint8_t n;
|
||||
|
||||
LOG_D(NR_MAC, "In %s: nb_symb_sch %d, nb_dmrs_prb %d, nb_rb %d, nb_rb_oh %d, tb_scaling %d Nl %d\n", __FUNCTION__, nb_symb_sch, nb_dmrs_prb, nb_rb, nb_rb_oh, tb_scaling, Nl);
|
||||
|
||||
nbp_re = NR_NB_SC_PER_RB * nb_symb_sch - nb_dmrs_prb - nb_rb_oh;
|
||||
nb_re = min(156, nbp_re) * nb_rb;
|
||||
const uint32_t nbp_re = NR_NB_SC_PER_RB * nb_symb_sch - nb_dmrs_prb - nb_rb_oh;
|
||||
const uint32_t nb_re = min(156, nbp_re) * nb_rb;
|
||||
// Intermediate number of information bits
|
||||
// R is tabulated as 10 times the actual code rate
|
||||
Ninfo = ((nb_re * R * Qm * Nl / 10)>>10)>>tb_scaling;
|
||||
// Rx1024 is tabulated as 10 times the actual code rate
|
||||
const uint32_t R_5 = R/5; // R can be fractional so we can't divide by 10
|
||||
// So we ned to right shift by 11 (10 for x1024 and 1 additional as above)
|
||||
const uint32_t Ninfo = ((nb_re * R_5 * Qm * Nl)>>11)>>tb_scaling;
|
||||
|
||||
uint32_t nr_tbs=0;
|
||||
uint32_t Np_info, C, n;
|
||||
|
||||
if (Ninfo <=3824) {
|
||||
n = max(3, floor(log2(Ninfo)) - 6);
|
||||
@@ -85,7 +85,7 @@ uint32_t nr_compute_tbs(uint16_t Qm,
|
||||
}
|
||||
}
|
||||
|
||||
LOG_D(NR_MAC, "In %s: Ninfo %d nbp_re %d nb_re %d Qm %d, R %d, tbs %d bits\n", __FUNCTION__, Ninfo, nbp_re, nb_re, Qm, R, nr_tbs);
|
||||
LOG_D(NR_MAC, "In %s: Ninfo %u nbp_re %d nb_re %d Qm %d, R %d, tbs %d bits\n", __FUNCTION__, Ninfo, nbp_re, nb_re, Qm, R, nr_tbs);
|
||||
|
||||
return nr_tbs;
|
||||
|
||||
|
||||
@@ -610,8 +610,7 @@ void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
|
||||
nfapi_nr_pdu_t *tx_req = &gNB_mac->TX_req[CC_id].pdu_list[ntx_req];
|
||||
|
||||
// Data to be transmitted
|
||||
bzero(tx_req->TLVs[0].value.direct,MAX_NUM_NR_DLSCH_SEGMENTS_PER_LAYER*1056);
|
||||
memcpy(tx_req->TLVs[0].value.direct, sib1_payload, sib1_sdu_length);
|
||||
memcpy(tx_req->TLVs[0].value.direct, sib1_payload, TBS);
|
||||
|
||||
tx_req->PDU_length = TBS;
|
||||
tx_req->PDU_index = pdu_index;
|
||||
|
||||
@@ -475,7 +475,7 @@ typedef struct NR_UE_harq {
|
||||
|
||||
/* Transport block to be sent using this HARQ process, its size is in
|
||||
* sched_pdsch */
|
||||
uint32_t transportBlock[16384];
|
||||
uint32_t transportBlock[38016]; // valid up to 4 layers
|
||||
uint32_t tb_size;
|
||||
|
||||
/// sched_pdsch keeps information on MCS etc used for the initial transmission
|
||||
|
||||
Reference in New Issue
Block a user