Commit a5ebee18 authored by Francesco Mani's avatar Francesco Mani

Merge branch 'nr-coreset-bug-fix' of...

Merge branch 'nr-coreset-bug-fix' of https://gitlab.eurecom.fr/oai/openairinterface5g into nr-coreset-bug-fix
parents 57c01460 e8e92e1d
......@@ -114,6 +114,12 @@ int main(int argc, char **argv)
//double pbch_sinr;
//int pbch_tx_ant;
int N_RB_DL=106,mu=1;
nfapi_nr_dl_config_dlsch_pdu_rel15_t dlsch_config;
dlsch_config.start_prb = 0;
dlsch_config.n_prb = 50;
dlsch_config.start_symbol = 2;
dlsch_config.nb_symbols = 9;
dlsch_config.mcs_idx = 9;
uint16_t ssb_periodicity = 10;
......@@ -148,7 +154,7 @@ int main(int argc, char **argv)
randominit(0);
while ((c = getopt (argc, argv, "f:hA:pf:g:i:j:n:s:S:t:x:y:z:M:N:F:GR:dP:IL:o:")) != -1) {
while ((c = getopt (argc, argv, "f:hA:pf:g:i:j:n:s:S:t:x:y:z:M:N:F:GR:dP:IL:o:a:b:c:j:e:")) != -1) {
switch (c) {
/*case 'f':
write_output_file=1;
......@@ -317,6 +323,26 @@ int main(int argc, char **argv)
cset_offset = atoi(optarg);
break;
case 'a':
dlsch_config.start_prb = atoi(optarg);
break;
case 'b':
dlsch_config.n_prb = atoi(optarg);
break;
case 'c':
dlsch_config.start_symbol = atoi(optarg);
break;
case 'j':
dlsch_config.nb_symbols = atoi(optarg);
break;
case 'e':
dlsch_config.mcs_idx = atoi(optarg);
break;
default:
case 'h':
printf("%s -h(elp) -p(extended_prefix) -N cell_id -f output_filename -F input_filename -g channel_model -n n_frames -t Delayspread -s snr0 -S snr1 -x transmission_mode -y TXant -z RXant -i Intefrence0 -j Interference1 -A interpolation_file -C(alibration offset dB) -N CellId\n",
......@@ -506,7 +532,7 @@ int main(int argc, char **argv)
gNB->pbch_configured = 1;
for (int i=0;i<4;i++) gNB->pbch_pdu[i]=i+1;
nr_schedule_uss_dlsch_phytest(0,frame,slot);
nr_schedule_uss_dlsch_phytest(0,frame,slot,&dlsch_config);
Sched_INFO.module_id = 0;
Sched_INFO.CC_id = 0;
Sched_INFO.frame = frame;
......
......@@ -300,6 +300,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
rnti_t rnti;
NR_COMMON_channels_t *cc = RC.nrmac[module_idP]->common_channels;
nfapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config = NULL;
start_meas(&RC.nrmac[module_idP]->eNB_scheduler);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER,VCD_FUNCTION_IN);
......@@ -332,7 +333,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
frameP,
slotP,
*cfg))
nr_schedule_uss_dlsch_phytest(module_idP, frameP, slotP);
nr_schedule_uss_dlsch_phytest(module_idP, frameP, slotP, dlsch_config);
rnti = UE_RNTI(module_idP, i);
CC_id = UE_PCCID(module_idP, i);
......@@ -440,7 +441,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
nr_schedule_css_dlsch_phytest(module_idP, frameP, slotP);*/
if (slotP==1)
nr_schedule_uss_dlsch_phytest(module_idP, frameP, slotP);
nr_schedule_uss_dlsch_phytest(module_idP, frameP, slotP, dlsch_config);
/*
// Allocate CCEs for good after scheduling is done
......
......@@ -176,7 +176,8 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
* current version has only a DCI for type 1 PDCCH for C_RNTI*/
void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
frame_t frameP,
sub_frame_t slotP)
sub_frame_t slotP,
nfapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config)
{
uint8_t CC_id;
......@@ -228,6 +229,14 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
dlsch_pdu_rel15->ndi = 1;
dlsch_pdu_rel15->redundancy_version = 0;
if (dlsch_config != NULL) {
dlsch_pdu_rel15->start_prb = dlsch_config->start_prb;
dlsch_pdu_rel15->n_prb = dlsch_config->n_prb;
dlsch_pdu_rel15->start_symbol = dlsch_config->start_symbol;
dlsch_pdu_rel15->nb_symbols = dlsch_config->nb_symbols;
dlsch_pdu_rel15->mcs_idx = dlsch_config->mcs_idx;
}
nr_configure_dci_from_pdcch_config(params_rel15,
coreset,
search_space,
......
......@@ -76,7 +76,8 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
frame_t frameP,
sub_frame_t slotP);
sub_frame_t slotP,
nfapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config);
void nr_configure_css_dci_initial(nfapi_nr_dl_config_pdcch_parameters_rel15_t* pdcch_params,
nr_scs_e scs_common,
......
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