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
wangjie
OpenXG-RAN
Commits
27a03139
Commit
27a03139
authored
Mar 17, 2021
by
Laurent THOMAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
develop-SA-CBRA-ulsch-lts
parent
27f0414e
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
107 additions
and
97 deletions
+107
-97
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-0
common/utils/assertions.h
common/utils/assertions.h
+1
-0
executables/nr-gnb.c
executables/nr-gnb.c
+3
-15
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+1
-34
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
+2
-1
openair1/PHY/NR_TRANSPORT/nr_ulsch.c
openair1/PHY/NR_TRANSPORT/nr_ulsch.c
+68
-20
openair1/PHY/NR_TRANSPORT/nr_ulsch.h
openair1/PHY/NR_TRANSPORT/nr_ulsch.h
+7
-5
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+3
-3
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
+4
-3
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+2
-1
openair1/SCHED_NR/fapi_nr_l1.h
openair1/SCHED_NR/fapi_nr_l1.h
+1
-1
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+14
-14
No files found.
cmake_targets/CMakeLists.txt
View file @
27a03139
...
@@ -45,6 +45,7 @@ include_directories(${CONFIG_INCLUDE_DIRS})
...
@@ -45,6 +45,7 @@ include_directories(${CONFIG_INCLUDE_DIRS})
pkg_search_module
(
CRYPTO libcrypto REQUIRED
)
pkg_search_module
(
CRYPTO libcrypto REQUIRED
)
include_directories
(
${
CRYPTO_INCLUDE_DIRS
}
)
include_directories
(
${
CRYPTO_INCLUDE_DIRS
}
)
LINK_DIRECTORIES
(
"/usr/local/lib"
)
#use native cmake method as this package is not in pkg-config
#use native cmake method as this package is not in pkg-config
if
(
${
RF_BOARD
}
STREQUAL
"OAI_USRP"
)
if
(
${
RF_BOARD
}
STREQUAL
"OAI_USRP"
)
find_package
(
Boost REQUIRED
)
find_package
(
Boost REQUIRED
)
...
...
common/utils/assertions.h
View file @
27a03139
...
@@ -39,6 +39,7 @@ void output_log_mem(void);
...
@@ -39,6 +39,7 @@ void output_log_mem(void);
display_backtrace(); \
display_backtrace(); \
fflush(stdout); \
fflush(stdout); \
fflush(stderr); \
fflush(stderr); \
abort();\
exit(EXIT_FAILURE); \
exit(EXIT_FAILURE); \
#define _Assert_(cOND, aCTION, fORMAT, aRGS...) \
#define _Assert_(cOND, aCTION, fORMAT, aRGS...) \
...
...
executables/nr-gnb.c
View file @
27a03139
...
@@ -185,22 +185,10 @@ void rx_func(void *param) {
...
@@ -185,22 +185,10 @@ void rx_func(void *param) {
int
pucch_removed
=
0
;
int
pucch_removed
=
0
;
for
(
int
i
=
0
;
i
<
rnti_to_remove_count
;
i
++
)
{
for
(
int
i
=
0
;
i
<
rnti_to_remove_count
;
i
++
)
{
LOG_W
(
PHY
,
"to remove rnti %d
\n
"
,
rnti_to_remove
[
i
]);
LOG_W
(
PHY
,
"to remove rnti %d
\n
"
,
rnti_to_remove
[
i
]);
void
clean_gNB_ulsch
(
NR_gNB_ULSCH_t
*
ulsch
);
void
clean_gNB_dlsch
(
NR_gNB_DLSCH_t
*
dlsch
);
int
j
;
int
j
;
for
(
j
=
0
;
j
<
NUMBER_OF_NR_ULSCH_MAX
;
j
++
)
up_removed
+=
free_nr_ulsch
(
rnti_to_remove
[
i
],
gNB
);
if
(
gNB
->
ulsch
[
j
][
0
]
->
rnti
==
rnti_to_remove
[
i
])
{
gNB
->
ulsch
[
j
][
0
]
->
rnti
=
0
;
gNB
->
ulsch
[
j
][
0
]
->
harq_mask
=
0
;
//clean_gNB_ulsch(gNB->ulsch[j][0]);
int
h
;
for
(
h
=
0
;
h
<
NR_MAX_ULSCH_HARQ_PROCESSES
;
h
++
)
{
gNB
->
ulsch
[
j
][
0
]
->
harq_processes
[
h
]
->
status
=
SCH_IDLE
;
gNB
->
ulsch
[
j
][
0
]
->
harq_processes
[
h
]
->
round
=
0
;
gNB
->
ulsch
[
j
][
0
]
->
harq_processes
[
h
]
->
handled
=
0
;
}
up_removed
++
;
}
for
(
j
=
0
;
j
<
NUMBER_OF_NR_DLSCH_MAX
;
j
++
)
for
(
j
=
0
;
j
<
NUMBER_OF_NR_DLSCH_MAX
;
j
++
)
if
(
gNB
->
dlsch
[
j
][
0
]
->
rnti
==
rnti_to_remove
[
i
])
{
if
(
gNB
->
dlsch
[
j
][
0
]
->
rnti
==
rnti_to_remove
[
i
])
{
gNB
->
dlsch
[
j
][
0
]
->
rnti
=
0
;
gNB
->
dlsch
[
j
][
0
]
->
rnti
=
0
;
...
...
openair1/PHY/INIT/nr_init.c
View file @
27a03139
...
@@ -567,44 +567,11 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
...
@@ -567,44 +567,11 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
AssertFatal
(
gNB
->
dlsch
[
i
][
j
]
!=
NULL
,
"Can't initialize dlsch %d
\n
"
,
i
);
AssertFatal
(
gNB
->
dlsch
[
i
][
j
]
!=
NULL
,
"Can't initialize dlsch %d
\n
"
,
i
);
}
}
}
}
init_nr_ulsch
(
gNB
,
NUMBER_OF_NR_ULSCH_MAX
,
fp
->
N_RB_UL
);
for
(
i
=
0
;
i
<
NUMBER_OF_NR_ULSCH_MAX
;
i
++
)
{
LOG_I
(
PHY
,
"Allocating Transport Channel Buffer for ULSCH, UE %d
\n
"
,
i
);
for
(
j
=
0
;
j
<
2
;
j
++
)
{
// ULSCH for data
gNB
->
ulsch
[
i
][
j
]
=
new_gNB_ulsch
(
MAX_LDPC_ITERATIONS
,
fp
->
N_RB_UL
,
0
);
if
(
!
gNB
->
ulsch
[
i
][
j
])
{
LOG_E
(
PHY
,
"Can't get gNB ulsch structures
\n
"
);
exit
(
-
1
);
}
/*
LOG_I(PHY,"Initializing nFAPI for ULSCH, UE %d\n",i);
// [hna] added here for RT implementation
uint8_t harq_pid = 0;
nfapi_nr_ul_config_ulsch_pdu *rel15_ul = &gNB->ulsch[i+1][j]->harq_processes[harq_pid]->ulsch_pdu;
// --------- setting rel15_ul parameters ----------
rel15_ul->rnti = 0x1234;
rel15_ul->ulsch_pdu_rel15.start_rb = 0;
rel15_ul->ulsch_pdu_rel15.number_rbs = 50;
rel15_ul->ulsch_pdu_rel15.start_symbol = 2;
rel15_ul->ulsch_pdu_rel15.number_symbols = 12;
rel15_ul->ulsch_pdu_rel15.length_dmrs = gNB->dmrs_UplinkConfig.pusch_maxLength;
rel15_ul->ulsch_pdu_rel15.Qm = 2;
rel15_ul->ulsch_pdu_rel15.R = 679;
rel15_ul->ulsch_pdu_rel15.mcs = 9;
rel15_ul->ulsch_pdu_rel15.rv = 0;
rel15_ul->ulsch_pdu_rel15.n_layers = 1;
///////////////////////////////////////////////////
*/
}
}
gNB
->
rx_total_gain_dB
=
130
;
gNB
->
rx_total_gain_dB
=
130
;
...
...
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
View file @
27a03139
...
@@ -138,7 +138,8 @@ NR_gNB_DLSCH_t *new_gNB_dlsch(NR_DL_FRAME_PARMS *frame_parms,
...
@@ -138,7 +138,8 @@ NR_gNB_DLSCH_t *new_gNB_dlsch(NR_DL_FRAME_PARMS *frame_parms,
@param harq_pid HARQ process ID
@param harq_pid HARQ process ID
*/
*/
int
nr_rx_pusch
(
PHY_VARS_gNB
*
gNB
,
int
nr_rx_pusch
(
PHY_VARS_gNB
*
gNB
,
uint8_t
UE_id
,
NR_gNB_ULSCH_t
*
ulsch
,
int
id
,
uint32_t
frame
,
uint32_t
frame
,
uint8_t
nr_tti_rx
,
uint8_t
nr_tti_rx
,
unsigned
char
symbol
,
unsigned
char
symbol
,
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch.c
View file @
27a03139
...
@@ -35,24 +35,75 @@
...
@@ -35,24 +35,75 @@
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
int16_t
find_nr_ulsch
(
uint16_t
rnti
,
PHY_VARS_gNB
*
gNB
,
find_type_t
type
)
{
void
init_nr_ulsch
(
PHY_VARS_gNB
*
gNB
,
int
size
,
int
N_RB_UL
)
{
gNB
->
ulDataSize
=
size
*
2
;
gNB
->
ulData
=
calloc
(
gNB
->
ulDataSize
,
sizeof
(
NR_gNB_ULSCH_t
*
));
for
(
int
i
=
0
;
i
<
gNB
->
ulDataSize
;
i
++
)
{
LOG_I
(
PHY
,
"Allocating Transport Channel Buffer for ULSCH, UE %d
\n
"
,
i
);
AssertFatal
(
NULL
!=
(
gNB
->
ulData
[
i
]
=
new_gNB_ulsch
(
MAX_LDPC_ITERATIONS
,
N_RB_UL
,
0
)),
""
);
}
/*
LOG_I(PHY,"Initializing nFAPI for ULSCH, UE %d\n",i);
// [hna] added here for RT implementation
uint8_t harq_pid = 0;
nfapi_nr_ul_config_ulsch_pdu *rel15_ul = &gNB->ulsch[i+1][j]->harq_processes[harq_pid]->ulsch_pdu;
// --------- setting rel15_ul parameters ----------
rel15_ul->rnti = 0x1234;
rel15_ul->ulsch_pdu_rel15.start_rb = 0;
rel15_ul->ulsch_pdu_rel15.number_rbs = 50;
rel15_ul->ulsch_pdu_rel15.start_symbol = 2;
rel15_ul->ulsch_pdu_rel15.number_symbols = 12;
rel15_ul->ulsch_pdu_rel15.length_dmrs = gNB->dmrs_UplinkConfig.pusch_maxLength;
rel15_ul->ulsch_pdu_rel15.Qm = 2;
rel15_ul->ulsch_pdu_rel15.R = 679;
rel15_ul->ulsch_pdu_rel15.mcs = 9;
rel15_ul->ulsch_pdu_rel15.rv = 0;
rel15_ul->ulsch_pdu_rel15.n_layers = 1;
///////////////////////////////////////////////////
*/
}
NR_gNB_ULSCH_t
*
find_nr_ulsch
(
uint16_t
rnti
,
PHY_VARS_gNB
*
gNB
,
find_type_t
type
)
{
uint16_t
i
;
uint16_t
i
;
int16_t
first_free_index
=-
1
;
NR_gNB_ULSCH_t
*
free
=
NULL
;
for
(
i
=
0
;
i
<
gNB
->
ulDataSize
;
i
++
)
{
AssertFatal
(
gNB
!=
NULL
,
"gNB is null
\n
"
);
if
(
gNB
->
ulData
[
i
]
->
harq_mask
>
0
&&
gNB
->
ulData
[
i
]
->
rnti
==
rnti
)
for
(
i
=
0
;
i
<
NUMBER_OF_NR_ULSCH_MAX
;
i
++
)
{
return
gNB
->
ulData
[
i
];
AssertFatal
(
gNB
->
ulsch
[
i
]
!=
NULL
,
"gNB->ulsch[%d] is null
\n
"
,
i
);
else
AssertFatal
(
gNB
->
ulsch
[
i
][
0
]
!=
NULL
,
"gNB->ulsch[%d][0] is null
\n
"
,
i
);
if
(
gNB
->
ulData
[
i
]
->
harq_mask
==
0
)
LOG_D
(
PHY
,
"searching for rnti %x : ulsch_index %d=> harq_mask %x, rnti %x, first_free_index %d
\n
"
,
rnti
,
i
,
gNB
->
ulsch
[
i
][
0
]
->
harq_mask
,
gNB
->
ulsch
[
i
][
0
]
->
rnti
,
first_free_index
);
free
=
gNB
->
ulData
[
i
];
if
((
gNB
->
ulsch
[
i
][
0
]
->
harq_mask
>
0
)
&&
}
(
gNB
->
ulsch
[
i
][
0
]
->
rnti
==
rnti
))
return
i
;
if
(
type
==
SEARCH_EXIST
)
else
if
((
gNB
->
ulsch
[
i
][
0
]
->
harq_mask
==
0
)
&&
(
first_free_index
==-
1
))
first_free_index
=
i
;
return
NULL
;
if
(
free
==
NULL
)
{
LOG_E
(
PHY
,
"Table full!!!
\n
"
);
return
NULL
;
}
else
{
free
->
rnti
=
0
;
return
free
;
}
}
int
free_nr_ulsch
(
uint16_t
rnti
,
PHY_VARS_gNB
*
gNB
)
{
int
rm
=
0
;
for
(
int
j
=
0
;
j
<
gNB
->
ulDataSize
;
j
++
)
NR_gNB_ULSCH_t
*
ulsch
=
gNB
->
ulData
[
i
];
if
(
ulsch
->
rnti
==
rnti
)
{
ulsch
->
rnti
=
0
;
ulsch
->
harq_mask
=
0
;
//clean_gNB_ulsch(ulsch);
for
(
int
h
=
0
;
h
<
NR_MAX_ULSCH_HARQ_PROCESSES
;
h
++
)
{
ulsch
->
harq_processes
[
h
]
->
status
=
SCH_IDLE
;
ulsch
->
harq_processes
[
h
]
->
round
=
0
;
ulsch
->
harq_processes
[
h
]
->
handled
=
0
;
}
rm
++
;
}
}
if
(
type
==
SEARCH_EXIST
)
return
-
1
;
return
rm
;
if
(
first_free_index
!=
-
1
)
gNB
->
ulsch
[
first_free_index
][
0
]
->
rnti
=
0
;
return
first_free_index
;
}
}
void
nr_fill_ulsch
(
PHY_VARS_gNB
*
gNB
,
void
nr_fill_ulsch
(
PHY_VARS_gNB
*
gNB
,
...
@@ -61,11 +112,8 @@ void nr_fill_ulsch(PHY_VARS_gNB *gNB,
...
@@ -61,11 +112,8 @@ void nr_fill_ulsch(PHY_VARS_gNB *gNB,
nfapi_nr_pusch_pdu_t
*
ulsch_pdu
)
{
nfapi_nr_pusch_pdu_t
*
ulsch_pdu
)
{
int
ulsch_id
=
find_nr_ulsch
(
ulsch_pdu
->
rnti
,
gNB
,
SEARCH_EXIST_OR_FREE
);
NR_gNB_ULSCH_t
*
ulsch
=
find_nr_ulsch
(
ulsch_pdu
->
rnti
,
gNB
,
SEARCH_EXIST_OR_FREE
);
AssertFatal
(
(
ulsch_id
>=
0
)
&&
(
ulsch_id
<
NUMBER_OF_NR_ULSCH_MAX
),
"illegal or no ulsch_id found!!! rnti %04x ulsch_id %d
\n
"
,
ulsch_pdu
->
rnti
,
ulsch_id
);
NR_gNB_ULSCH_t
*
ulsch
=
gNB
->
ulsch
[
ulsch_id
][
0
];
int
harq_pid
=
ulsch_pdu
->
pusch_data
.
harq_process_id
;
int
harq_pid
=
ulsch_pdu
->
pusch_data
.
harq_process_id
;
ulsch
->
rnti
=
ulsch_pdu
->
rnti
;
ulsch
->
rnti
=
ulsch_pdu
->
rnti
;
//ulsch->rnti_type;
//ulsch->rnti_type;
...
@@ -78,7 +126,7 @@ void nr_fill_ulsch(PHY_VARS_gNB *gNB,
...
@@ -78,7 +126,7 @@ void nr_fill_ulsch(PHY_VARS_gNB *gNB,
ulsch
->
harq_processes
[
harq_pid
]
->
status
=
NR_ACTIVE
;
ulsch
->
harq_processes
[
harq_pid
]
->
status
=
NR_ACTIVE
;
memcpy
((
void
*
)
&
ulsch
->
harq_processes
[
harq_pid
]
->
ulsch_pdu
,
(
void
*
)
ulsch_pdu
,
sizeof
(
nfapi_nr_pusch_pdu_t
));
memcpy
((
void
*
)
&
ulsch
->
harq_processes
[
harq_pid
]
->
ulsch_pdu
,
(
void
*
)
ulsch_pdu
,
sizeof
(
nfapi_nr_pusch_pdu_t
));
LOG_D
(
PHY
,
"Initializing nFAPI for ULSCH, UE %d, harq_pid %d
\n
"
,
ulsch_id
,
harq_pid
);
//
LOG_D(PHY,"Initializing nFAPI for ULSCH, UE %d, harq_pid %d\n",ulsch_id,harq_pid);
}
}
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch.h
View file @
27a03139
...
@@ -49,9 +49,10 @@ NR_gNB_ULSCH_t *new_gNB_ulsch(uint8_t max_ldpc_iterations,uint16_t N_RB_UL, uint
...
@@ -49,9 +49,10 @@ NR_gNB_ULSCH_t *new_gNB_ulsch(uint8_t max_ldpc_iterations,uint16_t N_RB_UL, uint
@param harq_pid, harq process id
@param harq_pid, harq process id
@param is_crnti
@param is_crnti
*/
*/
void
init_nr_ulsch
(
PHY_VARS_gNB
*
,
int
size
,
int
N_RB_UL
);
uint32_t
nr_ulsch_decoding
(
PHY_VARS_gNB
*
phy_vars_gNB
,
uint32_t
nr_ulsch_decoding
(
PHY_VARS_gNB
*
phy_vars_gNB
,
uint8_t
UE_id
,
NR_gNB_ULSCH_t
*
ulsch
,
int
,
short
*
ulsch_llr
,
short
*
ulsch_llr
,
NR_DL_FRAME_PARMS
*
frame_parms
,
NR_DL_FRAME_PARMS
*
frame_parms
,
nfapi_nr_pusch_pdu_t
*
pusch_pdu
,
nfapi_nr_pusch_pdu_t
*
pusch_pdu
,
...
@@ -85,10 +86,11 @@ void nr_ulsch_unscrambling_optim(int16_t* llr,
...
@@ -85,10 +86,11 @@ void nr_ulsch_unscrambling_optim(int16_t* llr,
void
nr_ulsch_procedures
(
PHY_VARS_gNB
*
gNB
,
void
nr_ulsch_procedures
(
PHY_VARS_gNB
*
gNB
,
int
frame_rx
,
int
frame_rx
,
int
slot_rx
,
int
slot_rx
,
int
UE_id
,
NR_gNB_ULSCH_t
*
pusch_pdu
,
int
,
uint8_t
harq_pid
);
uint8_t
harq_pid
);
int16_t
find_nr_ulsch
(
uint16_t
rnti
,
PHY_VARS_gNB
*
gNB
,
find_type_t
type
);
NR_gNB_ULSCH_t
*
find_nr_ulsch
(
uint16_t
rnti
,
PHY_VARS_gNB
*
gNB
,
find_type_t
type
);
int
free_nr_ulsh
(
uint16_t
rnti
,
PHY_VARS_gNB
*
gNB
);
void
dump_pusch_stats
(
PHY_VARS_gNB
*
gNB
);
void
dump_pusch_stats
(
PHY_VARS_gNB
*
gNB
);
void
clear_pusch_stats
(
PHY_VARS_gNB
*
gNB
);
void
clear_pusch_stats
(
PHY_VARS_gNB
*
gNB
);
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
27a03139
...
@@ -449,7 +449,8 @@ void nr_processULSegment(void* arg) {
...
@@ -449,7 +449,8 @@ void nr_processULSegment(void* arg) {
}
}
uint32_t
nr_ulsch_decoding
(
PHY_VARS_gNB
*
phy_vars_gNB
,
uint32_t
nr_ulsch_decoding
(
PHY_VARS_gNB
*
phy_vars_gNB
,
uint8_t
UE_id
,
NR_gNB_ULSCH_t
*
ulsch
,
int
ULSCH_id
,
short
*
ulsch_llr
,
short
*
ulsch_llr
,
NR_DL_FRAME_PARMS
*
frame_parms
,
NR_DL_FRAME_PARMS
*
frame_parms
,
nfapi_nr_pusch_pdu_t
*
pusch_pdu
,
nfapi_nr_pusch_pdu_t
*
pusch_pdu
,
...
@@ -471,7 +472,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
...
@@ -471,7 +472,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
#endif
#endif
NR_gNB_ULSCH_t
*
ulsch
=
phy_vars_gNB
->
ulsch
[
UE_id
][
0
];
NR_UL_gNB_HARQ_t
*
harq_process
=
ulsch
->
harq_processes
[
harq_pid
];
NR_UL_gNB_HARQ_t
*
harq_process
=
ulsch
->
harq_processes
[
harq_pid
];
if
(
!
harq_process
)
{
if
(
!
harq_process
)
{
...
@@ -639,7 +639,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
...
@@ -639,7 +639,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
rdata
->
Tbslbrm
=
Tbslbrm
;
rdata
->
Tbslbrm
=
Tbslbrm
;
rdata
->
offset
=
offset
;
rdata
->
offset
=
offset
;
rdata
->
ulsch
=
ulsch
;
rdata
->
ulsch
=
ulsch
;
rdata
->
ulsch_id
=
U
E
_id
;
rdata
->
ulsch_id
=
U
LSCH
_id
;
pushTpool
(
phy_vars_gNB
->
threadPool
,
req
);
pushTpool
(
phy_vars_gNB
->
threadPool
,
req
);
phy_vars_gNB
->
nbDecode
++
;
phy_vars_gNB
->
nbDecode
++
;
LOG_D
(
PHY
,
"Added a block to decode, in pipe: %d
\n
"
,
phy_vars_gNB
->
nbDecode
);
LOG_D
(
PHY
,
"Added a block to decode, in pipe: %d
\n
"
,
phy_vars_gNB
->
nbDecode
);
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
View file @
27a03139
...
@@ -1152,7 +1152,8 @@ void nr_ulsch_detection_mrc(NR_DL_FRAME_PARMS *frame_parms,
...
@@ -1152,7 +1152,8 @@ void nr_ulsch_detection_mrc(NR_DL_FRAME_PARMS *frame_parms,
}
}
int
nr_rx_pusch
(
PHY_VARS_gNB
*
gNB
,
int
nr_rx_pusch
(
PHY_VARS_gNB
*
gNB
,
uint8_t
ulsch_id
,
NR_gNB_ULSCH_t
*
ulsch
,
int
ulsch_id
,
uint32_t
frame
,
uint32_t
frame
,
uint8_t
nr_tti_rx
,
uint8_t
nr_tti_rx
,
unsigned
char
symbol
,
unsigned
char
symbol
,
...
@@ -1164,7 +1165,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
...
@@ -1164,7 +1165,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
int
avgs
;
int
avgs
;
int
avg
[
4
];
int
avg
[
4
];
NR_DL_FRAME_PARMS
*
frame_parms
=
&
gNB
->
frame_parms
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
gNB
->
frame_parms
;
nfapi_nr_pusch_pdu_t
*
rel15_ul
=
&
gNB
->
ulsch
[
ulsch_id
][
0
]
->
harq_processes
[
harq_pid
]
->
ulsch_pdu
;
nfapi_nr_pusch_pdu_t
*
rel15_ul
=
&
ulsch
->
harq_processes
[
harq_pid
]
->
ulsch_pdu
;
dmrs_symbol_flag
=
0
;
dmrs_symbol_flag
=
0
;
...
@@ -1244,7 +1245,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
...
@@ -1244,7 +1245,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
nr_ulsch_scale_channel
(
gNB
->
pusch_vars
[
ulsch_id
]
->
ul_ch_estimates_ext
,
nr_ulsch_scale_channel
(
gNB
->
pusch_vars
[
ulsch_id
]
->
ul_ch_estimates_ext
,
frame_parms
,
frame_parms
,
gNB
->
ulsch
[
ulsch_id
]
,
&
ulsch
,
symbol
,
symbol
,
dmrs_symbol_flag
,
dmrs_symbol_flag
,
rel15_ul
->
rb_size
,
rel15_ul
->
rb_size
,
...
...
openair1/PHY/defs_gNB.h
View file @
27a03139
...
@@ -718,7 +718,8 @@ typedef struct PHY_VARS_gNB_s {
...
@@ -718,7 +718,8 @@ typedef struct PHY_VARS_gNB_s {
NR_gNB_PDCCH_t
pdcch_pdu
[
NUMBER_OF_NR_PDCCH_MAX
];
NR_gNB_PDCCH_t
pdcch_pdu
[
NUMBER_OF_NR_PDCCH_MAX
];
NR_gNB_UL_PDCCH_t
ul_pdcch_pdu
[
NUMBER_OF_NR_PDCCH_MAX
];
NR_gNB_UL_PDCCH_t
ul_pdcch_pdu
[
NUMBER_OF_NR_PDCCH_MAX
];
NR_gNB_DLSCH_t
*
dlsch
[
NUMBER_OF_NR_DLSCH_MAX
][
2
];
// Nusers times two spatial streams
NR_gNB_DLSCH_t
*
dlsch
[
NUMBER_OF_NR_DLSCH_MAX
][
2
];
// Nusers times two spatial streams
NR_gNB_ULSCH_t
*
ulsch
[
NUMBER_OF_NR_ULSCH_MAX
][
2
];
// [Nusers times][2 codewords]
NR_gNB_ULSCH_t
**
ulData
;
int
ulDataSize
;
// [Nusers times][2 codewords]
NR_gNB_DLSCH_t
*
dlsch_SI
,
*
dlsch_ra
,
*
dlsch_p
;
NR_gNB_DLSCH_t
*
dlsch_SI
,
*
dlsch_ra
,
*
dlsch_p
;
NR_gNB_DLSCH_t
*
dlsch_PCH
;
NR_gNB_DLSCH_t
*
dlsch_PCH
;
/// statistics for DLSCH measurement collection
/// statistics for DLSCH measurement collection
...
...
openair1/SCHED_NR/fapi_nr_l1.h
View file @
27a03139
...
@@ -52,7 +52,7 @@ void handle_nr_nfapi_pdsch_pdu(PHY_VARS_gNB *gNB,int frame,int slot,
...
@@ -52,7 +52,7 @@ void handle_nr_nfapi_pdsch_pdu(PHY_VARS_gNB *gNB,int frame,int slot,
uint8_t
*
sdu
);
uint8_t
*
sdu
);
void
nr_fill_indication
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot_rx
,
int
UE_id
,
uint8_t
harq_pid
,
uint8_t
crc_flag
);
void
nr_fill_indication
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot_rx
,
NR_gNB_ULSCH_t
*
ulsch
,
int
,
uint8_t
harq_pid
,
uint8_t
crc_flag
);
//added
//added
void
handle_nfapi_nr_ul_dci_pdu
(
PHY_VARS_gNB
*
gNB
,
void
handle_nfapi_nr_ul_dci_pdu
(
PHY_VARS_gNB
*
gNB
,
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
27a03139
...
@@ -247,7 +247,7 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
...
@@ -247,7 +247,7 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
nb
+=
abortNotifiedFIFO
(
gNB
->
respDecode
,
req
->
key
);
nb
+=
abortNotifiedFIFO
(
gNB
->
respDecode
,
req
->
key
);
gNB
->
nbDecode
-=
nb
;
gNB
->
nbDecode
-=
nb
;
LOG_D
(
PHY
,
"uplink segment error %d/%d, aborted %d segments
\n
"
,
rdata
->
segment_r
,
rdata
->
nbSegments
,
nb
);
LOG_D
(
PHY
,
"uplink segment error %d/%d, aborted %d segments
\n
"
,
rdata
->
segment_r
,
rdata
->
nbSegments
,
nb
);
LOG_D
(
PHY
,
"ULSCH
%d in error
\n
"
,
rdata
->
ulsch_id
);
LOG_D
(
PHY
,
"ULSCH
in error
\n
"
);
AssertFatal
(
ulsch_harq
->
processedSegments
+
nb
==
rdata
->
nbSegments
,
"processed: %d, aborted: %d, total %d
\n
"
,
AssertFatal
(
ulsch_harq
->
processedSegments
+
nb
==
rdata
->
nbSegments
,
"processed: %d, aborted: %d, total %d
\n
"
,
ulsch_harq
->
processedSegments
,
nb
,
rdata
->
nbSegments
);
ulsch_harq
->
processedSegments
,
nb
,
rdata
->
nbSegments
);
ulsch_harq
->
processedSegments
=
rdata
->
nbSegments
;
ulsch_harq
->
processedSegments
=
rdata
->
nbSegments
;
...
@@ -264,7 +264,7 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
...
@@ -264,7 +264,7 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
ulsch
->
harq_mask
&=
~
(
1
<<
rdata
->
harq_pid
);
ulsch
->
harq_mask
&=
~
(
1
<<
rdata
->
harq_pid
);
LOG_D
(
PHY
,
"ULSCH received ok
\n
"
);
LOG_D
(
PHY
,
"ULSCH received ok
\n
"
);
nr_fill_indication
(
gNB
,
ulsch_harq
->
frame
,
ulsch_harq
->
slot
,
rdata
->
ulsch_id
,
rdata
->
harq_pid
,
0
);
nr_fill_indication
(
gNB
,
ulsch_harq
->
frame
,
ulsch_harq
->
slot
,
rdata
->
ulsch
,
rdata
->
ulsch
_id
,
rdata
->
harq_pid
,
0
);
}
else
{
}
else
{
LOG_D
(
PHY
,
"[gNB %d] ULSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d) r %d
\n
"
,
LOG_D
(
PHY
,
"[gNB %d] ULSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d) r %d
\n
"
,
gNB
->
Mod_id
,
ulsch_harq
->
frame
,
ulsch_harq
->
slot
,
gNB
->
Mod_id
,
ulsch_harq
->
frame
,
ulsch_harq
->
slot
,
...
@@ -277,8 +277,8 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
...
@@ -277,8 +277,8 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
}
}
ulsch_harq
->
handled
=
1
;
ulsch_harq
->
handled
=
1
;
LOG_D
(
PHY
,
"ULSCH
%d in error
\n
"
,
rdata
->
ulsch_id
);
LOG_D
(
PHY
,
"ULSCH
in error
\n
"
);
nr_fill_indication
(
gNB
,
ulsch_harq
->
frame
,
ulsch_harq
->
slot
,
rdata
->
ulsch_id
,
rdata
->
harq_pid
,
1
);
nr_fill_indication
(
gNB
,
ulsch_harq
->
frame
,
ulsch_harq
->
slot
,
rdata
->
ulsch
,
rdata
->
ulsch
_id
,
rdata
->
harq_pid
,
1
);
}
}
ulsch
->
last_iteration_cnt
=
rdata
->
decodeIterations
;
ulsch
->
last_iteration_cnt
=
rdata
->
decodeIterations
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_ULSCH_DECODING
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_ULSCH_DECODING
,
0
);
...
@@ -286,10 +286,10 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
...
@@ -286,10 +286,10 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
}
}
void
nr_ulsch_procedures
(
PHY_VARS_gNB
*
gNB
,
int
frame_rx
,
int
slot_rx
,
int
ULSCH_id
,
uint8_t
harq_pid
)
void
nr_ulsch_procedures
(
PHY_VARS_gNB
*
gNB
,
int
frame_rx
,
int
slot_rx
,
NR_gNB_ULSCH_t
*
ulsch
,
int
ULSCH_id
,
uint8_t
harq_pid
)
{
{
NR_DL_FRAME_PARMS
*
frame_parms
=
&
gNB
->
frame_parms
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
gNB
->
frame_parms
;
nfapi_nr_pusch_pdu_t
*
pusch_pdu
=
&
gNB
->
ulsch
[
ULSCH_id
][
0
]
->
harq_processes
[
harq_pid
]
->
ulsch_pdu
;
nfapi_nr_pusch_pdu_t
*
pusch_pdu
=
&
ulsch
->
harq_processes
[
harq_pid
]
->
ulsch_pdu
;
uint8_t
l
,
number_dmrs_symbols
=
0
;
uint8_t
l
,
number_dmrs_symbols
=
0
;
uint32_t
G
;
uint32_t
G
;
...
@@ -343,6 +343,7 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH
...
@@ -343,6 +343,7 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH
start_meas
(
&
gNB
->
ulsch_decoding_stats
);
start_meas
(
&
gNB
->
ulsch_decoding_stats
);
nr_ulsch_decoding
(
gNB
,
nr_ulsch_decoding
(
gNB
,
ulsch
,
ULSCH_id
,
ULSCH_id
,
gNB
->
pusch_vars
[
ULSCH_id
]
->
llr
,
gNB
->
pusch_vars
[
ULSCH_id
]
->
llr
,
frame_parms
,
frame_parms
,
...
@@ -361,14 +362,13 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH
...
@@ -361,14 +362,13 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH
}
}
void
nr_fill_indication
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot_rx
,
int
ULSCH_id
,
uint8_t
harq_pid
,
uint8_t
crc_flag
)
{
void
nr_fill_indication
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot_rx
,
NR_gNB_ULSCH_t
*
ulsch
,
int
ULSCH_id
,
uint8_t
harq_pid
,
uint8_t
crc_flag
)
{
pthread_mutex_lock
(
&
gNB
->
UL_INFO_mutex
);
pthread_mutex_lock
(
&
gNB
->
UL_INFO_mutex
);
int
timing_advance_update
,
cqi
;
int
timing_advance_update
,
cqi
;
int
sync_pos
;
int
sync_pos
;
uint16_t
mu
=
gNB
->
frame_parms
.
numerology_index
;
uint16_t
mu
=
gNB
->
frame_parms
.
numerology_index
;
NR_gNB_ULSCH_t
*
ulsch
=
gNB
->
ulsch
[
ULSCH_id
][
0
];
NR_UL_gNB_HARQ_t
*
harq_process
=
ulsch
->
harq_processes
[
harq_pid
];
NR_UL_gNB_HARQ_t
*
harq_process
=
ulsch
->
harq_processes
[
harq_pid
];
nfapi_nr_pusch_pdu_t
*
pusch_pdu
=
&
harq_process
->
ulsch_pdu
;
nfapi_nr_pusch_pdu_t
*
pusch_pdu
=
&
harq_process
->
ulsch_pdu
;
...
@@ -476,7 +476,7 @@ void fill_ul_rb_mask(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
...
@@ -476,7 +476,7 @@ void fill_ul_rb_mask(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
}
}
}
}
for
(
int
ULSCH_id
=
0
;
ULSCH_id
<
NUMBER_OF_NR_ULSCH_MAX
;
ULSCH_id
++
)
{
for
(
int
ULSCH_id
=
0
;
ULSCH_id
<
NUMBER_OF_NR_ULSCH_MAX
;
ULSCH_id
++
)
{
NR_gNB_ULSCH_t
*
ulsch
=
gNB
->
ulsch
[
ULSCH_id
][
0
];
NR_gNB_ULSCH_t
*
ulsch
=
NULL
;
//
gNB->ulsch[ULSCH_id][0];
int
harq_pid
;
int
harq_pid
;
NR_UL_gNB_HARQ_t
*
ulsch_harq
;
NR_UL_gNB_HARQ_t
*
ulsch_harq
;
...
@@ -613,7 +613,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
...
@@ -613,7 +613,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
}
}
for
(
int
ULSCH_id
=
0
;
ULSCH_id
<
NUMBER_OF_NR_ULSCH_MAX
;
ULSCH_id
++
)
{
for
(
int
ULSCH_id
=
0
;
ULSCH_id
<
NUMBER_OF_NR_ULSCH_MAX
;
ULSCH_id
++
)
{
NR_gNB_ULSCH_t
*
ulsch
=
gNB
->
ulsch
[
ULSCH_id
][
0
];
NR_gNB_ULSCH_t
*
ulsch
=
NULL
;
//
gNB->ulsch[ULSCH_id][0];
int
harq_pid
;
int
harq_pid
;
int
no_sig
;
int
no_sig
;
NR_UL_gNB_HARQ_t
*
ulsch_harq
;
NR_UL_gNB_HARQ_t
*
ulsch_harq
;
...
@@ -663,10 +663,10 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
...
@@ -663,10 +663,10 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH
,
1
);
start_meas
(
&
gNB
->
rx_pusch_stats
);
start_meas
(
&
gNB
->
rx_pusch_stats
);
for
(
uint8_t
symbol
=
symbol_start
;
symbol
<
symbol_end
;
symbol
++
)
{
for
(
uint8_t
symbol
=
symbol_start
;
symbol
<
symbol_end
;
symbol
++
)
{
no_sig
=
nr_rx_pusch
(
gNB
,
ULSCH_id
,
frame_rx
,
slot_rx
,
symbol
,
harq_pid
);
no_sig
=
nr_rx_pusch
(
gNB
,
ulsch
,
ULSCH_id
,
frame_rx
,
slot_rx
,
symbol
,
harq_pid
);
if
(
no_sig
)
{
if
(
no_sig
)
{
LOG_I
(
PHY
,
"PUSCH not detected in symbol %d
\n
"
,
symbol
);
LOG_I
(
PHY
,
"PUSCH not detected in symbol %d
\n
"
,
symbol
);
nr_fill_indication
(
gNB
,
frame_rx
,
slot_rx
,
ULSCH_id
,
harq_pid
,
1
);
nr_fill_indication
(
gNB
,
frame_rx
,
slot_rx
,
ulsch
,
ULSCH_id
,
harq_pid
,
1
);
return
;
return
;
}
}
}
}
...
@@ -675,7 +675,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
...
@@ -675,7 +675,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
//LOG_M("rxdataF_comp.m","rxF_comp",gNB->pusch_vars[0]->rxdataF_comp[0],6900,1,1);
//LOG_M("rxdataF_comp.m","rxF_comp",gNB->pusch_vars[0]->rxdataF_comp[0],6900,1,1);
//LOG_M("rxdataF_ext.m","rxF_ext",gNB->pusch_vars[0]->rxdataF_ext[0],6900,1,1);
//LOG_M("rxdataF_ext.m","rxF_ext",gNB->pusch_vars[0]->rxdataF_ext[0],6900,1,1);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_ULSCH_PROCEDURES_RX
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_ULSCH_PROCEDURES_RX
,
1
);
nr_ulsch_procedures
(
gNB
,
frame_rx
,
slot_rx
,
ULSCH_id
,
harq_pid
);
nr_ulsch_procedures
(
gNB
,
frame_rx
,
slot_rx
,
ulsch
,
ULSCH_id
,
harq_pid
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_ULSCH_PROCEDURES_RX
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_ULSCH_PROCEDURES_RX
,
0
);
break
;
break
;
}
}
...
...
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