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
Michael Black
OpenXG-RAN
Commits
638d8f8d
Commit
638d8f8d
authored
Aug 26, 2020
by
Mario Hudon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix endianness handling of the ssb_PositionsInBurst
parent
8ea4897f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
17 deletions
+8
-17
common/utils/asn1_conversions.h
common/utils/asn1_conversions.h
+2
-2
openair1/PHY/INIT/nr_parms.c
openair1/PHY/INIT/nr_parms.c
+1
-1
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+3
-12
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+2
-2
No files found.
common/utils/asn1_conversions.h
View file @
638d8f8d
...
...
@@ -101,11 +101,11 @@ static inline uint64_t BIT_STRING_to_uint64(BIT_STRING_t *asn) {
shift
=
((
asn
->
size
-
1
)
*
8
)
-
asn
->
bits_unused
;
for
(
index
=
0
;
index
<
(
asn
->
size
-
1
);
index
++
)
{
result
|=
asn
->
buf
[
index
]
<<
shift
;
result
|=
((
uint64_t
)
asn
->
buf
[
index
])
<<
shift
;
shift
-=
8
;
}
result
|=
asn
->
buf
[
index
]
>>
asn
->
bits_unused
;
result
|=
((
uint64_t
)
asn
->
buf
[
index
])
>>
asn
->
bits_unused
;
return
result
;
}
...
...
openair1/PHY/INIT/nr_parms.c
View file @
638d8f8d
...
...
@@ -385,7 +385,7 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
fp
->
Lmax
=
64
;
}
fp
->
L_ssb
=
(((
uint64_t
)
config
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
)
<<
32
)
|
config
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
;
fp
->
L_ssb
=
(((
uint64_t
)
config
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
)
<<
32
)
|
config
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
;
fp
->
N_ssb
=
0
;
for
(
int
p
=
0
;
p
<
fp
->
Lmax
;
p
++
)
...
...
openair2/GNB_APP/gnb_config.c
View file @
638d8f8d
...
...
@@ -223,20 +223,12 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) {
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
bits_unused
=
4
;
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
=
CALLOC
(
1
,
1
);
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
[
0
]
=
0
;
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
if
(
i
<
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
bits_unused
)
curr_bit
=
0
;
else
curr_bit
=
(
ssbmap
>>
(
7
-
i
))
&
0x01
;
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
[
0
]
|=
curr_bit
<<
i
;
}
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
[
0
]
=
ssbmap
&
0xF0
;
}
else
if
(
ssbmaplen
==
NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_mediumBitmap
){
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
size
=
1
;
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
bits_unused
=
0
;
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
=
CALLOC
(
1
,
1
);
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
[
0
]
=
0
;
for
(
int
i
=
0
;
i
<
8
;
i
++
)
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
[
0
]
|=
(((
ssbmap
>>
(
7
-
i
))
&
0x01
)
<<
i
);
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
[
0
]
=
ssbmap
;
}
else
{
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
size
=
8
;
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
bits_unused
=
0
;
...
...
@@ -244,8 +236,7 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) {
for
(
int
j
=
0
;
j
<
8
;
j
++
)
{
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
7
-
j
]
=
0
;
curr_bit
=
(
ssbmap
>>
(
j
<<
3
))
&
(
0xff
);
for
(
int
i
=
0
;
i
<
8
;
i
++
)
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
7
-
j
]
|=
(((
curr_bit
>>
(
7
-
i
))
&
0x01
)
<<
i
);
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
7
-
j
]
=
curr_bit
;
}
}
...
...
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
638d8f8d
...
...
@@ -244,8 +244,8 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
=
0
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
=
0
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
+=
(
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
i
+
4
]
<<
i
*
8
);
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
+=
(
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
i
]
<<
i
*
8
);
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
+=
(
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
i
]
<<
i
*
8
);
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
+=
(
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
i
+
4
]
<<
i
*
8
);
}
break
;
default:
...
...
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