Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Black
OpenXG-RAN
Commits
b8c43654
Commit
b8c43654
authored
8 years ago
by
Cedric Roux
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/feature-218-srs' into develop_integration_w12
parents
bd173433
9d3eed3b
Branches unavailable
2023.w22
2023.w21
2023.w20
2023.w19
2023.w18
2023.w18b
2023.w16
2023.w15
2023.w14
2023.w13
2023.w12
2023.w11
2023.w11b
2023.w10
2023.w10b
2023.w09
2023.w08
2023.w08b
2023.w07
2023.w06
2023.w05
2023.w03
2023.w02
2022.42
2022.41
2022.w51
2022.w50
2022.w49
2022.w48
2022.w47
2022.w46
2022.w45
2022.w43
2022.w42
2022.w42b
2022.w41
2022.w40
2022.w39
2022.w38
2022.w37
2022.w37b
2022.w36
2022.w35
2022.w33
2022.w32
2022.w31
2022.w31b
2022.w30
2022.w29
2022.w26
2022.w25
2022.w24
2022.w24b
2022.w23
2022.w22
2022.w21
2022.w20
2022.w19
2022.w18
2022.w17
2022.w15
2022.w15b
2022.w14a
2022.w13
2022.w13b
2022.w13a
2022.w12
2022.w10
2022.w09
2022.w09b
2022.w08
2022.w08b
2022.w07
2022.w07b
2022.w06
2022.w06a
2022.w05
2022.w05b
2022.w03_hotfix
2022.w03_b
2022.w02
2022.w01
2021.wk46
2021.wk14_a
2021.wk13_d
2021.wk13_c
2021.w51_c
2021.w51_a
2021.w50_a
2021.w49_b
2021.w49_a
2021.w48
2021.w47
2021.w46
2021.w46-powder
2021.w45
2021.w45_b
2021.w44
2021.w43
2021.w42
2021.w37
2021.w36
2021.w35
2021.w34
2021.w33
2021.w32
2021.w31
2021.w30
2021.w29
2021.w28
2021.w27
2021.w26
2021.w25
2021.w24
2021.w23
2021.w22
2021.w20
2021.w19
2021.w18_b
2021.w18_a
2021.w17_b
2021.w16
2021.w15
2021.w14
2021.w13_a
2021.w12
2021.w11
2021.w10
2021.w09
2021.w08
2021.w06
2021.w05
2021.w04
2021.w02
2020.w51_2
2020.w51
2020.w50
2020.w49
2020.w48_2
2020.w48
2020.w47
2020.w46_2
2020.w46
2020.w45_2
2020.w45
2020.w44
2020.w42_2
2020.w42
2020.w41
2020.w39
2020.w38
2020.w37
2020.w36
2020.w34
2020.w33
2020.w31
2020.w30
2020.w29
2020.w28
2020.w26
2020.w25
2020.w24
2020.w23
2020.w22
2020.w19
2020.w17
2020.w16
2020.w15
2020.w11
2020.w09
2020.w06
2020.w05
2020.w04
2020.w03
2019.w51
2019.w44
2019.w41
2019.w36
2019.w30
2019.w28
2019.w27
2019.w25
2019.w23
2019.w21
2019.w17
2019.w15
2019.w13
2019.w11
2019.w10
2019.w09
2019.w08
2019.w07
2019.w06
2019.w04
2019.w03
2018.w51
2018.w48
2018.w47
2018.w46
2018.w44
2018.w41
2018.w40
2018.w39
2018.w36
2018.w33
2018.w31
2018.w29
2018.w25
2018.w19
2018.w15
2018.w12
2018.w11
2018.w10
2018.w09
2018.w08
2018.w07
2018.w06
2018.w05
2018.w04
2018.w03
2018.w02
2017.w48
2017.w46
2017.w43
2017.w42
2017.w34
2017.w30
2017.w25
2017.w24
2017.w22
2017.w20
2017.w19
2017.w15
2017.w14
2017.w13
2017.w12
v1.2.2
v1.2.1
v1.2.0
v1.1.1
v1.1.0
v1.0.3
v1.0.2
v1.0.1
v1.0.0
v0.6.1
v0.6.1_tdd
v0.6
setparam
osa-etsi-ws-ue
osa-etsi-ws-try2
osa-etsi-ws-try1
osa-etsi-ws-gNB
oai_nr_sync
nr-ip-over-lte
nr-ip-over-lte-v.1.5
nr-ip-over-lte-v.1.4
nr-ip-over-lte-v.1.3
nr-ip-over-lte-v.1.2
nr-ip-over-lte-v.1.1
nr-ip-over-lte-v.1.0
flexran-eol
develop-nr-pdcch
develop-nr-2020w03
develop-nr-2020w02
develop-nr-2019w51
develop-nr-2019w50
develop-nr-2019w48
develop-nr-2019w47
develop-nr-2019w45
develop-nr-2019w43
develop-nr-2019w42
develop-nr-2019w40
develop-nr-2019w28
develop-nr-2019w23
benetel_phase_rotation
benetel_gnb_rel_2.0
benetel_gnb_rel_1.0
benetel_enb_rel_2.0
benetel_enb_rel_1.0
No related merge requests found
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
405 additions
and
283 deletions
+405
-283
openair1/PHY/INIT/lte_init.c
openair1/PHY/INIT/lte_init.c
+2
-1
openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
+19
-17
openair1/PHY/LTE_TRANSPORT/dci_tools.c
openair1/PHY/LTE_TRANSPORT/dci_tools.c
+3
-2
openair1/PHY/LTE_TRANSPORT/proto.h
openair1/PHY/LTE_TRANSPORT/proto.h
+5
-3
openair1/PHY/LTE_TRANSPORT/rar_tools.c
openair1/PHY/LTE_TRANSPORT/rar_tools.c
+15
-2
openair1/PHY/LTE_TRANSPORT/srs_modulation.c
openair1/PHY/LTE_TRANSPORT/srs_modulation.c
+19
-31
openair1/PHY/TOOLS/lte_phy_scope.c
openair1/PHY/TOOLS/lte_phy_scope.c
+7
-4
openair1/PHY/impl_defs_lte.h
openair1/PHY/impl_defs_lte.h
+1
-1
openair1/SCHED/defs.h
openair1/SCHED/defs.h
+4
-0
openair1/SCHED/phy_procedures_lte_common.c
openair1/SCHED/phy_procedures_lte_common.c
+145
-0
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+69
-31
openair1/SCHED/phy_procedures_lte_ue.c
openair1/SCHED/phy_procedures_lte_ue.c
+31
-159
openair1/SIMULATION/LTE_PHY/ulsim.c
openair1/SIMULATION/LTE_PHY/ulsim.c
+38
-10
openair2/ENB_APP/enb_config.c
openair2/ENB_APP/enb_config.c
+1
-1
openair2/LAYER2/MAC/eNB_scheduler.c
openair2/LAYER2/MAC/eNB_scheduler.c
+2
-2
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
+1
-1
openair2/RRC/LITE/MESSAGES/asn1_msg.c
openair2/RRC/LITE/MESSAGES/asn1_msg.c
+28
-3
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpb210.conf
...ROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpb210.conf
+5
-5
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf
...PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf
+10
-10
No files found.
openair1/PHY/INIT/lte_init.c
View file @
b8c43654
...
...
@@ -483,7 +483,8 @@ void phy_config_dedicated_eNB_step2(PHY_VARS_eNB *eNB)
if
(
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
)
{
if
(
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
present
==
SoundingRS_UL_ConfigDedicated_PR_setup
)
{
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
srsConfigDedicatedSetup
=
1
;
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
duration
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
duration
;
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
cyclicShift
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
cyclicShift
;
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
freqDomainPosition
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
freqDomainPosition
;
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
View file @
b8c43654
...
...
@@ -667,28 +667,28 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
}
extern
uint16_t
transmission_offset_tdd
[
16
];
#define DEBUG_SRS
//
#define DEBUG_SRS
int32_t
lte_srs_channel_estimation
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
LTE_eNB_COMMON
*
common_vars
,
LTE_eNB_SRS
*
srs_vars
,
SOUNDINGRS_UL_CONFIG_DEDICATED
*
soundingrs_ul_config_dedicated
,
unsigned
char
sub
_frame_number
,
unsigned
char
sub
frame
,
unsigned
char
eNB_id
)
{
int
T_SFC
,
aa
;
int
aa
;
int
N_symb
,
symbol
;
uint8_t
nb_antennas_rx
=
frame_parms
->
nb_antenna
_ports_eNB
;
uint8_t
nb_antennas_rx
=
frame_parms
->
nb_antenna
s_rx
;
#ifdef DEBUG_SRS
char
fname
[
40
],
vname
[
40
];
#endif
uint8_t
Ssrs
=
frame_parms
->
soundingrs_ul_config_common
.
srs_SubframeConfig
;
//uint8_t Ssrs = frame_parms->soundingrs_ul_config_common.srs_SubframeConfig;
//uint8_t T_SFC = (Ssrs<=7 ? 5 : 10);
N_symb
=
2
*
7
-
frame_parms
->
Ncp
;
symbol
=
(
sub_frame_number
+
1
)
*
N_symb
-
1
;
//SRS is always in last symbol of subframe
T_SFC
=
(
Ssrs
<=
7
?
5
:
10
);
symbol
=
N_symb
-
1
;
//SRS is always in last symbol of subframe
/*
msg("SRS channel estimation eNB %d, subframs %d, %d %d %d %d %d\n",eNB_id,sub_frame_number,
...
...
@@ -699,19 +699,21 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
SRS_parms->Ssrs);
*/
if
((
1
<<
(
sub_frame_number
%
T_SFC
))
&
transmission_offset_tdd
[
Ssrs
])
{
//
if ((1<<(sub_frame_number%T_SFC))&transmission_offset_tdd[Ssrs]) {
if
(
generate_srs_rx
(
frame_parms
,
soundingrs_ul_config_dedicated
,
srs_vars
->
srs
)
==-
1
)
{
msg
(
"lte_srs_channel_estimation: Error in generate_srs_rx
\n
"
);
if
(
generate_srs
(
frame_parms
,
soundingrs_ul_config_dedicated
,
&
srs_vars
->
srs
[
eNB_id
],
0x7FFF
,
subframe
)
==-
1
)
{
LOG_E
(
PHY
,
"lte_srs_channel_estimation: Error in generate_srs_rx
\n
"
);
return
(
-
1
);
}
for
(
aa
=
0
;
aa
<
nb_antennas_rx
;
aa
++
)
{
#ifdef DEBUG_SRS
msg
(
"SRS channel estimation eNB %d, subframs %d, aarx %d, %p, %p, %p
\n
"
,
eNB_id
,
sub_frame_number
,
aa
,
&
common_vars
->
rxdataF
[
eNB_id
][
aa
][
2
*
frame_parms
->
ofdm_symbol_size
*
symbol
],
&
common_vars
->
rxdataF
[
eNB_id
][
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
srs_vars
->
srs
,
srs_vars
->
srs_ch_estimates
[
eNB_id
][
aa
]);
#endif
...
...
@@ -719,14 +721,15 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
//write_output("eNB_rxF.m","rxF",&common_vars->rxdataF[0][aa][2*frame_parms->ofdm_symbol_size*symbol],2*(frame_parms->ofdm_symbol_size),2,1);
//write_output("eNB_srs.m","srs_eNB",common_vars->srs,(frame_parms->ofdm_symbol_size),1,1);
mult_cpx_conj_vector
((
int16_t
*
)
&
common_vars
->
rxdataF
[
eNB_id
][
aa
][
2
*
frame_parms
->
ofdm_symbol_size
*
symbol
],
(
int16_t
*
)
srs_vars
->
srs
,
//memcpy(srs_vars->srs_ch_estimates[eNB_id][aa],&srs_vars->srs[eNB_id],frame_parms->ofdm_symbol_size*sizeof(int32_t));
//memcpy(srs_vars->srs_ch_estimates[eNB_id][aa],&common_vars->rxdataF[eNB_id][aa][frame_parms->ofdm_symbol_size*symbol],frame_parms->ofdm_symbol_size*sizeof(int32_t));
mult_cpx_conj_vector
((
int16_t
*
)
&
common_vars
->
rxdataF
[
eNB_id
][
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
(
int16_t
*
)
&
srs_vars
->
srs
[
eNB_id
],
(
int16_t
*
)
srs_vars
->
srs_ch_estimates
[
eNB_id
][
aa
],
frame_parms
->
ofdm_symbol_size
,
15
,
0
);
//msg("SRS channel estimation cmult out\n");
#ifdef USER_MODE
#ifdef DEBUG_SRS
sprintf
(
fname
,
"eNB_id%d_an%d_srs_ch_est.m"
,
eNB_id
,
aa
);
...
...
@@ -735,7 +738,6 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
#endif
#endif
}
}
/*
else {
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_TRANSPORT/dci_tools.c
View file @
b8c43654
...
...
@@ -8010,6 +8010,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
print_CQI
(
ulsch
->
o
,
ulsch
->
uci_format
,
eNB_id
,
ue
->
frame_parms
.
N_RB_DL
);
ulsch
->
bundling
=
1
-
AckNackFBMode
;
if
(
frame_parms
->
frame_type
==
FDD
)
{
int
dl_subframe
=
(
subframe
<
4
)
?
(
subframe
+
6
)
:
(
subframe
-
4
);
...
...
@@ -8041,7 +8042,6 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
ulsch
->
Nsymb_pusch
=
12
-
(
frame_parms
->
Ncp
<<
1
)
-
(
use_srs
==
0
?
0
:
1
);
ulsch
->
srs_active
=
use_srs
;
ulsch
->
bundling
=
1
-
AckNackFBMode
;
if
((
rnti
>=
cba_rnti
)
&&
(
rnti
<
p_rnti
))
ulsch
->
harq_processes
[
harq_pid
]
->
status
=
CBA_ACTIVE
;
...
...
@@ -8644,6 +8644,8 @@ int generate_eNB_ulsch_params_from_dci(PHY_VARS_eNB *eNB,
ulsch
->
harq_processes
[
harq_pid
]
->
uci_format
=
HLC_subband_cqi_nopmi
;
}
ulsch
->
bundling
=
1
-
AckNackFBMode
;
if
(
frame_parms
->
frame_type
==
FDD
)
{
int
dl_subframe
=
(
subframe
<
4
)
?
(
subframe
+
6
)
:
(
subframe
-
4
);
...
...
@@ -8667,7 +8669,6 @@ int generate_eNB_ulsch_params_from_dci(PHY_VARS_eNB *eNB,
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
;
ulsch
->
bundling
=
1
-
AckNackFBMode
;
//Mapping of cyclic shift field in DCI format0 to n_DMRS2 (3GPP 36.211, Table 5.5.2.1.1-1)
if
(
cshift
==
0
)
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_TRANSPORT/proto.h
View file @
b8c43654
...
...
@@ -1568,9 +1568,11 @@ uint8_t SE2I_TBS(float SE,
@param soundingrs_ul_config_dedicated Dynamic configuration from RRC during Connection Establishment
@param txdataF pointer to the frequency domain TX signal
@returns 0 on success*/
int
generate_srs_rx
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
SOUNDINGRS_UL_CONFIG_DEDICATED
*
soundingrs_ul_config_dedicated
,
int
*
txdataF
);
int
generate_srs
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
SOUNDINGRS_UL_CONFIG_DEDICATED
*
soundingrs_ul_config_dedicated
,
int
*
txdataF
,
int16_t
amp
,
uint32_t
subframe
);
int32_t
generate_srs_tx_emul
(
PHY_VARS_UE
*
phy_vars_ue
,
uint8_t
subframe
);
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_TRANSPORT/rar_tools.c
View file @
b8c43654
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_TRANSPORT/srs_modulation.c
View file @
b8c43654
...
...
@@ -120,17 +120,15 @@ int compareints (const void * a, const void * b)
return
(
*
(
unsigned
short
*
)
a
-
*
(
unsigned
short
*
)
b
);
}
int32_t
generate_srs_tx
(
PHY_VARS_UE
*
ue
,
uint8_t
eNB_id
,
int16_t
amp
,
uint32_t
subframe
)
#define DEBUG_SRS
int32_t
generate_srs
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
SOUNDINGRS_UL_CONFIG_DEDICATED
*
soundingrs_ul_config_dedicated
,
int32_t
*
txptr
,
int16_t
amp
,
uint32_t
subframe
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
=&
ue
->
frame_parms
;
SOUNDINGRS_UL_CONFIG_DEDICATED
*
soundingrs_ul_config_dedicated
=&
ue
->
soundingrs_ul_config_dedicated
[
eNB_id
];
int32_t
**
txdataF
=
ue
->
common_vars
.
txdataF
;
uint16_t
msrsb
=
0
,
Nb
=
0
,
nb
,
b
,
msrs0
=
0
,
k
,
Msc_RS
,
Msc_RS_idx
,
carrier_pos
,
symbol_offset
;
uint16_t
msrsb
=
0
,
Nb
=
0
,
nb
,
b
,
msrs0
=
0
,
k
,
Msc_RS
,
Msc_RS_idx
,
carrier_pos
;
uint16_t
*
Msc_idx_ptr
;
int32_t
k0
;
//uint32_t subframe_offset;
...
...
@@ -178,7 +176,7 @@ int32_t generate_srs_tx(PHY_VARS_UE *ue,
}
if
(
k0
<
0
)
{
msg
(
"generate_srs: invalid parameter set msrs0=%d, msrsb=%d, Nb=%d => nb=%d, k0=%d
\n
"
,
msrs0
,
msrsb
,
Nb
,
nb
,
k0
);
LOG_E
(
PHY
,
"generate_srs: invalid parameter set msrs0=%d, msrsb=%d, Nb=%d => nb=%d, k0=%d
\n
"
,
msrs0
,
msrsb
,
Nb
,
nb
,
k0
);
return
(
-
1
);
}
...
...
@@ -188,7 +186,7 @@ int32_t generate_srs_tx(PHY_VARS_UE *ue,
if
(
Msc_idx_ptr
)
Msc_RS_idx
=
Msc_idx_ptr
-
dftsizes
;
else
{
msg
(
"generate_srs: index for Msc_RS=%d not found
\n
"
,
Msc_RS
);
LOG_E
(
PHY
,
"generate_srs: index for Msc_RS=%d not found
\n
"
,
Msc_RS
);
return
(
-
1
);
}
...
...
@@ -199,29 +197,20 @@ int32_t generate_srs_tx(PHY_VARS_UE *ue,
else
if
(
Msc_RS
==
144
)
Msc_RS_idx
=
9
;
else
{
msg
(
"generate_srs: index for Msc_RS=%d not implemented
\n
"
,
Msc_RS
);
LOG_E
(
PHY
,
"generate_srs: index for Msc_RS=%d not implemented
\n
"
,
Msc_RS
);
return
(
-
1
);
}
#endif
#ifdef DEBUG_SRS
msg
(
"generate_srs_tx: Msc_RS = %d, Msc_RS_idx = %d
\n
"
,
Msc_RS
,
Msc_RS_idx
);
LOG_D
(
PHY
,
"generate_srs_tx: Msc_RS = %d, Msc_RS_idx = %d, k0 = %d
\n
"
,
Msc_RS
,
Msc_RS_idx
,
k0
);
#endif
carrier_pos
=
(
frame_parms
->
first_carrier_offset
+
k0
);
if
(
carrier_pos
>
frame_parms
->
ofdm_symbol_size
)
{
carrier_pos
-=
frame_parms
->
ofdm_symbol_size
;
}
uint16_t
nsymb
=
(
frame_parms
->
Ncp
==
0
)
?
14
:
12
;
symbol_offset
=
(
int
)
frame_parms
->
ofdm_symbol_size
*
((
subframe
*
nsymb
)
+
(
nsymb
-
1
));
//msg("carrier_pos = %d\n",carrier_pos);
//subframe_offset = subframe*frame_parms->symbols_per_tti*frame_parms->ofdm_symbol_size;
//symbol_offset = subframe_offset+(frame_parms->symbols_per_tti-1)*frame_parms->ofdm_symbol_size;
int32_t
*
txptr
;
txptr
=
&
txdataF
[
0
][
symbol_offset
];
for
(
k
=
0
;
k
<
Msc_RS
;
k
++
)
{
int32_t
real
=
((
int32_t
)
amp
*
(
int32_t
)
ul_ref_sigs
[
u
][
v
][
Msc_RS_idx
][
k
<<
1
])
>>
15
;
...
...
@@ -245,6 +234,7 @@ int generate_srs_tx_emul(PHY_VARS_UE *phy_vars_ue,uint8_t subframe)
return
(
0
);
}
#if 0
int generate_srs_rx(LTE_DL_FRAME_PARMS *frame_parms,
SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated,
int *txdataF)
...
...
@@ -285,7 +275,7 @@ int generate_srs_rx(LTE_DL_FRAME_PARMS *frame_parms,
}
if (k0<0) {
msg
(
"Invalid parameter set msrs0=%d, msrsb=%d, Nb=%d => nb=%d, k0=%d
\n
"
,
msrs0
,
msrsb
,
Nb
,
nb
,
k0
);
LOG_E(PHY,
"Invalid parameter set msrs0=%d, msrsb=%d, Nb=%d => nb=%d, k0=%d\n",msrs0,msrsb,Nb,nb,k0);
return(-1);
}
...
...
@@ -295,7 +285,7 @@ int generate_srs_rx(LTE_DL_FRAME_PARMS *frame_parms,
if (Msc_idx_ptr)
Msc_RS_idx = Msc_idx_ptr - dftsizes;
else {
msg
(
"generate_srs: index for Msc_RS=%d not found
\n
"
,
Msc_RS
);
LOG_E(PHY,
"generate_srs: index for Msc_RS=%d not found\n",Msc_RS);
return(-1);
}
...
...
@@ -306,23 +296,21 @@ int generate_srs_rx(LTE_DL_FRAME_PARMS *frame_parms,
else if (Msc_RS==144)
Msc_RS_idx = 9;
else {
msg
(
"generate_srs: index for Msc_RS=%d not implemented
\n
"
,
Msc_RS
);
LOG_E(PHY,
"generate_srs: index for Msc_RS=%d not implemented\n",Msc_RS);
return(-1);
}
#endif
#ifdef DEBUG_SRS
msg
(
"generate_srs_rx: Msc_RS = %d, Msc_RS_idx = %d, k0=%d
\n
"
,
Msc_RS
,
Msc_RS_idx
,
k0
);
LOG_I
(
PHY
,
"generate_srs_rx: Msc_RS = %d, Msc_RS_idx = %d, k0=%d
\n
"
,
Msc_RS
,
Msc_RS_idx
,
k0
);
#endif
carrier_pos
=
(
frame_parms
->
first_carrier_offset
+
k0
)
%
frame_parms
->
ofdm_symbol_size
;
for
(
k
=
0
;
k
<
Msc_RS
;
k
++
)
{
((
short
*
)
txdataF
)[
carrier_pos
<<
2
]
=
ul_ref_sigs_rx
[
0
][
0
][
Msc_RS_idx
][
k
<<
2
];
((
short
*
)
txdataF
)[(
carrier_pos
<<
2
)
+
1
]
=
ul_ref_sigs_rx
[
0
][
0
][
Msc_RS_idx
][(
k
<<
2
)
+
1
];
((
short
*
)
txdataF
)[(
carrier_pos
<<
2
)
+
2
]
=
ul_ref_sigs_rx
[
0
][
0
][
Msc_RS_idx
][(
k
<<
2
)
+
2
];
((
short
*
)
txdataF
)[(
carrier_pos
<<
2
)
+
3
]
=
ul_ref_sigs_rx
[
0
][
0
][
Msc_RS_idx
][(
k
<<
2
)
+
3
];
((
short
*
)
txdataF
)[
carrier_pos
<<
1
]
=
ul_ref_sigs_rx
[
0
][
0
][
Msc_RS_idx
][
k
<<
1
];
((
short
*
)
txdataF
)[(
carrier_pos
<<
1
)
+
1
]
=
ul_ref_sigs_rx
[
0
][
0
][
Msc_RS_idx
][(
k
<<
1
)
+
1
];
carrier_pos
+=
2
;
if
(
carrier_pos
>=
frame_parms
->
ofdm_symbol_size
)
...
...
@@ -365,7 +353,7 @@ int generate_srs_rx(LTE_DL_FRAME_PARMS *frame_parms,
// write_output("srs_rx.m","srsrx",txdataF,1024,2,1);
return
(
0
);
}
#endif
#ifdef MAIN
main
()
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/TOOLS/lte_phy_scope.c
View file @
b8c43654
...
...
@@ -84,7 +84,7 @@ FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void )
fl_set_xyplot_ybounds
(
fdui
->
rxsig_t
,
10
,
70
);
// Time-domain channel response
fdui
->
chest_t
=
fl_add_xyplot
(
FL_NORMAL_XYPLOT
,
410
,
20
,
370
,
100
,
"
Channel Impulse
Response (samples, abs)"
);
fdui
->
chest_t
=
fl_add_xyplot
(
FL_NORMAL_XYPLOT
,
410
,
20
,
370
,
100
,
"
SRS Frequency
Response (samples, abs)"
);
fl_set_object_boxtype
(
fdui
->
chest_t
,
FL_EMBOSSED_BOX
);
fl_set_object_color
(
fdui
->
chest_t
,
FL_BLACK
,
FL_RED
);
fl_set_object_lcolor
(
fdui
->
chest_t
,
FL_WHITE
);
// Label color
...
...
@@ -196,7 +196,8 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
bit
=
malloc
(
coded_bits_per_codeword
*
sizeof
(
float
));
rxsig_t
=
(
int16_t
**
)
phy_vars_enb
->
common_vars
.
rxdata
[
eNB_id
];
chest_t
=
(
int16_t
**
)
phy_vars_enb
->
pusch_vars
[
UE_id
]
->
drs_ch_estimates_time
[
eNB_id
];
//chest_t = (int16_t**) phy_vars_enb->pusch_vars[UE_id]->drs_ch_estimates_time[eNB_id];
chest_t
=
(
int16_t
**
)
phy_vars_enb
->
srs_vars
[
UE_id
].
srs_ch_estimates
[
eNB_id
];
chest_f
=
(
int16_t
**
)
phy_vars_enb
->
pusch_vars
[
UE_id
]
->
drs_ch_estimates
[
eNB_id
];
pusch_llr
=
(
int16_t
*
)
phy_vars_enb
->
pusch_vars
[
UE_id
]
->
llr
;
pusch_comp
=
(
int16_t
*
)
phy_vars_enb
->
pusch_vars
[
UE_id
]
->
rxdataF_comp
[
eNB_id
][
0
];
...
...
@@ -232,8 +233,10 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
if
(
chest_t
[
0
]
!=
NULL
)
{
for
(
i
=
0
;
i
<
(
frame_parms
->
ofdm_symbol_size
);
i
++
)
{
i2
=
(
i
+
(
frame_parms
->
ofdm_symbol_size
>>
1
))
%
frame_parms
->
ofdm_symbol_size
;
time2
[
i
]
=
(
float
)(
i
-
(
frame_parms
->
ofdm_symbol_size
>>
1
));
//i2 = (i+(frame_parms->ofdm_symbol_size>>1))%frame_parms->ofdm_symbol_size;
i2
=
i
;
//time2[i] = (float)(i-(frame_parms->ofdm_symbol_size>>1));
time2
[
i
]
=
(
float
)
i
;
chest_t_abs
[
0
][
i
]
=
10
*
log10
((
float
)
(
1
+
chest_t
[
0
][
2
*
i2
]
*
chest_t
[
0
][
2
*
i2
]
+
chest_t
[
0
][
2
*
i2
+
1
]
*
chest_t
[
0
][
2
*
i2
+
1
]));
if
(
chest_t_abs
[
0
][
i
]
>
ymax
)
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/impl_defs_lte.h
View file @
b8c43654
...
...
@@ -320,7 +320,7 @@ typedef struct {
uint16_t
srs_ConfigIndex
;
/// Parameter: \f$n^\text{CS}_\text{SRS}\f$. See TS 36.211 (5.5.3.1). \vr{[0..7]} \note the specification sais it is an enumerated value.
uint8_t
cyclicShift
;
// Parameter:
ue srs subframe for internal implementation
// Parameter:
internal implementation: UE SRS configured
uint8_t
srsConfigDedicatedSetup
;
// Parameter: cell srs subframe for internal implementation
uint8_t
srsCellSubframe
;
...
...
This diff is collapsed.
Click to expand it.
openair1/SCHED/defs.h
View file @
b8c43654
...
...
@@ -514,6 +514,10 @@ void dump_dlsch_ra(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
void
dump_dlsch2
(
PHY_VARS_UE
*
phy_vars_ue
,
uint8_t
eNB_id
,
uint8_t
subframe
,
unsigned
int
*
coded_bits_per_codeword
,
int
round
,
unsigned
char
harq_pid
);
int
is_srs_occasion_common
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
int
frame_tx
,
int
subframe_tx
);
void
compute_srs_pos
(
lte_frame_type_t
frameType
,
uint16_t
isrs
,
uint16_t
*
psrsPeriodicity
,
uint16_t
*
psrsOffset
);
/*@}*/
...
...
This diff is collapsed.
Click to expand it.
openair1/SCHED/phy_procedures_lte_common.c
View file @
b8c43654
...
...
@@ -942,3 +942,148 @@ MU_MIMO_mode *get_mu_mimo_mode (module_id_t Mod_id, uint8_t CC_id, rnti_t rnti)
return
&
PHY_vars_eNB_g
[
Mod_id
][
CC_id
]
->
mu_mimo_mode
[
UE_id
];
}
int
is_srs_occasion_common
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
int
frame_tx
,
int
subframe_tx
)
{
uint8_t
isSubframeSRS
=
0
;
// SRS Cell Occasion
//ue->ulsch[eNB_id]->srs_active = 0;
//ue->ulsch[eNB_id]->Nsymb_pusch = 12-(frame_parms->Ncp<<1)- ue->ulsch[eNB_id]->srs_active;
if
(
frame_parms
->
soundingrs_ul_config_common
.
enabled_flag
)
{
LOG_D
(
PHY
,
" SRS SUBFRAMECONFIG: %d
\n
"
,
frame_parms
->
soundingrs_ul_config_common
.
srs_SubframeConfig
);
uint8_t
TSFC
;
uint16_t
deltaTSFC
;
// bitmap
uint8_t
srs_SubframeConfig
;
// table resuming TSFC (Period) and deltaSFC (offset)
const
uint16_t
deltaTSFCTabType1
[
15
][
2
]
=
{
{
1
,
1
},{
1
,
2
},{
2
,
2
},{
1
,
5
},{
2
,
5
},{
4
,
5
},{
8
,
5
},{
3
,
5
},{
12
,
5
},{
1
,
10
},{
2
,
10
},{
4
,
10
},{
8
,
10
},{
351
,
10
},{
383
,
10
}
};
// Table 5.5.3.3-2 3GPP 36.211 FDD
const
uint16_t
deltaTSFCTabType2
[
14
][
2
]
=
{
{
2
,
5
},{
6
,
5
},{
10
,
5
},{
18
,
5
},{
14
,
5
},{
22
,
5
},{
26
,
5
},{
30
,
5
},{
70
,
10
},{
74
,
10
},{
194
,
10
},{
326
,
10
},{
586
,
10
},{
210
,
10
}
};
// Table 5.5.3.3-2 3GPP 36.211 TDD
srs_SubframeConfig
=
frame_parms
->
soundingrs_ul_config_common
.
srs_SubframeConfig
;
if
(
FDD
==
frame_parms
->
frame_type
)
{
// srs_SubframeConfig =< 14
deltaTSFC
=
deltaTSFCTabType1
[
srs_SubframeConfig
][
0
];
TSFC
=
deltaTSFCTabType1
[
srs_SubframeConfig
][
1
];
}
else
{
// srs_SubframeConfig =< 13
deltaTSFC
=
deltaTSFCTabType2
[
srs_SubframeConfig
][
0
];
TSFC
=
deltaTSFCTabType2
[
srs_SubframeConfig
][
1
];
}
// Sounding reference signal subframes are the subframes satisfying ns/2 mod TSFC (- deltaTSFC
uint16_t
tmp
=
(
subframe_tx
%
TSFC
);
if
((
1
<<
tmp
)
&
deltaTSFC
)
{
// This is a Sounding reference signal subframes
isSubframeSRS
=
1
;
}
LOG_D
(
PHY
,
" ISTDD: %d, TSFC: %d, deltaTSFC: %d, AbsSubframeTX: %d.%d
\n
"
,
frame_parms
->
frame_type
,
TSFC
,
deltaTSFC
,
frame_tx
,
subframe_tx
);
}
return
(
isSubframeSRS
);
}
void
compute_srs_pos
(
lte_frame_type_t
frameType
,
uint16_t
isrs
,
uint16_t
*
psrsPeriodicity
,
uint16_t
*
psrsOffset
)
{
if
(
TDD
==
frameType
)
{
if
(
isrs
<
10
)
{
mac_xface
->
macphy_exit
(
"2 ms SRS periodicity not supported"
);
}
if
((
isrs
>
9
)
&&
(
isrs
<
15
))
{
*
psrsPeriodicity
=
5
;
*
psrsOffset
=
isrs
-
10
;
}
if
((
isrs
>
14
)
&&
(
isrs
<
25
))
{
*
psrsPeriodicity
=
10
;
*
psrsOffset
=
isrs
-
15
;
}
if
((
isrs
>
24
)
&&
(
isrs
<
45
))
{
*
psrsPeriodicity
=
20
;
*
psrsOffset
=
isrs
-
25
;
}
if
((
isrs
>
44
)
&&
(
isrs
<
85
))
{
*
psrsPeriodicity
=
40
;
*
psrsOffset
=
isrs
-
45
;
}
if
((
isrs
>
84
)
&&
(
isrs
<
165
))
{
*
psrsPeriodicity
=
80
;
*
psrsOffset
=
isrs
-
85
;
}
if
((
isrs
>
164
)
&&
(
isrs
<
325
))
{
*
psrsPeriodicity
=
160
;
*
psrsOffset
=
isrs
-
165
;
}
if
((
isrs
>
324
)
&&
(
isrs
<
645
))
{
*
psrsPeriodicity
=
320
;
*
psrsOffset
=
isrs
-
325
;
}
if
(
isrs
>
644
)
{
mac_xface
->
macphy_exit
(
"Isrs out of range"
);
}
}
else
{
if
(
isrs
<
2
)
{
*
psrsPeriodicity
=
2
;
*
psrsOffset
=
isrs
;
}
if
((
isrs
>
1
)
&&
(
isrs
<
7
))
{
*
psrsPeriodicity
=
5
;
*
psrsOffset
=
isrs
-
2
;
}
if
((
isrs
>
6
)
&&
(
isrs
<
17
))
{
*
psrsPeriodicity
=
10
;
*
psrsOffset
=
isrs
-
7
;
}
if
((
isrs
>
16
)
&&
(
isrs
<
37
))
{
*
psrsPeriodicity
=
20
;
*
psrsOffset
=
isrs
-
17
;
}
if
((
isrs
>
36
)
&&
(
isrs
<
77
))
{
*
psrsPeriodicity
=
40
;
*
psrsOffset
=
isrs
-
37
;
}
if
((
isrs
>
76
)
&&
(
isrs
<
157
))
{
*
psrsPeriodicity
=
80
;
*
psrsOffset
=
isrs
-
77
;
}
if
((
isrs
>
156
)
&&
(
isrs
<
317
))
{
*
psrsPeriodicity
=
160
;
*
psrsOffset
=
isrs
-
157
;
}
if
((
isrs
>
316
)
&&
(
isrs
<
637
))
{
*
psrsPeriodicity
=
320
;
*
psrsOffset
=
isrs
-
317
;
}
if
(
isrs
>
636
)
{
mac_xface
->
macphy_exit
(
"Isrs out of range"
);
}
}
}
This diff is collapsed.
Click to expand it.
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
b8c43654
...
...
@@ -307,8 +307,6 @@ void phy_procedures_emos_eNB_TX(unsigned char subframe, PHY_VARS_eNB *eNB)
}
#endif
void
phy_procedures_eNB_S_RX
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
relaying_type_t
r_type
)
{
UNUSED
(
r_type
);
...
...
@@ -824,6 +822,13 @@ 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
,
"[eNB %"
PRIu8
"][PUSCH %"
PRIu8
"] Frame %d subframe %d UL Frame %"
PRIu32
", UL Subframe %"
PRIu8
", Generated ULSCH (format0) DCI (rnti %"
PRIx16
", dci %"
PRIx8
"), aggregation %d
\n
"
,
...
...
@@ -839,6 +844,20 @@ void generate_eNB_ulsch_params(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC
dci_alloc
->
dci_pdu
[
0
],
1
<<
dci_alloc
->
L
);
is_srs_pos
=
is_srs_occasion_common
(
fp
,
pdcch_alloc2ul_frame
(
fp
,
frame
,
subframe
),
pdcch_alloc2ul_subframe
(
fp
,
subframe
));
/*
if (is_srs_pos && eNB->soundingrs_ul_config_dedicated[UE_id].srsConfigDedicatedSetup) {
srsConfigIndex = eNB->soundingrs_ul_config_dedicated[UE_id].srs_ConfigIndex;
compute_srs_pos(fp->frame_type, srsConfigIndex, &srsPeriodicity, &srsOffset);
if ((((10*pdcch_alloc2ul_frame(fp,frame,subframe)+pdcch_alloc2ul_subframe(fp,subframe)) % srsPeriodicity) == srsOffset)) {
do_srs = 1;
}
}
LOG_D(PHY,"frame %d (%d), subframe %d (%d), UE_id %d: is_srs_pos %d, do_SRS %d, index %d, period %d, offset %d \n",
frame,pdcch_alloc2ul_frame(fp,frame,subframe),subframe,pdcch_alloc2ul_subframe(fp,subframe),
UE_id,is_srs_pos,do_srs,srsConfigIndex,srsPeriodicity,srsOffset);
*/
generate_eNB_ulsch_params_from_dci
(
eNB
,
proc
,
&
dci_alloc
->
dci_pdu
[
0
],
...
...
@@ -849,7 +868,7 @@ void generate_eNB_ulsch_params(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC
0
,
P_RNTI
,
CBA_RNTI
,
0
);
// do_srs
is_srs_pos
);
LOG_T
(
PHY
,
"[eNB %"
PRIu8
"] Frame %d subframe %d : CCE resources for UE spec DCI (PUSCH %"
PRIx16
") => %d
\n
"
,
eNB
->
Mod_id
,
frame
,
subframe
,
dci_alloc
->
rnti
,
...
...
@@ -989,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
,
...
...
@@ -1344,7 +1356,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
// Apply physicalConfigDedicated if needed
// This is for UEs that have received this IE, which changes these DL and UL configuration, we apply after a delay for the eNodeB UL parameters
phy_config_dedicated_eNB_step2
(
eNB
);
// Now loop again over the DCIs for UL configuration
for
(
i
=
0
;
i
<
DCI_pdu
->
Num_common_dci
+
DCI_pdu
->
Num_ue_spec_dci
;
i
++
)
{
dci_alloc
=
&
DCI_pdu
->
dci_alloc
[
i
];
...
...
@@ -2071,7 +2083,7 @@ void prach_procedures(PHY_VARS_eNB *eNB) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PRACH_RX
,
0
);
}
void
pucch_procedures
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
int
UE_id
,
int
harq_pid
)
void
pucch_procedures
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
int
UE_id
,
int
harq_pid
,
uint8_t
do_srs
)
{
LTE_DL_FRAME_PARMS
*
fp
=&
eNB
->
frame_parms
;
uint8_t
SR_payload
=
0
,
*
pucch_payload
=
NULL
,
pucch_payload0
[
2
]
=
{
0
,
0
},
pucch_payload1
[
2
]
=
{
0
,
0
};
...
...
@@ -2150,7 +2162,7 @@ void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq
UE_id
,
eNB
->
scheduling_request_config
[
UE_id
].
sr_PUCCH_ResourceIndex
,
0
,
// n2_pucch
0
,
// shortened format, should be use_srs flag, later
do_srs
,
// shortened format
&
SR_payload
,
frame
,
subframe
,
...
...
@@ -2190,7 +2202,7 @@ void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq
UE_id
,
(
uint16_t
)
n1_pucch0
,
0
,
//n2_pucch
0
,
// shortened format
do_srs
,
// shortened format
pucch_payload0
,
frame
,
subframe
,
...
...
@@ -2220,7 +2232,7 @@ void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq
UE_id
,
eNB
->
scheduling_request_config
[
UE_id
].
sr_PUCCH_ResourceIndex
,
0
,
//n2_pucch
0
,
// shortened format
do_srs
,
// shortened format
pucch_payload0
,
frame
,
subframe
,
...
...
@@ -2281,7 +2293,7 @@ void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq
UE_id
,
eNB
->
scheduling_request_config
[
UE_id
].
sr_PUCCH_ResourceIndex
,
0
,
//n2_pucch
0
,
// shortened format
do_srs
,
// shortened format
pucch_payload0
,
frame
,
subframe
,
...
...
@@ -2313,7 +2325,7 @@ void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq
UE_id
,
(
uint16_t
)
n1_pucch0
,
0
,
// n2_pucch
0
,
// shortened format
do_srs
,
// shortened format
pucch_payload0
,
frame
,
subframe
,
...
...
@@ -2338,7 +2350,7 @@ void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq
UE_id
,
(
uint16_t
)
n1_pucch1
,
0
,
//n2_pucch
0
,
// shortened format
do_srs
,
// shortened format
pucch_payload1
,
frame
,
subframe
,
...
...
@@ -2866,6 +2878,16 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const
const
int
frame
=
proc
->
frame_rx
;
int
offset
=
eNB
->
CC_id
;
//(proc == &eNB->proc.proc_rxtx[0]) ? 0 : 1;
uint16_t
srsPeriodicity
;
uint16_t
srsOffset
;
uint16_t
do_srs
=
0
;
uint16_t
is_srs_pos
=
0
;
T
(
T_ENB_PHY_UL_TICK
,
T_INT
(
eNB
->
Mod_id
),
T_INT
(
frame
),
T_INT
(
subframe
));
T
(
T_ENB_PHY_INPUT_SIGNAL
,
T_INT
(
eNB
->
Mod_id
),
T_INT
(
frame
),
T_INT
(
subframe
),
T_INT
(
0
),
T_BUFFER
(
&
eNB
->
common_vars
.
rxdata
[
0
][
0
][
subframe
*
eNB
->
frame_parms
.
samples_per_tti
],
eNB
->
frame_parms
.
samples_per_tti
*
4
));
if
((
fp
->
frame_type
==
TDD
)
&&
(
subframe_select
(
fp
,
subframe
)
!=
SF_UL
))
return
;
...
...
@@ -2875,19 +2897,12 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const
LOG_D
(
PHY
,
"[eNB %d] Frame %d: Doing phy_procedures_eNB_uespec_RX(%d)
\n
"
,
eNB
->
Mod_id
,
frame
,
subframe
);
#endif
T
(
T_ENB_PHY_UL_TICK
,
T_INT
(
eNB
->
Mod_id
),
T_INT
(
frame
),
T_INT
(
subframe
));
T
(
T_ENB_PHY_INPUT_SIGNAL
,
T_INT
(
eNB
->
Mod_id
),
T_INT
(
frame
),
T_INT
(
subframe
),
T_INT
(
0
),
T_BUFFER
(
&
eNB
->
common_vars
.
rxdata
[
0
][
0
][
subframe
*
eNB
->
frame_parms
.
samples_per_tti
],
eNB
->
frame_parms
.
samples_per_tti
*
4
));
eNB
->
rb_mask_ul
[
0
]
=
0
;
eNB
->
rb_mask_ul
[
1
]
=
0
;
eNB
->
rb_mask_ul
[
2
]
=
0
;
eNB
->
rb_mask_ul
[
3
]
=
0
;
// Check for active processes in current subframe
harq_pid
=
subframe2harq_pid
(
fp
,
frame
,
subframe
);
...
...
@@ -2897,13 +2912,36 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const
eNB
->
cba_last_reception
[
i
]
=
0
;
}
// Do PUCCH processing first
is_srs_pos
=
is_srs_occasion_common
(
fp
,
frame
,
subframe
);
for
(
i
=
0
;
i
<
NUMBER_OF_UE_MAX
;
i
++
)
{
pucch_procedures
(
eNB
,
proc
,
i
,
harq_pid
);
}
for
(
i
=
0
;
i
<
NUMBER_OF_UE_MAX
;
i
++
)
{
// Do SRS processing
// check if there is SRS and we have to use shortened format
// TODO: check for exceptions in transmission of SRS together with ACK/NACK
do_srs
=
0
;
if
(
is_srs_pos
&&
eNB
->
soundingrs_ul_config_dedicated
[
i
].
srsConfigDedicatedSetup
)
{
compute_srs_pos
(
fp
->
frame_type
,
eNB
->
soundingrs_ul_config_dedicated
[
i
].
srs_ConfigIndex
,
&
srsPeriodicity
,
&
srsOffset
);
if
(((
10
*
frame
+
subframe
)
%
srsPeriodicity
)
==
srsOffset
)
{
do_srs
=
1
;
}
}
if
(
do_srs
==
1
)
{
if
(
lte_srs_channel_estimation
(
fp
,
&
eNB
->
common_vars
,
&
eNB
->
srs_vars
[
i
],
&
eNB
->
soundingrs_ul_config_dedicated
[
i
],
subframe
,
0
/*eNB_id*/
))
{
LOG_E
(
PHY
,
"problem processing SRS
\n
"
);
}
}
// Do PUCCH processing
pucch_procedures
(
eNB
,
proc
,
i
,
harq_pid
,
do_srs
);
// check for Msg3
if
(
eNB
->
mac_enabled
==
1
)
{
...
...
This diff is collapsed.
Click to expand it.
openair1/SCHED/phy_procedures_lte_ue.c
View file @
b8c43654
...
...
@@ -259,7 +259,6 @@ 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
);
}
void
phy_reset_ue
(
uint8_t
Mod_id
,
uint8_t
CC_id
,
uint8_t
eNB_index
)
{
...
...
@@ -416,7 +415,9 @@ uint8_t is_cqi_TXOp(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id)
// cqirep->cqi_PMI_ConfigIndex,
// (((10*frame + subframe) % cqirep->Npd) == cqirep->N_OFFSET_CQI));
if
(((
10
*
frame
+
subframe
)
%
cqirep
->
Npd
)
==
cqirep
->
N_OFFSET_CQI
)
if
(
cqirep
->
cqi_PMI_ConfigIndex
==-
1
)
return
(
0
);
else
if
(((
10
*
frame
+
subframe
)
%
cqirep
->
Npd
)
==
cqirep
->
N_OFFSET_CQI
)
return
(
1
);
else
return
(
0
);
...
...
@@ -435,170 +436,34 @@ uint8_t is_ri_TXOp(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id)
// ue->Mod_id,ue->pdcch_vars[eNB_id]->crnti,frame,subframe,
// cqirep->ri_ConfigIndex,
// (((10*frame + subframe + cqirep->N_OFFSET_CQI - N_OFFSET_RI) % (cqirep->Npd<<log2Mri)) == 0));
if
(((
10
*
frame
+
subframe
+
cqirep
->
N_OFFSET_CQI
-
N_OFFSET_RI
)
%
(
cqirep
->
Npd
<<
log2Mri
))
==
0
)
if
(
cqirep
->
ri_ConfigIndex
==-
1
)
return
(
0
);
else
if
(((
10
*
frame
+
subframe
+
cqirep
->
N_OFFSET_CQI
-
N_OFFSET_RI
)
%
(
cqirep
->
Npd
<<
log2Mri
))
==
0
)
return
(
1
);
else
return
(
0
);
}
void
compute_srs_pos
(
lte_frame_type_t
frameType
,
uint16_t
isrs
,
uint16_t
*
psrsPeriodicity
,
uint16_t
*
psrsOffset
)
{
if
(
TDD
==
frameType
)
{
if
(
isrs
<
10
)
{
mac_xface
->
macphy_exit
(
"2 ms SRS periodicity not supported"
);
}
if
((
isrs
>
9
)
&&
(
isrs
<
15
))
{
*
psrsPeriodicity
=
5
;
*
psrsOffset
=
isrs
-
10
;
}
if
((
isrs
>
14
)
&&
(
isrs
<
25
))
{
*
psrsPeriodicity
=
10
;
*
psrsOffset
=
isrs
-
15
;
}
if
((
isrs
>
24
)
&&
(
isrs
<
45
))
{
*
psrsPeriodicity
=
20
;
*
psrsOffset
=
isrs
-
25
;
}
if
((
isrs
>
44
)
&&
(
isrs
<
85
))
{
*
psrsPeriodicity
=
40
;
*
psrsOffset
=
isrs
-
45
;
}
if
((
isrs
>
84
)
&&
(
isrs
<
165
))
{
*
psrsPeriodicity
=
80
;
*
psrsOffset
=
isrs
-
85
;
}
if
((
isrs
>
164
)
&&
(
isrs
<
325
))
{
*
psrsPeriodicity
=
160
;
*
psrsOffset
=
isrs
-
165
;
}
if
((
isrs
>
324
)
&&
(
isrs
<
645
))
{
*
psrsPeriodicity
=
320
;
*
psrsOffset
=
isrs
-
325
;
}
if
(
isrs
>
644
)
{
mac_xface
->
macphy_exit
(
"Isrs out of range"
);
}
}
else
{
if
(
isrs
<
2
)
{
*
psrsPeriodicity
=
2
;
*
psrsOffset
=
isrs
;
}
if
((
isrs
>
1
)
&&
(
isrs
<
7
))
{
*
psrsPeriodicity
=
5
;
*
psrsOffset
=
isrs
-
2
;
}
if
((
isrs
>
6
)
&&
(
isrs
<
17
))
{
*
psrsPeriodicity
=
10
;
*
psrsOffset
=
isrs
-
7
;
}
if
((
isrs
>
16
)
&&
(
isrs
<
37
))
{
*
psrsPeriodicity
=
20
;
*
psrsOffset
=
isrs
-
17
;
}
if
((
isrs
>
36
)
&&
(
isrs
<
77
))
{
*
psrsPeriodicity
=
40
;
*
psrsOffset
=
isrs
-
37
;
}
if
((
isrs
>
76
)
&&
(
isrs
<
157
))
{
*
psrsPeriodicity
=
80
;
*
psrsOffset
=
isrs
-
77
;
}
if
((
isrs
>
156
)
&&
(
isrs
<
317
))
{
*
psrsPeriodicity
=
160
;
*
psrsOffset
=
isrs
-
157
;
}
if
((
isrs
>
316
)
&&
(
isrs
<
637
))
{
*
psrsPeriodicity
=
320
;
*
psrsOffset
=
isrs
-
317
;
}
if
(
isrs
>
636
)
{
mac_xface
->
macphy_exit
(
"Isrs out of range"
);
}
}
}
void
ue_compute_srs_occasion
(
PHY_VARS_UE
*
ue
,
UE_rxtx_proc_t
*
proc
,
uint8_t
eNB_id
)
void
ue_compute_srs_occasion
(
PHY_VARS_UE
*
ue
,
UE_rxtx_proc_t
*
proc
,
uint8_t
eNB_id
,
uint8_t
isSubframeSRS
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
int
frame_tx
=
proc
->
frame_tx
;
int
subframe_tx
=
proc
->
sub
frame_tx
;
uint8_t
isSubframeSRS
=
0
;
// SRS Cell Occasion
uint8_t
is_pucch2_subframe
=
0
;
uint8_t
is_sr_an_subframe
=
0
;
SOUNDINGRS_UL_CONFIG_DEDICATED
*
pSoundingrs_ul_config_dedicated
=&
ue
->
soundingrs_ul_config_dedicated
[
eNB_id
]
;
LTE_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
int
frame_tx
=
proc
->
frame_tx
;
int
subframe_tx
=
proc
->
subframe_tx
;
SOUNDINGRS_UL_CONFIG_DEDICATED
*
pSoundingrs_ul_config_dedicated
=&
ue
->
soundingrs_ul_config_dedicated
[
eNB_id
];
uint16_t
srsPeriodicity
;
uint16_t
srsOffset
;
uint8_t
is_pucch2_subframe
=
0
;
uint8_t
is_sr_an_subframe
=
0
;
// check for SRS opportunity
pSoundingrs_ul_config_dedicated
->
srsUeSubframe
=
0
;
pSoundingrs_ul_config_dedicated
->
srsCellSubframe
=
0
;
pSoundingrs_ul_config_dedicated
->
srsCellSubframe
=
isSubframeSRS
;
ue
->
ulsch
[
eNB_id
]
->
srs_active
=
0
;
ue
->
ulsch
[
eNB_id
]
->
Nsymb_pusch
=
12
-
(
frame_parms
->
Ncp
<<
1
)
-
ue
->
ulsch
[
eNB_id
]
->
srs_active
;
if
(
frame_parms
->
soundingrs_ul_config_common
.
enabled_flag
)
{
LOG_D
(
PHY
,
" SRS SUBFRAMECONFIG: %d, Isrs: %d
\n
"
,
frame_parms
->
soundingrs_ul_config_common
.
srs_SubframeConfig
,
pSoundingrs_ul_config_dedicated
->
srs_ConfigIndex
);
uint8_t
TSFC
;
uint16_t
deltaTSFC
;
// bitmap
uint8_t
srs_SubframeConfig
;
uint16_t
srsPeriodicity
;
uint16_t
srsOffset
;
// table resuming TSFC (Period) and deltaSFC (offset)
const
uint16_t
deltaTSFCTabType1
[
15
][
2
]
=
{
{
1
,
1
},{
1
,
2
},{
2
,
2
},{
1
,
5
},{
2
,
5
},{
4
,
5
},{
8
,
5
},{
3
,
5
},{
12
,
5
},{
1
,
10
},{
2
,
10
},{
4
,
10
},{
8
,
10
},{
351
,
10
},{
383
,
10
}
};
// Table 5.5.3.3-2 3GPP 36.211 FDD
const
uint16_t
deltaTSFCTabType2
[
14
][
2
]
=
{
{
2
,
5
},{
6
,
5
},{
10
,
5
},{
18
,
5
},{
14
,
5
},{
22
,
5
},{
26
,
5
},{
30
,
5
},{
70
,
10
},{
74
,
10
},{
194
,
10
},{
326
,
10
},{
586
,
10
},{
210
,
10
}
};
// Table 5.5.3.3-2 3GPP 36.211 TDD
srs_SubframeConfig
=
frame_parms
->
soundingrs_ul_config_common
.
srs_SubframeConfig
;
if
(
FDD
==
frame_parms
->
frame_type
)
{
// srs_SubframeConfig =< 14
deltaTSFC
=
deltaTSFCTabType1
[
srs_SubframeConfig
][
0
];
TSFC
=
deltaTSFCTabType1
[
srs_SubframeConfig
][
1
];
}
else
{
// srs_SubframeConfig =< 13
deltaTSFC
=
deltaTSFCTabType2
[
srs_SubframeConfig
][
0
];
TSFC
=
deltaTSFCTabType2
[
srs_SubframeConfig
][
1
];
}
// Sounding reference signal subframes are the subframes satisfying ns/2 mod TSFC (- deltaTSFC
uint16_t
tmp
=
(
subframe_tx
%
TSFC
);
if
((
1
<<
tmp
)
&
deltaTSFC
)
{
// This is a Sounding reference signal subframes
isSubframeSRS
=
1
;
pSoundingrs_ul_config_dedicated
->
srsCellSubframe
=
1
;
}
LOG_D
(
PHY
,
" ISTDD: %d, TSFC: %d, deltaTSFC: %d, AbsSubframeTX: %d.%d, srsCellSubframe: %d
\n
"
,
frame_parms
->
frame_type
,
TSFC
,
deltaTSFC
,
frame_tx
,
subframe_tx
,
pSoundingrs_ul_config_dedicated
->
srsCellSubframe
);
LOG_D
(
PHY
,
" SrsDedicatedSetup: %d
\n
"
,
pSoundingrs_ul_config_dedicated
->
srsConfigDedicatedSetup
);
if
(
isSubframeSRS
)
{
LOG_D
(
PHY
,
" SrsDedicatedSetup: %d
\n
"
,
pSoundingrs_ul_config_dedicated
->
srsConfigDedicatedSetup
);
if
(
pSoundingrs_ul_config_dedicated
->
srsConfigDedicatedSetup
)
{
compute_srs_pos
(
frame_parms
->
frame_type
,
pSoundingrs_ul_config_dedicated
->
srs_ConfigIndex
,
&
srsPeriodicity
,
&
srsOffset
);
...
...
@@ -673,6 +538,7 @@ void ue_compute_srs_occasion(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id
}
}
void
get_cqipmiri_params
(
PHY_VARS_UE
*
ue
,
uint8_t
eNB_id
)
{
...
...
@@ -1732,7 +1598,13 @@ void ue_srs_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8
nb_rb_srs
,
tx_amp
);
generate_srs_tx
(
ue
,
eNB_id
,
tx_amp
,
subframe_tx
);
uint16_t
nsymb
=
(
ue
->
frame_parms
.
Ncp
==
0
)
?
14
:
12
;
uint16_t
symbol_offset
=
(
int
)
ue
->
frame_parms
.
ofdm_symbol_size
*
((
subframe_tx
*
nsymb
)
+
(
nsymb
-
1
));
generate_srs
(
&
ue
->
frame_parms
,
&
ue
->
soundingrs_ul_config_dedicated
[
eNB_id
],
&
ue
->
common_vars
.
txdataF
[
eNB_id
][
symbol_offset
],
tx_amp
,
subframe_tx
);
}
}
...
...
@@ -2144,9 +2016,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,ui
int
subframe_tx
=
proc
->
subframe_tx
;
int
frame_tx
=
proc
->
frame_tx
;
unsigned
int
aa
;
uint8_t
isSubframeSRS
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX
,
VCD_FUNCTION_IN
);
...
...
@@ -2174,7 +2044,9 @@ void phy_procedures_UE_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,ui
if
(
ue
->
UE_mode
[
eNB_id
]
!=
PRACH
)
{
// check cell srs subframe and ue srs subframe. This has an impact on pusch encoding
ue_compute_srs_occasion
(
ue
,
proc
,
eNB_id
);
isSubframeSRS
=
is_srs_occasion_common
(
&
ue
->
frame_parms
,
proc
->
frame_tx
,
proc
->
subframe_tx
);
ue_compute_srs_occasion
(
ue
,
proc
,
eNB_id
,
isSubframeSRS
);
ue_ulsch_uespec_procedures
(
ue
,
proc
,
eNB_id
,
abstraction_flag
);
...
...
This diff is collapsed.
Click to expand it.
openair1/SIMULATION/LTE_PHY/ulsim.c
View file @
b8c43654
...
...
@@ -42,6 +42,7 @@
#include "SCHED/vars.h"
#include "LAYER2/MAC/vars.h"
#include "OCG_vars.h"
#include "intertask_interface_init.h"
#include "unitary_defs.h"
...
...
@@ -285,8 +286,15 @@ int main(int argc, char **argv)
printf
(
"Detected cpu_freq %f GHz
\n
"
,
cpu_freq_GHz
);
logInit
();
/*
// enable these lines if you need debug info
// however itti will catch all signals, so ctrl-c won't work anymore
// alternatively you can disable ITTI completely in CMakeLists.txt
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, NULL);
set_comp_log(PHY,LOG_DEBUG,LOG_MED,1);
set_glog(LOG_DEBUG,LOG_MED);
*/
while
((
c
=
getopt
(
argc
,
argv
,
"hapZEbm:n:Y:X:x:s:w:e:q:d:D:O:c:r:i:f:y:c:oA:C:R:g:N:l:S:T:QB:PI:LF"
))
!=
-
1
)
{
switch
(
c
)
{
...
...
@@ -568,6 +576,11 @@ int main(int argc, char **argv)
osf
,
0
);
// for a call to phy_reset_ue later we need PHY_vars_UE_g allocated and pointing to UE
PHY_vars_UE_g
=
(
PHY_VARS_UE
***
)
malloc
(
sizeof
(
PHY_VARS_UE
**
));
PHY_vars_UE_g
[
0
]
=
(
PHY_VARS_UE
**
)
malloc
(
sizeof
(
PHY_VARS_UE
*
));
PHY_vars_UE_g
[
0
][
0
]
=
UE
;
if
(
nb_rb_set
==
0
)
nb_rb
=
eNB
->
frame_parms
.
N_RB_UL
;
...
...
@@ -582,8 +595,6 @@ int main(int argc, char **argv)
txdata
=
UE
->
common_vars
.
txdata
;
nsymb
=
(
eNB
->
frame_parms
.
Ncp
==
NORMAL
)
?
14
:
12
;
...
...
@@ -634,21 +645,29 @@ int main(int argc, char **argv)
UE
->
pdcch_vars
[
0
][
0
]
->
crnti
=
14
;
UE
->
frame_parms
.
soundingrs_ul_config_common
.
enabled_flag
=
srs_flag
;
UE
->
frame_parms
.
soundingrs_ul_config_common
.
srs_BandwidthConfig
=
2
;
UE
->
frame_parms
.
soundingrs_ul_config_common
.
srs_SubframeConfig
=
7
;
UE
->
frame_parms
.
soundingrs_ul_config_common
.
srs_SubframeConfig
=
3
;
UE
->
soundingrs_ul_config_dedicated
[
eNB_id
].
srsConfigDedicatedSetup
=
srs_flag
;
UE
->
soundingrs_ul_config_dedicated
[
eNB_id
].
duration
=
1
;
UE
->
soundingrs_ul_config_dedicated
[
eNB_id
].
srs_ConfigIndex
=
2
;
UE
->
soundingrs_ul_config_dedicated
[
eNB_id
].
srs_Bandwidth
=
0
;
UE
->
soundingrs_ul_config_dedicated
[
eNB_id
].
transmissionComb
=
0
;
UE
->
soundingrs_ul_config_dedicated
[
eNB_id
].
freqDomainPosition
=
0
;
UE
->
soundingrs_ul_config_dedicated
[
eNB_id
].
cyclicShift
=
0
;
eNB
->
frame_parms
.
soundingrs_ul_config_common
.
enabled_flag
=
srs_flag
;
eNB
->
frame_parms
.
soundingrs_ul_config_common
.
srs_BandwidthConfig
=
2
;
eNB
->
frame_parms
.
soundingrs_ul_config_common
.
srs_SubframeConfig
=
7
;
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
srs_ConfigIndex
=
1
;
eNB
->
frame_parms
.
soundingrs_ul_config_common
.
srs_SubframeConfig
=
3
;
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
srsConfigDedicatedSetup
=
srs_flag
;
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
duration
=
1
;
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
srs_ConfigIndex
=
2
;
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
srs_Bandwidth
=
0
;
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
transmissionComb
=
0
;
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
freqDomainPosition
=
0
;
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
cyclicShift
=
0
;
eNB
->
cooperation_flag
=
cooperation_flag
;
// eNB->eNB_UE_stats[0].SRS_parameters = UE->SRS_parameters;
eNB
->
pusch_config_dedicated
[
UE_id
].
betaOffset_ACK_Index
=
beta_ACK
;
eNB
->
pusch_config_dedicated
[
UE_id
].
betaOffset_RI_Index
=
beta_RI
;
...
...
@@ -659,6 +678,11 @@ int main(int argc, char **argv)
UE
->
ul_power_control_dedicated
[
eNB_id
].
deltaMCS_Enabled
=
1
;
// disable periodic cqi/ri reporting
UE
->
cqi_report_config
[
eNB_id
].
CQI_ReportPeriodic
.
ri_ConfigIndex
=
-
1
;
UE
->
cqi_report_config
[
eNB_id
].
CQI_ReportPeriodic
.
cqi_PMI_ConfigIndex
=
-
1
;
printf
(
"PUSCH Beta : ACK %f, RI %f, CQI %f
\n
"
,(
double
)
beta_ack
[
beta_ACK
]
/
8
,(
double
)
beta_ri
[
beta_RI
]
/
8
,(
double
)
beta_cqi
[
beta_CQI
]
/
8
);
UE2eNB
=
new_channel_desc_scm
(
eNB
->
frame_parms
.
nb_antennas_tx
,
...
...
@@ -700,8 +724,8 @@ int main(int argc, char **argv)
}
UE
->
dlsch_SI
[
0
]
=
new_ue_dlsch
(
1
,
1
,
1827072
,
MAX_TURBO_ITERATIONS
,
N_RB_DL
,
0
);
UE
->
dlsch_ra
[
0
]
=
new_ue_dlsch
(
1
,
1
,
1827072
,
MAX_TURBO_ITERATIONS
,
N_RB_DL
,
0
);
UE
->
measurements
.
rank
[
0
]
=
0
;
UE
->
transmission_mode
[
0
]
=
2
;
...
...
@@ -917,6 +941,10 @@ int main(int argc, char **argv)
initialize
(
&
time_vector_rx_dec
);
ndi
=
0
;
phy_reset_ue
(
0
,
0
,
0
);
UE
->
UE_mode
[
eNB_id
]
=
PUSCH
;
for
(
trials
=
0
;
trials
<
n_frames
;
trials
++
)
{
// printf("*");
// UE->frame++;
...
...
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/enb_config.c
View file @
b8c43654
...
...
@@ -427,7 +427,7 @@ void enb_config_display(void)
if
(
enb_properties
.
properties
[
i
]
->
srs_enable
[
j
])
{
printf
(
"
\t
srs_BandwidthConfig for CC %d:
\t
%ld:
\n
"
,
j
,
enb_properties
.
properties
[
i
]
->
srs_BandwidthConfig
[
j
]);
printf
(
"
\t
srs_
Bandwidth
Config for CC %d:
\t
%ld:
\n
"
,
j
,
enb_properties
.
properties
[
i
]
->
srs_SubframeConfig
[
j
]);
printf
(
"
\t
srs_
Subframe
Config for CC %d:
\t
%ld:
\n
"
,
j
,
enb_properties
.
properties
[
i
]
->
srs_SubframeConfig
[
j
]);
printf
(
"
\t
srs_ackNackST for CC %d:
\t
%d:
\n
"
,
j
,
enb_properties
.
properties
[
i
]
->
srs_ackNackST
[
j
]);
printf
(
"
\t
srs_MaxUpPts for CC %d:
\t
%d:
\n
"
,
j
,
enb_properties
.
properties
[
i
]
->
srs_MaxUpPts
[
j
]);
}
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/eNB_scheduler.c
View file @
b8c43654
...
...
@@ -383,10 +383,10 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
if
(
mac_xface
->
frame_parms
->
frame_type
==
FDD
)
{
//FDD
schedule_ulsch
(
module_idP
,
frameP
,
cooperation_flag
,
0
,
4
);
//,calibration_flag);
}
else
if
((
mac_xface
->
frame_parms
->
tdd_config
==
TDD
)
||
//TDD
}
else
if
((
mac_xface
->
frame_parms
->
tdd_config
==
0
)
||
//TDD
(
mac_xface
->
frame_parms
->
tdd_config
==
3
)
||
(
mac_xface
->
frame_parms
->
tdd_config
==
6
))
{
//
schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,4);//,calibration_flag);
schedule_ulsch
(
module_idP
,
frameP
,
cooperation_flag
,
subframeP
,
4
);
//,calibration_flag);
}
#ifndef FLEXRAN_AGENT_SB_IF
schedule_ue_spec
(
module_idP
,
frameP
,
subframeP
,
mbsfn_status
);
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
View file @
b8c43654
...
...
@@ -885,7 +885,7 @@ abort();
rb_table_index
=
UE_template
->
pre_allocated_rb_table_index_ul
;
}
else
{
mcs
=
10
;
//cmin (10, openair_daq_vars.target_ue_ul_mcs);
rb_table_index
=
5
;
// for PHR
rb_table_index
=
13
;
// for PHR
}
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
ulsch_mcs2
=
mcs
;
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/LITE/MESSAGES/asn1_msg.c
View file @
b8c43654
...
...
@@ -99,7 +99,7 @@ int errno;
# endif
#endif
//
#define XER_PRINT
#define XER_PRINT
extern
Enb_properties_array_t
enb_properties
;
typedef
struct
xer_sprint_string_s
{
...
...
@@ -1593,8 +1593,33 @@ do_RRCConnectionSetup(
SoundingRS_UL_ConfigDedicated__setup__srs_HoppingBandwidth_hbw0
;
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
freqDomainPosition
=
0
;
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
duration
=
1
;
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_ConfigIndex
=
45
;
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
transmissionComb
=
0
;
if
(
frame_parms
->
frame_type
==
FDD
)
{
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
>=
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
=
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
]
!=
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 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
=
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
,
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_ConfigIndex
,
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
transmissionComb
);
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
cyclicShift
=
SoundingRS_UL_ConfigDedicated__setup__cyclicShift_cs0
;
}
...
...
This diff is collapsed.
Click to expand it.
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpb210.conf
View file @
b8c43654
...
...
@@ -62,11 +62,11 @@ eNBs =
pusch_nDMRS1
=
1
;
phich_duration
=
"NORMAL"
;
phich_resource
=
"ONESIXTH"
;
srs_enable
=
"
DIS
ABLE"
;
/*
srs_BandwidthConfig
=
;
srs_SubframeConfig
=;
srs_ackNackST
=;
srs_MaxUpPts
=
;*/
srs_enable
=
"
EN
ABLE"
;
srs_BandwidthConfig
=
2
;
srs_SubframeConfig
=
7
;
srs_ackNackST
=
"DISABLE"
;
srs_MaxUpPts
=
"DISABLE"
;
pusch_p0_Nominal
= -
90
;
pusch_alpha
=
"AL1"
;
...
...
This diff is collapsed.
Click to expand it.
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf
View file @
b8c43654
...
...
@@ -17,7 +17,7 @@ eNBs =
mobile_country_code
=
"208"
;
mobile_network_code
=
"9
4
"
;
mobile_network_code
=
"9
2
"
;
//////////
Physical
parameters
:
...
...
@@ -63,10 +63,10 @@ eNBs =
phich_duration
=
"NORMAL"
;
phich_resource
=
"ONESIXTH"
;
srs_enable
=
"DISABLE"
;
/*
srs_BandwidthConfig
=
;
srs_SubframeConfig
=;
srs_ackNackST
=;
srs_MaxUpPts
=
;*/
srs_BandwidthConfig
=
2
;
srs_SubframeConfig
=
0
;
srs_ackNackST
=
"DISABLE"
;
srs_MaxUpPts
=
"DISABLE"
;
pusch_p0_Nominal
= -
90
;
pusch_alpha
=
"AL1"
;
...
...
@@ -137,7 +137,7 @@ eNBs =
//////////
MME
parameters
:
mme_ip_address
= ( {
ipv4
=
"192.168.12.
70
"
;
mme_ip_address
= ( {
ipv4
=
"192.168.12.
26
"
;
ipv6
=
"192:168:30::17"
;
active
=
"yes"
;
preference
=
"ipv4"
;
...
...
@@ -147,10 +147,10 @@ eNBs =
NETWORK_INTERFACES
:
{
ENB_INTERFACE_NAME_FOR_S1_MME
=
"eth
1
"
;
ENB_IPV4_ADDRESS_FOR_S1_MME
=
"192.168.12.
147
/24"
;
ENB_INTERFACE_NAME_FOR_S1U
=
"eth
1
"
;
ENB_IPV4_ADDRESS_FOR_S1U
=
"192.168.12.
147
/24"
;
ENB_INTERFACE_NAME_FOR_S1_MME
=
"eth
6
"
;
ENB_IPV4_ADDRESS_FOR_S1_MME
=
"192.168.12.
82
/24"
;
ENB_INTERFACE_NAME_FOR_S1U
=
"eth
6
"
;
ENB_IPV4_ADDRESS_FOR_S1U
=
"192.168.12.
82
/24"
;
ENB_PORT_FOR_S1U
=
2152
;
# Spec 2152
};
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment