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
zzha zzha
OpenXG-RAN
Commits
014e0290
Commit
014e0290
authored
Aug 24, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/fix-mem-overflow_64qam' into integration_2023_w34
parents
9f7e553e
4c3d8e75
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
57 deletions
+57
-57
openair1/PHY/MODULATION/nr_modulation.c
openair1/PHY/MODULATION/nr_modulation.c
+54
-55
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+3
-2
No files found.
openair1/PHY/MODULATION/nr_modulation.c
View file @
014e0290
...
...
@@ -121,10 +121,7 @@ void nr_modulation(uint32_t *in,
uint8_t
*
in_bytes
=
(
uint8_t
*
)
in
;
uint64_t
*
in64
=
(
uint64_t
*
)
in
;
int64_t
*
out64
=
(
int64_t
*
)
out
;
uint8_t
idx
;
uint32_t
i
,
j
;
uint32_t
bit_cnt
;
uint64_t
x
,
x1
,
x2
;
uint32_t
i
;
#if defined(__SSE2__)
__m128i
*
nr_mod_table128
;
...
...
@@ -145,7 +142,7 @@ void nr_modulation(uint32_t *in,
i
=
i
*
8
/
2
;
nr_mod_table32
=
(
int32_t
*
)
nr_qpsk_mod_table
;
while
(
i
<
length
/
2
)
{
idx
=
((
in_bytes
[(
i
*
2
)
/
8
]
>>
((
i
*
2
)
&
0x7
))
&
mask
);
const
int
idx
=
((
in_bytes
[(
i
*
2
)
/
8
]
>>
((
i
*
2
)
&
0x7
))
&
mask
);
out32
[
i
]
=
nr_mod_table32
[
idx
];
i
++
;
}
...
...
@@ -154,7 +151,7 @@ void nr_modulation(uint32_t *in,
case
2
:
nr_mod_table32
=
(
int32_t
*
)
nr_qpsk_mod_table
;
for
(
i
=
0
;
i
<
length
/
mod_order
;
i
++
)
{
idx
=
((
in
[
i
*
2
/
32
]
>>
((
i
*
2
)
&
0x1f
))
&
mask
);
const
int
idx
=
((
in
[
i
*
2
/
32
]
>>
((
i
*
2
)
&
0x1f
))
&
mask
);
out32
[
i
]
=
nr_mod_table32
[
idx
];
}
return
;
...
...
@@ -167,66 +164,68 @@ void nr_modulation(uint32_t *in,
// the bits that are left out
i
=
i
*
8
/
4
;
while
(
i
<
length
/
4
)
{
idx
=
((
in_bytes
[(
i
*
4
)
/
8
]
>>
((
i
*
4
)
&
0x7
))
&
mask
);
const
int
idx
=
((
in_bytes
[(
i
*
4
)
/
8
]
>>
((
i
*
4
)
&
0x7
))
&
mask
);
out32
[
i
]
=
nr_16qam_mod_table
[
idx
];
i
++
;
}
return
;
case
6
:
j
=
0
;
for
(
i
=
0
;
i
<
length
/
192
;
i
++
)
{
x
=
in64
[
i
*
3
];
x1
=
x
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x
>>
12
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x
>>
24
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x
>>
36
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x
>>
48
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x2
=
(
x
>>
60
);
x
=
in64
[
i
*
3
+
1
];
for
(
i
=
0
;
i
<
length
-
3
*
64
;
i
+=
3
*
64
)
{
uint64_t
x
=
*
in64
++
;
uint64_t
x1
=
x
&
0xfff
;
*
out64
++
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x
>>
12
)
&
0xfff
;
*
out64
++
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x
>>
24
)
&
0xfff
;
*
out64
++
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x
>>
36
)
&
0xfff
;
*
out64
++
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x
>>
48
)
&
0xfff
;
*
out64
++
=
nr_64qam_mod_table
[
x1
];
uint64_t
x2
=
(
x
>>
60
);
x
=
*
in64
++
;
x2
|=
x
<<
4
;
x1
=
x2
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
12
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
24
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
36
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
48
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
x2
&
0xfff
;
*
out64
++
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
12
)
&
0xfff
;
*
out64
++
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
24
)
&
0xfff
;
*
out64
++
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
36
)
&
0xfff
;
*
out64
++
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
48
)
&
0xfff
;
*
out64
++
=
nr_64qam_mod_table
[
x1
];
x2
=
((
x
>>
56
)
&
0xf0
)
|
(
x2
>>
60
);
x
=
in64
[
i
*
3
+
2
]
;
x
=
*
in64
++
;
x2
|=
x
<<
8
;
x1
=
x2
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
12
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
24
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
36
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
48
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
x2
&
0xfff
;
*
out64
++
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
12
)
&
0xfff
;
*
out64
++
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
24
)
&
0xfff
;
*
out64
++
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
36
)
&
0xfff
;
*
out64
++
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
48
)
&
0xfff
;
*
out64
++
=
nr_64qam_mod_table
[
x1
];
x2
=
((
x
>>
52
)
&
0xff0
)
|
(
x2
>>
60
);
out64
[
j
++
]
=
nr_64qam_mod_table
[
x2
];
*
out64
++
=
nr_64qam_mod_table
[
x2
];
}
i
*=
24
;
bit_cnt
=
i
*
8
;
while
(
bit_cnt
<
length
)
{
uint32_t
xx
;
memcpy
(
&
xx
,
in_bytes
+
i
,
sizeof
(
xx
));
x1
=
xx
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
xx
>>
12
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
i
+=
3
;
bit_cnt
+=
24
;
while
(
i
+
24
<=
length
)
{
uint32_t
xx
=
0
;
memcpy
(
&
xx
,
in_bytes
+
i
/
8
,
3
);
uint64_t
x1
=
xx
&
0xfff
;
*
out64
++
=
nr_64qam_mod_table
[
x1
];
x1
=
(
xx
>>
12
)
&
0xfff
;
*
out64
++
=
nr_64qam_mod_table
[
x1
];
i
+=
24
;
}
if
(
i
!=
length
)
{
uint32_t
xx
=
0
;
memcpy
(
&
xx
,
in_bytes
+
i
/
8
,
2
);
uint64_t
x1
=
xx
&
0xfff
;
*
out64
++
=
nr_64qam_mod_table
[
x1
];
}
return
;
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
View file @
014e0290
...
...
@@ -184,8 +184,9 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
///////////
uint32_t
available_bits
=
G
;
uint32_t
scrambled_output
[(
available_bits
>>
5
)
+
1
];
memset
(
scrambled_output
,
0
,
((
available_bits
>>
5
)
+
1
)
*
sizeof
(
uint32_t
));
// +1 because size can be not modulo 4
uint32_t
scrambled_output
[
available_bits
/
(
8
*
sizeof
(
uint32_t
))
+
1
];
memset
(
scrambled_output
,
0
,
sizeof
(
scrambled_output
));
nr_pusch_codeword_scrambling
(
harq_process_ul_ue
->
f
,
available_bits
,
...
...
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