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
3a072ba3
Commit
3a072ba3
authored
6 years ago
by
Guy De Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Number of mod symbols addition in fapi
parent
065b24e5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
17 deletions
+22
-17
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h
+2
-1
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+14
-13
openair1/PHY/NR_TRANSPORT/nr_tbs_tools.c
openair1/PHY/NR_TRANSPORT/nr_tbs_tools.c
+4
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+2
-2
No files found.
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h
View file @
3a072ba3
...
...
@@ -508,7 +508,7 @@ typedef struct{
typedef
struct
{
nfapi_tl_t
tl
;
uint
8
_t
rnti
;
uint
16
_t
rnti
;
uint8_t
rnti_type
;
uint8_t
dci_format
;
uint8_t
config_type
;
...
...
@@ -550,6 +550,7 @@ typedef struct {
uint16_t
length
;
uint8_t
pdu_index
;
uint16_t
rnti
;
uint16_t
nb_mod_symbols
;
uint8_t
time_allocation_type
;
uint8_t
freq_allocation_type
;
uint8_t
start_prb
;
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
3a072ba3
...
...
@@ -197,10 +197,11 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t dlsch,
uint32_t
scrambled_output
[
NR_MAX_NB_CODEWORDS
][
NR_MAX_PDSCH_ENCODED_LENGTH
>>
5
];
int16_t
**
mod_symbs
=
(
int16_t
**
)
dlsch
.
mod_symbs
;
int16_t
**
tx_layers
=
(
int16_t
**
)
dlsch
.
txdataF
;
uint16_t
n_symbs
;
int8_t
Wf
[
2
],
Wt
[
2
],
l0
,
l_prime
,
delta
;
int8_t
Wf
[
2
],
Wt
[
2
],
l0
,
l_prime
[
2
],
delta
;
uint16_t
TBS
=
rel15
->
transport_block_size
;
uint16_t
nb_symbols
=
rel15
->
nb_mod_symbols
;
uint8_t
Qm
=
rel15
->
modulation_order
;
uint16_t
encoded_length
=
nb_symbols
*
Qm
;
/// CRC, coding, interleaving and rate matching
nr_dlsch_encoding
(
harq
->
pdu
,
subframe
,
&
dlsch
,
&
frame_parms
);
...
...
@@ -212,7 +213,7 @@ for (int i=0; i<MAX_NR_DLSCH_PAYLOAD_BYTES>>4; i++) {
printf
(
"
\n
"
);
}
printf
(
"
\n
Encoded payload:
\n
"
);
for
(
int
i
=
0
;
i
<
TBS
>>
4
;
i
++
)
{
for
(
int
i
=
0
;
i
<
encoded_length
>>
4
;
i
++
)
{
for
(
int
j
=
0
;
j
<
16
;
j
++
)
printf
(
"0x%02x
\t
"
,
harq
->
f
[(
i
<<
4
)
+
j
]);
printf
(
"
\n
"
);
...
...
@@ -226,14 +227,14 @@ for (int i=0; i<TBS>>4; i++) {
pdcch_params
.
scrambling_id
:
config
.
sch_config
.
physical_cell_id
.
value
;
for
(
int
q
=
0
;
q
<
rel15
->
nb_codewords
;
q
++
)
nr_pdsch_codeword_scrambling
(
harq
->
f
,
TBS
,
encoded_length
,
q
,
Nid
,
n_RNTI
,
scrambled_output
[
q
]);
#ifdef DEBUG_DLSCH
printf
(
"PDSCH scrambling:
\n
"
);
for
(
int
i
=
0
;
i
<
TBS
>>
7
;
i
++
)
{
for
(
int
i
=
0
;
i
<
encoded_length
>>
7
;
i
++
)
{
for
(
int
j
=
0
;
j
<
8
;
j
++
)
printf
(
"0x%08x
\t
"
,
scrambled_output
[
0
][(
i
<<
3
)
+
j
]);
printf
(
"
\n
"
);
...
...
@@ -241,15 +242,14 @@ for (int i=0; i<TBS>>7; i++) {
#endif
/// Modulation
n_symbs
=
TBS
/
Qm
;
for
(
int
q
=
0
;
q
<
rel15
->
nb_codewords
;
q
++
)
nr_pdsch_codeword_modulation
(
scrambled_output
[
q
],
Qm
,
TBS
,
encoded_length
,
mod_symbs
[
q
]);
#ifdef DEBUG_DLSCH
printf
(
"PDSCH Modulation: Qm %d(%d)
\n
"
,
Qm
,
n_symbs
);
for
(
int
i
=
0
;
i
<
n
_symb
s
>>
3
;
i
++
)
{
for
(
int
i
=
0
;
i
<
n
b_symbol
s
>>
3
;
i
++
)
{
for
(
int
j
=
0
;
j
<
8
;
j
++
)
{
printf
(
"%d %d
\t
"
,
mod_symbs
[
0
][((
i
<<
3
)
+
j
)
<<
1
],
mod_symbs
[
0
][(((
i
<<
3
)
+
j
)
<<
1
)
+
1
]);
}
...
...
@@ -261,12 +261,12 @@ for (int i=0; i<n_symbs>>3; i++) {
/// Layer mapping
nr_pdsch_layer_mapping
(
mod_symbs
,
rel15
->
nb_layers
,
n
_symb
s
,
n
b_symbol
s
,
tx_layers
);
#ifdef DEBUG_DLSCH
printf
(
"Layer mapping (%d layers):
\n
"
,
rel15
->
nb_layers
);
for
(
int
l
=
0
;
l
<
rel15
->
nb_layers
;
l
++
)
for
(
int
i
=
0
;
i
<
n_symbs
>>
3
;
i
++
)
{
for
(
int
i
=
0
;
i
<
(
nb_symbs
/
rel15
->
nb_layers
)
>>
3
;
i
++
)
{
for
(
int
j
=
0
;
j
<
8
;
j
++
)
{
printf
(
"%d %d
\t
"
,
tx_layers
[
l
][((
i
<<
3
)
+
j
)
<<
1
],
tx_layers
[
l
][(((
i
<<
3
)
+
j
)
<<
1
)
+
1
]);
}
...
...
@@ -308,6 +308,7 @@ for (int i=0; i<n_dmrs>>3; i++) {
get_Wt
(
Wt
,
ap
,
dmrs_type
);
get_Wf
(
Wf
,
ap
,
dmrs_type
);
delta
=
get_delta
(
ap
,
dmrs_type
);
l_prime
[
0
]
=
0
;
// single symbol ap 0
#ifdef DEBUG_DLSCH_MAPPING
printf
(
"DMRS params for ap %d: Wt %d %d
\t
Wf %d %d
\n
"
,
ap
,
Wt
[
0
],
Wt
[
1
],
Wf
[
0
],
Wf
[
1
]);
#endif
...
...
@@ -319,9 +320,9 @@ printf("DMRS params for ap %d: Wt %d %d \t Wf %d %d\n", ap, Wt[0], Wt[1], Wf[0],
if
(
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
))))
{
((
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
/
2
*
mod_dmrs
[(
dmrs_idx
<<
1
)
+
1
])
>>
15
;
if
((
l
==
(
l0
+
l_prime
[
0
])
)
&&
(
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
[
l_prime
[
0
]
]
*
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
[
l_prime
[
0
]
]
*
Wf
[
k_prime
]
*
amp
/
2
*
mod_dmrs
[(
dmrs_idx
<<
1
)
+
1
])
>>
15
;
#ifdef DEBUG_DLSCH_MAPPING
printf
(
"dmrs_idx %d
\t
l %d
\t
k %d
\t
k_prime %d
\t
n %d
\t
txdataF: %d %d
\n
"
,
dmrs_idx
,
l
,
k
,
k_prime
,
n
,
((
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
]);
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_TRANSPORT/nr_tbs_tools.c
View file @
3a072ba3
...
...
@@ -107,6 +107,8 @@ void nr_get_tbs(nfapi_nr_dl_config_dlsch_pdu *dlsch_pdu,
nfapi_nr_dl_config_dci_dl_pdu
dci_pdu
,
nfapi_nr_config_request_t
config
)
{
LOG_I
(
MAC
,
"TBS calculation
\n
"
);
nfapi_nr_dl_config_pdcch_parameters_rel15_t
params_rel15
=
dci_pdu
.
pdcch_params_rel15
;
nfapi_nr_dl_config_dlsch_pdu_rel15_t
*
dlsch_rel15
=
&
dlsch_pdu
->
dlsch_pdu_rel15
;
uint8_t
rnti_type
=
params_rel15
.
rnti_type
;
...
...
@@ -125,7 +127,7 @@ void nr_get_tbs(nfapi_nr_dl_config_dlsch_pdu *dlsch_pdu,
uint8_t
table_idx
,
Qm
,
n
,
scale
;
table_idx
=
get_table_idx
(
mcs_table
,
dci_format
,
rnti_type
,
ss_type
);
scale
=
10
+
(((
table_idx
==
2
)
&&
((
Imcs
==
20
)
||
(
Imcs
==
26
)))
?
1
:
0
)
;
scale
=
((
table_idx
==
2
)
&&
((
Imcs
==
20
)
||
(
Imcs
==
26
)))
?
11
:
10
;
N_RE
=
min
(
156
,
N_RE_prime
)
*
dlsch_rel15
->
n_prb
;
R
=
nr_get_code_rate
(
Imcs
,
table_idx
);
...
...
@@ -165,6 +167,7 @@ void nr_get_tbs(nfapi_nr_dl_config_dlsch_pdu *dlsch_pdu,
dlsch_rel15
->
modulation_order
=
Qm
;
dlsch_rel15
->
transport_block_size
=
TBS
;
dlsch_rel15
->
nb_re_dmrs
=
N_PRB_DMRS
;
dlsch_rel15
->
nb_mod_symbols
=
N_RE_prime
*
dlsch_rel15
->
n_prb
*
dlsch_rel15
->
nb_codewords
;
}
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
3a072ba3
...
...
@@ -76,8 +76,8 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
dlsch_pdu_rel15
->
start_prb
=
0
;
dlsch_pdu_rel15
->
n_prb
=
106
;
dlsch_pdu_rel15
->
start_symbol
=
8
;
dlsch_pdu_rel15
->
nb_symbols
=
6
;
dlsch_pdu_rel15
->
start_symbol
=
2
;
dlsch_pdu_rel15
->
nb_symbols
=
8
;
dlsch_pdu_rel15
->
rnti
=
rnti
;
dlsch_pdu_rel15
->
nb_layers
=
1
;
dlsch_pdu_rel15
->
nb_codewords
=
1
;
...
...
This diff is collapsed.
Click to expand it.
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