Commit 02e1b643 authored by Laurent THOMAS's avatar Laurent THOMAS

small code review

parent e198b741
......@@ -45,7 +45,7 @@
#define MAX_NUM_SUBCARRIER_SPACING 5
#define NR_MAX_OFDM_SYMBOL_SIZE 4096
#define NR_SYMBOLS_PER_SLOT 14
#define NR_SYMBOLS_PER_SLOT NR_NUMBER_OF_SYMBOLS_PER_SLOT
#define ONE_OVER_SQRT2_Q15 23170
#define ONE_OVER_TWO_Q15 16384
......
......@@ -366,8 +366,8 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
cfg->ssb_table.ssb_mask_list[0].ssb_mask = 0;
cfg->ssb_table.ssb_mask_list[1].ssb_mask = 0;
for (int i = 0; i < 4; i++) {
cfg->ssb_table.ssb_mask_list[0].ssb_mask += ((uint32_t) scc->ssb_PositionsInBurst->choice.longBitmap.buf[3 - i] << i * 8);
cfg->ssb_table.ssb_mask_list[1].ssb_mask += ((uint32_t) scc->ssb_PositionsInBurst->choice.longBitmap.buf[7 - i] << i * 8);
cfg->ssb_table.ssb_mask_list[0].ssb_mask += (uint32_t) scc->ssb_PositionsInBurst->choice.longBitmap.buf[3 - i] << i * 8;
cfg->ssb_table.ssb_mask_list[1].ssb_mask += (uint32_t) scc->ssb_PositionsInBurst->choice.longBitmap.buf[7 - i] << i * 8;
}
break;
default:
......
......@@ -342,8 +342,8 @@ static void config_common(gNB_MAC_INST *nrmac, int pdsch_AntennaPorts, int pusch
cfg->ssb_table.ssb_mask_list[0].ssb_mask.value = 0;
cfg->ssb_table.ssb_mask_list[1].ssb_mask.value = 0;
for (int i=0; i<4; i++) {
cfg->ssb_table.ssb_mask_list[0].ssb_mask.value += ((uint32_t) scc->ssb_PositionsInBurst->choice.longBitmap.buf[3 - i] << i * 8);
cfg->ssb_table.ssb_mask_list[1].ssb_mask.value += ((uint32_t) scc->ssb_PositionsInBurst->choice.longBitmap.buf[7 - i] << i * 8);
cfg->ssb_table.ssb_mask_list[0].ssb_mask.value += (uint32_t) scc->ssb_PositionsInBurst->choice.longBitmap.buf[3 - i] << i * 8;
cfg->ssb_table.ssb_mask_list[1].ssb_mask.value += (uint32_t) scc->ssb_PositionsInBurst->choice.longBitmap.buf[7 - i] << i * 8;
}
break;
default:
......
......@@ -40,6 +40,7 @@
#include "UTIL/OPT/opt.h"
#include "RRC/NR/nr_rrc_config.h"
#include "common/utils/nr/nr_common.h"
#include "openair1/PHY/defs_nr_common.h"
#define ENABLE_MAC_PAYLOAD_DEBUG
......@@ -101,7 +102,7 @@ static void fill_ssb_vrb_map(NR_COMMON_channels_t *cc, int rbStart, int ssb_subc
uint16_t *vrb_map = cc[CC_id].vrb_map;
const int extra_prb = ssb_subcarrier_offset > 0;
for (int rb = 0; rb < 20 + extra_prb; rb++)
vrb_map[rbStart + rb] = SL_to_bitmap(symStart % 14, 4);
vrb_map[rbStart + rb] = SL_to_bitmap(symStart % NR_SYMBOLS_PER_SLOT, 4);
}
void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP, nfapi_nr_dl_tti_request_t *DL_req)
......
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