Commit 5add574f authored by Robert Schmidt's avatar Robert Schmidt

Revert "useless changes"

This reverts commit d93ec4e3.
parent 33d83901
......@@ -370,6 +370,7 @@ static size_t dump_L1_meas_stats(PHY_VARS_gNB *gNB, RU_t *ru, char *output, size
output += print_meas_log(&ru->ofdm_total_stats,"feptx_total",NULL,NULL, output, end - output);
}
if (ru->fh_north_asynch_in)
output += print_meas_log(&ru->rx_fhaul,"rx_fhaul",NULL,NULL, output, end - output);
output += print_meas_log(&ru->tx_fhaul,"tx_fhaul",NULL,NULL, output, end - output);
......
......@@ -60,6 +60,7 @@ unsigned short config_frames[4] = {2,9,11,13};
#endif
/* these variables have to be defined before including ENB_APP/enb_paramdef.h and GNB_APP/gnb_paramdef.h */
static int DEFBANDS[] = {7};
static int DEFENBS[] = {0};
......@@ -1064,9 +1065,9 @@ void *ru_stats_thread(void *param) {
print_meas(&ru->txdataF_copy_stats,"txdataF_copy",NULL,NULL);
print_meas(&ru->ofdm_total_stats,"feptx_total",NULL,NULL);
}
//print_meas(&ru->rx_fhaul,"rx_fhaul",NULL,NULL);
print_meas(&ru->rx_fhaul,"rx_fhaul",NULL,NULL);
if (ru->if_south == REMOTE_IF5) print_meas(&ru->ifdevice.tx_fhaul,"tx_fhaul (IF5)",NULL,NULL);
//else print_meas(&ru->tx_fhaul,"tx_fhaul",NULL,NULL);
else print_meas(&ru->tx_fhaul,"tx_fhaul",NULL,NULL);
if (ru->fh_north_out) {
print_meas(&ru->compression,"compression",NULL,NULL);
......
......@@ -138,7 +138,6 @@ void nr_modulation(uint32_t *in,
out128 = (simde__m128i *)out;
for (i=0; i<length/8; i++)
out128[i] = nr_mod_table128[in_bytes[i]];
// the bits that are left out
i = i*8/2;
nr_mod_table32 = (int32_t*) nr_qpsk_mod_table;
......
......@@ -45,7 +45,7 @@ void nr_generate_modulation_table() {
for (i=0; i<4; i++) {
nr_qpsk_mod_table[i*2] = (short)(1-2*(i&1))*val*sqrt2*sqrt2;
nr_qpsk_mod_table[i*2+1] = (short)(1-2*((i>>1)&1))*val*sqrt2*sqrt2;
//printf("QPSK : %d j%d\n",nr_qpsk_mod_table[i*2],nr_qpsk_mod_table[i*2+1]);
//printf("%d j%d\n",nr_qpsk_mod_table[i*2],nr_qpsk_mod_table[i*2+1]);
}
//QPSK m128
......@@ -54,6 +54,7 @@ void nr_generate_modulation_table() {
for (j=0; j<4; j++) {
table[i*8+(j*2)] = (short)(1-2*((i>>(j*2))&1))*val*sqrt2*sqrt2;
table[i*8+(j*2)+1] = (short)(1-2*((i>>(j*2+1))&1))*val*sqrt2*sqrt2;
//printf("%d j%d\n",nr_qpsk_byte_mod_table[i*8+(j*2)],nr_qpsk_byte_mod_table[i*8+(j*2)+1]);
}
}
......@@ -71,7 +72,7 @@ void nr_generate_modulation_table() {
for (i=0; i<16; i++) {
table[i*2] = (short)((1-2*(i&1))*(2-(1-2*((i>>2)&1))))*val*sqrt10*sqrt2;
table[i*2+1] = (short)((1-2*((i>>1)&1))*(2-(1-2*((i>>3)&1))))*val*sqrt10*sqrt2;
// printf("%d j%d\n",table[i*2],table[i*2+1]);
//printf("%d j%d\n",table[i*2],table[i*2+1]);
}
//64QAM
......
......@@ -583,7 +583,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
// Compute DFT of RX signal (conjugate input, results in conjugate output) for each new rootSequenceIndex
if (LOG_DEBUGFLAG(PRACH)) {
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
if (en>30) LOG_I(PHY,"frame %d, slot %d : preamble index %d, NCS %d, N_ZC/NCS %d: offset %d, preamble shift %d , en %d)\n",
if (en>60) LOG_D(PHY,"frame %d, slot %d : preamble index %d, NCS %d, N_ZC/NCS %d: offset %d, preamble shift %d , en %d)\n",
frame,slot,preamble_index,NCS,N_ZC/NCS,preamble_offset,preamble_shift,en);
}
......@@ -630,8 +630,8 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
}
if (LOG_DUMPFLAG(PRACH)) {
if (aa==0) LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,N_ZC == 839 ? 1024 : 256,1,1);
if (aa==1) {LOG_M("prach_rxF_comp1.m","prach_rxF_comp1",prachF,N_ZC == 839 ? 1024 : 256,1,1);exit(-1);}
if (aa==0) LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1);
if (aa==1) LOG_M("prach_rxF_comp1.m","prach_rxF_comp1",prachF,1024,1,1);
}
}// antennas_rx
......@@ -690,7 +690,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
else *TA = *TA/2;
if (/*levdB>200*/LOG_DUMPFLAG(PRACH)) {
if (LOG_DUMPFLAG(PRACH)) {
//int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
// if (en>60) {
int k = (12*n_ra_prb) - 6*fp->N_RB_UL;
......@@ -702,11 +702,10 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
k*=2;
LOG_M("rxsigF.m","prach_rxF",&rxsigF[0][0],N_ZC,1,1);
LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,N_ZC==839?1024:256,1,1);
LOG_M("rxsigF.m","prach_rxF",&rxsigF[0][0],12288,1,1);
LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1);
LOG_M("Xu.m","xu",Xu,N_ZC,1,1);
LOG_M("prach_ifft0.m","prach_t0",prach_ifft,N_ZC=839?1024:256,1,1);
exit(-1);
LOG_M("prach_ifft0.m","prach_t0",prach_ifft,1024,1,1);
// }
} /* LOG_DUMPFLAG(PRACH) */
stop_meas(&gNB->rx_prach);
......
......@@ -199,8 +199,6 @@ typedef struct {
uint8_t *b;
/// Pointers to code blocks after code block segmentation and CRC attachment (38.212 V15.4.0 section 5.2.2)
uint8_t **c;
/// array to indicate that a segment has a valid CRC from a previous transmission to not run LDPC decoder again in a retransmission
bool *crc_ok;
/// Number of bits in each code block (38.212 V15.4.0 section 5.2.2)
uint32_t K;
/// Number of "Filler" bits added in the code block segmentation (38.212 V15.4.0 section 5.2.2)
......@@ -223,11 +221,6 @@ typedef struct {
/// Last index of LLR buffer that contains information.
/// Used for computing LDPC decoder R
int llrLen;
/// used to indicate to remaining threads that LDPC decoding has to be skipped
/// this is set to true when a crc fails to avoid unnecessary computation
/// all accesses must be done with __atomic operations
/// (we can't use bool, it does not work with __atomic operations)
uint8_t skip_ldpc_decoding;
//////////////////////////////////////////////////////////////
} NR_UL_gNB_HARQ_t;
static inline int lenWithCrc(int nbSeg, int len)
......
......@@ -38,7 +38,6 @@
#include "openair2/NR_PHY_INTERFACE/nr_sched_response.h"
extern int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req);
extern int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req);
extern int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req);
......@@ -226,6 +225,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO)
if (!gNB->reorder_thread_disable)
pushNotifiedFIFO(&gNB->L1_tx_filled,res);
}
for (int i = 0; i < number_ul_tti_pdu; i++) {
switch (UL_tti_req->pdus_list[i].pdu_type) {
case NFAPI_NR_UL_CONFIG_PUSCH_PDU_TYPE:
......
......@@ -461,8 +461,8 @@ void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int ULSCH_id,
else if (SNRtimes10 > 635) cqi=255;
else cqi=(640+SNRtimes10)/5;
/*
if (pusch_pdu->mcs_index == 9) {
if (0/*pusch_pdu->mcs_index == 9*/) {
__attribute__((unused))
int off = ((pusch_pdu->rb_size&1) == 1)? 4:0;
......@@ -517,7 +517,6 @@ void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int ULSCH_id,
exit(-1);
}
*/
// crc indication
uint16_t num_crc = gNB->UL_INFO.crc_ind.number_crcs;
......
......@@ -237,7 +237,7 @@ void nr_csi_meas_reporting(int Mod_idP,
if ((sched_frame * n_slots_frame + sched_slot - offset) % period != 0)
continue;
AssertFatal(is_xlsch_in_slot(nrmac->ulsch_slot_bitmap[sched_slot / 64], sched_slot), "CSI reporting slot %d is not set for an uplink slot, period %d, offset %d\n", sched_slot,period,offset);
AssertFatal(is_xlsch_in_slot(nrmac->ulsch_slot_bitmap[sched_slot / 64], sched_slot), "CSI reporting slot %d is not set for an uplink slot\n", sched_slot);
LOG_D(NR_MAC, "CSI reporting in frame %d slot %d CSI report ID %ld\n", sched_frame, sched_slot, csirep->reportConfigId);
const NR_PUCCH_ResourceSet_t *pucchresset = pucch_Config->resourceSetToAddModList->list.array[1]; // set with formats >1
......@@ -1133,7 +1133,6 @@ static bool test_pucch0_vrb_occupation(const NR_sched_pucch_t *pucch, uint16_t *
else
prb = pucch->prb_start;
if ((vrb_map_UL[bwp_start+prb] & symb) != 0) {
LOG_I(NR_MAC,"pucch0_vrb %d symb %d vrb_map %x\n",bwp_start+prb,symb,vrb_map_UL[bwp_start+prb]);
return false;
break;
}
......
......@@ -729,6 +729,7 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP,
NR_UE_info_t *UE_msg3_stage = UE ? UE : add_new_nr_ue(gNB_mac, ra->rnti, ra->CellGroup);
if (!UE_msg3_stage) {
LOG_W(NR_MAC, "Random Access %i discarded at state %i (TC_RNTI %04x RNTI %04x): max number of users achieved!\n", i, ra->state, ra->rnti, current_rnti);
nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra);
return;
}
......
......@@ -146,11 +146,11 @@ static void init_nr_rlc_data_req_queue(void)
pthread_mutex_init(&q.m, NULL);
pthread_cond_init(&q.c, NULL);
/*if (pthread_create(&t, NULL, rlc_data_req_thread, NULL) != 0) {
if (pthread_create(&t, NULL, rlc_data_req_thread, NULL) != 0) {
LOG_E(PDCP, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
exit(1);
}*/
threadCreate(&t, rlc_data_req_thread, NULL, "rlc_data_req_thread", -1, OAI_PRIORITY_RT_MAX);
}
}
static void enqueue_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
......
......@@ -462,6 +462,11 @@ void NR_UL_indication(NR_UL_IND_t *UL_info) {
ifi->CC_mask |= (1<<CC_id);
if (ifi->CC_mask == ((1<<MAX_NUM_CCs)-1)) {
/*
eNB_dlsch_ulsch_scheduler(module_id,
(UL_info->frame+((UL_info->slot>(9-sl_ahead))?1:0)) % 1024,
(UL_info->slot+sl_ahead)%10);
*/
nfapi_nr_config_request_scf_t *cfg = &mac->config[CC_id];
int spf = get_spf(cfg);
sched_info = allocate_sched_response();
......
......@@ -46,7 +46,9 @@
#include "LAYER2/nr_rlc/nr_rlc_oai_api.h"
#include "asn1_msg.h"
#include "../nr_rrc_proto.h"
#include "openair3/SECU/key_nas_deriver.h"
#include "RRC/NR/nr_rrc_extern.h"
#include "NR_DL-CCCH-Message.h"
#include "NR_UL-CCCH-Message.h"
......
......@@ -1348,9 +1348,9 @@ static void set_csi_meas_periodicity(const NR_ServingCellConfigCommon_t *scc, NR
const int ideal_period = MAX_MOBILES_PER_GNB * 2 * n_slots_period / n_ul_slots_period; // 2 reports per UE
const int first_ul_slot_period = tdd ? get_first_ul_slot(tdd->nrofDownlinkSlots, tdd->nrofDownlinkSymbols, tdd->nrofUplinkSymbols) : 0;
const int idx = (uid << 1) + is_rsrp;
const int offset = first_ul_slot_period + (idx % n_ul_slots_period) + (idx / n_ul_slots_period) * n_slots_period;
const int offset = first_ul_slot_period + idx % n_ul_slots_period + (idx / n_ul_slots_period) * n_slots_period;
AssertFatal(offset < 320, "Not enough UL slots to accomodate all possible UEs. Need to rework the implementation\n");
LOG_I(NR_RRC,"setting csi_meas_periodicity : offset %d, first_ul_slot_period %d, idx %d, n_ul_slots_period %d\n",offset,first_ul_slot_period,idx,n_ul_slots_period);
if (ideal_period < 5) {
csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots4;
csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots4 = offset;
......@@ -2317,7 +2317,7 @@ NR_CellGroupConfig_t *get_initial_cellGroupConfig(int uid,
{
NR_CellGroupConfig_t *cellGroupConfig = calloc(1, sizeof(*cellGroupConfig));
cellGroupConfig->cellGroupId = 0;
LOG_I(NR_RRC,"Getting initial CellGroupConfig for uid %d\n",uid);
/* Rlc Bearer Config */
/* TS38.331 9.2.1 Default SRB configurations */
cellGroupConfig->rlc_BearerToAddModList = calloc(1, sizeof(*cellGroupConfig->rlc_BearerToAddModList));
......
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