Commit e2d46f80 authored by Calisson's avatar Calisson

adding mechanism for SRS scheduling of multiple UEs.

parent 65f49f9f
...@@ -379,7 +379,7 @@ void process_timing_advance_rar(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,ui ...@@ -379,7 +379,7 @@ void process_timing_advance_rar(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,ui
unsigned int get_tx_amp(int power_dBm, int power_max_dBm, int N_RB_UL, int nb_rb); unsigned int get_tx_amp(int power_dBm, int power_max_dBm, int N_RB_UL, int nb_rb);
void phy_reset_ue( PHY_VARS_UE *ue ); void phy_reset_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
/*! \brief This function retrives the resource (n1_pucch) corresponding to a PDSCH transmission in /*! \brief This function retrives the resource (n1_pucch) corresponding to a PDSCH transmission in
subframe n-4 which is acknowledged in subframe n (for FDD) according to n1_pucch = Ncce + N1_pucch. For subframe n-4 which is acknowledged in subframe n (for FDD) according to n1_pucch = Ncce + N1_pucch. For
......
...@@ -258,14 +258,14 @@ void dump_dlsch_ra(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t s ...@@ -258,14 +258,14 @@ void dump_dlsch_ra(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t s
write_output("dlsch_mag2.m","dlschmag2",ue->pdsch_vars_ra[0]->dl_ch_magb0,300*nsymb,1,1); write_output("dlsch_mag2.m","dlschmag2",ue->pdsch_vars_ra[0]->dl_ch_magb0,300*nsymb,1,1);
} }
void phy_reset_ue(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index)
void phy_reset_ue(PHY_VARS_UE *ue)
{ {
// This flushes ALL DLSCH and ULSCH harq buffers of ALL connected eNBs...add the eNB_index later // This flushes ALL DLSCH and ULSCH harq buffers of ALL connected eNBs...add the eNB_index later
// for more flexibility // for more flexibility
uint8_t i,j,k,s; uint8_t i,j,k,s;
PHY_VARS_UE *ue = PHY_vars_UE_g[Mod_id][CC_id];
//[NUMBER_OF_CONNECTED_eNB_MAX][2]; //[NUMBER_OF_CONNECTED_eNB_MAX][2];
for(i=0; i<NUMBER_OF_CONNECTED_eNB_MAX; i++) { for(i=0; i<NUMBER_OF_CONNECTED_eNB_MAX; i++) {
......
...@@ -932,7 +932,8 @@ int main(int argc, char **argv) ...@@ -932,7 +932,8 @@ int main(int argc, char **argv)
ndi=0; ndi=0;
phy_reset_ue(UE); PHY_vars_UE_g = UE;
phy_reset_ue(0,0,0);
UE->UE_mode[eNB_id]=PUSCH; UE->UE_mode[eNB_id]=PUSCH;
for (trials = 0; trials<n_frames; trials++) { for (trials = 0; trials<n_frames; trials++) {
......
...@@ -427,7 +427,7 @@ void enb_config_display(void) ...@@ -427,7 +427,7 @@ void enb_config_display(void)
if (enb_properties.properties[i]->srs_enable[j]) { if (enb_properties.properties[i]->srs_enable[j]) {
printf( "\tsrs_BandwidthConfig for CC %d:\t%ld:\n",j,enb_properties.properties[i]->srs_BandwidthConfig[j]); printf( "\tsrs_BandwidthConfig for CC %d:\t%ld:\n",j,enb_properties.properties[i]->srs_BandwidthConfig[j]);
printf( "\tsrs_BandwidthConfig for CC %d:\t%ld:\n",j,enb_properties.properties[i]->srs_SubframeConfig[j]); printf( "\tsrs_SubframeConfig for CC %d:\t%ld:\n",j,enb_properties.properties[i]->srs_SubframeConfig[j]);
printf( "\tsrs_ackNackST for CC %d:\t%d:\n",j,enb_properties.properties[i]->srs_ackNackST[j]); printf( "\tsrs_ackNackST for CC %d:\t%d:\n",j,enb_properties.properties[i]->srs_ackNackST[j]);
printf( "\tsrs_MaxUpPts for CC %d:\t%d:\n",j,enb_properties.properties[i]->srs_MaxUpPts[j]); printf( "\tsrs_MaxUpPts for CC %d:\t%d:\n",j,enb_properties.properties[i]->srs_MaxUpPts[j]);
} }
......
...@@ -99,7 +99,7 @@ int errno; ...@@ -99,7 +99,7 @@ int errno;
# endif # endif
#endif #endif
//#define XER_PRINT #define XER_PRINT
extern Enb_properties_array_t enb_properties; extern Enb_properties_array_t enb_properties;
typedef struct xer_sprint_string_s { typedef struct xer_sprint_string_s {
...@@ -1593,8 +1593,33 @@ do_RRCConnectionSetup( ...@@ -1593,8 +1593,33 @@ do_RRCConnectionSetup(
SoundingRS_UL_ConfigDedicated__setup__srs_HoppingBandwidth_hbw0; SoundingRS_UL_ConfigDedicated__setup__srs_HoppingBandwidth_hbw0;
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.freqDomainPosition=0; physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.freqDomainPosition=0;
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.duration=1; physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.duration=1;
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex=2; if (frame_parms->frame_type==FDD) {
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb=0; 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",
enb_properties.properties[ctxt_pP->module_id]->srs_SubframeConfig[CC_id]);
if (ue_context_pP->local_uid >=10)
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.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",
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",
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.transmissionComb= ue_context_pP->local_uid%2;
}
LOG_W(RRC,"local UID %d, srs ConfigIndex %d, TransmissionComb %d\n",ue_context_pP->local_uid,
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex,
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb);
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.cyclicShift= physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.cyclicShift=
SoundingRS_UL_ConfigDedicated__setup__cyclicShift_cs0; SoundingRS_UL_ConfigDedicated__setup__cyclicShift_cs0;
} }
......
...@@ -62,9 +62,9 @@ eNBs = ...@@ -62,9 +62,9 @@ eNBs =
pusch_nDMRS1 = 1; pusch_nDMRS1 = 1;
phich_duration = "NORMAL"; phich_duration = "NORMAL";
phich_resource = "ONESIXTH"; phich_resource = "ONESIXTH";
srs_enable = "ENABLE"; srs_enable = "DISABLE";
srs_BandwidthConfig = 2; srs_BandwidthConfig = 2;
srs_SubframeConfig = 3; srs_SubframeConfig = 2;
srs_ackNackST = "DISABLE"; srs_ackNackST = "DISABLE";
srs_MaxUpPts = "DISABLE"; srs_MaxUpPts = "DISABLE";
...@@ -137,7 +137,7 @@ eNBs = ...@@ -137,7 +137,7 @@ eNBs =
////////// MME parameters: ////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.70"; mme_ip_address = ( { ipv4 = "192.168.12.26";
ipv6 = "192:168:30::17"; ipv6 = "192:168:30::17";
active = "yes"; active = "yes";
preference = "ipv4"; preference = "ipv4";
......
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