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
zzha zzha
OpenXG-RAN
Commits
bd8344b4
Commit
bd8344b4
authored
Oct 18, 2016
by
hbilel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '36-srs-feature-development' into develop1B
parents
2509847a
9938bd5d
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
488 additions
and
66 deletions
+488
-66
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-0
openair1/PHY/INIT/lte_init.c
openair1/PHY/INIT/lte_init.c
+42
-0
openair1/PHY/LTE_TRANSPORT/dci.c
openair1/PHY/LTE_TRANSPORT/dci.c
+1
-1
openair1/PHY/LTE_TRANSPORT/defs.h
openair1/PHY/LTE_TRANSPORT/defs.h
+2
-0
openair1/PHY/LTE_TRANSPORT/group_hopping.c
openair1/PHY/LTE_TRANSPORT/group_hopping.c
+6
-0
openair1/PHY/LTE_TRANSPORT/srs_modulation.c
openair1/PHY/LTE_TRANSPORT/srs_modulation.c
+28
-40
openair1/PHY/extern.h
openair1/PHY/extern.h
+12
-0
openair1/PHY/impl_defs_lte.h
openair1/PHY/impl_defs_lte.h
+11
-0
openair1/SCHED/Makefile.inc
openair1/SCHED/Makefile.inc
+1
-0
openair1/SCHED/defs.h
openair1/SCHED/defs.h
+9
-0
openair1/SCHED/phy_procedures_lte_ue.c
openair1/SCHED/phy_procedures_lte_ue.c
+251
-7
openair1/SCHED/srs_pc.c
openair1/SCHED/srs_pc.c
+108
-0
openair2/RRC/LITE/MESSAGES/asn1_msg.c
openair2/RRC/LITE/MESSAGES/asn1_msg.c
+8
-10
openair2/RRC/LITE/rrc_eNB.c
openair2/RRC/LITE/rrc_eNB.c
+1
-1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.generic.oaisim.local_no_mme.conf
...E-EPC/CONF/enb.band7.tm1.generic.oaisim.local_no_mme.conf
+5
-5
targets/SIMU/USER/oaisim_functions.c
targets/SIMU/USER/oaisim_functions.c
+2
-2
No files found.
cmake_targets/CMakeLists.txt
View file @
bd8344b4
...
...
@@ -931,6 +931,7 @@ set(SCHED_SRC
${
OPENAIR1_DIR
}
/SCHED/phy_mac_stub.c
${
OPENAIR1_DIR
}
/SCHED/pucch_pc.c
${
OPENAIR1_DIR
}
/SCHED/pusch_pc.c
${
OPENAIR1_DIR
}
/SCHED/srs_pc.c
)
add_library
(
SCHED_LIB
${
SCHED_SRC
}
)
...
...
openair1/PHY/INIT/lte_init.c
View file @
bd8344b4
...
...
@@ -489,6 +489,26 @@ void phy_config_dedicated_eNB_step2(PHY_VARS_eNB *eNB)
}
if
(
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
)
{
if
(
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
present
==
SchedulingRequestConfig_PR_setup
)
{
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
;
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
srs_Bandwidth
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_Bandwidth
;
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
srs_ConfigIndex
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_ConfigIndex
;
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
srs_HoppingBandwidth
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_HoppingBandwidth
;
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
transmissionComb
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
transmissionComb
;
LOG_D
(
PHY
,
"soundingrs_ul_config_dedicated.srs_ConfigIndex %d
\n
"
,
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
srs_ConfigIndex
);
}
LOG_D
(
PHY
,
"------------------------------------------------------------
\n
"
);
}
eNB
->
physicalConfigDedicated
[
UE_id
]
=
NULL
;
}
}
...
...
@@ -859,6 +879,28 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,
}
if
(
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
)
{
phy_vars_ue
->
soundingrs_ul_config_dedicated
[
eNB_id
].
srsConfigDedicatedSetup
=
0
;
if
(
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
present
==
SchedulingRequestConfig_PR_setup
)
{
phy_vars_ue
->
soundingrs_ul_config_dedicated
[
eNB_id
].
srsConfigDedicatedSetup
=
1
;
phy_vars_ue
->
soundingrs_ul_config_dedicated
[
eNB_id
].
duration
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
duration
;
phy_vars_ue
->
soundingrs_ul_config_dedicated
[
eNB_id
].
cyclicShift
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
cyclicShift
;
phy_vars_ue
->
soundingrs_ul_config_dedicated
[
eNB_id
].
freqDomainPosition
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
freqDomainPosition
;
phy_vars_ue
->
soundingrs_ul_config_dedicated
[
eNB_id
].
srs_Bandwidth
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_Bandwidth
;
phy_vars_ue
->
soundingrs_ul_config_dedicated
[
eNB_id
].
srs_ConfigIndex
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_ConfigIndex
;
phy_vars_ue
->
soundingrs_ul_config_dedicated
[
eNB_id
].
srs_HoppingBandwidth
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_HoppingBandwidth
;
phy_vars_ue
->
soundingrs_ul_config_dedicated
[
eNB_id
].
transmissionComb
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
transmissionComb
;
LOG_D
(
PHY
,
"soundingrs_ul_config_dedicated.srs_ConfigIndex %d
\n
"
,
phy_vars_ue
->
soundingrs_ul_config_dedicated
[
eNB_id
].
srs_ConfigIndex
);
}
LOG_D
(
PHY
,
"------------------------------------------------------------
\n
"
);
}
#ifdef CBA
if
(
physicalConfigDedicated
->
pusch_CBAConfigDedicated_vlola
)
{
...
...
openair1/PHY/LTE_TRANSPORT/dci.c
View file @
bd8344b4
...
...
@@ -2865,7 +2865,7 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars,
}
}
LOG_D
(
PHY
,
"DCI decoding CRNTI [format
_c: %d, nCCE[subframe: %d]: %d ]
\n
"
,
format_c
,
subframe
,
pdcch_vars
[
eNB_id
]
->
nCCE
[
subframe
]
);
LOG_D
(
PHY
,
"DCI decoding CRNTI [format
: %d, nCCE[subframe: %d]: %d ], AggregationLevel %d
\n
"
,
format_c
,
subframe
,
pdcch_vars
[
eNB_id
]
->
nCCE
[
subframe
],
L2
);
// memcpy(&dci_alloc[*dci_cnt].dci_pdu[0],dci_decoded_output,sizeof_bytes);
...
...
openair1/PHY/LTE_TRANSPORT/defs.h
View file @
bd8344b4
...
...
@@ -341,6 +341,8 @@ typedef struct {
int16_t
Po_PUSCH
;
/// PHR - current power headroom (based on last PUSCH transmission)
int16_t
PHR
;
/// Po_SRS - target output power for SRS
int16_t
Po_SRS
;
/// num active cba group
uint8_t
num_active_cba_groups
;
/// num dci found for cba
...
...
openair1/PHY/LTE_TRANSPORT/group_hopping.c
View file @
bd8344b4
...
...
@@ -50,6 +50,8 @@ void generate_grouphop(LTE_DL_FRAME_PARMS *frame_parms)
// This is from Section 5.5.1.3
uint32_t
fss_pusch
=
frame_parms
->
Nid_cell
+
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
groupAssignmentPUSCH
;
uint32_t
fss_pucch
=
frame_parms
->
Nid_cell
;
x2
=
frame_parms
->
Nid_cell
/
30
;
#ifdef DEBUG_GROUPHOP
printf
(
"[PHY] GroupHop:"
);
...
...
@@ -57,7 +59,10 @@ void generate_grouphop(LTE_DL_FRAME_PARMS *frame_parms)
for
(
ns
=
0
;
ns
<
20
;
ns
++
)
{
if
(
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
groupHoppingEnabled
==
0
)
{
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
grouphop
[
ns
]
=
fss_pusch
%
30
;
frame_parms
->
pucch_config_common
.
grouphop
[
ns
]
=
fss_pucch
%
30
;
}
else
{
if
((
ns
&
3
)
==
0
)
{
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
...
...
@@ -65,6 +70,7 @@ void generate_grouphop(LTE_DL_FRAME_PARMS *frame_parms)
}
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
grouphop
[
ns
]
=
(((
uint8_t
*
)
&
s
)[
ns
&
3
]
+
fss_pusch
)
%
30
;
frame_parms
->
pucch_config_common
.
grouphop
[
ns
]
=
(((
uint8_t
*
)
&
s
)[
ns
&
3
]
+
fss_pucch
)
%
30
;
}
#ifdef DEBUG_GROUPHOP
...
...
openair1/PHY/LTE_TRANSPORT/srs_modulation.c
View file @
bd8344b4
...
...
@@ -137,11 +137,10 @@ int32_t generate_srs_tx(PHY_VARS_UE *ue,
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
[
0
]
;
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
*
Msc_idx_ptr
;
int32_t
k0
;
uint32_t
T_SFC
;
uint32_t
subframe_offset
;
uint8_t
Bsrs
=
soundingrs_ul_config_dedicated
->
srs_Bandwidth
;
uint8_t
Csrs
=
frame_parms
->
soundingrs_ul_config_common
.
srs_BandwidthConfig
;
...
...
@@ -149,6 +148,16 @@ int32_t generate_srs_tx(PHY_VARS_UE *ue,
uint8_t
n_RRC
=
soundingrs_ul_config_dedicated
->
freqDomainPosition
;
uint8_t
kTC
=
soundingrs_ul_config_dedicated
->
transmissionComb
;
// u is the PUCCH sequence-group number defined in Section 5.5.1.3
// ν is the base sequence number defined in Section 5.5.1.4
uint32_t
u
=
frame_parms
->
pucch_config_common
.
grouphop
[
1
+
(
subframe
<<
1
)];;
uint32_t
v
=
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
seqhop
[
1
+
(
subframe
<<
1
)];
LOG_D
(
PHY
,
"SRS root sequence: u %d, v %d
\n
"
,
u
,
v
);
LOG_D
(
PHY
,
"CommonSrsConfig: Csrs %d, Ssrs %d, AnSrsSimultan %d
\n
"
,
Csrs
,
Ssrs
,
frame_parms
->
soundingrs_ul_config_common
.
ackNackSRS_SimultaneousTransmission
);
LOG_D
(
PHY
,
"DedicatedSrsConfig: Bsrs %d, bhop %d, nRRC %d, Isrs %d, kTC %d, n_SRS %d
\n
"
,
Bsrs
,
soundingrs_ul_config_dedicated
->
srs_HoppingBandwidth
,
n_RRC
,
soundingrs_ul_config_dedicated
->
srs_ConfigIndex
,
kTC
,
soundingrs_ul_config_dedicated
->
cyclicShift
);
if
(
frame_parms
->
N_RB_UL
<
41
)
{
msrs0
=
msrsb_6_40
[
Csrs
][
0
];
...
...
@@ -169,7 +178,7 @@ int32_t generate_srs_tx(PHY_VARS_UE *ue,
}
Msc_RS
=
msrsb
*
6
;
k0
=
(
((
frame_parms
->
N_RB_UL
>>
1
)
-
(
msrs0
>>
1
))
*
12
)
+
kTC
;
k0
=
(
(
(
int16_t
)(
frame_parms
->
N_RB_UL
>>
1
)
-
(
int16_t
)(
msrs0
>>
1
)
)
*
12
)
+
kTC
;
nb
=
(
4
*
n_RRC
/
msrsb
)
%
Nb
;
for
(
b
=
0
;
b
<=
Bsrs
;
b
++
)
{
...
...
@@ -208,53 +217,32 @@ int32_t generate_srs_tx(PHY_VARS_UE *ue,
msg
(
"generate_srs_tx: Msc_RS = %d, Msc_RS_idx = %d
\n
"
,
Msc_RS
,
Msc_RS_idx
);
#endif
T_SFC
=
(
Ssrs
<=
7
?
5
:
10
);
if
((
1
<<
(
subframe
%
T_SFC
))
&
transmission_offset_tdd
[
Ssrs
])
{
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
));
#ifndef IFFT_FPGA_UE
carrier_pos
=
(
frame_parms
->
first_carrier_offset
+
k0
)
%
frame_parms
->
ofdm_symbol_size
;
//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;
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
++
)
{
((
short
*
)
txdataF
)[
2
*
(
symbol_offset
+
carrier_pos
)]
=
(
short
)
(((
int32_t
)
amp
*
(
int32_t
)
ul_ref_sigs
[
0
][
0
][
Msc_RS_idx
][
k
<<
1
])
>>
15
)
;
((
short
*
)
txdataF
)[
2
*
(
symbol_offset
+
carrier_pos
)
+
1
]
=
(
short
)
(((
int32_t
)
amp
*
(
int32_t
)
ul_ref_sigs
[
0
][
0
][
Msc_RS_idx
][(
k
<<
1
)
+
1
])
>>
15
)
;
carrier_pos
+=
2
;
int32_t
real
=
((
int32_t
)
amp
*
(
int32_t
)
ul_ref_sigs
[
u
][
v
][
Msc_RS_idx
][
k
<<
1
])
>>
15
;
int32_t
imag
=
((
int32_t
)
amp
*
(
int32_t
)
ul_ref_sigs
[
u
][
v
][
Msc_RS_idx
][(
k
<<
1
)
+
1
])
>>
15
;
txptr
[
carrier_pos
]
=
(
real
&
0xFFFF
)
+
((
imag
<<
16
)
&
0xFFFF0000
)
;
if
(
carrier_pos
>=
frame_parms
->
ofdm_symbol_size
)
carrier_pos
=
1
;
}
#else
carrier_pos
=
(
frame_parms
->
N_RB_UL
*
12
/
2
+
k0
)
%
(
frame_parms
->
N_RB_UL
*
12
);
//msg("carrier_pos = %d\n",carrier_pos);
carrier_pos
=
carrier_pos
+
2
;
subframe_offset
=
subframe
*
frame_parms
->
symbols_per_tti
*
frame_parms
->
N_RB_UL
*
12
;
symbol_offset
=
subframe_offset
+
(
frame_parms
->
symbols_per_tti
-
1
)
*
frame_parms
->
N_RB_UL
*
12
;
for
(
k
=
0
;
k
<
Msc_RS
;
k
++
)
{
if
((
ul_ref_sigs
[
0
][
0
][
Msc_RS_idx
][
k
<<
1
]
>=
0
)
&&
(
ul_ref_sigs
[
0
][
0
][
Msc_RS_idx
][(
k
<<
1
)
+
1
]
>=
0
))
txdataF
[
symbol_offset
+
carrier_pos
]
=
(
int32_t
)
4
;
else
if
((
ul_ref_sigs
[
0
][
0
][
Msc_RS_idx
][
k
<<
1
]
>=
0
)
&&
(
ul_ref_sigs
[
0
][
0
][
Msc_RS_idx
][(
k
<<
1
)
+
1
]
<
0
))
txdataF
[
symbol_offset
+
carrier_pos
]
=
(
int32_t
)
2
;
else
if
((
ul_ref_sigs
[
0
][
0
][
Msc_RS_idx
][
k
<<
1
]
<
0
)
&&
(
ul_ref_sigs
[
0
][
0
][
Msc_RS_idx
][(
k
<<
1
)
+
1
]
>=
0
))
txdataF
[
symbol_offset
+
carrier_pos
]
=
(
int32_t
)
3
;
else
if
((
ul_ref_sigs
[
0
][
0
][
Msc_RS_idx
][
k
<<
1
]
<
0
)
&&
(
ul_ref_sigs
[
0
][
0
][
Msc_RS_idx
][(
k
<<
1
)
+
1
]
<
0
))
txdataF
[
symbol_offset
+
carrier_pos
]
=
(
int32_t
)
1
;
carrier_pos
+=
2
;
if
(
carrier_pos
>=
frame_parms
->
N_RB_UL
*
12
)
carrier_pos
=
0
;
if
(
carrier_pos
>=
frame_parms
->
ofdm_symbol_size
)
carrier_pos
=
carrier_pos
-
frame_parms
->
ofdm_symbol_size
;
}
#endif
// write_output("srs_txF.m","srstxF",&txdataF[symbol_offset],512,1,1);
}
return
(
0
);
}
...
...
openair1/PHY/extern.h
View file @
bd8344b4
...
...
@@ -118,5 +118,17 @@ extern char eNB_timing[2][20];
extern
int16_t
unscrambling_lut
[
65536
*
16
];
extern
uint8_t
scrambling_lut
[
65536
*
16
];
extern
unsigned
short
msrsb_6_40
[
8
][
4
];
extern
unsigned
short
msrsb_41_60
[
8
][
4
];
extern
unsigned
short
msrsb_61_80
[
8
][
4
];
extern
unsigned
short
msrsb_81_110
[
8
][
4
];
extern
unsigned
short
Nb_6_40
[
8
][
4
];
extern
unsigned
short
Nb_41_60
[
8
][
4
];
extern
unsigned
short
Nb_61_80
[
8
][
4
];
extern
unsigned
short
Nb_81_110
[
8
][
4
];
extern
uint16_t
hundred_times_log10_NPRB
[
100
];
extern
uint8_t
alpha_lut
[
8
];
#endif
/*__PHY_EXTERN_H__ */
openair1/PHY/impl_defs_lte.h
View file @
bd8344b4
...
...
@@ -148,6 +148,11 @@ typedef struct {
uint8_t
nCS_AN
;
/// Parameter: \f$N^{(1)}_\text{PUCCH}\f$ see TS 36.213 (10.1). \vr{[0..2047]}
uint16_t
n1PUCCH_AN
;
/// group hopping sequence for DRS \note not part of offical UL-PUCCH_CONFIG_COMMON ASN1 specification.
uint8_t
grouphop
[
20
];
/// sequence hopping sequence for DRS \note not part of offical UL-PUCCH_CONFIG_COMMON ASN1 specification.
uint8_t
seqhop
[
20
];
}
PUCCH_CONFIG_COMMON
;
/// UL-ReferenceSignalsPUSCH from 36.331 RRC spec
...
...
@@ -319,6 +324,12 @@ 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
uint8_t
srsConfigDedicatedSetup
;
// Parameter: cell srs subframe for internal implementation
uint8_t
srsCellSubframe
;
// Parameter: ue srs subframe for internal implementation
uint8_t
srsUeSubframe
;
}
SOUNDINGRS_UL_CONFIG_DEDICATED
;
/// UplinkPowerControlDedicated Information Element from 36.331 RRC spec
...
...
openair1/SCHED/Makefile.inc
View file @
bd8344b4
...
...
@@ -3,3 +3,4 @@ SCHED_OBJS += $(TOP_DIR)/SCHED/phy_procedures_lte_ue.o
SCHED_OBJS
+=
$(TOP_DIR)
/SCHED/phy_procedures_lte_eNb.o
SCHED_OBJS
+=
$(TOP_DIR)
/SCHED/pusch_pc.o
SCHED_OBJS
+=
$(TOP_DIR)
/SCHED/pucch_pc.o
SCHED_OBJS
+=
$(TOP_DIR)
/SCHED/srs_pc.o
openair1/SCHED/defs.h
View file @
bd8344b4
...
...
@@ -444,6 +444,15 @@ int8_t pucch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t subframe,ui
*/
void
pusch_power_cntl
(
PHY_VARS_UE
*
phy_vars_ue
,
UE_rxtx_proc_t
*
proc
,
uint8_t
eNB_id
,
uint8_t
j
,
uint8_t
abstraction_flag
);
/*! \brief This function implements the power control mechanism for SRS from 36.213.
@param phy_vars_ue PHY variables
@param proc Pointer to proc descriptor
@param eNB_id Index of eNB
@param j index of type of PUSCH (SPS, Normal, Msg3)
@returns Transmit power
*/
void
srs_power_cntl
(
PHY_VARS_UE
*
ue
,
UE_rxtx_proc_t
*
proc
,
uint8_t
eNB_id
,
uint8_t
*
pnb_rb_srs
,
uint8_t
abstraction_flag
);
int8_t
get_PHR
(
uint8_t
Mod_id
,
uint8_t
CC_id
,
uint8_t
eNB_index
);
#ifdef LOCALIZATION
...
...
openair1/SCHED/phy_procedures_lte_ue.c
View file @
bd8344b4
This diff is collapsed.
Click to expand it.
openair1/SCHED/srs_pc.c
0 → 100644
View file @
bd8344b4
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*! \file srs_pc.c
* \brief Implementation of UE SRS Power Control procedures from 36.213 LTE specifications (Section
* \author H. Bilel
* \date 2016
* \version 0.1
* \company TCL
* \email: haithem.bilel@alcatelOneTouch.com
* \note
* \warning
*/
#include "PHY/defs.h"
#include "PHY/LTE_TRANSPORT/proto.h"
#include "PHY/extern.h"
void
srs_power_cntl
(
PHY_VARS_UE
*
ue
,
UE_rxtx_proc_t
*
proc
,
uint8_t
eNB_id
,
uint8_t
*
pnb_rb_srs
,
uint8_t
abstraction_flag
)
{
int16_t
PL
;
int8_t
p0_NominalPUSCH
;
int8_t
p0_UE_PUSCH
;
int8_t
Psrs_offset
;
int16_t
P_srs
;
int16_t
f_pusch
;
uint8_t
alpha
;
uint8_t
Msrs
=
0
;
SOUNDINGRS_UL_CONFIG_DEDICATED
*
psoundingrs_ul_config_dedicated
=
&
ue
->
soundingrs_ul_config_dedicated
[
eNB_id
];
LTE_DL_FRAME_PARMS
*
pframe_parms
=
&
ue
->
frame_parms
;
uint8_t
Bsrs
=
psoundingrs_ul_config_dedicated
->
srs_Bandwidth
;
uint8_t
Csrs
=
pframe_parms
->
soundingrs_ul_config_common
.
srs_BandwidthConfig
;
LOG_D
(
PHY
,
" SRS Power Control; AbsSubframe %d.%d, eNB_id %d, N_RB_UL %d, srs_Bandwidth %d, srs_BandwidthConfig %d
\n
"
,
proc
->
frame_tx
,
proc
->
subframe_tx
,
eNB_id
,
pframe_parms
->
N_RB_UL
,
Bsrs
,
Csrs
);
if
(
pframe_parms
->
N_RB_UL
<
41
)
{
Msrs
=
Nb_6_40
[
Csrs
][
Bsrs
];
}
else
if
(
pframe_parms
->
N_RB_UL
<
61
)
{
Msrs
=
Nb_41_60
[
Csrs
][
Bsrs
];
}
else
if
(
pframe_parms
->
N_RB_UL
<
81
)
{
Msrs
=
Nb_61_80
[
Csrs
][
Bsrs
];
}
else
if
(
pframe_parms
->
N_RB_UL
<
111
)
{
Msrs
=
Nb_81_110
[
Csrs
][
Bsrs
];
}
// SRS Power control 36.213 5.1.3.1
// P_srs = P_srs_offset+ 10log10(Msrs) + P_opusch(j) + alpha*PL + f(i))
p0_NominalPUSCH
=
ue
->
frame_parms
.
ul_power_control_config_common
.
p0_NominalPUSCH
;
p0_UE_PUSCH
=
ue
->
ul_power_control_dedicated
[
eNB_id
].
p0_UE_PUSCH
;
Psrs_offset
=
(
ue
->
ul_power_control_dedicated
[
eNB_id
].
pSRS_Offset
-
3
);
f_pusch
=
ue
->
ulsch
[
eNB_id
]
->
f_pusch
;
alpha
=
alpha_lut
[
ue
->
frame_parms
.
ul_power_control_config_common
.
alpha
];
PL
=
get_PL
(
ue
->
Mod_id
,
ue
->
CC_id
,
eNB_id
);
LOG_D
(
PHY
,
" SRS Power Control; eNB_id %d, p0_NominalPUSCH %d, p0_UE_PUSCH %d, alpha %d
\n
"
,
eNB_id
,
p0_NominalPUSCH
,
p0_UE_PUSCH
,
alpha
);
LOG_D
(
PHY
,
" SRS Power Control; eNB_id %d, pSRS_Offset[dB] %d, Msrs %d, PL %d, f_pusch %d
\n
"
,
eNB_id
,
Psrs_offset
,
Msrs
,
PL
,
f_pusch
);
P_srs
=
(
p0_NominalPUSCH
+
p0_UE_PUSCH
)
+
Psrs_offset
+
f_pusch
;
P_srs
+=
(((
int32_t
)
alpha
*
(
int32_t
)
PL
)
+
hundred_times_log10_NPRB
[
Msrs
-
1
])
/
100
;
ue
->
ulsch
[
eNB_id
]
->
Po_SRS
=
P_srs
;
if
(
ue
->
ulsch
[
eNB_id
]
->
Po_SRS
>
ue
->
tx_power_max_dBm
)
{
ue
->
ulsch
[
eNB_id
]
->
Po_SRS
=
ue
->
tx_power_max_dBm
;
}
pnb_rb_srs
[
0
]
=
Msrs
;
LOG_D
(
PHY
,
" SRS Power Control; eNB_id %d, Psrs_pc[dBm] %d, Pcmax[dBm] %d, Psrs[dBm] %d
\n
"
,
eNB_id
,
P_srs
,
ue
->
tx_power_max_dBm
,
ue
->
ulsch
[
eNB_id
]
->
Po_SRS
);
}
openair2/RRC/LITE/MESSAGES/asn1_msg.c
View file @
bd8344b4
...
...
@@ -1496,7 +1496,7 @@ do_RRCConnectionSetup(
physicalConfigDedicated2
->
tpc_PDCCH_ConfigPUCCH
=
CALLOC
(
1
,
sizeof
(
*
physicalConfigDedicated2
->
tpc_PDCCH_ConfigPUCCH
));
physicalConfigDedicated2
->
tpc_PDCCH_ConfigPUSCH
=
CALLOC
(
1
,
sizeof
(
*
physicalConfigDedicated2
->
tpc_PDCCH_ConfigPUSCH
));
physicalConfigDedicated2
->
cqi_ReportConfig
=
CALLOC
(
1
,
sizeof
(
*
physicalConfigDedicated2
->
cqi_ReportConfig
));
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
=
NULL
;
//
CALLOC(1,sizeof(*physicalConfigDedicated2->soundingRS_UL_ConfigDedicated));
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
=
CALLOC
(
1
,
sizeof
(
*
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
));
physicalConfigDedicated2
->
antennaInfo
=
CALLOC
(
1
,
sizeof
(
*
physicalConfigDedicated2
->
antennaInfo
));
physicalConfigDedicated2
->
schedulingRequestConfig
=
CALLOC
(
1
,
sizeof
(
*
physicalConfigDedicated2
->
schedulingRequestConfig
));
#ifdef CBA
...
...
@@ -1582,19 +1582,17 @@ do_RRCConnectionSetup(
*/
//soundingRS-UL-ConfigDedicated
/*
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
present
=
SoundingRS_UL_ConfigDedicated_PR_setup
;
assign_enum(&physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_Bandwidth,
SoundingRS_UL_ConfigDedicated__setup__srs_Bandwidth_bw0)
;
assign_enum(&physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_HoppingBandwidth,
SoundingRS_UL_ConfigDedicated__setup__srs_HoppingBandwidth_hbw0
)
;
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_Bandwidth
=
SoundingRS_UL_ConfigDedicated__setup__srs_Bandwidth_bw0
;
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_HoppingBandwidth
=
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=
1
;
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_ConfigIndex
=
45
;
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
transmissionComb
=
0
;
assign_enum(&physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.cyclicShift,
SoundingRS_UL_ConfigDedicated__setup__cyclicShift_cs0);
*/
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
cyclicShift
=
SoundingRS_UL_ConfigDedicated__setup__cyclicShift_cs0
;
//AntennaInfoDedicated
...
...
openair2/RRC/LITE/rrc_eNB.c
View file @
bd8344b4
...
...
@@ -2621,7 +2621,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
physicalConfigDedicated2
->
tpc_PDCCH_ConfigPUSCH
=
CALLOC
(
1
,
sizeof
(
*
physicalConfigDedicated2
->
tpc_PDCCH_ConfigPUSCH
));
physicalConfigDedicated2
->
cqi_ReportConfig
=
NULL
;
//CALLOC(1,sizeof(*physicalConfigDedicated2->cqi_ReportConfig));
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
=
NULL
;
//
CALLOC(1,sizeof(*physicalConfigDedicated2->soundingRS_UL_ConfigDedicated));
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
=
CALLOC
(
1
,
sizeof
(
*
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
));
physicalConfigDedicated2
->
antennaInfo
=
CALLOC
(
1
,
sizeof
(
*
physicalConfigDedicated2
->
antennaInfo
));
physicalConfigDedicated2
->
schedulingRequestConfig
=
CALLOC
(
1
,
sizeof
(
*
physicalConfigDedicated2
->
schedulingRequestConfig
));
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.generic.oaisim.local_no_mme.conf
View file @
bd8344b4
...
...
@@ -62,11 +62,11 @@ eNBs =
pusch_nDMRS1
=
0
;
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
=
13
;
srs_ackNackST
=
"DISABLE"
;
srs_MaxUpPts
=
"DISABLE"
;
pusch_p0_Nominal
= -
108
;
pusch_alpha
=
"AL1"
;
...
...
targets/SIMU/USER/oaisim_functions.c
View file @
bd8344b4
...
...
@@ -1283,7 +1283,7 @@ void init_openair1(void)
for
(
UE_id
=
0
;
UE_id
<
NB_UE_INST
;
UE_id
++
)
{
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
tx_power_max_dBm
=
23
;
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
tx_power_max_dBm
=
10
;
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
rx_total_gain_dB
=
100
;
...
...
@@ -1525,7 +1525,7 @@ void update_ocm()
//calc_path_loss (enb_data[eNB_id], ue_data[UE_id], eNB2UE[eNB_id][UE_id], oai_emulation.environment_system_config,0);
UE2eNB
[
UE_id
][
eNB_id
][
CC_id
]
->
path_loss_dB
=
eNB2UE
[
eNB_id
][
UE_id
][
CC_id
]
->
path_loss_dB
;
// if (frame % 50 == 0)
LOG_
I
(
OCM
,
"Path loss (CCid %d) between eNB %d at (%f,%f) and UE %d at (%f,%f) is %f, angle %f
\n
"
,
LOG_
D
(
OCM
,
"Path loss (CCid %d) between eNB %d at (%f,%f) and UE %d at (%f,%f) is %f, angle %f
\n
"
,
CC_id
,
eNB_id
,
enb_data
[
eNB_id
]
->
x
,
enb_data
[
eNB_id
]
->
y
,
UE_id
,
ue_data
[
UE_id
]
->
x
,
ue_data
[
UE_id
]
->
y
,
eNB2UE
[
eNB_id
][
UE_id
][
CC_id
]
->
path_loss_dB
,
eNB2UE
[
eNB_id
][
UE_id
][
CC_id
]
->
aoa
);
//double dx, dy, distance;
...
...
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