update
This commit is contained in:
@@ -45,6 +45,7 @@ void nr_init_pbch_dmrs(PHY_VARS_gNB* gNB)
|
||||
|
||||
for (uint8_t n=0; n<NR_PBCH_DMRS_LENGTH_DWORD; n++) {
|
||||
gNB->nr_gold_pbch_dmrs[n_hf][l][n] = lte_gold_generic(&x1, &x2, reset);
|
||||
//printf("%d \n",gNB->nr_gold_pbch_dmrs[n_hf][l][n]);
|
||||
reset = 0;
|
||||
}
|
||||
|
||||
@@ -182,11 +183,9 @@ void nr_init_prs(PHY_VARS_gNB* gNB)
|
||||
|
||||
|
||||
for (uint8_t n=0; n<NR_MAX_PRS_INIT_LENGTH_DWORD; n++) {
|
||||
gNB->nr_gold_prs[slotNum][symNum][n] = lte_gold_generic(&x1, &x2, reset);
|
||||
//printf("%d \n",gNB->nr_gold_prs[slotNum][symNum][n]);
|
||||
//printf("printing x1= %d \n",x1);
|
||||
//printf("printing x2= %d \n",x2);
|
||||
reset = 0;
|
||||
gNB->nr_gold_prs[slotNum][symNum][n] = lte_gold_generic(&x1, &x2, reset);
|
||||
reset = 0;
|
||||
//printf("%d \n",gNB->nr_gold_prs[slotNum][symNum][n]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,13 @@
|
||||
@param PHY_VARS_gNB* gNB structure provides configuration, frame parameters and the pointers to the 32 bits sequence storage tables
|
||||
*/
|
||||
void nr_init_pbch_dmrs(PHY_VARS_gNB* gNB);
|
||||
|
||||
/*
|
||||
This function generates NR Gold Sequence(ts 138.211) for the PRS.
|
||||
@param PHY_VARS_gNB* gNB structure provides configuration, frame parameters and the pointers to the 32 bits sequence storage tables
|
||||
*/
|
||||
void nr_init_prs(PHY_VARS_gNB* gNB);
|
||||
|
||||
/*!\brief This function generates the NR Gold sequence (38-211, Sec 5.2.1) for the PDCCH DMRS.
|
||||
@param PHY_VARS_gNB* gNB structure provides configuration, frame parameters and the pointers to the 32 bits sequence storage tables
|
||||
@param Nid is used for the initialization of x2, Physical cell Id by default or upper layer configured pdcch_scrambling_ID
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "PHY/defs_gNB.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
||||
#include "PHY/LTE_REFSIG/lte_refsig.h"
|
||||
#include "PHY/NR_REFSIG/nr_refsig.h"
|
||||
#include "PHY/sse_intrin.h"
|
||||
|
||||
#define DEBUG_PRS
|
||||
@@ -16,7 +17,7 @@ int nr_generate_prs(uint32_t *nr_gold_prs,
|
||||
NR_DL_FRAME_PARMS *frame_parms) {
|
||||
//int k,l;
|
||||
//int16_t a;
|
||||
int16_t mod_prs[NR_MAX_PRS_INIT_LENGTH_DWORD<<1];
|
||||
int16_t mod_prs[NR_MAX_PRS_LENGTH<<1];
|
||||
uint8_t idx=0;
|
||||
uint8_t nushift = config->cell_config.phy_cell_id.value &3;
|
||||
LOG_D(PHY, "PRS mapping started at symbol %d shift %d\n", ssb_start_symbol+1, nushift);
|
||||
|
||||
@@ -93,11 +93,22 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_
|
||||
LOG_D(PHY,"SS TX: frame %d, slot %d, start_symbol %d\n",frame,slot, ssb_start_symbol);
|
||||
nr_generate_pss(gNB->d_pss, &txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
|
||||
nr_generate_sss(gNB->d_sss, &txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
|
||||
|
||||
//nr_generate_prs(gNB->nr_gold_prs[n_hf][ssb_index&7],&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
|
||||
|
||||
|
||||
if (cfg->carrier_config.num_tx_ant.value <= 4)
|
||||
nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[n_hf][ssb_index&7],&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
|
||||
|
||||
else
|
||||
nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[0][ssb_index&7],&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
|
||||
|
||||
|
||||
if (cfg->carrier_config.num_tx_ant.value <= 4)
|
||||
nr_generate_prs(gNB->nr_gold_prs[n_hf][ssb_index&7],&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
|
||||
else
|
||||
nr_generate_prs(gNB->nr_gold_prs[0][ssb_index&7],&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
|
||||
|
||||
|
||||
if (T_ACTIVE(T_GNB_PHY_MIB)) {
|
||||
unsigned char bch[3];
|
||||
@@ -154,9 +165,6 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
|
||||
n_hf=1;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ((cfg->cell_config.frame_duplex_type.value == TDD) &&
|
||||
(nr_slot_select(cfg,frame,slot) == NR_UPLINK_SLOT)) return;
|
||||
|
||||
@@ -232,12 +240,11 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
|
||||
|
||||
//TODO: nr_generate_prs
|
||||
// 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);
|
||||
|
||||
nr_generate_prs(gNB->nr_gold_prs[n_hf][ssb_index&7],&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
|
||||
else
|
||||
nr_generate_prs(gNB->nr_gold_prs[0][ssb_index&7],&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
|
||||
|
||||
if (do_meas==1) stop_meas(&gNB->phy_proc_tx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user