Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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 UE
Commits
d7155c2e
Commit
d7155c2e
authored
Dec 19, 2019
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some cppcheck fixes and also compilation warnings removal
parent
bfa69061
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
77 additions
and
58 deletions
+77
-58
executables/nr-ru.c
executables/nr-ru.c
+2
-4
openair1/PHY/CODING/TESTBENCH/ldpctest.c
openair1/PHY/CODING/TESTBENCH/ldpctest.c
+1
-0
openair1/PHY/CODING/TESTBENCH/polartest.c
openair1/PHY/CODING/TESTBENCH/polartest.c
+4
-2
openair1/PHY/CODING/nrLDPC_encoder/ldpc_generate_coefficient.c
...ir1/PHY/CODING/nrLDPC_encoder/ldpc_generate_coefficient.c
+2
-1
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
+2
-0
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c
+1
-1
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
+10
-6
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
+1
-1
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
+7
-6
openair1/PHY/NR_UE_TRANSPORT/cic_filter_nr.c
openair1/PHY/NR_UE_TRANSPORT/cic_filter_nr.c
+1
-0
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
+1
-1
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
+4
-3
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
+23
-17
openair1/PHY/TOOLS/nr_phy_scope.c
openair1/PHY/TOOLS/nr_phy_scope.c
+6
-6
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+3
-1
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+2
-2
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
+5
-5
openair2/NETWORK_DRIVER/UE_IP/common.c
openair2/NETWORK_DRIVER/UE_IP/common.c
+2
-2
No files found.
executables/nr-ru.c
View file @
d7155c2e
...
@@ -806,7 +806,6 @@ static void *ru_thread_asynch_rxtx( void *param ) {
...
@@ -806,7 +806,6 @@ static void *ru_thread_asynch_rxtx( void *param ) {
printf
(
"devices ok (ru_thread_asynch_rx)
\n
"
);
printf
(
"devices ok (ru_thread_asynch_rx)
\n
"
);
while
(
!
oai_exit
)
{
while
(
!
oai_exit
)
{
if
(
oai_exit
)
break
;
if
(
subframe
==
9
)
{
if
(
subframe
==
9
)
{
subframe
=
0
;
subframe
=
0
;
...
@@ -854,7 +853,7 @@ static void *ru_thread_prach( void *param ) {
...
@@ -854,7 +853,7 @@ static void *ru_thread_prach( void *param ) {
LOG_I
(
PHY
,
"%s() RU configured - RACH processing thread running
\n
"
,
__FUNCTION__
);
LOG_I
(
PHY
,
"%s() RU configured - RACH processing thread running
\n
"
,
__FUNCTION__
);
while
(
!
oai_exit
)
{
while
(
!
oai_exit
)
{
if
(
oai_exit
)
break
;
if
(
wait_on_condition
(
&
proc
->
mutex_prach
,
&
proc
->
cond_prach
,
&
proc
->
instance_cnt_prach
,
"ru_prach_thread"
)
<
0
)
break
;
if
(
wait_on_condition
(
&
proc
->
mutex_prach
,
&
proc
->
cond_prach
,
&
proc
->
instance_cnt_prach
,
"ru_prach_thread"
)
<
0
)
break
;
...
@@ -1159,7 +1158,7 @@ int setup_RU_buffers(RU_t *ru) {
...
@@ -1159,7 +1158,7 @@ int setup_RU_buffers(RU_t *ru) {
frame_parms
=
ru
->
nr_frame_parms
;
frame_parms
=
ru
->
nr_frame_parms
;
printf
(
"setup_RU_buffers: frame_parms = %p
\n
"
,
frame_parms
);
printf
(
"setup_RU_buffers: frame_parms = %p
\n
"
,
frame_parms
);
}
else
{
}
else
{
printf
(
"
RU[%d] not initialized
\n
"
,
ru
->
idx
);
printf
(
"
ru pointer is NULL
\n
"
);
return
(
-
1
);
return
(
-
1
);
}
}
...
@@ -1259,7 +1258,6 @@ static void *ru_thread_tx( void *param ) {
...
@@ -1259,7 +1258,6 @@ static void *ru_thread_tx( void *param ) {
}
}
while
(
!
oai_exit
)
{
while
(
!
oai_exit
)
{
if
(
oai_exit
)
break
;
LOG_D
(
PHY
,
"ru_thread_tx: Waiting for TX processing
\n
"
);
LOG_D
(
PHY
,
"ru_thread_tx: Waiting for TX processing
\n
"
);
// wait until eNBs are finished subframe RX n and TX n+4
// wait until eNBs are finished subframe RX n and TX n+4
...
...
openair1/PHY/CODING/TESTBENCH/ldpctest.c
View file @
d7155c2e
...
@@ -317,6 +317,7 @@ int test_ldpc(short No_iteration,
...
@@ -317,6 +317,7 @@ int test_ldpc(short No_iteration,
for
(
i
=
0
;
i
<
block_length
+
(
nrows
-
no_punctured_columns
)
*
Zc
-
removed_bit
;
i
++
)
for
(
i
=
0
;
i
<
block_length
+
(
nrows
-
no_punctured_columns
)
*
Zc
-
removed_bit
;
i
++
)
if
(
channel_input
[
j
][
i
]
!=
channel_input_optim
[
j
][
i
])
{
if
(
channel_input
[
j
][
i
]
!=
channel_input_optim
[
j
][
i
])
{
printf
(
"differ in seg %u pos %u (%u,%u)
\n
"
,
j
,
i
,
channel_input
[
j
][
i
],
channel_input_optim
[
j
][
i
]);
printf
(
"differ in seg %u pos %u (%u,%u)
\n
"
,
j
,
i
,
channel_input
[
j
][
i
],
channel_input_optim
[
j
][
i
]);
free
(
channel_output
);
return
(
-
1
);
return
(
-
1
);
}
}
//else{
//else{
...
...
openair1/PHY/CODING/TESTBENCH/polartest.c
View file @
d7155c2e
...
@@ -215,6 +215,8 @@ if (logFlag){
...
@@ -215,6 +215,8 @@ if (logFlag){
free
(
encoder_outputByte
);
free
(
encoder_outputByte
);
free
(
channel_output
);
free
(
channel_output
);
free
(
modulated_input
);
free
(
modulated_input
);
if
(
logFlag
)
fclose
(
logFile
);
return
0
;
return
0
;
#endif
#endif
...
@@ -317,13 +319,13 @@ if (logFlag){
...
@@ -317,13 +319,13 @@ if (logFlag){
if
(
nBitError
>
0
)
blockErrorState
=
1
;
if
(
nBitError
>
0
)
blockErrorState
=
1
;
#ifdef DEBUG_POLARTEST
#ifdef DEBUG_POLARTEST
for
(
int
i
=
0
;
i
<
testArrayLength
;
i
++
)
for
(
int
i
=
0
;
i
<
testArrayLength
;
i
++
)
printf
(
"[polartest/decoderState=%
d
] testInput[%d]=0x%08x, estimatedOutput[%d]=0x%08x
\n
"
,
decoderState
,
i
,
testInput
[
i
],
i
,
estimatedOutput
[
i
]);
printf
(
"[polartest/decoderState=%
u
] testInput[%d]=0x%08x, estimatedOutput[%d]=0x%08x
\n
"
,
decoderState
,
i
,
testInput
[
i
],
i
,
estimatedOutput
[
i
]);
#endif
#endif
//Iteration times are in microseconds.
//Iteration times are in microseconds.
timeEncoderCumulative
+=
(
timeEncoder
.
diff
/
(
cpu_freq_GHz
*
1000
.
0
));
timeEncoderCumulative
+=
(
timeEncoder
.
diff
/
(
cpu_freq_GHz
*
1000
.
0
));
timeDecoderCumulative
+=
(
timeDecoder
.
diff
/
(
cpu_freq_GHz
*
1000
.
0
));
timeDecoderCumulative
+=
(
timeDecoder
.
diff
/
(
cpu_freq_GHz
*
1000
.
0
));
if
(
logFlag
)
fprintf
(
logFile
,
",%f,%d,%
d
,%f,%f
\n
"
,
SNR
,
nBitError
,
blockErrorState
,
(
timeEncoder
.
diff
/
(
cpu_freq_GHz
*
1000
.
0
)),
(
timeDecoder
.
diff
/
(
cpu_freq_GHz
*
1000
.
0
)));
if
(
logFlag
)
fprintf
(
logFile
,
",%f,%d,%
u
,%f,%f
\n
"
,
SNR
,
nBitError
,
blockErrorState
,
(
timeEncoder
.
diff
/
(
cpu_freq_GHz
*
1000
.
0
)),
(
timeDecoder
.
diff
/
(
cpu_freq_GHz
*
1000
.
0
)));
if
(
nBitError
<
0
)
{
if
(
nBitError
<
0
)
{
blockErrorCumulative
++
;
blockErrorCumulative
++
;
...
...
openair1/PHY/CODING/nrLDPC_encoder/ldpc_generate_coefficient.c
View file @
d7155c2e
...
@@ -494,7 +494,8 @@ int ldpc_encoder_orig(unsigned char *test_input,unsigned char *channel_input,int
...
@@ -494,7 +494,8 @@ int ldpc_encoder_orig(unsigned char *test_input,unsigned char *channel_input,int
fprintf
(
fd
,
" int i2;
\n
"
);
fprintf
(
fd
,
" int i2;
\n
"
);
fprintf
(
fd2
,
" int i2;
\n
"
);
fprintf
(
fd2
,
" int i2;
\n
"
);
fprintf
(
fd
,
" for (i2=0; i2<%d; i2++) {
\n
"
,
Zc
>>
shift
);
fprintf
(
fd
,
" for (i2=0; i2<%d; i2++) {
\n
"
,
Zc
>>
shift
);
fprintf
(
fd2
,
" for (i2=0; i2<%d; i2++) {
\n
"
,
Zc
>>
(
shift
-
1
));
if
(
shift
>
0
)
fprintf
(
fd2
,
" for (i2=0; i2<%d; i2++) {
\n
"
,
Zc
>>
(
shift
-
1
));
for
(
i2
=
0
;
i2
<
1
;
i2
++
)
for
(
i2
=
0
;
i2
<
1
;
i2
++
)
{
{
//t=Kb*Zc+i2;
//t=Kb*Zc+i2;
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
View file @
d7155c2e
...
@@ -252,6 +252,7 @@ int8_t polar_decoder(double *input,
...
@@ -252,6 +252,7 @@ int8_t polar_decoder(double *input,
nr_free_uint8_3D_array
(
bit
,
polarParams
->
N
,
(
polarParams
->
n
+
1
));
nr_free_uint8_3D_array
(
bit
,
polarParams
->
N
,
(
polarParams
->
n
+
1
));
nr_free_double_3D_array
(
llr
,
polarParams
->
N
,
(
polarParams
->
n
+
1
));
nr_free_double_3D_array
(
llr
,
polarParams
->
N
,
(
polarParams
->
n
+
1
));
nr_free_uint8_2D_array
(
crcChecksum
,
polarParams
->
crcParityBits
);
nr_free_uint8_2D_array
(
crcChecksum
,
polarParams
->
crcParityBits
);
free
(
tempECGM
);
return
(
-
1
);
return
(
-
1
);
}
}
...
@@ -522,6 +523,7 @@ int8_t polar_decoder_dci(double *input,
...
@@ -522,6 +523,7 @@ int8_t polar_decoder_dci(double *input,
nr_free_uint8_3D_array
(
bit
,
polarParams
->
N
,
(
polarParams
->
n
+
1
));
nr_free_uint8_3D_array
(
bit
,
polarParams
->
N
,
(
polarParams
->
n
+
1
));
nr_free_double_3D_array
(
llr
,
polarParams
->
N
,
(
polarParams
->
n
+
1
));
nr_free_double_3D_array
(
llr
,
polarParams
->
N
,
(
polarParams
->
n
+
1
));
nr_free_uint8_2D_array
(
crcChecksum
,
polarParams
->
crcParityBits
);
nr_free_uint8_2D_array
(
crcChecksum
,
polarParams
->
crcParityBits
);
free
(
tempECGM
);
return
(
-
1
);
return
(
-
1
);
}
}
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c
View file @
d7155c2e
...
@@ -470,7 +470,7 @@ void computeBeta(const t_nrPolar_params *pp,decoder_node_t *node) {
...
@@ -470,7 +470,7 @@ void computeBeta(const t_nrPolar_params *pp,decoder_node_t *node) {
int
ssr4len
=
node
->
Nv
/
2
/
8
;
int
ssr4len
=
node
->
Nv
/
2
/
8
;
register
__m128i
allones
=*
((
__m128i
*
)
all1
);
register
__m128i
allones
=*
((
__m128i
*
)
all1
);
for
(
int
i
=
0
;
i
<
sse4len
;
i
++
)
{
for
(
int
i
=
0
;
i
<
sse4len
;
i
++
)
{
((
__m256i
*
)
betav
)[
i
]
=
_mm_or_si128
(
_mm_cmpeq_epi16
(((
__m128i
*
)
betar
)[
i
],
((
__m128i
*
)
betal
)[
i
]),
allones
)
)
;
((
__m256i
*
)
betav
)[
i
]
=
_mm_or_si128
(
_mm_cmpeq_epi16
(((
__m128i
*
)
betar
)[
i
],
((
__m128i
*
)
betal
)[
i
]),
allones
);
}
}
}
}
else
if
(
sse4mod
==
4
)
{
else
if
(
sse4mod
==
4
)
{
...
...
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
View file @
d7155c2e
...
@@ -103,7 +103,11 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
...
@@ -103,7 +103,11 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
break
;
break
;
default:
default:
printf
(
"pusch_channel_estimation: nushift=%d -> ERROR
\n
"
,
nushift
);
#ifdef DEBUG_CH
if
(
debug_ch_est
)
fclose
(
debug_ch_est
);
#endif
return
(
-
1
);
return
(
-
1
);
break
;
break
;
}
}
...
@@ -193,7 +197,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
...
@@ -193,7 +197,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_CH
#ifdef DEBUG_CH
fprintf
(
debug_ch_est
,
"pilot %
d
: rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
fprintf
(
debug_ch_est
,
"pilot %
u
: rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
//printf("pilot %d : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",pilot_cnt,rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]);
//printf("pilot %d : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",pilot_cnt,rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]);
#endif
#endif
multadd_real_vector_complex_scalar
(
fm
,
multadd_real_vector_complex_scalar
(
fm
,
...
@@ -208,7 +212,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
...
@@ -208,7 +212,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_PUSCH
#ifdef DEBUG_PUSCH
printf
(
"pilot %d
: rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
+
1
,
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
+
1
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
#endif
#endif
multadd_real_vector_complex_scalar
(
fmm
,
multadd_real_vector_complex_scalar
(
fmm
,
ch
,
ch
,
...
@@ -225,7 +229,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
...
@@ -225,7 +229,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_PUSCH
#ifdef DEBUG_PUSCH
printf
(
"pilot %d
: rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
,
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
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
#endif
#endif
multadd_real_vector_complex_scalar
(
fm
,
multadd_real_vector_complex_scalar
(
fm
,
ch
,
ch
,
...
@@ -243,7 +247,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
...
@@ -243,7 +247,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_PUSCH
#ifdef DEBUG_PUSCH
printf
(
"ch 0 %d
\n
"
,((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
]));
printf
(
"ch 0 %d
\n
"
,((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
]));
printf
(
"pilot %
d
: rxF - > (%d,%d) addr %p ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
+
1
,
rxF
[
0
],
rxF
[
1
],
&
rxF
[
0
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
printf
(
"pilot %
u
: rxF - > (%d,%d) addr %p ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
+
1
,
rxF
[
0
],
rxF
[
1
],
&
rxF
[
0
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
#endif
#endif
multadd_real_vector_complex_scalar
(
fmr
,
multadd_real_vector_complex_scalar
(
fmr
,
ch
,
ch
,
...
@@ -258,7 +262,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
...
@@ -258,7 +262,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_PUSCH
#ifdef DEBUG_PUSCH
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
#endif
multadd_real_vector_complex_scalar
(
fr
,
multadd_real_vector_complex_scalar
(
fr
,
ch
,
ch
,
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
View file @
d7155c2e
...
@@ -80,7 +80,7 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t *dlsch,
...
@@ -80,7 +80,7 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t *dlsch,
time_stats_t
*
dlsch_modulation_stats
);
time_stats_t
*
dlsch_modulation_stats
);
void
free_gNB_dlsch
(
NR_gNB_DLSCH_t
*
dlsch
);
void
free_gNB_dlsch
(
NR_gNB_DLSCH_t
*
*
dlschptr
);
void
clean_gNB_dlsch
(
NR_gNB_DLSCH_t
*
dlsch
);
void
clean_gNB_dlsch
(
NR_gNB_DLSCH_t
*
dlsch
);
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
View file @
d7155c2e
...
@@ -48,11 +48,12 @@
...
@@ -48,11 +48,12 @@
//#define DEBUG_DLSCH_CODING
//#define DEBUG_DLSCH_CODING
//#define DEBUG_DLSCH_FREE 1
//#define DEBUG_DLSCH_FREE 1
void
free_gNB_dlsch
(
NR_gNB_DLSCH_t
*
dlsch
)
void
free_gNB_dlsch
(
NR_gNB_DLSCH_t
*
*
dlschptr
)
{
{
int
i
;
int
i
;
int
r
;
int
r
;
NR_gNB_DLSCH_t
*
dlsch
=
*
dlschptr
;
if
(
dlsch
)
{
if
(
dlsch
)
{
#ifdef DEBUG_DLSCH_FREE
#ifdef DEBUG_DLSCH_FREE
printf
(
"Freeing dlsch %p
\n
"
,
dlsch
);
printf
(
"Freeing dlsch %p
\n
"
,
dlsch
);
...
@@ -232,7 +233,7 @@ NR_gNB_DLSCH_t *new_gNB_dlsch(unsigned char Kmimo,
...
@@ -232,7 +233,7 @@ NR_gNB_DLSCH_t *new_gNB_dlsch(unsigned char Kmimo,
LOG_D
(
PHY
,
"new_gNB_dlsch exit flag %d, size of %ld
\n
"
,
LOG_D
(
PHY
,
"new_gNB_dlsch exit flag %d, size of %ld
\n
"
,
exit_flag
,
sizeof
(
NR_gNB_DLSCH_t
));
exit_flag
,
sizeof
(
NR_gNB_DLSCH_t
));
free_gNB_dlsch
(
dlsch
);
free_gNB_dlsch
(
&
dlsch
);
return
(
NULL
);
return
(
NULL
);
...
@@ -278,7 +279,7 @@ int nr_dlsch_encoding(unsigned char *a,
...
@@ -278,7 +279,7 @@ int nr_dlsch_encoding(unsigned char *a,
unsigned
int
G
;
unsigned
int
G
;
unsigned
int
crc
=
1
;
unsigned
int
crc
=
1
;
uint8_t
harq_pid
=
dlsch
->
harq_ids
[
frame
%
2
][
slot
];
uint8_t
harq_pid
=
dlsch
->
harq_ids
[
frame
&
2
][
slot
];
AssertFatal
(
harq_pid
<
8
&&
harq_pid
>=
0
,
"illegal harq_pid %d
\b
"
,
harq_pid
);
AssertFatal
(
harq_pid
<
8
&&
harq_pid
>=
0
,
"illegal harq_pid %d
\b
"
,
harq_pid
);
nfapi_nr_dl_config_dlsch_pdu_rel15_t
rel15
=
dlsch
->
harq_processes
[
harq_pid
]
->
dlsch_pdu
.
dlsch_pdu_rel15
;
nfapi_nr_dl_config_dlsch_pdu_rel15_t
rel15
=
dlsch
->
harq_processes
[
harq_pid
]
->
dlsch_pdu
.
dlsch_pdu_rel15
;
uint16_t
nb_rb
=
rel15
.
n_prb
;
uint16_t
nb_rb
=
rel15
.
n_prb
;
...
@@ -458,7 +459,7 @@ int nr_dlsch_encoding(unsigned char *a,
...
@@ -458,7 +459,7 @@ int nr_dlsch_encoding(unsigned char *a,
#ifdef DEBUG_DLSCH_CODING
#ifdef DEBUG_DLSCH_CODING
for
(
int
i
=
0
;
i
<
16
;
i
++
)
for
(
int
i
=
0
;
i
<
16
;
i
++
)
printf
(
"output ratematching e[%d]= %d r_offset %
d
\n
"
,
i
,
dlsch
->
harq_processes
[
harq_pid
]
->
e
[
i
+
r_offset
],
r_offset
);
printf
(
"output ratematching e[%d]= %d r_offset %
u
\n
"
,
i
,
dlsch
->
harq_processes
[
harq_pid
]
->
e
[
i
+
r_offset
],
r_offset
);
#endif
#endif
nr_interleaving_ldpc
(
E
,
nr_interleaving_ldpc
(
E
,
...
@@ -469,7 +470,7 @@ int nr_dlsch_encoding(unsigned char *a,
...
@@ -469,7 +470,7 @@ int nr_dlsch_encoding(unsigned char *a,
#ifdef DEBUG_DLSCH_CODING
#ifdef DEBUG_DLSCH_CODING
for
(
int
i
=
0
;
i
<
16
;
i
++
)
for
(
int
i
=
0
;
i
<
16
;
i
++
)
printf
(
"output interleaving f[%d]= %d r_offset %
d
\n
"
,
i
,
dlsch
->
harq_processes
[
harq_pid
]
->
f
[
i
+
r_offset
],
r_offset
);
printf
(
"output interleaving f[%d]= %d r_offset %
u
\n
"
,
i
,
dlsch
->
harq_processes
[
harq_pid
]
->
f
[
i
+
r_offset
],
r_offset
);
if
(
r
==
dlsch
->
harq_processes
[
harq_pid
]
->
C
-
1
)
if
(
r
==
dlsch
->
harq_processes
[
harq_pid
]
->
C
-
1
)
write_output
(
"enc_output.m"
,
"enc"
,
dlsch
->
harq_processes
[
harq_pid
]
->
f
,
G
,
1
,
4
);
write_output
(
"enc_output.m"
,
"enc"
,
dlsch
->
harq_processes
[
harq_pid
]
->
f
,
G
,
1
,
4
);
...
...
openair1/PHY/NR_UE_TRANSPORT/cic_filter_nr.c
View file @
d7155c2e
...
@@ -438,6 +438,7 @@ void cic_decimator(int16_t *input_buffer, int16_t *output_buffer, int length, in
...
@@ -438,6 +438,7 @@ void cic_decimator(int16_t *input_buffer, int16_t *output_buffer, int length, in
fir_filter_basic
(
input
,
output
,
new_length
,
FIR_TAPS_NUMBER
,
filter_taps
,
SHARPENED_FIR_SCALING_ACC
);
fir_filter_basic
(
input
,
output
,
new_length
,
FIR_TAPS_NUMBER
,
filter_taps
,
SHARPENED_FIR_SCALING_ACC
);
#endif
#endif
free
(
filter_taps_fixed_point
);
}
}
else
else
{
{
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
View file @
d7155c2e
...
@@ -61,7 +61,7 @@ void free_nr_ue_dlsch(NR_UE_DLSCH_t *dlsch);
...
@@ -61,7 +61,7 @@ void free_nr_ue_dlsch(NR_UE_DLSCH_t *dlsch);
NR_UE_DLSCH_t
*
new_nr_ue_dlsch
(
uint8_t
Kmimo
,
uint8_t
Mdlharq
,
uint32_t
Nsoft
,
uint8_t
max_turbo_iterations
,
uint8_t
N_RB_DL
,
uint8_t
abstraction_flag
);
NR_UE_DLSCH_t
*
new_nr_ue_dlsch
(
uint8_t
Kmimo
,
uint8_t
Mdlharq
,
uint32_t
Nsoft
,
uint8_t
max_turbo_iterations
,
uint8_t
N_RB_DL
,
uint8_t
abstraction_flag
);
void
free_nr_ue_ulsch
(
NR_UE_ULSCH_t
*
ulsch
);
void
free_nr_ue_ulsch
(
NR_UE_ULSCH_t
*
*
ulsch
);
NR_UE_ULSCH_t
*
new_nr_ue_ulsch
(
unsigned
char
N_RB_UL
,
int
number_of_harq_pids
,
uint8_t
abstraction_flag
);
NR_UE_ULSCH_t
*
new_nr_ue_ulsch
(
unsigned
char
N_RB_UL
,
int
number_of_harq_pids
,
uint8_t
abstraction_flag
);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
View file @
d7155c2e
...
@@ -42,9 +42,10 @@
...
@@ -42,9 +42,10 @@
void
free_nr_ue_ulsch
(
NR_UE_ULSCH_t
*
ulsch
)
void
free_nr_ue_ulsch
(
NR_UE_ULSCH_t
*
*
ulschptr
)
{
{
int
i
,
r
;
int
i
,
r
;
NR_UE_ULSCH_t
*
ulsch
=
*
ulschptr
;
if
(
ulsch
)
{
if
(
ulsch
)
{
#ifdef DEBUG_ULSCH_FREE
#ifdef DEBUG_ULSCH_FREE
...
@@ -80,7 +81,7 @@ void free_nr_ue_ulsch(NR_UE_ULSCH_t *ulsch)
...
@@ -80,7 +81,7 @@ void free_nr_ue_ulsch(NR_UE_ULSCH_t *ulsch)
}
}
}
}
free16
(
ulsch
,
sizeof
(
NR_UE_ULSCH_t
));
free16
(
ulsch
,
sizeof
(
NR_UE_ULSCH_t
));
ulsch
=
NULL
;
*
ulschptr
=
NULL
;
}
}
}
}
...
@@ -179,7 +180,7 @@ NR_UE_ULSCH_t *new_nr_ue_ulsch(unsigned char N_RB_UL,
...
@@ -179,7 +180,7 @@ NR_UE_ULSCH_t *new_nr_ue_ulsch(unsigned char N_RB_UL,
}
}
LOG_E
(
PHY
,
"new_ue_ulsch exit flag, size of %d , %zu
\n
"
,
exit_flag
,
sizeof
(
LTE_UE_ULSCH_t
));
LOG_E
(
PHY
,
"new_ue_ulsch exit flag, size of %d , %zu
\n
"
,
exit_flag
,
sizeof
(
LTE_UE_ULSCH_t
));
free_nr_ue_ulsch
(
ulsch
);
free_nr_ue_ulsch
(
&
ulsch
);
return
(
NULL
);
return
(
NULL
);
...
...
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
View file @
d7155c2e
...
@@ -77,7 +77,7 @@ void nr_group_sequence_hopping (pucch_GroupHopping_t PUCCH_GroupHopping,
...
@@ -77,7 +77,7 @@ void nr_group_sequence_hopping (pucch_GroupHopping_t PUCCH_GroupHopping,
// initialization to be removed
// initialization to be removed
PUCCH_GroupHopping
=
neither
;
PUCCH_GroupHopping
=
neither
;
n_id
=
10
;
n_id
=
10
;
printf
(
"
\t\t
[nr_group_sequence_hopping] initialization PUCCH_GroupHopping=%
d, n_id=%d
-> variable initializations TO BE REMOVED
\n
"
,
PUCCH_GroupHopping
,
n_id
);
printf
(
"
\t\t
[nr_group_sequence_hopping] initialization PUCCH_GroupHopping=%
u, n_id=%u
-> variable initializations TO BE REMOVED
\n
"
,
PUCCH_GroupHopping
,
n_id
);
#endif
#endif
uint8_t
f_ss
=
0
,
f_gh
=
0
;
uint8_t
f_ss
=
0
,
f_gh
=
0
;
*
u
=
0
;
*
u
=
0
;
...
@@ -159,14 +159,14 @@ double nr_cyclic_shift_hopping(uint32_t n_id,
...
@@ -159,14 +159,14 @@ double nr_cyclic_shift_hopping(uint32_t n_id,
#ifdef DEBUG_NR_PUCCH_TX
#ifdef DEBUG_NR_PUCCH_TX
// initialization to be remo.ved
// initialization to be remo.ved
c_init
=
10
;
c_init
=
10
;
printf
(
"
\t\t
[nr_cyclic_shift_hopping] initialization c_init=%
d
-> variable initialization TO BE REMOVED
\n
"
,
c_init
);
printf
(
"
\t\t
[nr_cyclic_shift_hopping] initialization c_init=%
u
-> variable initialization TO BE REMOVED
\n
"
,
c_init
);
#endif
#endif
uint32_t
x1
,
s
=
lte_gold_generic
(
&
x1
,
&
c_init
,
1
);
// TS 38.211 Subclause 5.2.1
uint32_t
x1
,
s
=
lte_gold_generic
(
&
x1
,
&
c_init
,
1
);
// TS 38.211 Subclause 5.2.1
uint8_t
n_cs
=
0
;
uint8_t
n_cs
=
0
;
int
l
=
32
,
minShift
=
(
14
*
8
*
nr_tti_tx
)
+
8
*
(
lnormal
+
lprime
);
int
l
=
32
,
minShift
=
(
14
*
8
*
nr_tti_tx
)
+
8
*
(
lnormal
+
lprime
);
int
tmpShift
=
0
;
int
tmpShift
=
0
;
#ifdef DEBUG_NR_PUCCH_TX
#ifdef DEBUG_NR_PUCCH_TX
printf
(
"
\t\t
[nr_cyclic_shift_hopping] calculating alpha (cyclic shift) using c_init=%
d
->
\n
"
,
c_init
);
printf
(
"
\t\t
[nr_cyclic_shift_hopping] calculating alpha (cyclic shift) using c_init=%
u
->
\n
"
,
c_init
);
#endif
#endif
for
(
int
m
=
0
;
m
<
8
;
m
++
)
{
for
(
int
m
=
0
;
m
<
8
;
m
++
)
{
...
@@ -306,7 +306,7 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
...
@@ -306,7 +306,7 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
//((int16_t *)txptr[0][re_offset])[1] = (int16_t)((int32_t)amp * x_n_im[(12*l)+n])>>15;
//((int16_t *)txptr[0][re_offset])[1] = (int16_t)((int32_t)amp * x_n_im[(12*l)+n])>>15;
//txptr[re_offset] = (x_n_re[(12*l)+n]<<16) + x_n_im[(12*l)+n];
//txptr[re_offset] = (x_n_re[(12*l)+n]<<16) + x_n_im[(12*l)+n];
#ifdef DEBUG_NR_PUCCH_TX
#ifdef DEBUG_NR_PUCCH_TX
printf
(
"
\t
[nr_generate_pucch0] mapping to RE
\t
amp=%d
\t
ofdm_symbol_size=%d
\t
N_RB_DL=%d
\t
first_carrier_offset=%d
\t
txptr(%
d
)=(x_n(l=%d,n=%d)=(%d,%d))
\n
"
,
printf
(
"
\t
[nr_generate_pucch0] mapping to RE
\t
amp=%d
\t
ofdm_symbol_size=%d
\t
N_RB_DL=%d
\t
first_carrier_offset=%d
\t
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
,
re_offset
,
amp
,
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
N_RB_DL
,
frame_parms
->
first_carrier_offset
,
re_offset
,
l
,
n
,((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
],((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]);
l
,
n
,((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
],((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]);
#endif
#endif
...
@@ -330,7 +330,7 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
...
@@ -330,7 +330,7 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
uint8_t
timeDomainOCC
,
uint8_t
timeDomainOCC
,
uint8_t
nr_bit
)
{
uint8_t
nr_bit
)
{
#ifdef DEBUG_NR_PUCCH_TX
#ifdef DEBUG_NR_PUCCH_TX
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=%
lu
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
);
nr_tti_tx
,
payload
,
m0
,
nrofSymbols
,
startingSymbolIndex
,
startingPRB
,
startingPRB_intraSlotHopping
,
timeDomainOCC
,
nr_bit
);
#endif
#endif
/*
/*
...
@@ -368,7 +368,7 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
...
@@ -368,7 +368,7 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
}
}
// printf("d_re=%d\td_im=%d\n",(int)d_re,(int)d_im);
// printf("d_re=%d\td_im=%d\n",(int)d_re,(int)d_im);
#ifdef DEBUG_NR_PUCCH_TX
#ifdef DEBUG_NR_PUCCH_TX
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=%
l
x
\t
de_re=%d
\t
de_im=%d
\n
"
,
payload
,
d_re
,
d_im
);
#endif
#endif
/*
/*
* Defining cyclic shift hopping TS 38.211 Subclause 6.3.2.2.2
* Defining cyclic shift hopping TS 38.211 Subclause 6.3.2.2.2
...
@@ -625,7 +625,7 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
...
@@ -625,7 +625,7 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
]
=
z_re
[
i
+
n
];
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
]
=
z_re
[
i
+
n
];
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]
=
z_im
[
i
+
n
];
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]
=
z_im
[
i
+
n
];
#ifdef DEBUG_NR_PUCCH_TX
#ifdef DEBUG_NR_PUCCH_TX
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
,
amp
,
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
N_RB_DL
,
frame_parms
->
first_carrier_offset
,
i
+
n
,
re_offset
,
l
,
n
,((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
],((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]);
l
,
n
,((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
],((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]);
#endif
#endif
...
@@ -635,7 +635,7 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
...
@@ -635,7 +635,7 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
]
=
z_dmrs_re
[
i
+
n
];
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
]
=
z_dmrs_re
[
i
+
n
];
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]
=
z_dmrs_im
[
i
+
n
];
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]
=
z_dmrs_im
[
i
+
n
];
#ifdef DEBUG_NR_PUCCH_TX
#ifdef DEBUG_NR_PUCCH_TX
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
,
amp
,
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
N_RB_DL
,
frame_parms
->
first_carrier_offset
,
i
+
n
,
re_offset
,
l
,
n
,((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
],((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]);
l
,
n
,((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
],((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]);
#endif
#endif
...
@@ -961,7 +961,7 @@ inline void nr_pucch2_3_4_scrambling(uint16_t M_bit,uint16_t rnti,uint16_t n_id,
...
@@ -961,7 +961,7 @@ inline void nr_pucch2_3_4_scrambling(uint16_t M_bit,uint16_t rnti,uint16_t n_id,
x2
=
((
rnti
)
<<
15
)
+
n_id
;
x2
=
((
rnti
)
<<
15
)
+
n_id
;
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
1
);
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
1
);
#ifdef DEBUG_NR_PUCCH_TX
#ifdef DEBUG_NR_PUCCH_TX
printf
(
"
\t\t
[nr_pucch2_3_4_scrambling] gold sequence s=%
l
x
\n
"
,
s
);
printf
(
"
\t\t
[nr_pucch2_3_4_scrambling] gold sequence s=%x
\n
"
,
s
);
#endif
#endif
for
(
i
=
0
;
i
<
M_bit
;
i
++
)
{
for
(
i
=
0
;
i
<
M_bit
;
i
++
)
{
...
@@ -1094,7 +1094,7 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
...
@@ -1094,7 +1094,7 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
uint16_t
startingPRB
,
uint16_t
startingPRB
,
uint8_t
nr_bit
)
{
uint8_t
nr_bit
)
{
#ifdef DEBUG_NR_PUCCH_TX
#ifdef DEBUG_NR_PUCCH_TX
printf
(
"
\t
[nr_generate_pucch2] start function at slot(nr_tti_tx)=%d with payload=%
d
and nr_bit=%d
\n
"
,
nr_tti_tx
,
payload
,
nr_bit
);
printf
(
"
\t
[nr_generate_pucch2] start function at slot(nr_tti_tx)=%d with payload=%
lu
and nr_bit=%d
\n
"
,
nr_tti_tx
,
payload
,
nr_bit
);
#endif
#endif
// b is the block of bits transmitted on the physical channel after payload coding
// b is the block of bits transmitted on the physical channel after payload coding
uint64_t
b
;
uint64_t
b
;
...
@@ -1170,7 +1170,7 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
...
@@ -1170,7 +1170,7 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
int
m
=
0
;
int
m
=
0
;
for
(
int
l
=
0
;
l
<
nrofSymbols
;
l
++
)
{
for
(
int
l
=
0
;
l
<
nrofSymbols
;
l
++
)
{
x2
=
(((
1
<<
17
)
*
((
14
*
nr_tti_tx
)
+
(
l
+
startingSymbolIndex
)
+
1
)
*
((
2
*
n_id
)
+
1
))
+
(
2
*
n_id
))
%
(
1
<<
31
);
// c_init calculation according to TS38.211 subclause
x2
=
(((
1
<<
17
)
*
((
14
*
nr_tti_tx
)
+
(
l
+
startingSymbolIndex
)
+
1
)
*
((
2
*
n_id
)
+
1
))
+
(
2
*
n_id
))
%
(
1
U
<<
31
);
// c_init calculation according to TS38.211 subclause
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
1
);
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
1
);
m
=
0
;
m
=
0
;
...
@@ -1210,7 +1210,7 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
...
@@ -1210,7 +1210,7 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
]
=
d_re
[
i
+
k
];
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
]
=
d_re
[
i
+
k
];
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]
=
d_im
[
i
+
k
];
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]
=
d_im
[
i
+
k
];
#ifdef DEBUG_NR_PUCCH_TX
#ifdef DEBUG_NR_PUCCH_TX
printf
(
"
\t
[nr_generate_pucch2] (n=%d,i=%d) 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_pucch2] (n=%d,i=%d) 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
"
,
n
,
i
,
amp
,
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
N_RB_DL
,
frame_parms
->
first_carrier_offset
,
i
+
k
,
re_offset
,
n
,
i
,
amp
,
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
N_RB_DL
,
frame_parms
->
first_carrier_offset
,
i
+
k
,
re_offset
,
l
,
n
,((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
],((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]);
l
,
n
,((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
],((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]);
#endif
#endif
...
@@ -1222,7 +1222,7 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
...
@@ -1222,7 +1222,7 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]
=
(
int16_t
)((
int32_t
)(
amp
*
ONE_OVER_SQRT2
*
(
1
-
(
2
*
((
uint8_t
)((
s
>>
((
2
*
m
)
+
1
))
&
1
)))))
>>
15
);
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]
=
(
int16_t
)((
int32_t
)(
amp
*
ONE_OVER_SQRT2
*
(
1
-
(
2
*
((
uint8_t
)((
s
>>
((
2
*
m
)
+
1
))
&
1
)))))
>>
15
);
m
++
;
m
++
;
#ifdef DEBUG_NR_PUCCH_TX
#ifdef DEBUG_NR_PUCCH_TX
printf
(
"
\t
[nr_generate_pucch2] (n=%d,i=%d) 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_pucch2] (n=%d,i=%d) 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
"
,
n
,
i
,
amp
,
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
N_RB_DL
,
frame_parms
->
first_carrier_offset
,
i
+
kk
,
re_offset
,
n
,
i
,
amp
,
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
N_RB_DL
,
frame_parms
->
first_carrier_offset
,
i
+
kk
,
re_offset
,
l
,
n
,((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
],((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]);
l
,
n
,((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
],((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]);
#endif
#endif
...
@@ -1240,6 +1240,9 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
...
@@ -1240,6 +1240,9 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
}
}
}
}
}
}
free
(
d_re
);
free
(
d_im
);
free
(
btilde
);
}
}
//#if 0
//#if 0
void
nr_generate_pucch3_4
(
PHY_VARS_NR_UE
*
ue
,
void
nr_generate_pucch3_4
(
PHY_VARS_NR_UE
*
ue
,
...
@@ -1260,7 +1263,7 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
...
@@ -1260,7 +1263,7 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
uint8_t
occ_length_format4
,
uint8_t
occ_length_format4
,
uint8_t
occ_index_format4
)
{
uint8_t
occ_index_format4
)
{
#ifdef DEBUG_NR_PUCCH_TX
#ifdef DEBUG_NR_PUCCH_TX
printf
(
"
\t
[nr_generate_pucch3_4] start function at slot(nr_tti_tx)=%d with payload=%
d
and nr_bit=%d
\n
"
,
nr_tti_tx
,
payload
,
nr_bit
);
printf
(
"
\t
[nr_generate_pucch3_4] start function at slot(nr_tti_tx)=%d with payload=%
lu
and nr_bit=%d
\n
"
,
nr_tti_tx
,
payload
,
nr_bit
);
#endif
#endif
// b is the block of bits transmitted on the physical channel after payload coding
// b is the block of bits transmitted on the physical channel after payload coding
uint64_t
b
;
uint64_t
b
;
...
@@ -1665,7 +1668,7 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
...
@@ -1665,7 +1668,7 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
}
}
#ifdef DEBUG_NR_PUCCH_TX
#ifdef DEBUG_NR_PUCCH_TX
printf
(
"re_offset=%
d
,(rb+startingPRB)=%d
\n
"
,
re_offset
,(
rb
+
startingPRB
));
printf
(
"re_offset=%
u
,(rb+startingPRB)=%d
\n
"
,
re_offset
,(
rb
+
startingPRB
));
#endif
#endif
//txptr = &txdataF[0][re_offset];
//txptr = &txdataF[0][re_offset];
...
@@ -1679,7 +1682,7 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
...
@@ -1679,7 +1682,7 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
]
=
z_re
[
n
+
k
];
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
]
=
z_re
[
n
+
k
];
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]
=
z_im
[
n
+
k
];
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]
=
z_im
[
n
+
k
];
#ifdef DEBUG_NR_PUCCH_TX
#ifdef DEBUG_NR_PUCCH_TX
printf
(
"
\t
[nr_generate_pucch3_4] (l=%d,rb=%d,n=%d,k=%d) 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
)=(z(l=%d,n=%d)=(%d,%d))
\n
"
,
printf
(
"
\t
[nr_generate_pucch3_4] (l=%d,rb=%d,n=%d,k=%d) 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
)=(z(l=%d,n=%d)=(%d,%d))
\n
"
,
l
,
rb
,
n
,
k
,
amp
,
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
N_RB_DL
,
frame_parms
->
first_carrier_offset
,
n
+
k
,
re_offset
,
l
,
rb
,
n
,
k
,
amp
,
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
N_RB_DL
,
frame_parms
->
first_carrier_offset
,
n
+
k
,
re_offset
,
l
,
n
,((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
],((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]);
l
,
n
,((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
],((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]);
#endif
#endif
...
@@ -1691,7 +1694,7 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
...
@@ -1691,7 +1694,7 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]
=
(
int16_t
)((((
int32_t
)(
32767
*
cos
(
alpha
*
((
n
+
j
)
%
N_ZC
)))
*
r_u_v_base_im
[
n
+
j
])
>>
15
)
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]
=
(
int16_t
)((((
int32_t
)(
32767
*
cos
(
alpha
*
((
n
+
j
)
%
N_ZC
)))
*
r_u_v_base_im
[
n
+
j
])
>>
15
)
+
(((
int32_t
)(
32767
*
sin
(
alpha
*
((
n
+
j
)
%
N_ZC
)))
*
r_u_v_base_re
[
n
+
j
])
>>
15
));
+
(((
int32_t
)(
32767
*
sin
(
alpha
*
((
n
+
j
)
%
N_ZC
)))
*
r_u_v_base_re
[
n
+
j
])
>>
15
));
#ifdef DEBUG_NR_PUCCH_TX
#ifdef DEBUG_NR_PUCCH_TX
printf
(
"
\t
[nr_generate_pucch3_4] (l=%d,rb=%d,n=%d,j=%d) 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
)=(r_u_v(l=%d,n=%d)=(%d,%d))
\n
"
,
printf
(
"
\t
[nr_generate_pucch3_4] (l=%d,rb=%d,n=%d,j=%d) 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
)=(r_u_v(l=%d,n=%d)=(%d,%d))
\n
"
,
l
,
rb
,
n
,
j
,
amp
,
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
N_RB_DL
,
frame_parms
->
first_carrier_offset
,
n
+
j
,
re_offset
,
l
,
rb
,
n
,
j
,
amp
,
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
N_RB_DL
,
frame_parms
->
first_carrier_offset
,
n
+
j
,
re_offset
,
l
,
n
,((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
],((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]);
l
,
n
,((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
],((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]);
#endif
#endif
...
@@ -1705,5 +1708,8 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
...
@@ -1705,5 +1708,8 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
if
(
table_6_4_1_3_3_2_1_dmrs_positions
[
nrofSymbols
-
4
][
l
]
==
1
)
j
+=
12
;
if
(
table_6_4_1_3_3_2_1_dmrs_positions
[
nrofSymbols
-
4
][
l
]
==
1
)
j
+=
12
;
}
}
}
}
free
(
z_re
);
free
(
z_im
);
free
(
btilde
);
}
}
openair1/PHY/TOOLS/nr_phy_scope.c
View file @
d7155c2e
...
@@ -345,9 +345,9 @@ void phy_scope_gNB(FD_phy_scope_gnb *form,
...
@@ -345,9 +345,9 @@ void phy_scope_gNB(FD_phy_scope_gnb *form,
I_pucch
[
ind
]
=
(
float
)
pucch1ab_comp
[
2
*
(
ind
)];
I_pucch
[
ind
]
=
(
float
)
pucch1ab_comp
[
2
*
(
ind
)];
Q_pucch
[
ind
]
=
(
float
)
pucch1ab_comp
[
2
*
(
ind
)
+
1
];
Q_pucch
[
ind
]
=
(
float
)
pucch1ab_comp
[
2
*
(
ind
)
+
1
];
A_pucch
[
ind
]
=
10
*
log10
(
pucch1_comp
[
ind
])
;
A_pucch
[
ind
]
=
pucch1_comp
?
(
10
*
log10
(
pucch1_comp
[
ind
]))
:
0
;
B_pucch
[
ind
]
=
ind
;
B_pucch
[
ind
]
=
ind
;
C_pucch
[
ind
]
=
(
float
)
pucch1_thres
[
ind
]
;
C_pucch
[
ind
]
=
pucch1_thres
?
(
float
)
pucch1_thres
[
ind
]
:
0
;
}
}
fl_set_xyplot_data
(
form
->
pucch_comp
,
I_pucch
,
Q_pucch
,
10240
,
""
,
""
,
""
);
fl_set_xyplot_data
(
form
->
pucch_comp
,
I_pucch
,
Q_pucch
,
10240
,
""
,
""
,
""
);
fl_set_xyplot_data
(
form
->
pucch_comp1
,
B_pucch
,
A_pucch
,
1024
,
""
,
""
,
""
);
fl_set_xyplot_data
(
form
->
pucch_comp1
,
B_pucch
,
A_pucch
,
1024
,
""
,
""
,
""
);
...
@@ -840,7 +840,7 @@ void phy_scope_nrUE(FD_phy_scope_nrue *form,
...
@@ -840,7 +840,7 @@ void phy_scope_nrUE(FD_phy_scope_nrue *form,
free
(
bit
);
free
(
bit
);
free
(
bit_pdcch
);
free
(
bit_pdcch
);
free
(
llr_pdcch
);
free
(
llr_pdcch
);
free
(
chest_t_abs
);
/*
/*
free(chest_f_abs);
free(chest_f_abs);
for (arx=0; arx<nb_antennas_rx; arx++) {
for (arx=0; arx<nb_antennas_rx; arx++) {
...
@@ -898,9 +898,9 @@ void reset_stats_gNB(FL_OBJECT *button,
...
@@ -898,9 +898,9 @@ void reset_stats_gNB(FL_OBJECT *button,
static
void
*
scope_thread_gNB
(
void
*
arg
)
{
static
void
*
scope_thread_gNB
(
void
*
arg
)
{
int
UE_id
,
CC_id
;
int
UE_id
,
CC_id
;
int
ue_cnt
=
0
;
int
ue_cnt
=
0
;
# ifdef ENABLE_XFORMS_WRITE_STATS
//
# ifdef ENABLE_XFORMS_WRITE_STATS
FILE
*
gNB_stats
=
fopen
(
"gNB_stats.txt"
,
"w"
);
//
FILE *gNB_stats = fopen("gNB_stats.txt", "w");
#endif
//
#endif
while
(
!
oai_exit
)
{
while
(
!
oai_exit
)
{
ue_cnt
=
0
;
ue_cnt
=
0
;
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
d7155c2e
...
@@ -3351,10 +3351,12 @@ void nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB
...
@@ -3351,10 +3351,12 @@ void nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB
int
i_mod
,
eNB_id_i
,
dual_stream_UE
;
int
i_mod
,
eNB_id_i
,
dual_stream_UE
;
int
first_symbol_flag
=
0
;
int
first_symbol_flag
=
0
;
if
(
!
dlsch0
)
return
;
if
(
dlsch0
->
active
==
0
)
if
(
dlsch0
->
active
==
0
)
return
;
return
;
if
(
dlsch0
&&
(
!
dlsch1
)
)
{
if
(
!
dlsch1
)
{
int
harq_pid
=
dlsch0
->
current_harq_pid
;
int
harq_pid
=
dlsch0
->
current_harq_pid
;
uint16_t
pdsch_start_rb
=
dlsch0
->
harq_processes
[
harq_pid
]
->
start_rb
;
uint16_t
pdsch_start_rb
=
dlsch0
->
harq_processes
[
harq_pid
]
->
start_rb
;
uint16_t
pdsch_nb_rb
=
dlsch0
->
harq_processes
[
harq_pid
]
->
nb_rb
;
uint16_t
pdsch_nb_rb
=
dlsch0
->
harq_processes
[
harq_pid
]
->
nb_rb
;
...
...
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
d7155c2e
...
@@ -621,9 +621,9 @@ int main(int argc, char **argv)
...
@@ -621,9 +621,9 @@ int main(int argc, char **argv)
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
printf
(
"gNB %d
\n
"
,
i
);
printf
(
"gNB %d
\n
"
,
i
);
free_gNB_dlsch
(
gNB
->
dlsch
[
0
][
i
]
);
free_gNB_dlsch
(
&
(
gNB
->
dlsch
[
0
][
i
])
);
printf
(
"UE %d
\n
"
,
i
);
printf
(
"UE %d
\n
"
,
i
);
free_nr_ue_dlsch
(
UE
->
dlsch
[
0
][
0
][
i
]
);
free_nr_ue_dlsch
(
&
(
UE
->
dlsch
[
0
][
0
][
i
])
);
}
}
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
...
...
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
View file @
d7155c2e
...
@@ -221,7 +221,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
...
@@ -221,7 +221,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
nr_rlc_ue_t
*
ue
;
nr_rlc_ue_t
*
ue
;
nr_rlc_entity_t
*
rb
;
nr_rlc_entity_t
*
rb
;
LOG_D
(
RLC
,
"%s rnti %d srb_flag %d rb_id %d mui %d confirm %d sdu_size %d MBMS_flag %d
\n
"
,
LOG_D
(
RLC
,
"%s rnti %d srb_flag %d rb_id %
l
d mui %d confirm %d sdu_size %d MBMS_flag %d
\n
"
,
__FUNCTION__
,
rnti
,
srb_flagP
,
rb_idP
,
muiP
,
confirmP
,
sdu_sizeP
,
__FUNCTION__
,
rnti
,
srb_flagP
,
rb_idP
,
muiP
,
confirmP
,
sdu_sizeP
,
MBMS_flagP
);
MBMS_flagP
);
...
@@ -824,24 +824,24 @@ rlc_op_status_t rrc_rlc_config_req (
...
@@ -824,24 +824,24 @@ rlc_op_status_t rrc_rlc_config_req (
}
}
if
((
srb_flagP
&&
!
(
rb_idP
>=
1
&&
rb_idP
<=
2
))
||
if
((
srb_flagP
&&
!
(
rb_idP
>=
1
&&
rb_idP
<=
2
))
||
(
!
srb_flagP
&&
!
(
rb_idP
>=
1
&&
rb_idP
<=
5
)))
{
(
!
srb_flagP
&&
!
(
rb_idP
>=
1
&&
rb_idP
<=
5
)))
{
LOG_E
(
RLC
,
"%s:%d:%s: bad rb_id (%d) (is_srb %d)
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
rb_idP
,
srb_flagP
);
LOG_E
(
RLC
,
"%s:%d:%s: bad rb_id (%
l
d) (is_srb %d)
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
rb_idP
,
srb_flagP
);
exit
(
1
);
exit
(
1
);
}
}
nr_rlc_manager_lock
(
nr_rlc_ue_manager
);
nr_rlc_manager_lock
(
nr_rlc_ue_manager
);
LOG_D
(
RLC
,
"%s:%d:%s: remove rb %d (is_srb %d) for UE %d
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
rb_idP
,
srb_flagP
,
ctxt_pP
->
rnti
);
LOG_D
(
RLC
,
"%s:%d:%s: remove rb %
l
d (is_srb %d) for UE %d
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
rb_idP
,
srb_flagP
,
ctxt_pP
->
rnti
);
ue
=
nr_rlc_manager_get_ue
(
nr_rlc_ue_manager
,
ctxt_pP
->
rnti
);
ue
=
nr_rlc_manager_get_ue
(
nr_rlc_ue_manager
,
ctxt_pP
->
rnti
);
if
(
srb_flagP
)
{
if
(
srb_flagP
)
{
if
(
ue
->
srb
[
rb_idP
-
1
]
!=
NULL
)
{
if
(
ue
->
srb
[
rb_idP
-
1
]
!=
NULL
)
{
ue
->
srb
[
rb_idP
-
1
]
->
delete
(
ue
->
srb
[
rb_idP
-
1
]);
ue
->
srb
[
rb_idP
-
1
]
->
delete
(
ue
->
srb
[
rb_idP
-
1
]);
ue
->
srb
[
rb_idP
-
1
]
=
NULL
;
ue
->
srb
[
rb_idP
-
1
]
=
NULL
;
}
else
}
else
LOG_W
(
RLC
,
"removing non allocated SRB %d, do nothing
\n
"
,
rb_idP
);
LOG_W
(
RLC
,
"removing non allocated SRB %
l
d, do nothing
\n
"
,
rb_idP
);
}
else
{
}
else
{
if
(
ue
->
drb
[
rb_idP
-
1
]
!=
NULL
)
{
if
(
ue
->
drb
[
rb_idP
-
1
]
!=
NULL
)
{
ue
->
drb
[
rb_idP
-
1
]
->
delete
(
ue
->
drb
[
rb_idP
-
1
]);
ue
->
drb
[
rb_idP
-
1
]
->
delete
(
ue
->
drb
[
rb_idP
-
1
]);
ue
->
drb
[
rb_idP
-
1
]
=
NULL
;
ue
->
drb
[
rb_idP
-
1
]
=
NULL
;
}
else
}
else
LOG_W
(
RLC
,
"removing non allocated DRB %d, do nothing
\n
"
,
rb_idP
);
LOG_W
(
RLC
,
"removing non allocated DRB %
l
d, do nothing
\n
"
,
rb_idP
);
}
}
/* remove UE if it has no more RB configured */
/* remove UE if it has no more RB configured */
for
(
i
=
0
;
i
<
2
;
i
++
)
for
(
i
=
0
;
i
<
2
;
i
++
)
...
...
openair2/NETWORK_DRIVER/UE_IP/common.c
View file @
d7155c2e
...
@@ -193,7 +193,7 @@ ue_ip_common_class_wireless2ip(
...
@@ -193,7 +193,7 @@ ue_ip_common_class_wireless2ip(
break
;
break
;
default:
default:
printk
(
"[UE_IP_DRV][%s] begin RB %d Inst %d Length %d bytes
\n
"
,
__FUNCTION__
,
rb_idP
,
instP
,
data_lenP
);
printk
(
"[UE_IP_DRV][%s] begin RB %
l
d Inst %d Length %d bytes
\n
"
,
__FUNCTION__
,
rb_idP
,
instP
,
data_lenP
);
printk
(
"[UE_IP_DRV][%s] Inst %d: receive unknown message (version=%d)
\n
"
,
__FUNCTION__
,
instP
,
ipv_p
->
version
);
printk
(
"[UE_IP_DRV][%s] Inst %d: receive unknown message (version=%d)
\n
"
,
__FUNCTION__
,
instP
,
ipv_p
->
version
);
}
}
...
@@ -326,7 +326,7 @@ ue_ip_common_ip2wireless(
...
@@ -326,7 +326,7 @@ ue_ip_common_ip2wireless(
bytes_wrote
+=
ue_ip_netlink_send
((
char
*
)
skb_pP
->
data
,
skb_pP
->
len
);
bytes_wrote
+=
ue_ip_netlink_send
((
char
*
)
skb_pP
->
data
,
skb_pP
->
len
);
if
(
bytes_wrote
!=
skb_pP
->
len
+
UE_IP_PDCPH_SIZE
)
{
if
(
bytes_wrote
!=
skb_pP
->
len
+
UE_IP_PDCPH_SIZE
)
{
printk
(
"[UE_IP_DRV][%s] Inst %d, RB_ID %d: problem while writing PDCP's data, bytes_wrote = %d, Data_len %d, PDCPH_SIZE %d
\n
"
,
printk
(
"[UE_IP_DRV][%s] Inst %d, RB_ID %
l
d: problem while writing PDCP's data, bytes_wrote = %d, Data_len %d, PDCPH_SIZE %d
\n
"
,
__FUNCTION__
,
__FUNCTION__
,
instP
,
instP
,
pdcph
.
rb_id
,
pdcph
.
rb_id
,
...
...
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