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
lizhongxiao
OpenXG-RAN
Commits
821e3ad5
Commit
821e3ad5
authored
Nov 07, 2022
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set random payload for pucchsim
parent
bf370cc5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
openair1/SIMULATION/NR_PHY/pucchsim.c
openair1/SIMULATION/NR_PHY/pucchsim.c
+7
-1
No files found.
openair1/SIMULATION/NR_PHY/pucchsim.c
View file @
821e3ad5
...
...
@@ -104,6 +104,7 @@ int main(int argc, char **argv)
int
nr_slot_tx
=
0
;
int
nr_frame_tx
=
0
;
uint64_t
actual_payload
=
0
,
payload_received
;
bool
random_payload
=
true
;
int
nr_bit
=
1
;
// maximum value possible is 2
uint8_t
m0
=
0
;
// higher layer paramater initial cyclic shift
uint8_t
nrofSymbols
=
1
;
//number of OFDM symbols can be 1-2 for format 1
...
...
@@ -317,6 +318,7 @@ int main(int argc, char **argv)
break
;
case
'B'
:
actual_payload
=
atoi
(
optarg
);
random_payload
=
false
;
break
;
case
'T'
:
//nacktoack_flag=(uint8_t)atoi(optarg);
...
...
@@ -379,6 +381,10 @@ int main(int argc, char **argv)
int
do_DTX
=
0
;
if
((
format
<
2
)
&&
(
actual_payload
==
4
))
do_DTX
=
1
;
if
(
random_payload
)
{
srand
(
time
(
NULL
));
// Initialization, should only be called once.
actual_payload
=
rand
();
// Returns a pseudo-random integer between 0 and RAND_MAX.
}
actual_payload
&=
((
1
<<
nr_bit
)
-
1
);
printf
(
"Transmitted payload is %ld, do_DTX = %d
\n
"
,
actual_payload
,
do_DTX
);
...
...
@@ -647,7 +653,7 @@ int main(int argc, char **argv)
if
(
nr_bit
==
1
&&
do_DTX
==
0
)
ack_nack_errors
+=
(
actual_payload
^
(
!
harq_list
[
0
].
harq_value
));
else
if
(
do_DTX
==
0
)
ack_nack_errors
+=
(((
actual_payload
&
1
)
^
(
!
harq_list
[
0
].
harq_value
))
+
((
actual_payload
>>
1
)
^
(
!
harq_list
[
1
].
harq_value
)));
ack_nack_errors
+=
(((
actual_payload
&
1
)
^
(
!
harq_list
[
1
].
harq_value
))
+
((
actual_payload
>>
1
)
^
(
!
harq_list
[
0
].
harq_value
)));
else
if
((
!
confidence_lvl
&&
!
harq_list
[
0
].
harq_value
)
||
(
!
confidence_lvl
&&
nr_bit
==
2
&&
!
harq_list
[
1
].
harq_value
))
ack_nack_errors
++
;
...
...
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