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
Michael Black
OpenXG UE
Commits
d5cff6ed
Commit
d5cff6ed
authored
Dec 16, 2021
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Harmonize DLSCH/ULSCH unscrambling in gNB/nrUE
parent
2bd86367
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
71 additions
and
92 deletions
+71
-92
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+2
-1
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+1
-1
openair1/PHY/NR_TRANSPORT/nr_scrambling.c
openair1/PHY/NR_TRANSPORT/nr_scrambling.c
+55
-0
openair1/PHY/NR_TRANSPORT/nr_transport_common_proto.h
openair1/PHY/NR_TRANSPORT/nr_transport_common_proto.h
+2
-0
openair1/PHY/NR_TRANSPORT/nr_ulsch.c
openair1/PHY/NR_TRANSPORT/nr_ulsch.c
+3
-54
openair1/PHY/NR_TRANSPORT/nr_ulsch.h
openair1/PHY/NR_TRANSPORT/nr_ulsch.h
+1
-12
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+3
-19
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+4
-5
No files found.
cmake_targets/CMakeLists.txt
View file @
d5cff6ed
...
...
@@ -1710,6 +1710,8 @@ set(PHY_SRC_UE
set
(
PHY_NR_SRC_COMMON
${
OPENAIR1_DIR
}
/PHY/NR_TRANSPORT/nr_prach_common.c
${
OPENAIR1_DIR
}
/PHY/NR_TRANSPORT/nr_scrambling.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/scrambling_luts.c
)
set
(
PHY_NR_SRC
...
...
@@ -1735,7 +1737,6 @@ set(PHY_SRC_UE
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_dmrs_rx.c
${
OPENAIR1_DIR
}
/PHY/NR_TRANSPORT/nr_csi_rs.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_gold.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/scrambling_luts.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_gen_mod_table.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/dmrs_nr.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/ptrs_nr.c
...
...
openair1/PHY/INIT/nr_init_ue.c
View file @
d5cff6ed
...
...
@@ -531,6 +531,7 @@ void init_N_TA_offset(PHY_VARS_NR_UE *ue){
void
phy_init_nr_top
(
PHY_VARS_NR_UE
*
ue
)
{
NR_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
crcTableInit
();
init_scrambling_luts
();
load_dftslib
();
init_context_synchro_nr
(
frame_parms
);
generate_ul_reference_signal_sequences
(
SHRT_MAX
);
...
...
@@ -542,6 +543,5 @@ void phy_init_nr_top(PHY_VARS_NR_UE *ue) {
//generate_16qam_table();
//generate_RIV_tables();
//init_unscrambling_lut();
//init_scrambling_lut();
//set_taus_seed(1328);
}
openair1/PHY/NR_TRANSPORT/nr_scrambling.c
0 → 100644
View file @
d5cff6ed
/*
* 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
*/
#include "nr_transport_common_proto.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
void
nr_codeword_unscrambling
(
int16_t
*
llr
,
uint32_t
size
,
uint8_t
q
,
uint32_t
Nid
,
uint32_t
n_RNTI
)
{
uint32_t
x1
;
uint32_t
x2
=
(
n_RNTI
<<
15
)
+
(
q
<<
14
)
+
Nid
;
uint32_t
s
=
0
;
#if defined(__x86_64__) || defined(__i386__)
uint8_t
*
s8
=
(
uint8_t
*
)
&
s
;
__m128i
*
llr128
=
(
__m128i
*
)
llr
;
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
1
);
for
(
int
i
=
0
,
j
=
0
;
i
<
((
size
>>
5
)
+
((
size
&
0x1f
)
>
0
?
1
:
0
));
i
++
,
j
+=
4
)
{
llr128
[
j
]
=
_mm_mullo_epi16
(
llr128
[
j
],
byte2m128i
[
s8
[
0
]]);
llr128
[
j
+
1
]
=
_mm_mullo_epi16
(
llr128
[
j
+
1
],
byte2m128i
[
s8
[
1
]]);
llr128
[
j
+
2
]
=
_mm_mullo_epi16
(
llr128
[
j
+
2
],
byte2m128i
[
s8
[
2
]]);
llr128
[
j
+
3
]
=
_mm_mullo_epi16
(
llr128
[
j
+
3
],
byte2m128i
[
s8
[
3
]]);
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
0
);
}
#else
uint8_t
reset
=
1
;
for
(
uint32_t
i
=
0
;
i
<
size
;
i
++
)
{
if
((
i
&
0x1f
)
==
0
)
{
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
}
if
(((
s
>>
(
i
&
0x1f
))
&
1
)
==
1
)
llr
[
i
]
=
-
llr
[
i
];
}
#endif
}
openair1/PHY/NR_TRANSPORT/nr_transport_common_proto.h
View file @
d5cff6ed
...
...
@@ -77,6 +77,8 @@ void nr_fill_du(uint16_t N_ZC,uint16_t *prach_root_sequence_map);
void
init_nr_prach_tables
(
int
N_ZC
);
void
nr_codeword_unscrambling
(
int16_t
*
llr
,
uint32_t
size
,
uint8_t
q
,
uint32_t
Nid
,
uint32_t
n_RNTI
);
/**@}*/
void
init_pucch2_luts
(
void
);
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch.c
View file @
d5cff6ed
...
...
@@ -33,7 +33,6 @@
#include <stdint.h>
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
int16_t
find_nr_ulsch
(
uint16_t
rnti
,
PHY_VARS_gNB
*
gNB
,
find_type_t
type
)
{
...
...
@@ -82,59 +81,9 @@ void nr_fill_ulsch(PHY_VARS_gNB *gNB,
}
void
nr_ulsch_unscrambling
(
int16_t
*
llr
,
uint32_t
size
,
uint8_t
q
,
uint32_t
Nid
,
uint32_t
n_RNTI
)
{
uint8_t
reset
;
uint32_t
x1
,
x2
,
s
=
0
;
reset
=
1
;
x2
=
(
n_RNTI
<<
15
)
+
Nid
;
for
(
uint32_t
i
=
0
;
i
<
size
;
i
++
)
{
if
((
i
&
0x1f
)
==
0
)
{
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
}
if
(((
s
>>
(
i
&
0x1f
))
&
1
)
==
1
)
llr
[
i
]
=
-
llr
[
i
];
}
}
void
nr_ulsch_unscrambling_optim
(
int16_t
*
llr
,
uint32_t
size
,
uint8_t
q
,
uint32_t
Nid
,
uint32_t
n_RNTI
)
{
#if defined(__x86_64__) || defined(__i386__)
uint32_t
x1
,
x2
,
s
=
0
;
x2
=
(
n_RNTI
<<
15
)
+
Nid
;
uint8_t
*
s8
=
(
uint8_t
*
)
&
s
;
__m128i
*
llr128
=
(
__m128i
*
)
llr
;
int
j
=
0
;
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
1
);
for
(
int
i
=
0
;
i
<
((
size
>>
5
)
+
((
size
&
0x1f
)
>
0
?
1
:
0
));
i
++
,
j
+=
4
)
{
llr128
[
j
]
=
_mm_mullo_epi16
(
llr128
[
j
],
byte2m128i
[
s8
[
0
]]);
llr128
[
j
+
1
]
=
_mm_mullo_epi16
(
llr128
[
j
+
1
],
byte2m128i
[
s8
[
1
]]);
llr128
[
j
+
2
]
=
_mm_mullo_epi16
(
llr128
[
j
+
2
],
byte2m128i
[
s8
[
2
]]);
llr128
[
j
+
3
]
=
_mm_mullo_epi16
(
llr128
[
j
+
3
],
byte2m128i
[
s8
[
3
]]);
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
0
);
}
#else
nr_ulsch_unscrambling
(
llr
,
size
,
q
,
Nid
,
n_RNTI
);
#endif
void
nr_ulsch_unscrambling
(
int16_t
*
llr
,
uint32_t
size
,
uint32_t
Nid
,
uint32_t
n_RNTI
)
{
nr_codeword_unscrambling
(
llr
,
size
,
0
,
Nid
,
n_RNTI
);
}
void
dump_pusch_stats
(
FILE
*
fd
,
PHY_VARS_gNB
*
gNB
)
{
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch.h
View file @
d5cff6ed
...
...
@@ -69,18 +69,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
@param n_RNTI, CRNTI
*/
void
nr_ulsch_unscrambling
(
int16_t
*
llr
,
uint32_t
size
,
uint8_t
q
,
uint32_t
Nid
,
uint32_t
n_RNTI
);
void
nr_ulsch_unscrambling_optim
(
int16_t
*
llr
,
uint32_t
size
,
uint8_t
q
,
uint32_t
Nid
,
uint32_t
n_RNTI
);
void
nr_ulsch_unscrambling
(
int16_t
*
llr
,
uint32_t
size
,
uint32_t
Nid
,
uint32_t
n_RNTI
);
void
nr_ulsch_procedures
(
PHY_VARS_gNB
*
gNB
,
int
frame_rx
,
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
d5cff6ed
...
...
@@ -206,25 +206,9 @@ NR_UE_DLSCH_t *new_nr_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint
return
(
NULL
);
}
void
nr_dlsch_unscrambling
(
int16_t
*
llr
,
uint32_t
size
,
uint8_t
q
,
uint32_t
Nid
,
uint32_t
n_RNTI
)
{
uint8_t
reset
;
uint32_t
x1
,
x2
,
s
=
0
;
reset
=
1
;
x2
=
(
n_RNTI
<<
15
)
+
(
q
<<
14
)
+
Nid
;
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
if
((
i
&
0x1f
)
==
0
)
{
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
}
if
(((
s
>>
(
i
&
0x1f
))
&
1
)
==
1
)
llr
[
i
]
=
-
llr
[
i
];
}
void
nr_dlsch_unscrambling
(
int16_t
*
llr
,
uint32_t
size
,
uint8_t
q
,
uint32_t
Nid
,
uint32_t
n_RNTI
)
{
nr_codeword_unscrambling
(
llr
,
size
,
q
,
Nid
,
n_RNTI
);
}
bool
nr_ue_postDecode
(
PHY_VARS_NR_UE
*
phy_vars_ue
,
notifiedFIFO_elt_t
*
req
,
bool
last
,
notifiedFIFO_t
*
nf_p
)
{
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
d5cff6ed
...
...
@@ -372,11 +372,10 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH
//------------------- ULSCH unscrambling -------------------
//----------------------------------------------------------
start_meas
(
&
gNB
->
ulsch_unscrambling_stats
);
nr_ulsch_unscrambling_optim
(
gNB
->
pusch_vars
[
ULSCH_id
]
->
llr
,
G
,
0
,
pusch_pdu
->
data_scrambling_id
,
pusch_pdu
->
rnti
);
nr_ulsch_unscrambling
(
gNB
->
pusch_vars
[
ULSCH_id
]
->
llr
,
G
,
pusch_pdu
->
data_scrambling_id
,
pusch_pdu
->
rnti
);
stop_meas
(
&
gNB
->
ulsch_unscrambling_stats
);
//----------------------------------------------------------
//--------------------- ULSCH decoding ---------------------
...
...
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