Merge remote-tracking branch 'origin/develop-SA-CBRA' into integration_2020_wk15
Conflicts: openair1/PHY/TOOLS/nr_phy_scope.c targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
This commit is contained in:
@@ -61,6 +61,8 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
debug_ch_est = fopen("debug_ch_est.txt","w");
|
||||
#endif
|
||||
|
||||
//uint16_t Nid_cell = (eNB_offset == 0) ? gNB->frame_parms.Nid_cell : gNB->measurements.adj_cell_id[eNB_offset-1];
|
||||
|
||||
uint8_t nushift;
|
||||
int **ul_ch_estimates = gNB->pusch_vars[ul_id]->ul_ch_estimates;
|
||||
int **rxdataF = gNB->common_vars.rxdataF;
|
||||
@@ -128,7 +130,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
//------------------generate DMRS------------------//
|
||||
|
||||
if (pusch_pdu->transform_precoding == transform_precoder_disabled) {
|
||||
nr_pusch_dmrs_rx(gNB, Ns, gNB->nr_gold_pusch_dmrs[pusch_pdu->scid][Ns][symbol], &pilot[0], 1000, 0, nb_rb_pusch, pusch_pdu->rb_start*NR_NB_SC_PER_RB, pusch_pdu->dmrs_config_type);
|
||||
nr_pusch_dmrs_rx(gNB, Ns, gNB->nr_gold_pusch_dmrs[pusch_pdu->scid][Ns][symbol], &pilot[0], 1000, 0, nb_rb_pusch, (pusch_pdu->bwp_start + pusch_pdu->rb_start)*NR_NB_SC_PER_RB, pusch_pdu->dmrs_config_type);
|
||||
}
|
||||
else { // if transform precoding or SC-FDMA is enabled in Uplink
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
|
||||
else {
|
||||
nb_re_dmrs = 4*rel15->numDmrsCdmGrpsNoData;
|
||||
}
|
||||
n_dmrs = (rel15->rbSize+rel15->rbStart)*nb_re_dmrs;
|
||||
n_dmrs = (rel15->BWPStart+rel15->rbStart+rel15->rbSize)*nb_re_dmrs;
|
||||
|
||||
uint16_t dmrs_symbol_map = rel15->dlDmrsSymbPos;//single DMRS: 010000100 Double DMRS 110001100
|
||||
uint8_t dmrs_len = get_num_dmrs(rel15->dlDmrsSymbPos);
|
||||
@@ -266,6 +266,7 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
|
||||
#endif
|
||||
|
||||
/// DMRS QPSK modulation
|
||||
// TODO: performance improvement, we can skip the modulation of DMRS symbols outside the bandwidth part
|
||||
for (int l=rel15->StartSymbolIndex; l<rel15->StartSymbolIndex+rel15->NrOfSymbols; l++) {
|
||||
if (rel15->dlDmrsSymbPos & (1 << l)) {
|
||||
nr_modulation(pdsch_dmrs[l][0], n_dmrs*2, DMRS_MOD_ORDER, mod_dmrs[l]); // currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated
|
||||
@@ -318,11 +319,24 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
|
||||
/// DMRS QPSK modulation
|
||||
uint8_t k_prime=0;
|
||||
uint16_t n=0;
|
||||
if ((dmrs_symbol_map & (1 << l))){ //DMRS time occasion
|
||||
if (dmrs_Type == NFAPI_NR_DMRS_TYPE1) // another if condition to be included to check pdsch config type (reference of k)
|
||||
dmrs_idx = rel15->rbStart*6;
|
||||
else
|
||||
dmrs_idx = rel15->rbStart*4;
|
||||
|
||||
if ((dmrs_symbol_map & (1 << l))){ // DMRS time occasion
|
||||
// The reference point for is subcarrier 0 of the lowest-numbered resource block in CORESET 0 if the corresponding
|
||||
// PDCCH is associated with CORESET 0 and Type0-PDCCH common search space and is addressed to SI-RNTI
|
||||
// 3GPP TS 38.211 V15.8.0 Section 7.4.1.1.2 Mapping to physical resources
|
||||
if (rel15->rnti==SI_RNTI) {
|
||||
if (dmrs_Type==NFAPI_NR_DMRS_TYPE1) {
|
||||
dmrs_idx = rel15->rbStart*6;
|
||||
} else {
|
||||
dmrs_idx = rel15->rbStart*4;
|
||||
}
|
||||
} else {
|
||||
if (dmrs_Type == NFAPI_NR_DMRS_TYPE1) {
|
||||
dmrs_idx = (rel15->rbStart+rel15->BWPStart)*6;
|
||||
} else {
|
||||
dmrs_idx = (rel15->rbStart+rel15->BWPStart)*4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update l_prime in the case of double DMRS config
|
||||
@@ -507,7 +521,7 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
|
||||
gNB->common_vars.beam_id[0][slot*frame_parms->symbols_per_slot+j] = rel15->precodingAndBeamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx;
|
||||
}
|
||||
else {
|
||||
LOG_W(PHY,"beam index for PDSCH allocation already taken\n");
|
||||
LOG_D(PHY,"beam index for PDSCH allocation already taken\n");
|
||||
}
|
||||
}// dlsch loop
|
||||
|
||||
|
||||
@@ -774,7 +774,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
|
||||
|
||||
else {
|
||||
preamble_shift -= NCS;
|
||||
|
||||
|
||||
if (preamble_shift < 0)
|
||||
preamble_shift+=N_ZC;
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
|
||||
#endif
|
||||
|
||||
uint8_t is_dmrs_re;
|
||||
start_re = (frame_parms->first_carrier_offset + (pusch_pdu->rb_start * NR_NB_SC_PER_RB))%frame_parms->ofdm_symbol_size;
|
||||
start_re = (frame_parms->first_carrier_offset + (pusch_pdu->rb_start + pusch_pdu->bwp_start) * NR_NB_SC_PER_RB)%frame_parms->ofdm_symbol_size;
|
||||
nb_re_pusch = NR_NB_SC_PER_RB * pusch_pdu->rb_size;
|
||||
#ifdef __AVX2__
|
||||
int nb_re_pusch2 = nb_re_pusch + (nb_re_pusch&7);
|
||||
@@ -1178,7 +1178,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
||||
}
|
||||
|
||||
|
||||
bwp_start_subcarrier = (rel15_ul->rb_start*NR_NB_SC_PER_RB + frame_parms->first_carrier_offset) % frame_parms->ofdm_symbol_size;
|
||||
bwp_start_subcarrier = ((rel15_ul->rb_start + rel15_ul->bwp_start)*NR_NB_SC_PER_RB + frame_parms->first_carrier_offset) % frame_parms->ofdm_symbol_size;
|
||||
|
||||
dmrs_symbol_flag = ((rel15_ul->ul_dmrs_symb_pos)>>symbol)&0x01;
|
||||
|
||||
|
||||
@@ -657,6 +657,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
uint8_t eNB_offset,
|
||||
bool is_SI,
|
||||
unsigned char Ns,
|
||||
unsigned short p,
|
||||
unsigned char symbol,
|
||||
@@ -694,7 +695,10 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
#endif
|
||||
|
||||
// generate pilot for gNB port number 1000+p
|
||||
uint16_t rb_offset = (bwp_start_subcarrier - ue->frame_parms.first_carrier_offset) / 12 - BWPStart;
|
||||
uint16_t rb_offset = (bwp_start_subcarrier - ue->frame_parms.first_carrier_offset) / 12;
|
||||
if (is_SI) {
|
||||
rb_offset -= BWPStart;
|
||||
}
|
||||
uint8_t config_type = ue->dmrs_DownlinkConfig.pdsch_dmrs_type;
|
||||
int8_t delta = get_delta(p, config_type);
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
uint8_t eNB_offset,
|
||||
bool is_SI,
|
||||
unsigned char Ns,
|
||||
unsigned short p,
|
||||
unsigned char symbol,
|
||||
|
||||
@@ -137,7 +137,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
uint8_t mod_order = pusch_pdu->qam_mod_order;
|
||||
uint16_t rnti = pusch_pdu->rnti;
|
||||
uint8_t cdm_grps_no_data = pusch_pdu->num_dmrs_cdm_grps_no_data;
|
||||
uint16_t start_sc = frame_parms->first_carrier_offset + start_rb*NR_NB_SC_PER_RB;
|
||||
uint16_t start_sc = frame_parms->first_carrier_offset + (start_rb+pusch_pdu->bwp_start)*NR_NB_SC_PER_RB;
|
||||
|
||||
if (start_sc >= frame_parms->ofdm_symbol_size)
|
||||
start_sc -= frame_parms->ofdm_symbol_size;
|
||||
@@ -195,7 +195,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
/////////////////////////DMRS Modulation/////////////////////////
|
||||
///////////
|
||||
uint32_t ***pusch_dmrs = UE->nr_gold_pusch_dmrs[slot];
|
||||
uint16_t n_dmrs = (start_rb+nb_rb)*((dmrs_type == pusch_dmrs_type1) ? 6:4);
|
||||
uint16_t n_dmrs = (pusch_pdu->bwp_start + start_rb + nb_rb)*((dmrs_type == pusch_dmrs_type1) ? 6:4);
|
||||
int16_t mod_dmrs[n_dmrs<<1] __attribute((aligned(16)));
|
||||
///////////
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -355,16 +355,17 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
if (pusch_pdu->transform_precoding == transform_precoder_disabled){
|
||||
|
||||
if (dmrs_type == pusch_dmrs_type1)
|
||||
dmrs_idx = start_rb*6;
|
||||
dmrs_idx = (pusch_pdu->bwp_start + start_rb)*6;
|
||||
else
|
||||
dmrs_idx = start_rb*4;
|
||||
|
||||
// Perform this on gold sequence, not required when SC FDMA operation is done,
|
||||
dmrs_idx = (pusch_pdu->bwp_start + start_rb)*4;
|
||||
|
||||
// TODO: performance improvement, we can skip the modulation of DMRS symbols outside the bandwidth part
|
||||
// Perform this on gold sequence, not required when SC FDMA operation is done,
|
||||
nr_modulation(pusch_dmrs[l][0], n_dmrs*2, DMRS_MOD_ORDER, mod_dmrs); // currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated
|
||||
|
||||
} else {
|
||||
dmrs_idx = 0;
|
||||
}
|
||||
dmrs_idx = 0;
|
||||
}
|
||||
|
||||
|
||||
} else if (pusch_pdu->pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS) {
|
||||
|
||||
@@ -425,8 +425,10 @@ static void pucchEnergy (OAIgraph_t *graph, scopeData_t *p, int nb_UEs) {
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
static void pucchIQ (OAIgraph_t *graph, scopeData_t *p, int nb_UEs) {
|
||||
}
|
||||
|
||||
static void puschThroughtput (OAIgraph_t *graph, scopeData_t *p, int nb_UEs) {
|
||||
// PUSCH Throughput
|
||||
/*
|
||||
@@ -543,17 +545,16 @@ static void copyRxdataF(int32_t *data, int slot, void *scopeData) {
|
||||
data,
|
||||
scope->gNB->frame_parms.samples_per_slot_wCP);
|
||||
}
|
||||
|
||||
void gNBinitScope(scopeParms_t *p) {
|
||||
p->gNB->scopeData=malloc(sizeof(scopeData_t));
|
||||
AssertFatal(p->gNB->scopeData,"");
|
||||
AssertFatal(p->gNB->scopeData=malloc(sizeof(scopeData_t)),"");
|
||||
scopeData_t *scope=(scopeData_t *) p->gNB->scopeData;
|
||||
scope->argc=p->argc;
|
||||
scope->argv=p->argv;
|
||||
scope->ru=p->ru;
|
||||
scope->gNB=p->gNB;
|
||||
scope->slotFunc=copyRxdataF;
|
||||
scope->rxdataF=(int32_t *) calloc(p->gNB->frame_parms.samples_per_frame_wCP*sizeof(int32_t),1);
|
||||
AssertFatal(scope->rxdataF,"");
|
||||
AssertFatal(scope->rxdataF=(int32_t *) calloc(p->gNB->frame_parms.samples_per_frame_wCP*sizeof(int32_t),1),"");
|
||||
pthread_t forms_thread;
|
||||
threadCreate(&forms_thread, scope_thread_gNB, p->gNB->scopeData, "scope", -1, OAI_PRIORITY_RT_LOW);
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "phy_scope_interface.h"
|
||||
|
||||
#define SOFTSCOPE_ENDFUNC_IDX 0
|
||||
|
||||
static loader_shlibfunc_t scope_fdesc[]= {{"end_forms",NULL}};
|
||||
|
||||
int load_softscope(char *exectype, void *initarg) {
|
||||
|
||||
@@ -867,8 +867,9 @@ typedef enum {
|
||||
NOT_SYNCHED=0,
|
||||
PRACH=1,
|
||||
RA_RESPONSE=2,
|
||||
PUSCH=3,
|
||||
RESYNCH=4
|
||||
RA_WAIT_CR=3,
|
||||
PUSCH=4,
|
||||
RESYNCH=5
|
||||
} UE_MODE_t;
|
||||
|
||||
#define FOREACH_PARALLEL(GEN) \
|
||||
|
||||
@@ -664,6 +664,7 @@ typedef struct {
|
||||
int prach_I0;
|
||||
} PHY_MEASUREMENTS_gNB;
|
||||
|
||||
#define MAX_NUM_NR_PRACH_PREAMBLES 64
|
||||
#define MAX_NUM_NR_RX_RACH_PDUS 4
|
||||
#define MAX_NUM_NR_RX_PRACH_PREAMBLES 4
|
||||
#define MAX_UL_PDUS_PER_SLOT 8
|
||||
|
||||
@@ -84,6 +84,8 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
}
|
||||
else if (dl_config->dl_config_list[i].pdu_type == FAPI_NR_DL_CONFIG_TYPE_RA_DLSCH){
|
||||
dlsch0 = PHY_vars_UE_g[module_id][cc_id]->dlsch_ra[0];
|
||||
dlsch0->rnti_type = _RA_RNTI_;
|
||||
dlsch0->harq_processes[dlsch0->current_harq_pid]->status = ACTIVE;
|
||||
}
|
||||
else if (dl_config->dl_config_list[i].pdu_type == FAPI_NR_DL_CONFIG_TYPE_SI_DLSCH){
|
||||
dlsch0 = PHY_vars_UE_g[module_id][cc_id]->dlsch_SI[0];
|
||||
|
||||
@@ -234,7 +234,7 @@ void ue_ta_procedures(PHY_VARS_NR_UE *ue, int slot_tx, int frame_tx){
|
||||
|
||||
ue->timing_advance += (ul_time_alignment->ta_command - 31) * bw_scaling;
|
||||
|
||||
LOG_I(PHY, "In %s: [UE %d] [%d.%d] Got timing advance command %u from MAC, new value is %d\n",
|
||||
LOG_D(PHY, "In %s: [UE %d] [%d.%d] Got timing advance command %u from MAC, new value is %d\n",
|
||||
__FUNCTION__,
|
||||
ue->Mod_id,
|
||||
frame_tx,
|
||||
@@ -771,6 +771,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_
|
||||
uint16_t pdsch_nb_rb = dlsch0_harq->nb_rb;
|
||||
uint16_t s0 = dlsch0_harq->start_symbol;
|
||||
uint16_t s1 = dlsch0_harq->nb_symbols;
|
||||
bool is_SI = dlsch0->rnti_type == _SI_RNTI_;
|
||||
|
||||
LOG_D(PHY,"[UE %d] PDSCH type %d active in nr_slot_rx %d, harq_pid %d (%d), rb_start %d, nb_rb %d, symbol_start %d, nb_symbols %d, DMRS mask %x\n",ue->Mod_id,pdsch,nr_slot_rx,harq_pid,dlsch0->harq_processes[harq_pid]->status,pdsch_start_rb,pdsch_nb_rb,s0,s1,dlsch0->harq_processes[harq_pid]->dlDmrsSymbPos);
|
||||
|
||||
@@ -780,6 +781,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_
|
||||
nr_pdsch_channel_estimation(ue,
|
||||
proc,
|
||||
0 /*eNB_id*/,
|
||||
is_SI,
|
||||
nr_slot_rx,
|
||||
aatx /*p*/,
|
||||
m,
|
||||
@@ -1690,9 +1692,9 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
}
|
||||
|
||||
if ((frame_rx%64 == 0) && (nr_slot_rx==0)) {
|
||||
printf("============================================\n");
|
||||
LOG_I(PHY,"============================================\n");
|
||||
LOG_I(PHY,"Harq round stats for Downlink: %d/%d/%d/%d DLSCH errors: %d\n",ue->dl_stats[0],ue->dl_stats[1],ue->dl_stats[2],ue->dl_stats[3],ue->dl_stats[4]);
|
||||
printf("============================================\n");
|
||||
LOG_I(PHY,"============================================\n");
|
||||
}
|
||||
|
||||
#ifdef NR_PDCCH_SCHED
|
||||
@@ -2068,7 +2070,7 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
|
||||
|
||||
}
|
||||
|
||||
if (nr_prach == 1) {
|
||||
if (nr_prach == GENERATE_PREAMBLE) {
|
||||
|
||||
if (ue->mac_enabled == 1) {
|
||||
int16_t pathloss = get_nr_PL(mod_id, ue->CC_id, gNB_id);
|
||||
@@ -2114,18 +2116,15 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
|
||||
if (ue->mac_enabled == 1)
|
||||
nr_Msg1_transmitted(mod_id, ue->CC_id, frame_tx, gNB_id);
|
||||
|
||||
} else if (nr_prach == 2) {
|
||||
|
||||
} else if (nr_prach == WAIT_CONTENTION_RESOLUTION) {
|
||||
LOG_D(PHY, "In %s: [UE %d] RA waiting contention resolution\n", __FUNCTION__, mod_id);
|
||||
ue->UE_mode[gNB_id] = RA_WAIT_CR;
|
||||
} else if (nr_prach == RA_SUCCEEDED) {
|
||||
LOG_D(PHY, "In %s: [UE %d] RA completed, setting UE mode to PUSCH\n", __FUNCTION__, mod_id);
|
||||
|
||||
ue->UE_mode[gNB_id] = PUSCH;
|
||||
|
||||
} else if(nr_prach == 3){
|
||||
|
||||
} else if(nr_prach == RA_FAILED){
|
||||
LOG_D(PHY, "In %s: [UE %d] RA failed, setting UE mode to PRACH\n", __FUNCTION__, mod_id);
|
||||
|
||||
ue->UE_mode[gNB_id] = PRACH;
|
||||
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PRACH, VCD_FUNCTION_OUT);
|
||||
|
||||
@@ -91,12 +91,15 @@ msc_interface_t msc_interface;
|
||||
// dummy functions
|
||||
int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info) { return(0); }
|
||||
|
||||
int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
|
||||
const int CC_id,
|
||||
const uint8_t gNB_index,
|
||||
const int8_t channel,
|
||||
const uint8_t* pduP,
|
||||
const sdu_size_t pdu_len)
|
||||
int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
|
||||
const int CC_id,
|
||||
const uint8_t gNB_index,
|
||||
const frame_t frame,
|
||||
const sub_frame_t sub_frame,
|
||||
const rnti_t rnti,
|
||||
const channel_t channel,
|
||||
const uint8_t* pduP,
|
||||
const sdu_size_t pdu_len)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "SCHED_NR_UE/phy_frame_config_nr.h"
|
||||
#include "PHY/phy_vars_nr_ue.h"
|
||||
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
|
||||
#include "PHY/MODULATION/nr_modulation.h"
|
||||
#include "PHY/MODULATION/modulation_eNB.h"
|
||||
#include "PHY/MODULATION/modulation_UE.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
@@ -47,6 +48,7 @@
|
||||
#include "OCG_vars.h"
|
||||
#include <openair2/LAYER2/MAC/mac_vars.h>
|
||||
#include <openair2/RRC/LTE/rrc_vars.h>
|
||||
#include <openair2/RRC/NR_UE/rrc_defs.h>
|
||||
//#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c"
|
||||
|
||||
|
||||
@@ -132,7 +134,18 @@ nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, const int CC_id, const uint8_t gNB_index, const int8_t channel, const uint8_t* pduP, const sdu_size_t pdu_len) {return 0;}
|
||||
int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
|
||||
const int CC_id,
|
||||
const uint8_t gNB_index,
|
||||
const frame_t frame,
|
||||
const sub_frame_t sub_frame,
|
||||
const rnti_t rnti,
|
||||
const channel_t channel,
|
||||
const uint8_t* pduP,
|
||||
const sdu_size_t pdu_len)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void nr_rrc_ue_generate_RRCSetupRequest(module_id_t module_id, const uint8_t gNB_index)
|
||||
{
|
||||
@@ -167,7 +180,7 @@ int main(int argc, char **argv){
|
||||
|
||||
double sigma2, sigma2_dB = 0, SNR, snr0 = -2.0, snr1 = 0.0, ue_speed0 = 0.0, ue_speed1 = 0.0;
|
||||
double **s_re, **s_im, **r_re, **r_im, iqim = 0.0, delay_avg = 0, ue_speed = 0, fs, bw;
|
||||
int i, aa, aarx, **txdata, trial, n_frames = 1, prach_start, rx_prach_start; //, ntrials=1;
|
||||
int i, l, aa, aarx, **txdata, trial, n_frames = 1, prach_start, rx_prach_start; //, ntrials=1;
|
||||
int N_RB_UL = 106, delay = 0, NCS_config = 13, rootSequenceIndex = 1, threequarter_fs = 0, mu = 1, fd_occasion = 0, loglvl = OAILOG_INFO, numRA = 0, prachStartSymbol = 0;
|
||||
uint8_t snr1set = 0, ue_speed1set = 0, transmission_mode = 1, n_tx = 1, n_rx = 1, awgn_flag = 0, msg1_frequencystart = 0, num_prach_fd_occasions = 1, prach_format=0;
|
||||
uint8_t frame = 1, slot=19, slot_gNB=19, config_index = 98, prach_sequence_length = 1, restrictedSetConfig = 0, N_dur, N_t_slot, start_symbol;
|
||||
@@ -802,7 +815,17 @@ int main(int argc, char **argv){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (l = 0; l < frame_parms->symbols_per_slot; l++) {
|
||||
for (aa = 0; aa < frame_parms->nb_antennas_rx; aa++) {
|
||||
nr_slot_fep_ul(frame_parms,
|
||||
ru->common.rxdata[aa],
|
||||
ru->common.rxdataF[aa],
|
||||
l,
|
||||
slot,
|
||||
ru->N_TA_offset);
|
||||
}
|
||||
}
|
||||
|
||||
rx_nr_prach_ru(ru, prach_format, numRA, prachStartSymbol, prachOccasion, frame, slot);
|
||||
|
||||
gNB->prach_vars.rxsigF = ru->prach_rxsigF[prachOccasion];
|
||||
@@ -825,7 +848,8 @@ int main(int argc, char **argv){
|
||||
LOG_M("prachF0.m","prachF0", &gNB->prach_vars.prachF[0], N_ZC, 1, 1);
|
||||
LOG_M("rxsig0.m","rxs0", &gNB->common_vars.rxdata[0][subframe*frame_parms->samples_per_subframe], frame_parms->samples_per_subframe, 1, 1);
|
||||
LOG_M("ru_rxsig0.m","rxs0", &ru->common.rxdata[0][subframe*frame_parms->samples_per_subframe], frame_parms->samples_per_subframe, 1, 1);
|
||||
LOG_M("ru_rxsigF0.m","rxsF0", ru->prach_rxsigF[0][0], N_ZC, 1, 1);
|
||||
LOG_M("ru_rxsigF0.m","rxsF0", ru->common.rxdataF[0], frame_parms->ofdm_symbol_size*frame_parms->symbols_per_slot, 1, 1);
|
||||
LOG_M("ru_prach_rxsigF0.m","rxsF0", ru->prach_rxsigF[0][0], N_ZC, 1, 1);
|
||||
LOG_M("prach_preamble.m","prachp", &gNB->X_u[0], N_ZC, 1, 1);
|
||||
LOG_M("ue_prach_preamble.m","prachp", &UE->X_u[0], N_ZC, 1, 1);
|
||||
#endif
|
||||
|
||||
@@ -87,8 +87,19 @@ msc_interface_t msc_interface;
|
||||
|
||||
extern void fix_scd(NR_ServingCellConfig_t *scd);// forward declaration
|
||||
|
||||
int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, const int CC_id, const uint8_t gNB_index,
|
||||
const int8_t channel, const uint8_t* pduP, const sdu_size_t pdu_len) { return 0; }
|
||||
int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
|
||||
const int CC_id,
|
||||
const uint8_t gNB_index,
|
||||
const frame_t frame,
|
||||
const sub_frame_t sub_frame,
|
||||
const rnti_t rnti,
|
||||
const channel_t channel,
|
||||
const uint8_t* pduP,
|
||||
const sdu_size_t pdu_len)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int generate_dlsch_header(unsigned char *mac_header,
|
||||
unsigned char num_sdus,
|
||||
unsigned short *sdu_lengths,
|
||||
|
||||
Reference in New Issue
Block a user