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
canghaiwuhen
OpenXG-RAN
Commits
3f38b447
Commit
3f38b447
authored
Jul 04, 2020
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prachsim functional for format A2 and 0. added format 0 test to CI autotests
parent
7176bb46
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
21 deletions
+24
-21
cmake_targets/autotests/test_case_list.xml
cmake_targets/autotests/test_case_list.xml
+8
-6
openair1/PHY/NR_TRANSPORT/nr_prach.c
openair1/PHY/NR_TRANSPORT/nr_prach.c
+1
-2
openair1/PHY/NR_TRANSPORT/nr_prach_common.c
openair1/PHY/NR_TRANSPORT/nr_prach_common.c
+1
-1
openair1/SIMULATION/NR_PHY/prachsim.c
openair1/SIMULATION/NR_PHY/prachsim.c
+11
-12
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+3
-0
No files found.
cmake_targets/autotests/test_case_list.xml
View file @
3f38b447
...
@@ -1299,18 +1299,20 @@
...
@@ -1299,18 +1299,20 @@
<testCase
id=
"015112"
>
<testCase
id=
"015112"
>
<class>
execution
</class>
<class>
execution
</class>
<desc>
nr_prachsim Test cases. (Test1: 106 PRBs),
<desc>
nr_prachsim Test cases. (Test1: 106 PRBs - Prach format A2),
(Test2: 217 PRBs),
(Test2: 217 PRBs - Prach format A2),
(Test3: 273 PRBs)
</desc>
(Test3: 273 PRBs - Prach format A2),
(Test4: 106 PRBs - Prach format 0)
</desc>
<pre_compile_prog></pre_compile_prog>
<pre_compile_prog></pre_compile_prog>
<compile_prog>
$OPENAIR_DIR/cmake_targets/build_oai
</compile_prog>
<compile_prog>
$OPENAIR_DIR/cmake_targets/build_oai
</compile_prog>
<compile_prog_args>
--phy_simulators -c
</compile_prog_args>
<compile_prog_args>
--phy_simulators -c
</compile_prog_args>
<pre_exec>
$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash
</pre_exec>
<pre_exec>
$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash
</pre_exec>
<pre_exec_args></pre_exec_args>
<pre_exec_args></pre_exec_args>
<main_exec>
$OPENAIR_DIR/targets/bin/nr_prachsim.Rel15
</main_exec>
<main_exec>
$OPENAIR_DIR/targets/bin/nr_prachsim.Rel15
</main_exec>
<main_exec_args>
-a -s -30 -n 100 -p 16 -R 106
<main_exec_args>
-a -s -30 -n 100 -p 63 -R 106
-a -s -30 -n 100 -p 16 -R 217
-a -s -30 -n 100 -p 63 -R 217
-a -s -30 -n 100 -p 16 -R 273
</main_exec_args>
-a -s -30 -n 100 -p 63 -R 273
-a -s -30 -n 100 -p 63 -R 106 -c 4
</main_exec_args>
<tags>
nr_prachsim.test1 nr_prachsim.test2 nr_prachsim.test3
</tags>
<tags>
nr_prachsim.test1 nr_prachsim.test2 nr_prachsim.test3
</tags>
<search_expr_true>
PRACH test OK
</search_expr_true>
<search_expr_true>
PRACH test OK
</search_expr_true>
<search_expr_false>
segmentation fault|assertion|exiting|fatal
</search_expr_false>
<search_expr_false>
segmentation fault|assertion|exiting|fatal
</search_expr_false>
...
...
openair1/PHY/NR_TRANSPORT/nr_prach.c
View file @
3f38b447
...
@@ -752,8 +752,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
...
@@ -752,8 +752,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
// check energy in nth time shift, for
// check energy in nth time shift, for
preamble_shift2
=
((
preamble_shift
==
0
)
?
0
:
((
preamble_shift
<<
log2_ifft_size
)
/
N_ZC
));
preamble_shift2
=
((
preamble_shift
==
0
)
?
0
:
((
preamble_shift
<<
log2_ifft_size
)
/
N_ZC
));
for
(
i
=
0
;
i
<
NCS2
;
i
++
)
{
for
(
i
=
0
;
i
<
NCS2
;
i
++
)
{
lev
=
(
int32_t
)
prach_ifft
[(
preamble_shift2
+
i
)];
lev
=
(
int32_t
)
prach_ifft
[(
preamble_shift2
+
i
)];
levdB
=
dB_fixed_times10
(
lev
);
levdB
=
dB_fixed_times10
(
lev
);
...
...
openair1/PHY/NR_TRANSPORT/nr_prach_common.c
View file @
3f38b447
...
@@ -139,7 +139,7 @@ void compute_nr_prach_seq(uint8_t short_sequence,
...
@@ -139,7 +139,7 @@ void compute_nr_prach_seq(uint8_t short_sequence,
}
}
u
=
prach_root_sequence_map
[
index
];
u
=
prach_root_sequence_map
[
index
];
LOG_D
(
PHY
,
"prach index %d => u=%d
\n
"
,
index
,
u
);
inv_u
=
nr_ZC_inv
[
u
];
// multiplicative inverse of u
inv_u
=
nr_ZC_inv
[
u
];
// multiplicative inverse of u
...
...
openair1/SIMULATION/NR_PHY/prachsim.c
View file @
3f38b447
...
@@ -339,6 +339,8 @@ int main(int argc, char **argv){
...
@@ -339,6 +339,8 @@ int main(int argc, char **argv){
if
(
config_index
<
67
)
{
prach_sequence_length
=
0
;
slot
=
subframe
*
2
;
slot_gNB
=
1
+
(
subframe
*
2
);
}
if
(
config_index
<
67
)
{
prach_sequence_length
=
0
;
slot
=
subframe
*
2
;
slot_gNB
=
1
+
(
subframe
*
2
);
}
uint16_t
N_ZC
;
N_ZC
=
prach_sequence_length
==
0
?
839
:
139
;
printf
(
"Config_index %d, prach_sequence_length %d
\n
"
,
config_index
,
prach_sequence_length
);
printf
(
"Config_index %d, prach_sequence_length %d
\n
"
,
config_index
,
prach_sequence_length
);
...
@@ -485,8 +487,8 @@ int main(int argc, char **argv){
...
@@ -485,8 +487,8 @@ int main(int argc, char **argv){
prach_config
->
num_prach_fd_occasions_list
[
fd_occasion
].
k1
.
value
=
msg1_frequencystart
;
prach_config
->
num_prach_fd_occasions_list
[
fd_occasion
].
k1
.
value
=
msg1_frequencystart
;
prach_config
->
restricted_set_config
.
value
=
restrictedSetConfig
;
prach_config
->
restricted_set_config
.
value
=
restrictedSetConfig
;
prach_config
->
prach_sequence_length
.
value
=
prach_sequence_length
;
prach_config
->
prach_sequence_length
.
value
=
prach_sequence_length
;
prach_config
->
num_prach_fd_occasions_list
[
fd_occasion
].
num_root_sequences
.
value
=
num_root_sequences
;
prach_pdu
->
num_cs
=
get_NCS
(
NCS_config
,
format0
,
restrictedSetConfig
);
prach_pdu
->
num_cs
=
get_NCS
(
NCS_config
,
format0
,
restrictedSetConfig
);
prach_config
->
num_prach_fd_occasions_list
[
fd_occasion
].
num_root_sequences
.
value
=
1
+
(
64
/
(
N_ZC
/
prach_pdu
->
num_cs
));
prach_pdu
->
prach_format
=
prach_format
;
prach_pdu
->
prach_format
=
prach_format
;
memcpy
((
void
*
)
&
ru
->
config
,(
void
*
)
&
RC
.
gNB
[
0
]
->
gNB_config
,
sizeof
(
ru
->
config
));
memcpy
((
void
*
)
&
ru
->
config
,(
void
*
)
&
RC
.
gNB
[
0
]
->
gNB_config
,
sizeof
(
ru
->
config
));
...
@@ -525,7 +527,7 @@ int main(int argc, char **argv){
...
@@ -525,7 +527,7 @@ int main(int argc, char **argv){
ue_prach_config
->
prach_sub_c_spacing
=
mu
;
ue_prach_config
->
prach_sub_c_spacing
=
mu
;
ue_prach_config
->
prach_sequence_length
=
prach_sequence_length
;
ue_prach_config
->
prach_sequence_length
=
prach_sequence_length
;
ue_prach_config
->
restricted_set_config
=
restrictedSetConfig
;
ue_prach_config
->
restricted_set_config
=
restrictedSetConfig
;
ue_prach_config
->
num_prach_fd_occasions_list
[
fd_occasion
].
num_root_sequences
=
num_root_sequences
;
ue_prach_config
->
num_prach_fd_occasions_list
[
fd_occasion
].
num_root_sequences
=
prach_config
->
num_prach_fd_occasions_list
[
fd_occasion
].
num_root_sequences
.
value
;
ue_prach_config
->
num_prach_fd_occasions_list
[
fd_occasion
].
prach_root_sequence_index
=
rootSequenceIndex
;
ue_prach_config
->
num_prach_fd_occasions_list
[
fd_occasion
].
prach_root_sequence_index
=
rootSequenceIndex
;
ue_prach_config
->
num_prach_fd_occasions_list
[
fd_occasion
].
k1
=
msg1_frequencystart
;
ue_prach_config
->
num_prach_fd_occasions_list
[
fd_occasion
].
k1
=
msg1_frequencystart
;
...
@@ -601,13 +603,10 @@ int main(int argc, char **argv){
...
@@ -601,13 +603,10 @@ int main(int argc, char **argv){
/* tx_lev_dB not used later, no need to set */
/* tx_lev_dB not used later, no need to set */
//tx_lev_dB = (unsigned int) dB_fixed(tx_lev);
//tx_lev_dB = (unsigned int) dB_fixed(tx_lev);
samp_count
=
0
;
prach_start
=
subframe
*
frame_parms
->
samples_per_subframe
-
UE
->
N_TA_offset
;
for
(
int
s
=
0
;
s
<
slot
;
s
++
)
samp_count
+=
frame_parms
->
get_samples_per_slot
(
s
,
frame_parms
);
prach_start
=
samp_count
-
UE
->
N_TA_offset
;
#ifdef NR_PRACH_DEBUG
#ifdef NR_PRACH_DEBUG
LOG_M
(
"txsig0.m"
,
"txs0"
,
&
txdata
[
0
][
prach_start
],
frame_parms
->
samples_per_subframe
,
1
,
1
);
LOG_M
(
"txsig0.m"
,
"txs0"
,
&
txdata
[
0
][
subframe
*
frame_parms
->
samples_per_subframe
],
frame_parms
->
samples_per_subframe
,
1
,
1
);
LOG_M
(
"txsig0_frame.m"
,
"txs0"
,
txdata
[
0
],
frame_parms
->
samples_per_frame
,
1
,
1
);
LOG_M
(
"txsig0_frame.m"
,
"txs0"
,
txdata
[
0
],
frame_parms
->
samples_per_frame
,
1
,
1
);
#endif
#endif
...
@@ -651,8 +650,8 @@ int main(int argc, char **argv){
...
@@ -651,8 +650,8 @@ int main(int argc, char **argv){
rx_prach_start
=
subframe
*
frame_parms
->
samples_per_subframe
;
rx_prach_start
=
subframe
*
frame_parms
->
samples_per_subframe
;
if
(
n_frames
==
1
)
printf
(
"slot %d, rx_prach_start %d
\n
"
,
slot
,
rx_prach_start
);
if
(
n_frames
==
1
)
printf
(
"slot %d, rx_prach_start %d
\n
"
,
slot
,
rx_prach_start
);
uint16_t
preamble_rx
,
preamble_energy
,
N_ZC
;
uint16_t
preamble_rx
,
preamble_energy
;
N_ZC
=
prach_sequence_length
==
0
?
839
:
139
;
for
(
SNR
=
snr0
;
SNR
<
snr1
;
SNR
+=
.
1
)
{
for
(
SNR
=
snr0
;
SNR
<
snr1
;
SNR
+=
.
1
)
{
for
(
ue_speed
=
ue_speed0
;
ue_speed
<
ue_speed1
;
ue_speed
+=
10
)
{
for
(
ue_speed
=
ue_speed0
;
ue_speed
<
ue_speed1
;
ue_speed
+=
10
)
{
...
@@ -703,7 +702,7 @@ int main(int argc, char **argv){
...
@@ -703,7 +702,7 @@ int main(int argc, char **argv){
rx_nr_prach_ru
(
ru
,
prach_format
,
numRA
,
prachStartSymbol
,
frame
,
slot
);
rx_nr_prach_ru
(
ru
,
prach_format
,
numRA
,
prachStartSymbol
,
frame
,
slot
);
gNB
->
prach_vars
.
rxsigF
=
ru
->
prach_rxsigF
;
gNB
->
prach_vars
.
rxsigF
=
ru
->
prach_rxsigF
;
if
(
n_frames
==
1
)
printf
(
"ncs %d,num_seq %d
\n
"
,
prach_pdu
->
num_cs
,
prach_config
->
num_prach_fd_occasions_list
[
fd_occasion
].
num_root_sequences
.
value
);
rx_nr_prach
(
gNB
,
prach_pdu
,
frame
,
subframe
,
&
preamble_rx
,
&
preamble_energy
,
&
preamble_delay
);
rx_nr_prach
(
gNB
,
prach_pdu
,
frame
,
subframe
,
&
preamble_rx
,
&
preamble_energy
,
&
preamble_delay
);
// printf(" preamble_energy %d preamble_rx %d preamble_tx %d \n", preamble_energy, preamble_rx, preamble_tx);
// printf(" preamble_energy %d preamble_rx %d preamble_tx %d \n", preamble_energy, preamble_rx, preamble_tx);
...
@@ -720,8 +719,8 @@ int main(int argc, char **argv){
...
@@ -720,8 +719,8 @@ int main(int argc, char **argv){
#ifdef NR_PRACH_DEBUG
#ifdef NR_PRACH_DEBUG
LOG_M
(
"prach0.m"
,
"prach0"
,
&
txdata
[
0
][
prach_start
],
frame_parms
->
samples_per_subframe
,
1
,
1
);
LOG_M
(
"prach0.m"
,
"prach0"
,
&
txdata
[
0
][
prach_start
],
frame_parms
->
samples_per_subframe
,
1
,
1
);
LOG_M
(
"prachF0.m"
,
"prachF0"
,
&
gNB
->
prach_vars
.
prachF
[
0
],
N_ZC
,
1
,
1
);
LOG_M
(
"prachF0.m"
,
"prachF0"
,
&
gNB
->
prach_vars
.
prachF
[
0
],
N_ZC
,
1
,
1
);
LOG_M
(
"rxsig0.m"
,
"rxs0"
,
&
gNB
->
common_vars
.
rxdata
[
0
][
rx_prach_start
],
frame_parms
->
samples_per_subframe
,
1
,
1
);
LOG_M
(
"rxsig0.m"
,
"rxs0"
,
&
gNB
->
common_vars
.
rxdata
[
0
][
subframe
*
frame_parms
->
samples_per_subframe
],
frame_parms
->
samples_per_subframe
,
1
,
1
);
LOG_M
(
"ru_rxsig0.m"
,
"rxs0"
,
&
ru
->
common
.
rxdata
[
0
][
rx_prach_start
],
frame_parms
->
samples_per_subframe
,
1
,
1
);
LOG_M
(
"ru_rxsig0.m"
,
"rxs0"
,
&
ru
->
common
.
rxdata
[
0
][
subframe
*
frame_parms
->
samples_per_subframe
],
frame_parms
->
samples_per_subframe
,
1
,
1
);
LOG_M
(
"rxsigF0.m"
,
"rxsF0"
,
gNB
->
prach_vars
.
rxsigF
[
0
],
N_ZC
,
1
,
1
);
LOG_M
(
"rxsigF0.m"
,
"rxsF0"
,
gNB
->
prach_vars
.
rxsigF
[
0
],
N_ZC
,
1
,
1
);
LOG_M
(
"prach_preamble.m"
,
"prachp"
,
&
gNB
->
X_u
[
0
],
N_ZC
,
1
,
1
);
LOG_M
(
"prach_preamble.m"
,
"prachp"
,
&
gNB
->
X_u
[
0
],
N_ZC
,
1
,
1
);
LOG_M
(
"ue_prach_preamble.m"
,
"prachp"
,
&
UE
->
X_u
[
0
],
N_ZC
,
1
,
1
);
LOG_M
(
"ue_prach_preamble.m"
,
"prachp"
,
&
UE
->
X_u
[
0
],
N_ZC
,
1
,
1
);
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
3f38b447
...
@@ -52,6 +52,9 @@ const char *prachfmt03[]={"0","1","2","3"};
...
@@ -52,6 +52,9 @@ const char *prachfmt03[]={"0","1","2","3"};
uint16_t
get_NCS
(
uint8_t
index
,
uint16_t
format0
,
uint8_t
restricted_set_config
)
{
uint16_t
get_NCS
(
uint8_t
index
,
uint16_t
format0
,
uint8_t
restricted_set_config
)
{
LOG_D
(
MAC
,
"get_NCS: indx %d,format0 %d, restriced_set_config %d
\n
"
,
index
,
format0
,
restricted_set_config
);
if
(
format0
<
3
)
{
if
(
format0
<
3
)
{
switch
(
restricted_set_config
){
switch
(
restricted_set_config
){
case
0
:
case
0
:
...
...
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