Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
lizhongxiao
OpenXG UE
Commits
89d5b025
Commit
89d5b025
authored
Mar 12, 2020
by
Gabriele Perrone
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/generate_push_ptrs' into develop_integration_w11
parents
52d98178
a4442896
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
820 additions
and
92 deletions
+820
-92
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+2
-0
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+46
-25
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+22
-3
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
+1
-1
openair1/PHY/NR_REFSIG/ptrs_nr.c
openair1/PHY/NR_REFSIG/ptrs_nr.c
+429
-0
openair1/PHY/NR_REFSIG/ptrs_nr.h
openair1/PHY/NR_REFSIG/ptrs_nr.h
+82
-0
openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c
openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c
+1
-1
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
+6
-8
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
+101
-30
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+1
-1
openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
+2
-0
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+75
-12
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+17
-2
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+3
-1
openair1/PHY/impl_defs_nr.h
openair1/PHY/impl_defs_nr.h
+27
-3
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+2
-2
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+3
-3
No files found.
cmake_targets/CMakeLists.txt
View file @
89d5b025
...
...
@@ -1467,6 +1467,7 @@ set(PHY_SRC_UE
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_dmrs_rx.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_gold.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/dmrs_nr.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/ptrs_nr.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_ESTIMATION/filt16a_32.c
${
OPENAIR1_DIR
}
/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
${
OPENAIR1_DIR
}
/PHY/NR_ESTIMATION/nr_adjust_sync_gNB.c
...
...
@@ -1513,6 +1514,7 @@ set(PHY_SRC_UE
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/ul_ref_seq_nr.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_dmrs_rx.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/dmrs_nr.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/ptrs_nr.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_gold_ue.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_ESTIMATION/filt16a_32.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
...
...
openair1/PHY/INIT/nr_init.c
View file @
89d5b025
This diff is collapsed.
Click to expand it.
openair1/PHY/INIT/nr_init_ue.c
View file @
89d5b025
...
...
@@ -659,6 +659,8 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
abstraction_flag
=
0
;
fp
->
nb_antennas_tx
=
1
;
fp
->
nb_antennas_rx
=
1
;
dmrs_UplinkConfig_t
*
dmrs_Uplink_Config
=
&
ue
->
pusch_config
.
dmrs_UplinkConfig
;
ptrs_UplinkConfig_t
*
ptrs_Uplink_Config
=
&
ue
->
pusch_config
.
dmrs_UplinkConfig
.
ptrs_UplinkConfig
;
printf
(
"Initializing UE vars (abstraction %"
PRIu8
") for eNB TXant %"
PRIu8
", UE RXant %"
PRIu8
"
\n
"
,
abstraction_flag
,
fp
->
nb_antennas_tx
,
fp
->
nb_antennas_rx
);
//LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_eNB_INST);
nr_init_frame_parms_ue
(
fp
,
NR_MU_1
,
NORMAL
,
fp
->
N_RB_DL
,
n_ssb_crb
,
k_ssb
);
...
...
@@ -711,9 +713,9 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
}
//------------- config DMRS parameters--------------//
ue
->
dmrs_UplinkConfig
.
pusch_dmrs_type
=
pusch_dmrs_type1
;
ue
->
dmrs_UplinkConfig
.
pusch_dmrs_AdditionalPosition
=
pusch_dmrs_pos0
;
ue
->
dmrs_UplinkConfig
.
pusch_maxLength
=
pusch_len1
;
dmrs_Uplink_Config
->
pusch_dmrs_type
=
pusch_dmrs_type1
;
dmrs_Uplink_Config
->
pusch_dmrs_AdditionalPosition
=
pusch_dmrs_pos0
;
dmrs_Uplink_Config
->
pusch_maxLength
=
pusch_len1
;
//-------------------------------------------------//
ue
->
dmrs_DownlinkConfig
.
pdsch_dmrs_type
=
pdsch_dmrs_type1
;
ue
->
dmrs_DownlinkConfig
.
pdsch_dmrs_AdditionalPosition
=
pdsch_dmrs_pos0
;
...
...
@@ -743,6 +745,23 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
///////////
////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////PUSCH PTRS init/////////////////////////
///////////
ue
->
ptrs_configured
=
0
;
// flag to be toggled by RCC
//------------- config PTRS parameters--------------//
ptrs_Uplink_Config
->
timeDensity
.
ptrs_mcs1
=
0
;
// setting MCS values to 0 indicate abscence of time_density field in the configuration
ptrs_Uplink_Config
->
timeDensity
.
ptrs_mcs2
=
0
;
ptrs_Uplink_Config
->
timeDensity
.
ptrs_mcs3
=
0
;
ptrs_Uplink_Config
->
frequencyDensity
.
n_rb0
=
0
;
// setting N_RB values to 0 indicate abscence of frequency_density field in the configuration
ptrs_Uplink_Config
->
frequencyDensity
.
n_rb1
=
0
;
ptrs_Uplink_Config
->
resourceElementOffset
=
0
;
//-------------------------------------------------//
///////////
////////////////////////////////////////////////////////////////////////////////////////////
for
(
i
=
0
;
i
<
10
;
i
++
)
ue
->
tx_power_dBm
[
i
]
=-
127
;
...
...
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
View file @
89d5b025
...
...
@@ -117,7 +117,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
//------------------generate DMRS------------------//
length_dmrs
=
gNB
->
dmrs_UplinkConfig
.
pusch_maxLength
;
length_dmrs
=
dmrs_UplinkConfig
->
pusch_maxLength
;
nr_gold_pusch
(
gNB
,
symbol
,
n_idDMRS
,
length_dmrs
);
...
...
openair1/PHY/NR_REFSIG/ptrs_nr.c
0 → 100644
View file @
89d5b025
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_REFSIG/ptrs_nr.h
0 → 100644
View file @
89d5b025
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/**********************************************************************
*
* FILENAME : dmrs.h
*
* MODULE : demodulation reference signals
*
* DESCRIPTION : generation of dmrs sequences for NR 5G
* 3GPP TS 38.211
*
************************************************************************/
#ifndef PTRS_NR_H
#define PTRS_NR_H
#include "PHY/defs_nr_UE.h"
/************** CODE GENERATION ***********************************/
/************** DEFINE ********************************************/
/************* STRUCTURES *****************************************/
/************** VARIABLES *****************************************/
/************** FUNCTION ******************************************/
int16_t
get_kRE_ref
(
uint8_t
dmrs_antenna_port
,
uint8_t
pusch_dmrs_type
,
uint8_t
resourceElementOffset
);
uint8_t
get_K_ptrs
(
ptrs_UplinkConfig_t
*
ptrs_UplinkConfig
,
uint16_t
N_RB
);
void
set_ptrs_symb_idx
(
uint16_t
*
ptrs_symbols
,
ptrs_UplinkConfig_t
*
ptrs_UplinkConfig
,
dmrs_UplinkConfig_t
*
dmrs_UplinkConfig
,
uint8_t
mapping_type
,
uint8_t
duration_in_symbols
,
uint8_t
start_symbol
,
uint8_t
L_ptrs
,
uint16_t
ofdm_symbol_size
);
uint8_t
get_L_ptrs
(
ptrs_UplinkConfig_t
*
ptrs_UplinkConfig
,
uint8_t
I_mcs
);
uint8_t
is_ptrs_subcarrier
(
uint16_t
k
,
uint8_t
K_ptrs
,
uint16_t
n_rnti
,
uint16_t
N_RB
,
int16_t
k_RE_ref
,
uint16_t
start_sc
,
uint16_t
ofdm_symbol_size
);
uint8_t
is_ptrs_symbol
(
uint8_t
l
,
uint16_t
k
,
uint16_t
n_rnti
,
uint16_t
N_RB
,
uint8_t
duration_in_symbols
,
uint8_t
dmrs_antenna_port
,
uint8_t
K_ptrs
,
uint16_t
ptrs_symbols
,
uint16_t
start_sc
,
uint16_t
ofdm_symbol_size
,
pusch_dmrs_type_t
pusch_dmrs_type
,
ptrs_UplinkConfig_t
*
ptrs_UplinkConfig
);
#endif
/* PTRS_NR_H */
\ No newline at end of file
openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c
View file @
89d5b025
...
...
@@ -338,7 +338,7 @@ void nr_fill_ulsch(PHY_VARS_gNB *gNB,
rel15_ul
->
ulsch_pdu_rel15
.
number_rbs
=
ulsch_pdu
->
rb_size
;
rel15_ul
->
ulsch_pdu_rel15
.
start_symbol
=
ulsch_pdu
->
start_symbol_index
;
rel15_ul
->
ulsch_pdu_rel15
.
number_symbols
=
ulsch_pdu
->
nr_of_symbols
;
rel15_ul
->
ulsch_pdu_rel15
.
length_dmrs
=
gNB
->
dmrs_UplinkConfig
.
pusch_maxLength
;
rel15_ul
->
ulsch_pdu_rel15
.
length_dmrs
=
gNB
->
pusch_config
.
dmrs_UplinkConfig
.
pusch_maxLength
;
rel15_ul
->
ulsch_pdu_rel15
.
Qm
=
ulsch_pdu
->
qam_mod_order
;
rel15_ul
->
ulsch_pdu_rel15
.
mcs
=
ulsch_pdu
->
mcs_index
;
rel15_ul
->
ulsch_pdu_rel15
.
rv
=
ulsch_pdu
->
pusch_data
.
rv_index
;
...
...
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
View file @
89d5b025
...
...
@@ -65,20 +65,18 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
@param is_dmrs_symbol, flag to indicate wether this OFDM symbol contains DMRS symbols or not.
*/
void
nr_ulsch_extract_rbs_single
(
int
**
rxdataF
,
int
**
ul_ch_estimates
,
int
**
rxdataF_ext
,
int
**
ul_ch_estimates_ext
,
uint32_t
rxdataF_ext_offset
,
// unsigned int *rb_alloc, [hna] Resource Allocation Type 1 is assumed only for the moment
void
nr_ulsch_extract_rbs_single
(
int32_t
**
rxdataF
,
NR_gNB_PUSCH
*
pusch_vars
,
unsigned
char
symbol
,
unsigned
short
start_rb
,
unsigned
short
nb_rb_pusch
,
uint16_t
n_rnti
,
NR_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
dmrs_symbol
,
uint16_t
number_symbols
,
uint8_t
mapping_type
,
dmrs_UplinkConfig_t
*
dmrs_UplinkConfig
);
uint8_t
ptrs_configured
,
dmrs_UplinkConfig_t
*
dmrs_UplinkConfig
,
ptrs_UplinkConfig_t
*
ptrs_Uplink_Config
);
void
nr_ulsch_scale_channel
(
int32_t
**
ul_ch_estimates_ext
,
NR_DL_FRAME_PARMS
*
frame_parms
,
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
View file @
89d5b025
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
View file @
89d5b025
...
...
@@ -1975,7 +1975,7 @@ uint16_t nr_dci_format_size (PHY_VARS_NR_UE *ue,
PUSCH_Config_t
pusch_config
=
ue
->
pusch_config
;
PUCCH_Config_t
pucch_config_dedicated
=
ue
->
pucch_config_dedicated_nr
[
eNB_id
];
crossCarrierSchedulingConfig_t
crossCarrierSchedulingConfig
=
ue
->
crossCarrierSchedulingConfig
;
dmrs_UplinkConfig_t
dmrs_UplinkConfig
=
ue
->
dmrs_UplinkConfig
;
dmrs_UplinkConfig_t
dmrs_UplinkConfig
=
ue
->
pusch_config
.
dmrs_UplinkConfig
;
dmrs_DownlinkConfig_t
dmrs_DownlinkConfig
=
ue
->
dmrs_DownlinkConfig
;
csi_MeasConfig_t
csi_MeasConfig
=
ue
->
csi_MeasConfig
;
PUSCH_ServingCellConfig_t
PUSCH_ServingCellConfig
=
ue
->
PUSCH_ServingCellConfig
;
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
View file @
89d5b025
...
...
@@ -240,6 +240,8 @@ typedef struct {
int16_t
Po_SRS
;
/// num active cba group
uint8_t
num_active_cba_groups
;
/// bit mask of PT-RS ofdm symbol indicies
uint16_t
ptrs_symbols
;
/// num dci found for cba
//uint8_t num_cba_dci[10];
/// allocated CBA RNTI
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
View file @
89d5b025
...
...
@@ -31,6 +31,7 @@
*/
#include <stdint.h>
#include "PHY/NR_REFSIG/dmrs_nr.h"
#include "PHY/NR_REFSIG/ptrs_nr.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/MODULATION/nr_modulation.h"
...
...
@@ -105,19 +106,22 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
int32_t
**
txdataF
;
uint16_t
start_sc
,
start_rb
;
int8_t
Wf
[
2
],
Wt
[
2
],
l_prime
[
2
],
delta
;
uint16_t
n_dmrs
,
code_rate
,
number_dmrs_symbols
;
uint16_t
n_dmrs
,
code_rate
,
number_dmrs_symbols
,
k
;
uint8_t
dmrs_type
;
uint8_t
mapping_type
;
int
ap
,
start_symbol
,
Nid_cell
,
i
;
int
sample_offsetF
,
N_RE_prime
,
N_PRB_oh
;
uint16_t
n_rnti
;
uint8_t
data_existing
=
0
;
uint8_t
L_ptrs
,
K_ptrs
;
// PTRS parameters
uint16_t
beta_ptrs
;
// PTRS parameter related to power control
NR_UE_ULSCH_t
*
ulsch_ue
;
NR_UL_UE_HARQ_t
*
harq_process_ul_ue
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
UE
->
frame_parms
;
NR_UE_PUSCH
*
pusch_ue
=
UE
->
pusch_vars
[
thread_id
][
gNB_id
];
uint8_t
ulsch_input_buffer
[
MAX_ULSCH_PAYLOAD_BYTES
];
ptrs_UplinkConfig_t
*
ptrs_Uplink_Config
=
&
UE
->
pusch_config
.
dmrs_UplinkConfig
.
ptrs_UplinkConfig
;
num_of_codewords
=
1
;
// tmp assumption
n_rnti
=
0x1234
;
...
...
@@ -142,14 +146,14 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
0
,
0
,
harq_process_ul_ue
->
number_of_symbols
,
&
UE
->
dmrs_UplinkConfig
,
&
UE
->
pusch_config
.
dmrs_UplinkConfig
,
mapping_type
,
frame_parms
->
ofdm_symbol_size
);
ulsch_ue
->
length_dmrs
=
UE
->
dmrs_UplinkConfig
.
pusch_maxLength
;
ulsch_ue
->
length_dmrs
=
UE
->
pusch_config
.
dmrs_UplinkConfig
.
pusch_maxLength
;
ulsch_ue
->
rnti
=
n_rnti
;
ulsch_ue
->
Nid_cell
=
Nid_cell
;
ulsch_ue
->
nb_re_dmrs
=
((
UE
->
dmrs_UplinkConfig
.
pusch_dmrs_type
==
pusch_dmrs_type1
)
?
6
:
4
)
*
number_dmrs_symbols
;
ulsch_ue
->
nb_re_dmrs
=
((
UE
->
pusch_config
.
dmrs_UplinkConfig
.
pusch_dmrs_type
==
pusch_dmrs_type1
)
?
6
:
4
)
*
number_dmrs_symbols
;
N_RE_prime
=
NR_NB_SC_PER_RB
*
harq_process_ul_ue
->
number_of_symbols
-
ulsch_ue
->
nb_re_dmrs
-
N_PRB_oh
;
...
...
@@ -277,10 +281,40 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
pusch_dmrs
=
UE
->
nr_gold_pusch_dmrs
[
slot
];
n_dmrs
=
(
harq_process_ul_ue
->
nb_rb
*
ulsch_ue
->
nb_re_dmrs
);
int16_t
mod_dmrs
[
n_dmrs
<<
1
];
dmrs_type
=
UE
->
dmrs_UplinkConfig
.
pusch_dmrs_type
;
dmrs_type
=
UE
->
pusch_config
.
dmrs_UplinkConfig
.
pusch_dmrs_type
;
///////////
////////////////////////////////////////////////////////////////////////
/////////////////////////PTRS parameters' initialization/////////////////////////
///////////
int16_t
mod_ptrs
[(
harq_process_ul_ue
->
nb_rb
/
2
)
*
(
NR_SYMBOLS_PER_SLOT
-
1
)
*
2
];
// assume maximum number of PTRS per pusch allocation
K_ptrs
=
0
;
// just to avoid a warning
if
(
UE
->
ptrs_configured
==
1
)
{
K_ptrs
=
get_K_ptrs
(
ptrs_Uplink_Config
,
harq_process_ul_ue
->
nb_rb
);
L_ptrs
=
get_L_ptrs
(
ptrs_Uplink_Config
,
harq_process_ul_ue
->
mcs
);
beta_ptrs
=
1
;
// temp value until power control is implemented
ulsch_ue
->
ptrs_symbols
=
0
;
set_ptrs_symb_idx
(
&
ulsch_ue
->
ptrs_symbols
,
ptrs_Uplink_Config
,
&
UE
->
pusch_config
.
dmrs_UplinkConfig
,
1
,
harq_process_ul_ue
->
number_of_symbols
,
start_symbol
,
L_ptrs
,
frame_parms
->
ofdm_symbol_size
);
}
///////////
////////////////////////////////////////////////////////////////////////////////
/////////////////////////ULSCH layer mapping/////////////////////////
///////////
...
...
@@ -313,7 +347,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
0
,
0
,
harq_process_ul_ue
->
number_of_symbols
,
&
UE
->
dmrs_UplinkConfig
,
&
UE
->
pusch_config
.
dmrs_UplinkConfig
,
mapping_type
,
frame_parms
->
ofdm_symbol_size
);
...
...
@@ -357,8 +391,8 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
uint8_t
k_prime
=
0
;
uint8_t
is_dmrs
;
uint16_t
m
=
0
,
n
=
0
,
dmrs_idx
=
0
,
k
=
0
;
uint8_t
is_dmrs
,
is_ptrs
;
uint16_t
m
=
0
,
n
=
0
,
dmrs_idx
=
0
,
ptrs_idx
=
0
;
for
(
l
=
start_symbol
;
l
<
start_symbol
+
harq_process_ul_ue
->
number_of_symbols
;
l
++
)
{
...
...
@@ -371,6 +405,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
sample_offsetF
=
l
*
frame_parms
->
ofdm_symbol_size
+
k
;
is_dmrs
=
0
;
is_ptrs
=
0
;
is_dmrs
=
is_dmrs_symbol
(
l
,
k
,
...
...
@@ -379,13 +414,30 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
n
,
delta
,
harq_process_ul_ue
->
number_of_symbols
,
&
UE
->
dmrs_UplinkConfig
,
&
UE
->
pusch_config
.
dmrs_UplinkConfig
,
mapping_type
,
frame_parms
->
ofdm_symbol_size
);
if
(
UE
->
ptrs_configured
==
1
){
is_ptrs
=
is_ptrs_symbol
(
l
,
k
,
ulsch_ue
->
rnti
,
harq_process_ul_ue
->
nb_rb
,
harq_process_ul_ue
->
number_of_symbols
,
ap
,
K_ptrs
,
ulsch_ue
->
ptrs_symbols
,
start_sc
,
frame_parms
->
ofdm_symbol_size
,
UE
->
pusch_config
.
dmrs_UplinkConfig
.
pusch_dmrs_type
,
ptrs_Uplink_Config
);
}
if
(
is_dmrs
==
1
)
{
nr_modulation
(
pusch_dmrs
[
l
][
0
],
n_dmrs
*
2
,
DMRS_MOD_ORDER
,
mod_dmrs
);
// currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated
if
(
k
==
start_sc
){
nr_modulation
(
pusch_dmrs
[
l
][
0
],
n_dmrs
*
2
,
DMRS_MOD_ORDER
,
mod_dmrs
);
// currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated
}
((
int16_t
*
)
txdataF
[
ap
])[(
sample_offsetF
)
<<
1
]
=
(
Wt
[
l_prime
[
0
]]
*
Wf
[
k_prime
]
*
AMP
*
mod_dmrs
[
dmrs_idx
<<
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
ap
])[((
sample_offsetF
)
<<
1
)
+
1
]
=
(
Wt
[
l_prime
[
0
]]
*
Wf
[
k_prime
]
*
AMP
*
mod_dmrs
[(
dmrs_idx
<<
1
)
+
1
])
>>
15
;
...
...
@@ -401,9 +453,19 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
k_prime
++
;
k_prime
&=
1
;
n
+=
(
k_prime
)
?
0
:
1
;
}
else
{
}
else
if
(
is_ptrs
==
1
)
{
if
(
k
==
start_sc
){
nr_modulation
(
pusch_dmrs
[
l
][
0
],
harq_process_ul_ue
->
nb_rb
/
2
,
DMRS_MOD_ORDER
,
mod_ptrs
);
}
((
int16_t
*
)
txdataF
[
ap
])[(
sample_offsetF
)
<<
1
]
=
(
beta_ptrs
*
AMP
*
mod_ptrs
[
ptrs_idx
<<
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
ap
])[((
sample_offsetF
)
<<
1
)
+
1
]
=
(
beta_ptrs
*
AMP
*
mod_ptrs
[(
ptrs_idx
<<
1
)
+
1
])
>>
15
;
ptrs_idx
++
;
}
else
{
((
int16_t
*
)
txdataF
[
ap
])[(
sample_offsetF
)
<<
1
]
=
((
int16_t
*
)
ulsch_ue
->
y
)[
m
<<
1
];
((
int16_t
*
)
txdataF
[
ap
])[((
sample_offsetF
)
<<
1
)
+
1
]
=
((
int16_t
*
)
ulsch_ue
->
y
)[(
m
<<
1
)
+
1
];
...
...
@@ -484,6 +546,7 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE,
frame_parms
);
}
}
///////////
////////////////////////////////////////////////////
return
0
;
...
...
openair1/PHY/defs_gNB.h
View file @
89d5b025
...
...
@@ -375,6 +375,14 @@ typedef struct {
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
/// - second index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
int32_t
**
ul_ch_estimates_ext
;
/// \brief Hold the PTRS phase estimates in frequency domain.
/// - first index: rx antenna id [0..nb_antennas_rx[
/// - second index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
int32_t
**
ul_ch_ptrs_estimates
;
/// \brief Uplink phase estimates extracted in PRBS.
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
/// - second index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
int32_t
**
ul_ch_ptrs_estimates_ext
;
/// \brief Holds the compensated signal.
/// - first index: rx antenna id [0..nb_antennas_rx[
/// - second index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
...
...
@@ -416,6 +424,12 @@ typedef struct {
int16_t
*
llr
;
// DMRS symbol index, to be updated every DMRS symbol within a slot.
uint8_t
dmrs_symbol
;
// PTRS symbol index, to be updated every PTRS symbol within a slot.
uint8_t
ptrs_symbol_index
;
/// bit mask of PT-RS ofdm symbol indicies
uint16_t
ptrs_symbols
;
// PTRS subcarriers per OFDM symbol
uint16_t
ptrs_sc_per_ofdm_symbol
;
}
NR_gNB_PUSCH
;
...
...
@@ -669,6 +683,9 @@ typedef struct PHY_VARS_gNB_s {
/// PDSCH DMRS sequence
uint32_t
****
nr_gold_pdsch_dmrs
;
/// flag to indicate if PTRS is configured
uint8_t
ptrs_configured
;
/// PUSCH DMRS
uint32_t
nr_gold_pusch
[
2
][
20
][
2
][
NR_MAX_PUSCH_DMRS_INIT_LENGTH_DWORD
];
...
...
@@ -727,8 +744,6 @@ typedef struct PHY_VARS_gNB_s {
// SRS Variables
SOUNDINGRS_UL_CONFIG_DEDICATED
soundingrs_ul_config_dedicated
[
NUMBER_OF_UE_MAX
];
dmrs_UplinkConfig_t
dmrs_UplinkConfig
;
dmrs_DownlinkConfig_t
dmrs_DownlinkConfig
;
uint8_t
ncs_cell
[
20
][
7
];
...
...
openair1/PHY/defs_nr_UE.h
View file @
89d5b025
...
...
@@ -1012,6 +1012,9 @@ typedef struct {
/// PUSCH DMRS sequence
uint32_t
****
nr_gold_pusch_dmrs
;
/// flag to indicate if PTRS is configured
uint8_t
ptrs_configured
;
uint32_t
X_u
[
64
][
839
];
uint32_t
high_speed_flag
;
...
...
@@ -1143,7 +1146,6 @@ typedef struct {
crossCarrierSchedulingConfig_t
crossCarrierSchedulingConfig
;
supplementaryUplink_t
supplementaryUplink
;
dmrs_UplinkConfig_t
dmrs_UplinkConfig
;
dmrs_DownlinkConfig_t
dmrs_DownlinkConfig
;
csi_MeasConfig_t
csi_MeasConfig
;
PUSCH_ServingCellConfig_t
PUSCH_ServingCellConfig
;
...
...
openair1/PHY/impl_defs_nr.h
View file @
89d5b025
...
...
@@ -510,9 +510,6 @@ typedef struct {
uint8_t
startSymbolAndLength
;
}
PUSCH_TimeDomainResourceAllocation_t
;
////////////////////////////////////////////////////////////////////////////////################################
typedef
struct
{
// The IE PTRS-UplinkConfig is used to configure uplink Phase-Tracking-Reference-Signals (PTRS)
}
ptrs_UplinkConfig_t
;
typedef
enum
{
maxCodeBlockGroupsPerTransportBlock_n2
=
2
,
maxCodeBlockGroupsPerTransportBlock_n4
=
4
,
...
...
@@ -544,6 +541,12 @@ typedef enum {
pusch_dmrs_pos2
=
2
,
pusch_dmrs_pos3
=
3
,
}
pusch_dmrs_AdditionalPosition_t
;
typedef
enum
{
offset00
=
0
,
offset01
=
1
,
offset10
=
2
,
offset11
=
3
,
}
ptrs_resource_elementoffset_t
;
typedef
enum
{
pdsch_len1
=
1
,
pdsch_len2
=
2
...
...
@@ -552,6 +555,22 @@ typedef enum {
pusch_len1
=
1
,
pusch_len2
=
2
}
pusch_maxLength_t
;
typedef
struct
{
uint8_t
ptrs_mcs1
;
uint8_t
ptrs_mcs2
;
uint8_t
ptrs_mcs3
;
}
ptrs_time_density_t
;
typedef
struct
{
uint16_t
n_rb0
;
uint16_t
n_rb1
;
}
ptrs_frequency_density_t
;
typedef
struct
{
// The IE PTRS-UplinkConfig is used to configure uplink Phase-Tracking-Reference-Signals (PTRS)
uint8_t
num_ptrs_ports
;
ptrs_resource_elementoffset_t
resourceElementOffset
;
ptrs_time_density_t
timeDensity
;
ptrs_frequency_density_t
frequencyDensity
;
uint32_t
ul_ptrs_power
;
}
ptrs_UplinkConfig_t
;
typedef
struct
{
// The IE DMRS-DownlinkConfig is used to configure downlink demodulation reference signals for PDSCH
pdsch_dmrs_type_t
pdsch_dmrs_type
;
pdsch_dmrs_AdditionalPosition_t
pdsch_dmrs_AdditionalPosition
;
...
...
@@ -563,6 +582,7 @@ typedef struct { // The IE DMRS-UplinkConfig is used to configure uplink demodul
pusch_dmrs_type_t
pusch_dmrs_type
;
pusch_dmrs_AdditionalPosition_t
pusch_dmrs_AdditionalPosition
;
pusch_maxLength_t
pusch_maxLength
;
ptrs_UplinkConfig_t
ptrs_UplinkConfig
;
uint16_t
scramblingID0
;
uint16_t
scramblingID1
;
}
dmrs_UplinkConfig_t
;
...
...
@@ -647,6 +667,10 @@ typedef struct {
* resourceAllocation
*/
ul_resourceAllocation_t
ul_resourceAllocation
;
/*
* DMRS-Uplinkconfig
*/
dmrs_UplinkConfig_t
dmrs_UplinkConfig
;
/*
* rgb_Size
*/
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
89d5b025
...
...
@@ -244,11 +244,11 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int UE_id
0
,
0
,
number_symbols
,
&
gNB
->
dmrs_UplinkConfig
,
&
gNB
->
pusch_config
.
dmrs_UplinkConfig
,
mapping_type
,
frame_parms
->
ofdm_symbol_size
);
nb_re_dmrs
=
((
gNB
->
dmrs_UplinkConfig
.
pusch_dmrs_type
==
pusch_dmrs_type1
)
?
6
:
4
)
*
number_dmrs_symbols
;
nb_re_dmrs
=
((
gNB
->
pusch_config
.
dmrs_UplinkConfig
.
pusch_dmrs_type
==
pusch_dmrs_type1
)
?
6
:
4
)
*
number_dmrs_symbols
;
G
=
nr_get_G
(
nfapi_ulsch_pdu_rel15
->
number_rbs
,
number_symbols
,
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
89d5b025
...
...
@@ -428,7 +428,7 @@ int main(int argc, char **argv)
uint16_t
number_dmrs_symbols
=
0
;
unsigned
int
available_bits
;
uint8_t
nb_re_dmrs
;
uint8_t
length_dmrs
=
UE
->
dmrs_UplinkConfig
.
pusch_maxLength
;
uint8_t
length_dmrs
=
UE
->
pusch_config
.
dmrs_UplinkConfig
.
pusch_maxLength
;
unsigned
char
mod_order
;
uint16_t
code_rate
;
...
...
@@ -440,12 +440,12 @@ int main(int argc, char **argv)
0
,
0
,
nb_symb_sch
,
&
UE
->
dmrs_UplinkConfig
,
&
UE
->
pusch_config
.
dmrs_UplinkConfig
,
UE
->
pusch_config
.
pusch_TimeDomainResourceAllocation
[
0
]
->
mappingType
,
frame_parms
->
ofdm_symbol_size
);
mod_order
=
nr_get_Qm_ul
(
Imcs
,
0
);
nb_re_dmrs
=
((
UE
->
dmrs_UplinkConfig
.
pusch_dmrs_type
==
pusch_dmrs_type1
)
?
6
:
4
)
*
number_dmrs_symbols
;
nb_re_dmrs
=
((
UE
->
pusch_config
.
dmrs_UplinkConfig
.
pusch_dmrs_type
==
pusch_dmrs_type1
)
?
6
:
4
)
*
number_dmrs_symbols
;
code_rate
=
nr_get_code_rate_ul
(
Imcs
,
0
);
available_bits
=
nr_get_G
(
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
,
length_dmrs
,
mod_order
,
1
);
TBS
=
nr_compute_tbs
(
mod_order
,
code_rate
,
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
*
length_dmrs
,
0
,
precod_nbr_layers
);
...
...
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