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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Michael Black
OpenXG-RAN
Commits
9b04af1b
Commit
9b04af1b
authored
Nov 09, 2022
by
Roberto Louro Magueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put the center_freq and maxDoppler as input of new_channel_desc_scm() function
parent
e44a99b3
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
66 additions
and
41 deletions
+66
-41
common/utils/nr/nr_common.c
common/utils/nr/nr_common.c
+1
-1
openair1/SIMULATION/LTE_PHY/dlsim.c
openair1/SIMULATION/LTE_PHY/dlsim.c
+4
-0
openair1/SIMULATION/LTE_PHY/ulsim.c
openair1/SIMULATION/LTE_PHY/ulsim.c
+2
-2
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+5
-1
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+2
-0
openair1/SIMULATION/NR_PHY/pbchsim.c
openair1/SIMULATION/NR_PHY/pbchsim.c
+2
-0
openair1/SIMULATION/NR_PHY/prachsim.c
openair1/SIMULATION/NR_PHY/prachsim.c
+2
-0
openair1/SIMULATION/NR_PHY/pucchsim.c
openair1/SIMULATION/NR_PHY/pucchsim.c
+1
-1
openair1/SIMULATION/NR_PHY/ulschsim.c
openair1/SIMULATION/NR_PHY/ulschsim.c
+2
-0
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+20
-21
openair1/SIMULATION/TOOLS/random_channel.c
openair1/SIMULATION/TOOLS/random_channel.c
+10
-4
openair1/SIMULATION/TOOLS/sim.h
openair1/SIMULATION/TOOLS/sim.h
+2
-0
radio/rfsimulator/simulator.c
radio/rfsimulator/simulator.c
+13
-11
No files found.
common/utils/nr/nr_common.c
View file @
9b04af1b
...
...
@@ -135,7 +135,7 @@ uint16_t get_band(uint64_t downlink_frequency, int32_t delta_duplex)
const
uint64_t
dl_freq_khz
=
downlink_frequency
/
1000
;
const
int32_t
delta_duplex_khz
=
delta_duplex
/
1000
;
uint64_t
center_freq_diff_khz
=
999999999999999999
;
// 2^64
uint64_t
center_freq_diff_khz
=
UINT64_MAX
;
// 2^64
uint16_t
current_band
=
0
;
for
(
int
ind
=
0
;
ind
<
sizeofArray
(
nr_bandtable
);
ind
++
)
{
...
...
openair1/SIMULATION/LTE_PHY/dlsim.c
View file @
9b04af1b
...
...
@@ -1190,8 +1190,10 @@ int main(int argc, char **argv) {
UE
->
frame_parms
.
nb_antennas_rx
,
channel_model
,
N_RB2sampling_rate
(
eNB
->
frame_parms
.
N_RB_DL
),
0
,
N_RB2channel_bandwidth
(
eNB
->
frame_parms
.
N_RB_DL
),
DS_TDL
,
0
.
0
,
CORR_LEVEL_LOW
,
forgetting_factor
,
rx_sample_offset
,
...
...
@@ -1206,8 +1208,10 @@ int main(int argc, char **argv) {
UE
->
frame_parms
.
nb_antennas_rx
,
channel_model
,
N_RB2sampling_rate
(
eNB
->
frame_parms
.
N_RB_DL
),
0
,
N_RB2channel_bandwidth
(
eNB
->
frame_parms
.
N_RB_DL
),
DS_TDL
,
0
.
0
,
CORR_LEVEL_LOW
,
forgetting_factor
,
rx_sample_offset
,
...
...
openair1/SIMULATION/LTE_PHY/ulsim.c
View file @
9b04af1b
...
...
@@ -739,15 +739,15 @@ int main(int argc, char **argv) {
n_rx
,
channel_model
,
N_RB2sampling_rate
(
eNB
->
frame_parms
.
N_RB_UL
),
0
,
N_RB2channel_bandwidth
(
eNB
->
frame_parms
.
N_RB_UL
),
30e-9
,
maxDoppler
,
CORR_LEVEL_LOW
,
forgetting_factor
,
delay
,
0
,
0
);
// set Doppler
UE2eNB
->
max_Doppler
=
maxDoppler
;
// NN: N_RB_UL has to be defined in ulsim
for
(
int
k
=
0
;
k
<
NUMBER_OF_ULSCH_MAX
;
k
++
)
eNB
->
ulsch
[
k
]
=
new_eNB_ulsch
(
max_turbo_iterations
,
N_RB_DL
,
0
);
...
...
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
9b04af1b
...
...
@@ -334,10 +334,14 @@ int main(int argc, char **argv)
if
(
ouput_vcd
)
vcd_signal_dumper_init
(
"/tmp/openair_dump_nr_dlschsim.vcd"
);
gNB2UE
=
new_channel_desc_scm
(
n_tx
,
n_rx
,
channel_model
,
gNB2UE
=
new_channel_desc_scm
(
n_tx
,
n_rx
,
channel_model
,
61.44e6
,
//N_RB2sampling_rate(N_RB_DL),
0
,
40e6
,
//N_RB2channel_bandwidth(N_RB_DL),
DS_TDL
,
0
.
0
,
CORR_LEVEL_LOW
,
0
,
0
,
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
9b04af1b
...
...
@@ -900,8 +900,10 @@ int main(int argc, char **argv)
n_rx
,
channel_model
,
fs
/
1e6
,
//sampling frequency in MHz
0
,
txbw
,
30e-9
,
0
.
0
,
CORR_LEVEL_LOW
,
0
,
0
,
...
...
openair1/SIMULATION/NR_PHY/pbchsim.c
View file @
9b04af1b
...
...
@@ -533,8 +533,10 @@ int main(int argc, char **argv)
n_rx
,
channel_model
,
fs
,
0
,
bw
,
300e-9
,
0
.
0
,
CORR_LEVEL_LOW
,
0
,
0
,
...
...
openair1/SIMULATION/NR_PHY/prachsim.c
View file @
9b04af1b
...
...
@@ -729,8 +729,10 @@ int main(int argc, char **argv){
gNB
->
frame_parms
.
nb_antennas_rx
,
channel_model
,
fs
,
0
,
bw
,
DS_TDL
,
0
.
0
,
CORR_LEVEL_LOW
,
0
.
0
,
delay
,
...
...
openair1/SIMULATION/NR_PHY/pucchsim.c
View file @
9b04af1b
...
...
@@ -421,7 +421,7 @@ int main(int argc, char **argv)
&
txbw
,
&
rxbw
);
UE2gNB
=
new_channel_desc_scm
(
n_tx
,
n_rx
,
channel_model
,
fs
,
txbw
,
DS_TDL
,
CORR_LEVEL_LOW
,
0
,
0
,
0
,
0
);
UE2gNB
=
new_channel_desc_scm
(
n_tx
,
n_rx
,
channel_model
,
fs
,
0
,
txbw
,
DS_TDL
,
0
.
0
,
CORR_LEVEL_LOW
,
0
,
0
,
0
,
0
);
if
(
UE2gNB
==
NULL
)
{
printf
(
"Problem generating channel model. Exiting.
\n
"
);
...
...
openair1/SIMULATION/NR_PHY/ulschsim.c
View file @
9b04af1b
...
...
@@ -381,8 +381,10 @@ int main(int argc, char **argv)
n_rx
,
channel_model
,
61.44e6
,
//N_RB2sampling_rate(N_RB_DL),
0
,
40e6
,
//N_RB2channel_bandwidth(N_RB_DL),
DS_TDL
,
0
.
0
,
CORR_LEVEL_LOW
,
0
,
0
,
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
9b04af1b
...
...
@@ -683,26 +683,6 @@ int main(int argc, char **argv)
&
tx_bandwidth
,
&
rx_bandwidth
);
LOG_I
(
PHY
,
"++++++++++++++++++++++++++++++++++++++++++++++%i+++++++++++++++++++++++++++++++++++++++++"
,
loglvl
);
UE2gNB
=
new_channel_desc_scm
(
n_tx
,
n_rx
,
channel_model
,
sampling_frequency
/
1e6
,
tx_bandwidth
,
DS_TDL
,
corr_level
,
0
,
0
,
0
,
0
);
if
(
UE2gNB
==
NULL
)
{
printf
(
"Problem generating channel model. Exiting.
\n
"
);
exit
(
-
1
);
}
UE2gNB
->
max_Doppler
=
maxDoppler
;
RC
.
gNB
=
(
PHY_VARS_gNB
**
)
malloc
(
sizeof
(
PHY_VARS_gNB
*
));
RC
.
gNB
[
0
]
=
calloc
(
1
,
sizeof
(
PHY_VARS_gNB
));
gNB
=
RC
.
gNB
[
0
];
...
...
@@ -809,8 +789,27 @@ int main(int argc, char **argv)
NR_BWP_Uplink_t
*
ubwp
=
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
0
];
// Configure channel model
UE2gNB
=
new_channel_desc_scm
(
n_tx
,
n_rx
,
channel_model
,
sampling_frequency
/
1e6
,
frame_parms
->
ul_CarrierFreq
,
tx_bandwidth
,
DS_TDL
,
maxDoppler
,
corr_level
,
0
,
0
,
0
,
0
);
if
(
UE2gNB
==
NULL
)
{
printf
(
"Problem generating channel model. Exiting.
\n
"
);
exit
(
-
1
);
}
//
c
onfigure UE
//
C
onfigure UE
UE
=
malloc
(
sizeof
(
PHY_VARS_NR_UE
));
memset
((
void
*
)
UE
,
0
,
sizeof
(
PHY_VARS_NR_UE
));
PHY_vars_UE_g
=
malloc
(
sizeof
(
PHY_VARS_NR_UE
**
));
...
...
openair1/SIMULATION/TOOLS/random_channel.c
View file @
9b04af1b
...
...
@@ -559,18 +559,20 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
uint8_t
nb_rx
,
SCM_t
channel_model
,
double
sampling_rate
,
uint64_t
center_freq
,
double
channel_bandwidth
,
double
DS_TDL
,
double
maxDoppler
,
const
corr_level_t
corr_level
,
double
forgetting_factor
,
int32_t
channel_offset
,
double
path_loss_dB
,
float
noise_power_dB
)
{
float
noise_power_dB
)
{
// To create tables for normal distribution
struct
timespec
t
;
clock_gettime
(
CLOCK_MONOTONIC
,
&
t
);
tableNor
((
long
)
(
t
.
tv_nsec
%
INT_MAX
));
tableNor
((
long
)
(
t
.
tv_nsec
%
INT_MAX
));
channel_desc_t
*
chan_desc
=
(
channel_desc_t
*
)
calloc
(
1
,
sizeof
(
channel_desc_t
));
...
...
@@ -587,14 +589,16 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
uint16_t
i
,
j
;
double
sum_amps
;
double
aoa
,
ricean_factor
,
Td
,
maxDoppler
;
double
aoa
,
ricean_factor
,
Td
;
int
channel_length
,
nb_taps
;
struct
complexd
*
R_sqrt_ptr2
;
chan_desc
->
modelid
=
channel_model
;
chan_desc
->
nb_tx
=
nb_tx
;
chan_desc
->
nb_rx
=
nb_rx
;
chan_desc
->
sampling_rate
=
sampling_rate
;
chan_desc
->
center_freq
=
center_freq
;
chan_desc
->
channel_bandwidth
=
channel_bandwidth
;
chan_desc
->
max_Doppler
=
maxDoppler
;
chan_desc
->
corr_level
=
corr_level
;
chan_desc
->
forgetting_factor
=
forgetting_factor
;
chan_desc
->
channel_offset
=
channel_offset
;
...
...
@@ -2161,8 +2165,10 @@ int load_channellist(uint8_t nb_tx, uint8_t nb_rx, double sampling_rate, double
nb_rx
,
modid
,
sampling_rate
,
0
,
channel_bandwidth
,
*
(
channel_list
.
paramarray
[
i
][
pindex_DT
].
dblptr
),
0
.
0
,
CORR_LEVEL_LOW
,
*
(
channel_list
.
paramarray
[
i
][
pindex_FF
].
dblptr
),
*
(
channel_list
.
paramarray
[
i
][
pindex_CO
].
iptr
),
...
...
openair1/SIMULATION/TOOLS/sim.h
View file @
9b04af1b
...
...
@@ -317,8 +317,10 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
uint8_t
nb_rx
,
SCM_t
channel_model
,
double
sampling_rate
,
uint64_t
center_freq
,
double
channel_bandwidth
,
double
DS_TDL
,
double
maxDoppler
,
const
corr_level_t
corr_level
,
double
forgetting_factor
,
int32_t
channel_offset
,
...
...
radio/rfsimulator/simulator.c
View file @
9b04af1b
...
...
@@ -341,17 +341,19 @@ static int rfsimu_setchanmod_cmd(char *buff, int debug, telnet_printfunc_t prnt,
if
(
b
->
channel_model
->
model_name
==
NULL
)
continue
;
if
(
b
->
conn_sock
>=
0
&&
(
strcmp
(
b
->
channel_model
->
model_name
,
modelname
)
==
0
))
{
channel_desc_t
*
newmodel
=
new_channel_desc_scm
(
t
->
tx_num_channels
,
t
->
rx_num_channels
,
channelmod
,
t
->
sample_rate
,
t
->
tx_bw
,
30e-9
,
// TDL delay-spread parameter
CORR_LEVEL_LOW
,
t
->
chan_forgetfact
,
// forgetting_factor
t
->
chan_offset
,
// maybe used for TA
t
->
chan_pathloss
,
t
->
noise_power_dB
);
// path_loss in dB
channel_desc_t
*
newmodel
=
new_channel_desc_scm
(
t
->
tx_num_channels
,
t
->
rx_num_channels
,
channelmod
,
t
->
sample_rate
,
0
,
t
->
tx_bw
,
30e-9
,
// TDL delay-spread parameter
0
.
0
,
CORR_LEVEL_LOW
,
t
->
chan_forgetfact
,
// forgetting_factor
t
->
chan_offset
,
// maybe used for TA
t
->
chan_pathloss
,
t
->
noise_power_dB
);
// path_loss in dB
set_channeldesc_owner
(
newmodel
,
RFSIMU_MODULEID
);
set_channeldesc_name
(
newmodel
,
modelname
);
random_channel
(
newmodel
,
false
);
...
...
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