Commit 7685cf18 authored by Calisson's avatar Calisson

fixing srs in msg3. now all SRS subframe configs work.

parent 98efcd52
......@@ -31,6 +31,7 @@
*/
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "SCHED/defs.h"
#include "SCHED/extern.h"
#include "LAYER2/MAC/defs.h"
#include "SCHED/defs.h"
......@@ -69,6 +70,7 @@ int generate_eNB_ulsch_params_from_rar(unsigned char *rar_pdu,
uint8_t cqireq;
uint16_t *RIV2nb_rb_LUT, *RIV2first_rb_LUT;
uint16_t RIV_max;
uint16_t use_srs=0;
LOG_D(PHY,"[eNB][RAPROC] generate_eNB_ulsch_params_from_rar: subframe %d (harq_pid %d)\n",subframe,harq_pid);
......@@ -133,8 +135,6 @@ int generate_eNB_ulsch_params_from_rar(unsigned char *rar_pdu,
ulsch->beta_offset_ri_times8 = 10;
ulsch->beta_offset_harqack_times8 = 16;
ulsch->harq_processes[harq_pid]->Nsymb_pusch = 12-(frame_parms->Ncp<<1);
ulsch->rnti = (((uint16_t)rar[4])<<8)+rar[5];
if (ulsch->harq_processes[harq_pid]->round == 0) {
......@@ -151,6 +151,19 @@ int generate_eNB_ulsch_params_from_rar(unsigned char *rar_pdu,
ulsch->harq_processes[harq_pid]->round++;
}
ulsch->Msg3_active = 1;
get_Msg3_alloc(frame_parms,
subframe,
frame,
&ulsch->Msg3_frame,
&ulsch->Msg3_subframe);
use_srs = is_srs_occasion_common(frame_parms,ulsch->Msg3_frame,ulsch->Msg3_subframe);
ulsch->harq_processes[harq_pid]->Nsymb_pusch = 12-(frame_parms->Ncp<<1)-(use_srs==0?0:1);
ulsch->harq_processes[harq_pid]->srs_active = use_srs;
#ifdef DEBUG_RAR
msg("ulsch ra (eNB): harq_pid %d\n",harq_pid);
msg("ulsch ra (eNB): NBRB %d\n",ulsch->harq_processes[harq_pid]->nb_rb);
......
......@@ -822,10 +822,12 @@ void generate_eNB_ulsch_params(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
int frame = proc->frame_tx;
int subframe = proc->subframe_tx;
/*
uint16_t srsPeriodicity=0;
uint16_t srsOffset=0;
uint16_t srsConfigIndex=0;
uint16_t do_srs=0;
*/
uint16_t is_srs_pos=0;
LOG_D(PHY,
......@@ -1006,17 +1008,10 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,LTE_eNB_DLSCH_t *d
generate_eNB_ulsch_params_from_rar(DLSCH_pdu,
frame,
(subframe),
subframe,
eNB->ulsch[(uint32_t)UE_id],
fp);
eNB->ulsch[(uint32_t)UE_id]->Msg3_active = 1;
get_Msg3_alloc(fp,
subframe,
frame,
&eNB->ulsch[(uint32_t)UE_id]->Msg3_frame,
&eNB->ulsch[(uint32_t)UE_id]->Msg3_subframe);
LOG_D(PHY,"[eNB][RAPROC] Frame %d subframe %d, Activated Msg3 demodulation for UE %"PRId8" in frame %"PRIu32", subframe %"PRIu8"\n",
frame,
subframe,
......
......@@ -1594,26 +1594,26 @@ do_RRCConnectionSetup(
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.freqDomainPosition=0;
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.duration=1;
if (frame_parms->frame_type==FDD) {
if (enb_properties.properties[ctxt_pP->module_id]->srs_SubframeConfig[CC_id]!=2)
LOG_W(RRC,"This code has been optimized for SRS Subframe Config 2, but current config is %d. Expect undefined behaviour!\n",
if (enb_properties.properties[ctxt_pP->module_id]->srs_SubframeConfig[CC_id]!=0)
LOG_W(RRC,"This code has been optimized for SRS Subframe Config 0, but current config is %d. Expect undefined behaviour!\n",
enb_properties.properties[ctxt_pP->module_id]->srs_SubframeConfig[CC_id]);
if (ue_context_pP->local_uid >=10)
if (ue_context_pP->local_uid >=20)
LOG_W(RRC,"This code has been optimized for up to 10 UEs, but current UE_id is %d. Expect undefined behaviour!\n",
ue_context_pP->local_uid);
//the current code will allow for 20 UEs - to be revised for more
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex=8+2*(ue_context_pP->local_uid/2);
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex=7+ue_context_pP->local_uid/2;
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb= ue_context_pP->local_uid%2;
}
else {
if (enb_properties.properties[ctxt_pP->module_id]->srs_SubframeConfig[CC_id]!=6) {
LOG_W(RRC,"This code has been optimized for SRS Subframe Config 6 and TDD config 3, but current configs are %d and %d. Expect undefined behaviour!\n",
if (enb_properties.properties[ctxt_pP->module_id]->srs_SubframeConfig[CC_id]!=7) {
LOG_W(RRC,"This code has been optimized for SRS Subframe Config 7 and TDD config 3, but current configs are %d and %d. Expect undefined behaviour!\n",
enb_properties.properties[ctxt_pP->module_id]->srs_SubframeConfig[CC_id],
enb_properties.properties[ctxt_pP->module_id]->tdd_config[CC_id]);
}
if (ue_context_pP->local_uid >=6)
LOG_W(RRC,"This code has been optimized for up to 4 UEs, but current UE_id is %d. Expect undefined behaviour!\n",
LOG_W(RRC,"This code has been optimized for up to 6 UEs, but current UE_id is %d. Expect undefined behaviour!\n",
ue_context_pP->local_uid);
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex=18+ue_context_pP->local_uid/2;
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex=17+ue_context_pP->local_uid/2;
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb= ue_context_pP->local_uid%2;
}
LOG_W(RRC,"local UID %d, srs ConfigIndex %d, TransmissionComb %d\n",ue_context_pP->local_uid,
......
......@@ -64,7 +64,7 @@ eNBs =
phich_resource = "ONESIXTH";
srs_enable = "DISABLE";
srs_BandwidthConfig = 2;
srs_SubframeConfig = 2;
srs_SubframeConfig = 0;
srs_ackNackST = "DISABLE";
srs_MaxUpPts = "DISABLE";
......
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