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
lizhongxiao
OpenXG-RAN
Commits
8cdba4ff
Commit
8cdba4ff
authored
May 29, 2020
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI: fix a few cppcheck errors
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
534525ea
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
31 additions
and
20 deletions
+31
-20
executables/main-fs6.c
executables/main-fs6.c
+5
-2
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
+1
-1
openair1/PHY/NR_TRANSPORT/nr_prach.c
openair1/PHY/NR_TRANSPORT/nr_prach.c
+2
-5
openair1/PHY/NR_TRANSPORT/pucch_rx.c
openair1/PHY/NR_TRANSPORT/pucch_rx.c
+5
-5
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+1
-1
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+1
-1
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+3
-1
openair1/SIMULATION/NR_PHY/prachsim.c
openair1/SIMULATION/NR_PHY/prachsim.c
+7
-1
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+6
-3
No files found.
executables/main-fs6.c
View file @
8cdba4ff
...
...
@@ -1194,6 +1194,8 @@ void phy_procedures_eNB_TX_tosplit(uint8_t *bufferZone, PHY_VARS_eNB *eNB, L1_rx
for
(
int
i
=
0
;
i
<
NUMBER_OF_UE_MAX
;
i
++
)
{
int
harq_pid
;
LTE_eNB_ULSCH_t
*
ulsch
=
eNB
->
ulsch
[
i
];
if
(
ulsch
==
NULL
)
continue
;
if
(
ulsch
->
ue_type
>
NOCE
)
harq_pid
=
0
;
...
...
@@ -1209,9 +1211,10 @@ void phy_procedures_eNB_TX_tosplit(uint8_t *bufferZone, PHY_VARS_eNB *eNB, L1_rx
for
(
int
k
=
0
;
k
<
8
;
k
++
)
{
ulsch_harq
=
ulsch
->
harq_processes
[
k
];
if
(
ulsch_harq
==
NULL
)
continue
;
if
(
ulsch
&&
(
ulsch
->
rnti
>
0
)
&&
if
((
ulsch
->
rnti
>
0
)
&&
(
ulsch_harq
->
status
==
ACTIVE
)
&&
(
ulsch_harq
->
frame
==
frame
)
&&
(
ulsch_harq
->
subframe
==
subframe
)
&&
...
...
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
View file @
8cdba4ff
...
...
@@ -495,7 +495,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,
}
AssertFatal
(
sumKr
>
0
,
"[eNB] ulsch_decoding.c: FATAL sumKr is 0! (Nid_cell %d, rnti %x, x2 %x): harq_pid %d round %d, RV %d, O_RI %d, O_ACK %d, G %
d
, subframe %d
\n
"
,
"[eNB] ulsch_decoding.c: FATAL sumKr is 0! (Nid_cell %d, rnti %x, x2 %x): harq_pid %d round %d, RV %d, O_RI %d, O_ACK %d, G %
u
, subframe %d
\n
"
,
frame_parms
->
Nid_cell
,
ulsch
->
rnti
,
x2
,
harq_pid
,
ulsch_harq
->
round
,
...
...
openair1/PHY/NR_TRANSPORT/nr_prach.c
View file @
8cdba4ff
...
...
@@ -366,6 +366,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
uint16_t
*
max_preamble_delay
)
{
AssertFatal
(
gNB
!=
NULL
,
"Can only be called from gNB
\n
"
);
int
i
;
...
...
@@ -405,7 +406,6 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
nr_frequency_range_e
freq_range
;
AssertFatal
(
gNB
!=
NULL
,
"Can only be called from gNB
\n
"
);
fp
=
&
gNB
->
frame_parms
;
nb_rx
=
fp
->
nb_antennas_rx
;
...
...
@@ -420,8 +420,6 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
uint8_t
prach_fmt
=
get_nr_prach_fmt
(
prach_ConfigIndex
,
frame_type
,
freq_range
);
uint16_t
N_ZC
=
(
prach_fmt
<
4
)
?
839
:
139
;
AssertFatal
(
gNB
!=
NULL
,
"gNB is null
\n
"
);
prach_ifft
=
gNB
->
prach_vars
.
prach_ifft
;
prachF
=
gNB
->
prach_vars
.
prachF
;
if
(
LOG_DEBUGFLAG
(
PRACH
)){
...
...
@@ -456,8 +454,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
AssertFatal
(
NCS
!=
99
,
"NCS has not been set
\n
"
);
if
(
gNB
)
start_meas
(
&
gNB
->
rx_prach
);
start_meas
(
&
gNB
->
rx_prach
);
prach_root_sequence_map
=
(
prach_fmt
<
4
)
?
prach_root_sequence_map_0_3
:
prach_root_sequence_map_abc
;
...
...
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
8cdba4ff
...
...
@@ -392,7 +392,7 @@ void nr_decode_pucch1( int32_t **rxdataF,
uint8_t
timeDomainOCC
,
uint8_t
nr_bit
)
{
#ifdef DEBUG_NR_PUCCH_RX
printf
(
"
\t
[nr_generate_pucch1] start function at slot(nr_tti_tx)=%d payload=%
d
m0=%d nrofSymbols=%d startingSymbolIndex=%d startingPRB=%d startingPRB_intraSlotHopping=%d timeDomainOCC=%d nr_bit=%d
\n
"
,
printf
(
"
\t
[nr_generate_pucch1] start function at slot(nr_tti_tx)=%d payload=%
lp
m0=%d nrofSymbols=%d startingSymbolIndex=%d startingPRB=%d startingPRB_intraSlotHopping=%d timeDomainOCC=%d nr_bit=%d
\n
"
,
nr_tti_tx
,
payload
,
m0
,
nrofSymbols
,
startingSymbolIndex
,
startingPRB
,
startingPRB_intraSlotHopping
,
timeDomainOCC
,
nr_bit
);
#endif
/*
...
...
@@ -402,7 +402,7 @@ void nr_decode_pucch1( int32_t **rxdataF,
// complex-valued symbol d_re, d_im containing complex-valued symbol d(0):
int16_t
d_re
=
0
,
d_im
=
0
,
d1_re
=
0
,
d1_im
=
0
;
#ifdef DEBUG_NR_PUCCH_RX
printf
(
"
\t
[nr_generate_pucch1] sequence modulation: payload=%
x
\t
de_re=%d
\t
de_im=%d
\n
"
,
payload
,
d_re
,
d_im
);
printf
(
"
\t
[nr_generate_pucch1] sequence modulation: payload=%
lp
\t
de_re=%d
\t
de_im=%d
\n
"
,
payload
,
d_re
,
d_im
);
#endif
/*
* Defining cyclic shift hopping TS 38.211 Subclause 6.3.2.2.2
...
...
@@ -496,7 +496,7 @@ void nr_decode_pucch1( int32_t **rxdataF,
z_re_rx
[
i
+
n
]
=
((
int16_t
*
)
&
rxdataF
[
0
][
re_offset
])[
0
];
z_im_rx
[
i
+
n
]
=
((
int16_t
*
)
&
rxdataF
[
0
][
re_offset
])[
1
];
#ifdef DEBUG_NR_PUCCH_RX
printf
(
"
\t
[nr_generate_pucch1] mapping PUCCH to RE
\t
amp=%d
\t
ofdm_symbol_size=%d
\t
N_RB_DL=%d
\t
first_carrier_offset=%d
\t
z_pucch[%d]=txptr(%
d
)=(x_n(l=%d,n=%d)=(%d,%d))
\n
"
,
printf
(
"
\t
[nr_generate_pucch1] mapping PUCCH to RE
\t
amp=%d
\t
ofdm_symbol_size=%d
\t
N_RB_DL=%d
\t
first_carrier_offset=%d
\t
z_pucch[%d]=txptr(%
u
)=(x_n(l=%d,n=%d)=(%d,%d))
\n
"
,
amp
,
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
N_RB_DL
,
frame_parms
->
first_carrier_offset
,
i
+
n
,
re_offset
,
l
,
n
,((
int16_t
*
)
&
rxdataF
[
0
][
re_offset
])[
0
],((
int16_t
*
)
&
rxdataF
[
0
][
re_offset
])[
1
]);
#endif
...
...
@@ -507,7 +507,7 @@ void nr_decode_pucch1( int32_t **rxdataF,
z_dmrs_im_rx
[
i
+
n
]
=
((
int16_t
*
)
&
rxdataF
[
0
][
re_offset
])[
1
];
// printf("%d\t%d\t%d\n",l,z_dmrs_re_rx[i+n],z_dmrs_im_rx[i+n]);
#ifdef DEBUG_NR_PUCCH_RX
printf
(
"
\t
[nr_generate_pucch1] mapping DM-RS to RE
\t
amp=%d
\t
ofdm_symbol_size=%d
\t
N_RB_DL=%d
\t
first_carrier_offset=%d
\t
z_dm-rs[%d]=txptr(%
d
)=(x_n(l=%d,n=%d)=(%d,%d))
\n
"
,
printf
(
"
\t
[nr_generate_pucch1] mapping DM-RS to RE
\t
amp=%d
\t
ofdm_symbol_size=%d
\t
N_RB_DL=%d
\t
first_carrier_offset=%d
\t
z_dm-rs[%d]=txptr(%
u
)=(x_n(l=%d,n=%d)=(%d,%d))
\n
"
,
amp
,
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
N_RB_DL
,
frame_parms
->
first_carrier_offset
,
i
+
n
,
re_offset
,
l
,
n
,((
int16_t
*
)
&
rxdataF
[
0
][
re_offset
])[
0
],((
int16_t
*
)
&
rxdataF
[
0
][
re_offset
])[
1
]);
#endif
...
...
@@ -1062,7 +1062,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
r_im_ext
[
aa
][
15
]
=
rp
[
aa
][
47
];
#ifdef DEBUG_NR_PUCCH_RX
for
(
int
i
=
0
;
i
<
8
;
i
++
)
printf
(
"Ant %d PRB %d dmrs[%d] -> (%d,%d)
\n
"
,
aa
,
prb
+
(
i
>>
2
),
i
,
rd_re_ext
[
aa
][
i
],
rd_im_ext
[
aa
]
,
i
);
for
(
int
i
=
0
;
i
<
8
;
i
++
)
printf
(
"Ant %d PRB %d dmrs[%d] -> (%d,%d)
\n
"
,
aa
,
prb
+
(
i
>>
2
),
i
,
rd_re_ext
[
aa
][
i
],
rd_im_ext
[
aa
]);
#endif
}
// aa
}
// prb
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
8cdba4ff
...
...
@@ -618,7 +618,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_PDCCH
printf
(
"pilot %
d
: rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
+
2
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
printf
(
"pilot %
u
: rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
+
2
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
#endif
multadd_real_vector_complex_scalar
(
fr
,
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
View file @
8cdba4ff
...
...
@@ -167,13 +167,13 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
0
,
harq_process_ul_ue
->
pusch_pdu
.
nrOfLayers
);
TBS
=
harq_process_ul_ue
->
pusch_pdu
.
pusch_data
.
tb_size
;
uint8_t
access_mode
=
SCHEDULED_ACCESS
;
//-----------------------------------------------------//
// to be removed later when MAC is ready
if
(
harq_process_ul_ue
!=
NULL
){
TBS
=
harq_process_ul_ue
->
pusch_pdu
.
pusch_data
.
tb_size
;
data_existing
=
0
;
if
(
IS_SOFTMODEM_NOS1
){
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
8cdba4ff
...
...
@@ -869,7 +869,7 @@ int main(int argc, char **argv)
if
(
errors_scrambling
>
0
)
{
if
(
n_trials
==
1
)
printf
(
"errors_scrambling = %
d/%d
(trial %d)
\n
"
,
errors_scrambling
,
available_bits
,
trial
);
printf
(
"errors_scrambling = %
u/%u
(trial %d)
\n
"
,
errors_scrambling
,
available_bits
,
trial
);
}
if
(
errors_bit
>
0
)
{
...
...
@@ -977,6 +977,8 @@ int main(int argc, char **argv)
if
(
input_fd
)
fclose
(
input_fd
);
if
(
scg_fd
)
fclose
(
scg_fd
);
return
(
n_errors
);
}
openair1/SIMULATION/NR_PHY/prachsim.c
View file @
8cdba4ff
...
...
@@ -188,21 +188,27 @@ int main(int argc, char **argv)
case
'H'
:
channel_model
=
Rayleigh8
;
break
;
case
'I'
:
channel_model
=
Rayleigh1
;
break
;
case
'J'
:
channel_model
=
Rayleigh1_corr
;
break
;
case
'K'
:
channel_model
=
Rayleigh1_anticorr
;
break
;
case
'L'
:
channel_model
=
Rice8
;
break
;
case
'M'
:
channel_model
=
Rice1
;
break
;
case
'N'
:
channel_model
=
Rayleigh1_800
;
...
...
@@ -628,7 +634,7 @@ int main(int argc, char **argv)
}
}
printf
(
"SNR %f dB, UE Speed %f km/h: errors %
d
/%d (delay %f)
\n
"
,
SNR
,
ue_speed
,
prach_errors
,
n_frames
,
delay_avg
/
(
double
)(
n_frames
-
prach_errors
));
printf
(
"SNR %f dB, UE Speed %f km/h: errors %
u
/%d (delay %f)
\n
"
,
SNR
,
ue_speed
,
prach_errors
,
n_frames
,
delay_avg
/
(
double
)(
n_frames
-
prach_errors
));
//printf("(%f,%f)\n",ue_speed,(double)prach_errors/(double)n_frames);
}
// UE Speed loop
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
8cdba4ff
...
...
@@ -724,7 +724,7 @@ int main(int argc, char **argv)
if
(
errors_scrambling
>
0
)
{
if
(
n_trials
==
1
)
printf
(
"
\x1B
[31m""[frame %d][trial %d]
\t
number of errors in unscrambling = %
d
\n
"
"
\x1B
[0m"
,
frame
,
trial
,
errors_scrambling
);
printf
(
"
\x1B
[31m""[frame %d][trial %d]
\t
number of errors in unscrambling = %
u
\n
"
"
\x1B
[0m"
,
frame
,
trial
,
errors_scrambling
);
}
for
(
i
=
0
;
i
<
TBS
;
i
++
)
{
...
...
@@ -742,13 +742,13 @@ int main(int argc, char **argv)
if
(
errors_decoding
>
0
)
{
n_false_positive
++
;
if
(
n_trials
==
1
)
printf
(
"
\x1B
[31m""[frame %d][trial %d]
\t
number of errors in decoding = %
d
\n
"
"
\x1B
[0m"
,
frame
,
trial
,
errors_decoding
);
printf
(
"
\x1B
[31m""[frame %d][trial %d]
\t
number of errors in decoding = %
u
\n
"
"
\x1B
[0m"
,
frame
,
trial
,
errors_decoding
);
}
}
// trial loop
printf
(
"*****************************************
\n
"
);
printf
(
"SNR %f: n_errors (negative CRC) = %d/%d, false_positive %d/%d, errors_scrambling %
d
/%d
\n
"
,
SNR
,
n_errors
,
n_trials
,
n_false_positive
,
n_trials
,
errors_scrambling
,
n_trials
);
printf
(
"SNR %f: n_errors (negative CRC) = %d/%d, false_positive %d/%d, errors_scrambling %
u
/%d
\n
"
,
SNR
,
n_errors
,
n_trials
,
n_false_positive
,
n_trials
,
errors_scrambling
,
n_trials
);
printf
(
"
\n
"
);
printf
(
"SNR %f: Channel BLER %e, Channel BER %e
\n
"
,
SNR
,(
double
)
n_errors
/
n_trials
,(
double
)
errors_scrambling
/
available_bits
/
n_trials
);
printf
(
"*****************************************
\n
"
);
...
...
@@ -791,5 +791,8 @@ int main(int argc, char **argv)
if
(
input_fd
)
fclose
(
input_fd
);
if
(
scg_fd
)
fclose
(
scg_fd
);
return
(
n_errors
);
}
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