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
dbe5d2ed
Commit
dbe5d2ed
authored
Apr 29, 2026
by
Yan Kuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get CSI-RS
parent
2c4dac7b
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
335 additions
and
14 deletions
+335
-14
CMakeLists.txt
CMakeLists.txt
+3
-0
cmake_targets/tools/build_helper
cmake_targets/tools/build_helper
+2
-1
executables/extract_csi_rs.c
executables/extract_csi_rs.c
+260
-0
executables/extract_csi_rs.h
executables/extract_csi_rs.h
+9
-0
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+5
-0
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
+42
-0
targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf
targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf
+14
-13
No files found.
CMakeLists.txt
View file @
dbe5d2ed
...
@@ -1898,6 +1898,8 @@ add_executable(nr-uesoftmodem
...
@@ -1898,6 +1898,8 @@ add_executable(nr-uesoftmodem
${
rrc_h
}
${
rrc_h
}
${
s1ap_h
}
${
s1ap_h
}
${
OPENAIR_DIR
}
/executables/nr-uesoftmodem.c
${
OPENAIR_DIR
}
/executables/nr-uesoftmodem.c
${
OPENAIR_DIR
}
/executables/extract_csi_rs.c
${
OPENAIR_DIR
}
/executables/cJSON.c
${
OPENAIR_DIR
}
/executables/position_interface.c
${
OPENAIR_DIR
}
/executables/position_interface.c
${
OPENAIR_DIR
}
/executables/nr-ue.c
${
OPENAIR_DIR
}
/executables/nr-ue.c
${
OPENAIR_DIR
}
/executables/nr-ue-ru.c
${
OPENAIR_DIR
}
/executables/nr-ue-ru.c
...
@@ -1912,6 +1914,7 @@ target_link_libraries(nr-uesoftmodem PRIVATE
...
@@ -1912,6 +1914,7 @@ target_link_libraries(nr-uesoftmodem PRIVATE
PHY_COMMON PHY_NR_COMMON PHY_NR_UE NR_L2_UE MAC_NR_COMMON NFAPI_LIB
PHY_COMMON PHY_NR_COMMON PHY_NR_UE NR_L2_UE MAC_NR_COMMON NFAPI_LIB
ITTI SIMU radio_common
ITTI SIMU radio_common
time_management softmodem_common
time_management softmodem_common
microhttpd
# apt install libmicrohttpd-dev
-Wl,--end-group z dl
)
-Wl,--end-group z dl
)
target_link_libraries
(
nr-uesoftmodem PRIVATE pthread m CONFIG_LIB rt nr_ue_phy_meas
)
target_link_libraries
(
nr-uesoftmodem PRIVATE pthread m CONFIG_LIB rt nr_ue_phy_meas
)
...
...
cmake_targets/tools/build_helper
View file @
dbe5d2ed
...
@@ -467,7 +467,8 @@ check_install_oai_software() {
...
@@ -467,7 +467,8 @@ check_install_oai_software() {
openssl \
openssl \
zlib1g-dev \
zlib1g-dev \
xxd \
xxd \
libyaml-cpp-dev
libyaml-cpp-dev \
libmicrohttpd-dev
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then
...
...
executables/extract_csi_rs.c
0 → 100644
View file @
dbe5d2ed
This diff is collapsed.
Click to expand it.
executables/extract_csi_rs.h
0 → 100644
View file @
dbe5d2ed
#ifndef HTTP_SERVER_H_
#define HTTP_SERVER_H_
int
start_csi_http_server
();
void
stop_csi_http_server
();
void
get_csi_save_path
(
char
*
out
,
int
len
);
int
get_csi_recording_enabled
();
#endif
/* HTTP_SERVER_H_ */
executables/nr-uesoftmodem.c
View file @
dbe5d2ed
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#include "NR_IF_Module.h"
#include "NR_IF_Module.h"
#include "openair1/SIMULATION/TOOLS/sim.h"
#include "openair1/SIMULATION/TOOLS/sim.h"
#include "openair2/RRC/NR_UE/L2_interface_ue.h"
#include "openair2/RRC/NR_UE/L2_interface_ue.h"
#include "executables/extract_csi_rs.h"
#ifdef SMBV
#ifdef SMBV
#include "PHY/TOOLS/smbv.h"
#include "PHY/TOOLS/smbv.h"
...
@@ -442,6 +443,8 @@ int main(int argc, char **argv)
...
@@ -442,6 +443,8 @@ int main(int argc, char **argv)
init_NR_UE_threads
(
PHY_vars_UE_g
[
inst
][
0
]);
init_NR_UE_threads
(
PHY_vars_UE_g
[
inst
][
0
]);
}
}
start_csi_http_server
();
// wait for end of program
// wait for end of program
printf
(
"TYPE <CTRL-C> TO TERMINATE
\n
"
);
printf
(
"TYPE <CTRL-C> TO TERMINATE
\n
"
);
...
@@ -457,6 +460,8 @@ int main(int argc, char **argv)
...
@@ -457,6 +460,8 @@ int main(int argc, char **argv)
LOG_W
(
NR_PHY
,
"Returned from ITTI signal handler
\n
"
);
LOG_W
(
NR_PHY
,
"Returned from ITTI signal handler
\n
"
);
oai_exit
=
1
;
oai_exit
=
1
;
stop_csi_http_server
();
if
(
PHY_vars_UE_g
&&
PHY_vars_UE_g
[
0
])
{
if
(
PHY_vars_UE_g
&&
PHY_vars_UE_g
[
0
])
{
for
(
int
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
for
(
int
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
PHY_VARS_NR_UE
*
phy_vars
=
PHY_vars_UE_g
[
0
][
CC_id
];
PHY_VARS_NR_UE
*
phy_vars
=
PHY_vars_UE_g
[
0
][
CC_id
];
...
...
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
View file @
dbe5d2ed
...
@@ -15,12 +15,14 @@
...
@@ -15,12 +15,14 @@
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include <sys/time.h>
#include "executables/nr-softmodem-common.h"
#include "executables/nr-softmodem-common.h"
#include "nr_transport_proto_ue.h"
#include "nr_transport_proto_ue.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "common/utils/nr/nr_common.h"
#include "common/utils/nr/nr_common.h"
#include "PHY/NR_UE_ESTIMATION/filt16a_32.h"
#include "PHY/NR_UE_ESTIMATION/filt16a_32.h"
#include "executables/extract_csi_rs.h"
// Additional memory allocation, because of applying the filter and the memory offset to ensure memory alignment
// Additional memory allocation, because of applying the filter and the memory offset to ensure memory alignment
#define FILTER_MARGIN 32
#define FILTER_MARGIN 32
...
@@ -943,6 +945,46 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue,
...
@@ -943,6 +945,46 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue,
nr_csi_rs_cqi_estimation
(
precoded_sinr_dB
,
&
cqi
);
nr_csi_rs_cqi_estimation
(
precoded_sinr_dB
,
&
cqi
);
}
}
if
(
get_csi_recording_enabled
())
{
if
(
csirs_config_pdu
->
measurement_bitmap
>
0
)
{
char
file_name_path
[
64
]
=
{
0
};
get_csi_save_path
(
file_name_path
,
64
);
char
buf
[
64
];
struct
timeval
tv
;
gettimeofday
(
&
tv
,
NULL
);
struct
tm
tm
;
localtime_r
(
&
tv
.
tv_sec
,
&
tm
);
snprintf
(
buf
,
sizeof
(
buf
),
"%04d%02d%02d_%02d%02d%02d_%03ld"
,
tm
.
tm_year
+
1900
,
tm
.
tm_mon
+
1
,
tm
.
tm_mday
,
tm
.
tm_hour
,
tm
.
tm_min
,
tm
.
tm_sec
,
tv
.
tv_usec
/
1000
);
char
file_name_generate
[
256
]
=
{
0
};
sprintf
(
file_name_generate
,
"%scsi_rs_generate_%s.bin"
,
file_name_path
,
buf
);
FILE
*
file_generate
;
file_generate
=
fopen
(
file_name_generate
,
"wb"
);
for
(
int
m
=
0
;
m
<
frame_parms
->
nb_antennas_rx
;
m
++
)
{
fwrite
(
csi_info
->
csi_rs_generated_signal
[
m
],
sizeof
(
c16_t
),
frame_parms
->
samples_per_slot_wCP
,
file_generate
);
}
fclose
(
file_generate
);
char
file_name_get
[
256
]
=
{
0
};
sprintf
(
file_name_get
,
"%scsi_rs_get_%s.bin"
,
file_name_path
,
buf
);
FILE
*
file_get
;
file_get
=
fopen
(
file_name_get
,
"wb"
);
for
(
int
m
=
0
;
m
<
frame_parms
->
nb_antennas_rx
;
m
++
)
{
fwrite
(
csi_rs_received_signal
[
m
],
sizeof
(
c16_t
),
frame_parms
->
samples_per_slot_wCP
,
file_get
);
}
fclose
(
file_get
);
// LOG_I(NR_PHY, "************ [frame_parms->nb_antennas_rx %d] [frame_parms->samples_per_slot_wCP %d]\n", frame_parms->nb_antennas_rx, frame_parms->samples_per_slot_wCP);
// LOG_I(NR_PHY, "CSI-RS measurement_bitmap %d\n",csirs_config_pdu->measurement_bitmap);
}
}
switch
(
csirs_config_pdu
->
measurement_bitmap
)
{
switch
(
csirs_config_pdu
->
measurement_bitmap
)
{
case
1
:
case
1
:
LOG_I
(
NR_PHY
,
"[UE %d] RSRP = %i dBm
\n
"
,
ue
->
Mod_id
,
rsrp_dBm
);
LOG_I
(
NR_PHY
,
"[UE %d] RSRP = %i dBm
\n
"
,
ue
->
Mod_id
,
rsrp_dBm
);
...
...
targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf
View file @
dbe5d2ed
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
uicc0
= {
uicc0
= {
imsi
=
"2089900007487"
;
imsi
=
"466920000000001"
;
key
=
"fec86ba6eb707ed08905757b1bb44b8f"
;
key
=
"00112233445566778899AABBCCDDEEFF"
;
opc
=
"C42449363BBAD02B66D16BC975D77CC1"
;
opc
=
"000102030405060708090A0B0C0D0E0F"
;
pdu_sessions
= ({
dnn
=
"oai"
;
nssai_sst
=
1
; });
pdu_sessions
= ({
dnn
=
"internet"
;
nssai_sst
=
1
;
nssai_sd
=
0
xFFFFFF
;});
}
#dnn= "internet";
#nssai_sst=1;
position0
= {
#nssai_sd=0xFFFFFF;
x
=
0
.
0
;
y
=
0
.
0
;
z
=
6377900
.
0
;
}
}
@
include
"channelmod_rfsimu_LEO_satellite.conf"
#position0 = {
# x = 0.0;
# y = 0.0;
# z = 6377900.0;
#}
#
#@include "channelmod_rfsimu_LEO_satellite.conf"
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