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
spbro
OpenXG-RAN
Commits
36190b1c
Commit
36190b1c
authored
Oct 04, 2021
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Logging changes to ulsim
parent
ac58460b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
26 deletions
+30
-26
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+30
-26
No files found.
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
36190b1c
...
@@ -983,7 +983,6 @@ int main(int argc, char **argv)
...
@@ -983,7 +983,6 @@ int main(int argc, char **argv)
int
slot_length
=
slot_offset
-
frame_parms
->
get_samples_slot_timestamp
(
slot
-
1
,
frame_parms
,
0
);
int
slot_length
=
slot_offset
-
frame_parms
->
get_samples_slot_timestamp
(
slot
-
1
,
frame_parms
,
0
);
if
(
input_fd
!=
NULL
)
{
if
(
input_fd
!=
NULL
)
{
AssertFatal
(
frame_parms
->
nb_antennas_rx
==
1
,
"nb_ant != 1
\n
"
);
// 800 samples is N_TA_OFFSET for FR1 @ 30.72 Ms/s,
// 800 samples is N_TA_OFFSET for FR1 @ 30.72 Ms/s,
AssertFatal
(
frame_parms
->
subcarrier_spacing
==
30000
,
"only 30 kHz for file input for now (%d)
\n
"
,
frame_parms
->
subcarrier_spacing
);
AssertFatal
(
frame_parms
->
subcarrier_spacing
==
30000
,
"only 30 kHz for file input for now (%d)
\n
"
,
frame_parms
->
subcarrier_spacing
);
...
@@ -1011,18 +1010,21 @@ int main(int argc, char **argv)
...
@@ -1011,18 +1010,21 @@ int main(int argc, char **argv)
printf
(
"harq_pid %d
\n
"
,
harq_pid
);
printf
(
"harq_pid %d
\n
"
,
harq_pid
);
}
}
fseek
(
input_fd
,
file_offset
*
sizeof
(
int16_t
)
*
2
,
SEEK_SET
);
fseek
(
input_fd
,
file_offset
*
sizeof
(
int16_t
)
*
2
,
SEEK_SET
);
read_errors
+=
fread
((
void
*
)
&
gNB
->
common_vars
.
rxdata
[
0
][
slot_offset
-
delay
],
for
(
int
irx
=
0
;
irx
<
frame_parms
->
nb_antennas_rx
;
irx
++
)
{
sizeof
(
int16_t
),
fseek
(
input_fd
,
irx
*
(
slot_length
+
15
)
*
sizeof
(
int16_t
)
*
2
,
SEEK_SET
);
// matlab adds samlples to the end to emulate channel delay
slot_length
<<
1
,
read_errors
+=
fread
((
void
*
)
&
gNB
->
common_vars
.
rxdata
[
irx
][
slot_offset
-
delay
],
input_fd
);
sizeof
(
int16_t
),
if
(
read_errors
==
0
)
{
slot_length
<<
1
,
printf
(
"error reading file
\n
"
);
input_fd
);
exit
(
1
);
if
(
read_errors
==
0
)
{
printf
(
"error reading file
\n
"
);
exit
(
1
);
}
for
(
int
i
=
0
;
i
<
16
;
i
+=
2
)
printf
(
"slot_offset %d : %d,%d
\n
"
,
slot_offset
,
((
int16_t
*
)
&
gNB
->
common_vars
.
rxdata
[
irx
][
slot_offset
])[
i
],
((
int16_t
*
)
&
gNB
->
common_vars
.
rxdata
[
irx
][
slot_offset
])[
1
+
i
]);
}
}
for
(
int
i
=
0
;
i
<
16
;
i
+=
2
)
printf
(
"slot_offset %d : %d,%d
\n
"
,
slot_offset
,
((
int16_t
*
)
&
gNB
->
common_vars
.
rxdata
[
0
][
slot_offset
])[
i
],
((
int16_t
*
)
&
gNB
->
common_vars
.
rxdata
[
0
][
slot_offset
])[
1
+
i
]);
mod_order
=
nr_get_Qm_ul
(
Imcs
,
mcs_table
);
mod_order
=
nr_get_Qm_ul
(
Imcs
,
mcs_table
);
code_rate
=
nr_get_code_rate_ul
(
Imcs
,
mcs_table
);
code_rate
=
nr_get_code_rate_ul
(
Imcs
,
mcs_table
);
...
@@ -1389,11 +1391,11 @@ int main(int argc, char **argv)
...
@@ -1389,11 +1391,11 @@ int main(int argc, char **argv)
&
gNB
->
pusch_vars
[
0
]
->
llr_layers
[
0
][
0
],(
nb_symb_sch
-
1
)
*
NR_NB_SC_PER_RB
*
pusch_pdu
->
rb_size
*
mod_order
,
1
,
0
);
&
gNB
->
pusch_vars
[
0
]
->
llr_layers
[
0
][
0
],(
nb_symb_sch
-
1
)
*
NR_NB_SC_PER_RB
*
pusch_pdu
->
rb_size
*
mod_order
,
1
,
0
);
if
(
precod_nbr_layers
==
2
)
{
if
(
precod_nbr_layers
==
2
)
{
LOG_M
(
"rxsigF1_ext.m"
,
"rxsF1_ext"
,
LOG_M
(
"rxsigF1_ext.m"
,
"rxsF1_ext"
,
&
gNB
->
pusch_vars
[
0
]
->
rxdataF_ext
[
1
][
start_symbol
*
NR_NB_SC_PER_RB
*
pusch_pdu
->
rb_size
],
nb_symb_sch
*
(
off
+
(
NR_NB_SC_PER_RB
*
pusch_pdu
->
rb_size
)),
1
,
1
);
&
gNB
->
pusch_vars
[
0
]
->
rxdataF_ext
[
1
][
start_symbol
*
NR_NB_SC_PER_RB
*
pusch_pdu
->
rb_size
],
nb_symb_sch
*
(
off
+
(
NR_NB_SC_PER_RB
*
pusch_pdu
->
rb_size
)),
1
,
1
);
LOG_M
(
"chestF3.m"
,
"chF3"
,
LOG_M
(
"chestF3.m"
,
"chF3"
,
&
gNB
->
pusch_vars
[
0
]
->
ul_ch_estimates
[
3
][
start_symbol
*
frame_parms
->
ofdm_symbol_size
],
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
&
gNB
->
pusch_vars
[
0
]
->
ul_ch_estimates
[
3
][
start_symbol
*
frame_parms
->
ofdm_symbol_size
],
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
LOG_M
(
"chestF3_ext.m"
,
"chF3_ext"
,
LOG_M
(
"chestF3_ext.m"
,
"chF3_ext"
,
&
gNB
->
pusch_vars
[
0
]
->
ul_ch_estimates_ext
[
3
][(
start_symbol
+
1
)
*
(
off
+
(
NR_NB_SC_PER_RB
*
pusch_pdu
->
rb_size
))],
&
gNB
->
pusch_vars
[
0
]
->
ul_ch_estimates_ext
[
3
][(
start_symbol
+
1
)
*
(
off
+
(
NR_NB_SC_PER_RB
*
pusch_pdu
->
rb_size
))],
...
@@ -1613,17 +1615,19 @@ int main(int argc, char **argv)
...
@@ -1613,17 +1615,19 @@ int main(int argc, char **argv)
length_dmrs
,
length_dmrs
,
num_dmrs_cdm_grps_no_data
);
num_dmrs_cdm_grps_no_data
);
LOG_M
(
"ulsimStats.m"
,
"SNR"
,
snrStats
,
snrRun
,
1
,
7
);
char
opStatsFile
[
50
];
LOG_MM
(
"ulsimStats.m"
,
"BLER_round0"
,
blerStats
[
0
],
snrRun
,
1
,
7
);
sprintf
(
opStatsFile
,
"ulsimStats_z%d.m"
,
n_rx
);
LOG_MM
(
"ulsimStats.m"
,
"BLER_round1"
,
blerStats
[
1
],
snrRun
,
1
,
7
);
LOG_M
(
opStatsFile
,
"SNR"
,
snrStats
,
snrRun
,
1
,
7
);
LOG_MM
(
"ulsimStats.m"
,
"BLER_round2"
,
blerStats
[
2
],
snrRun
,
1
,
7
);
LOG_MM
(
opStatsFile
,
"BLER_round0"
,
blerStats
[
0
],
snrRun
,
1
,
7
);
LOG_MM
(
"ulsimStats.m"
,
"BLER_round3"
,
blerStats
[
3
],
snrRun
,
1
,
7
);
LOG_MM
(
opStatsFile
,
"BLER_round1"
,
blerStats
[
1
],
snrRun
,
1
,
7
);
LOG_MM
(
"ulsimStats.m"
,
"BER_round0"
,
berStats
[
0
],
snrRun
,
1
,
7
);
LOG_MM
(
opStatsFile
,
"BLER_round2"
,
blerStats
[
2
],
snrRun
,
1
,
7
);
LOG_MM
(
"ulsimStats.m"
,
"BER_round1"
,
berStats
[
1
],
snrRun
,
1
,
7
);
LOG_MM
(
opStatsFile
,
"BLER_round3"
,
blerStats
[
3
],
snrRun
,
1
,
7
);
LOG_MM
(
"ulsimStats.m"
,
"BER_round2"
,
berStats
[
2
],
snrRun
,
1
,
7
);
LOG_MM
(
opStatsFile
,
"BER_round0"
,
berStats
[
0
],
snrRun
,
1
,
7
);
LOG_MM
(
"ulsimStats.m"
,
"BER_round3"
,
berStats
[
3
],
snrRun
,
1
,
7
);
LOG_MM
(
opStatsFile
,
"BER_round1"
,
berStats
[
1
],
snrRun
,
1
,
7
);
LOG_MM
(
"ulsimStats.m"
,
"EffRate"
,
effRate
,
snrRun
,
1
,
7
);
LOG_MM
(
opStatsFile
,
"BER_round2"
,
berStats
[
2
],
snrRun
,
1
,
7
);
LOG_MM
(
"ulsimStats.m"
,
"EffTP"
,
effTP
,
snrRun
,
1
,
7
);
LOG_MM
(
opStatsFile
,
"BER_round3"
,
berStats
[
3
],
snrRun
,
1
,
7
);
LOG_MM
(
opStatsFile
,
"EffRate"
,
effRate
,
snrRun
,
1
,
7
);
LOG_MM
(
opStatsFile
,
"EffTP"
,
effTP
,
snrRun
,
1
,
7
);
free
(
test_input_bit
);
free
(
test_input_bit
);
free
(
estimated_output_bit
);
free
(
estimated_output_bit
);
...
...
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