Commit 289c9c94 authored by ahadi's avatar ahadi

modulating prs

parent cf9adcab
...@@ -171,7 +171,7 @@ void nr_init_prs(PHY_VARS_gNB* gNB) ...@@ -171,7 +171,7 @@ void nr_init_prs(PHY_VARS_gNB* gNB)
for (slotNum = 0; slotNum < fp->slots_per_frame; slotNum++) { for (slotNum = 0; slotNum < fp->slots_per_frame; slotNum++) {
for (symNum = 0; symNum < fp->symbols_per_slot ; symNum++) { for (symNum = 0; symNum < fp->symbols_per_slot ; symNum++) {
reset = 1; reset = 1;
// initial x2 for prs as 38.211 // initial x2 for prs as ts138.211
uint32_t c_init1, c_init2, c_init3; uint32_t c_init1, c_init2, c_init3;
uint32_t pow22=1<<22; uint32_t pow22=1<<22;
uint32_t pow10=1<<10; uint32_t pow10=1<<10;
......
This diff is collapsed.
...@@ -39,15 +39,20 @@ ...@@ -39,15 +39,20 @@
#define NR_PBCH_PDU_BITS 24 #define NR_PBCH_PDU_BITS 24
int nr_generate_prs(uint32_t *nr_gold_prs,
int32_t *txdataF,
int16_t amp,
uint8_t ssb_start_symbol,
nfapi_nr_config_request_scf_t *config,
NR_DL_FRAME_PARMS *frame_parms);
/*! /*!
\fn int nr_generate_pss \fn int nr_generate_pss
\brief Generation of the NR PSS \brief Generation of the NR PSS
@param @param
@returns 0 on success @returns 0 on success
*/ */
int nr_generate_prs();
int nr_generate_pss(int16_t *d_pss, int nr_generate_pss(int16_t *d_pss,
int32_t *txdataF, int32_t *txdataF,
int16_t amp, int16_t amp,
......
...@@ -126,13 +126,37 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_ ...@@ -126,13 +126,37 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_
void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
int frame,int slot, int frame,int slot,
int do_meas) { int do_meas,
nfapi_nr_dl_tti_ssb_pdu ssb_pdu) {
int aa; int aa;
NR_DL_FRAME_PARMS *fp=&gNB->frame_parms; NR_DL_FRAME_PARMS *fp=&gNB->frame_parms;
nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config; nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config;
int offset = gNB->CC_id; int offset = gNB->CC_id;
int txdataF_offset = (slot%2)*fp->samples_per_slot_wCP; int txdataF_offset = (slot%2)*fp->samples_per_slot_wCP;
// defining inputs and initials for nr_generate_prs()
int **txdataF = gNB->common_vars.txdataF;
uint8_t ssb_index, n_hf;
ssb_index = ssb_pdu.ssb_pdu_rel15.SsbBlockIndex;
LOG_D(PHY,"common_signal_procedures: frame %d, slot %d ssb index %d\n",frame,slot,ssb_index);
uint16_t ssb_start_symbol;
int ssb_start_symbol_abs = nr_get_ssb_start_symbol(fp,ssb_index); // computing the starting symbol for current ssb
ssb_start_symbol = ssb_start_symbol_abs % fp->symbols_per_slot; // start symbol wrt slot
uint16_t slots_per_hf = (fp->slots_per_frame)>>1;
if (slot<slots_per_hf)
n_hf=0;
else
n_hf=1;
if ((cfg->cell_config.frame_duplex_type.value == TDD) && if ((cfg->cell_config.frame_duplex_type.value == TDD) &&
(nr_slot_select(cfg,frame,slot) == NR_UPLINK_SLOT)) return; (nr_slot_select(cfg,frame,slot) == NR_UPLINK_SLOT)) return;
...@@ -209,6 +233,12 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, ...@@ -209,6 +233,12 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
//TODO: nr_generate_prs //TODO: nr_generate_prs
// check if we have prs to transmit in this frame and slot // check if we have prs to transmit in this frame and slot
if (cfg->carrier_config.num_tx_ant.value <= 4)
nr_generate_prs(gNB->nr_gold_pbch_dmrs[n_hf][ssb_index&7],&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
else
nr_generate_prs(gNB->nr_gold_pbch_dmrs[0][ssb_index&7],&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
if (do_meas==1) stop_meas(&gNB->phy_proc_tx); if (do_meas==1) stop_meas(&gNB->phy_proc_tx);
if ((frame&127) == 0) dump_pdsch_stats(gNB); if ((frame&127) == 0) dump_pdsch_stats(gNB);
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
void fill_ul_rb_mask(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx); void fill_ul_rb_mask(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx);
void nr_set_ssb_first_subcarrier(nfapi_nr_config_request_scf_t *cfg, NR_DL_FRAME_PARMS *fp); void nr_set_ssb_first_subcarrier(nfapi_nr_config_request_scf_t *cfg, NR_DL_FRAME_PARMS *fp);
void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, int frame_tx, int slot_tx, int do_meas); void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, int frame_tx, int slot_tx, int do_meas,nfapi_nr_dl_tti_ssb_pdu ssb_pdu);
void phy_procedures_gNB_common_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx); void phy_procedures_gNB_common_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx);
int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx); int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx);
void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot); void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment