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
3ef3ef64
Commit
3ef3ef64
authored
Feb 18, 2019
by
Khalid Ahmed
Committed by
Thomas Schlichter
Feb 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing bugs introduced as a result of uninitialized variables
parent
43ff9ccf
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
11 deletions
+17
-11
openair1/PHY/CODING/nr_segmentation.c
openair1/PHY/CODING/nr_segmentation.c
+7
-7
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+2
-0
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+2
-2
openair1/PHY/INIT/nr_parms.c
openair1/PHY/INIT/nr_parms.c
+3
-0
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+3
-2
No files found.
openair1/PHY/CODING/nr_segmentation.c
View file @
3ef3ef64
...
...
@@ -126,7 +126,7 @@ else
}
else
{
//msg("nr_segmentation.c: Illegal codeword size !!!\n");
return
(
-
1
)
;
return
-
1
;
}
*
Zout
=
*
K
;
*
K
=
*
K
*
Kb
;
...
...
@@ -140,10 +140,11 @@ else
if
((
input_buffer
)
&&
(
output_buffers
))
{
s
=
0
;
s
=
0
;
for
(
r
=
0
;
r
<*
C
;
r
++
)
{
k
=
0
;
Kprime
=
Bprime_by_C
;
while
(
k
<
((
Kprime
-
L
)
>>
3
))
{
...
...
@@ -153,11 +154,12 @@ else
s
++
;
}
if
(
*
F
>
0
)
if
(
*
F
>
0
)
{
for
(
k
=
Kprime
>>
3
;
k
<
(
*
K
)
>>
3
;
k
++
)
{
output_buffers
[
r
][
k
]
=
NR_NULL
;
//printf("r %d filler bits [%d] = %d Kprime %d \n", r,k, output_buffers[r][k], Kprime);
}
}
if
(
*
C
>
1
)
{
// add CRC
crc
=
crc24b
(
output_buffers
[
r
],
Kprime
-
L
)
>>
8
;
...
...
@@ -165,12 +167,10 @@ else
output_buffers
[
r
][
1
+
((
Kprime
-
L
)
>>
3
)]
=
((
uint8_t
*
)
&
crc
)[
1
];
output_buffers
[
r
][
2
+
((
Kprime
-
L
)
>>
3
)]
=
((
uint8_t
*
)
&
crc
)[
0
];
}
k
=
0
;
}
}
return
(
0
)
;
return
0
;
}
...
...
openair1/PHY/INIT/nr_init.c
View file @
3ef3ef64
...
...
@@ -372,6 +372,8 @@ void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,int N_RB_DL,int N_RB_UL,int mu,
gNB_config
->
sch_config
.
n_ssb_crb
.
value
=
(
N_RB_DL
-
20
);
gNB_config
->
sch_config
.
ssb_subcarrier_offset
.
value
=
0
;
gNB_config
->
sch_config
.
physical_cell_id
.
value
=
Nid_cell
;
gNB_config
->
subframe_config
.
dl_cyclic_prefix_type
.
value
=
(
fp
->
Ncp
==
NORMAL
)
?
NFAPI_CP_NORMAL
:
NFAPI_CP_EXTENDED
;
gNB
->
mac_enabled
=
1
;
fp
->
dl_CarrierFreq
=
from_nrarfcn
(
gNB_config
->
nfapi_config
.
rf_bands
.
rf_band
[
0
],
gNB_config
->
nfapi_config
.
nrarfcn
.
value
);
fp
->
ul_CarrierFreq
=
fp
->
dl_CarrierFreq
-
(
get_uldl_offset
(
gNB_config
->
nfapi_config
.
rf_bands
.
rf_band
[
0
])
*
100000
);
...
...
openair1/PHY/INIT/nr_init_ue.c
View file @
3ef3ef64
...
...
@@ -670,7 +670,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
// many memory allocation sizes are hard coded
AssertFatal
(
fp
->
nb_antennas_rx
<=
2
,
"hard coded allocation for ue_common_vars->dl_ch_estimates[eNB_id]"
);
AssertFatal
(
ue
->
n
_connected_eNB
<=
NUMBER_OF_CONNECTED_eNB_MAX
,
"n_connected_eNB is too large"
);
AssertFatal
(
nb
_connected_eNB
<=
NUMBER_OF_CONNECTED_eNB_MAX
,
"n_connected_eNB is too large"
);
// init phy_vars_ue
for
(
i
=
0
;
i
<
4
;
i
++
)
{
...
...
@@ -922,7 +922,7 @@ void init_nr_ue_transport(PHY_VARS_NR_UE *ue,int abstraction_flag) {
for
(
k
=
0
;
k
<
RX_NB_TH_MAX
;
k
++
)
{
AssertFatal
((
ue
->
dlsch
[
k
][
i
][
j
]
=
new_nr_ue_dlsch
(
1
,
NUMBER_OF_HARQ_PID_MAX
,
NSOFT
,
MAX_LDPC_ITERATIONS
,
ue
->
frame_parms
.
N_RB_DL
,
abstraction_flag
))
!=
NULL
,
"Can't get ue dlsch structures
\n
"
);
LOG_D
(
PHY
,
"dlsch[%d][%d][%d] => %p
\n
"
,
k
,
i
,
j
,
ue
->
dlsch
[
i
][
j
]);
LOG_D
(
PHY
,
"dlsch[%d][%d][%d] => %p
\n
"
,
k
,
i
,
j
,
ue
->
dlsch
[
k
][
i
][
j
]);
}
}
...
...
openair1/PHY/INIT/nr_parms.c
View file @
3ef3ef64
...
...
@@ -156,6 +156,9 @@ int nr_init_frame_parms0(NR_DL_FRAME_PARMS *fp,
}
fp
->
slots_per_frame
=
10
*
fp
->
slots_per_subframe
;
fp
->
nb_antenna_ports_eNB
=
1
;
// default value until overwritten by RRCConnectionReconfiguration
fp
->
symbols_per_slot
=
((
Ncp
==
NORMAL
)
?
14
:
12
);
// to redefine for different slot formats
fp
->
samples_per_subframe_wCP
=
fp
->
ofdm_symbol_size
*
fp
->
symbols_per_slot
*
fp
->
slots_per_subframe
;
fp
->
samples_per_frame_wCP
=
10
*
fp
->
samples_per_subframe_wCP
;
...
...
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
3ef3ef64
...
...
@@ -381,6 +381,7 @@ int main(int argc, char **argv) {
frame_parms
->
nb_antennas_tx
=
n_tx
;
frame_parms
->
nb_antennas_rx
=
n_rx
;
frame_parms
->
N_RB_DL
=
N_RB_DL
;
frame_parms
->
Ncp
=
extended_prefix_flag
?
EXTENDED
:
NORMAL
;
crcTableInit
();
nr_phy_config_request_sim
(
gNB
,
N_RB_DL
,
N_RB_DL
,
mu
,
Nid_cell
);
phy_init_nr_gNB
(
gNB
,
0
,
0
);
...
...
@@ -490,7 +491,7 @@ int main(int argc, char **argv) {
test_input_bit
=
(
unsigned
char
*
)
malloc16
(
sizeof
(
unsigned
char
)
*
16
*
68
*
384
);
estimated_output
=
(
unsigned
char
*
)
malloc16
(
sizeof
(
unsigned
char
)
*
16
*
68
*
384
);
estimated_output_bit
=
(
unsigned
char
*
)
malloc16
(
sizeof
(
unsigned
char
)
*
16
*
68
*
384
);
NR_UE_DLSCH_t
*
dlsch0_ue
=
UE
->
dlsch
[
UE
->
current_thread_id
[
subframe
]
][
0
][
0
];
NR_UE_DLSCH_t
*
dlsch0_ue
=
UE
->
dlsch
[
0
][
0
][
0
];
NR_DL_UE_HARQ_t
*
harq_process
=
dlsch0_ue
->
harq_processes
[
harq_pid
];
harq_process
->
mcs
=
Imcs
;
harq_process
->
Nl
=
Nl
;
...
...
@@ -643,7 +644,7 @@ int main(int argc, char **argv) {
printf
(
"gNB %d
\n
"
,
i
);
free_gNB_dlsch
(
gNB
->
dlsch
[
0
][
i
]);
printf
(
"UE %d
\n
"
,
i
);
free_nr_ue_dlsch
(
UE
->
dlsch
[
UE
->
current_thread_id
[
subframe
]
][
0
][
i
]);
free_nr_ue_dlsch
(
UE
->
dlsch
[
0
][
0
][
i
]);
}
for
(
i
=
0
;
i
<
2
;
i
++
)
{
...
...
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