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
93641258
Commit
93641258
authored
Nov 09, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Freq shift correction/Various cleanups
parent
0e944388
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
49 deletions
+40
-49
openair1/PHY/NR_TRANSPORT/nr_dci.c
openair1/PHY/NR_TRANSPORT/nr_dci.c
+0
-4
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+36
-31
openair1/PHY/NR_TRANSPORT/nr_pbch.c
openair1/PHY/NR_TRANSPORT/nr_pbch.c
+0
-6
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+2
-1
targets/RT/USER/nr-ru.c
targets/RT/USER/nr-ru.c
+2
-7
No files found.
openair1/PHY/NR_TRANSPORT/nr_dci.c
View file @
93641258
...
...
@@ -331,9 +331,5 @@ printf("\n");
}
}
#ifdef DEBUG_DCI
write_output
(
"txdataF_dci.m"
,
"txdataF_dci"
,
txdataF
[
0
],
frame_parms
.
samples_per_frame_wCP
>>
1
,
1
,
1
);
#endif
return
0
;
}
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
93641258
...
...
@@ -19,13 +19,13 @@
* contact@openairinterface.org
*/
/*! \file PHY/
LTE
_TRANSPORT/dlsch_decoding.c
* \brief Top-level routines for
decoding Turbo-coded (DLSCH) transport channels from 36-212, V8.6 2009-03
* \author
R. Knopp
* \date 201
1
/*! \file PHY/
NR
_TRANSPORT/dlsch_decoding.c
* \brief Top-level routines for
transmission of the PDSCH 38211 v 15.2.0
* \author
Guy De Souza
* \date 201
8
* \version 0.1
* \company Eurecom
* \email:
knopp
@eurecom.fr
* \email:
desouza
@eurecom.fr
* \note
* \warning
*/
...
...
@@ -36,7 +36,6 @@
//#define DEBUG_DLSCH
//#define DEBUG_DLSCH_MAPPING
//#define DEBUG_FILE_OUTPUT
uint8_t
mod_order
[
5
]
=
{
1
,
2
,
4
,
6
,
8
};
uint16_t
mod_offset
[
5
]
=
{
1
,
3
,
7
,
23
,
87
};
...
...
@@ -290,7 +289,7 @@ for (int l=0; l<rel15->nb_layers; l++)
uint8_t
dmrs_type
=
config
.
pdsch_config
.
dmrs_type
.
value
;
l0
=
get_l0
(
dmrs_type
,
2
);
//config.pdsch_config.dmrs_typeA_position.value);
nr_modulation
(
pdsch_dmrs
[
l0
][
0
],
n_dmrs
,
MOD_QPSK
,
mod_dmrs
);
// currently only codeword 0 is modulated
//
#ifdef DEBUG_DLSCH
#ifdef DEBUG_DLSCH
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
j
=
0
;
j
<
8
;
j
++
)
{
...
...
@@ -298,19 +297,23 @@ for (int i=0; i<n_dmrs>>3; i++) {
}
printf
(
"
\n
"
);
}
//
#endif
#endif
/// Resource mapping
AssertFatal
(
rel15
->
nb_layers
<=
config
.
rf_config
.
tx_antenna_ports
.
value
,
"Not enough Tx antennas (%d) for %d layers
\n
"
,
\
config
.
rf_config
.
tx_antenna_ports
.
value
,
rel15
->
nb_layers
);
// Non interleaved VRB to PRB mapping
uint8_t
start_sc
=
frame_parms
.
first_carrier_offset
+
rel15
->
start_prb
*
NR_NB_SC_PER_RB
+
\
((
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
;
uint16_t
start_sc
=
frame_parms
.
first_carrier_offset
+
frame_parms
.
ssb_start_subcarrier
;
if
(
start_sc
>=
frame_parms
.
ofdm_symbol_size
)
start_sc
-=
frame_parms
.
ofdm_symbol_size
;
/*rel15->start_prb*NR_NB_SC_PER_RB +*/
//((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;
#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
);
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
++
)
{
...
...
@@ -322,22 +325,24 @@ printf("PDSCH resource mapping started (start SC %d\tstart symbol %d\tN_PRB %d\t
l_prime
[
0
]
=
0
;
// single symbol ap 0
uint8_t
dmrs_symbol
=
l0
+
l_prime
[
0
];
#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
\t
DMRS symbol %d
\n
"
,
ap
,
Wt
[
0
],
Wt
[
1
],
Wf
[
0
],
Wf
[
1
],
delta
,
l_prime
[
0
],
l0
,
dmrs_symbol
);
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
uint8_t
k_prime
=
0
;
uint16_t
m
=
0
,
n
=
0
,
dmrs_idx
=
0
;
;
for
(
int
l
=
rel15
->
start_symbol
;
l
<
rel15
->
start_symbol
+
rel15
->
nb_symbols
;
l
++
)
for
(
int
k
=
start_sc
;
k
<
rel15
->
n_prb
*
NR_NB_SC_PER_RB
;
k
++
)
{
if
(
k
>=
frame_parms
.
ofdm_symbol_size
)
k
-=
frame_parms
.
ofdm_symbol_size
;
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
*
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
*
mod_dmrs
[(
dmrs_idx
<<
1
)
+
1
])
>>
15
;
uint16_t
m
=
0
,
n
=
0
,
dmrs_idx
=
0
,
k
=
0
;
for
(
int
l
=
rel15
->
start_symbol
;
l
<
rel15
->
start_symbol
+
rel15
->
nb_symbols
;
l
++
)
{
k
=
start_sc
;
for
(
int
i
=
0
;
i
<
rel15
->
n_prb
*
NR_NB_SC_PER_RB
;
i
++
)
{
// Note the dmrs index modulo 2048 only works for that symbol size -- to be fixed soon
// Also the different amplitudes are for debug purposes and temporary
if
((
l
==
dmrs_symbol
)
&&
(
k
==
(
(
start_sc
+
get_pdsch_dmrs_idx
(
n
,
k_prime
,
delta
,
dmrs_type
))
&
((
1
<<
11
)
-
1
))))
{
((
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
)
+
1
]
=
(
Wt
[
l_prime
[
0
]]
*
Wf
[
k_prime
]
*
(
amp
>>
1
)
*
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
]);
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
]);
#endif
dmrs_idx
++
;
k_prime
++
;
...
...
@@ -347,20 +352,20 @@ dmrs_idx, l, k, k_prime, n, ((int16_t*)txdataF[ap])[(l*frame_parms.ofdm_symbol_s
else
{
((
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
;
((
int16_t
*
)
txdataF
[
ap
])[(
l
*
frame_parms
.
ofdm_symbol_size
+
k
)
<<
1
]
=
(
(
amp
<<
1
)
*
tx_layers
[
ap
][
m
<<
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
ap
])[((
l
*
frame_parms
.
ofdm_symbol_size
+
k
)
<<
1
)
+
1
]
=
(
(
amp
<<
1
)
*
tx_layers
[
ap
][(
m
<<
1
)
+
1
])
>>
15
;
#ifdef DEBUG_DLSCH_MAPPING
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
m
++
;
}
if
(
++
k
>=
frame_parms
.
ofdm_symbol_size
)
k
-=
frame_parms
.
ofdm_symbol_size
;
}
}
}
#ifdef DEBUG_FILE_OUTPUT
write_output
(
"txdataF_dlsch.m"
,
"txdataF_dlsch"
,
txdataF
[
0
],
frame_parms
.
samples_per_subframe_wCP
>>
1
,
1
,
1
);
#endif
return
0
;
}
openair1/PHY/NR_TRANSPORT/nr_pbch.c
View file @
93641258
...
...
@@ -432,11 +432,5 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
}
#ifdef DEBUG_PBCH
write_output
(
"txdataF_pbch.m"
,
"txdataF_pbch"
,
txdataF
[
0
],
frame_parms
->
samples_per_frame_wCP
>>
1
,
1
,
1
);
#endif
return
0
;
}
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
93641258
...
...
@@ -142,8 +142,9 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
dlsch_pdu_rel15
->
n_prb
,
dlsch_pdu_rel15
->
start_symbol
,
dlsch_pdu_rel15
->
nb_symbols
,
dlsch_pdu_rel15
->
nb_layers
,
dlsch_pdu_rel15
->
nb_codewords
,
dlsch_pdu_rel15
->
nb_layers
);
dlsch_pdu_rel15
->
mcs_idx
);
dl_req
->
number_dci
++
;
dl_req
->
number_pdsch_rnti
++
;
...
...
targets/RT/USER/nr-ru.c
View file @
93641258
...
...
@@ -819,7 +819,7 @@ void tx_rf(RU_t *ru) {
if
((
SF_type
==
SF_DL
)
||
(
SF_type
==
SF_S
))
{
int
siglen
=
fp
->
samples_per_subframe
,
flags
=
1
;
/*
if (SF_type == SF_S) {
...
...
@@ -844,12 +844,7 @@ void tx_rf(RU_t *ru) {
for
(
i
=
0
;
i
<
ru
->
nb_tx
;
i
++
)
txp
[
i
]
=
(
void
*
)
&
ru
->
common
.
txdata
[
i
][(
proc
->
subframe_tx
*
fp
->
samples_per_subframe
)
-
sf_extension
];
/*
if (proc->subframe_tx == 0){
write_output("txdataF_frame.m","txdataF_frame",&ru->common.txdataF_BF[i],fp->samples_per_subframe_wCP, 1, 1);
write_output("txdata_frame.m","txdata_frame",&ru->common.txdata[i],fp->samples_per_subframe, 1, 1);
}
*/
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST
,
(
proc
->
timestamp_tx
-
ru
->
openair0_cfg
.
tx_sample_advance
)
&
0xffffffff
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE
,
1
);
// prepare tx buffer pointers
...
...
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