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
Show 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,7 +1010,9 @@ int main(int argc, char **argv)
...
@@ -1011,7 +1010,9 @@ 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
++
)
{
fseek
(
input_fd
,
irx
*
(
slot_length
+
15
)
*
sizeof
(
int16_t
)
*
2
,
SEEK_SET
);
// matlab adds samlples to the end to emulate channel delay
read_errors
+=
fread
((
void
*
)
&
gNB
->
common_vars
.
rxdata
[
irx
][
slot_offset
-
delay
],
sizeof
(
int16_t
),
sizeof
(
int16_t
),
slot_length
<<
1
,
slot_length
<<
1
,
input_fd
);
input_fd
);
...
@@ -1021,8 +1022,9 @@ int main(int argc, char **argv)
...
@@ -1021,8 +1022,9 @@ int main(int argc, char **argv)
}
}
for
(
int
i
=
0
;
i
<
16
;
i
+=
2
)
printf
(
"slot_offset %d : %d,%d
\n
"
,
for
(
int
i
=
0
;
i
<
16
;
i
+=
2
)
printf
(
"slot_offset %d : %d,%d
\n
"
,
slot_offset
,
slot_offset
,
((
int16_t
*
)
&
gNB
->
common_vars
.
rxdata
[
0
][
slot_offset
])[
i
],
((
int16_t
*
)
&
gNB
->
common_vars
.
rxdata
[
irx
][
slot_offset
])[
i
],
((
int16_t
*
)
&
gNB
->
common_vars
.
rxdata
[
0
][
slot_offset
])[
1
+
i
]);
((
int16_t
*
)
&
gNB
->
common_vars
.
rxdata
[
irx
][
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
);
...
@@ -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