Commit 631fa2be authored by Raymond Knopp's avatar Raymond Knopp

updates from Agilent IoT

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4649 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent bf343691
...@@ -557,6 +557,7 @@ typedef struct { ...@@ -557,6 +557,7 @@ typedef struct {
u8 generate_rar; u8 generate_rar;
/// Subframe where Msg3 is to be sent /// Subframe where Msg3 is to be sent
u8 Msg3_subframe; u8 Msg3_subframe;
u8 preamble_subframe;
/// Flag to indicate the eNB should generate Msg4 upon reception of SDU from RRC. This is triggered by first ULSCH reception at eNB for new user. /// Flag to indicate the eNB should generate Msg4 upon reception of SDU from RRC. This is triggered by first ULSCH reception at eNB for new user.
u8 generate_Msg4; u8 generate_Msg4;
/// Flag to indicate the eNB should generate the DCI for Msg4, after getting the SDU from RRC. /// Flag to indicate the eNB should generate the DCI for Msg4, after getting the SDU from RRC.
......
This diff is collapsed.
...@@ -43,9 +43,6 @@ ...@@ -43,9 +43,6 @@
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "OCG.h" #include "OCG.h"
#include "OCG_extern.h" #include "OCG_extern.h"
#if defined(USER_MODE) && defined(OAI_EMU)
# include "UTIL/OPT/opt.h"
#endif
#define DEBUG_RAR #define DEBUG_RAR
...@@ -65,11 +62,9 @@ unsigned short fill_rar(u8 Mod_id, ...@@ -65,11 +62,9 @@ unsigned short fill_rar(u8 Mod_id,
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *)dlsch_buffer; RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *)dlsch_buffer;
// RAR_PDU *rar = (RAR_PDU *)(dlsch_buffer+1); // RAR_PDU *rar = (RAR_PDU *)(dlsch_buffer+1);
uint8_t *rar = (uint8_t *)(dlsch_buffer+1); uint8_t *rar = (uint8_t *)(dlsch_buffer+1);
int i; int i,ra_idx;
int ra_idx = -1;
uint16_t rballoc; uint16_t rballoc;
uint8_t mcs,TPC,ULdelay,cqireq; uint8_t mcs,TPC,cqi_req,ULdelay,cqireq;
//uint8_t cqi_req;
for (i=0;i<NB_RA_PROC_MAX;i++) { for (i=0;i<NB_RA_PROC_MAX;i++) {
if (eNB_mac_inst[Mod_id].RA_template[i].generate_rar == 1) { if (eNB_mac_inst[Mod_id].RA_template[i].generate_rar == 1) {
...@@ -96,22 +91,26 @@ unsigned short fill_rar(u8 Mod_id, ...@@ -96,22 +91,26 @@ unsigned short fill_rar(u8 Mod_id,
*/ */
rar[4] = (uint8_t)(eNB_mac_inst[Mod_id].RA_template[ra_idx].rnti>>8); rar[4] = (uint8_t)(eNB_mac_inst[Mod_id].RA_template[ra_idx].rnti>>8);
rar[5] = (uint8_t)(eNB_mac_inst[Mod_id].RA_template[ra_idx].rnti&0xff); rar[5] = (uint8_t)(eNB_mac_inst[Mod_id].RA_template[ra_idx].rnti&0xff);
eNB_mac_inst[Mod_id].RA_template[ra_idx].timing_offset = 0;
//eNB_mac_inst[Mod_id].RA_template[ra_idx].timing_offset /= 16;
rar[0] = (uint8_t)(eNB_mac_inst[Mod_id].RA_template[ra_idx].timing_offset>>(2+4)); // 7 MSBs of timing advance + divide by 4 rar[0] = (uint8_t)(eNB_mac_inst[Mod_id].RA_template[ra_idx].timing_offset>>(2+4)); // 7 MSBs of timing advance + divide by 4
rar[1] = (uint8_t)(eNB_mac_inst[Mod_id].RA_template[ra_idx].timing_offset<<(4-2))&0xf0; // 4 LSBs of timing advance + divide by 4 rar[1] = (uint8_t)(eNB_mac_inst[Mod_id].RA_template[ra_idx].timing_offset<<(4-2))&0xf0; // 4 LSBs of timing advance + divide by 4
rballoc = mac_xface->computeRIV(N_RB_UL,1,1); // first PRB only for UL Grant rballoc = mac_xface->computeRIV(N_RB_UL,1,1); // first PRB only for UL Grant
rar[1] |= (rballoc>>7)&7; // Hopping = 0 (bit 3), 3 MSBs of rballoc rar[1] |= (rballoc>>7)&7; // Hopping = 0 (bit 3), 3 MSBs of rballoc
rar[2] = ((uint8_t)(rballoc&0xff))<<1; // 7 LSBs of rballoc rar[2] = ((uint8_t)(rballoc&0xff))<<1; // 7 LSBs of rballoc
mcs = 9; mcs = 10;
TPC = 4; TPC = 3;
ULdelay = 0; ULdelay = 0;
cqireq = 0; cqireq = 0;
rar[2] |= ((mcs&0xf)>>3); // mcs 10 rar[2] |= ((mcs&0x8)>>3); // mcs 10
rar[3] = (((mcs&0xff)<<5)) | ((TPC&7)<<2) | ((ULdelay&1)<<1) | (cqireq&1); rar[3] = (((mcs&0x7)<<5)) | ((TPC&7)<<2) | ((ULdelay&1)<<1) | (cqireq&1);
LOG_I(MAC,"[eNB %d][RAPROC] Frame %d Generating RAR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for CRNTI %x,preamble %d/%d\n",Mod_id,frame, LOG_I(MAC,"[eNB %d][RAPROC] Frame %d Generating RAR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for ra_idx %d, CRNTI %x,preamble %d/%d,TIMING OFFSET %d\n",Mod_id,frame,
*(uint8_t*)rarh,rar[0],rar[1],rar[2],rar[3],rar[4],rar[5], *(uint8_t*)rarh,rar[0],rar[1],rar[2],rar[3],rar[4],rar[5],
ra_idx,
eNB_mac_inst[Mod_id].RA_template[ra_idx].rnti, eNB_mac_inst[Mod_id].RA_template[ra_idx].rnti,
rarh->RAPID,eNB_mac_inst[Mod_id].RA_template[0].preamble_index); rarh->RAPID,eNB_mac_inst[Mod_id].RA_template[0].preamble_index,
eNB_mac_inst[Mod_id].RA_template[ra_idx].timing_offset);
#if defined(USER_MODE) && defined(OAI_EMU) #if defined(USER_MODE) && defined(OAI_EMU)
if (oai_emulation.info.opt_enabled){ if (oai_emulation.info.opt_enabled){
......
...@@ -425,7 +425,7 @@ uint8_t do_SIB1(LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer, ...@@ -425,7 +425,7 @@ uint8_t do_SIB1(LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer,
(*sib1)->cellSelectionInfo.q_RxLevMin=-65; (*sib1)->cellSelectionInfo.q_RxLevMin=-65;
(*sib1)->cellSelectionInfo.q_RxLevMinOffset=NULL; (*sib1)->cellSelectionInfo.q_RxLevMinOffset=NULL;
(*sib1)->freqBandIndicator = 38; (*sib1)->freqBandIndicator = 7;
schedulingInfo.si_Periodicity=SchedulingInfo__si_Periodicity_rf8; schedulingInfo.si_Periodicity=SchedulingInfo__si_Periodicity_rf8;
...@@ -727,7 +727,7 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -727,7 +727,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
#endif #endif
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.preambleTransMax=RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10; (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.preambleTransMax=RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.ra_ResponseWindowSize=RACH_ConfigCommon__ra_SupervisionInfo__ra_ResponseWindowSize_sf4; (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.ra_ResponseWindowSize=RACH_ConfigCommon__ra_SupervisionInfo__ra_ResponseWindowSize_sf10;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.mac_ContentionResolutionTimer=RACH_ConfigCommon__ra_SupervisionInfo__mac_ContentionResolutionTimer_sf48; (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.mac_ContentionResolutionTimer=RACH_ConfigCommon__ra_SupervisionInfo__mac_ContentionResolutionTimer_sf48;
...@@ -753,7 +753,7 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -753,7 +753,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
// PDSCH-Config // PDSCH-Config
#ifdef EXMIMO #ifdef EXMIMO
(*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower=0; (*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower=-32;
#else #else
(*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower=15; (*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower=15;
#endif #endif
......
...@@ -153,9 +153,13 @@ const char* eurecomFunctionsNames[] = { ...@@ -153,9 +153,13 @@ const char* eurecomFunctionsNames[] = {
"phy_ue_config_sib2", "phy_ue_config_sib2",
"phy_ue_compute_prach", "phy_ue_compute_prach",
"phy_enb_ulsch_decoding", "phy_enb_ulsch_decoding",
"phy_enb_sfgen",
"phy_enb_prach_rx",
"phy_enb_pdcch_tx",
"phy_enb_rs_tx",
"phy_ue_ulsch_modulation", "phy_ue_ulsch_modulation",
"phy_ue_ulsch_encoding", "phy_ue_ulsch_encoding",
"phy_ue_ulsch_scramblig", "phy_ue_ulsch_scrambling",
"phy_eNB_dlsch_modulation", "phy_eNB_dlsch_modulation",
"phy_eNB_dlsch_encoding", "phy_eNB_dlsch_encoding",
"phy_eNB_dlsch_scramblig", "phy_eNB_dlsch_scramblig",
......
...@@ -124,6 +124,10 @@ typedef enum ...@@ -124,6 +124,10 @@ typedef enum
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_CONFIG_SIB2, VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_CONFIG_SIB2,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_COMPUTE_PRACH, VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_COMPUTE_PRACH,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING, VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_SFGEN,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PRACH_RX,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_RS_TX,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_MODULATION, VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_MODULATION,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_ENCODING, VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_ENCODING,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_SCRAMBLING, VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_SCRAMBLING,
......
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