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
68b07d54
Commit
68b07d54
authored
8 months ago
by
Thomas Schlichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rfsimulator: correctly set center frequency
parent
2ec8fefb
Branches unavailable
2025.w14
2025.w13
2025.w12
2025.w11
2025.w10
2025.w09
2025.w08
2025.w07
2025.w06
2025.w05
2025.w04
2025.w03
2025.w02
2024.w51
2024.w50
2024.w49
2024.w48
2024.w47
2024.w46
2024.w45
2024.w44
2024.w43
2024.w42
2024.w41
2024.w40
2024.w39
2024.w38
2024.w36
2024.w35
2024.w34
v2.2.0
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
openair1/SIMULATION/TOOLS/random_channel.c
openair1/SIMULATION/TOOLS/random_channel.c
+2
-2
openair1/SIMULATION/TOOLS/sim.h
openair1/SIMULATION/TOOLS/sim.h
+1
-1
radio/rfsimulator/simulator.c
radio/rfsimulator/simulator.c
+6
-2
No files found.
openair1/SIMULATION/TOOLS/random_channel.c
View file @
68b07d54
...
@@ -2281,7 +2281,7 @@ void init_channelmod(void) {
...
@@ -2281,7 +2281,7 @@ void init_channelmod(void) {
}
/* init_channelmod */
}
/* init_channelmod */
int
load_channellist
(
uint8_t
nb_tx
,
uint8_t
nb_rx
,
double
sampling_rate
,
double
channel_bandwidth
)
{
int
load_channellist
(
uint8_t
nb_tx
,
uint8_t
nb_rx
,
double
sampling_rate
,
uint64_t
center_freq
,
double
channel_bandwidth
)
{
paramdef_t
achannel_params
[]
=
CHANNELMOD_MODEL_PARAMS_DESC
;
paramdef_t
achannel_params
[]
=
CHANNELMOD_MODEL_PARAMS_DESC
;
paramlist_def_t
channel_list
;
paramlist_def_t
channel_list
;
memset
(
&
channel_list
,
0
,
sizeof
(
paramlist_def_t
));
memset
(
&
channel_list
,
0
,
sizeof
(
paramlist_def_t
));
...
@@ -2314,7 +2314,7 @@ int load_channellist(uint8_t nb_tx, uint8_t nb_rx, double sampling_rate, double
...
@@ -2314,7 +2314,7 @@ int load_channellist(uint8_t nb_tx, uint8_t nb_rx, double sampling_rate, double
nb_rx
,
nb_rx
,
modid
,
modid
,
sampling_rate
,
sampling_rate
,
0
,
center_freq
,
channel_bandwidth
,
channel_bandwidth
,
*
(
channel_list
.
paramarray
[
i
][
pindex_DT
].
dblptr
),
*
(
channel_list
.
paramarray
[
i
][
pindex_DT
].
dblptr
),
0
.
0
,
0
.
0
,
...
...
This diff is collapsed.
Click to expand it.
openair1/SIMULATION/TOOLS/sim.h
View file @
68b07d54
...
@@ -543,7 +543,7 @@ int modelid_fromstrtype(char *modeltype);
...
@@ -543,7 +543,7 @@ int modelid_fromstrtype(char *modeltype);
double
channelmod_get_snr_dB
(
void
);
double
channelmod_get_snr_dB
(
void
);
double
channelmod_get_sinr_dB
(
void
);
double
channelmod_get_sinr_dB
(
void
);
void
init_channelmod
(
void
)
;
void
init_channelmod
(
void
)
;
int
load_channellist
(
uint8_t
nb_tx
,
uint8_t
nb_rx
,
double
sampling_rate
,
double
channel_bandwidth
)
;
int
load_channellist
(
uint8_t
nb_tx
,
uint8_t
nb_rx
,
double
sampling_rate
,
uint64_t
center_freq
,
double
channel_bandwidth
)
;
double
N_RB2sampling_rate
(
uint16_t
N_RB
);
double
N_RB2sampling_rate
(
uint16_t
N_RB
);
double
N_RB2channel_bandwidth
(
uint16_t
N_RB
);
double
N_RB2channel_bandwidth
(
uint16_t
N_RB
);
...
...
This diff is collapsed.
Click to expand it.
radio/rfsimulator/simulator.c
View file @
68b07d54
...
@@ -167,6 +167,7 @@ typedef struct {
...
@@ -167,6 +167,7 @@ typedef struct {
int
rx_num_channels
;
int
rx_num_channels
;
int
tx_num_channels
;
int
tx_num_channels
;
double
sample_rate
;
double
sample_rate
;
double
rx_freq
;
double
tx_bw
;
double
tx_bw
;
int
channelmod
;
int
channelmod
;
double
chan_pathloss
;
double
chan_pathloss
;
...
@@ -342,7 +343,7 @@ static void rfsimulator_readconfig(rfsimulator_state_t *rfsimulator) {
...
@@ -342,7 +343,7 @@ static void rfsimulator_readconfig(rfsimulator_state_t *rfsimulator) {
break
;
break
;
}
else
if
(
strcmp
(
rfsimu_params
[
p
].
strlistptr
[
i
],
"chanmod"
)
==
0
)
{
}
else
if
(
strcmp
(
rfsimu_params
[
p
].
strlistptr
[
i
],
"chanmod"
)
==
0
)
{
init_channelmod
();
init_channelmod
();
load_channellist
(
rfsimulator
->
tx_num_channels
,
rfsimulator
->
rx_num_channels
,
rfsimulator
->
sample_rate
,
rfsimulator
->
tx_bw
);
load_channellist
(
rfsimulator
->
tx_num_channels
,
rfsimulator
->
rx_num_channels
,
rfsimulator
->
sample_rate
,
rfsimulator
->
rx_freq
,
rfsimulator
->
tx_bw
);
rfsimulator
->
channelmod
=
true
;
rfsimulator
->
channelmod
=
true
;
}
else
{
}
else
{
fprintf
(
stderr
,
"unknown rfsimulator option: %s
\n
"
,
rfsimu_params
[
p
].
strlistptr
[
i
]);
fprintf
(
stderr
,
"unknown rfsimulator option: %s
\n
"
,
rfsimu_params
[
p
].
strlistptr
[
i
]);
...
@@ -400,7 +401,7 @@ static int rfsimu_setchanmod_cmd(char *buff, int debug, telnet_printfunc_t prnt,
...
@@ -400,7 +401,7 @@ static int rfsimu_setchanmod_cmd(char *buff, int debug, telnet_printfunc_t prnt,
t
->
rx_num_channels
,
t
->
rx_num_channels
,
channelmod
,
channelmod
,
t
->
sample_rate
,
t
->
sample_rate
,
0
,
t
->
rx_freq
,
t
->
tx_bw
,
t
->
tx_bw
,
30e-9
,
// TDL delay-spread parameter
30e-9
,
// TDL delay-spread parameter
0
.
0
,
0
.
0
,
...
@@ -963,6 +964,8 @@ static int rfsimulator_stop(openair0_device *device) {
...
@@ -963,6 +964,8 @@ static int rfsimulator_stop(openair0_device *device) {
return
0
;
return
0
;
}
}
static
int
rfsimulator_set_freq
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
)
{
static
int
rfsimulator_set_freq
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
)
{
rfsimulator_state_t
*
s
=
device
->
priv
;
s
->
rx_freq
=
openair0_cfg
->
rx_freq
[
0
];
return
0
;
return
0
;
}
}
static
int
rfsimulator_set_gains
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
)
{
static
int
rfsimulator_set_gains
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
)
{
...
@@ -980,6 +983,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
...
@@ -980,6 +983,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
rfsimulator
->
tx_num_channels
=
openair0_cfg
->
tx_num_channels
;
rfsimulator
->
tx_num_channels
=
openair0_cfg
->
tx_num_channels
;
rfsimulator
->
rx_num_channels
=
openair0_cfg
->
rx_num_channels
;
rfsimulator
->
rx_num_channels
=
openair0_cfg
->
rx_num_channels
;
rfsimulator
->
sample_rate
=
openair0_cfg
->
sample_rate
;
rfsimulator
->
sample_rate
=
openair0_cfg
->
sample_rate
;
rfsimulator
->
rx_freq
=
openair0_cfg
->
rx_freq
[
0
];
rfsimulator
->
tx_bw
=
openair0_cfg
->
tx_bw
;
rfsimulator
->
tx_bw
=
openair0_cfg
->
tx_bw
;
rfsimulator_readconfig
(
rfsimulator
);
rfsimulator_readconfig
(
rfsimulator
);
if
(
rfsimulator
->
prop_delay_ms
>
0
.
0
)
if
(
rfsimulator
->
prop_delay_ms
>
0
.
0
)
...
...
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