Commit c1dd5da1 authored by rmagueta's avatar rmagueta

Fix update_ps flag for PDSCH and PUSCH

parent 9056bfa9
......@@ -614,7 +614,8 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
process_CellGroup(CellGroup,&UE_info->UE_sched_ctrl[UE_id]);
const NR_ServingCellConfig_t *servingCellConfig = CellGroup ? CellGroup->spCellConfig->spCellConfigDedicated : NULL;
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
sched_ctrl->update_ps = TRUE;
sched_ctrl->update_pdsch_ps = TRUE;
sched_ctrl->update_pusch_ps = TRUE;
const NR_PDSCH_ServingCellConfig_t *pdsch = servingCellConfig ? servingCellConfig->pdsch_ServingCellConfig->choice.setup : NULL;
if (sched_ctrl->available_dl_harq.len == 0) {
// add all available DL HARQ processes for this UE in SA
......
......@@ -577,9 +577,9 @@ bool allocate_dl_retransmission(module_id_t module_id,
}
/* check whether we need to switch the TDA allocation since the last
* (re-)transmission */
if (ps->time_domain_allocation != tda || sched_ctrl->update_ps) {
if (ps->time_domain_allocation != tda || sched_ctrl->update_pdsch_ps) {
nr_set_pdsch_semi_static(scc, cg, sched_ctrl->active_bwp, bwpd, tda, f, ps);
sched_ctrl->update_ps = FALSE;
sched_ctrl->update_pdsch_ps = FALSE;
}
} else {
/* the retransmission will use a different time domain allocation, check
......@@ -796,9 +796,9 @@ void pf_dl(module_id_t module_id,
NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch;
NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
const long f = (sched_ctrl->active_bwp || bwpd) ? sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats : 0;
if (ps->time_domain_allocation != tda || sched_ctrl->update_ps) {
if (ps->time_domain_allocation != tda || sched_ctrl->update_pdsch_ps) {
nr_set_pdsch_semi_static(scc, UE_info->CellGroup[UE_id], sched_ctrl->active_bwp, bwpd, tda, f, ps);
sched_ctrl->update_ps = FALSE;
sched_ctrl->update_pdsch_ps = FALSE;
}
sched_pdsch->Qm = nr_get_Qm_dl(sched_pdsch->mcs, ps->mcsTableIdx);
sched_pdsch->R = nr_get_code_rate_dl(sched_pdsch->mcs, ps->mcsTableIdx);
......
......@@ -974,9 +974,9 @@ bool allocate_ul_retransmission(module_id_t module_id,
if (ps->time_domain_allocation != tda
|| ps->dci_format != dci_format
|| ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data
|| sched_ctrl->update_ps) {
|| sched_ctrl->update_pusch_ps) {
nr_set_pusch_semi_static(scc, sched_ctrl->active_ubwp, ubwpd, dci_format, tda, num_dmrs_cdm_grps_no_data, ps);
sched_ctrl->update_ps = FALSE;
sched_ctrl->update_pusch_ps = FALSE;
}
LOG_D(NR_MAC, "%s(): retransmission keeping TDA %d and TBS %d\n", __func__, tda, retInfo->tb_size);
} else {
......@@ -1162,9 +1162,9 @@ void pf_ul(module_id_t module_id,
if (ps->time_domain_allocation != tda
|| ps->dci_format != dci_format
|| ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data
|| sched_ctrl->update_ps) {
|| sched_ctrl->update_pusch_ps) {
nr_set_pusch_semi_static(scc, sched_ctrl->active_ubwp, ubwpd, dci_format, tda, num_dmrs_cdm_grps_no_data, ps);
sched_ctrl->update_ps = FALSE;
sched_ctrl->update_pusch_ps = FALSE;
}
NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch;
sched_pusch->mcs = 9;
......@@ -1264,9 +1264,9 @@ void pf_ul(module_id_t module_id,
if (ps->time_domain_allocation != tda
|| ps->dci_format != dci_format
|| ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data
|| sched_ctrl->update_ps) {
|| sched_ctrl->update_pusch_ps) {
nr_set_pusch_semi_static(scc, sched_ctrl->active_ubwp, ubwpd, dci_format, tda, num_dmrs_cdm_grps_no_data, ps);
sched_ctrl->update_ps = FALSE;
sched_ctrl->update_pusch_ps = FALSE;
}
update_ul_ue_R_Qm(sched_pusch, ps);
......
......@@ -594,7 +594,8 @@ typedef struct {
int ul_failure;
struct CSI_Report CSI_report[MAX_CSI_REPORTS];
bool SR;
bool update_ps;
bool update_pdsch_ps;
bool update_pusch_ps;
/// information about every HARQ process
NR_UE_harq_t harq_processes[NR_MAX_NB_HARQ_PROCESSES];
/// HARQ processes that are free
......
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