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
Aug 01, 2024
by
Thomas Schlichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rfsimulator: correctly set center frequency
parent
2ec8fefb
Changes
3
Show 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) {
}
/* 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
;
paramlist_def_t
channel_list
;
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
nb_rx
,
modid
,
sampling_rate
,
0
,
center_freq
,
channel_bandwidth
,
*
(
channel_list
.
paramarray
[
i
][
pindex_DT
].
dblptr
),
0
.
0
,
...
...
openair1/SIMULATION/TOOLS/sim.h
View file @
68b07d54
...
...
@@ -543,7 +543,7 @@ int modelid_fromstrtype(char *modeltype);
double
channelmod_get_snr_dB
(
void
);
double
channelmod_get_sinr_dB
(
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_RB2channel_bandwidth
(
uint16_t
N_RB
);
...
...
radio/rfsimulator/simulator.c
View file @
68b07d54
...
...
@@ -167,6 +167,7 @@ typedef struct {
int
rx_num_channels
;
int
tx_num_channels
;
double
sample_rate
;
double
rx_freq
;
double
tx_bw
;
int
channelmod
;
double
chan_pathloss
;
...
...
@@ -342,7 +343,7 @@ static void rfsimulator_readconfig(rfsimulator_state_t *rfsimulator) {
break
;
}
else
if
(
strcmp
(
rfsimu_params
[
p
].
strlistptr
[
i
],
"chanmod"
)
==
0
)
{
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
;
}
else
{
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,
t
->
rx_num_channels
,
channelmod
,
t
->
sample_rate
,
0
,
t
->
rx_freq
,
t
->
tx_bw
,
30e-9
,
// TDL delay-spread parameter
0
.
0
,
...
...
@@ -963,6 +964,8 @@ static int rfsimulator_stop(openair0_device *device) {
return
0
;
}
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
;
}
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) {
rfsimulator
->
tx_num_channels
=
openair0_cfg
->
tx_num_channels
;
rfsimulator
->
rx_num_channels
=
openair0_cfg
->
rx_num_channels
;
rfsimulator
->
sample_rate
=
openair0_cfg
->
sample_rate
;
rfsimulator
->
rx_freq
=
openair0_cfg
->
rx_freq
[
0
];
rfsimulator
->
tx_bw
=
openair0_cfg
->
tx_bw
;
rfsimulator_readconfig
(
rfsimulator
);
if
(
rfsimulator
->
prop_delay_ms
>
0
.
0
)
...
...
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