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
7854030b
Commit
7854030b
authored
Apr 24, 2017
by
HARADA Masayuki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add pucch format3 test to pucchsim
parent
46da6406
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
19 deletions
+63
-19
openair1/PHY/LTE_TRANSPORT/proto.h
openair1/PHY/LTE_TRANSPORT/proto.h
+11
-0
openair1/PHY/LTE_TRANSPORT/pucch.c
openair1/PHY/LTE_TRANSPORT/pucch.c
+3
-2
openair1/SIMULATION/LTE_PHY/pucchsim.c
openair1/SIMULATION/LTE_PHY/pucchsim.c
+49
-17
No files found.
openair1/PHY/LTE_TRANSPORT/proto.h
100644 → 100755
View file @
7854030b
...
...
@@ -1998,6 +1998,17 @@ void generate_pucch2x(int32_t **txdataF,
uint8_t
subframe
,
uint16_t
rnti
);
void
generate_pucch3x
(
int32_t
**
txdataF
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
ncs_cell
[
20
][
7
],
PUCCH_FMT_t
fmt
,
PUCCH_CONFIG_DEDICATED
*
pucch_config_dedicated
,
uint16_t
n3_pucch
,
uint8_t
shortened_format
,
uint8_t
*
payload
,
int16_t
amp
,
uint8_t
subframe
,
uint16_t
rnti
);
void
generate_pucch_emul
(
PHY_VARS_UE
*
phy_vars_ue
,
UE_rxtx_proc_t
*
proc
,
...
...
openair1/PHY/LTE_TRANSPORT/pucch.c
View file @
7854030b
...
...
@@ -1744,7 +1744,7 @@ int16_t pucchfmt3_Decode( int16_t b[48],
Rho_max
=
Rho_tmp
;
}
}
if
(
Interpw
==
0
){
if
(
Interpw
<
1
){
Interpw
=
1
;
}
if
((
Rho_max
/
Interpw
)
>
DTXthreshold
)
{
...
...
@@ -1833,6 +1833,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
uint16_t
n3_pucch
=
20
;
uint16_t
n3_pucch_array
[
NUMBER_OF_UE_MAX
];
uint8_t
do_sr
=
1
;
uint16_t
crnti
=
0x1234
;
/* PUCCH format3 << */
if
(
first_call
==
1
)
{
...
...
@@ -2472,7 +2473,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
pucchfmt3_IDft2
(
(
int16_t
*
)
Fmt3xDataAvgSym
[
1
],
(
int16_t
*
)
IFFTOutData_Fmt3
[
1
]
);
/* descramble */
pucchfmt3_Descramble
(
IFFTOutData_Fmt3
,
b
,
subframe
,
frame_parms
->
Nid_cell
,
eNB
->
UE_stats
[
UE_id
].
crnti
);
pucchfmt3_Descramble
(
IFFTOutData_Fmt3
,
b
,
subframe
,
frame_parms
->
Nid_cell
,
crnti
);
/* Is payload 6bit or 7bit? */
if
(
do_sr
==
1
)
{
...
...
openair1/SIMULATION/LTE_PHY/pucchsim.c
100644 → 100755
View file @
7854030b
...
...
@@ -85,11 +85,13 @@ int main(int argc, char **argv)
// double pucch_sinr;
uint8_t
osf
=
1
,
N_RB_DL
=
25
;
uint32_t
pucch_tx
=
0
,
pucch1_missed
=
0
,
pucch1_false
=
0
,
sig
;
uint32_t
pucch_tx
=
0
,
pucch1_missed
=
0
,
pucch1_false
=
0
,
pucch3_false
=
0
,
sig
;
PUCCH_FMT_t
pucch_format
=
pucch_format1
;
PUCCH_CONFIG_DEDICATED
pucch_config_dedicated
;
uint8_t
subframe
=
0
;
uint8_t
pucch_payload
,
pucch_payload_rx
;
uint8_t
pucch3_payload_size
=
7
;
uint8_t
pucch3_payload
[
21
],
pucch3_payload_rx
[
21
];
double
tx_gain
=
1
.
0
;
int32_t
stat
;
double
stat_no_sig
,
stat_sig
;
...
...
@@ -98,6 +100,9 @@ int main(int argc, char **argv)
uint16_t
n1_pucch
=
0
;
uint16_t
n2_pucch
=
0
;
uint16_t
n3_pucch
=
20
;
uint16_t
n_rnti
=
0x1234
;
number_of_cards
=
1
;
...
...
@@ -118,6 +123,8 @@ int main(int argc, char **argv)
pucch_format
=
pucch_format1a
;
else
if
(
atoi
(
optarg
)
==
2
)
pucch_format
=
pucch_format1b
;
else
if
(
atoi
(
optarg
)
==
6
)
// 3,4,5 is reserved for format2,2a,2b
pucch_format
=
pucch_format3
;
else
{
printf
(
"Unsupported pucch_format %d
\n
"
,
atoi
(
optarg
));
exit
(
-
1
);
...
...
@@ -282,7 +289,7 @@ int main(int argc, char **argv)
printf
(
"-N Noise variance in dB
\n
"
);
printf
(
"-R N_RB_DL
\n
"
);
printf
(
"-O oversampling factor (1,2,4,8,16)
\n
"
);
printf
(
"-f PUCCH format (0=1,1=1a,2=1b), formats 2/2a/2b not supported
\n
"
);
printf
(
"-f PUCCH format (0=1,1=1a,2=1b
,6=3
), formats 2/2a/2b not supported
\n
"
);
printf
(
"-F Input filename (.txt format) for RX conformance testing
\n
"
);
exit
(
-
1
);
break
;
...
...
@@ -362,18 +369,34 @@ int main(int argc, char **argv)
UE
->
frame_parms
.
pucch_config_common
.
nRB_CQI
=
4
;
UE
->
frame_parms
.
pucch_config_common
.
nCS_AN
=
6
;
pucch_payload
=
0
;
generate_pucch1x
(
UE
->
common_vars
.
txdataF
,
frame_parms
,
UE
->
ncs_cell
,
pucch_format
,
&
pucch_config_dedicated
,
n1_pucch
,
0
,
//shortened_format,
&
pucch_payload
,
AMP
,
//amp,
subframe
);
//subframe
if
(
(
pucch_format
==
pucch_format1
)
||
(
pucch_format
==
pucch_format1a
)
||
(
pucch_format
==
pucch_format1b
)
){
pucch_payload
=
0
;
generate_pucch1x
(
UE
->
common_vars
.
txdataF
,
frame_parms
,
UE
->
ncs_cell
,
pucch_format
,
&
pucch_config_dedicated
,
n1_pucch
,
0
,
//shortened_format,
&
pucch_payload
,
AMP
,
//amp,
subframe
);
//subframe
}
else
if
(
pucch_format
==
pucch_format3
){
for
(
i
=
0
;
i
<
pucch3_payload_size
;
i
++
)
pucch3_payload
[
i
]
=
(
uint8_t
)(
taus
()
&
0x1
);
generate_pucch3x
(
UE
->
common_vars
.
txdataF
,
frame_parms
,
UE
->
ncs_cell
,
pucch_format
,
&
pucch_config_dedicated
,
n3_pucch
,
0
,
//shortened_format,
pucch3_payload
,
AMP
,
//amp,
subframe
,
//subframe
n_rnti
);
//rnti
}
write_output
(
"txsigF0.m"
,
"txsF0"
,
&
UE
->
common_vars
.
txdataF
[
0
][
2
*
subframe
*
nsymb
*
OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES_NO_PREFIX
],
OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES_NO_PREFIX
*
nsymb
,
1
,
1
);
tx_lev
=
0
;
...
...
@@ -429,6 +452,7 @@ int main(int argc, char **argv)
pucch_tx
=
0
;
pucch1_missed
=
0
;
pucch1_false
=
0
;
pucch3_false
=
0
;
stat_no_sig
=
0
;
stat_sig
=
0
;
...
...
@@ -540,7 +564,7 @@ int main(int argc, char **argv)
n1_pucch
,
n2_pucch
,
0
,
//shortened_format,
&
pucch_payload_rx
,
//payload,
(
pucch_format
==
pucch_format3
)
?
pucch3_payload_rx
:
&
pucch_payload_rx
,
//payload,
0
/* frame not defined, let's pass 0 */
,
subframe
,
pucch1_thres
);
...
...
@@ -561,8 +585,15 @@ int main(int argc, char **argv)
printf("EXIT\n");
exit(-1);
}*/
}
else
{
}
else
if
(
(
pucch_format
==
pucch_format1a
)
||
(
pucch_format
==
pucch_format1b
)
)
{
pucch1_false
=
(
pucch_payload_rx
!=
pucch_payload
)
?
(
pucch1_false
+
1
)
:
pucch1_false
;
}
else
if
(
pucch_format
==
pucch_format3
){
for
(
i
=
0
;
i
<
pucch3_payload_size
;
i
++
){
if
(
pucch3_payload
[
i
]
!=
pucch3_payload_rx
[
i
]){
pucch3_false
=
(
pucch3_false
+
1
);
break
;
}
}
}
// printf("sig %d\n",sig);
...
...
@@ -576,7 +607,8 @@ int main(int argc, char **argv)
printf
(
"pucch_trials %d : pucch1a_errors %d
\n
"
,
pucch_tx
,
pucch1_false
);
else
if
(
pucch_format
==
pucch_format1b
)
printf
(
"pucch_trials %d : pucch1b_errors %d
\n
"
,
pucch_tx
,
pucch1_false
);
else
if
(
pucch_format
==
pucch_format3
)
printf
(
"pucch_trials %d : pucch3_errors %d
\n
"
,
pucch_tx
,
pucch3_false
);
}
if
(
n_frames
==
1
)
{
...
...
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