adding pseudo code to start prs development
This commit is contained in:
@@ -194,6 +194,23 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
|
||||
|
||||
nr_init_csi_rs(gNB, cfg->cell_config.phy_cell_id.value);
|
||||
|
||||
//PRS init
|
||||
gNB->nr_gold_prs = (uint32_t ***)malloc16(fp->slots_per_frame*sizeof(uint32_t **));
|
||||
uint32_t ***prs = gNB->nr_gold_prs;
|
||||
AssertFatal(prs!=NULL, "NR init: positioning reference signal malloc failed\n");
|
||||
|
||||
for (int slot=0; slot<fp->slots_per_frame; slot++) {
|
||||
prs[slot] = (uint32_t **)malloc16(fp->symbols_per_slot*sizeof(uint32_t *));
|
||||
AssertFatal(prs[slot]!=NULL, "NR init: positioning reference signal for slot %d - malloc failed\n", slot);
|
||||
|
||||
for (int symb=0; symb<fp->symbols_per_slot; symb++) {
|
||||
prs[slot][symb] = (uint32_t *)malloc16(NR_MAX_PRS_INIT_LENGTH_DWORD*sizeof(uint32_t));
|
||||
AssertFatal(prs[slot][symb]!=NULL, "NR init: positioning reference signal for slot %d symbol %d - malloc failed\n", slot, symb);
|
||||
}
|
||||
}
|
||||
|
||||
nr_init_prs(...);
|
||||
|
||||
/* Generate low PAPR type 1 sequences for PUSCH DMRS, these are used if transform precoding is enabled. */
|
||||
generate_lowpapr_typ1_refsig_sequences(SHRT_MAX);
|
||||
|
||||
|
||||
@@ -153,3 +153,5 @@ void nr_init_csi_rs(PHY_VARS_gNB* gNB, uint32_t Nid)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void nr_init_prs(PHY_VARS_gNB* gNB, uint32_t Nid, ...)
|
||||
|
||||
@@ -811,6 +811,9 @@ typedef struct PHY_VARS_gNB_s {
|
||||
/// CSI RS sequence
|
||||
uint32_t ***nr_gold_csi_rs;
|
||||
|
||||
/// PRS sequence
|
||||
uint32_t ***nr_gold_prs;
|
||||
|
||||
/// Indicator set to 0 after first SR
|
||||
uint8_t first_sr[NUMBER_OF_NR_SR_MAX];
|
||||
|
||||
|
||||
@@ -80,6 +80,9 @@
|
||||
#define NR_MAX_CSI_RS_LENGTH 4400 //275*8(max allocation per RB)*2(QPSK)
|
||||
#define NR_MAX_CSI_RS_INIT_LENGTH_DWORD 138 // ceil(NR_MAX_CSI_RS_LENGTH/32)
|
||||
|
||||
#define NR_MAX_PRS_LENGTH 3264 //272*6(max allocation per RB)*2(QPSK)
|
||||
#define NR_MAX_PRS_INIT_LENGTH_DWORD 102 // ceil(NR_MAX_CSI_RS_LENGTH/32)
|
||||
|
||||
#define NR_MAX_PUSCH_DMRS_LENGTH NR_MAX_PDSCH_DMRS_LENGTH
|
||||
#define NR_MAX_PUSCH_DMRS_INIT_LENGTH_DWORD NR_MAX_PDSCH_DMRS_INIT_LENGTH_DWORD
|
||||
|
||||
|
||||
@@ -206,6 +206,9 @@ 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 (do_meas==1) stop_meas(&gNB->phy_proc_tx);
|
||||
|
||||
if ((frame&127) == 0) dump_pdsch_stats(gNB);
|
||||
|
||||
@@ -960,6 +960,7 @@ int main(int argc, char **argv)
|
||||
//NR_COMMON_channels_t *cc = RC.nrmac[0]->common_channels;
|
||||
snrRun = 0;
|
||||
|
||||
//TODO: configure parameters for PRS
|
||||
|
||||
for (SNR = snr0; SNR < snr1; SNR += .2) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user