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
cd352577
Commit
cd352577
authored
Mar 16, 2022
by
Sagar Parsawar
Committed by
Eurecom
Mar 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OAI UE: PRS mutliple gNB fixes
parent
b880e449
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
28 deletions
+45
-28
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+2
-2
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+3
-3
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+4
-0
openair1/PHY/defs_nr_common.h
openair1/PHY/defs_nr_common.h
+16
-16
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+3
-2
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+17
-5
No files found.
openair1/PHY/INIT/nr_init_ue.c
View file @
cd352577
...
...
@@ -335,8 +335,8 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
AssertFatal
(((
prs_vars
[
idx
]
->
prs_ch_estimates
!=
NULL
)
||
(
prs_vars
[
idx
]
->
prs_ch_estimates_time
!=
NULL
)),
"NR UE init: PRS channel estimates malloc failed
\n
"
);
for
(
i
=
0
;
i
<
fp
->
nb_antennas_rx
;
i
++
)
{
prs_vars
[
idx
]
->
prs_ch_estimates
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
ofdm_symbol_size
*
NR_
MAX_NUM_PRS_SYMB
*
sizeof
(
int32_t
));
prs_vars
[
idx
]
->
prs_ch_estimates_time
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
ofdm_symbol_size
*
NR_
MAX_NUM_PRS_SYMB
*
sizeof
(
int32_t
));
prs_vars
[
idx
]
->
prs_ch_estimates
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
ofdm_symbol_size
*
NR_
SYMBOLS_PER_SLOT
*
sizeof
(
int32_t
));
prs_vars
[
idx
]
->
prs_ch_estimates_time
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
ofdm_symbol_size
*
NR_
SYMBOLS_PER_SLOT
*
sizeof
(
int32_t
));
AssertFatal
(((
prs_vars
[
idx
]
->
prs_ch_estimates
[
i
]
!=
NULL
)
||
(
prs_vars
[
idx
]
->
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 @
cd352577
...
...
@@ -36,7 +36,7 @@
//#define DEBUG_PDCCH
//#define DEBUG_CH
//#define DEBUG_PRS_CHEST
#define DEBUG_PRS_PRINTS
//
#define DEBUG_PRS_PRINTS
extern
short
nr_qpsk_mod_table
[
8
];
int
nr_prs_channel_estimation
(
uint8_t
gNB_id
,
...
...
@@ -436,11 +436,11 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
#endif
// T tracer dump
T
(
T_UE_PHY_DL_CHANNEL_ESTIMATE_FREQ
,
T_INT
(
0
),
T
(
T_UE_PHY_DL_CHANNEL_ESTIMATE_FREQ
,
T_INT
(
gNB_id
),
T_INT
(
proc
->
frame_rx
),
T_INT
(
proc
->
nr_slot_rx
),
T_INT
(
rxAnt
),
T_BUFFER
(
&
prs_chestF
[
rxAnt
][
prs_cfg
->
SymbolStart
*
frame_params
->
ofdm_symbol_size
],
prs_cfg
->
NumPRSSymbols
*
frame_params
->
ofdm_symbol_size
*
sizeof
(
int32_t
)));
T
(
T_UE_PHY_DL_CHANNEL_ESTIMATE
,
T_INT
(
0
),
T
(
T_UE_PHY_DL_CHANNEL_ESTIMATE
,
T_INT
(
gNB_id
),
T_INT
(
proc
->
frame_rx
),
T_INT
(
proc
->
nr_slot_rx
),
T_INT
(
rxAnt
),
T_BUFFER
(
&
prs_chestT
[
rxAnt
][
prs_cfg
->
SymbolStart
*
frame_params
->
ofdm_symbol_size
],
prs_cfg
->
NumPRSSymbols
*
frame_params
->
ofdm_symbol_size
*
sizeof
(
int32_t
)));
...
...
openair1/PHY/defs_nr_UE.h
View file @
cd352577
...
...
@@ -387,6 +387,7 @@ typedef struct {
prs_data_t
prs_cfg
;
int32_t
**
prs_ch_estimates
;
int32_t
**
prs_ch_estimates_time
;
int64_t
reserved
;
}
NR_UE_PRS
;
#define NR_PDCCH_DEFS_NR_UE
...
...
@@ -830,6 +831,9 @@ typedef struct {
NR_UE_DLSCH_t
*
dlsch_p
[
NUMBER_OF_CONNECTED_gNB_MAX
];
NR_UE_DLSCH_t
*
dlsch_MCH
[
NUMBER_OF_CONNECTED_gNB_MAX
];
NR_UE_PRS
*
prs_vars
[
NR_MAX_PRS_COMB_SIZE
];
uint16_t
prs_active_gNBs
;
uint8_t
prs_start_symb
;
uint8_t
prs_end_symb
;
//Paging parameters
uint32_t
IMSImod1024
;
...
...
openair1/PHY/defs_nr_common.h
View file @
cd352577
...
...
@@ -375,22 +375,22 @@ struct NR_DL_FRAME_PARMS {
};
// PRS structures prototype
typedef
struct
prs
{
in
t
PRSResourceSetPeriod
[
2
];
//[slot period, slot offset]
in
t
PRSResourceOffset
;
// array if more than one resource sets.slot offset (0...511) (default 0)
in
t
PRSResourceRepetition
;
// slot offset (1 (default), 2, 4, 6, 8, 16, 32)
in
t
PRSResourceTimeGap
;
// slot offset (1 (default), 2, 4, 6, 8, 16, 32)
in
t
NumRB
;
//number of RBs in freq domain a scalar =< 275 RB
in
t
NumPRSSymbols
;
//number of PRS symbols in time domain
in
t
SymbolStart
;
//starting OFDM symbol of PRS resource in time domain
in
t
RBOffset
;
//Starting PRB index of all PRS resources in a PRS resource set.
in
t
CombSize
;
//RE density of all PRS resources in a PRS resource set. i∈{2,4,6,12}
in
t
REOffset
;
//Starting RE offset in the first OFDM symbol of each PRS resource in a PRS resource set.
in
t
MutingPattern1
[
2
];
//Muting bit pattern option-1, specified as [] or a binary-valued vector of length 2, 4, 6, 8, 16, or 32.
in
t
MutingPattern2
[
2
];
in
t
MutingBitRepetition
;
in
t
NPRSID
;
}
prs_data_t
;
typedef
struct
{
uint16_
t
PRSResourceSetPeriod
[
2
];
//[slot period, slot offset]
uint8_
t
PRSResourceOffset
;
// array if more than one resource sets.slot offset (0...511) (default 0)
uint8_
t
PRSResourceRepetition
;
// slot offset (1 (default), 2, 4, 6, 8, 16, 32)
uint8_
t
PRSResourceTimeGap
;
// slot offset (1 (default), 2, 4, 6, 8, 16, 32)
uint8_
t
NumRB
;
//number of RBs in freq domain a scalar =< 275 RB
uint8_
t
NumPRSSymbols
;
//number of PRS symbols in time domain
uint8_
t
SymbolStart
;
//starting OFDM symbol of PRS resource in time domain
uint8_
t
RBOffset
;
//Starting PRB index of all PRS resources in a PRS resource set.
uint8_
t
CombSize
;
//RE density of all PRS resources in a PRS resource set. i∈{2,4,6,12}
uint8_
t
REOffset
;
//Starting RE offset in the first OFDM symbol of each PRS resource in a PRS resource set.
uint32_
t
MutingPattern1
[
2
];
//Muting bit pattern option-1, specified as [] or a binary-valued vector of length 2, 4, 6, 8, 16, or 32.
uint32_
t
MutingPattern2
[
2
];
uint8_
t
MutingBitRepetition
;
uint16_
t
NPRSID
;
}
prs_data_t
;
//32bytes
#define KHz (1000UL)
#define MHz (1000*KHz)
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
cd352577
...
...
@@ -1674,7 +1674,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
ue->prs_vars[gNB_id]->prs_cfg.PRSResourceTimeGap=1;
ue->prs_vars[gNB_id]->prs_cfg.NPRSID=0;
*/
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
++
)
for
(
int
j
=
ue
->
prs_
start_symb
;
j
<
ue
->
prs_end_symb
;
j
++
)
{
nr_slot_fep
(
ue
,
proc
,
...
...
@@ -1683,7 +1683,8 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
}
//PRS channel estimation
nr_prs_channel_estimation
(
gNB_id
,
ue
,
proc
,
fp
);
for
(
int
gIdx
=
0
;
gIdx
<
ue
->
prs_active_gNBs
;
gIdx
++
)
nr_prs_channel_estimation
(
gIdx
,
ue
,
proc
,
fp
);
}
if
((
frame_rx
%
64
==
0
)
&&
(
nr_slot_rx
==
0
))
{
...
...
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
View file @
cd352577
...
...
@@ -1278,17 +1278,17 @@ void RCconfig_nr_ue_L1(void) {
void
RCconfig_nrUE_prs
(
void
*
cfg
)
{
int
j
=
0
,
gNB_id
=
0
;
int
j
=
0
,
gNB_id
=
0
,
prs_start
=
0
,
prs_end
=
0
;
char
aprefix
[
MAX_OPTNAME_SIZE
*
2
+
8
];
PHY_VARS_NR_UE
*
ue
=
(
PHY_VARS_NR_UE
*
)
cfg
;
paramlist_def_t
gParamList
=
{
CONFIG_STRING_PRS_LIST
,
NULL
,
0
};
paramdef_t
gParams
[]
=
PRS_GLOBAL_PARAMS_DESC
;
config_getlist
(
&
gParamList
,
gParams
,
sizeof
(
gParams
)
/
sizeof
(
paramdef_t
),
NULL
);
int
num_gnb
s
=
*
(
gParamList
.
paramarray
[
j
][
PRS_ACTIVE_GNBS_IDX
].
uptr
);
ue
->
prs_active_gNB
s
=
*
(
gParamList
.
paramarray
[
j
][
PRS_ACTIVE_GNBS_IDX
].
uptr
);
paramlist_def_t
PRS_ParamList
=
{{
0
},
NULL
,
0
};
for
(
int
i
=
0
;
i
<
num_gnb
s
;
i
++
)
for
(
int
i
=
0
;
i
<
ue
->
prs_active_gNB
s
;
i
++
)
{
paramdef_t
PRS_Params
[]
=
PRS_PARAMS_DESC
;
sprintf
(
PRS_ParamList
.
listname
,
"%s%i"
,
CONFIG_STRING_PRS_CONFIG
,
i
);
...
...
@@ -1311,9 +1311,18 @@ void RCconfig_nrUE_prs(void *cfg)
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
);
ue
->
prs_vars
[
gNB_id
]
->
prs_cfg
.
NPRSID
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_ID
].
uptr
);
if
(
gNB_id
==
0
)
{
prs_start
=
ue
->
prs_vars
[
gNB_id
]
->
prs_cfg
.
SymbolStart
;
prs_end
=
ue
->
prs_vars
[
gNB_id
]
->
prs_cfg
.
SymbolStart
+
ue
->
prs_vars
[
gNB_id
]
->
prs_cfg
.
NumPRSSymbols
;
}
else
{
prs_start
=
MIN
((
prs_start
),
(
ue
->
prs_vars
[
gNB_id
]
->
prs_cfg
.
SymbolStart
));
prs_end
=
MAX
((
prs_end
),
(
ue
->
prs_vars
[
gNB_id
]
->
prs_cfg
.
SymbolStart
+
ue
->
prs_vars
[
gNB_id
]
->
prs_cfg
.
NumPRSSymbols
));
}
LOG_I
(
PHY
,
"--------------------------
\n
"
);
LOG_I
(
PHY
,
"PRS Config for gNB_id %d
\n
"
,
gNB_id
);
LOG_I
(
PHY
,
"PRS Config for gNB_id %d
@ %p
\n
"
,
gNB_id
,
&
ue
->
prs_vars
[
gNB_id
]
->
prs_cfg
);
LOG_I
(
PHY
,
"--------------------------
\n
"
);
LOG_I
(
PHY
,
"PRSResourceSetPeriod0 %d
\n
"
,
ue
->
prs_vars
[
gNB_id
]
->
prs_cfg
.
PRSResourceSetPeriod
[
0
]);
LOG_I
(
PHY
,
"PRSResourceSetPeriod1 %d
\n
"
,
ue
->
prs_vars
[
gNB_id
]
->
prs_cfg
.
PRSResourceSetPeriod
[
1
]);
...
...
@@ -1335,4 +1344,7 @@ void RCconfig_nrUE_prs(void *cfg)
LOG_I
(
NR_PHY
,
"No %s configuration found
\n
"
,
PRS_ParamList
.
listname
);
}
}
ue
->
prs_start_symb
=
prs_start
;
ue
->
prs_end_symb
=
prs_end
;
LOG_I
(
PHY
,
"prs_active_gNBs %d, prs_start_symb %d, prs_end_symb %d
\n
"
,
ue
->
prs_active_gNBs
,
ue
->
prs_start_symb
,
ue
->
prs_end_symb
);
}
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