dynamic allocation of dl gold sequences at ue
This commit is contained in:
@@ -580,6 +580,40 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//PDCCH DMRS init (eNB offset = 0)
|
||||||
|
ue->nr_gold_pdcch[0] = (uint32_t ***)malloc16(fp->slots_per_frame*sizeof(uint32_t **));
|
||||||
|
uint32_t ***pdcch_dmrs = ue->nr_gold_pdcch[0];
|
||||||
|
AssertFatal(pdcch_dmrs!=NULL, "NR init: pdcch_dmrs malloc failed\n");
|
||||||
|
|
||||||
|
for (int slot=0; slot<fp->slots_per_frame; slot++) {
|
||||||
|
pdcch_dmrs[slot] = (uint32_t **)malloc16(fp->symbols_per_slot*sizeof(uint32_t *));
|
||||||
|
AssertFatal(pdcch_dmrs[slot]!=NULL, "NR init: pdcch_dmrs for slot %d - malloc failed\n", slot);
|
||||||
|
|
||||||
|
for (int symb=0; symb<fp->symbols_per_slot; symb++) {
|
||||||
|
pdcch_dmrs[slot][symb] = (uint32_t *)malloc16(NR_MAX_PDCCH_DMRS_INIT_LENGTH_DWORD*sizeof(uint32_t));
|
||||||
|
AssertFatal(pdcch_dmrs[slot][symb]!=NULL, "NR init: pdcch_dmrs for slot %d symbol %d - malloc failed\n", slot, symb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//PDSCH DMRS init (eNB offset = 0)
|
||||||
|
ue->nr_gold_pdsch[0] = (uint32_t ****)malloc16(fp->slots_per_frame*sizeof(uint32_t ***));
|
||||||
|
uint32_t ****pdsch_dmrs = ue->nr_gold_pdsch[0];
|
||||||
|
|
||||||
|
for (int slot=0; slot<fp->slots_per_frame; slot++) {
|
||||||
|
pdsch_dmrs[slot] = (uint32_t ***)malloc16(fp->symbols_per_slot*sizeof(uint32_t **));
|
||||||
|
AssertFatal(pdsch_dmrs[slot]!=NULL, "NR init: pdsch_dmrs for slot %d - malloc failed\n", slot);
|
||||||
|
|
||||||
|
for (int symb=0; symb<fp->symbols_per_slot; symb++) {
|
||||||
|
pdsch_dmrs[slot][symb] = (uint32_t **)malloc16(NR_MAX_NB_CODEWORDS*sizeof(uint32_t *));
|
||||||
|
AssertFatal(pdsch_dmrs[slot][symb]!=NULL, "NR init: pdsch_dmrs for slot %d symbol %d - malloc failed\n", slot, symb);
|
||||||
|
|
||||||
|
for (int q=0; q<NR_MAX_NB_CODEWORDS; q++) {
|
||||||
|
pdsch_dmrs[slot][symb][q] = (uint32_t *)malloc16(NR_MAX_PDSCH_DMRS_INIT_LENGTH_DWORD*sizeof(uint32_t));
|
||||||
|
AssertFatal(pdsch_dmrs[slot][symb][q]!=NULL, "NR init: pdsch_dmrs for slot %d symbol %d codeword %d - malloc failed\n", slot, symb, q);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// DLSCH
|
// DLSCH
|
||||||
for (eNB_id=0; eNB_id<ue->n_connected_eNB; eNB_id++) {
|
for (eNB_id=0; eNB_id<ue->n_connected_eNB; eNB_id++) {
|
||||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ void nr_gold_pdsch(PHY_VARS_NR_UE* ue,
|
|||||||
x1 = x1 ^ (x1<<31) ^ (x1<<28);
|
x1 = x1 ^ (x1<<31) ^ (x1<<28);
|
||||||
x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4);
|
x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4);
|
||||||
x2 = x2 ^ (x2<<31) ^ (x2<<30) ^ (x2<<29) ^ (x2<<28);
|
x2 = x2 ^ (x2<<31) ^ (x2<<30) ^ (x2<<29) ^ (x2<<28);
|
||||||
ue->nr_gold_pdsch[nscid][ns][l][n] = x1^x2;
|
ue->nr_gold_pdsch[0][ns][l][nscid][n] = x1^x2;
|
||||||
// if ((ns==2)&&(l==0))
|
// if ((ns==2)&&(l==0))
|
||||||
//printf("n=%d : c %x\n",n,x1^x2);
|
//printf("n=%d : c %x\n",n,x1^x2);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -689,7 +689,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
uint16_t rb_offset = (bwp_start_subcarrier - ue->frame_parms.first_carrier_offset) / 12;
|
uint16_t rb_offset = (bwp_start_subcarrier - ue->frame_parms.first_carrier_offset) / 12;
|
||||||
uint8_t config_type = ue->dmrs_DownlinkConfig.pdsch_dmrs_type;
|
uint8_t config_type = ue->dmrs_DownlinkConfig.pdsch_dmrs_type;
|
||||||
int8_t delta = get_delta(p, config_type);
|
int8_t delta = get_delta(p, config_type);
|
||||||
nr_pdsch_dmrs_rx(ue,Ns,ue->nr_gold_pdsch[eNB_offset][Ns][symbol], &pilot[0],1000,0,nb_rb_pdsch+rb_offset);
|
nr_pdsch_dmrs_rx(ue,Ns,ue->nr_gold_pdsch[eNB_offset][Ns][symbol][0], &pilot[0],1000,0,nb_rb_pdsch+rb_offset);
|
||||||
|
|
||||||
if (config_type == pdsch_dmrs_type1){
|
if (config_type == pdsch_dmrs_type1){
|
||||||
nushift = (p>>1)&1;
|
nushift = (p>>1)&1;
|
||||||
@@ -1321,7 +1321,7 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
|
|||||||
nr_slot_rx,
|
nr_slot_rx,
|
||||||
symbol,frame_parms->ofdm_symbol_size,
|
symbol,frame_parms->ofdm_symbol_size,
|
||||||
(int16_t*)&pdsch_vars[eNB_id]->rxdataF_comp0[aarx][(symbol * nb_re_pdsch)],
|
(int16_t*)&pdsch_vars[eNB_id]->rxdataF_comp0[aarx][(symbol * nb_re_pdsch)],
|
||||||
ue->nr_gold_pdsch[eNB_id][nr_slot_rx][symbol],
|
ue->nr_gold_pdsch[eNB_id][nr_slot_rx][symbol][0],
|
||||||
&phase_per_symbol[2* symbol],
|
&phase_per_symbol[2* symbol],
|
||||||
&ptrs_re_symbol[symbol]);
|
&ptrs_re_symbol[symbol]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -889,7 +889,7 @@ typedef struct {
|
|||||||
|
|
||||||
UE_MODE_t UE_mode[NUMBER_OF_CONNECTED_gNB_MAX];
|
UE_MODE_t UE_mode[NUMBER_OF_CONNECTED_gNB_MAX];
|
||||||
/// cell-specific reference symbols
|
/// cell-specific reference symbols
|
||||||
uint32_t lte_gold_table[7][20][2][14];
|
//uint32_t lte_gold_table[7][20][2][14];
|
||||||
|
|
||||||
#if defined(UPGRADE_RAT_NR)
|
#if defined(UPGRADE_RAT_NR)
|
||||||
|
|
||||||
@@ -903,10 +903,10 @@ typedef struct {
|
|||||||
uint32_t nr_gold_pbch[2][64][NR_PBCH_DMRS_LENGTH_DWORD];
|
uint32_t nr_gold_pbch[2][64][NR_PBCH_DMRS_LENGTH_DWORD];
|
||||||
|
|
||||||
/// PDSCH DMRS
|
/// PDSCH DMRS
|
||||||
uint32_t nr_gold_pdsch[2][20][14][NR_MAX_PDSCH_DMRS_INIT_LENGTH_DWORD];
|
uint32_t ****nr_gold_pdsch[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||||
|
|
||||||
/// PDCCH DMRS
|
/// PDCCH DMRS
|
||||||
uint32_t nr_gold_pdcch[7][20][3][52];
|
uint32_t ***nr_gold_pdcch[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||||
|
|
||||||
/// PUSCH DMRS sequence
|
/// PUSCH DMRS sequence
|
||||||
uint32_t ****nr_gold_pusch_dmrs;
|
uint32_t ****nr_gold_pusch_dmrs;
|
||||||
|
|||||||
Reference in New Issue
Block a user