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
5e3fb991
Commit
5e3fb991
authored
Oct 29, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
type fix
parent
f3159e68
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
17 deletions
+14
-17
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+11
-13
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
+3
-4
No files found.
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
5e3fb991
...
@@ -90,7 +90,7 @@ void nr_modulation(uint32_t *in,
...
@@ -90,7 +90,7 @@ void nr_modulation(uint32_t *in,
void
nr_pdsch_codeword_modulation
(
uint32_t
*
in
,
void
nr_pdsch_codeword_modulation
(
uint32_t
*
in
,
uint8_t
Qm
,
uint8_t
Qm
,
uint32_t
length
,
uint32_t
length
,
u
int16_t
*
out
)
{
int16_t
*
out
)
{
uint16_t
offset
=
(
Qm
==
2
)
?
NR_MOD_TABLE_QPSK_OFFSET
:
(
Qm
==
4
)
?
NR_MOD_TABLE_QAM16_OFFSET
:
\
uint16_t
offset
=
(
Qm
==
2
)
?
NR_MOD_TABLE_QPSK_OFFSET
:
(
Qm
==
4
)
?
NR_MOD_TABLE_QAM16_OFFSET
:
\
(
Qm
==
6
)
?
NR_MOD_TABLE_QAM64_OFFSET
:
(
Qm
==
8
)
?
NR_MOD_TABLE_QAM256_OFFSET
:
0
;
(
Qm
==
6
)
?
NR_MOD_TABLE_QAM64_OFFSET
:
(
Qm
==
8
)
?
NR_MOD_TABLE_QAM256_OFFSET
:
0
;
...
@@ -111,16 +111,15 @@ void nr_pdsch_codeword_modulation(uint32_t *in,
...
@@ -111,16 +111,15 @@ void nr_pdsch_codeword_modulation(uint32_t *in,
}
}
}
}
void
nr_pdsch_layer_mapping
(
uint16_t
**
mod_symbs
,
void
nr_pdsch_layer_mapping
(
int16_t
**
mod_symbs
,
uint8_t
n_codewords
,
uint8_t
n_layers
,
uint8_t
n_layers
,
uint16_t
n_symbs
,
uint16_t
n_symbs
,
u
int16_t
**
tx_layers
)
{
int16_t
**
tx_layers
)
{
switch
(
n_layers
)
{
switch
(
n_layers
)
{
case
1
:
case
1
:
memcpy
((
void
*
)
tx_layers
[
0
],
(
void
*
)
mod_symbs
[
0
],
(
n_symbs
<<
1
)
*
sizeof
(
u
int16_t
));
memcpy
((
void
*
)
tx_layers
[
0
],
(
void
*
)
mod_symbs
[
0
],
(
n_symbs
<<
1
)
*
sizeof
(
int16_t
));
break
;
break
;
case
2
:
case
2
:
...
@@ -196,7 +195,7 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t dlsch,
...
@@ -196,7 +195,7 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t dlsch,
nfapi_nr_dl_config_pdcch_parameters_rel15_t
pdcch_params
=
dci_alloc
.
pdcch_params
;
nfapi_nr_dl_config_pdcch_parameters_rel15_t
pdcch_params
=
dci_alloc
.
pdcch_params
;
uint32_t
scrambled_output
[
NR_MAX_NB_CODEWORDS
][
NR_MAX_PDSCH_ENCODED_LENGTH
];
uint32_t
scrambled_output
[
NR_MAX_NB_CODEWORDS
][
NR_MAX_PDSCH_ENCODED_LENGTH
];
int16_t
mod_symbs
[
NR_MAX_NB_CODEWORDS
][
NR_MAX_PDSCH_ENCODED_LENGTH
>>
1
];
int16_t
mod_symbs
[
NR_MAX_NB_CODEWORDS
][
NR_MAX_PDSCH_ENCODED_LENGTH
>>
1
];
u
int16_t
tx_layers
[
NR_MAX_NB_LAYERS
][
NR_MAX_PDSCH_ENCODED_LENGTH
>>
1
];
int16_t
tx_layers
[
NR_MAX_NB_LAYERS
][
NR_MAX_PDSCH_ENCODED_LENGTH
>>
1
];
uint16_t
n_symbs
;
uint16_t
n_symbs
;
int8_t
Wf
[
2
],
Wt
[
2
],
l0
,
delta
;
int8_t
Wf
[
2
],
Wt
[
2
],
l0
,
delta
;
uint16_t
TBS
=
rel15
->
transport_block_size
;
uint16_t
TBS
=
rel15
->
transport_block_size
;
...
@@ -218,10 +217,10 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t dlsch,
...
@@ -218,10 +217,10 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t dlsch,
n_RNTI
,
n_RNTI
,
scrambled_output
[
q
]);
scrambled_output
[
q
]);
#ifdef DEBUG_DLSCH
#ifdef DEBUG_DLSCH
printf
(
"PDSCH Scrambling(TBS %d): before
\t
after
\n
"
,
TBS
);
//
printf("PDSCH Scrambling(TBS %d): before \t after \n", TBS);
for
(
int
i
=
0
;
i
<
TBS
;
i
++
)
{
//
for (int i=0; i<TBS; i++) {
printf
(
"%d
\t
%d
\n
"
,
harq
->
f
[
i
],
scrambled_output
[
0
][
i
]);
//
printf("%d\t%d\n", harq->f[i], scrambled_output[0][i]);
}
//
}
#endif
#endif
...
@@ -245,7 +244,6 @@ for (int i=0; i<n_symbs; i++) {
...
@@ -245,7 +244,6 @@ for (int i=0; i<n_symbs; i++) {
/// Layer mapping
/// Layer mapping
nr_pdsch_layer_mapping
(
mod_symbs
,
nr_pdsch_layer_mapping
(
mod_symbs
,
rel15
->
nb_codewords
,
rel15
->
nb_layers
,
rel15
->
nb_layers
,
n_symbs
,
n_symbs
,
tx_layers
);
tx_layers
);
...
@@ -284,8 +282,8 @@ for (int i=0; i<n_symbs; i++) {
...
@@ -284,8 +282,8 @@ for (int i=0; i<n_symbs; i++) {
k
-=
frame_parms
.
ofdm_symbol_size
;
k
-=
frame_parms
.
ofdm_symbol_size
;
if
((
l
==
l0
)
&&
(
k
==
((
dmrs_type
)
?
(
6
*
n
+
k_prime
+
delta
)
:
((
n
<<
2
)
+
(
k_prime
<<
1
)
+
delta
))))
{
if
((
l
==
l0
)
&&
(
k
==
((
dmrs_type
)
?
(
6
*
n
+
k_prime
+
delta
)
:
((
n
<<
2
)
+
(
k_prime
<<
1
)
+
delta
))))
{
((
int16_t
*
)
txdataF
[
ap
])[(
l
*
frame_parms
.
ofdm_symbol_size
+
k
)
<<
1
]
=
(
Wt
[
k_prime
]
*
Wf
[
k_prime
]
*
amp
*
mod_dmrs
[
dmrs_idx
<<
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
ap
])[(
l
*
frame_parms
.
ofdm_symbol_size
+
k
)
<<
1
]
=
(
Wt
[
k_prime
]
*
Wf
[
k_prime
]
*
amp
/
2
*
mod_dmrs
[
dmrs_idx
<<
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
ap
])[((
l
*
frame_parms
.
ofdm_symbol_size
+
k
)
<<
1
)
+
1
]
=
(
Wt
[
k_prime
]
*
Wf
[
k_prime
]
*
amp
*
mod_dmrs
[(
dmrs_idx
<<
1
)
+
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
ap
])[((
l
*
frame_parms
.
ofdm_symbol_size
+
k
)
<<
1
)
+
1
]
=
(
Wt
[
k_prime
]
*
Wf
[
k_prime
]
*
amp
/
2
*
mod_dmrs
[(
dmrs_idx
<<
1
)
+
1
])
>>
15
;
dmrs_idx
++
;
dmrs_idx
++
;
n
++
;
n
++
;
k_prime
++
;
k_prime
++
;
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
View file @
5e3fb991
...
@@ -70,13 +70,12 @@ void nr_pdsch_codeword_scrambling(uint8_t *in,
...
@@ -70,13 +70,12 @@ void nr_pdsch_codeword_scrambling(uint8_t *in,
void
nr_pdsch_codeword_modulation
(
uint32_t
*
in
,
void
nr_pdsch_codeword_modulation
(
uint32_t
*
in
,
uint8_t
Qm
,
uint8_t
Qm
,
uint32_t
length
,
uint32_t
length
,
u
int16_t
*
out
);
int16_t
*
out
);
void
nr_pdsch_layer_mapping
(
uint16_t
**
mod_symbs
,
void
nr_pdsch_layer_mapping
(
int16_t
**
mod_symbs
,
uint8_t
n_codewords
,
uint8_t
n_layers
,
uint8_t
n_layers
,
uint16_t
n_symbs
,
uint16_t
n_symbs
,
u
int16_t
**
tx_layers
);
int16_t
**
tx_layers
);
uint8_t
nr_generate_pdsch
(
NR_gNB_DLSCH_t
dlsch
,
uint8_t
nr_generate_pdsch
(
NR_gNB_DLSCH_t
dlsch
,
NR_gNB_DCI_ALLOC_t
dci_alloc
,
NR_gNB_DCI_ALLOC_t
dci_alloc
,
...
...
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