Merge remote-tracking branch 'origin/NR_PSBCH_MERGE1' into integration_2024_w15
This commit is contained in:
@@ -202,22 +202,27 @@ int nr_pdcch_dmrs_rx(PHY_VARS_NR_UE *ue,
|
||||
return(0);
|
||||
}
|
||||
|
||||
void nr_pbch_dmrs_rx(const int symbol, const unsigned int *nr_gold_pbch, c16_t *output)
|
||||
void nr_pbch_dmrs_rx(int symbol, unsigned int *nr_gold_pbch, c16_t *output, bool sidelink)
|
||||
{
|
||||
int m,m0,m1;
|
||||
uint8_t idx=0;
|
||||
AssertFatal(symbol>=0 && symbol <3,"illegal symbol %d\n",symbol);
|
||||
if (symbol == 0) {
|
||||
m0=0;
|
||||
m1=60;
|
||||
}
|
||||
else if (symbol == 1) {
|
||||
m0=60;
|
||||
m1=84;
|
||||
}
|
||||
else {
|
||||
m0=84;
|
||||
m1=144;
|
||||
if (sidelink) {
|
||||
AssertFatal(symbol == 0 || (symbol >= 5 && symbol <= 12), "illegal symbol %d\n", symbol);
|
||||
m0 = (symbol) ? (symbol - 4) * 33 : 0;
|
||||
m1 = (symbol) ? (symbol - 3) * 33 : 33;
|
||||
|
||||
} else {
|
||||
AssertFatal(symbol >= 0 && symbol < 3, "illegal symbol %d\n", symbol);
|
||||
if (symbol == 0) {
|
||||
m0 = 0;
|
||||
m1 = 60;
|
||||
} else if (symbol == 1) {
|
||||
m0 = 60;
|
||||
m1 = 84;
|
||||
} else {
|
||||
m0 = 84;
|
||||
m1 = 144;
|
||||
}
|
||||
}
|
||||
// printf("Generating pilots symbol %d, m0 %d, m1 %d\n",symbol,m0,m1);
|
||||
/// QPSK modulation
|
||||
|
||||
@@ -148,3 +148,28 @@ void init_nr_gold_prs(PHY_VARS_NR_UE* ue)
|
||||
} // for rsc
|
||||
} // for gnb
|
||||
}
|
||||
|
||||
void sl_init_psbch_dmrs_gold_sequences(PHY_VARS_NR_UE *UE)
|
||||
{
|
||||
unsigned int x1, x2;
|
||||
uint16_t slss_id;
|
||||
uint8_t reset;
|
||||
|
||||
for (slss_id = 0; slss_id < SL_NR_NUM_SLSS_IDs; slss_id++) {
|
||||
reset = 1;
|
||||
x2 = slss_id;
|
||||
|
||||
#ifdef SL_DEBUG_INIT
|
||||
printf("\nPSBCH DMRS GOLD SEQ for SLSSID :%d :\n", slss_id);
|
||||
#endif
|
||||
|
||||
for (uint8_t n = 0; n < SL_NR_NUM_PSBCH_DMRS_RE_DWORD; n++) {
|
||||
UE->SL_UE_PHY_PARAMS.init_params.psbch_dmrs_gold_sequences[slss_id][n] = lte_gold_generic(&x1, &x2, reset);
|
||||
reset = 0;
|
||||
|
||||
#ifdef SL_DEBUG_INIT_DATA
|
||||
printf("%x\n", SL_UE_INIT_PARAMS.sl_psbch_dmrs_gold_sequences[slss_id][n]);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
/*!\brief This function generates the NR Gold sequence (38-211, Sec 5.2.1) for the PBCH DMRS.
|
||||
@param PHY_VARS_NR_UE* ue structure provides configuration, frame parameters and the pointers to the 32 bits sequence storage tables
|
||||
*/
|
||||
void nr_pbch_dmrs_rx(const int dmrss, const unsigned int *nr_gold_pbch, c16_t *output);
|
||||
void nr_pbch_dmrs_rx(int dmrss, unsigned int *nr_gold_pbch, c16_t *output, bool sidelink);
|
||||
|
||||
/*!\brief This function generates the NR Gold sequence (38-211, Sec 5.2.1) for the PDCCH DMRS.
|
||||
@param PHY_VARS_NR_UE* ue structure provides configuration, frame parameters and the pointers to the 32 bits sequence storage tables
|
||||
@@ -66,5 +66,8 @@ void nr_init_pusch_dmrs(PHY_VARS_NR_UE* ue,
|
||||
|
||||
void nr_init_csi_rs(const NR_DL_FRAME_PARMS *fp, uint32_t ***csi_rs, uint32_t Nid);
|
||||
void init_nr_gold_prs(PHY_VARS_NR_UE* ue);
|
||||
|
||||
void sl_generate_pss(SL_NR_UE_INIT_PARAMS_t *sl_init_params, uint8_t n_sl_id2, uint16_t scaling);
|
||||
void sl_generate_pss_ifft_samples(sl_nr_ue_phy_params_t *sl_ue_params, SL_NR_UE_INIT_PARAMS_t *sl_init_params);
|
||||
void sl_generate_sss(SL_NR_UE_INIT_PARAMS_t *sl_init_params, uint16_t slss_id, uint16_t scaling);
|
||||
void sl_init_psbch_dmrs_gold_sequences(PHY_VARS_NR_UE *UE);
|
||||
#endif
|
||||
|
||||
@@ -67,8 +67,28 @@
|
||||
|
||||
#define PHASE_HYPOTHESIS_NUMBER (16)
|
||||
#define INDEX_NO_PHASE_DIFFERENCE (3) /* this is for no phase shift case */
|
||||
|
||||
/************** FUNCTION ******************************************/
|
||||
|
||||
static const c16_t phase_nr[PHASE_HYPOTHESIS_NUMBER] = {
|
||||
// {pi/3 ---- pi/3, -pi/3 ---- pi/3}
|
||||
{16384, -28377},
|
||||
{20173, -25821},
|
||||
{23571, -22762},
|
||||
{26509, -19260},
|
||||
{28932, -15383},
|
||||
{30791, -11207},
|
||||
{32051, -6813},
|
||||
{32687, -2286},
|
||||
{32687, 2286},
|
||||
{32051, 6813},
|
||||
{30791, 11207},
|
||||
{28932, 15383},
|
||||
{26509, 19260},
|
||||
{23571, 22762},
|
||||
{20173, 25821},
|
||||
{16384, 28377}};
|
||||
|
||||
void init_context_sss_nr(int amp);
|
||||
void free_context_sss_nr(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user