Commit 870845fc authored by Ahmed Hussein's avatar Ahmed Hussein
Browse files

Minor fixes and modifications for get_K_ptrs

parent b0611cf4
......@@ -284,7 +284,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
if (UE->ptrs_configured == 1) {
K_ptrs = harq_process_ul_ue->pusch_pdu.pusch_ptrs.ptrs_freq_density;
K_ptrs = (harq_process_ul_ue->pusch_pdu.pusch_ptrs.ptrs_freq_density)?4:2;
L_ptrs = 1<<harq_process_ul_ue->pusch_pdu.pusch_ptrs.ptrs_time_density;
beta_ptrs = 1; // temp value until power control is implemented
......
......@@ -655,16 +655,13 @@ uint8_t get_L_ptrs(uint8_t mcs1, uint8_t mcs2, uint8_t mcs3, uint8_t I_mcs, uint
uint8_t get_K_ptrs(uint16_t nrb0, uint16_t nrb1, uint16_t N_RB) {
if (nrb0 == 0 || nrb0 == 0)
return 2;
if (N_RB < nrb0) {
LOG_I(PHY,"PUSH PT-RS is not present.\n");
return 0;
return -1;
} else if (N_RB >= nrb0 && N_RB < nrb1)
return 2;
return 0;
else
return 4;
return 1;
}
uint16_t nr_dci_size(nr_dci_format_t format,
......
......@@ -791,8 +791,8 @@ void nr_schedule_uss_ulsch_phytest(int Mod_idP,
uint8_t ptrs_mcs1 = 2; // higher layer parameter in PTRS-UplinkConfig
uint8_t ptrs_mcs2 = 4; // higher layer parameter in PTRS-UplinkConfig
uint8_t ptrs_mcs3 = 10; // higher layer parameter in PTRS-UplinkConfig
uint16_t n_rb0 = 25;
uint16_t n_rb1 = 75;
uint16_t n_rb0 = 25; // higher layer parameter in PTRS-UplinkConfig
uint16_t n_rb1 = 75; // higher layer parameter in PTRS-UplinkConfig
pusch_pdu->pusch_ptrs.ptrs_time_density = get_L_ptrs(ptrs_mcs1, ptrs_mcs2, ptrs_mcs3, pusch_pdu->mcs_index, pusch_pdu->mcs_table);
pusch_pdu->pusch_ptrs.ptrs_freq_density = get_K_ptrs(n_rb0, n_rb1, pusch_pdu->rb_size);
// --------------------------------------------------------------------------------------------------------------------------------------------
......
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