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
1bd84bf1
Commit
1bd84bf1
authored
4 years ago
by
Hongzhi Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update nr ue gold to simplified version
parent
e7edc37b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
60 deletions
+21
-60
openair1/PHY/NR_REFSIG/nr_gold_ue.c
openair1/PHY/NR_REFSIG/nr_gold_ue.c
+21
-60
No files found.
openair1/PHY/NR_REFSIG/nr_gold_ue.c
View file @
1bd84bf1
...
...
@@ -26,6 +26,7 @@ void nr_gold_pbch(PHY_VARS_NR_UE* ue)
unsigned
int
n
,
x1
,
x2
;
unsigned
int
Nid
,
i_ssb
,
i_ssb2
;
unsigned
char
Lmax
,
l
,
n_hf
,
N_hf
;
uint8_t
reset
;
Nid
=
ue
->
frame_parms
.
Nid_cell
;
Lmax
=
ue
->
frame_parms
.
Lmax
;
...
...
@@ -37,24 +38,13 @@ void nr_gold_pbch(PHY_VARS_NR_UE* ue)
i_ssb
=
l
&
(
Lmax
-
1
);
i_ssb2
=
i_ssb
+
(
n_hf
<<
2
);
x1
=
1
+
(
1
<<
31
)
;
reset
=
1
;
x2
=
(
1
<<
11
)
*
(
i_ssb2
+
1
)
*
((
Nid
>>
2
)
+
1
)
+
(
1
<<
6
)
*
(
i_ssb2
+
1
)
+
(
Nid
&
3
);
x2
=
x2
^
((
x2
^
(
x2
>>
1
)
^
(
x2
>>
2
)
^
(
x2
>>
3
))
<<
31
);
// skip first 50 double words (1600 bits)
for
(
n
=
1
;
n
<
50
;
n
++
)
{
x1
=
(
x1
>>
1
)
^
(
x1
>>
4
);
x1
=
x1
^
(
x1
<<
31
)
^
(
x1
<<
28
);
x2
=
(
x2
>>
1
)
^
(
x2
>>
2
)
^
(
x2
>>
3
)
^
(
x2
>>
4
);
x2
=
x2
^
(
x2
<<
31
)
^
(
x2
<<
30
)
^
(
x2
<<
29
)
^
(
x2
<<
28
);
}
for
(
n
=
0
;
n
<
NR_PBCH_DMRS_LENGTH_DWORD
;
n
++
)
{
x1
=
(
x1
>>
1
)
^
(
x1
>>
4
);
x1
=
x1
^
(
x1
<<
31
)
^
(
x1
<<
28
);
x2
=
(
x2
>>
1
)
^
(
x2
>>
2
)
^
(
x2
>>
3
)
^
(
x2
>>
4
);
x2
=
x2
^
(
x2
<<
31
)
^
(
x2
<<
30
)
^
(
x2
<<
29
)
^
(
x2
<<
28
);
ue
->
nr_gold_pbch
[
n_hf
][
l
][
n
]
=
x1
^
x2
;
for
(
n
=
0
;
n
<
NR_PBCH_DMRS_LENGTH_DWORD
;
n
++
)
{
ue
->
nr_gold_pbch
[
n_hf
][
l
][
n
]
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
}
}
...
...
@@ -69,6 +59,7 @@ void nr_gold_pdcch(PHY_VARS_NR_UE* ue,
unsigned
char
ns
,
l
;
unsigned
int
n
,
x1
,
x2
,
x2tmp0
;
unsigned
int
nid
;
uint8_t
reset
;
if
(
n_idDMRS
)
nid
=
n_idDMRS
;
...
...
@@ -79,28 +70,14 @@ void nr_gold_pdcch(PHY_VARS_NR_UE* ue,
for
(
l
=
0
;
l
<
length_dmrs
;
l
++
)
{
x2tmp0
=
((
14
*
ns
+
l
+
1
)
*
((
nid
<<
1
)
+
1
))
<<
17
;
reset
=
1
;
x2tmp0
=
((
ue
->
frame_parms
.
symbols_per_slot
*
ns
+
l
+
1
)
*
((
nid
<<
1
)
+
1
))
<<
17
;
x2
=
(
x2tmp0
+
(
nid
<<
1
))
%
(
1
<<
31
);
//cinit
x1
=
1
+
(
1
<<
31
);
x2
=
x2
^
((
x2
^
(
x2
>>
1
)
^
(
x2
>>
2
)
^
(
x2
>>
3
))
<<
31
);
// skip first 50 double words (1600 bits)
for
(
n
=
1
;
n
<
50
;
n
++
)
{
x1
=
(
x1
>>
1
)
^
(
x1
>>
4
);
x1
=
x1
^
(
x1
<<
31
)
^
(
x1
<<
28
);
x2
=
(
x2
>>
1
)
^
(
x2
>>
2
)
^
(
x2
>>
3
)
^
(
x2
>>
4
);
x2
=
x2
^
(
x2
<<
31
)
^
(
x2
<<
30
)
^
(
x2
<<
29
)
^
(
x2
<<
28
);
//printf("x1 : %x, x2 : %x\n",x1,x2);
}
for
(
n
=
0
;
n
<
52
;
n
++
)
{
x1
=
(
x1
>>
1
)
^
(
x1
>>
4
);
x1
=
x1
^
(
x1
<<
31
)
^
(
x1
<<
28
);
x2
=
(
x2
>>
1
)
^
(
x2
>>
2
)
^
(
x2
>>
3
)
^
(
x2
>>
4
);
x2
=
x2
^
(
x2
<<
31
)
^
(
x2
<<
30
)
^
(
x2
<<
29
)
^
(
x2
<<
28
);
ue
->
nr_gold_pdcch
[
0
][
ns
][
l
][
n
]
=
x1
^
x2
;
// if (ns==1 && l==0) printf("n=%d : c %x\n",n,x1^x2);
}
for
(
n
=
0
;
n
<
NR_MAX_PDCCH_DMRS_INIT_LENGTH_DWORD
;
n
++
)
{
ue
->
nr_gold_pdcch
[
0
][
ns
][
l
][
n
]
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
}
}
}
}
...
...
@@ -112,6 +89,7 @@ void nr_gold_pdsch(PHY_VARS_NR_UE* ue,
unsigned
int
n
,
x1
,
x2
,
x2tmp0
;
int
nscid
;
unsigned
int
nid
;
uint8_t
reset
;
/// to be updated from higher layer
//unsigned short lbar = 0;
...
...
@@ -126,34 +104,17 @@ void nr_gold_pdsch(PHY_VARS_NR_UE* ue,
for
(
ns
=
0
;
ns
<
ue
->
frame_parms
.
slots_per_frame
;
ns
++
)
{
for
(
l
=
0
;
l
<
14
;
l
++
)
{
for
(
l
=
0
;
l
<
ue
->
frame_parms
.
symbols_per_slot
;
l
++
)
{
x2tmp0
=
((
14
*
ns
+
l
+
1
)
*
((
nid
<<
1
)
+
1
))
<<
17
;
reset
=
1
;
x2tmp0
=
((
ue
->
frame_parms
.
symbols_per_slot
*
ns
+
l
+
1
)
*
((
nid
<<
1
)
+
1
))
<<
17
;
x2
=
(
x2tmp0
+
(
nid
<<
1
)
+
nscid
)
%
(
1
<<
31
);
//cinit
LOG_D
(
PHY
,
"UE DMRS slot %d, symb %d, x2 %x, nscid %d
\n
"
,
ns
,
l
,
x2
,
nscid
);
//printf("ns %d gold pdsch x2 %d\n",ns,x2);
x1
=
1
+
(
1
<<
31
);
x2
=
x2
^
((
x2
^
(
x2
>>
1
)
^
(
x2
>>
2
)
^
(
x2
>>
3
))
<<
31
);
// skip first 50 double words (1600 bits)
for
(
n
=
1
;
n
<
50
;
n
++
)
{
x1
=
(
x1
>>
1
)
^
(
x1
>>
4
);
x1
=
x1
^
(
x1
<<
31
)
^
(
x1
<<
28
);
x2
=
(
x2
>>
1
)
^
(
x2
>>
2
)
^
(
x2
>>
3
)
^
(
x2
>>
4
);
x2
=
x2
^
(
x2
<<
31
)
^
(
x2
<<
30
)
^
(
x2
<<
29
)
^
(
x2
<<
28
);
//printf("x1 : %x, x2 : %x\n",x1,x2);
}
for
(
n
=
0
;
n
<
NR_MAX_PDSCH_DMRS_INIT_LENGTH_DWORD
;
n
++
)
{
x1
=
(
x1
>>
1
)
^
(
x1
>>
4
);
x1
=
x1
^
(
x1
<<
31
)
^
(
x1
<<
28
);
x2
=
(
x2
>>
1
)
^
(
x2
>>
2
)
^
(
x2
>>
3
)
^
(
x2
>>
4
);
x2
=
x2
^
(
x2
<<
31
)
^
(
x2
<<
30
)
^
(
x2
<<
29
)
^
(
x2
<<
28
);
ue
->
nr_gold_pdsch
[
0
][
ns
][
l
][
nscid
][
n
]
=
x1
^
x2
;
// if ((ns==2)&&(l==0))
//printf("n=%d : c %x\n",n,x1^x2);
}
ue
->
nr_gold_pdsch
[
0
][
ns
][
l
][
nscid
][
n
]
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
}
}
}
}
...
...
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