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
canghaiwuhen
OpenXG-RAN
Commits
9dc149e0
Commit
9dc149e0
authored
Aug 27, 2020
by
Sakthi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added postDecode; ulsim compiles
parent
e6804be9
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
142 additions
and
183 deletions
+142
-183
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+49
-138
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+35
-31
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+58
-14
No files found.
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
9dc149e0
This diff is collapsed.
Click to expand it.
openair1/PHY/defs_gNB.h
View file @
9dc149e0
...
...
@@ -465,37 +465,6 @@ typedef struct {
uint8_t
cl_done
;
}
NR_gNB_PUSCH
;
typedef
struct
LDPCDecode_s
{
PHY_BARS_gNB
*
gNB
;
NR_UL_gNB_HARQ_t
*
ulsch_harq
;
t_nrLDPC_dec_params
*
p_decoderParms
;
short
*
ulsch_llr
;
int
harq_pid
;
int
rv_index
;
int
A
;
int
E
;
int
Kc
;
int
Qm
;
int
nbSegments
;
int
segment_r
;
int
r_offset
;
int
Tbslbrm
;
int
decodeIterations
;
}
ldpcDecode_t
struct
ldpcReqId
{
uint16_t
rnti
;
uint16_t
frame
;
uint8_t
subframe
;
uint8_t
codeblock
;
uint16_t
spare
;
}
__attribute__
((
packed
));
union
ldpcReqUnion
{
struct
ldpcReqId
s
;
uint64_t
p
;
};
/// Context data structure for RX/TX portion of slot processing
typedef
struct
{
/// Component Carrier index
...
...
@@ -840,4 +809,39 @@ typedef struct PHY_VARS_gNB_s {
}
PHY_VARS_gNB
;
typedef
struct
LDPCDecode_s
{
PHY_VARS_gNB
*
gNB
;
NR_UL_gNB_HARQ_t
*
ulsch_harq
;
t_nrLDPC_dec_params
*
p_decoderParms
;
NR_gNB_ULSCH_t
*
ulsch
;
short
*
ulsch_llr
;
int
ulsch_id
;
int
harq_pid
;
int
rv_index
;
int
A
;
int
E
;
int
Kc
;
int
Qm
;
int
Kr_bytes
;
int
nbSegments
;
int
segment_r
;
int
r_offset
;
int
offset
;
int
Tbslbrm
;
int
decodeIterations
;
}
ldpcDecode_t
;
struct
ldpcReqId
{
uint16_t
rnti
;
uint16_t
frame
;
uint8_t
subframe
;
uint8_t
codeblock
;
uint16_t
spare
;
}
__attribute__
((
packed
));
union
ldpcReqUnion
{
struct
ldpcReqId
s
;
uint64_t
p
;
};
#endif
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
9dc149e0
...
...
@@ -225,16 +225,68 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
*/
void
nr_postDecode
(
PHY_VARS_gNB
gNB
,
notifiedFIFO_elt_t
*
req
)
{
ldpcDecode_t
*
rdata
=
(
ldpcDeocde_t
*
)
NotifiedFifoData
(
req
);
NR_UL_gNB_HARQ_t
ulsch_harq
=
rdata
->
ulsch_harq
;
void
nr_postDecode
(
PHY_VARS_gNB
*
gNB
,
notifiedFIFO_elt_t
*
req
)
{
ldpcDecode_t
*
rdata
=
(
ldpcDecode_t
*
)
NotifiedFifoData
(
req
);
NR_UL_gNB_HARQ_t
*
ulsch_harq
=
rdata
->
ulsch_harq
;
NR_gNB_ULSCH_t
*
ulsch
=
rdata
->
ulsch
;
int
r
=
rdata
->
segment_r
;
bool
decodeSuccess
=
(
rdata
->
de
oc
deIterations
<=
rdata
->
p_decoderParms
->
numMaxIter
);
bool
decodeSuccess
=
(
rdata
->
de
co
deIterations
<=
rdata
->
p_decoderParms
->
numMaxIter
);
ulsch_harq
->
processedSegments
++
;
LOG_D
(
PHY
,
"processing result of segment: %d, processed %d/%d
\n
"
,
rdata
->
segment_r
,
ulsch_harq
->
processedSegments
,
rdata
->
nbSegments
);
proc
->
nbDecode
--
;
LOG_D
(
PHY
,
"remain to decoded in subframe: %d
\n
"
,
proc
->
nbDecode
);
gNB
->
nbDecode
--
;
LOG_D
(
PHY
,
"remain to decoded in subframe: %d
\n
"
,
gNB
->
nbDecode
);
if
(
decodeSuccess
)
{
memcpy
(
ulsch_harq
->
b
+
rdata
->
offset
,
ulsch_harq
->
c
[
r
],
rdata
->
Kr_bytes
-
-
(
ulsch_harq
->
F
>>
3
)
-
((
ulsch_harq
->
C
>
1
)
?
3
:
0
));
}
else
{
if
(
rdata
->
nbSegments
!=
ulsch_harq
->
processedSegments
)
{
int
nb
=
abortTpool
(
gNB
->
threadPool
,
req
->
key
);
nb
+=
abortNotifiedFIFO
(
gNB
->
respDecode
,
req
->
key
);
gNB
->
nbDecode
-=
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
);
AssertFatal
(
ulsch_harq
->
processedSegments
+
nb
==
rdata
->
nbSegments
,
"processed: %d, aborted: %d, total %d
\n
"
,
ulsch_harq
->
processedSegments
,
nb
,
rdata
->
nbSegments
);
ulsch_harq
->
processedSegments
=
rdata
->
nbSegments
;
}
}
// if all segments are done
if
(
rdata
->
nbSegments
==
ulsch_harq
->
processedSegments
)
{
if
(
decodeSuccess
)
{
LOG_I
(
PHY
,
"[gNB %d] ULSCH: Setting ACK for nr_tti_rx %d TBS %d
\n
"
,
gNB
->
Mod_id
,
ulsch_harq
->
slot
,
ulsch_harq
->
TBS
);
ulsch_harq
->
status
=
SCH_IDLE
;
ulsch_harq
->
round
=
0
;
ulsch
->
harq_mask
&=
~
(
1
<<
rdata
->
harq_pid
);
LOG_D
(
PHY
,
"ULSCH received ok
\n
"
);
nr_fill_indication
(
gNB
,
ulsch_harq
->
frame
,
ulsch_harq
->
slot
,
rdata
->
ulsch_id
,
rdata
->
harq_pid
,
0
);
}
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
"
,
gNB
->
Mod_id
,
ulsch_harq
->
frame
,
ulsch_harq
->
slot
,
rdata
->
harq_pid
,
ulsch_harq
->
status
,
ulsch_harq
->
round
,
ulsch_harq
->
TBS
,
r
);
if
(
ulsch_harq
->
round
>=
ulsch
->
Mlimit
)
{
ulsch_harq
->
status
=
SCH_IDLE
;
ulsch_harq
->
round
=
0
;
ulsch_harq
->
handled
=
0
;
ulsch
->
harq_mask
&=
~
(
1
<<
rdata
->
harq_pid
);
}
ulsch_harq
->
handled
=
1
;
LOG_D
(
PHY
,
"ULSCH %d in error
\n
"
,
rdata
->
ulsch_id
);
nr_fill_indication
(
gNB
,
ulsch_harq
->
frame
,
ulsch_harq
->
slot
,
rdata
->
ulsch_id
,
rdata
->
harq_pid
,
1
);
}
ulsch
->
last_iteration_cnt
=
rdata
->
decodeIterations
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_ULSCH_DECODING
,
0
);
}
}
void
nr_ulsch_procedures
(
PHY_VARS_gNB
*
gNB
,
int
frame_rx
,
int
slot_rx
,
int
ULSCH_id
,
uint8_t
harq_pid
)
{
...
...
@@ -310,14 +362,6 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH
delNotifiedFIFO_elt
(
req
);
}
if
(
ret
>
gNB
->
ulsch
[
ULSCH_id
][
0
]
->
max_ldpc_iterations
){
LOG_D
(
PHY
,
"ULSCH %d in error
\n
"
,
ULSCH_id
);
nr_fill_indication
(
gNB
,
frame_rx
,
slot_rx
,
ULSCH_id
,
harq_pid
,
1
);
}
else
if
(
gNB
->
ulsch
[
ULSCH_id
][
0
]
->
harq_processes
[
harq_pid
]
->
b
!=
NULL
){
LOG_D
(
PHY
,
"ULSCH received ok
\n
"
);
nr_fill_indication
(
gNB
,
frame_rx
,
slot_rx
,
ULSCH_id
,
harq_pid
,
0
);
}
}
...
...
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