Merge remote-tracking branch 'origin/NR_RRCConfiguration' into nr_tdd_configuration
This commit is contained in:
@@ -46,6 +46,10 @@ void nr_fill_dci(PHY_VARS_gNB *gNB,
|
||||
int frame,
|
||||
int slot);
|
||||
|
||||
void nr_fill_ul_dci(PHY_VARS_gNB *gNB,
|
||||
int frame,
|
||||
int slot);
|
||||
|
||||
void nr_fill_cce_list(PHY_VARS_gNB *gNB, uint8_t m);
|
||||
|
||||
void get_coreset_rballoc(uint8_t *FreqDomainResource,int *n_rb,int *rb_offset);
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "PHY/NR_TRANSPORT/nr_transport.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "SCHED_NR/sched_nr.h"
|
||||
#include "defs.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
|
||||
@@ -227,7 +227,6 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
|
||||
uint8_t ssb_start_symbol,
|
||||
uint8_t n_hf,
|
||||
uint8_t Lmax,
|
||||
uint8_t ssb_index,
|
||||
int sfn,
|
||||
nfapi_nr_config_request_scf_t *config,
|
||||
NR_DL_FRAME_PARMS *frame_parms) {
|
||||
@@ -243,6 +242,7 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
|
||||
///Payload generation
|
||||
memset((void *)pbch, 0, sizeof(NR_gNB_PBCH));
|
||||
pbch->pbch_a=0;
|
||||
uint8_t ssb_index = ssb_pdu->ssb_pdu_rel15.SsbBlockIndex;
|
||||
uint8_t *pbch_pdu = (uint8_t*)&ssb_pdu->ssb_pdu_rel15.bchPayload;
|
||||
for (int i=0; i<NR_PBCH_PDU_BITS; i++)
|
||||
pbch->pbch_a |= ((pbch_pdu[2-(i>>3)]>>(7-(i&7)))&1)<<i;
|
||||
|
||||
@@ -92,7 +92,6 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
|
||||
uint8_t ssb_start_symbol,
|
||||
uint8_t n_hf,
|
||||
uint8_t Lmax,
|
||||
uint8_t ssb_index,
|
||||
int sfn,
|
||||
nfapi_nr_config_request_scf_t *config,
|
||||
NR_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
@@ -44,7 +44,7 @@ void handle_nr_nfapi_ssb_pdu(PHY_VARS_gNB *gNB,int frame,int slot,
|
||||
AssertFatal(dl_tti_pdu->ssb_pdu.ssb_pdu_rel15.bchPayloadFlag== 1, "bchPayloadFlat %d != 1\n",
|
||||
dl_tti_pdu->ssb_pdu.ssb_pdu_rel15.bchPayloadFlag);
|
||||
|
||||
LOG_I(PHY,"%d.%d : pbch_pdu: %x\n",frame,slot,dl_tti_pdu->ssb_pdu.ssb_pdu_rel15.bchPayload,dl_tti_pdu->ssb_pdu.ssb_pdu_rel15.SsbBlockIndex);
|
||||
LOG_I(PHY,"%d.%d : pbch_pdu: %x\n",frame,slot,dl_tti_pdu->ssb_pdu.ssb_pdu_rel15.bchPayload);
|
||||
gNB->ssb_pdu = &dl_tti_pdu->ssb_pdu;
|
||||
}
|
||||
|
||||
@@ -161,7 +161,6 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
|
||||
gNB->num_pdsch_rnti=0;
|
||||
gNB->pdcch_pdu = NULL;
|
||||
gNB->pbch_configured=0;
|
||||
gNB->ssb_pdu=NULL;
|
||||
|
||||
for (int i=0;i<number_dl_pdu;i++) {
|
||||
nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdu = &DL_req->dl_tti_request_body.dl_tti_pdu_list[i];
|
||||
|
||||
@@ -117,6 +117,8 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int slot) {
|
||||
ssb_index = i + 2*rel_slot; // computing the ssb_index
|
||||
if ((fp->L_ssb >> ssb_index) & 0x01) { // generating the ssb only if the bit of L_ssb at current ssb index is 1
|
||||
|
||||
gNB->ssb_pdu->ssb_pdu_rel15.SsbBlockIndex = ssb_index;
|
||||
|
||||
int ssb_start_symbol_abs = nr_get_ssb_start_symbol(fp, ssb_index); // computing the starting symbol for current ssb
|
||||
ssb_start_symbol = ssb_start_symbol_abs % 14; // start symbol wrt slot
|
||||
|
||||
@@ -137,7 +139,7 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int slot) {
|
||||
txdataF[0],
|
||||
AMP,
|
||||
ssb_start_symbol,
|
||||
n_hf,fp->Lmax,ssb_index,
|
||||
n_hf,fp->Lmax,
|
||||
frame, cfg, fp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -368,11 +368,14 @@ void config_common(int Mod_idP, NR_ServingCellConfigCommon_t *scc) {
|
||||
|
||||
// SSB Table Configuration
|
||||
int scs_scaling = 1<<(cfg->ssb_config.scs_common.value);
|
||||
if (scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA < 600000)
|
||||
scs_scaling = scs_scaling*3;
|
||||
if (scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA > 2016666)
|
||||
scs_scaling = scs_scaling>>2;
|
||||
uint32_t absolute_diff = (*scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB - scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA);
|
||||
cfg->ssb_table.ssb_offset_point_a.value = absolute_diff/(12*scs_scaling);
|
||||
cfg->ssb_table.ssb_offset_point_a.tl.tag = NFAPI_NR_CONFIG_SSB_OFFSET_POINT_A_TAG;
|
||||
cfg->num_tlv++;
|
||||
|
||||
cfg->ssb_table.ssb_period.value = *scc->ssb_periodicityServingCell;
|
||||
cfg->ssb_table.ssb_period.tl.tag = NFAPI_NR_CONFIG_SSB_PERIOD_TAG;
|
||||
cfg->num_tlv++;
|
||||
|
||||
@@ -69,7 +69,6 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP){
|
||||
int mib_sdu_length;
|
||||
int CC_id;
|
||||
|
||||
|
||||
AssertFatal(slotP == 0, "Subframe must be 0\n");
|
||||
AssertFatal((frameP & 7) == 0, "Frame must be a multiple of 8\n");
|
||||
|
||||
@@ -107,34 +106,36 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP){
|
||||
AssertFatal(cc->ServingCellConfigCommon->ssbSubcarrierSpacing,"ssbSubcarrierSpacing is null\n");
|
||||
AssertFatal(cc->ServingCellConfigCommon->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0],"band is null\n");
|
||||
long band = *cc->ServingCellConfigCommon->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0];
|
||||
uint32_t ssb_offset0 = cc->ServingCellConfigCommon->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB - cc->ServingCellConfigCommon->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA;
|
||||
uint32_t ssb_offset0 = *cc->ServingCellConfigCommon->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB - cc->ServingCellConfigCommon->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA;
|
||||
int ratio;
|
||||
switch (*cc->ServingCellConfigCommon->ssbSubcarrierSpacing) {
|
||||
case NR_SubcarrierSpacing_kHz15:
|
||||
AssertFatal(band <= 79, "Band %d is not possible for SSB with 15 kHz SCS\n",band);
|
||||
AssertFatal(band <= 79, "Band %ld is not possible for SSB with 15 kHz SCS\n",band);
|
||||
if (band<77) // below 3GHz
|
||||
ratio=3; // NRARFCN step is 5 kHz
|
||||
else
|
||||
ratio=1; // NRARFCN step is 15 kHz
|
||||
break;
|
||||
case NR_SubcarrierSpacing_kHz30:
|
||||
AssertFatal(band <= 79, "Band %d is not possible for SSB with 15 kHz SCS\n",band);
|
||||
AssertFatal(band <= 79, "Band %ld is not possible for SSB with 15 kHz SCS\n",band);
|
||||
if (band<77) // below 3GHz
|
||||
ratio=6; // NRARFCN step is 5 kHz
|
||||
else
|
||||
ratio=2; // NRARFCN step is 15 kHz
|
||||
break;
|
||||
case NR_SubcarrierSpacing_kHz120:
|
||||
AssertFatal(band >= 257, "Band %d is not possible for SSB with 120 kHz SCS\n",band);
|
||||
ratio=8; // NRARFCN step is 15 kHz
|
||||
AssertFatal(band >= 257, "Band %ld is not possible for SSB with 120 kHz SCS\n",band);
|
||||
ratio=2; // NRARFCN step is 15 kHz
|
||||
break;
|
||||
case NR_SubcarrierSpacing_kHz240:
|
||||
AssertFatal(band >= 257, "Band %d is not possible for SSB with 240 kHz SCS\n",band);
|
||||
ratio=16; // NRARFCN step is 15 kHz
|
||||
AssertFatal(band >= 257, "Band %ld is not possible for SSB with 240 kHz SCS\n",band);
|
||||
ratio=4; // NRARFCN step is 15 kHz
|
||||
break;
|
||||
default:
|
||||
AssertFatal(1==0,"SCS %ld not allowed for SSB \n", *cc->ServingCellConfigCommon->ssbSubcarrierSpacing);
|
||||
}
|
||||
dl_config_pdu->ssb_pdu.ssb_pdu_rel15.SsbSubcarrierOffset = 0; //kSSB
|
||||
dl_config_pdu->ssb_pdu.ssb_pdu_rel15.ssbOffsetPointA = ssb_offset0/ratio;
|
||||
dl_config_pdu->ssb_pdu.ssb_pdu_rel15.ssbOffsetPointA = ssb_offset0/(ratio*12);
|
||||
dl_config_pdu->ssb_pdu.ssb_pdu_rel15.bchPayloadFlag = 1;
|
||||
dl_config_pdu->ssb_pdu.ssb_pdu_rel15.bchPayload = ((uint32_t)cc->MIB_pdu.payload[0]) & ((1<<24)-1);
|
||||
dl_req->nPDUs++;
|
||||
|
||||
Reference in New Issue
Block a user