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
edf47a1b
Commit
edf47a1b
authored
10 years ago
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@5352
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
556346dd
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
2017.w11
2017.w10
2017.w09
2017.w08
2017.w07
2017.w06
2017.w05
2017.w04
2017.w03
2017.w02
2017.w01
2016.w50
2016.w49
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
v1B0.8
v1B0.7
v1B0.6
v1B0.5
v1B0.4
v1B0.3
v1B0.2
v1B0.1
v0.6.1
v0.6.1_tdd
v0.6
v0.5.2
v0.5.1_tdd
v0.5
v0.4
v0.3
v0.2
v0.1
testing-cmw500
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
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
361 additions
and
0 deletions
+361
-0
openair1/PHY/LTE_REFSIG/lte_dl_uespec.c
openair1/PHY/LTE_REFSIG/lte_dl_uespec.c
+361
-0
No files found.
openair1/PHY/LTE_REFSIG/lte_dl_uespec.c
0 → 100644
View file @
edf47a1b
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fsr/openairinterface
Address : Eurecom, 450, route des chappes, 06410 Biot Sophia Antipolis, France
*******************************************************************************/
/*! \file PHY/LTE_REFSIG/lte_dl_uespec.c
* \brief Top-level routines for generating UE-specific Reference signals from 36-211, V11.3.0 2013-06
* \author R. Knopp
* \date 2014
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr
* \note
* \warning
*/
#ifdef USER_MODE
#include <stdio.h>
#include <stdlib.h>
#endif
#include "defs.h"
#include "PHY/defs.h"
#include "log.h"
//extern unsigned int lte_gold_table[3][20][2][14];
//#define DEBUG_DL_CELL_SPEC
int
Wbar_NCP
[
8
][
4
]
=
{{
1
,
1
,
1
,
1
},{
1
,
-
1
,
1
,
-
1
},{
1
,
1
,
1
,
1
},{
1
,
-
1
,
1
,
-
1
},{
1
,
1
,
-
1
,
-
1
},{
-
1
,
-
1
,
1
,
1
},{
1
,
-
1
,
-
1
,
1
},{
-
1
,
1
,
1
,
-
1
}};
int
lte_dl_ue_spec
(
PHY_VARS_eNB
*
phy_vars_eNB
,
uint8_t
UE_id
,
mod_sym_t
*
output
,
short
amp
,
uint8_t
Ns
,
uint8_t
p
,
int
SS_flag
)
{
mod_sym_t
qpsk
[
4
],
nqpsk
[
4
],
*
qpsk_p
,
*
output_p
;
int16_t
a
;
int
w
,
lprime
,
ind
,
l
,
ind_dword
,
ind_qpsk_symb
,
nPRB
;
// LTE_eNB_DLSCH_t *dlsch = phy_vars_eNB->dlsch_eNB[UE_id][0];
a
=
(
amp
*
ONE_OVER_SQRT2_Q15
)
>>
15
;
((
short
*
)
&
qpsk
[
0
])[
0
]
=
a
;
((
short
*
)
&
qpsk
[
0
])[
1
]
=
a
;
((
short
*
)
&
qpsk
[
1
])[
0
]
=
-
a
;
((
short
*
)
&
qpsk
[
1
])[
1
]
=
a
;
((
short
*
)
&
qpsk
[
2
])[
0
]
=
a
;
((
short
*
)
&
qpsk
[
2
])[
1
]
=
-
a
;
((
short
*
)
&
qpsk
[
3
])[
0
]
=
-
a
;
((
short
*
)
&
qpsk
[
3
])[
1
]
=
-
a
;
((
short
*
)
&
nqpsk
[
0
])[
0
]
=
-
a
;
((
short
*
)
&
nqpsk
[
0
])[
1
]
=
-
a
;
((
short
*
)
&
nqpsk
[
1
])[
0
]
=
a
;
((
short
*
)
&
nqpsk
[
1
])[
1
]
=
-
a
;
((
short
*
)
&
nqpsk
[
2
])[
0
]
=
-
a
;
((
short
*
)
&
nqpsk
[
2
])[
1
]
=
a
;
((
short
*
)
&
nqpsk
[
3
])[
0
]
=
a
;
((
short
*
)
&
nqpsk
[
3
])[
1
]
=
a
;
if
(
p
>=
7
)
{
if
(
SS_flag
==
0
)
{
if
(
phy_vars_eNB
->
lte_frame_parms
.
Ncp
==
NORMAL
)
{
// this is 3GPP 36-211 6.10.3.2, NORMAL CP, p>=7
// position output pointer to 5th symbol in slot
output_p
=
output
+
(
60
*
phy_vars_eNB
->
lte_frame_parms
.
N_RB_DL
);
// shift to 2nd RE in PRB for p=7,8,11,13
if
((
p
==
7
)
||
(
p
==
8
)
||
(
p
==
11
)
||
(
p
==
13
))
output_p
++
;
for
(
lprime
=
0
;
lprime
<
2
;
lprime
++
)
{
ind
=
3
*
lprime
*
phy_vars_eNB
->
lte_frame_parms
.
N_RB_DL
;
l
=
lprime
+
((
Ns
&
1
)
<<
1
);
// loop over pairs of PRBs, this is the periodicity of the W_bar_NCP sequence
// unroll the computations for the 6 pilots, select qpsk or nqpsk as function of W_bar_NCP
for
(
nPRB
=
0
;
nPRB
<
phy_vars_eNB
->
lte_frame_parms
.
N_RB_DL
;
nPRB
+=
2
)
{
// First pilot
w
=
Wbar_NCP
[
p
-
7
][
l
];
qpsk_p
=
(
w
==
1
)
?
qpsk
:
nqpsk
;
ind_dword
=
ind
>>
4
;
ind_qpsk_symb
=
ind
&
0xf
;
*
output_p
=
qpsk_p
[(
phy_vars_eNB
->
lte_gold_uespec_table
[
0
][
Ns
][
lprime
][
ind_dword
]
>>
(
2
*
ind_qpsk_symb
))
&
3
];
#ifdef DEBUG_DL_UESPEC
LOG_D
(
PHY
,
"Ns %d, l %d, m %d,ind_dword %d, ind_qpsk_symbol %d
\n
"
,
Ns
,
l
,
m
,
mprime_dword
,
mprime_qpsk_symb
);
LOG_D
(
PHY
,
"index = %d
\n
"
,(
phy_vars_eNB
->
lte_gold_uespec_table
[
0
][
Ns
][
lprime
][
ind_dword
]
>>
(
2
*
ind_qpsk_symb
))
&
3
);
#endif
output_p
+=
5
;
ind
++
;
w
=
Wbar_NCP
[
p
-
7
][
3
-
l
];
qpsk_p
=
(
w
==
1
)
?
qpsk
:
nqpsk
;
// Second pilot
ind_dword
=
ind
>>
4
;
ind_qpsk_symb
=
ind
&
0xf
;
*
output_p
=
qpsk_p
[(
phy_vars_eNB
->
lte_gold_uespec_table
[
0
][
Ns
][
lprime
][
ind_dword
]
>>
(
2
*
ind_qpsk_symb
))
&
3
];
#ifdef DEBUG_DL_UESPEC
LOG_D
(
PHY
,
"Ns %d, l %d, m %d,ind_dword %d, ind_qpsk_symbol %d
\n
"
,
Ns
,
l
,
m
,
mprime_dword
,
mprime_qpsk_symb
);
LOG_D
(
PHY
,
"index = %d
\n
"
,(
phy_vars_eNB
->
lte_gold_uespec_table
[
0
][
Ns
][
lprime
][
ind_dword
]
>>
(
2
*
ind_qpsk_symb
))
&
3
);
#endif
output_p
+=
5
;
ind
++
;
w
=
Wbar_NCP
[
p
-
7
][
l
];
qpsk_p
=
(
w
==
1
)
?
qpsk
:
nqpsk
;
// Third pilot
ind_dword
=
ind
>>
4
;
ind_qpsk_symb
=
ind
&
0xf
;
*
output_p
=
qpsk_p
[(
phy_vars_eNB
->
lte_gold_uespec_table
[
0
][
Ns
][
lprime
][
ind_dword
]
>>
(
2
*
ind_qpsk_symb
))
&
3
];
#ifdef DEBUG_DL_UESPEC
LOG_D
(
PHY
,
"Ns %d, l %d, m %d,ind_dword %d, ind_qpsk_symbol %d
\n
"
,
Ns
,
l
,
m
,
mprime_dword
,
mprime_qpsk_symb
);
LOG_D
(
PHY
,
"index = %d
\n
"
,(
phy_vars_eNB
->
lte_gold_uespec_table
[
0
][
Ns
][
lprime
][
ind_dword
]
>>
(
2
*
ind_qpsk_symb
))
&
3
);
#endif
output_p
+=
2
;
ind
++
;
// Fourth pilot
w
=
Wbar_NCP
[
p
-
7
][
3
-
l
];
qpsk_p
=
(
w
==
1
)
?
qpsk
:
nqpsk
;
ind_dword
=
ind
>>
4
;
ind_qpsk_symb
=
ind
&
0xf
;
*
output_p
=
qpsk_p
[(
phy_vars_eNB
->
lte_gold_uespec_table
[
0
][
Ns
][
lprime
][
ind_dword
]
>>
(
2
*
ind_qpsk_symb
))
&
3
];
#ifdef DEBUG_DL_UESPEC
LOG_D
(
PHY
,
"Ns %d, l %d, m %d,ind_dword %d, ind_qpsk_symbol %d
\n
"
,
Ns
,
l
,
m
,
mprime_dword
,
mprime_qpsk_symb
);
LOG_D
(
PHY
,
"index = %d
\n
"
,(
phy_vars_eNB
->
lte_gold_uespec_table
[
0
][
Ns
][
lprime
][
ind_dword
]
>>
(
2
*
ind_qpsk_symb
))
&
3
);
#endif
output_p
+=
5
;
ind
++
;
w
=
Wbar_NCP
[
p
-
7
][
l
];
qpsk_p
=
(
w
==
1
)
?
qpsk
:
nqpsk
;
// Fifth pilot
ind_dword
=
ind
>>
4
;
ind_qpsk_symb
=
ind
&
0xf
;
*
output_p
=
qpsk_p
[(
phy_vars_eNB
->
lte_gold_uespec_table
[
0
][
Ns
][
lprime
][
ind_dword
]
>>
(
2
*
ind_qpsk_symb
))
&
3
];
#ifdef DEBUG_DL_UESPEC
LOG_D
(
PHY
,
"Ns %d, l %d, m %d,ind_dword %d, ind_qpsk_symbol %d
\n
"
,
Ns
,
l
,
m
,
mprime_dword
,
mprime_qpsk_symb
);
LOG_D
(
PHY
,
"index = %d
\n
"
,(
phy_vars_eNB
->
lte_gold_uespec_table
[
0
][
Ns
][
lprime
][
ind_dword
]
>>
(
2
*
ind_qpsk_symb
))
&
3
);
#endif
output_p
+=
5
;
ind
++
;
w
=
Wbar_NCP
[
p
-
7
][
3
-
l
];
qpsk_p
=
(
w
==
1
)
?
qpsk
:
nqpsk
;
// Sixth pilot
ind_dword
=
ind
>>
4
;
ind_qpsk_symb
=
ind
&
0xf
;
*
output_p
=
qpsk_p
[(
phy_vars_eNB
->
lte_gold_uespec_table
[
0
][
Ns
][
lprime
][
ind_dword
]
>>
(
2
*
ind_qpsk_symb
))
&
3
];
#ifdef DEBUG_DL_UESPEC
LOG_D
(
PHY
,
"Ns %d, l %d, m %d,ind_dword %d, ind_qpsk_symbol %d
\n
"
,
Ns
,
l
,
m
,
mprime_dword
,
mprime_qpsk_symb
);
LOG_D
(
PHY
,
"index = %d
\n
"
,(
phy_vars_eNB
->
lte_gold_uespec_table
[
0
][
Ns
][
lprime
][
ind_dword
]
>>
(
2
*
ind_qpsk_symb
))
&
3
);
#endif
output_p
+=
2
;
ind
++
;
}
}
}
else
{
LOG_E
(
PHY
,
"Special subframe not supported for UE specific pilots yet
\n
"
);
}
}
}
else
if
(
p
==
5
)
{
LOG_E
(
PHY
,
"p=5 not supported for UE specific pilots yet
\n
"
);
}
else
{
LOG_E
(
PHY
,
"Illegal p %d UE specific pilots
\n
"
,
p
);
}
return
(
0
);
}
/*
int lte_dl_cell_spec_rx(PHY_VARS_UE *phy_vars_ue,
uint8_t eNB_offset,
int *output,
unsigned char Ns,
unsigned char l,
unsigned char p) {
unsigned char mprime,mprime_dword,mprime_qpsk_symb,m;
unsigned short k=0;
unsigned int qpsk[4];
short pamp;
// Compute the correct pilot amplitude, sqrt_rho_b = Q3.13
pamp = ONE_OVER_SQRT2_Q15;
// This includes complex conjugate for channel estimation
((short *)&qpsk[0])[0] = pamp;
((short *)&qpsk[0])[1] = -pamp;
((short *)&qpsk[1])[0] = -pamp;
((short *)&qpsk[1])[1] = -pamp;
((short *)&qpsk[2])[0] = pamp;
((short *)&qpsk[2])[1] = pamp;
((short *)&qpsk[3])[0] = -pamp;
((short *)&qpsk[3])[1] = pamp;
mprime = 110 - phy_vars_ue->lte_frame_parms.N_RB_DL;
for (m=0;m<phy_vars_ue->lte_frame_parms.N_RB_DL<<1;m++) {
mprime_dword = mprime>>4;
mprime_qpsk_symb = mprime&0xf;
// this is r_mprime from 3GPP 36-211 6.10.1.2
output[k] = qpsk[(phy_vars_ue->lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3];
#ifdef DEBUG_DL_CELL_SPEC
printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
Ns,l,m,mprime_dword,mprime_qpsk_symb);
printf("index = %d (k %d)\n",(phy_vars_ue->lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
#endif
mprime++;
#ifdef DEBUG_DL_CELL_SPEC
if (m<4)
printf("Ns %d l %d output[%d] = (%d,%d)\n",Ns,l,k,((short *)&output[k])[0],((short *)&output[k])[1]);
#endif
k++;
}
return(0);
}
*/
#ifdef LTE_DL_CELL_SPEC_MAIN
//extern int write_output(const char *,const char *,void *,int,int,char);
// flag change eren
extern
int
write_output
(
const
char
*
,
const
char
*
,
void
*
,
int
,
int
,
char
);
main
()
{
unsigned
short
Nid_cell
=
0
;
unsigned
int
Ncp
=
0
;
int
output00
[
1024
];
int
output01
[
1024
];
int
output10
[
1024
];
int
output11
[
1024
];
memset
(
output00
,
0
,
1024
*
sizeof
(
int
));
memset
(
output01
,
0
,
1024
*
sizeof
(
int
));
memset
(
output10
,
0
,
1024
*
sizeof
(
int
));
memset
(
output11
,
0
,
1024
*
sizeof
(
int
));
lte_gold
(
Nid_cell
,
Ncp
);
lte_dl_cell_spec
(
output00
,
ONE_OVER_SQRT2_Q15
,
50
,
Nid_cell
,
Ncp
,
0
,
0
,
0
,
0
);
lte_dl_cell_spec
(
output10
,
ONE_OVER_SQRT2_Q15
,
50
,
Nid_cell
,
Ncp
,
0
,
1
,
0
,
0
);
lte_dl_cell_spec
(
output01
,
ONE_OVER_SQRT2_Q15
,
50
,
Nid_cell
,
Ncp
,
0
,
0
,
1
,
0
);
lte_dl_cell_spec
(
output11
,
ONE_OVER_SQRT2_Q15
,
50
,
Nid_cell
,
Ncp
,
0
,
1
,
1
,
0
);
write_output
(
"dl_cell_spec00.m"
,
"dl_cs00"
,
output00
,
1024
,
1
,
1
);
write_output
(
"dl_cell_spec01.m"
,
"dl_cs01"
,
output01
,
1024
,
1
,
1
);
write_output
(
"dl_cell_spec10.m"
,
"dl_cs10"
,
output10
,
1024
,
1
,
1
);
write_output
(
"dl_cell_spec11.m"
,
"dl_cs11"
,
output11
,
1024
,
1
,
1
);
}
#endif
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