Commit 903a1ec6 authored by cig's avatar cig

Cleanup code, removed gNB headers in UE files

parent 36195ec3
......@@ -4,7 +4,6 @@
#include <executables/softmodem-common.h>
#include "PHY/defs_nr_UE.h"
#include "SIMULATION/ETH_TRANSPORT/proto.h"
#include "NR_MAC_gNB/mac_proto.h"
/***************************************************************************************************************************************/
/* command line options definitions, CMDLINE_XXXX_DESC macros are used to initialize paramdef_t arrays which are then used as argument
......
......@@ -42,8 +42,6 @@
#include "UTIL/LISTS/list.h"
#endif
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
//#include "../LTE_TRANSPORT/transport_common.h"
// structures below implement 36-211 and 36-212
......
......@@ -26,7 +26,6 @@
#include <simple_executable.h>
#include <common/utils/system.h>
#include <openairinterface5g_limits.h>
#include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
#include "common/ran_context.h"
#include <openair1/PHY/defs_gNB.h>
#include <forms.h>
......
......@@ -256,23 +256,6 @@ unsigned int gain_table[31] = {100,112,126,141,158,178,200,224,251,282,316,359,3
#if 0
unsigned int get_tx_amp(int power_dBm, int power_max_dBm, int N_RB_UL, int nb_rb) // TbD
{
int gain_dB = power_dBm - power_max_dBm;
double gain_lin;
gain_lin = pow(10,.1*gain_dB);
if ((nb_rb >0) && (nb_rb <= N_RB_UL)) {
return((int)(AMP*sqrt(gain_lin*N_RB_UL/(double)nb_rb)));
}
else {
LOG_E(PHY,"Illegal nb_rb/N_RB_UL combination (%d/%d)\n",nb_rb,N_RB_UL);
//mac_xface->macphy_exit("");
}
return(0);
}
void nr_dump_dlsch_ra(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t nr_tti_rx)
{
unsigned int coded_bits_per_codeword;
......@@ -2329,8 +2312,6 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,
// check if we have PRACH opportunity
if (is_nr_prach_subframe(&ue->frame_parms, frame_tx, slot_tx)) {
// TBR TODO FIX this works only for TDD but it enters phy_procedures_nrUE_TX only when mode is FDD
printf(" is_nr_prach_subframe is %d\n", is_nr_prach_subframe(&ue->frame_parms, frame_tx, slot_tx)); // TBR debug
nr_ue_prach_procedures(ue, proc, gNB_id, mode);
}
}
......@@ -4579,7 +4560,7 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
// if we're calibrating the PRACH kill the pointer to its resources so that the RA protocol doesn't continue
if (runmode == calib_prach_tx)
ue->prach_resources[gNB_id]=NULL;
ue->prach_resources[gNB_id] = NULL;
LOG_D(PHY,"[UE %d] frame %d nr_tti_rx %d : generate_nr_prach %d, prach_cnt %d\n", ue->Mod_id,frame_tx,nr_tti_tx, ue->generate_nr_prach, ue->prach_cnt);
......
......@@ -44,6 +44,9 @@
/*TAG*/
#include "NR_TAG-Id.h"
////////////////////////////////////////////////////////
/////* DLSCH MAC PDU generation (6.1.2 TS 38.321) */////
////////////////////////////////////////////////////////
int nr_generate_dlsch_pdu(module_id_t module_idP,
unsigned char *sdus_payload,
......@@ -106,7 +109,6 @@ int nr_generate_dlsch_pdu(module_id_t module_idP,
mac_pdu_ptr += (unsigned char) mac_ce_size;
}
// Contention resolution fixed subheader and MAC CE
if (ue_cont_res_id) {
mac_pdu_ptr->R = 0;
......@@ -131,8 +133,7 @@ int nr_generate_dlsch_pdu(module_id_t module_idP,
mac_pdu_ptr += (unsigned char) mac_ce_size;
}
// 2) Generation of DLSCH MAC SDU subheaders
// 2) Generation of DLSCH MAC subPDUs including subheaders and MAC SDUs
for (i = 0; i < num_sdus; i++) {
LOG_D(MAC, "[gNB] Generate DLSCH header num sdu %d len sdu %d\n", num_sdus, sdu_lengths[i]);
......
......@@ -91,7 +91,7 @@ int8_t mac_rrc_nr_data_req(const module_id_t Mod_idP,
/* TODO BCCH SIB1 SIBs */
/* CCCH */ // TBR lte code
/* CCCH */
if( (Srb_id & RAB_OFFSET ) == CCCH) {
//struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[Mod_idP],rnti);
//if (ue_context_p == NULL) return(0);
......
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