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
promise
OpenXG-RAN
Commits
505d06e9
Commit
505d06e9
authored
Feb 13, 2020
by
adk
Committed by
Thomas Schlichter
Mar 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PUSCH PTRS generation
parent
e72e1d87
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
583 additions
and
6 deletions
+583
-6
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+2
-0
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_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
+68
-6
No files found.
cmake_targets/CMakeLists.txt
View file @
505d06e9
...
@@ -1467,6 +1467,7 @@ set(PHY_SRC_UE
...
@@ -1467,6 +1467,7 @@ set(PHY_SRC_UE
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_dmrs_rx.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_dmrs_rx.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_gold.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_gold.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/dmrs_nr.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_UE_ESTIMATION/filt16a_32.c
${
OPENAIR1_DIR
}
/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
${
OPENAIR1_DIR
}
/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
${
OPENAIR1_DIR
}
/PHY/NR_ESTIMATION/nr_adjust_sync_gNB.c
${
OPENAIR1_DIR
}
/PHY/NR_ESTIMATION/nr_adjust_sync_gNB.c
...
@@ -1513,6 +1514,7 @@ set(PHY_SRC_UE
...
@@ -1513,6 +1514,7 @@ set(PHY_SRC_UE
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/ul_ref_seq_nr.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/ul_ref_seq_nr.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_dmrs_rx.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_dmrs_rx.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/dmrs_nr.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_REFSIG/nr_gold_ue.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_ESTIMATION/filt16a_32.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_ESTIMATION/filt16a_32.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
...
...
openair1/PHY/NR_REFSIG/ptrs_nr.c
0 → 100644
View file @
505d06e9
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_REFSIG/ptrs_nr.h
0 → 100644
View file @
505d06e9
/*
* 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_UE_TRANSPORT/nr_transport_ue.h
View file @
505d06e9
...
@@ -240,6 +240,8 @@ typedef struct {
...
@@ -240,6 +240,8 @@ typedef struct {
int16_t
Po_SRS
;
int16_t
Po_SRS
;
/// num active cba group
/// num active cba group
uint8_t
num_active_cba_groups
;
uint8_t
num_active_cba_groups
;
/// bit mask of PT-RS ofdm symbol indicies
uint16_t
ptrs_symbols
;
/// num dci found for cba
/// num dci found for cba
//uint8_t num_cba_dci[10];
//uint8_t num_cba_dci[10];
/// allocated CBA RNTI
/// allocated CBA RNTI
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
View file @
505d06e9
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
*/
*/
#include <stdint.h>
#include <stdint.h>
#include "PHY/NR_REFSIG/dmrs_nr.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_ue.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/MODULATION/nr_modulation.h"
#include "PHY/MODULATION/nr_modulation.h"
...
@@ -105,19 +106,22 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
...
@@ -105,19 +106,22 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
int32_t
**
txdataF
;
int32_t
**
txdataF
;
uint16_t
start_sc
,
start_rb
;
uint16_t
start_sc
,
start_rb
;
int8_t
Wf
[
2
],
Wt
[
2
],
l_prime
[
2
],
delta
;
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
dmrs_type
;
uint8_t
mapping_type
;
uint8_t
mapping_type
;
int
ap
,
start_symbol
,
Nid_cell
,
i
;
int
ap
,
start_symbol
,
Nid_cell
,
i
;
int
sample_offsetF
,
N_RE_prime
,
N_PRB_oh
;
int
sample_offsetF
,
N_RE_prime
,
N_PRB_oh
;
uint16_t
n_rnti
;
uint16_t
n_rnti
;
uint8_t
data_existing
=
0
;
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_UE_ULSCH_t
*
ulsch_ue
;
NR_UL_UE_HARQ_t
*
harq_process_ul_ue
;
NR_UL_UE_HARQ_t
*
harq_process_ul_ue
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
UE
->
frame_parms
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
UE
->
frame_parms
;
NR_UE_PUSCH
*
pusch_ue
=
UE
->
pusch_vars
[
thread_id
][
gNB_id
];
NR_UE_PUSCH
*
pusch_ue
=
UE
->
pusch_vars
[
thread_id
][
gNB_id
];
uint8_t
ulsch_input_buffer
[
MAX_ULSCH_PAYLOAD_BYTES
];
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
num_of_codewords
=
1
;
// tmp assumption
n_rnti
=
0x1234
;
n_rnti
=
0x1234
;
...
@@ -281,6 +285,36 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
...
@@ -281,6 +285,36 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
///////////
///////////
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/////////////////////////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/////////////////////////
/////////////////////////ULSCH layer mapping/////////////////////////
///////////
///////////
...
@@ -357,8 +391,8 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
...
@@ -357,8 +391,8 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
uint8_t
k_prime
=
0
;
uint8_t
k_prime
=
0
;
uint8_t
is_dmrs
;
uint8_t
is_dmrs
,
is_ptrs
;
uint16_t
m
=
0
,
n
=
0
,
dmrs_idx
=
0
,
k
=
0
;
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
++
)
{
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,
...
@@ -371,6 +405,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
sample_offsetF
=
l
*
frame_parms
->
ofdm_symbol_size
+
k
;
sample_offsetF
=
l
*
frame_parms
->
ofdm_symbol_size
+
k
;
is_dmrs
=
0
;
is_dmrs
=
0
;
is_ptrs
=
0
;
is_dmrs
=
is_dmrs_symbol
(
l
,
is_dmrs
=
is_dmrs_symbol
(
l
,
k
,
k
,
...
@@ -383,9 +418,26 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
...
@@ -383,9 +418,26 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
mapping_type
,
mapping_type
,
frame_parms
->
ofdm_symbol_size
);
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
)
{
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
]
=
(
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
;
((
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,
...
@@ -401,9 +453,19 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
k_prime
++
;
k_prime
++
;
k_prime
&=
1
;
k_prime
&=
1
;
n
+=
(
k_prime
)
?
0
:
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
]
=
((
int16_t
*
)
ulsch_ue
->
y
)[
m
<<
1
];
((
int16_t
*
)
txdataF
[
ap
])[((
sample_offsetF
)
<<
1
)
+
1
]
=
((
int16_t
*
)
ulsch_ue
->
y
)[(
m
<<
1
)
+
1
];
((
int16_t
*
)
txdataF
[
ap
])[((
sample_offsetF
)
<<
1
)
+
1
]
=
((
int16_t
*
)
ulsch_ue
->
y
)[(
m
<<
1
)
+
1
];
...
...
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