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
a5eda343
Commit
a5eda343
authored
Aug 05, 2022
by
Sagar Parsawar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. Fixed pbchsim build failure due to prs source file dependacy
2. Fixed GPS time assert in gNB_scheduler_uci.c
parent
26042030
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
190 additions
and
245 deletions
+190
-245
executables/nr-ue.c
executables/nr-ue.c
+161
-0
executables/nr-uesoftmodem.h
executables/nr-uesoftmodem.h
+2
-1
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+0
-50
openair1/PHY/NR_TRANSPORT/nr_prs.c
openair1/PHY/NR_TRANSPORT/nr_prs.c
+3
-8
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+1
-5
openair1/PHY/defs_nr_common.h
openair1/PHY/defs_nr_common.h
+8
-0
openair1/SIMULATION/NR_PHY/pbchsim.c
openair1/SIMULATION/NR_PHY/pbchsim.c
+7
-71
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+8
-8
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+0
-101
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h
+0
-1
No files found.
executables/nr-ue.c
View file @
a5eda343
...
...
@@ -34,6 +34,8 @@
#include "LAYER2/nr_pdcp/nr_pdcp_entity.h"
#include "SCHED_NR_UE/pucch_uci_ue_nr.h"
#include "openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h"
#include "openair2/GNB_APP/prs_nr_paramdef.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
/*
* NR SLOT PROCESSING SEQUENCE
...
...
@@ -150,6 +152,162 @@ static void *nrL1_UE_stats_thread(void *param)
return
NULL
;
}
void
RCconfig_nrUE_prs
(
void
*
cfg
)
{
int
j
=
0
,
k
=
0
,
gNB_id
=
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
);
ue
->
prs_active_gNBs
=
*
(
gParamList
.
paramarray
[
j
][
PRS_ACTIVE_GNBS_IDX
].
uptr
);
paramlist_def_t
PRS_ParamList
=
{{
0
},
NULL
,
0
};
for
(
int
i
=
0
;
i
<
ue
->
prs_active_gNBs
;
i
++
)
{
paramdef_t
PRS_Params
[]
=
PRS_PARAMS_DESC
;
sprintf
(
PRS_ParamList
.
listname
,
"%s%i"
,
CONFIG_STRING_PRS_CONFIG
,
i
);
sprintf
(
aprefix
,
"%s.[%i]"
,
CONFIG_STRING_PRS_LIST
,
0
);
config_getlist
(
&
PRS_ParamList
,
PRS_Params
,
sizeof
(
PRS_Params
)
/
sizeof
(
paramdef_t
),
aprefix
);
if
(
PRS_ParamList
.
numelt
>
0
)
{
for
(
j
=
0
;
j
<
PRS_ParamList
.
numelt
;
j
++
)
{
gNB_id
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_GNB_ID
].
uptr
);
if
(
gNB_id
!=
i
)
gNB_id
=
i
;
// force gNB_id to avoid mismatch
ue
->
prs_vars
[
gNB_id
]
->
NumPRSResources
=
*
(
PRS_ParamList
.
paramarray
[
j
][
NUM_PRS_RESOURCES
].
uptr
);
for
(
k
=
0
;
k
<
ue
->
prs_vars
[
gNB_id
]
->
NumPRSResources
;
k
++
)
{
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
PRSResourceSetPeriod
[
0
]
=
PRS_ParamList
.
paramarray
[
j
][
PRS_RESOURCE_SET_PERIOD_LIST
].
uptr
[
0
];
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
PRSResourceSetPeriod
[
1
]
=
PRS_ParamList
.
paramarray
[
j
][
PRS_RESOURCE_SET_PERIOD_LIST
].
uptr
[
1
];
// per PRS resources parameters
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
SymbolStart
=
PRS_ParamList
.
paramarray
[
j
][
PRS_SYMBOL_START_LIST
].
uptr
[
k
];
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
NumPRSSymbols
=
PRS_ParamList
.
paramarray
[
j
][
PRS_NUM_SYMBOLS_LIST
].
uptr
[
k
];
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
REOffset
=
PRS_ParamList
.
paramarray
[
j
][
PRS_RE_OFFSET_LIST
].
uptr
[
k
];
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
NPRSID
=
PRS_ParamList
.
paramarray
[
j
][
PRS_ID_LIST
].
uptr
[
k
];
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
PRSResourceOffset
=
PRS_ParamList
.
paramarray
[
j
][
PRS_RESOURCE_OFFSET_LIST
].
uptr
[
k
];
// Common parameters to all PRS resources
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
NumRB
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_NUM_RB
].
uptr
);
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
RBOffset
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_RB_OFFSET
].
uptr
);
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
CombSize
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_COMB_SIZE
].
uptr
);
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
PRSResourceRepetition
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_RESOURCE_REPETITION
].
uptr
);
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
PRSResourceTimeGap
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_RESOURCE_TIME_GAP
].
uptr
);
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
MutingBitRepetition
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_MUTING_BIT_REPETITION
].
uptr
);
for
(
int
l
=
0
;
l
<
PRS_ParamList
.
paramarray
[
j
][
PRS_MUTING_PATTERN1_LIST
].
numelt
;
l
++
)
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
MutingPattern1
[
l
]
=
PRS_ParamList
.
paramarray
[
j
][
PRS_MUTING_PATTERN1_LIST
].
uptr
[
l
];
for
(
int
l
=
0
;
l
<
PRS_ParamList
.
paramarray
[
j
][
PRS_MUTING_PATTERN2_LIST
].
numelt
;
l
++
)
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
MutingPattern2
[
l
]
=
PRS_ParamList
.
paramarray
[
j
][
PRS_MUTING_PATTERN2_LIST
].
uptr
[
l
];
}
// for k
k
=
0
;
LOG_I
(
PHY
,
"-----------------------------------------
\n
"
);
LOG_I
(
PHY
,
"PRS Config for gNB_id %d @ %p
\n
"
,
gNB_id
,
&
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
);
LOG_I
(
PHY
,
"-----------------------------------------
\n
"
);
LOG_I
(
PHY
,
"NumPRSResources
\t
%d
\n
"
,
ue
->
prs_vars
[
gNB_id
]
->
NumPRSResources
);
LOG_I
(
PHY
,
"PRSResourceSetPeriod
\t
[%d, %d]
\n
"
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
PRSResourceSetPeriod
[
0
],
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
PRSResourceSetPeriod
[
1
]);
LOG_I
(
PHY
,
"NumRB
\t\t\t
%d
\n
"
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
NumRB
);
LOG_I
(
PHY
,
"RBOffset
\t\t
%d
\n
"
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
RBOffset
);
LOG_I
(
PHY
,
"CombSize
\t\t
%d
\n
"
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
CombSize
);
LOG_I
(
PHY
,
"PRSResourceRepetition
\t
%d
\n
"
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
PRSResourceRepetition
);
LOG_I
(
PHY
,
"PRSResourceTimeGap
\t
%d
\n
"
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
PRSResourceTimeGap
);
LOG_I
(
PHY
,
"MutingBitRepetition
\t
%d
\n
"
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
MutingBitRepetition
);
LOG_I
(
PHY
,
"SymbolStart
\t\t
["
);
for
(
k
=
0
;
k
<
ue
->
prs_vars
[
gNB_id
]
->
NumPRSResources
;
k
++
)
printf
(
"%d, "
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
SymbolStart
);
printf
(
"
\b\b
]
\n
"
);
LOG_I
(
PHY
,
"NumPRSSymbols
\t\t
["
);
for
(
k
=
0
;
k
<
ue
->
prs_vars
[
gNB_id
]
->
NumPRSResources
;
k
++
)
printf
(
"%d, "
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
NumPRSSymbols
);
printf
(
"
\b\b
]
\n
"
);
LOG_I
(
PHY
,
"REOffset
\t\t
["
);
for
(
k
=
0
;
k
<
ue
->
prs_vars
[
gNB_id
]
->
NumPRSResources
;
k
++
)
printf
(
"%d, "
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
REOffset
);
printf
(
"
\b\b
]
\n
"
);
LOG_I
(
PHY
,
"PRSResourceOffset
\t
["
);
for
(
k
=
0
;
k
<
ue
->
prs_vars
[
gNB_id
]
->
NumPRSResources
;
k
++
)
printf
(
"%d, "
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
PRSResourceOffset
);
printf
(
"
\b\b
]
\n
"
);
LOG_I
(
PHY
,
"NPRS_ID
\t\t
["
);
for
(
k
=
0
;
k
<
ue
->
prs_vars
[
gNB_id
]
->
NumPRSResources
;
k
++
)
printf
(
"%d, "
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
NPRSID
);
printf
(
"
\b\b
]
\n
"
);
LOG_I
(
PHY
,
"MutingPattern1
\t\t
["
);
for
(
int
l
=
0
,
k
=
0
;
l
<
PRS_ParamList
.
paramarray
[
j
][
PRS_MUTING_PATTERN1_LIST
].
numelt
;
l
++
)
printf
(
"%d, "
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
MutingPattern1
[
l
]);
printf
(
"
\b\b
]
\n
"
);
LOG_I
(
PHY
,
"MutingPattern2
\t\t
["
);
for
(
int
l
=
0
,
k
=
0
;
l
<
PRS_ParamList
.
paramarray
[
j
][
PRS_MUTING_PATTERN2_LIST
].
numelt
;
l
++
)
printf
(
"%d, "
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
MutingPattern2
[
l
]);
printf
(
"
\b\b
]
\n
"
);
LOG_I
(
PHY
,
"-----------------------------------------
\n
"
);
}
}
else
{
LOG_I
(
NR_PHY
,
"No %s configuration found
\n
"
,
PRS_ParamList
.
listname
);
}
}
}
void
init_nr_prs_ue_vars
(
PHY_VARS_NR_UE
*
ue
)
{
NR_UE_PRS
**
const
prs_vars
=
ue
->
prs_vars
;
NR_DL_FRAME_PARMS
*
const
fp
=
&
ue
->
frame_parms
;
// PRS vars init
for
(
int
idx
=
0
;
idx
<
NR_MAX_PRS_COMB_SIZE
;
idx
++
)
{
prs_vars
[
idx
]
=
(
NR_UE_PRS
*
)
malloc16_clear
(
sizeof
(
NR_UE_PRS
));
for
(
int
k
=
0
;
k
<
NR_MAX_PRS_RESOURCES_PER_SET
;
k
++
)
{
// PRS channel estimates
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_ch_estimates
=
(
int32_t
**
)
malloc16_clear
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_ch_estimates_time
=
(
int32_t
**
)
malloc16_clear
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
AssertFatal
(((
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_ch_estimates
!=
NULL
)
||
(
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_ch_estimates_time
!=
NULL
)),
"NR UE init: PRS channel estimates malloc failed for gNB_id %d
\n
"
,
idx
);
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_meas
=
(
prs_meas_t
**
)
malloc16_clear
(
fp
->
nb_antennas_rx
*
sizeof
(
prs_meas_t
*
)
);
AssertFatal
((
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_meas
!=
NULL
),
"NR UE init: PRS measurements malloc failed for gNB_id %d
\n
"
,
idx
);
for
(
int
i
=
0
;
i
<
fp
->
nb_antennas_rx
;
i
++
)
{
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_ch_estimates
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
ofdm_symbol_size
*
sizeof
(
int32_t
));
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_ch_estimates_time
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
ofdm_symbol_size
*
sizeof
(
int32_t
));
AssertFatal
(((
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_ch_estimates
[
i
]
!=
NULL
)
||
(
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_ch_estimates_time
[
i
]
!=
NULL
)),
"NR UE init: PRS channel estimates malloc failed for rx_ant %d
\n
"
,
i
);
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_meas
[
i
]
=
(
prs_meas_t
*
)
malloc16_clear
(
sizeof
(
prs_meas_t
)
);
AssertFatal
((
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_meas
[
i
]
!=
NULL
),
"NR UE init: PRS measurements malloc failed for rx_ant %d
\n
"
,
i
);
}
}
}
// load the config file params
RCconfig_nrUE_prs
(
ue
);
//PRS sequence init
ue
->
nr_gold_prs
=
(
uint32_t
*****
)
malloc16
(
ue
->
prs_active_gNBs
*
sizeof
(
uint32_t
****
));
uint32_t
*****
prs
=
ue
->
nr_gold_prs
;
AssertFatal
(
prs
!=
NULL
,
"NR UE init: positioning reference signal malloc failed
\n
"
);
for
(
int
gnb
=
0
;
gnb
<
ue
->
prs_active_gNBs
;
gnb
++
)
{
prs
[
gnb
]
=
(
uint32_t
****
)
malloc16
(
ue
->
prs_vars
[
gnb
]
->
NumPRSResources
*
sizeof
(
uint32_t
***
));
AssertFatal
(
prs
[
gnb
]
!=
NULL
,
"NR UE init: positioning reference signal for gnb %d - malloc failed
\n
"
,
gnb
);
for
(
int
rsc
=
0
;
rsc
<
ue
->
prs_vars
[
gnb
]
->
NumPRSResources
;
rsc
++
)
{
prs
[
gnb
][
rsc
]
=
(
uint32_t
***
)
malloc16
(
fp
->
slots_per_frame
*
sizeof
(
uint32_t
**
));
AssertFatal
(
prs
[
gnb
][
rsc
]
!=
NULL
,
"NR UE init: positioning reference signal for gnb %d rsc %d- malloc failed
\n
"
,
gnb
,
rsc
);
for
(
int
slot
=
0
;
slot
<
fp
->
slots_per_frame
;
slot
++
)
{
prs
[
gnb
][
rsc
][
slot
]
=
(
uint32_t
**
)
malloc16
(
fp
->
symbols_per_slot
*
sizeof
(
uint32_t
*
));
AssertFatal
(
prs
[
gnb
][
rsc
][
slot
]
!=
NULL
,
"NR UE init: positioning reference signal for gnb %d rsc %d slot %d - malloc failed
\n
"
,
gnb
,
rsc
,
slot
);
for
(
int
symb
=
0
;
symb
<
fp
->
symbols_per_slot
;
symb
++
)
{
prs
[
gnb
][
rsc
][
slot
][
symb
]
=
(
uint32_t
*
)
malloc16
(
NR_MAX_PRS_INIT_LENGTH_DWORD
*
sizeof
(
uint32_t
));
AssertFatal
(
prs
[
gnb
][
rsc
][
slot
][
symb
]
!=
NULL
,
"NR UE init: positioning reference signal for gnb %d rsc %d slot %d symbol %d - malloc failed
\n
"
,
gnb
,
rsc
,
slot
,
symb
);
}
// for symb
}
// for slot
}
// for rsc
}
// for gnb
init_nr_gold_prs
(
ue
);
}
void
init_nr_ue_vars
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
UE_id
,
uint8_t
abstraction_flag
)
...
...
@@ -168,6 +326,9 @@ void init_nr_ue_vars(PHY_VARS_NR_UE *ue,
ue
->
prach_resources
[
gNB_id
]
=
(
NR_PRACH_RESOURCES_t
*
)
malloc16_clear
(
sizeof
(
NR_PRACH_RESOURCES_t
));
}
// initialize nr prs vars
init_nr_prs_ue_vars
(
ue
);
// initialize all signal buffers
init_nr_ue_signal
(
ue
,
nb_connected_gNB
);
...
...
executables/nr-uesoftmodem.h
View file @
a5eda343
...
...
@@ -100,5 +100,6 @@ extern void start_oai_nrue_threads(void);
void
*
UE_thread
(
void
*
arg
);
void
init_nr_ue_vars
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
UE_id
,
uint8_t
abstraction_flag
);
void
init_nrUE_standalone_thread
(
int
ue_idx
);
void
RCconfig_nrUE_prs
(
void
*
cfg
);
void
init_nr_prs_ue_vars
(
PHY_VARS_NR_UE
*
ue
);
#endif
openair1/PHY/INIT/nr_init_ue.c
View file @
a5eda343
...
...
@@ -141,7 +141,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
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
;
NR_UE_CSI_IM
**
const
csiim_vars
=
ue
->
csiim_vars
;
NR_UE_CSI_RS
**
const
csirs_vars
=
ue
->
csirs_vars
;
...
...
@@ -191,55 +190,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
///////////
////////////////////////////////////////////////////////////////////////////////////////////
// PRS vars
for
(
int
idx
=
0
;
idx
<
NR_MAX_PRS_COMB_SIZE
;
idx
++
)
{
prs_vars
[
idx
]
=
(
NR_UE_PRS
*
)
malloc16_clear
(
sizeof
(
NR_UE_PRS
));
for
(
int
k
=
0
;
k
<
NR_MAX_PRS_RESOURCES_PER_SET
;
k
++
)
{
// PRS channel estimates
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_ch_estimates
=
(
int32_t
**
)
malloc16_clear
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_ch_estimates_time
=
(
int32_t
**
)
malloc16_clear
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
AssertFatal
(((
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_ch_estimates
!=
NULL
)
||
(
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_ch_estimates_time
!=
NULL
)),
"NR UE init: PRS channel estimates malloc failed for gNB_id %d
\n
"
,
idx
);
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_meas
=
(
prs_meas_t
**
)
malloc16_clear
(
fp
->
nb_antennas_rx
*
sizeof
(
prs_meas_t
*
)
);
AssertFatal
((
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_meas
!=
NULL
),
"NR UE init: PRS measurements malloc failed for gNB_id %d
\n
"
,
idx
);
for
(
i
=
0
;
i
<
fp
->
nb_antennas_rx
;
i
++
)
{
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_ch_estimates
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
ofdm_symbol_size
*
sizeof
(
int32_t
));
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_ch_estimates_time
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
ofdm_symbol_size
*
sizeof
(
int32_t
));
AssertFatal
(((
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_ch_estimates
[
i
]
!=
NULL
)
||
(
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_ch_estimates_time
[
i
]
!=
NULL
)),
"NR UE init: PRS channel estimates malloc failed for rx_ant %d
\n
"
,
i
);
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_meas
[
i
]
=
(
prs_meas_t
*
)
malloc16_clear
(
sizeof
(
prs_meas_t
)
);
AssertFatal
((
prs_vars
[
idx
]
->
prs_resource
[
k
].
prs_meas
[
i
]
!=
NULL
),
"NR UE init: PRS measurements malloc failed for rx_ant %d
\n
"
,
i
);
}
}
}
// load the config file params
RCconfig_nrUE_prs
(
ue
);
//PRS sequence init
ue
->
nr_gold_prs
=
(
uint32_t
*****
)
malloc16
(
ue
->
prs_active_gNBs
*
sizeof
(
uint32_t
****
));
uint32_t
*****
prs
=
ue
->
nr_gold_prs
;
AssertFatal
(
prs
!=
NULL
,
"NR UE init: positioning reference signal malloc failed
\n
"
);
for
(
int
gnb
=
0
;
gnb
<
ue
->
prs_active_gNBs
;
gnb
++
)
{
prs
[
gnb
]
=
(
uint32_t
****
)
malloc16
(
ue
->
prs_vars
[
gnb
]
->
NumPRSResources
*
sizeof
(
uint32_t
***
));
AssertFatal
(
prs
[
gnb
]
!=
NULL
,
"NR UE init: positioning reference signal for gnb %d - malloc failed
\n
"
,
gnb
);
for
(
int
rsc
=
0
;
rsc
<
ue
->
prs_vars
[
gnb
]
->
NumPRSResources
;
rsc
++
)
{
prs
[
gnb
][
rsc
]
=
(
uint32_t
***
)
malloc16
(
fp
->
slots_per_frame
*
sizeof
(
uint32_t
**
));
AssertFatal
(
prs
[
gnb
][
rsc
]
!=
NULL
,
"NR UE init: positioning reference signal for gnb %d rsc %d- malloc failed
\n
"
,
gnb
,
rsc
);
for
(
int
slot
=
0
;
slot
<
fp
->
slots_per_frame
;
slot
++
)
{
prs
[
gnb
][
rsc
][
slot
]
=
(
uint32_t
**
)
malloc16
(
fp
->
symbols_per_slot
*
sizeof
(
uint32_t
*
));
AssertFatal
(
prs
[
gnb
][
rsc
][
slot
]
!=
NULL
,
"NR UE init: positioning reference signal for gnb %d rsc %d slot %d - malloc failed
\n
"
,
gnb
,
rsc
,
slot
);
for
(
int
symb
=
0
;
symb
<
fp
->
symbols_per_slot
;
symb
++
)
{
prs
[
gnb
][
rsc
][
slot
][
symb
]
=
(
uint32_t
*
)
malloc16
(
NR_MAX_PRS_INIT_LENGTH_DWORD
*
sizeof
(
uint32_t
));
AssertFatal
(
prs
[
gnb
][
rsc
][
slot
][
symb
]
!=
NULL
,
"NR UE init: positioning reference signal for gnb %d rsc %d slot %d symbol %d - malloc failed
\n
"
,
gnb
,
rsc
,
slot
,
symb
);
}
// for symb
}
// for slot
}
// for rsc
}
// for gnb
init_nr_gold_prs
(
ue
);
/////////////////////////PUSCH DMRS init/////////////////////////
///////////
...
...
openair1/PHY/NR_TRANSPORT/nr_prs.c
View file @
a5eda343
...
...
@@ -8,11 +8,6 @@
//#define DEBUG_PRS_MAP
extern
short
nr_qpsk_mod_table
[
8
];
int
k_prime_table
[
4
][
12
]
=
{
{
0
,
1
,
0
,
1
,
0
,
1
,
0
,
1
,
0
,
1
,
0
,
1
},
{
0
,
2
,
1
,
3
,
0
,
2
,
1
,
3
,
0
,
2
,
1
,
3
},
{
0
,
3
,
1
,
4
,
2
,
5
,
0
,
3
,
1
,
4
,
2
,
5
},
{
0
,
6
,
3
,
9
,
1
,
7
,
4
,
10
,
2
,
8
,
5
,
11
}};
int
nr_generate_prs
(
uint32_t
**
nr_gold_prs
,
int32_t
*
txdataF
,
...
...
@@ -22,9 +17,9 @@ int nr_generate_prs(uint32_t **nr_gold_prs,
NR_DL_FRAME_PARMS
*
frame_parms
)
{
int
k_prime
=
0
,
k
=
0
;
int
k_prime
=
0
,
k
=
0
,
idx
;
int16_t
mod_prs
[
NR_MAX_PRS_LENGTH
<<
1
];
uint8_t
idx
;
int16_t
k_prime_table
[
K_PRIME_TABLE_ROW_SIZE
][
K_PRIME_TABLE_COL_SIZE
]
=
PRS_K_PRIME_TABLE
;
// PRS resource mapping with combsize=k which means PRS symbols exist in every k-th subcarrier in frequency domain
// According to ts138.211 sec.7.4.1.7.2
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
a5eda343
...
...
@@ -40,11 +40,6 @@
//#define DEBUG_PRS_PRINTS
#define IDFT_INTERPOL_FACTOR 1
extern
short
nr_qpsk_mod_table
[
8
];
int
k_prime_table
[
4
][
12
]
=
{
{
0
,
1
,
0
,
1
,
0
,
1
,
0
,
1
,
0
,
1
,
0
,
1
},
{
0
,
2
,
1
,
3
,
0
,
2
,
1
,
3
,
0
,
2
,
1
,
3
},
{
0
,
3
,
1
,
4
,
2
,
5
,
0
,
3
,
1
,
4
,
2
,
5
},
{
0
,
6
,
3
,
9
,
1
,
7
,
4
,
10
,
2
,
8
,
5
,
11
}};
static
inline
int
abs32
(
int
x
)
{
...
...
@@ -85,6 +80,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
int16_t
num_pilots
=
(
12
/
prs_cfg
->
CombSize
)
*
prs_cfg
->
NumRB
;
int16_t
start_offset
=
(
IDFT_INTERPOL_FACTOR
-
1
)
*
frame_params
->
ofdm_symbol_size
>>
1
;
int16_t
k_prime_table
[
K_PRIME_TABLE_ROW_SIZE
][
K_PRIME_TABLE_COL_SIZE
]
=
PRS_K_PRIME_TABLE
;
for
(
int
l
=
prs_cfg
->
SymbolStart
;
l
<
prs_cfg
->
SymbolStart
+
prs_cfg
->
NumPRSSymbols
;
l
++
)
{
int
symInd
=
l
-
prs_cfg
->
SymbolStart
;
...
...
openair1/PHY/defs_nr_common.h
View file @
a5eda343
...
...
@@ -418,6 +418,14 @@ typedef struct {
int32_t
reserved
;
}
prs_meas_t
;
// rel16 prs k_prime table as per ts138.211 sec.7.4.1.7.2
#define K_PRIME_TABLE_ROW_SIZE 4
#define K_PRIME_TABLE_COL_SIZE 12
#define PRS_K_PRIME_TABLE { {0,1,0,1,0,1,0,1,0,1,0,1}, \
{0,2,1,3,0,2,1,3,0,2,1,3}, \
{0,3,1,4,2,5,0,3,1,4,2,5}, \
{0,6,3,9,1,7,4,10,2,8,5,11} };
#define KHz (1000UL)
#define MHz (1000*KHz)
...
...
openair1/SIMULATION/NR_PHY/pbchsim.c
View file @
a5eda343
...
...
@@ -160,7 +160,6 @@ int main(int argc, char **argv)
int
**
txdata
;
double
**
s_re
,
**
s_im
,
**
r_re
,
**
r_im
;
//double iqim = 0.0;
double
DS_TDL
=
.
03
;
double
ip
=
0
.
0
;
//unsigned char pbch_pdu[6];
// int sync_pos, sync_pos_slot;
...
...
@@ -275,21 +274,6 @@ int main(int argc, char **argv)
channel_model
=
ETU
;
break
;
case
'H'
:
channel_model
=
TDL_C
;
DS_TDL
=
.
030
;
// 30 ns
break
;
case
'I'
:
channel_model
=
TDL_C
;
DS_TDL
=
.
3
;
// 300ns
break
;
case
'J'
:
channel_model
=
TDL_D
;
DS_TDL
=
.
03
;
break
;
default:
printf
(
"Unsupported channel model! Exiting.
\n
"
);
exit
(
-
1
);
...
...
@@ -545,8 +529,10 @@ int main(int argc, char **argv)
channel_model
,
fs
,
bw
,
DS_TDL
,
0
,
0
,
0
,
0
);
300e-9
,
0
,
0
,
0
,
0
);
if
(
gNB2UE
==
NULL
)
{
printf
(
"Problem generating channel model. Exiting.
\n
"
);
...
...
@@ -689,16 +675,6 @@ int main(int argc, char **argv)
frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples);
printf("txlev %d (%f)\n",txlev,10*log10(txlev));*/
<<<<<<<
HEAD
for
(
i
=
0
;
i
<
frame_length_complex_samples
;
i
++
)
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
s_re
[
aa
][
i
]
=
((
double
)(((
short
*
)
txdata
[
aa
]))[(
i
<<
1
)]);
s_im
[
aa
][
i
]
=
((
double
)(((
short
*
)
txdata
[
aa
]))[(
i
<<
1
)
+
1
]);
}
}
=======
>>>>>>>
origin
/
develop
for
(
SNR
=
snr0
;
SNR
<
snr1
;
SNR
+=
.
2
)
{
...
...
@@ -707,19 +683,6 @@ int main(int argc, char **argv)
for
(
trial
=
0
;
trial
<
n_trials
;
trial
++
)
{
<<<<<<<
HEAD
if
(
channel_model
!=
AWGN
)
{
// multipath channel
multipath_channel
(
gNB2UE
,
s_re
,
s_im
,
r_re
,
r_im
,
frame_length_complex_samples
,
0
,
0
);
}
else
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
memcpy
(
r_re
[
aa
],
s_re
[
aa
],
frame_length_complex_samples
*
sizeof
(
double
));
memcpy
(
r_im
[
aa
],
s_im
[
aa
],
frame_length_complex_samples
*
sizeof
(
double
));
}
}
=======
for
(
i
=
0
;
i
<
frame_length_complex_samples
;
i
++
)
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
r_re
[
aa
][
i
]
=
((
double
)(((
short
*
)
txdata
[
aa
]))[(
i
<<
1
)]);
...
...
@@ -730,7 +693,6 @@ int main(int argc, char **argv)
// multipath channel
//multipath_channel(gNB2UE,s_re,s_im,r_re,r_im,frame_length_complex_samples,0);
>>>>>>>
origin
/
develop
//AWGN
sigma2_dB
=
20
*
log10
((
double
)
AMP
/
4
)
-
SNR
;
sigma2
=
pow
(
10
,
sigma2_dB
/
10
);
...
...
@@ -787,43 +749,17 @@ int main(int argc, char **argv)
UE
->
symbol_offset
=
nr_get_ssb_start_symbol
(
frame_parms
,
ssb_index
);
int
ssb_slot
=
(
UE
->
symbol_offset
/
14
)
+
(
n_hf
*
(
frame_parms
->
slots_per_frame
>>
1
));
for
(
int
j
=
0
;
j
<
frame_parms
->
symbols_per_slot
;
j
++
)
{
for
(
int
i
=
UE
->
symbol_offset
+
1
;
i
<
UE
->
symbol_offset
+
4
;
i
++
)
{
nr_slot_fep
(
UE
,
&
proc
,
j
%
frame_parms
->
symbols_per_slot
,
i
%
frame_parms
->
symbols_per_slot
,
ssb_slot
);
}
<<<<<<<
HEAD
for
(
int
i
=
UE
->
symbol_offset
+
1
;
i
<
UE
->
symbol_offset
+
4
;
i
++
)
{
nr_pbch_channel_estimation
(
UE
,
&
proc
,
0
,
ssb_slot
,
i
%
frame_parms
->
symbols_per_slot
,
i
-
(
UE
->
symbol_offset
+
1
),
ssb_index
%
8
,
n_hf
);
}
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
=
frame_parms
->
N_RB_DL
;
UE
->
prs_cfg
.
RBOffset
=
0
;
UE
->
prs_cfg
.
CombSize
=
2
;
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
;
//PRS channel estimation
nr_prs_channel_estimation
(
UE
,
&
proc
,
frame_parms
);
=======
nr_pbch_channel_estimation
(
UE
,
estimateSz
,
dl_ch_estimates
,
dl_ch_estimates_time
,
&
proc
,
0
,
ssb_slot
,
i
%
frame_parms
->
symbols_per_slot
,
i
-
(
UE
->
symbol_offset
+
1
),
ssb_index
%
8
,
n_hf
);
}
fapiPbch_t
result
;
>>>>>>>
origin
/
develop
ret
=
nr_rx_pbch
(
UE
,
&
proc
,
estimateSz
,
dl_ch_estimates
,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
a5eda343
...
...
@@ -47,9 +47,9 @@ static void nr_fill_nfapi_pucch(gNB_MAC_INST *nrmac,
{
nfapi_nr_ul_tti_request_t
*
future_ul_tti_req
=
&
nrmac
->
UL_tti_req_ahead
[
0
][
pucch
->
ul_slot
];
AssertFatal
(
future_ul_tti_req
->
SFN
==
pucch
->
frame
&&
future_ul_tti_req
->
Slot
==
pucch
->
ul_slot
,
"Current %4d.%2
d : future UL_tti_req's frame.slot %4d.%2d does not match PUCCH %4d.%2d
\n
"
,
if
(
future_ul_tti_req
->
SFN
!=
pucch
->
frame
||
future_ul_tti_req
->
Slot
!=
pucch
->
ul_slot
)
LOG_W
(
MAC
,
"Current %d.%
d : future UL_tti_req's frame.slot %4d.%2d does not match PUCCH %4d.%2d
\n
"
,
frame
,
slot
,
future_ul_tti_req
->
SFN
,
future_ul_tti_req
->
Slot
,
...
...
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
View file @
a5eda343
...
...
@@ -44,7 +44,6 @@
#include "openair2/RRC/NR_UE/rrc_proto.h"
#include "openair2/RRC/NR_UE/rrc_vars.h"
#include "openair2/GNB_APP/L1_nr_paramdef.h"
#include "openair2/GNB_APP/prs_nr_paramdef.h"
#include "openair2/GNB_APP/gnb_paramdef.h"
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
#include <stdio.h>
...
...
@@ -1343,103 +1342,3 @@ void RCconfig_nr_ue_L1(void) {
}
}
}
void
RCconfig_nrUE_prs
(
void
*
cfg
)
{
int
j
=
0
,
k
=
0
,
gNB_id
=
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
);
ue
->
prs_active_gNBs
=
*
(
gParamList
.
paramarray
[
j
][
PRS_ACTIVE_GNBS_IDX
].
uptr
);
paramlist_def_t
PRS_ParamList
=
{{
0
},
NULL
,
0
};
for
(
int
i
=
0
;
i
<
ue
->
prs_active_gNBs
;
i
++
)
{
paramdef_t
PRS_Params
[]
=
PRS_PARAMS_DESC
;
sprintf
(
PRS_ParamList
.
listname
,
"%s%i"
,
CONFIG_STRING_PRS_CONFIG
,
i
);
sprintf
(
aprefix
,
"%s.[%i]"
,
CONFIG_STRING_PRS_LIST
,
0
);
config_getlist
(
&
PRS_ParamList
,
PRS_Params
,
sizeof
(
PRS_Params
)
/
sizeof
(
paramdef_t
),
aprefix
);
if
(
PRS_ParamList
.
numelt
>
0
)
{
for
(
j
=
0
;
j
<
PRS_ParamList
.
numelt
;
j
++
)
{
gNB_id
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_GNB_ID
].
uptr
);
if
(
gNB_id
!=
i
)
gNB_id
=
i
;
// force gNB_id to avoid mismatch
ue
->
prs_vars
[
gNB_id
]
->
NumPRSResources
=
*
(
PRS_ParamList
.
paramarray
[
j
][
NUM_PRS_RESOURCES
].
uptr
);
for
(
k
=
0
;
k
<
ue
->
prs_vars
[
gNB_id
]
->
NumPRSResources
;
k
++
)
{
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
PRSResourceSetPeriod
[
0
]
=
PRS_ParamList
.
paramarray
[
j
][
PRS_RESOURCE_SET_PERIOD_LIST
].
uptr
[
0
];
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
PRSResourceSetPeriod
[
1
]
=
PRS_ParamList
.
paramarray
[
j
][
PRS_RESOURCE_SET_PERIOD_LIST
].
uptr
[
1
];
// per PRS resources parameters
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
SymbolStart
=
PRS_ParamList
.
paramarray
[
j
][
PRS_SYMBOL_START_LIST
].
uptr
[
k
];
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
NumPRSSymbols
=
PRS_ParamList
.
paramarray
[
j
][
PRS_NUM_SYMBOLS_LIST
].
uptr
[
k
];
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
REOffset
=
PRS_ParamList
.
paramarray
[
j
][
PRS_RE_OFFSET_LIST
].
uptr
[
k
];
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
NPRSID
=
PRS_ParamList
.
paramarray
[
j
][
PRS_ID_LIST
].
uptr
[
k
];
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
PRSResourceOffset
=
PRS_ParamList
.
paramarray
[
j
][
PRS_RESOURCE_OFFSET_LIST
].
uptr
[
k
];
// Common parameters to all PRS resources
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
NumRB
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_NUM_RB
].
uptr
);
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
RBOffset
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_RB_OFFSET
].
uptr
);
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
CombSize
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_COMB_SIZE
].
uptr
);
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
PRSResourceRepetition
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_RESOURCE_REPETITION
].
uptr
);
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
PRSResourceTimeGap
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_RESOURCE_TIME_GAP
].
uptr
);
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
MutingBitRepetition
=
*
(
PRS_ParamList
.
paramarray
[
j
][
PRS_MUTING_BIT_REPETITION
].
uptr
);
for
(
int
l
=
0
;
l
<
PRS_ParamList
.
paramarray
[
j
][
PRS_MUTING_PATTERN1_LIST
].
numelt
;
l
++
)
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
MutingPattern1
[
l
]
=
PRS_ParamList
.
paramarray
[
j
][
PRS_MUTING_PATTERN1_LIST
].
uptr
[
l
];
for
(
int
l
=
0
;
l
<
PRS_ParamList
.
paramarray
[
j
][
PRS_MUTING_PATTERN2_LIST
].
numelt
;
l
++
)
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
MutingPattern2
[
l
]
=
PRS_ParamList
.
paramarray
[
j
][
PRS_MUTING_PATTERN2_LIST
].
uptr
[
l
];
}
// for k
k
=
0
;
LOG_I
(
PHY
,
"-----------------------------------------
\n
"
);
LOG_I
(
PHY
,
"PRS Config for gNB_id %d @ %p
\n
"
,
gNB_id
,
&
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
);
LOG_I
(
PHY
,
"-----------------------------------------
\n
"
);
LOG_I
(
PHY
,
"NumPRSResources
\t
%d
\n
"
,
ue
->
prs_vars
[
gNB_id
]
->
NumPRSResources
);
LOG_I
(
PHY
,
"PRSResourceSetPeriod
\t
[%d, %d]
\n
"
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
PRSResourceSetPeriod
[
0
],
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
PRSResourceSetPeriod
[
1
]);
LOG_I
(
PHY
,
"NumRB
\t\t\t
%d
\n
"
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
NumRB
);
LOG_I
(
PHY
,
"RBOffset
\t\t
%d
\n
"
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
RBOffset
);
LOG_I
(
PHY
,
"CombSize
\t\t
%d
\n
"
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
CombSize
);
LOG_I
(
PHY
,
"PRSResourceRepetition
\t
%d
\n
"
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
PRSResourceRepetition
);
LOG_I
(
PHY
,
"PRSResourceTimeGap
\t
%d
\n
"
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
PRSResourceTimeGap
);
LOG_I
(
PHY
,
"MutingBitRepetition
\t
%d
\n
"
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
MutingBitRepetition
);
LOG_I
(
PHY
,
"SymbolStart
\t\t
["
);
for
(
k
=
0
;
k
<
ue
->
prs_vars
[
gNB_id
]
->
NumPRSResources
;
k
++
)
printf
(
"%d, "
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
SymbolStart
);
printf
(
"
\b\b
]
\n
"
);
LOG_I
(
PHY
,
"NumPRSSymbols
\t\t
["
);
for
(
k
=
0
;
k
<
ue
->
prs_vars
[
gNB_id
]
->
NumPRSResources
;
k
++
)
printf
(
"%d, "
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
NumPRSSymbols
);
printf
(
"
\b\b
]
\n
"
);
LOG_I
(
PHY
,
"REOffset
\t\t
["
);
for
(
k
=
0
;
k
<
ue
->
prs_vars
[
gNB_id
]
->
NumPRSResources
;
k
++
)
printf
(
"%d, "
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
REOffset
);
printf
(
"
\b\b
]
\n
"
);
LOG_I
(
PHY
,
"PRSResourceOffset
\t
["
);
for
(
k
=
0
;
k
<
ue
->
prs_vars
[
gNB_id
]
->
NumPRSResources
;
k
++
)
printf
(
"%d, "
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
PRSResourceOffset
);
printf
(
"
\b\b
]
\n
"
);
LOG_I
(
PHY
,
"NPRS_ID
\t\t
["
);
for
(
k
=
0
;
k
<
ue
->
prs_vars
[
gNB_id
]
->
NumPRSResources
;
k
++
)
printf
(
"%d, "
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
NPRSID
);
printf
(
"
\b\b
]
\n
"
);
LOG_I
(
PHY
,
"MutingPattern1
\t\t
["
);
for
(
int
l
=
0
,
k
=
0
;
l
<
PRS_ParamList
.
paramarray
[
j
][
PRS_MUTING_PATTERN1_LIST
].
numelt
;
l
++
)
printf
(
"%d, "
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
MutingPattern1
[
l
]);
printf
(
"
\b\b
]
\n
"
);
LOG_I
(
PHY
,
"MutingPattern2
\t\t
["
);
for
(
int
l
=
0
,
k
=
0
;
l
<
PRS_ParamList
.
paramarray
[
j
][
PRS_MUTING_PATTERN2_LIST
].
numelt
;
l
++
)
printf
(
"%d, "
,
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
k
].
prs_cfg
.
MutingPattern2
[
l
]);
printf
(
"
\b\b
]
\n
"
);
LOG_I
(
PHY
,
"-----------------------------------------
\n
"
);
}
}
else
{
LOG_I
(
NR_PHY
,
"No %s configuration found
\n
"
,
PRS_ParamList
.
listname
);
}
}
}
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h
View file @
a5eda343
...
...
@@ -284,7 +284,6 @@ int handle_bcch_dlsch(module_id_t module_id, int cc_id, unsigned int gNB_index,
int
handle_dci
(
module_id_t
module_id
,
int
cc_id
,
unsigned
int
gNB_index
,
frame_t
frame
,
int
slot
,
fapi_nr_dci_indication_pdu_t
*
dci
);
void
RCconfig_nrUE_prs
(
void
*
cfg
);
#endif
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