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
alex037yang
OpenXG-RAN
Commits
8c68f374
Commit
8c68f374
authored
Apr 02, 2020
by
cig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prachsim compilation and NR PRACH UE fixes
parent
7f00dbc5
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
298 additions
and
277 deletions
+298
-277
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-1
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
+16
-22
openair1/SIMULATION/NR_PHY/prachsim.c
openair1/SIMULATION/NR_PHY/prachsim.c
+281
-254
No files found.
cmake_targets/CMakeLists.txt
View file @
8c68f374
...
...
@@ -2822,7 +2822,7 @@ add_executable(nr_prachsim
${
T_SOURCE
}
${
SHLIB_LOADER_SOURCES
}
)
target_link_libraries
(
nr_prachsim
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB SCHED_NR_UE_LIB RRC_LIB NR_RRC_LIB L2_NR CONFIG_LIB -Wl,--end-group m pthread
${
ATLAS_LIBRARIES
}
${
T_LIB
}
${
ITTI_LIB
}
dl
)
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB
MAC_UE_NR
SCHED_NR_UE_LIB RRC_LIB NR_RRC_LIB L2_NR CONFIG_LIB -Wl,--end-group m pthread
${
ATLAS_LIBRARIES
}
${
T_LIB
}
${
ITTI_LIB
}
dl
)
add_executable
(
nr_ulschsim
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/ulschsim.c
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
View file @
8c68f374
...
...
@@ -75,8 +75,8 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){
fapi_nr_ul_config_prach_pdu
*
prach_pdu
=
&
ue
->
prach_vars
[
gNB_id
]
->
prach_pdu
;
uint8_t
Mod_id
,
fd_occasion
,
preamble_index
,
restricted_set
,
not_found
;
uint16_t
rootSequenceIndex
,
prach_fmt_id
,
NCS
,
*
prach_root_sequence_map
,
preamble_offset
;
uint16_t
preamble_shift
,
preamble_index0
,
n_shift_ra
,
n_shift_ra_bar
,
d_start
,
numshift
,
N_ZC
,
u
,
offset
,
offset2
,
first_nonzero_root_idx
;
uint16_t
rootSequenceIndex
,
prach_fmt_id
,
NCS
,
*
prach_root_sequence_map
,
preamble_offset
=
0
;
uint16_t
preamble_shift
=
0
,
preamble_index0
,
n_shift_ra
,
n_shift_ra_bar
,
d_start
,
numshift
,
N_ZC
,
u
,
offset
,
offset2
,
first_nonzero_root_idx
;
int16_t
prach_tmp
[
98304
*
2
*
4
]
__attribute__
((
aligned
(
32
)));
int16_t
Ncp
,
amp
,
*
prach
,
*
prach2
,
*
prachF
,
*
Xu
;
int32_t
Xu_re
,
Xu_im
,
samp_count
;
...
...
@@ -125,7 +125,7 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){
if
(
prach_start
>=
(
fp
->
samples_per_subframe
*
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
))
prach_start
-=
(
fp
->
samples_per_subframe
*
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
);
#else //normal case (simulation)
prach_start
=
slot
*
(
fp
->
samples_per_subframe
)
-
ue
->
N_TA_offset
;
prach_start
=
slot
*
samp_count
-
ue
->
N_TA_offset
;
#endif
// First compute physical root sequence
...
...
@@ -138,10 +138,9 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){
prach_root_sequence_map
=
(
prach_sequence_length
==
0
)
?
prach_root_sequence_map_0_3
:
prach_root_sequence_map_abc
;
// This is the relative offset (for unrestricted case) in the root sequence table (5.7.2-4 from 36.211) for the given preamble index
preamble_offset
=
((
NCS
==
0
)
?
preamble_index
:
(
preamble_index
/
(
N_ZC
/
NCS
)));
if
(
restricted_set
==
0
)
{
// This is the relative offset (for unrestricted case) in the root sequence table (5.7.2-4 from 36.211) for the given preamble index
preamble_offset
=
((
NCS
==
0
)
?
preamble_index
:
(
preamble_index
/
(
N_ZC
/
NCS
)));
// This is the \nu corresponding to the preamble index
preamble_shift
=
(
NCS
==
0
)
?
0
:
(
preamble_index
%
(
N_ZC
/
NCS
));
preamble_shift
*=
NCS
;
...
...
@@ -204,9 +203,6 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){
}
}
preamble_offset
=
0
;
preamble_shift
=
0
;
// now generate PRACH signal
#ifdef NR_PRACH_DEBUG
if
(
NCS
>
0
)
...
...
@@ -465,17 +461,17 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){
}
}
else
{
// short PRACH sequence
if
(
prach_fmt_id
==
0
||
prach_fmt_id
==
3
||
prach_fmt_id
==
7
)
{
Ncp
+=
32
;
// This assumes we are transmitting starting in symbol 0 of a PRACH slot, 30 kHz, full sampling
prach2
=
prach
+
(
Ncp
<<
1
);
idft2048
(
prachF
,
prach2
,
1
);
// here we have |empty | Prach2048 |
if
(
prach_fmt_id
!=
7
)
{
memmove
(
prach2
+
(
2048
<<
1
),
prach2
,(
2048
<<
2
));
prach_len
=
(
2048
*
2
)
+
Ncp
;
}
else
prach_len
=
(
2048
*
1
)
+
Ncp
;
memmove
(
prach
,
prach
+
(
2048
<<
1
),(
Ncp
<<
2
));
// here we have |Prefix | Prach2048 | Prach2048 (if ! 0xc0) |
Ncp
+=
32
;
// This assumes we are transmitting starting in symbol 0 of a PRACH slot, 30 kHz, full sampling
prach2
=
prach
+
(
Ncp
<<
1
);
idft2048
(
prachF
,
prach2
,
1
);
// here we have |empty | Prach2048 |
if
(
prach_fmt_id
!=
7
)
{
memmove
(
prach2
+
(
2048
<<
1
),
prach2
,(
2048
<<
2
));
prach_len
=
(
2048
*
2
)
+
Ncp
;
}
else
prach_len
=
(
2048
*
1
)
+
Ncp
;
memmove
(
prach
,
prach
+
(
2048
<<
1
),(
Ncp
<<
2
));
// here we have |Prefix | Prach2048 | Prach2048 (if ! 0xc0) |
}
else
if
(
prach_fmt_id
==
1
||
prach_fmt_id
==
4
)
{
// 6x2048
Ncp
+=
32
;
// This assumes we are transmitting starting in symbol 0 of a PRACH slot, 30 kHz, full sampling
prach2
=
prach
+
(
Ncp
<<
1
);
...
...
@@ -573,8 +569,6 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){
}
else
if
(
prach_fmt_id
==
1
||
prach_fmt_id
==
4
)
{
// 6x1536
printf
(
" CHECK 3/4 sampling prachFormat == 0xa2
\n
"
);
Ncp
+=
24
;
// This assumes we are transmitting starting in symbol 0 of a PRACH slot, 30 kHz, full sampling
prach2
=
prach
+
(
Ncp
<<
1
);
idft1536
(
prachF
,
prach2
,
1
);
...
...
openair1/SIMULATION/NR_PHY/prachsim.c
View file @
8c68f374
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