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
1ec87df5
Commit
1ec87df5
authored
Apr 03, 2019
by
Khalid Ahmed
Committed by
Thomas Schlichter
Jun 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding UL dmrs funtionalities to dmrs_nr.c in NR_UE_TRANSPORT
parent
9c447c18
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
11 deletions
+50
-11
openair1/PHY/MODULATION/nr_modulation.h
openair1/PHY/MODULATION/nr_modulation.h
+2
-0
openair1/PHY/NR_REFSIG/dmrs_nr.h
openair1/PHY/NR_REFSIG/dmrs_nr.h
+2
-0
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+1
-1
openair1/PHY/NR_TRANSPORT/nr_sch_dmrs.c
openair1/PHY/NR_TRANSPORT/nr_sch_dmrs.c
+2
-5
openair1/PHY/NR_TRANSPORT/nr_sch_dmrs.h
openair1/PHY/NR_TRANSPORT/nr_sch_dmrs.h
+1
-2
openair1/PHY/NR_UE_TRANSPORT/dmrs_nr.c
openair1/PHY/NR_UE_TRANSPORT/dmrs_nr.c
+39
-0
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+3
-3
No files found.
openair1/PHY/MODULATION/nr_modulation.h
View file @
1ec87df5
...
@@ -25,6 +25,8 @@
...
@@ -25,6 +25,8 @@
#include <stdint.h>
#include <stdint.h>
#include "PHY/defs_nr_common.h"
#include "PHY/defs_nr_common.h"
#define DMRS_MOD_ORDER 2
/*! \brief Perform NR modulation. TS 38.211 V15.4.0 subclause 5.1
/*! \brief Perform NR modulation. TS 38.211 V15.4.0 subclause 5.1
@param[in] in, Pointer to input bits
@param[in] in, Pointer to input bits
@param[in] length, size of input bits
@param[in] length, size of input bits
...
...
openair1/PHY/NR_REFSIG/dmrs_nr.h
View file @
1ec87df5
...
@@ -54,6 +54,8 @@
...
@@ -54,6 +54,8 @@
int
pseudo_random_sequence
(
int
M_PN
,
uint32_t
*
c
,
uint32_t
cinit
);
int
pseudo_random_sequence
(
int
M_PN
,
uint32_t
*
c
,
uint32_t
cinit
);
void
lte_gold_new
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
lte_gold_table
[
20
][
2
][
14
],
uint16_t
Nid_cell
);
void
lte_gold_new
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
lte_gold_table
[
20
][
2
][
14
],
uint16_t
Nid_cell
);
void
generate_dmrs_pbch
(
uint32_t
dmrs_pbch_bitmap
[
DMRS_PBCH_I_SSB
][
DMRS_PBCH_N_HF
][
DMRS_BITMAP_SIZE
],
uint16_t
Nid_cell
);
void
generate_dmrs_pbch
(
uint32_t
dmrs_pbch_bitmap
[
DMRS_PBCH_I_SSB
][
DMRS_PBCH_N_HF
][
DMRS_BITMAP_SIZE
],
uint16_t
Nid_cell
);
uint8_t
get_l0_ul
(
uint8_t
mapping_type
,
uint8_t
dmrs_typeA_position
);
uint16_t
get_dmrs_freq_idx_ul
(
uint8_t
n
,
uint8_t
k_prime
,
uint8_t
delta
,
uint8_t
dmrs_type
);
#undef EXTERN
#undef EXTERN
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
1ec87df5
...
@@ -172,7 +172,7 @@ for (int l=0; l<rel15->nb_layers; l++)
...
@@ -172,7 +172,7 @@ for (int l=0; l<rel15->nb_layers; l++)
uint8_t
dmrs_type
=
config
->
pdsch_config
.
dmrs_type
.
value
;
uint8_t
dmrs_type
=
config
->
pdsch_config
.
dmrs_type
.
value
;
uint8_t
mapping_type
=
config
->
pdsch_config
.
mapping_type
.
value
;
uint8_t
mapping_type
=
config
->
pdsch_config
.
mapping_type
.
value
;
l0
=
get_l0
(
mapping_type
,
2
,
0
);
//config->pdsch_config.dmrs_typeA_position.value);
l0
=
get_l0
(
mapping_type
,
2
);
//config->pdsch_config.dmrs_typeA_position.value);
nr_modulation
(
pdsch_dmrs
[
l0
][
0
],
n_dmrs
,
DMRS_MOD_ORDER
,
mod_dmrs
);
// currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated
nr_modulation
(
pdsch_dmrs
[
l0
][
0
],
n_dmrs
,
DMRS_MOD_ORDER
,
mod_dmrs
);
// currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated
#ifdef DEBUG_DLSCH
#ifdef DEBUG_DLSCH
...
...
openair1/PHY/NR_TRANSPORT/nr_sch_dmrs.c
View file @
1ec87df5
...
@@ -90,11 +90,8 @@ uint16_t get_dmrs_freq_idx(uint8_t n, uint8_t k_prime, uint8_t delta, uint8_t dm
...
@@ -90,11 +90,8 @@ uint16_t get_dmrs_freq_idx(uint8_t n, uint8_t k_prime, uint8_t delta, uint8_t dm
return
dmrs_idx
;
return
dmrs_idx
;
}
}
uint8_t
get_l0
(
uint8_t
mapping_type
,
uint8_t
dmrs_typeA_position
,
int
ul_flag
)
{
uint8_t
get_l0
(
uint8_t
mapping_type
,
uint8_t
dmrs_typeA_position
)
{
if
(
ul_flag
)
return
((
mapping_type
==
NFAPI_NR_PDSCH_MAPPING_TYPE_A
)
?
dmrs_typeA_position
:
0
);
return
((
mapping_type
==
NFAPI_NR_PDSCH_MAPPING_TYPE_A
)
?
dmrs_typeA_position
:
0
);
else
return
((
mapping_type
==
typeA
)
?
dmrs_typeA_position
:
0
);
}
}
openair1/PHY/NR_TRANSPORT/nr_sch_dmrs.h
View file @
1ec87df5
...
@@ -34,7 +34,6 @@
...
@@ -34,7 +34,6 @@
#define NR_PDSCH_DMRS_ANTENNA_PORT0 1000
#define NR_PDSCH_DMRS_ANTENNA_PORT0 1000
#define NR_PDSCH_DMRS_NB_ANTENNA_PORTS 12
#define NR_PDSCH_DMRS_NB_ANTENNA_PORTS 12
#define DMRS_MOD_ORDER 2
void
get_l_prime
(
uint8_t
*
l_prime
,
uint8_t
n_symbs
);
void
get_l_prime
(
uint8_t
*
l_prime
,
uint8_t
n_symbs
);
...
@@ -48,4 +47,4 @@ uint8_t get_delta(uint8_t ap, uint8_t config);
...
@@ -48,4 +47,4 @@ uint8_t get_delta(uint8_t ap, uint8_t config);
uint16_t
get_dmrs_freq_idx
(
uint8_t
n
,
uint8_t
k_prime
,
uint8_t
delta
,
uint8_t
dmrs_type
);
uint16_t
get_dmrs_freq_idx
(
uint8_t
n
,
uint8_t
k_prime
,
uint8_t
delta
,
uint8_t
dmrs_type
);
uint8_t
get_l0
(
uint8_t
mapping_type
,
uint8_t
dmrs_typeA_position
,
int
ul_flag
);
uint8_t
get_l0
(
uint8_t
mapping_type
,
uint8_t
dmrs_typeA_position
);
openair1/PHY/NR_UE_TRANSPORT/dmrs_nr.c
View file @
1ec87df5
...
@@ -224,6 +224,45 @@ void lte_gold_new(LTE_DL_FRAME_PARMS *frame_parms, uint32_t lte_gold_table[20][2
...
@@ -224,6 +224,45 @@ void lte_gold_new(LTE_DL_FRAME_PARMS *frame_parms, uint32_t lte_gold_table[20][2
#endif
#endif
}
}
/*******************************************************************
*
* NAME : get_l0_ul
*
* PARAMETERS : mapping_type : PUSCH mapping type
* dmrs_typeA_position : higher layer parameter
*
* RETURN : demodulation reference signal for PUSCH
*
* DESCRIPTION : see TS 38.211 V15.4.0 Demodulation reference signals for PUSCH
*
*********************************************************************/
uint8_t
get_l0_ul
(
uint8_t
mapping_type
,
uint8_t
dmrs_typeA_position
)
{
return
((
mapping_type
==
typeA
)
?
dmrs_typeA_position
:
0
);
}
/*******************************************************************
*
* NAME : get_dmrs_freq_idx_ul
*
* PARAMETERS : n : index of DMRS symbol
* k_prime : k_prime = {0,1}
* delta : given by Tables 6.4.1.1.3-1 and 6.4.1.1.3-2
* dmrs_type : DMRS configuration type
*
* RETURN : demodulation reference signal for PUSCH
*
* DESCRIPTION : see TS 38.211 V15.4.0 Demodulation reference signals for PUSCH
*
*********************************************************************/
uint16_t
get_dmrs_freq_idx_ul
(
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
;
}
/*******************************************************************
/*******************************************************************
*
*
* NAME : get_dmrs_pbch
* NAME : get_dmrs_pbch
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
1ec87df5
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
#include "PHY/NR_TRANSPORT/nr_transport.h"
#include "PHY/NR_TRANSPORT/nr_transport.h"
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
#include "PHY/NR_
TRANSPORT/nr_sch_dmrs
.h"
#include "PHY/NR_
REFSIG/dmrs_nr
.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "SCHED_NR/sched_nr.h"
#include "SCHED_NR/sched_nr.h"
...
@@ -592,7 +592,7 @@ int main(int argc, char **argv) {
...
@@ -592,7 +592,7 @@ int main(int argc, char **argv) {
dmrs_type
=
UE
->
dmrs_UplinkConfig
.
pusch_dmrs_type
;
dmrs_type
=
UE
->
dmrs_UplinkConfig
.
pusch_dmrs_type
;
mapping_type
=
UE
->
pusch_config
.
pusch_TimeDomainResourceAllocation
[
0
]
->
mappingType
;
mapping_type
=
UE
->
pusch_config
.
pusch_TimeDomainResourceAllocation
[
0
]
->
mappingType
;
l0
=
get_l0
(
mapping_type
,
2
,
1
);
l0
=
get_l0
_ul
(
mapping_type
,
2
);
nr_modulation
(
pusch_dmrs
[
l0
][
0
],
n_dmrs
,
DMRS_MOD_ORDER
,
mod_dmrs
);
// currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated
nr_modulation
(
pusch_dmrs
[
l0
][
0
],
n_dmrs
,
DMRS_MOD_ORDER
,
mod_dmrs
);
// currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated
...
@@ -642,7 +642,7 @@ int main(int argc, char **argv) {
...
@@ -642,7 +642,7 @@ int main(int argc, char **argv) {
sample_offsetF
=
l
*
frame_parms
->
ofdm_symbol_size
+
k
;
sample_offsetF
=
l
*
frame_parms
->
ofdm_symbol_size
+
k
;
for
(
i
=
0
;
i
<
nb_rb
*
NR_NB_SC_PER_RB
;
i
++
)
{
for
(
i
=
0
;
i
<
nb_rb
*
NR_NB_SC_PER_RB
;
i
++
)
{
if
((
l
==
dmrs_symbol
)
&&
(
k
==
((
start_sc
+
get_dmrs_freq_idx
(
n
,
k_prime
,
delta
,
dmrs_type
))
%
(
frame_parms
->
ofdm_symbol_size
))))
{
if
((
l
==
dmrs_symbol
)
&&
(
k
==
((
start_sc
+
get_dmrs_freq_idx
_ul
(
n
,
k_prime
,
delta
,
dmrs_type
))
%
(
frame_parms
->
ofdm_symbol_size
))))
{
((
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
;
#ifdef DEBUG_PUSCH_MAPPING
#ifdef DEBUG_PUSCH_MAPPING
...
...
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