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
588a01d5
Commit
588a01d5
authored
Oct 31, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DMRS idx fix
parent
f18e6e42
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
9 deletions
+19
-9
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+15
-5
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+4
-4
No files found.
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
588a01d5
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
//#define DEBUG_DLSCH
//#define DEBUG_DLSCH
//#define DEBUG_DLSCH_MAPPING
//#define DEBUG_DLSCH_MAPPING
#define DEBUG_FILE_OUTPUT
//
#define DEBUG_FILE_OUTPUT
uint8_t
mod_order
[
5
]
=
{
1
,
2
,
4
,
6
,
8
};
uint8_t
mod_order
[
5
]
=
{
1
,
2
,
4
,
6
,
8
};
uint16_t
mod_offset
[
5
]
=
{
1
,
3
,
7
,
23
,
87
};
uint16_t
mod_offset
[
5
]
=
{
1
,
3
,
7
,
23
,
87
};
...
@@ -183,6 +183,11 @@ void nr_pdsch_layer_mapping(int16_t **mod_symbs,
...
@@ -183,6 +183,11 @@ void nr_pdsch_layer_mapping(int16_t **mod_symbs,
}
}
}
}
static
inline
uint16_t
get_pdsch_dmrs_idx
(
uint8_t
n
,
uint8_t
k_prime
,
uint8_t
delta
,
uint8_t
dmrs_type
)
{
uint16_t
dmrs_idx
=
(
dmrs_type
)
?
(
6
*
n
+
k_prime
+
delta
)
:
((
n
<<
2
)
+
(
k_prime
<<
1
)
+
delta
);
return
dmrs_idx
;
}
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
,
uint32_t
**
pdsch_dmrs
,
uint32_t
**
pdsch_dmrs
,
...
@@ -304,6 +309,10 @@ for (int i=0; i<n_dmrs>>3; i++) {
...
@@ -304,6 +309,10 @@ for (int i=0; i<n_dmrs>>3; i++) {
((
pdcch_params
.
search_space_type
==
NFAPI_NR_SEARCH_SPACE_TYPE_COMMON
)
&&
(
pdcch_params
.
dci_format
==
NFAPI_NR_DL_DCI_FORMAT_1_0
))
?
\
((
pdcch_params
.
search_space_type
==
NFAPI_NR_SEARCH_SPACE_TYPE_COMMON
)
&&
(
pdcch_params
.
dci_format
==
NFAPI_NR_DL_DCI_FORMAT_1_0
))
?
\
((
frame_parms
.
ssb_start_subcarrier
/
NR_NB_SC_PER_RB
+
pdcch_params
.
rb_offset
)
*
NR_NB_SC_PER_RB
)
:
0
;
((
frame_parms
.
ssb_start_subcarrier
/
NR_NB_SC_PER_RB
+
pdcch_params
.
rb_offset
)
*
NR_NB_SC_PER_RB
)
:
0
;
#ifdef DEBUG_DLSCH_MAPPING
printf
(
"PDSCH resource mapping started (start SC %d
\t
start symbol %d
\t
N_PRB %d
\t
nb_symbols %d)
\n
"
,
start_sc
,
rel15
->
start_symbol
,
rel15
->
n_prb
,
rel15
->
nb_symbols
);
#endif
for
(
int
ap
=
0
;
ap
<
rel15
->
nb_layers
;
ap
++
)
{
for
(
int
ap
=
0
;
ap
<
rel15
->
nb_layers
;
ap
++
)
{
// DMRS params for this ap
// DMRS params for this ap
...
@@ -311,8 +320,9 @@ for (int i=0; i<n_dmrs>>3; i++) {
...
@@ -311,8 +320,9 @@ for (int i=0; i<n_dmrs>>3; i++) {
get_Wf
(
Wf
,
ap
,
dmrs_type
);
get_Wf
(
Wf
,
ap
,
dmrs_type
);
delta
=
get_delta
(
ap
,
dmrs_type
);
delta
=
get_delta
(
ap
,
dmrs_type
);
l_prime
[
0
]
=
0
;
// single symbol ap 0
l_prime
[
0
]
=
0
;
// single symbol ap 0
uint8_t
dmrs_symbol
=
l0
+
l_prime
[
0
];
#ifdef DEBUG_DLSCH_MAPPING
#ifdef DEBUG_DLSCH_MAPPING
printf
(
"DMRS params for ap %d: Wt %d %d
\t
Wf %d %d
\t
delta %d
\t
l_prime %d
\t
l0 %d
\
n
"
,
ap
,
Wt
[
0
],
Wt
[
1
],
Wf
[
0
],
Wf
[
1
],
delta
,
l_prime
[
0
],
l0
);
printf
(
"DMRS params for ap %d: Wt %d %d
\t
Wf %d %d
\t
delta %d
\t
l_prime %d
\t
l0 %d
\
t
DMRS symbol %d
\n
"
,
ap
,
Wt
[
0
],
Wt
[
1
],
Wf
[
0
],
Wf
[
1
],
delta
,
l_prime
[
0
],
l0
,
dmrs_symbol
);
#endif
#endif
uint8_t
k_prime
=
0
,
n
=
0
,
dmrs_idx
=
0
;
uint8_t
k_prime
=
0
,
n
=
0
,
dmrs_idx
=
0
;
uint16_t
m
=
0
;
uint16_t
m
=
0
;
...
@@ -322,9 +332,9 @@ printf("DMRS params for ap %d: Wt %d %d \t Wf %d %d \t delta %d \t l_prime %d \t
...
@@ -322,9 +332,9 @@ printf("DMRS params for ap %d: Wt %d %d \t Wf %d %d \t delta %d \t l_prime %d \t
if
(
k
>=
frame_parms
.
ofdm_symbol_size
)
if
(
k
>=
frame_parms
.
ofdm_symbol_size
)
k
-=
frame_parms
.
ofdm_symbol_size
;
k
-=
frame_parms
.
ofdm_symbol_size
;
if
((
l
==
(
l0
+
l_prime
[
0
]))
&&
(
k
==
((
dmrs_type
)
?
(
6
*
n
+
k_prime
+
delta
)
:
((
n
<<
2
)
+
(
k_prime
<<
1
)
+
delta
))))
{
if
((
l
==
dmrs_symbol
)
&&
(
k
==
(
start_sc
+
get_pdsch_dmrs_idx
(
n
,
k_prime
,
delta
,
dmrs_type
))))
{
((
int16_t
*
)
txdataF
[
ap
])[(
l
*
frame_parms
.
ofdm_symbol_size
+
k
)
<<
1
]
=
(
Wt
[
l_prime
[
0
]]
*
Wf
[
k_prime
]
*
(
amp
>>
1
)
*
mod_dmrs
[
dmrs_idx
<<
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
ap
])[(
l
*
frame_parms
.
ofdm_symbol_size
+
k
)
<<
1
]
=
(
Wt
[
l_prime
[
0
]]
*
Wf
[
k_prime
]
*
amp
*
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
>>
1
)
*
mod_dmrs
[(
dmrs_idx
<<
1
)
+
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
ap
])[((
l
*
frame_parms
.
ofdm_symbol_size
+
k
)
<<
1
)
+
1
]
=
(
Wt
[
l_prime
[
0
]]
*
Wf
[
k_prime
]
*
amp
*
mod_dmrs
[(
dmrs_idx
<<
1
)
+
1
])
>>
15
;
#ifdef DEBUG_DLSCH_MAPPING
#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
"
,
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
]);
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
]);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
588a01d5
...
@@ -75,13 +75,13 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
...
@@ -75,13 +75,13 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
nfapi_nr_dl_config_dlsch_pdu_rel15_t
*
dlsch_pdu_rel15
=
&
dl_config_dlsch_pdu
->
dlsch_pdu
.
dlsch_pdu_rel15
;
nfapi_nr_dl_config_dlsch_pdu_rel15_t
*
dlsch_pdu_rel15
=
&
dl_config_dlsch_pdu
->
dlsch_pdu
.
dlsch_pdu_rel15
;
dlsch_pdu_rel15
->
start_prb
=
0
;
dlsch_pdu_rel15
->
start_prb
=
0
;
dlsch_pdu_rel15
->
n_prb
=
106
;
dlsch_pdu_rel15
->
n_prb
=
50
;
dlsch_pdu_rel15
->
start_symbol
=
2
;
dlsch_pdu_rel15
->
start_symbol
=
2
;
dlsch_pdu_rel15
->
nb_symbols
=
8
;
dlsch_pdu_rel15
->
nb_symbols
=
4
;
dlsch_pdu_rel15
->
rnti
=
rnti
;
dlsch_pdu_rel15
->
rnti
=
rnti
;
dlsch_pdu_rel15
->
nb_layers
=
1
;
dlsch_pdu_rel15
->
nb_layers
=
1
;
dlsch_pdu_rel15
->
nb_codewords
=
1
;
dlsch_pdu_rel15
->
nb_codewords
=
1
;
dlsch_pdu_rel15
->
mcs_idx
=
26
;
dlsch_pdu_rel15
->
mcs_idx
=
9
;
dlsch_pdu_rel15
->
ndi
=
1
;
dlsch_pdu_rel15
->
ndi
=
1
;
dlsch_pdu_rel15
->
redundancy_version
=
0
;
dlsch_pdu_rel15
->
redundancy_version
=
0
;
...
@@ -94,7 +94,7 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
...
@@ -94,7 +94,7 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
pdu_rel15
->
frequency_domain_assignment
=
get_RIV
(
dlsch_pdu_rel15
->
start_prb
,
dlsch_pdu_rel15
->
n_prb
,
cfg
->
rf_config
.
dl_carrier_bandwidth
.
value
);
pdu_rel15
->
frequency_domain_assignment
=
get_RIV
(
dlsch_pdu_rel15
->
start_prb
,
dlsch_pdu_rel15
->
n_prb
,
cfg
->
rf_config
.
dl_carrier_bandwidth
.
value
);
pdu_rel15
->
time_domain_assignment
=
get_SLIV
(
dlsch_pdu_rel15
->
start_symbol
,
dlsch_pdu_rel15
->
nb_symbols
);
pdu_rel15
->
time_domain_assignment
=
get_SLIV
(
dlsch_pdu_rel15
->
start_symbol
,
dlsch_pdu_rel15
->
nb_symbols
);
pdu_rel15
->
vrb_to_prb_mapping
=
1
;
pdu_rel15
->
vrb_to_prb_mapping
=
1
;
pdu_rel15
->
mcs
=
26
;
pdu_rel15
->
mcs
=
9
;
pdu_rel15
->
tb_scaling
=
1
;
pdu_rel15
->
tb_scaling
=
1
;
pdu_rel15
->
ra_preamble_index
=
25
;
pdu_rel15
->
ra_preamble_index
=
25
;
...
...
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