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
76d841ff
Commit
76d841ff
authored
Sep 16, 2020
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed ulschsim
parent
34ae1022
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
4 deletions
+22
-4
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-0
openair1/PHY/NR_TRANSPORT/nr_ulsch.h
openair1/PHY/NR_TRANSPORT/nr_ulsch.h
+3
-0
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+5
-2
openair1/SIMULATION/NR_PHY/ulschsim.c
openair1/SIMULATION/NR_PHY/ulschsim.c
+13
-2
No files found.
cmake_targets/CMakeLists.txt
View file @
76d841ff
...
@@ -3047,6 +3047,7 @@ target_link_libraries(nr_prachsim
...
@@ -3047,6 +3047,7 @@ target_link_libraries(nr_prachsim
add_executable
(
nr_ulschsim
add_executable
(
nr_ulschsim
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/ulschsim.c
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/ulschsim.c
${
OPENAIR_DIR
}
/common/utils/threadPool/thread-pool.c
${
OPENAIR_DIR
}
/common/utils/utils.c
${
OPENAIR_DIR
}
/common/utils/utils.c
${
OPENAIR_DIR
}
/common/utils/system.c
${
OPENAIR_DIR
}
/common/utils/system.c
${
OPENAIR_DIR
}
/common/utils/nr/nr_common.c
${
OPENAIR_DIR
}
/common/utils/nr/nr_common.c
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch.h
View file @
76d841ff
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
*/
*/
#include "PHY/defs_gNB.h"
#include "PHY/defs_gNB.h"
#include "common/utils/threadPool/thread-pool.h"
void
free_gNB_ulsch
(
NR_gNB_ULSCH_t
**
ulsch
,
uint8_t
N_RB_UL
);
void
free_gNB_ulsch
(
NR_gNB_ULSCH_t
**
ulsch
,
uint8_t
N_RB_UL
);
...
@@ -91,3 +92,5 @@ int16_t find_nr_ulsch(uint16_t rnti, PHY_VARS_gNB *gNB,find_type_t type);
...
@@ -91,3 +92,5 @@ int16_t find_nr_ulsch(uint16_t rnti, PHY_VARS_gNB *gNB,find_type_t type);
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
);
int
nr_postDecode
(
PHY_VARS_gNB
*
gNB
,
notifiedFIFO_elt_t
*
req
,
bool
do_fill_ind
);
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
76d841ff
...
@@ -213,7 +213,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
...
@@ -213,7 +213,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
*/
*/
void
nr_postDecode
(
PHY_VARS_gNB
*
gNB
,
notifiedFIFO_elt_t
*
req
)
{
int
nr_postDecode
(
PHY_VARS_gNB
*
gNB
,
notifiedFIFO_elt_t
*
req
,
bool
do_fill_ind
)
{
ldpcDecode_t
*
rdata
=
(
ldpcDecode_t
*
)
NotifiedFifoData
(
req
);
ldpcDecode_t
*
rdata
=
(
ldpcDecode_t
*
)
NotifiedFifoData
(
req
);
NR_UL_gNB_HARQ_t
*
ulsch_harq
=
rdata
->
ulsch_harq
;
NR_UL_gNB_HARQ_t
*
ulsch_harq
=
rdata
->
ulsch_harq
;
NR_gNB_ULSCH_t
*
ulsch
=
rdata
->
ulsch
;
NR_gNB_ULSCH_t
*
ulsch
=
rdata
->
ulsch
;
...
@@ -241,12 +241,14 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
...
@@ -241,12 +241,14 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
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
;
if
(
!
do_fill_ind
)
return
1
;
}
}
}
}
// if all segments are done
// if all segments are done
if
(
rdata
->
nbSegments
==
ulsch_harq
->
processedSegments
)
{
if
(
rdata
->
nbSegments
==
ulsch_harq
->
processedSegments
)
{
if
(
decodeSuccess
)
{
if
(
decodeSuccess
)
{
if
(
!
do_fill_ind
)
return
0
;
LOG_D
(
PHY
,
"[gNB %d] ULSCH: Setting ACK for nr_tti_rx %d TBS %d
\n
"
,
LOG_D
(
PHY
,
"[gNB %d] ULSCH: Setting ACK for nr_tti_rx %d TBS %d
\n
"
,
gNB
->
Mod_id
,
ulsch_harq
->
slot
,
ulsch_harq
->
TBS
);
gNB
->
Mod_id
,
ulsch_harq
->
slot
,
ulsch_harq
->
TBS
);
ulsch_harq
->
status
=
SCH_IDLE
;
ulsch_harq
->
status
=
SCH_IDLE
;
...
@@ -256,6 +258,7 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
...
@@ -256,6 +258,7 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
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_id
,
rdata
->
harq_pid
,
0
);
}
else
{
}
else
{
if
(
!
do_fill_ind
)
return
1
;
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
,
rdata
->
harq_pid
,
ulsch_harq
->
status
,
ulsch_harq
->
round
,
ulsch_harq
->
TBS
,
r
);
rdata
->
harq_pid
,
ulsch_harq
->
status
,
ulsch_harq
->
round
,
ulsch_harq
->
TBS
,
r
);
...
@@ -345,7 +348,7 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH
...
@@ -345,7 +348,7 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH
while
(
gNB
->
nbDecode
>
0
)
{
while
(
gNB
->
nbDecode
>
0
)
{
notifiedFIFO_elt_t
*
req
=
pullTpool
(
gNB
->
respDecode
,
gNB
->
threadPool
);
notifiedFIFO_elt_t
*
req
=
pullTpool
(
gNB
->
respDecode
,
gNB
->
threadPool
);
nr_postDecode
(
gNB
,
req
);
nr_postDecode
(
gNB
,
req
,
1
);
delNotifiedFIFO_elt
(
req
);
delNotifiedFIFO_elt
(
req
);
}
}
stop_meas
(
&
gNB
->
ulsch_decoding_stats
);
stop_meas
(
&
gNB
->
ulsch_decoding_stats
);
...
...
openair1/SIMULATION/NR_PHY/ulschsim.c
View file @
76d841ff
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
#include "openair1/SIMULATION/RF/rf.h"
#include "openair1/SIMULATION/RF/rf.h"
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c"
#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c"
#include "common/utils/threadPool/thread-pool.h"
//#define DEBUG_NR_ULSCHSIM
//#define DEBUG_NR_ULSCHSIM
...
@@ -338,6 +339,11 @@ int main(int argc, char **argv)
...
@@ -338,6 +339,11 @@ int main(int argc, char **argv)
gNB
=
RC
.
gNB
[
0
];
gNB
=
RC
.
gNB
[
0
];
//gNB_config = &gNB->gNB_config;
//gNB_config = &gNB->gNB_config;
gNB
->
threadPool
=
(
tpool_t
*
)
malloc
(
sizeof
(
tpool_t
));
gNB
->
respDecode
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
char
tp_param
[]
=
"n"
;
initTpool
(
tp_param
,
gNB
->
threadPool
,
true
);
initNotifiedFIFO
(
gNB
->
respDecode
);
frame_parms
=
&
gNB
->
frame_parms
;
//to be initialized I suppose (maybe not necessary for PBCH)
frame_parms
=
&
gNB
->
frame_parms
;
//to be initialized I suppose (maybe not necessary for PBCH)
frame_parms
->
nb_antennas_tx
=
n_tx
;
frame_parms
->
nb_antennas_tx
=
n_tx
;
frame_parms
->
nb_antennas_rx
=
n_rx
;
frame_parms
->
nb_antennas_rx
=
n_rx
;
...
@@ -531,10 +537,15 @@ int main(int argc, char **argv)
...
@@ -531,10 +537,15 @@ int main(int argc, char **argv)
rel15_ul
->
qam_mod_order
,
rel15_ul
->
qam_mod_order
,
rel15_ul
->
nrOfLayers
);
rel15_ul
->
nrOfLayers
);
ret
=
nr_ulsch_decoding
(
gNB
,
UE_id
,
channel_output_fixed
,
frame_parms
,
rel15_ul
,
nr_ulsch_decoding
(
gNB
,
UE_id
,
channel_output_fixed
,
frame_parms
,
rel15_ul
,
frame
,
subframe
,
harq_pid
,
G
);
frame
,
subframe
,
harq_pid
,
G
);
while
(
gNB
->
nbDecode
>
0
)
{
notifiedFIFO_elt_t
*
req
=
pullTpool
(
gNB
->
respDecode
,
gNB
->
threadPool
);
ret
=
nr_postDecode
(
gNB
,
req
,
0
);
delNotifiedFIFO_elt
(
req
);
}
if
(
ret
>
ulsch_gNB
->
max_ldpc_iterations
)
if
(
ret
)
n_errors
++
;
n_errors
++
;
//count errors
//count 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