Commit d94b1cd1 authored by Robert Schmidt's avatar Robert Schmidt

Track RB allocation in vrb_map{,_UL} on per-symbol basis

parent 40175d24
...@@ -438,8 +438,8 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -438,8 +438,8 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
//mbsfn_status[CC_id] = 0; //mbsfn_status[CC_id] = 0;
// clear vrb_maps // clear vrb_maps
memset(cc[CC_id].vrb_map, 0, 275); memset(cc[CC_id].vrb_map, 0, sizeof(uint16_t) * 275);
memset(cc[CC_id].vrb_map_UL, 0, 275); memset(cc[CC_id].vrb_map_UL, 0, sizeof(uint16_t) * 275);
clear_nr_nfapi_information(RC.nrmac[module_idP], CC_id, frame, slot); clear_nr_nfapi_information(RC.nrmac[module_idP], CC_id, frame, slot);
} }
......
...@@ -926,9 +926,9 @@ void nr_generate_Msg2(module_id_t module_idP, ...@@ -926,9 +926,9 @@ void nr_generate_Msg2(module_id_t module_idP,
T_BUFFER(&cc[CC_id].RAR_pdu.payload[0], tx_req->TLVs[0].length)); T_BUFFER(&cc[CC_id].RAR_pdu.payload[0], tx_req->TLVs[0].length));
/* mark the corresponding RBs as used */ /* mark the corresponding RBs as used */
uint8_t *vrb_map = cc[CC_id].vrb_map; uint16_t *vrb_map = cc[CC_id].vrb_map;
for (int rb = 0; rb < pdsch_pdu_rel15->rbSize; rb++) for (int rb = 0; rb < pdsch_pdu_rel15->rbSize; rb++)
vrb_map[rb + pdsch_pdu_rel15->rbStart] = 1; vrb_map[rb + pdsch_pdu_rel15->rbStart] = 0x3fff; // mark all 14 symb
} }
} }
......
...@@ -204,7 +204,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP, ...@@ -204,7 +204,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP,
void fill_ssb_vrb_map (NR_COMMON_channels_t *cc, int rbStart, int CC_id) { void fill_ssb_vrb_map (NR_COMMON_channels_t *cc, int rbStart, int CC_id) {
uint8_t *vrb_map = cc[CC_id].vrb_map; uint16_t *vrb_map = cc[CC_id].vrb_map;
for (int rb = 0; rb < 20; rb++) for (int rb = 0; rb < 20; rb++)
vrb_map[rbStart + rb] = 1; vrb_map[rbStart + rb] = 0xf; // mark the first four symbols as occupied
} }
...@@ -545,7 +545,7 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id, ...@@ -545,7 +545,7 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
AssertFatal(sched_ctrl->pucch_sched_idx >= 0, "no uplink slot for PUCCH found!\n"); AssertFatal(sched_ctrl->pucch_sched_idx >= 0, "no uplink slot for PUCCH found!\n");
uint8_t *vrb_map = RC.nrmac[module_id]->common_channels[CC_id].vrb_map; uint16_t *vrb_map = RC.nrmac[module_id]->common_channels[CC_id].vrb_map;
const int current_harq_pid = sched_ctrl->current_harq_pid; const int current_harq_pid = sched_ctrl->current_harq_pid;
NR_UE_harq_t *harq = &sched_ctrl->harq_processes[current_harq_pid]; NR_UE_harq_t *harq = &sched_ctrl->harq_processes[current_harq_pid];
NR_UE_ret_info_t *retInfo = &sched_ctrl->retInfo[current_harq_pid]; NR_UE_ret_info_t *retInfo = &sched_ctrl->retInfo[current_harq_pid];
......
...@@ -274,7 +274,7 @@ void nr_preprocessor_phytest(module_id_t module_id, ...@@ -274,7 +274,7 @@ void nr_preprocessor_phytest(module_id_t module_id,
int rbStart = 0; int rbStart = 0;
int tStart = 0; int tStart = 0;
int rbSize = 0; int rbSize = 0;
uint8_t *vrb_map = RC.nrmac[module_id]->common_channels[CC_id].vrb_map; uint16_t *vrb_map = RC.nrmac[module_id]->common_channels[CC_id].vrb_map;
/* find largest unallocated RB region */ /* find largest unallocated RB region */
do { do {
/* advance to first free RB */ /* advance to first free RB */
......
...@@ -188,9 +188,9 @@ typedef struct { ...@@ -188,9 +188,9 @@ typedef struct {
/// Template for RA computations /// Template for RA computations
NR_RA_t ra[NR_NB_RA_PROC_MAX]; NR_RA_t ra[NR_NB_RA_PROC_MAX];
/// VRB map for common channels /// VRB map for common channels
uint8_t vrb_map[275]; uint16_t vrb_map[275];
/// VRB map for common channels and retransmissions by PHICH /// VRB map for common channels and retransmissions by PHICH
uint8_t vrb_map_UL[275]; uint16_t vrb_map_UL[275];
/// number of subframe allocation pattern available for MBSFN sync area /// number of subframe allocation pattern available for MBSFN sync area
uint8_t num_sf_allocation_pattern; uint8_t num_sf_allocation_pattern;
///Number of active SSBs ///Number of active SSBs
......
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