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
f18e6e42
Commit
f18e6e42
authored
Oct 30, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Payload fixing
parent
a66a1cf7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+10
-6
No files found.
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
f18e6e42
...
@@ -205,6 +205,7 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t dlsch,
...
@@ -205,6 +205,7 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t dlsch,
uint16_t
encoded_length
=
nb_symbols
*
Qm
;
uint16_t
encoded_length
=
nb_symbols
*
Qm
;
/// CRC, coding, interleaving and rate matching
/// CRC, coding, interleaving and rate matching
memset
((
void
*
)
harq
->
pdu
,
1
,
(
TBS
>>
3
)
*
sizeof
(
uint8_t
));
nr_dlsch_encoding
(
harq
->
pdu
,
subframe
,
&
dlsch
,
&
frame_parms
);
nr_dlsch_encoding
(
harq
->
pdu
,
subframe
,
&
dlsch
,
&
frame_parms
);
#ifdef DEBUG_DLSCH
#ifdef DEBUG_DLSCH
printf
(
"PDSCH encoding:
\n
Payload:
\n
"
);
printf
(
"PDSCH encoding:
\n
Payload:
\n
"
);
...
@@ -279,13 +280,13 @@ for (int l=0; l<rel15->nb_layers; l++)
...
@@ -279,13 +280,13 @@ for (int l=0; l<rel15->nb_layers; l++)
//to be moved to init phase potentially, for now tx_layers 1-8 are mapped on antenna ports 1000-1007
//to be moved to init phase potentially, for now tx_layers 1-8 are mapped on antenna ports 1000-1007
/// DMRS QPSK modulation
/// DMRS QPSK modulation
uint16_t
n_dmrs
=
rel15
->
n_prb
*
rel15
->
nb_re_dmrs
;
uint16_t
n_dmrs
=
(
rel15
->
n_prb
*
rel15
->
nb_re_dmrs
)
<<
1
;
int16_t
mod_dmrs
[
n_dmrs
<<
1
];
int16_t
mod_dmrs
[
n_dmrs
<<
1
];
uint8_t
dmrs_type
=
config
.
pdsch_config
.
dmrs_type
.
value
;
uint8_t
dmrs_type
=
config
.
pdsch_config
.
dmrs_type
.
value
;
l0
=
get_l0
(
dmrs_type
,
2
);
//config.pdsch_config.dmrs_typeA_position.value);
l0
=
get_l0
(
dmrs_type
,
2
);
//config.pdsch_config.dmrs_typeA_position.value);
nr_modulation
(
pdsch_dmrs
[
l0
],
n_dmrs
,
MOD_QPSK
,
mod_dmrs
);
nr_modulation
(
pdsch_dmrs
[
l0
],
n_dmrs
,
MOD_QPSK
,
mod_dmrs
);
#ifdef DEBUG_DLSCH
#ifdef DEBUG_DLSCH
printf
(
"DMRS modulation (single symbol %d, %d symbols
):
\n
"
,
l0
,
n_dmrs
);
printf
(
"DMRS modulation (single symbol %d, %d symbols
, type %d):
\n
"
,
l0
,
n_dmrs
,
dmrs_type
);
for
(
int
i
=
0
;
i
<
n_dmrs
>>
3
;
i
++
)
{
for
(
int
i
=
0
;
i
<
n_dmrs
>>
3
;
i
++
)
{
for
(
int
j
=
0
;
j
<
8
;
j
++
)
{
for
(
int
j
=
0
;
j
<
8
;
j
++
)
{
printf
(
"%d %d
\t
"
,
mod_dmrs
[((
i
<<
3
)
+
j
)
<<
1
],
mod_dmrs
[(((
i
<<
3
)
+
j
)
<<
1
)
+
1
]);
printf
(
"%d %d
\t
"
,
mod_dmrs
[((
i
<<
3
)
+
j
)
<<
1
],
mod_dmrs
[(((
i
<<
3
)
+
j
)
<<
1
)
+
1
]);
...
@@ -334,18 +335,21 @@ dmrs_idx, l, k, k_prime, n, ((int16_t*)txdataF[ap])[(l*frame_parms.ofdm_symbol_s
...
@@ -334,18 +335,21 @@ dmrs_idx, l, k, k_prime, n, ((int16_t*)txdataF[ap])[(l*frame_parms.ofdm_symbol_s
k_prime
&=
1
;
k_prime
&=
1
;
}
}
((
int16_t
*
)
txdataF
[
ap
])[(
l
*
frame_parms
.
ofdm_symbol_size
+
k
)
<<
1
]
=
(
amp
*
tx_layers
[
ap
][
m
<<
1
])
>>
15
;
else
{
((
int16_t
*
)
txdataF
[
ap
])[((
l
*
frame_parms
.
ofdm_symbol_size
+
k
)
<<
1
)
+
1
]
=
(
amp
*
tx_layers
[
ap
][(
m
<<
1
)
+
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
ap
])[(
l
*
frame_parms
.
ofdm_symbol_size
+
k
)
<<
1
]
=
(
amp
*
tx_layers
[
ap
][
m
<<
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
ap
])[((
l
*
frame_parms
.
ofdm_symbol_size
+
k
)
<<
1
)
+
1
]
=
(
amp
*
tx_layers
[
ap
][(
m
<<
1
)
+
1
])
>>
15
;
#ifdef DEBUG_DLSCH_MAPPING
#ifdef DEBUG_DLSCH_MAPPING
printf
(
"m %d
\t
l %d
\t
k %d
\t
txdataF: %d %d
\n
"
,
printf
(
"m %d
\t
l %d
\t
k %d
\t
txdataF: %d %d
\n
"
,
m
,
l
,
k
,
((
int16_t
*
)
txdataF
[
ap
])[(
l
*
frame_parms
.
ofdm_symbol_size
+
k
)
<<
1
],
((
int16_t
*
)
txdataF
[
ap
])[((
l
*
frame_parms
.
ofdm_symbol_size
+
k
)
<<
1
)
+
1
]);
m
,
l
,
k
,
((
int16_t
*
)
txdataF
[
ap
])[(
l
*
frame_parms
.
ofdm_symbol_size
+
k
)
<<
1
],
((
int16_t
*
)
txdataF
[
ap
])[((
l
*
frame_parms
.
ofdm_symbol_size
+
k
)
<<
1
)
+
1
]);
#endif
#endif
m
++
;
m
++
;
}
}
}
}
}
#ifdef DEBUG_FILE_OUTPUT
#ifdef DEBUG_FILE_OUTPUT
write_output
(
"txdataF_dlsch.m"
,
"txdataF_dlsch"
,
&
txdataF
[
0
][
28
*
frame_parms
.
ofdm_symbol_size
],
frame_parms
.
samples_per_subframe_wCP
>>
1
,
1
,
1
);
write_output
(
"txdataF_dlsch.m"
,
"txdataF_dlsch"
,
txdataF
[
0
],
frame_parms
.
samples_per_subframe_wCP
>>
1
,
1
,
1
);
#endif
#endif
return
0
;
return
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