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
15417570
Commit
15417570
authored
Apr 23, 2019
by
Ahmed Hussein
Committed by
Thomas Schlichter
Jun 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restructuring ulsim and introducing more functionalities in RX at gNB
parent
749bb669
Changes
15
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
335 additions
and
359 deletions
+335
-359
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h
+0
-1
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+7
-3
openair1/PHY/MODULATION/nr_modulation.h
openair1/PHY/MODULATION/nr_modulation.h
+17
-0
openair1/PHY/MODULATION/slot_fep_nr.c
openair1/PHY/MODULATION/slot_fep_nr.c
+71
-1
openair1/PHY/NR_TRANSPORT/nr_sch_dmrs.h
openair1/PHY/NR_TRANSPORT/nr_sch_dmrs.h
+1
-1
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
+16
-18
openair1/PHY/NR_TRANSPORT/nr_ulsch.h
openair1/PHY/NR_TRANSPORT/nr_ulsch.h
+7
-3
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+3
-4
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
+69
-21
openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c
+14
-14
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+2
-0
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+67
-1
openair1/SCHED_NR/sched_nr.h
openair1/SCHED_NR/sched_nr.h
+3
-1
openair1/SIMULATION/NR_PHY/ulschsim.c
openair1/SIMULATION/NR_PHY/ulschsim.c
+1
-1
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+57
-290
No files found.
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h
View file @
15417570
...
...
@@ -694,7 +694,6 @@ typedef struct {
uint8_t
Qm
;
uint8_t
ndi
;
uint8_t
rv
;
uint8_t
harq_process_nbr
;
int8_t
accumulated_delta_PUSCH
;
int8_t
absolute_delta_PUSCH
;
uint8_t
n_layers
;
...
...
openair1/PHY/INIT/nr_init.c
View file @
15417570
...
...
@@ -452,10 +452,14 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
gNB->dlsch[i][j]->rnti=0;
LOG_D(PHY,"dlsch[%d][%d] => %p rnti:%d\n",i,j,gNB->dlsch[i][j], gNB->dlsch[i][j]->rnti);
}*/
}
}
for
(
i
=
0
;
i
<
NUMBER_OF_NR_UE_MAX
;
i
++
)
{
///////////////////////// Initializing gNB ULSCH /////////////////////////
LOG_I
(
PHY
,
"Allocating Transport Channel Buffer for ULSCH, UE %d
\n
"
,
i
);
for
(
j
=
0
;
j
<
2
;
j
++
)
{
// ULSCH for RA
if
(
i
==
0
)
{
gNB
->
ulsch
[
i
][
j
]
=
new_gNB_ulsch
(
5
,
fp
->
N_RB_UL
,
0
);
...
...
@@ -487,7 +491,7 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
LOG_D
(
PHY
,
"gNB %d.%d : RA %p
\n
"
,
gNB
->
Mod_id
,
gNB
->
CC_id
,
gNB
->
dlsch_ra
);
gNB
->
rx_total_gain_dB
=
130
;
for
(
i
=
0
;
i
<
NUMBER_OF_UE_MAX
;
i
++
)
for
(
i
=
0
;
i
<
NUMBER_OF_
NR_
UE_MAX
;
i
++
)
gNB
->
mu_mimo_mode
[
i
].
dl_pow_off
=
2
;
gNB
->
check_for_total_transmissions
=
0
;
...
...
openair1/PHY/MODULATION/nr_modulation.h
View file @
15417570
...
...
@@ -24,6 +24,7 @@
#include <stdint.h>
#include "PHY/defs_nr_common.h"
#include "PHY/defs_gNB.h"
#define DMRS_MOD_ORDER 2
...
...
@@ -51,4 +52,20 @@ void nr_layer_mapping(int16_t **mod_symbs,
uint16_t
n_symbs
,
int16_t
**
tx_layers
);
/*!
\brief This function implements the OFDM front end processor on reception (FEP)
\param phy_vars_ue Pointer to PHY variables
\param symbol symbol within slot (0..12/14)
\param Ns Slot number (0..19)
\param sample_offset offset within rxdata (points to beginning of subframe)
\param no_prefix if 1 prefix is removed by HW
*/
int
nr_slot_fep_ul
(
PHY_VARS_gNB
*
phy_vars_gNB
,
unsigned
char
symbol
,
unsigned
char
Ns
,
int
sample_offset
,
int
no_prefix
);
#endif
\ No newline at end of file
openair1/PHY/MODULATION/slot_fep_nr.c
View file @
15417570
...
...
@@ -19,9 +19,10 @@
* contact@openairinterface.org
*/
#include "PHY/defs_UE.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_gNB.h"
#include "modulation_UE.h"
#include "nr_modulation.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/NR_UE_ESTIMATION/nr_estimation.h"
...
...
@@ -198,3 +199,72 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
return
(
0
);
}
int
nr_slot_fep_ul
(
PHY_VARS_gNB
*
gNB
,
unsigned
char
symbol
,
unsigned
char
Ns
,
int
sample_offset
,
int
no_prefix
)
{
unsigned
char
aa
;
uint32_t
slot_offset
;
uint32_t
rxdata_offset
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
gNB
->
frame_parms
;
unsigned
int
nb_prefix_samples
=
(
no_prefix
?
0
:
frame_parms
->
nb_prefix_samples
);
unsigned
int
nb_prefix_samples0
=
(
no_prefix
?
0
:
frame_parms
->
nb_prefix_samples0
);
void
(
*
dft
)(
int16_t
*
,
int16_t
*
,
int
);
switch
(
frame_parms
->
ofdm_symbol_size
)
{
case
128
:
dft
=
dft128
;
break
;
case
256
:
dft
=
dft256
;
break
;
case
512
:
dft
=
dft512
;
break
;
case
1024
:
dft
=
dft1024
;
break
;
case
1536
:
dft
=
dft1536
;
break
;
case
2048
:
dft
=
dft2048
;
break
;
case
4096
:
dft
=
dft4096
;
break
;
case
8192
:
dft
=
dft8192
;
break
;
default:
dft
=
dft512
;
break
;
}
slot_offset
=
Ns
*
frame_parms
->
samples_per_slot
;
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
if
(
symbol
==
0
)
rxdata_offset
=
slot_offset
+
nb_prefix_samples0
-
SOFFSET
;
else
rxdata_offset
=
slot_offset
+
nb_prefix_samples0
+
(
symbol
*
(
frame_parms
->
ofdm_symbol_size
+
nb_prefix_samples
))
-
SOFFSET
;
dft
((
int16_t
*
)
&
gNB
->
common_vars
.
rxdata
[
0
][
rxdata_offset
],
(
int16_t
*
)
&
gNB
->
common_vars
.
rxdataF
[
0
][
symbol
*
frame_parms
->
ofdm_symbol_size
],
1
);
}
return
(
0
);
}
openair1/PHY/NR_TRANSPORT/nr_sch_dmrs.h
View file @
15417570
...
...
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file PHY/NR_TRANSPORT/nr_sch_dmrs.
c
/*! \file PHY/NR_TRANSPORT/nr_sch_dmrs.
h
* \brief
* \author
* \date
...
...
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
View file @
15417570
...
...
@@ -32,7 +32,6 @@
#include "PHY/defs_nr_common.h"
/** \brief This function is the top-level entry point to PUSCH demodulation, after frequency-domain transformation and channel estimation. It performs
- RB extraction (signal and channel estimates)
- channel compensation (matched filtering)
...
...
@@ -45,14 +44,13 @@
@param frame Frame number
@param nr_tti_rx TTI number
@param symbol Symbol on which to act (within-in nr_TTI_rx)
@param
first_symbol_flag set to 1 on first ULSCH symbol
@param
harq_pid HARQ process ID
*/
int
nr_rx_ul
sch
(
PHY_VARS_gNB
*
gNB
,
void
nr_rx_pu
sch
(
PHY_VARS_gNB
*
gNB
,
uint8_t
UE_id
,
uint32_t
frame
,
uint8_t
nr_tti_rx
,
unsigned
char
symbol
,
unsigned
char
first_symbol_flag
,
unsigned
char
harq_pid
);
...
...
@@ -62,17 +60,17 @@ int nr_rx_ulsch(PHY_VARS_gNB *gNB,
@param rb_alloc RB allocation map (used for Resource Allocation Type 0 in NR)
@param symbol Symbol on which to act (within-in nr_TTI_rx)
@param start_rb The starting RB in the RB allocation (used for Resource Allocation Type 1 in NR)
@param nb_
pusch_rb
The number of RBs allocated (used for Resource Allocation Type 1 in NR)
@param nb_
rb_pusch
The number of RBs allocated (used for Resource Allocation Type 1 in NR)
@param frame_parms, Pointer to frame descriptor structure
*/
unsigned
short
nr_ulsch_extract_rbs_single
(
int
**
rxdataF
,
void
nr_ulsch_extract_rbs_single
(
int
**
rxdataF
,
int
**
rxdataF_ext
,
uint32_t
rxdataF_ext_offset
,
// unsigned int *rb_alloc, [hna] Resource Allocation Type 1 is assumed only for the moment
unsigned
char
symbol
,
unsigned
short
start_rb
,
unsigned
short
nb_pusch_rb
,
unsigned
short
nb_rb_pusch
,
NR_DL_FRAME_PARMS
*
frame_parms
);
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch.h
View file @
15417570
...
...
@@ -46,7 +46,6 @@ NR_gNB_ULSCH_t *new_gNB_ulsch(uint8_t max_ldpc_iterations,uint8_t N_RB_UL, uint8
@param nr_tti_rx, current received TTI
@param harq_pid, harq process id
@param is_crnti
@param llr8_flag If 1, indicate that the 8-bit decoder should be used
*/
uint32_t
nr_ulsch_decoding
(
PHY_VARS_gNB
*
phy_vars_gNB
,
...
...
@@ -57,8 +56,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
uint16_t
nb_symb_sch
,
uint8_t
nr_tti_rx
,
uint8_t
harq_pid
,
uint8_t
is_crnti
,
uint8_t
llr8_flag
);
uint8_t
is_crnti
);
/*! \brief Perform PUSCH unscrambling. TS 38.211 V15.4.0 subclause 6.3.1.1
...
...
@@ -75,3 +73,9 @@ void nr_ulsch_unscrambling(int16_t* llr,
uint32_t
Nid
,
uint32_t
n_RNTI
);
void
nr_ulsch_procedures
(
PHY_VARS_gNB
*
gNB
,
gNB_L1_rxtx_proc_t
*
proc
,
int
UE_id
,
uint8_t
harq_pid
);
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
15417570
...
...
@@ -278,13 +278,13 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
uint16_t
nb_symb_sch
,
uint8_t
nr_tti_rx
,
uint8_t
harq_pid
,
uint8_t
is_crnti
,
uint8_t
llr8_flag
)
uint8_t
is_crnti
)
{
uint32_t
A
,
E
;
uint32_t
G
;
uint32_t
ret
,
offset
;
uint32_t
nb_rb
;
int32_t
no_iteration_ldpc
,
length_dec
;
uint32_t
r
,
r_offset
=
0
,
Kr
=
8424
,
Kr_bytes
,
K_bytes_F
,
err_flag
=
0
;
uint8_t
crc_type
;
...
...
@@ -306,7 +306,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
uint8_t
kc
;
uint8_t
Ilbrm
=
0
;
uint32_t
Tbslbrm
=
950984
;
uint16_t
nb_rb
=
30
;
//to update
uint8_t
nb_re_dmrs
=
6
;
uint16_t
length_dmrs
=
1
;
double
Coderate
=
0
.
0
;
...
...
@@ -341,7 +340,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
A
=
harq_process
->
TBS
;
ret
=
ulsch
->
max_ldpc_iterations
;
harq_process
->
G
=
nr_get_G
(
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
,
length_dmrs
,
nfapi_ulsch_pdu_rel15
->
Qm
,
nfapi_ulsch_pdu_rel15
->
n_layers
);
//
harq_process->G = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, length_dmrs, nfapi_ulsch_pdu_rel15->Qm,nfapi_ulsch_pdu_rel15->n_layers);
G
=
harq_process
->
G
;
LOG_I
(
PHY
,
"ULSCH Decoding, harq_pid %d TBS %d G %d mcs %d Nl %d nb_symb_sch %d nb_rb %d
\n
"
,
harq_pid
,
A
,
G
,
nfapi_ulsch_pdu_rel15
->
mcs
,
nfapi_ulsch_pdu_rel15
->
n_layers
,
nb_symb_sch
,
nb_rb
);
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
View file @
15417570
// This should have nr_rx_pdsch, nr_ulsch_extract_rbs_single, and nr_ulsch_compute_llr
#include "PHY/defs_gNB.h"
#include "nr_transport_proto.h"
#include "PHY/impl_defs_top.h"
#include "PHY/NR_TRANSPORT/nr_sch_dmrs.h"
//==============================================================================================
// Extraction functions
//==============================================================================================
unsigned
short
nr_ulsch_extract_rbs_single
(
int
**
rxdataF
,
void
nr_ulsch_extract_rbs_single
(
int
**
rxdataF
,
int
**
rxdataF_ext
,
uint32_t
rxdataF_ext_offset
,
// unsigned int *rb_alloc, [hna] Resource Allocation Type 1 is assumed only for the moment
unsigned
char
symbol
,
unsigned
short
start_rb
,
unsigned
short
nb_rb_pd
sch
,
unsigned
short
nb_rb_pu
sch
,
NR_DL_FRAME_PARMS
*
frame_parms
)
{
unsigned
short
start_re
,
re
;
unsigned
char
aarx
,
is_dmrs_symbol
=
0
;
uint32_t
rxF_ext_index
=
0
,
nb_re_p
d
sch
=
0
;
uint32_t
rxF_ext_index
=
0
,
nb_re_p
u
sch
=
0
;
int16_t
*
rxF
,
*
rxF_ext
;
...
...
@@ -26,14 +24,14 @@ unsigned short nr_ulsch_extract_rbs_single(int **rxdataF,
start_re
=
frame_parms
->
first_carrier_offset
+
(
start_rb
*
NR_NB_SC_PER_RB
);
nb_re_p
dsch
=
NR_NB_SC_PER_RB
*
nb_rb_pd
sch
;
nb_re_p
usch
=
NR_NB_SC_PER_RB
*
nb_rb_pu
sch
;
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][
symbol
*
frame_parms
->
ofdm_symbol_size
];
rxF_ext
=
(
int16_t
*
)
&
rxdataF_ext
[
aarx
][
rxdataF_ext_offset
];
for
(
re
=
0
;
re
<
nb_re_p
d
sch
;
re
++
)
{
for
(
re
=
0
;
re
<
nb_re_p
u
sch
;
re
++
)
{
if
(
(
is_dmrs_symbol
&&
((
re
&
1
)
!=
frame_parms
->
nushift
))
||
(
is_dmrs_symbol
==
0
)
)
{
// [hna] (re&1) != frame_parms->nushift) assuming only dmrs type 1 and mapping type A
...
...
@@ -44,6 +42,56 @@ unsigned short nr_ulsch_extract_rbs_single(int **rxdataF,
}
}
}
}
void
nr_rx_pusch
(
PHY_VARS_gNB
*
gNB
,
uint8_t
UE_id
,
uint32_t
frame
,
uint8_t
nr_tti_rx
,
unsigned
char
symbol
,
unsigned
char
harq_pid
)
{
NR_DL_FRAME_PARMS
*
frame_parms
=
&
gNB
->
frame_parms
;
nfapi_nr_ul_config_ulsch_pdu_rel15_t
*
rel15_ul
=
&
gNB
->
ulsch
[
UE_id
+
1
][
0
]
->
harq_processes
[
harq_pid
]
->
ulsch_pdu
.
ulsch_pdu_rel15
;
uint32_t
nb_re
;
if
(
symbol
==
rel15_ul
->
start_symbol
)
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_ext_offset
=
0
;
if
(
symbol
==
2
)
// [hna] here it is assumed that symbol 2 carries 6 DMRS REs (dmrs-type 1)
nb_re
=
rel15_ul
->
number_rbs
*
6
;
else
nb_re
=
rel15_ul
->
number_rbs
*
12
;
//----------------------------------------------------------
//--------------------- RBs extraction ---------------------
//----------------------------------------------------------
nr_ulsch_extract_rbs_single
(
gNB
->
common_vars
.
rxdataF
,
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_ext
,
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_ext_offset
,
// rb_alloc, [hna] Resource Allocation Type 1 is assumed only for the moment
symbol
,
rel15_ul
->
start_rb
,
nb_re
,
frame_parms
);
//----------------------------------------------------------
//-------------------- LLRs computation --------------------
//----------------------------------------------------------
nr_ulsch_compute_llr
(
&
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_ext
[
0
][
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_ext_offset
],
gNB
->
pusch_vars
[
UE_id
]
->
ul_ch_mag
,
gNB
->
pusch_vars
[
UE_id
]
->
ul_ch_magb
,
&
gNB
->
pusch_vars
[
UE_id
]
->
llr
[
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_ext_offset
*
rel15_ul
->
Qm
],
nb_re
,
symbol
,
rel15_ul
->
Qm
);
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_ext_offset
=
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_ext_offset
+
nb_re
;
return
(
nb_rb_pdsch
/
frame_parms
->
nb_antennas_rx
);
}
\ No newline at end of file
openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c
View file @
15417570
...
...
@@ -116,7 +116,7 @@ void nr_ulsch_16qam_llr(int32_t *rxdataF_comp,
nb_re
>>=
2
;
// length in quad words (4 REs)
nb_re
+=
(
len_mod4
==
0
?
0
:
1
);
temp_channel
=
_mm_set1_epi16
((
int16_t
)((
QAM
64
_n1
*
one_over_sqrt_2
)
>>
15
));
temp_channel
=
_mm_set1_epi16
((
int16_t
)((
QAM
16
_n1
*
one_over_sqrt_2
)
>>
15
));
for
(
i
=
0
;
i
<
nb_re
;
i
++
)
{
...
...
@@ -218,9 +218,9 @@ void nr_ulsch_64qam_llr(int32_t *rxdataF_comp,
// #endif
// -------------------------------------------------------------------------
len_mod4
=
nb_re
&
3
;
nb_re
=
nb_re
>>
2
;
// length in quad words (4 REs)
nb_re
+=
((
len_mod4
==
0
)
?
0
:
1
);
len_mod4
=
nb_re
&
3
;
nb_re
=
nb_re
>>
2
;
// length in quad words (4 REs)
nb_re
+=
((
len_mod4
==
0
)
?
0
:
1
);
temp_channel
[
0
]
=
_mm_set1_epi16
((
int16_t
)((
QAM64_n1
*
one_over_sqrt_2
)
>>
15
));
...
...
openair1/PHY/defs_gNB.h
View file @
15417570
...
...
@@ -363,6 +363,8 @@ typedef struct {
/// - first index: rx antenna id [0..nb_antennas_rx[
/// - second index (definition from phy_init_lte_eNB()): ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
int32_t
**
rxdataF_ext2
;
/// \brief Offset for calculating the index of rxdataF_ext for the current symbol
uint32_t
rxdataF_ext_offset
;
/// \brief Hold the channel estimates in time domain based on DRS.
/// - first index: rx antenna id [0..nb_antennas_rx[
/// - second index: ? [0..4*ofdm_symbol_size[
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
15417570
...
...
@@ -23,7 +23,9 @@
#include "PHY/defs_gNB.h"
#include "sched_nr.h"
#include "PHY/NR_TRANSPORT/nr_transport.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
#include "SCHED/sched_eNB.h"
#include "SCHED/sched_common_extern.h"
#include "nfapi_interface.h"
...
...
@@ -31,7 +33,7 @@
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/MODULATION/nr_modulation.h"
#include "T.h"
#include "assertions.h"
...
...
@@ -200,3 +202,67 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX
+
offset
,
0
);
}
void
nr_ulsch_procedures
(
PHY_VARS_gNB
*
gNB
,
gNB_L1_rxtx_proc_t
*
proc
,
int
UE_id
,
uint8_t
harq_pid
)
{
NR_DL_FRAME_PARMS
*
frame_parms
=
&
gNB
->
frame_parms
;
nfapi_nr_ul_config_ulsch_pdu
*
rel15_ul
=
&
gNB
->
ulsch
[
UE_id
+
1
][
0
]
->
harq_processes
[
harq_pid
]
->
ulsch_pdu
;
uint8_t
ret
;
int
Nid_cell
=
0
;
// shouldn't be a local variable
//----------------------------------------------------------
//------------------- ULSCH unscrambling -------------------
//----------------------------------------------------------
nr_ulsch_unscrambling
(
gNB
->
pusch_vars
[
UE_id
]
->
llr
,
gNB
->
ulsch
[
UE_id
+
1
][
0
]
->
harq_processes
[
harq_pid
]
->
G
,
0
,
Nid_cell
,
rel15_ul
->
rnti
);
////////////////////////////////////////////////////////////
//----------------------------------------------------------
//--------------------- ULSCH decoding ---------------------
//----------------------------------------------------------
ret
=
nr_ulsch_decoding
(
gNB
,
UE_id
,
gNB
->
pusch_vars
[
UE_id
]
->
llr
,
frame_parms
,
proc
->
frame_rx
,
rel15_ul
->
ulsch_pdu_rel15
.
number_symbols
,
proc
->
slot_rx
,
harq_pid
,
0
);
// if (ret > ulsch_gNB->max_ldpc_iterations)
// n_errors++;
}
void
phy_procedures_gNB_common_RX
(
PHY_VARS_gNB
*
gNB
,
gNB_L1_rxtx_proc_t
*
proc
)
{
uint8_t
symbol
;
for
(
symbol
=
0
;
symbol
<
NR_SYMBOLS_PER_SLOT
;
symbol
++
)
{
nr_slot_fep_ul
(
gNB
,
symbol
,
proc
->
slot_rx
,
0
,
0
);
}
}
void
phy_procedures_gNB_uespec_RX
(
PHY_VARS_gNB
*
gNB
,
gNB_L1_rxtx_proc_t
*
proc
,
uint8_t
symbol_start
,
uint8_t
symbol_end
)
{
uint8_t
UE_id
;
uint8_t
symbol
;
uint8_t
harq_pid
=
0
;
// [hna] Previously in LTE, the harq_pid was obtained from the subframe number (Synchronous HARQ)
// In NR, this should be signaled through uplink scheduling dci (i.e, DCI 0_0, 0_1) (Asynchronous HARQ)
for
(
UE_id
=
0
;
UE_id
<
NUMBER_OF_NR_UE_MAX
;
UE_id
++
)
{
for
(
symbol
=
symbol_start
;
symbol
<
symbol_end
;
symbol
++
)
{
nr_rx_pusch
(
gNB
,
UE_id
,
proc
->
frame_rx
,
proc
->
slot_rx
,
symbol
,
harq_pid
);
}
nr_ulsch_procedures
(
gNB
,
proc
,
UE_id
,
harq_pid
);
}
}
openair1/SCHED_NR/sched_nr.h
View file @
15417570
...
...
@@ -36,7 +36,9 @@
nr_slot_t
nr_slot_select
(
nfapi_nr_config_request_t
*
cfg
,
unsigned
char
slot
);
void
nr_set_ssb_first_subcarrier
(
nfapi_nr_config_request_t
*
cfg
,
NR_DL_FRAME_PARMS
*
fp
);
void
phy_procedures_gNB_TX
(
PHY_VARS_gNB
*
gNB
,
int
frame_tx
,
int
slot_tx
,
int
do_meas
);
void
phy_procedures_gNB_TX
(
PHY_VARS_gNB
*
gNB
,
int
frame_tx
,
int
slot_tx
,
int
do_meas
);
void
phy_procedures_gNB_common_RX
(
PHY_VARS_gNB
*
gNB
,
gNB_L1_rxtx_proc_t
*
proc
);
void
phy_procedures_gNB_uespec_RX
(
PHY_VARS_gNB
*
gNB
,
gNB_L1_rxtx_proc_t
*
proc
,
uint8_t
symbol_start
,
uint8_t
symbol_end
);
void
nr_common_signal_procedures
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
);
void
nr_feptx_ofdm
(
RU_t
*
ru
,
int
frame_tx
,
int
tti_tx
);
void
nr_feptx_ofdm_2thread
(
RU_t
*
ru
,
int
frame_tx
,
int
tti_tx
);
...
...
openair1/SIMULATION/NR_PHY/ulschsim.c
View file @
15417570
...
...
@@ -546,7 +546,7 @@ int main(int argc, char **argv) {
#endif
ret
=
nr_ulsch_decoding
(
gNB
,
UE_id
,
channel_output_fixed
,
frame_parms
,
frame
,
nb_symb_sch
,
subframe
,
harq_pid
,
is_crnti
,
llr8_flag
);
frame
,
nb_symb_sch
,
subframe
,
harq_pid
,
is_crnti
);
if
(
ret
>
ulsch_gNB
->
max_ldpc_iterations
)
n_errors
++
;
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
15417570
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