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
OpenXG
OpenXG UE
Commits
92fc59cd
Commit
92fc59cd
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
253b56da
Changes
4
Hide 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 @
92fc59cd
...
@@ -101,11 +101,11 @@ static inline uint64_t BIT_STRING_to_uint64(BIT_STRING_t *asn) {
...
@@ -101,11 +101,11 @@ static inline uint64_t BIT_STRING_to_uint64(BIT_STRING_t *asn) {
shift
=
((
asn
->
size
-
1
)
*
8
)
-
asn
->
bits_unused
;
shift
=
((
asn
->
size
-
1
)
*
8
)
-
asn
->
bits_unused
;
for
(
index
=
0
;
index
<
(
asn
->
size
-
1
);
index
++
)
{
for
(
index
=
0
;
index
<
(
asn
->
size
-
1
);
index
++
)
{
result
|=
asn
->
buf
[
index
]
<<
shift
;
result
|=
((
uint64_t
)
asn
->
buf
[
index
])
<<
shift
;
shift
-=
8
;
shift
-=
8
;
}
}
result
|=
asn
->
buf
[
index
]
>>
asn
->
bits_unused
;
result
|=
((
uint64_t
)
asn
->
buf
[
index
])
>>
asn
->
bits_unused
;
return
result
;
return
result
;
}
}
...
...
openair1/PHY/INIT/nr_parms.c
View file @
92fc59cd
...
@@ -385,7 +385,7 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
...
@@ -385,7 +385,7 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
fp
->
Lmax
=
64
;
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
;
fp
->
N_ssb
=
0
;
for
(
int
p
=
0
;
p
<
fp
->
Lmax
;
p
++
)
for
(
int
p
=
0
;
p
<
fp
->
Lmax
;
p
++
)
...
...
openair2/GNB_APP/gnb_config.c
View file @
92fc59cd
...
@@ -223,20 +223,12 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) {
...
@@ -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
.
bits_unused
=
4
;
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
=
CALLOC
(
1
,
1
);
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
=
CALLOC
(
1
,
1
);
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
[
0
]
=
0
;
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
[
0
]
=
0
;
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
[
0
]
=
ssbmap
&
0xF0
;
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
;
}
}
else
if
(
ssbmaplen
==
NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_mediumBitmap
){
}
else
if
(
ssbmaplen
==
NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_mediumBitmap
){
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
size
=
1
;
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
size
=
1
;
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
bits_unused
=
0
;
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
bits_unused
=
0
;
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
=
CALLOC
(
1
,
1
);
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
=
CALLOC
(
1
,
1
);
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
[
0
]
=
0
;
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
[
0
]
=
ssbmap
;
for
(
int
i
=
0
;
i
<
8
;
i
++
)
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
[
0
]
|=
(((
ssbmap
>>
(
7
-
i
))
&
0x01
)
<<
i
);
}
else
{
}
else
{
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
size
=
8
;
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
size
=
8
;
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
bits_unused
=
0
;
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
bits_unused
=
0
;
...
@@ -244,8 +236,7 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) {
...
@@ -244,8 +236,7 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) {
for
(
int
j
=
0
;
j
<
8
;
j
++
)
{
for
(
int
j
=
0
;
j
<
8
;
j
++
)
{
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
7
-
j
]
=
0
;
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
7
-
j
]
=
0
;
curr_bit
=
(
ssbmap
>>
(
j
<<
3
))
&
(
0xff
);
curr_bit
=
(
ssbmap
>>
(
j
<<
3
))
&
(
0xff
);
for
(
int
i
=
0
;
i
<
8
;
i
++
)
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
7
-
j
]
=
curr_bit
;
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
7
-
j
]
|=
(((
curr_bit
>>
(
7
-
i
))
&
0x01
)
<<
i
);
}
}
}
}
...
...
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
92fc59cd
...
@@ -244,8 +244,8 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
...
@@ -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
[
0
].
ssb_mask
=
0
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
=
0
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
=
0
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
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
[
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
]
<<
i
*
8
);
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
+=
(
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
i
+
4
]
<<
i
*
8
);
}
}
break
;
break
;
default:
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