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
常顺宇
OpenXG-RAN
Commits
38793cbc
Commit
38793cbc
authored
Nov 14, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrambling size correction
parent
aeceb248
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+11
-7
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
+1
-1
No files found.
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
38793cbc
...
...
@@ -34,14 +34,14 @@
#include "nr_dci.h"
#include "nr_sch_dmrs.h"
#define DEBUG_DLSCH
//
#define DEBUG_DLSCH
//#define DEBUG_DLSCH_MAPPING
uint8_t
mod_order
[
5
]
=
{
1
,
2
,
4
,
6
,
8
};
uint16_t
mod_offset
[
5
]
=
{
1
,
3
,
7
,
23
,
87
};
void
nr_pdsch_codeword_scrambling
(
uint8_t
*
in
,
uint
8
_t
size
,
uint
16
_t
size
,
uint8_t
q
,
uint32_t
Nid
,
uint32_t
n_RNTI
,
...
...
@@ -62,6 +62,7 @@ void nr_pdsch_codeword_scrambling(uint8_t *in,
out
++
;
}
*
out
^=
(((
in
[
i
])
&
1
)
^
((
s
>>
b_idx
)
&
1
))
<<
b_idx
;
//printf("i %d b_idx %d in %d s 0x%08x out 0x%08x\n", i, b_idx, in[i], s, *out);
}
}
...
...
@@ -221,14 +222,17 @@ for (int i=0; i<TBS>>7; i++) {
printf
(
"
\n
"
);
}
printf
(
"
\n
Encoded payload:
\n
"
);
for
(
int
i
=
0
;
i
<
encoded_length
>>
7
;
i
++
)
{
for
(
int
j
=
0
;
j
<
16
;
j
++
)
printf
(
"
0x%02x
\t
"
,
harq
->
f
[(
i
<<
4
)
+
j
]);
printf
(
"
\
n
"
);
for
(
int
i
=
0
;
i
<
encoded_length
>>
3
;
i
++
)
{
for
(
int
j
=
0
;
j
<
8
;
j
++
)
printf
(
"
%d"
,
harq
->
f
[(
i
<<
3
)
+
j
]);
printf
(
"
\
t
"
);
}
printf
(
"
\n
"
);
#endif
/// scrambling
for
(
int
q
=
0
;
q
<
rel15
->
nb_codewords
;
q
++
)
memset
((
void
*
)
scrambled_output
[
q
],
0
,
(
encoded_length
>>
5
)
*
sizeof
(
uint32_t
));
uint16_t
n_RNTI
=
(
pdcch_params
.
search_space_type
==
NFAPI_NR_SEARCH_SPACE_TYPE_UE_SPECIFIC
)
?
\
((
pdcch_params
.
scrambling_id
)
?
pdcch_params
.
rnti
:
0
)
:
0
;
uint16_t
Nid
=
(
pdcch_params
.
search_space_type
==
NFAPI_NR_SEARCH_SPACE_TYPE_UE_SPECIFIC
)
?
\
...
...
@@ -242,7 +246,7 @@ for (int i=0; i<encoded_length>>7; i++) {
scrambled_output
[
q
]);
#ifdef DEBUG_DLSCH
printf
(
"PDSCH scrambling:
\n
"
);
for
(
int
i
=
0
;
i
<
encoded_length
>>
7
;
i
++
)
{
for
(
int
i
=
0
;
i
<
encoded_length
>>
8
;
i
++
)
{
for
(
int
j
=
0
;
j
<
8
;
j
++
)
printf
(
"0x%08x
\t
"
,
scrambled_output
[
0
][(
i
<<
3
)
+
j
]);
printf
(
"
\n
"
);
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
View file @
38793cbc
...
...
@@ -61,7 +61,7 @@ void nr_get_tbs(nfapi_nr_dl_config_dlsch_pdu *dlsch_pdu,
nfapi_nr_config_request_t
config
);
void
nr_pdsch_codeword_scrambling
(
uint8_t
*
in
,
uint
8
_t
size
,
uint
16
_t
size
,
uint8_t
q
,
uint32_t
Nid
,
uint32_t
n_RNTI
,
...
...
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