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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
fbef1099
Commit
fbef1099
authored
Mar 03, 2022
by
Sagar Parsawar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OAI UE: PRS support for multiple Rx antenna and multiple gNB IDs
parent
51df6625
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
343 additions
and
331 deletions
+343
-331
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+9
-7
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+285
-281
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
+2
-1
openair1/PHY/TOOLS/tools_defs.h
openair1/PHY/TOOLS/tools_defs.h
+3
-2
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+7
-3
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+14
-14
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+23
-23
No files found.
openair1/PHY/INIT/nr_init_ue.c
View file @
fbef1099
...
...
@@ -136,6 +136,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
NR_DL_FRAME_PARMS
*
const
fp
=
&
ue
->
frame_parms
;
NR_UE_COMMON
*
const
common_vars
=
&
ue
->
common_vars
;
NR_UE_PBCH
**
const
pbch_vars
=
ue
->
pbch_vars
;
NR_UE_PRS
**
const
prs_vars
=
ue
->
prs_vars
;
NR_UE_PRACH
**
const
prach_vars
=
ue
->
prach_vars
;
int
i
,
j
,
k
,
l
,
slot
,
symb
,
q
;
int
gNB_id
;
...
...
@@ -334,17 +335,18 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
}
prach_vars
[
gNB_id
]
=
(
NR_UE_PRACH
*
)
malloc16_clear
(
sizeof
(
NR_UE_PRACH
));
pbch_vars
[
gNB_id
]
=
(
NR_UE_PBCH
*
)
malloc16_clear
(
sizeof
(
NR_UE_PBCH
));
pbch_vars
[
gNB_id
]
=
(
NR_UE_PBCH
*
)
malloc16_clear
(
sizeof
(
NR_UE_PBCH
));
prs_vars
[
gNB_id
]
=
(
NR_UE_PRS
*
)
malloc16_clear
(
sizeof
(
NR_UE_PRS
));
// PRS channel estimates
ue
->
prs_ch_estimates
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
ue
->
prs_ch_estimates_time
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
AssertFatal
(((
ue
->
prs_ch_estimates
!=
NULL
)
||
(
ue
->
prs_ch_estimates_time
!=
NULL
)),
"NR UE init: PRS channel estimates malloc failed
\n
"
);
prs_vars
[
gNB_id
]
->
prs_ch_estimates
=
(
int32_t
**
)
malloc16_clear
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
prs_vars
[
gNB_id
]
->
prs_ch_estimates_time
=
(
int32_t
**
)
malloc16_clear
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
AssertFatal
(((
prs_vars
[
gNB_id
]
->
prs_ch_estimates
!=
NULL
)
||
(
prs_vars
[
gNB_id
]
->
prs_ch_estimates_time
!=
NULL
)),
"NR UE init: PRS channel estimates malloc failed
\n
"
);
for
(
i
=
0
;
i
<
fp
->
nb_antennas_rx
;
i
++
)
{
ue
->
prs_ch_estimates
[
i
]
=
(
int32_t
*
)
malloc16
(
2
*
fp
->
ofdm_symbol_size
*
NR_MAX_NUM_PRS_SYMB
);
ue
->
prs_ch_estimates_time
[
i
]
=
(
int32_t
*
)
malloc16
(
2
*
fp
->
ofdm_symbol_size
*
NR_MAX_NUM_PRS_SYMB
);
AssertFatal
(((
ue
->
prs_ch_estimates
[
i
]
!=
NULL
)
||
(
ue
->
prs_ch_estimates_time
[
i
]
!=
NULL
)),
"NR UE init: PRS channel estimates malloc failed %d
\n
"
,
i
);
prs_vars
[
gNB_id
]
->
prs_ch_estimates
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
2
*
fp
->
ofdm_symbol_size
*
NR_MAX_NUM_PRS_SYMB
);
prs_vars
[
gNB_id
]
->
prs_ch_estimates_time
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
2
*
fp
->
ofdm_symbol_size
*
NR_MAX_NUM_PRS_SYMB
);
AssertFatal
(((
prs_vars
[
gNB_id
]
->
prs_ch_estimates
[
i
]
!=
NULL
)
||
(
prs_vars
[
gNB_id
]
->
prs_ch_estimates_time
[
i
]
!=
NULL
)),
"NR UE init: PRS channel estimates malloc failed %d
\n
"
,
i
);
}
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
fbef1099
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
View file @
fbef1099
...
...
@@ -33,7 +33,8 @@
#define SYNCH_HYST 2
/* A function to perform the channel estimation of DL PRS signal */
int
nr_prs_channel_estimation
(
PHY_VARS_NR_UE
*
ue
,
int
nr_prs_channel_estimation
(
uint8_t
gNB_id
,
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
NR_DL_FRAME_PARMS
*
frame_params
);
...
...
openair1/PHY/TOOLS/tools_defs.h
View file @
fbef1099
...
...
@@ -262,6 +262,7 @@ void dft98304(int16_t *x,int16_t *y,uint8_t scale_flag);
void
idft64
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft128
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft256
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft384
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft512
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft768
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft1024
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
...
...
@@ -324,14 +325,14 @@ adftfunc_t dft_ftab[]={
#endif
typedef
enum
idft_size_idx
{
IDFT_128
,
IDFT_256
,
IDFT_512
,
IDFT_768
,
IDFT_1024
,
IDFT_1536
,
IDFT_2048
,
IDFT_3072
,
IDFT_4096
,
IDFT_128
,
IDFT_256
,
IDFT_
384
,
IDFT_
512
,
IDFT_768
,
IDFT_1024
,
IDFT_1536
,
IDFT_2048
,
IDFT_3072
,
IDFT_4096
,
IDFT_6144
,
IDFT_8192
,
IDFT_9216
,
IDFT_12288
,
IDFT_18432
,
IDFT_24576
,
IDFT_36864
,
IDFT_49152
,
IDFT_73728
,
IDFT_98304
,
IDFT_SIZE_IDXTABLESIZE
}
idft_size_idx_t
;
#ifdef OAIDFTS_MAIN
aidftfunc_t
idft_ftab
[]
=
{
idft128
,
idft256
,
idft512
,
idft768
,
idft1024
,
idft1536
,
idft2048
,
idft3072
,
idft4096
,
idft128
,
idft256
,
idft
384
,
idft
512
,
idft768
,
idft1024
,
idft1536
,
idft2048
,
idft3072
,
idft4096
,
idft6144
,
idft8192
,
idft9216
,
idft12288
,
idft18432
,
idft24576
,
idft36864
,
idft49152
,
idft73728
,
idft98304
};
...
...
openair1/PHY/defs_nr_UE.h
View file @
fbef1099
...
...
@@ -383,6 +383,12 @@ typedef struct {
int32_t
**
ptrs_re_per_slot
;
}
NR_UE_PDSCH
;
typedef
struct
{
prs_data_t
prs_cfg
;
int32_t
**
prs_ch_estimates
;
int32_t
**
prs_ch_estimates_time
;
}
NR_UE_PRS
;
#define NR_PDCCH_DEFS_NR_UE
#define NR_NBR_CORESET_ACT_BWP 3 // The number of CoreSets per BWP is limited to 3 (including initial CORESET: ControlResourceId 0)
#define NR_NBR_SEARCHSPACE_ACT_BWP 10 // The number of SearchSpaces per BWP is limited to 10 (including initial SEARCHSPACE: SearchSpaceId 0)
...
...
@@ -823,9 +829,7 @@ typedef struct {
NR_UE_DLSCH_t
*
dlsch_ra
[
NUMBER_OF_CONNECTED_gNB_MAX
];
NR_UE_DLSCH_t
*
dlsch_p
[
NUMBER_OF_CONNECTED_gNB_MAX
];
NR_UE_DLSCH_t
*
dlsch_MCH
[
NUMBER_OF_CONNECTED_gNB_MAX
];
prs_data_t
prs_cfg
;
int32_t
**
prs_ch_estimates
;
int32_t
**
prs_ch_estimates_time
;
NR_UE_PRS
*
prs_vars
[
NUMBER_OF_CONNECTED_gNB_MAX
];
//Paging parameters
uint32_t
IMSImod1024
;
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
fbef1099
...
...
@@ -1661,20 +1661,20 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
}
/*
ue->prs_cfg.PRSResourceSetPeriod[0]=40; // PRS resource slot period
ue->prs_cfg.PRSResourceSetPeriod[1]=0; // resource slot offset
ue->prs_cfg.SymbolStart=7;
ue->prs_cfg.NumPRSSymbols=4;
ue->prs_cfg.NumRB=fp->N_RB_DL;
ue->prs_cfg.RBOffset=0;
ue->prs_cfg.CombSize=4;
ue->prs_cfg.REOffset=0;
ue->prs_cfg.PRSResourceOffset=0;
ue->prs_cfg.PRSResourceRepetition=1;
ue->prs_cfg.PRSResourceTimeGap=1;
ue->prs_cfg.NPRSID=0;
ue->prs_
vars[gNB_id]->prs_
cfg.PRSResourceSetPeriod[0]=40; // PRS resource slot period
ue->prs_
vars[gNB_id]->prs_
cfg.PRSResourceSetPeriod[1]=0; // resource slot offset
ue->prs_
vars[gNB_id]->prs_
cfg.SymbolStart=7;
ue->prs_
vars[gNB_id]->prs_
cfg.NumPRSSymbols=4;
ue->prs_
vars[gNB_id]->prs_
cfg.NumRB=fp->N_RB_DL;
ue->prs_
vars[gNB_id]->prs_
cfg.RBOffset=0;
ue->prs_
vars[gNB_id]->prs_
cfg.CombSize=4;
ue->prs_
vars[gNB_id]->prs_
cfg.REOffset=0;
ue->prs_
vars[gNB_id]->prs_
cfg.PRSResourceOffset=0;
ue->prs_
vars[gNB_id]->prs_
cfg.PRSResourceRepetition=1;
ue->prs_
vars[gNB_id]->prs_
cfg.PRSResourceTimeGap=1;
ue->prs_
vars[gNB_id]->prs_
cfg.NPRSID=0;
*/
for
(
int
j
=
ue
->
prs_
cfg
.
SymbolStart
;
j
<
(
ue
->
prs_cfg
.
SymbolStart
+
ue
->
prs_cfg
.
NumPRSSymbols
);
j
++
)
for
(
int
j
=
ue
->
prs_
vars
[
gNB_id
]
->
prs_cfg
.
SymbolStart
;
j
<
(
ue
->
prs_vars
[
gNB_id
]
->
prs_cfg
.
SymbolStart
+
ue
->
prs_vars
[
gNB_id
]
->
prs_cfg
.
NumPRSSymbols
);
j
++
)
{
nr_slot_fep
(
ue
,
proc
,
...
...
@@ -1683,7 +1683,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
}
//PRS channel estimation
nr_prs_channel_estimation
(
ue
,
proc
,
fp
);
nr_prs_channel_estimation
(
gNB_id
,
ue
,
proc
,
fp
);
}
if
((
frame_rx
%
64
==
0
)
&&
(
nr_slot_rx
==
0
))
{
...
...
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
View file @
fbef1099
...
...
@@ -1278,7 +1278,7 @@ void RCconfig_nr_ue_L1(void) {
void
RCconfig_nrUE_prs
(
void
*
cfg
)
{
int
j
=
0
;
int
j
=
0
,
gNB_id
=
0
;
PHY_VARS_NR_UE
*
ue
=
(
PHY_VARS_NR_UE
*
)
cfg
;
paramdef_t
PRS_Params
[]
=
PRS_PARAMS_DESC
;
paramlist_def_t
PRS_ParamList
=
{
GNB_CONFIG_STRING_PRS_CONFIG
,
NULL
,
0
};
...
...
@@ -1286,30 +1286,30 @@ void RCconfig_nrUE_prs(void *cfg)
printf
(
"Inside RCconfig_nrUE_prs
\n
"
);
if
(
PRS_ParamList
.
numelt
>
0
)
{
ue
->
prs_cfg
.
PRSResourceSetPeriod
[
0
]
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_RESOURCE_SET_PERIOD0
].
uptr
);
ue
->
prs_cfg
.
PRSResourceSetPeriod
[
1
]
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_RESOURCE_SET_PERIOD1
].
uptr
);
ue
->
prs_cfg
.
SymbolStart
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_SYMBOL_START
].
uptr
);
ue
->
prs_cfg
.
NumPRSSymbols
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_NUM_SYMBOLS
].
uptr
);
ue
->
prs_cfg
.
NumRB
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_NUM_RB
].
uptr
);
ue
->
prs_cfg
.
RBOffset
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_RB_OFFSET
].
uptr
);
ue
->
prs_cfg
.
CombSize
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_COMB_SIZE
].
uptr
);
ue
->
prs_cfg
.
REOffset
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_RE_OFFSET
].
uptr
);
ue
->
prs_cfg
.
PRSResourceOffset
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_RESOURCE_OFFSET
].
uptr
);
ue
->
prs_cfg
.
PRSResourceRepetition
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_RESOURCE_REPETITION
].
uptr
);
ue
->
prs_cfg
.
PRSResourceTimeGap
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_RESOURCE_TIME_GAP
].
uptr
);
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
PRSResourceSetPeriod
[
0
]
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_RESOURCE_SET_PERIOD0
].
uptr
);
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
PRSResourceSetPeriod
[
1
]
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_RESOURCE_SET_PERIOD1
].
uptr
);
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
SymbolStart
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_SYMBOL_START
].
uptr
);
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
NumPRSSymbols
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_NUM_SYMBOLS
].
uptr
);
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
NumRB
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_NUM_RB
].
uptr
);
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
RBOffset
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_RB_OFFSET
].
uptr
);
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
CombSize
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_COMB_SIZE
].
uptr
);
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
REOffset
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_RE_OFFSET
].
uptr
);
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
PRSResourceOffset
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_RESOURCE_OFFSET
].
uptr
);
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
PRSResourceRepetition
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_RESOURCE_REPETITION
].
uptr
);
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
PRSResourceTimeGap
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_RESOURCE_TIME_GAP
].
uptr
);
LOG_I
(
NR_PHY
,
"PRS Config for at nrUE %d
\n
"
,
0
);
LOG_I
(
NR_PHY
,
"PRSResourceSetPeriod0 %d
\n
"
,
ue
->
prs_cfg
.
PRSResourceSetPeriod
[
0
]);
LOG_I
(
NR_PHY
,
"PRSResourceSetPeriod1 %d
\n
"
,
ue
->
prs_cfg
.
PRSResourceSetPeriod
[
1
]);
LOG_I
(
NR_PHY
,
"SymbolStart %d
\n
"
,
ue
->
prs_cfg
.
SymbolStart
);
LOG_I
(
NR_PHY
,
"NumPRSSymbols %d
\n
"
,
ue
->
prs_cfg
.
NumPRSSymbols
);
LOG_I
(
NR_PHY
,
"NumRB %d
\n
"
,
ue
->
prs_cfg
.
NumRB
);
LOG_I
(
NR_PHY
,
"RBOffset %d
\n
"
,
ue
->
prs_cfg
.
RBOffset
);
LOG_I
(
NR_PHY
,
"CombSize %d
\n
"
,
ue
->
prs_cfg
.
CombSize
);
LOG_I
(
NR_PHY
,
"REOffset %d
\n
"
,
ue
->
prs_cfg
.
REOffset
);
LOG_I
(
NR_PHY
,
"PRSResourceOffset %d
\n
"
,
ue
->
prs_cfg
.
PRSResourceOffset
);
LOG_I
(
NR_PHY
,
"PRSResourceRepetition %d
\n
"
,
ue
->
prs_cfg
.
PRSResourceRepetition
);
LOG_I
(
NR_PHY
,
"PRSResourceTimeGap %d
\n
"
,
ue
->
prs_cfg
.
PRSResourceTimeGap
);
LOG_I
(
NR_PHY
,
"PRSResourceSetPeriod0 %d
\n
"
,
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
PRSResourceSetPeriod
[
0
]);
LOG_I
(
NR_PHY
,
"PRSResourceSetPeriod1 %d
\n
"
,
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
PRSResourceSetPeriod
[
1
]);
LOG_I
(
NR_PHY
,
"SymbolStart %d
\n
"
,
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
SymbolStart
);
LOG_I
(
NR_PHY
,
"NumPRSSymbols %d
\n
"
,
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
NumPRSSymbols
);
LOG_I
(
NR_PHY
,
"NumRB %d
\n
"
,
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
NumRB
);
LOG_I
(
NR_PHY
,
"RBOffset %d
\n
"
,
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
RBOffset
);
LOG_I
(
NR_PHY
,
"CombSize %d
\n
"
,
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
CombSize
);
LOG_I
(
NR_PHY
,
"REOffset %d
\n
"
,
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
REOffset
);
LOG_I
(
NR_PHY
,
"PRSResourceOffset %d
\n
"
,
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
PRSResourceOffset
);
LOG_I
(
NR_PHY
,
"PRSResourceRepetition %d
\n
"
,
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
PRSResourceRepetition
);
LOG_I
(
NR_PHY
,
"PRSResourceTimeGap %d
\n
"
,
ue
->
prs_
vars
[
gNB_id
]
->
prs_
cfg
.
PRSResourceTimeGap
);
}
else
{
...
...
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