Commit 131cef2b authored by rmagueta's avatar rmagueta

Fix build warnings

parent 31a753b3
......@@ -55,7 +55,7 @@
{"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&(UE->UE_scan_carrier), defintval:0, TYPE_INT, 0}, \
{"ue-fo-compensation", CONFIG_HLP_UEFO, PARAMFLAG_BOOL, iptr:&(UE->UE_fo_compensation), defintval:0, TYPE_INT, 0}, \
{"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:90, TYPE_INT, 0}, \
{"r" , CONFIG_HLP_PRB, 0, iptr:&(N_RB_DL), defintval:160, TYPE_UINT, 0}, \
{"r" , CONFIG_HLP_PRB, 0, iptr:&(fp->N_RB_DL), defintval:160, TYPE_UINT, 0}, \
{"A" , CONFIG_HLP_TADV, 0, iptr:&(UE->timing_advance), defintval:0, TYPE_INT, 0}, \
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, u8ptr:&(fp->threequarter_fs), defintval:0, TYPE_UINT8, 0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
......
......@@ -263,9 +263,9 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
uint64_t dl_bw_khz = (12*config->carrier_config.dl_grid_size[config->ssb_config.scs_common])*(15<<config->ssb_config.scs_common);
LOG_I(PHY,"dl_bw_kHz %llu\n",dl_bw_khz);
LOG_I(PHY,"dl_bw_kHz %lu\n",dl_bw_khz);
fp->dl_CarrierFreq = ((dl_bw_khz>>1) + config->carrier_config.dl_frequency)*1000 ;
LOG_I(PHY,"dl_CarrierFreq %llu\n",fp->dl_CarrierFreq);
LOG_I(PHY,"dl_CarrierFreq %lu\n",fp->dl_CarrierFreq);
uint64_t ul_bw_khz = (12*config->carrier_config.ul_grid_size[config->ssb_config.scs_common])*(15<<config->ssb_config.scs_common);
fp->ul_CarrierFreq = ((ul_bw_khz>>1) + config->carrier_config.uplink_frequency)*1000 ;
......
......@@ -288,7 +288,7 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
}
G = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, length_dmrs,mod_order,rel15->nrOfLayers);
LOG_D(PHY,"dlsch coding A %d G %d (nb_rb %d, nb_symb_sch %d, nb_re_dmrs %d, length_dmrs %d, mod_order %d mod_order %d)\n", A,G, nb_rb,nb_symb_sch,nb_re_dmrs,length_dmrs,mod_order);
LOG_D(PHY,"dlsch coding A %d G %d (nb_rb %d, nb_symb_sch %d, nb_re_dmrs %d, length_dmrs %d, mod_order %d)\n", A,G, nb_rb,nb_symb_sch,nb_re_dmrs,length_dmrs,mod_order);
if (A > 3824) {
// Add 24-bit crc (polynomial A) to payload
......
......@@ -232,6 +232,96 @@ void nr_dlsch_unscrambling(int16_t* llr,
}
void dump_nrdlsch(PHY_VARS_NR_UE *ue,uint8_t gNB_id,uint8_t nr_slot_rx,unsigned int *coded_bits_per_codeword,int round, unsigned char harq_pid)
{
unsigned int nsymb = (ue->frame_parms.Ncp == 0) ? 14 : 12;
char fname[32],vname[32];
int N_RB_DL=ue->frame_parms.N_RB_DL;
snprintf(fname, 32, "dlsch%d_rxF_r%d_ext0.m", gNB_id, round);
snprintf(vname, 32, "dl%d_rxF_r%d_ext0", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->rxdataF_ext[0],12*N_RB_DL*nsymb,1,1);
if (ue->frame_parms.nb_antennas_rx >1) {
snprintf(fname, 32, "dlsch%d_rxF_r%d_ext1.m", gNB_id, round);
snprintf(vname, 32, "dl%d_rxF_r%d_ext1", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->rxdataF_ext[1],12*N_RB_DL*nsymb,1,1);
}
snprintf(fname, 32, "dlsch%d_ch_r%d_ext00.m", gNB_id, round);
snprintf(vname, 32, "dl%d_ch_r%d_ext00", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_estimates_ext[0],12*N_RB_DL*nsymb,1,1);
if (ue->transmission_mode[gNB_id]==7){
snprintf(fname, 32, "dlsch%d_bf_ch_r%d.m", gNB_id, round);
snprintf(vname, 32, "dl%d_bf_ch_r%d", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_bf_ch_estimates[0],512*nsymb,1,1);
//write_output(fname,vname,phy_vars_ue->lte_ue_pdsch_vars[gNB_id]->dl_bf_ch_estimates[0],512,1,1);
snprintf(fname, 32, "dlsch%d_bf_ch_r%d_ext00.m", gNB_id, round);
snprintf(vname, 32, "dl%d_bf_ch_r%d_ext00", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_bf_ch_estimates_ext[0],12*N_RB_DL*nsymb,1,1);
}
if (ue->frame_parms.nb_antennas_rx == 2) {
snprintf(fname, 32, "dlsch%d_ch_r%d_ext01.m", gNB_id, round);
snprintf(vname, 32, "dl%d_ch_r%d_ext01", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*nsymb,1,1);
}
if (ue->frame_parms.nb_antenna_ports_gNB == 2) {
snprintf(fname, 32, "dlsch%d_ch_r%d_ext10.m", gNB_id, round);
snprintf(vname, 32, "dl%d_ch_r%d_ext10", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_estimates_ext[2],12*N_RB_DL*nsymb,1,1);
if (ue->frame_parms.nb_antennas_rx == 2) {
snprintf(fname, 32, "dlsch%d_ch_r%d_ext11.m",gNB_id,round);
snprintf(vname, 32, "dl%d_ch_r%d_ext11",gNB_id,round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_estimates_ext[3],12*N_RB_DL*nsymb,1,1);
}
}
snprintf(fname, 32, "dlsch%d_rxF_r%d_uespec0.m", gNB_id, round);
snprintf(vname, 32, "dl%d_rxF_r%d_uespec0", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->rxdataF_uespec_pilots[0],12*N_RB_DL,1,1);
/*
write_output("dlsch%d_ch_ext01.m","dl01_ch0_ext",pdsch_vars[gNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*nsymb,1,1);
write_output("dlsch%d_ch_ext10.m","dl10_ch0_ext",pdsch_vars[gNB_id]->dl_ch_estimates_ext[2],12*N_RB_DL*nsymb,1,1);
write_output("dlsch%d_ch_ext11.m","dl11_ch0_ext",pdsch_vars[gNB_id]->dl_ch_estimates_ext[3],12*N_RB_DL*nsymb,1,1);
*/
snprintf(fname, 32, "dlsch%d_r%d_rho.m", gNB_id, round);
snprintf(vname, 32, "dl_rho_r%d_%d", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_rho_ext[harq_pid][round][0],12*N_RB_DL*nsymb,1,1);
snprintf(fname, 32, "dlsch%d_r%d_rho2.m", gNB_id, round);
snprintf(vname, 32, "dl_rho2_r%d_%d", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_rho2_ext[0],12*N_RB_DL*nsymb,1,1);
snprintf(fname, 32, "dlsch%d_rxF_r%d_comp0.m", gNB_id, round);
snprintf(vname, 32, "dl%d_rxF_r%d_comp0", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->rxdataF_comp0[0],12*N_RB_DL*nsymb,1,1);
if (ue->frame_parms.nb_antenna_ports_gNB == 2) {
snprintf(fname, 32, "dlsch%d_rxF_r%d_comp1.m", gNB_id, round);
snprintf(vname, 32, "dl%d_rxF_r%d_comp1", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->rxdataF_comp1[harq_pid][round][0],12*N_RB_DL*nsymb,1,1);
}
snprintf(fname, 32, "dlsch%d_rxF_r%d_llr.m", gNB_id, round);
snprintf(vname, 32, "dl%d_r%d_llr", gNB_id, round);
write_output(fname, vname, ue->pdsch_vars[0][gNB_id]->llr[0], coded_bits_per_codeword[0], 1, 0);
snprintf(fname, 32, "dlsch%d_r%d_mag1.m", gNB_id, round);
snprintf(vname, 32, "dl%d_r%d_mag1", gNB_id, round);
write_output(fname, vname, ue->pdsch_vars[0][gNB_id]->dl_ch_mag0[0], 12*N_RB_DL*nsymb, 1, 1);
snprintf(fname, 32, "dlsch%d_r%d_mag2.m", gNB_id, round);
snprintf(vname, 32, "dl%d_r%d_mag2", gNB_id, round);
write_output(fname, vname, ue->pdsch_vars[0][gNB_id]->dl_ch_magb0[0], 12*N_RB_DL*nsymb, 1, 1);
// printf("log2_maxh = %d\n",ue->pdsch_vars[gNB_id]->log2_maxh);
}
uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
UE_nr_rxtx_proc_t *proc,
int eNB_id,
......
......@@ -3368,97 +3368,6 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars,
//==============================================================================================
void dump_nrdlsch(PHY_VARS_NR_UE *ue,uint8_t gNB_id,uint8_t nr_slot_rx,unsigned int *coded_bits_per_codeword,int round, unsigned char harq_pid)
{
unsigned int nsymb = (ue->frame_parms.Ncp == 0) ? 14 : 12;
char fname[32],vname[32];
int N_RB_DL=ue->frame_parms.N_RB_DL;
snprintf(fname, 32, "dlsch%d_rxF_r%d_ext0.m", gNB_id, round);
snprintf(vname, 32, "dl%d_rxF_r%d_ext0", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->rxdataF_ext[0],12*N_RB_DL*nsymb,1,1);
if (ue->frame_parms.nb_antennas_rx >1) {
snprintf(fname, 32, "dlsch%d_rxF_r%d_ext1.m", gNB_id, round);
snprintf(vname, 32, "dl%d_rxF_r%d_ext1", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->rxdataF_ext[1],12*N_RB_DL*nsymb,1,1);
}
snprintf(fname, 32, "dlsch%d_ch_r%d_ext00.m", gNB_id, round);
snprintf(vname, 32, "dl%d_ch_r%d_ext00", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_estimates_ext[0],12*N_RB_DL*nsymb,1,1);
if (ue->transmission_mode[gNB_id]==7){
snprintf(fname, 32, "dlsch%d_bf_ch_r%d.m", gNB_id, round);
snprintf(vname, 32, "dl%d_bf_ch_r%d", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_bf_ch_estimates[0],512*nsymb,1,1);
//write_output(fname,vname,phy_vars_ue->lte_ue_pdsch_vars[gNB_id]->dl_bf_ch_estimates[0],512,1,1);
snprintf(fname, 32, "dlsch%d_bf_ch_r%d_ext00.m", gNB_id, round);
snprintf(vname, 32, "dl%d_bf_ch_r%d_ext00", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_bf_ch_estimates_ext[0],12*N_RB_DL*nsymb,1,1);
}
if (ue->frame_parms.nb_antennas_rx == 2) {
snprintf(fname, 32, "dlsch%d_ch_r%d_ext01.m", gNB_id, round);
snprintf(vname, 32, "dl%d_ch_r%d_ext01", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*nsymb,1,1);
}
if (ue->frame_parms.nb_antenna_ports_gNB == 2) {
snprintf(fname, 32, "dlsch%d_ch_r%d_ext10.m", gNB_id, round);
snprintf(vname, 32, "dl%d_ch_r%d_ext10", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_estimates_ext[2],12*N_RB_DL*nsymb,1,1);
if (ue->frame_parms.nb_antennas_rx == 2) {
snprintf(fname, 32, "dlsch%d_ch_r%d_ext11.m",gNB_id,round);
snprintf(vname, 32, "dl%d_ch_r%d_ext11",gNB_id,round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_estimates_ext[3],12*N_RB_DL*nsymb,1,1);
}
}
snprintf(fname, 32, "dlsch%d_rxF_r%d_uespec0.m", gNB_id, round);
snprintf(vname, 32, "dl%d_rxF_r%d_uespec0", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->rxdataF_uespec_pilots[0],12*N_RB_DL,1,1);
/*
write_output("dlsch%d_ch_ext01.m","dl01_ch0_ext",pdsch_vars[gNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*nsymb,1,1);
write_output("dlsch%d_ch_ext10.m","dl10_ch0_ext",pdsch_vars[gNB_id]->dl_ch_estimates_ext[2],12*N_RB_DL*nsymb,1,1);
write_output("dlsch%d_ch_ext11.m","dl11_ch0_ext",pdsch_vars[gNB_id]->dl_ch_estimates_ext[3],12*N_RB_DL*nsymb,1,1);
*/
snprintf(fname, 32, "dlsch%d_r%d_rho.m", gNB_id, round);
snprintf(vname, 32, "dl_rho_r%d_%d", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_rho_ext[harq_pid][round][0],12*N_RB_DL*nsymb,1,1);
snprintf(fname, 32, "dlsch%d_r%d_rho2.m", gNB_id, round);
snprintf(vname, 32, "dl_rho2_r%d_%d", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_rho2_ext[0],12*N_RB_DL*nsymb,1,1);
snprintf(fname, 32, "dlsch%d_rxF_r%d_comp0.m", gNB_id, round);
snprintf(vname, 32, "dl%d_rxF_r%d_comp0", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->rxdataF_comp0[0],12*N_RB_DL*nsymb,1,1);
if (ue->frame_parms.nb_antenna_ports_gNB == 2) {
snprintf(fname, 32, "dlsch%d_rxF_r%d_comp1.m", gNB_id, round);
snprintf(vname, 32, "dl%d_rxF_r%d_comp1", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->rxdataF_comp1[harq_pid][round][0],12*N_RB_DL*nsymb,1,1);
}
snprintf(fname, 32, "dlsch%d_rxF_r%d_llr.m", gNB_id, round);
snprintf(vname, 32, "dl%d_r%d_llr", gNB_id, round);
write_output(fname, vname, ue->pdsch_vars[0][gNB_id]->llr[0], coded_bits_per_codeword[0], 1, 0);
snprintf(fname, 32, "dlsch%d_r%d_mag1.m", gNB_id, round);
snprintf(vname, 32, "dl%d_r%d_mag1", gNB_id, round);
write_output(fname, vname, ue->pdsch_vars[0][gNB_id]->dl_ch_mag0[0], 12*N_RB_DL*nsymb, 1, 1);
snprintf(fname, 32, "dlsch%d_r%d_mag2.m", gNB_id, round);
snprintf(vname, 32, "dl%d_r%d_mag2", gNB_id, round);
write_output(fname, vname, ue->pdsch_vars[0][gNB_id]->dl_ch_magb0[0], 12*N_RB_DL*nsymb, 1, 1);
// printf("log2_maxh = %d\n",ue->pdsch_vars[gNB_id]->log2_maxh);
}
#ifdef DEBUG_DLSCH_DEMOD
/*
void print_bytes(char *s,__m128i *x)
......
......@@ -41,6 +41,7 @@
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
#include "openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h"
#include <openair1/PHY/impl_defs_nr.h>
#include <nr/nr_common.h>
#ifndef NO_RAT_NR
......@@ -434,7 +435,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
pucch_resource_indicator = ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid]->harq_ack.pucch_resource_indicator;
}
LOG_D(PHY, "PUCCH: %d.%d bwp_id %d dl_harq_pid = %d, pucch_resource_indicator = %d\n", frame_tx, nr_slot_tx, bwp_id,dl_harq_pid, pucch_resource_indicator);
LOG_D(PHY, "PUCCH: %d.%d bwp_id %ld dl_harq_pid = %d, pucch_resource_indicator = %d\n", frame_tx, nr_slot_tx, bwp_id,dl_harq_pid, pucch_resource_indicator);
/* Part - I
* Collect feedback that should be transmitted at this nr_slot_tx :
......@@ -609,7 +610,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
nb_symbols_total = get_nb_symbols_pucch(pucch_resource, format);
starting_symbol_index = get_starting_symb_idx(pucch_resource, format);
startingPRB = pucch_resource->startingPRB;
secondHopPRB = pucch_resource->intraSlotFrequencyHopping ? pucch_resource->secondHopPRB : startingPRB;
secondHopPRB = pucch_resource->intraSlotFrequencyHopping ? *pucch_resource->secondHopPRB : startingPRB;
if (format==pucch_format1_nr)
time_domain_occ = pucch_resource->format.choice.format1->timeDomainOCC;
if (format==pucch_format4_nr) {
......
......@@ -67,6 +67,14 @@ extern f1ap_setup_req_t *f1ap_du_data;
extern RAN_CONTEXT_t RC;
extern f1ap_cudu_inst_t f1ap_du_inst[MAX_eNB];
extern rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP,
const NR_SRB_ToAddModList_t * const srb2add_listP,
const NR_DRB_ToAddModList_t * const drb2add_listP,
const NR_DRB_ToReleaseList_t * const drb2release_listP,
const LTE_PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP,
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_srb_bearer2add_list,
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_drb_bearer2add_list);
uint8_t du_ccch_flag = 1;
int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
......@@ -801,6 +809,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
sdu_size_t sdu_lenP,
const uint8_t *sdu2P,
sdu_size_t sdu2_lenP) {
F1AP_F1AP_PDU_t pdu;
F1AP_InitialULRRCMessageTransfer_t *out;
F1AP_InitialULRRCMessageTransferIEs_t *ie;
......@@ -876,7 +885,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_InitialULRRCMessageTransferIEs__value_PR_DUtoCURRCContainer;
OCTET_STRING_fromBuf(&ie->value.choice.DUtoCURRCContainer,
sdu2P,
(char *)sdu2P,
sdu2_lenP);
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
}
......@@ -1247,7 +1256,7 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
RC.nrrrc[ctxt.module_id],
ctxt.rnti);
gNB_RRC_INST *rrc = &RC.nrrrc[ctxt.module_id];
gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id];
if (srb_id == 0) {
NR_DL_CCCH_Message_t* dl_ccch_msg=NULL;
asn_dec_rval_t dec_rval;
......
......@@ -29,6 +29,10 @@
#include <string.h>
#include <stdio.h>
#include <nr_pdcp/nr_pdcp.h>
#include <softmodem-common.h>
#include <split_headers.h>
#include <proto_agent.h>
#include "gnb_app.h"
#include "gnb_config.h"
......@@ -128,6 +132,36 @@ static uint32_t gNB_app_register_x2(uint32_t gnb_id_start, uint32_t gnb_id_end)
}
/*------------------------------------------------------------------------------*/
static void init_pdcp(void) {
if (!NODE_IS_DU(RC.nrrrc[0]->node_type)) {
// pdcp_layer_init();
// pdcp_layer_init_for_CU();
uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
(PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
if (IS_SOFTMODEM_NOS1) {
printf("IS_SOFTMODEM_NOS1 option enabled \n");
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT;
}
pdcp_module_init(pdcp_initmask);
if (NODE_IS_CU(RC.nrrrc[0]->node_type)) {
LOG_I(PDCP, "node is CU, pdcp send rlc_data_req by proto_agent \n");
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t)proto_agent_send_rlc_data_req);
} else {
LOG_I(PDCP, "node is gNB \n");
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
}
} else {
LOG_I(PDCP, "node is DU, rlc send pdcp_data_ind by proto_agent \n");
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) proto_agent_send_pdcp_data_ind);
}
}
/*------------------------------------------------------------------------------*/
void *gNB_app_task(void *args_p)
{
......
......@@ -169,6 +169,10 @@ uint16_t nr_generate_ulsch_pdu(uint8_t *sdus_payload,
unsigned short post_padding,
uint16_t buflen);
void fill_dci_search_candidates(NR_SearchSpace_t *ss,fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15);
void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15, fapi_nr_dl_config_request_t *dl_config, int rnti_type, int ss_id);
void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl_config, frame_t frame, int slot);
uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac,
......
......@@ -682,8 +682,8 @@ void nr_get_RA_window(NR_UE_MAC_INST_t *mac){
AssertFatal(&setup->rach_ConfigGeneric != NULL, "In %s: FATAL! rach_ConfigGeneric is NULL...\n", __FUNCTION__);
NR_RACH_ConfigGeneric_t *rach_ConfigGeneric = &setup->rach_ConfigGeneric;
long scs = (mac->scc) ?
&mac->scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing :
&mac->scc_SIB->downlinkConfigCommon.frequencyInfoDL.scs_SpecificCarrierList.list.array[0]->subcarrierSpacing;
mac->scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing :
mac->scc_SIB->downlinkConfigCommon.frequencyInfoDL.scs_SpecificCarrierList.list.array[0]->subcarrierSpacing;
ra_ResponseWindow = rach_ConfigGeneric->ra_ResponseWindow;
......
......@@ -734,7 +734,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
(*dci_format == NR_UL_DCI_FORMAT_0_1) ? pusch_dmrs_pos0 : pusch_dmrs_pos2, pusch_len1);
if ((mac->ULbwp[0] && pusch_config_pdu->transform_precoding == transform_precoder_disabled))
pusch_config_pdu->num_dmrs_cdm_grps_no_data = 1;
else if (*dci_format == NR_UL_DCI_FORMAT_0_0 || mac->ULbwp[0] && pusch_config_pdu->transform_precoding == transform_precoder_enabled)
else if (*dci_format == NR_UL_DCI_FORMAT_0_0 || (mac->ULbwp[0] && pusch_config_pdu->transform_precoding == transform_precoder_enabled))
pusch_config_pdu->num_dmrs_cdm_grps_no_data = 2;
// Num PRB Overhead from PUSCH-ServingCellConfig
......@@ -1673,7 +1673,7 @@ static int get_nr_prach_info_from_ssb_index(uint8_t ssb_idx,
ssb_info_p = &ssb_list.tx_ssb[ssb_idx];
LOG_D(MAC,"checking for prach : ssb_info_p->nb_mapped_ro %d\n",ssb_info_p->nb_mapped_ro);
for (uint8_t n_mapped_ro=0; n_mapped_ro<ssb_info_p->nb_mapped_ro; n_mapped_ro++) {
LOG_D(MAC,"%d.%d: mapped_ro[%d]->frame.slot %d.%d, prach_assoc_pattern.nb_of_frame %d\n",slot,ssb_info_p->mapped_ro[n_mapped_ro]->frame,ssb_info_p->mapped_ro[n_mapped_ro]->slot,prach_assoc_pattern.nb_of_frame);
LOG_D(MAC,"%d.%d: mapped_ro[%d]->frame.slot %d.%d, prach_assoc_pattern.nb_of_frame %d\n",slot,frame,n_mapped_ro,ssb_info_p->mapped_ro[n_mapped_ro]->frame,ssb_info_p->mapped_ro[n_mapped_ro]->slot,prach_assoc_pattern.nb_of_frame);
if ((slot == ssb_info_p->mapped_ro[n_mapped_ro]->slot) &&
(ssb_info_p->mapped_ro[n_mapped_ro]->frame == (frame % prach_assoc_pattern.nb_of_frame))) {
......
......@@ -28,6 +28,7 @@
* \email: raymond.knopp@eurecom.fr, kroempa@gmail.com
*/
#include <f1ap_du_rrc_message_transfer.h>
#include "platform_types.h"
#include "nr_rrc_defs.h"
#include "nr_rrc_extern.h"
......@@ -44,6 +45,8 @@
#include "NR_BCCH-BCH-Message.h"
#include "rrc_gNB_UE_context.h"
#include "RRC/NR/MESSAGES/asn1_msg.h"
extern RAN_CONTEXT_t RC;
int generate_pdcch_ConfigSIB1(NR_PDCCH_ConfigSIB1_t *pdcch_ConfigSIB1,
......
......@@ -1033,7 +1033,7 @@ void fill_initial_SpCellConfig(rnti_t rnti,
AssertFatal(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.subcarrierSpacing==NR_SubcarrierSpacing_kHz30,
"SCS != 30kHz\n");
AssertFatal(scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity==NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms5,
"TDD period != 5ms : %d\n",scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity);
"TDD period != 5ms : %ld\n",scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity);
schedulingRequestResourceConfig->periodicityAndOffset->choice.sl40 = 10*((rnti>>1)&3) + (rnti&2);
schedulingRequestResourceConfig->resource = calloc(1,sizeof(*schedulingRequestResourceConfig->resource));
......
......@@ -391,7 +391,6 @@ rrc_gNB_generate_RRCSetup(
//-----------------------------------------------------------------------------
{
LOG_I(NR_RRC, "rrc_gNB_generate_RRCSetup \n");
NR_SRB_ToAddModList_t **SRB_configList = NULL;
MessageDef *message_p;
// T(T_GNB_RRC_SETUP,
......@@ -536,7 +535,6 @@ rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(
//-----------------------------------------------------------------------------
{
LOG_I(NR_RRC, "generate RRCSetup for RRCReestablishmentRequest \n");
NR_SRB_ToAddModList_t **SRB_configList = NULL;
rrc_gNB_ue_context_t *ue_context_pP = NULL;
gNB_RRC_INST *rrc_instance_p = RC.nrrrc[ctxt_pP->module_id];
NR_ServingCellConfigCommon_t *scc=rrc_instance_p->carrier.servingcellconfigcommon;
......@@ -544,7 +542,6 @@ rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(
ue_context_pP = rrc_gNB_get_next_free_ue_context(ctxt_pP, rrc_instance_p, 0);
gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context;
SRB_configList = &ue_p->SRB_configList;
ue_p->Srb0.Tx_buffer.payload_size = do_RRCSetup(ue_context_pP,
(uint8_t *) ue_p->Srb0.Tx_buffer.Payload,
rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id),
......
......@@ -720,7 +720,6 @@ rrc_gNB_process_NGAP_DOWNLINK_NAS(
struct rrc_gNB_ue_context_s *ue_context_p = NULL;
protocol_ctxt_t ctxt;
memset(&ctxt, 0, sizeof(protocol_ctxt_t));
MessageDef *message_p;
ue_initial_id = NGAP_DOWNLINK_NAS (msg_p).ue_initial_id;
gNB_ue_ngap_id = NGAP_DOWNLINK_NAS (msg_p).gNB_ue_ngap_id;
......
......@@ -167,7 +167,7 @@ rrc_data_req_ue(
TASK_RRC_UE,
TASK_PDCP_UE,
sdu_sizeP);
LOG_I(RRC,"Sending RRC message for SRB %d, sdu_size %d\n",rb_idP,sdu_sizeP);
LOG_I(RRC,"Sending RRC message for SRB %ld, sdu_size %d\n",rb_idP,sdu_sizeP);
memcpy (message_buffer, buffer_pP, sdu_sizeP);
message_p = itti_alloc_new_message ( TASK_RRC_UE, 0, RRC_DCCH_DATA_REQ);
RRC_DCCH_DATA_REQ (message_p).frame = ctxt_pP->frame;
......
......@@ -552,7 +552,6 @@ int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message(
const uint8_t gNB_index,
uint8_t *const bufferP,
const uint8_t buffer_len ){
int i;
NR_BCCH_BCH_Message_t *bcch_message = NULL;
......
......@@ -922,6 +922,8 @@ static int gtpv1u_gnb_tunnel_data_req(gtpv1u_gnb_tunnel_data_req_t *gnb_tunnel_d
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_TUNNEL_DATA_REQ, VCD_FUNCTION_OUT);
/* Buffer still needed, do not free it */
//itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), data_req_p->buffer);
return 0;
}
//-----------------------------------------------------------------------------
......
......@@ -42,6 +42,7 @@
#include <unistd.h>
#include <errno.h>
#include <linux/sysctl.h>
#include <sys/sysctl.h>
#include "common_lib.h"
#include "ethernet_lib.h"
......
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