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
promise
OpenXG-RAN
Commits
a4426236
Commit
a4426236
authored
May 22, 2019
by
prasanth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing critical warnings in pucchsim
parent
06dcc109
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
20 deletions
+6
-20
openair1/PHY/NR_TRANSPORT/pucch_rx.c
openair1/PHY/NR_TRANSPORT/pucch_rx.c
+2
-2
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
+2
-0
openair1/SIMULATION/NR_PHY/pucchsim.c
openair1/SIMULATION/NR_PHY/pucchsim.c
+2
-18
No files found.
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
a4426236
...
@@ -31,12 +31,12 @@ void nr_decode_pucch0( int32_t **rxdataF,
...
@@ -31,12 +31,12 @@ void nr_decode_pucch0( int32_t **rxdataF,
uint16_t
startingPRB
,
// should come from resource set
uint16_t
startingPRB
,
// should come from resource set
uint8_t
nr_bit
)
{
// is number of UCI bits to be decoded
uint8_t
nr_bit
)
{
// is number of UCI bits to be decoded
int
nr_sequences
;
int
nr_sequences
;
uint8_t
*
mcs
;
const
uint8_t
*
mcs
;
if
(
nr_bit
==
1
){
if
(
nr_bit
==
1
){
mcs
=
table1_mcs
;
mcs
=
table1_mcs
;
nr_sequences
=
4
;
nr_sequences
=
4
;
}
}
else
if
(
nr_bit
==
2
)
{
else
{
mcs
=
table2_mcs
;
mcs
=
table2_mcs
;
nr_sequences
=
8
;
nr_sequences
=
8
;
}
}
...
...
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
View file @
a4426236
...
@@ -96,6 +96,7 @@ void nr_group_sequence_hopping (pucch_GroupHopping_t PUCCH_GroupHopping,
...
@@ -96,6 +96,7 @@ void nr_group_sequence_hopping (pucch_GroupHopping_t PUCCH_GroupHopping,
if
(
PUCCH_GroupHopping
==
enable
)
{
// PUCCH_GroupHopping 'enabled'
if
(
PUCCH_GroupHopping
==
enable
)
{
// PUCCH_GroupHopping 'enabled'
c_init
=
floor
(
n_id
/
30
);
// we initialize c_init to calculate u,v according to 6.3.2.2.1 of 38.211
c_init
=
floor
(
n_id
/
30
);
// we initialize c_init to calculate u,v according to 6.3.2.2.1 of 38.211
s
=
lte_gold_generic
(
&
x1
,
&
c_init
,
1
);
// TS 38.211 Subclause 5.2.1
for
(
int
m
=
0
;
m
<
8
;
m
++
)
{
for
(
int
m
=
0
;
m
<
8
;
m
++
)
{
while
(
minShift
>=
l
)
{
while
(
minShift
>=
l
)
{
s
=
lte_gold_generic
(
&
x1
,
&
c_init
,
0
);
s
=
lte_gold_generic
(
&
x1
,
&
c_init
,
0
);
...
@@ -118,6 +119,7 @@ void nr_group_sequence_hopping (pucch_GroupHopping_t PUCCH_GroupHopping,
...
@@ -118,6 +119,7 @@ void nr_group_sequence_hopping (pucch_GroupHopping_t PUCCH_GroupHopping,
if
(
PUCCH_GroupHopping
==
disable
)
{
// PUCCH_GroupHopping 'disabled'
if
(
PUCCH_GroupHopping
==
disable
)
{
// PUCCH_GroupHopping 'disabled'
c_init
=
(
1
<<
5
)
*
floor
(
n_id
/
30
)
+
(
n_id
%
30
);
// we initialize c_init to calculate u,v
c_init
=
(
1
<<
5
)
*
floor
(
n_id
/
30
)
+
(
n_id
%
30
);
// we initialize c_init to calculate u,v
s
=
lte_gold_generic
(
&
x1
,
&
c_init
,
1
);
// TS 38.211 Subclause 5.2.1
f_ss
=
n_id
%
30
;
f_ss
=
n_id
%
30
;
l
=
32
,
minShift
=
(
2
*
nr_tti_tx
+
n_hop
);
l
=
32
,
minShift
=
(
2
*
nr_tti_tx
+
n_hop
);
...
...
openair1/SIMULATION/NR_PHY/pucchsim.c
View file @
a4426236
...
@@ -92,9 +92,6 @@ int main(int argc, char **argv)
...
@@ -92,9 +92,6 @@ int main(int argc, char **argv)
uint8_t
snr1set
=
0
;
uint8_t
snr1set
=
0
;
int
**
txdata
;
int
**
txdata
;
double
**
s_re
,
**
s_im
,
**
r_re
,
**
r_im
;
double
**
s_re
,
**
s_im
,
**
r_re
,
**
r_im
;
double
iqim
=
0
.
0
;
double
ip
=
0
.
0
;
unsigned
char
pbch_pdu
[
6
];
// int sync_pos, sync_pos_slot;
// int sync_pos, sync_pos_slot;
// FILE *rx_frame_file;
// FILE *rx_frame_file;
FILE
*
output_fd
=
NULL
;
FILE
*
output_fd
=
NULL
;
...
@@ -103,7 +100,7 @@ int main(int argc, char **argv)
...
@@ -103,7 +100,7 @@ int main(int argc, char **argv)
//int freq_offset;
//int freq_offset;
// int subframe_offset;
// int subframe_offset;
// char fname[40], vname[40];
// char fname[40], vname[40];
int
trial
,
n_trials
=
1
,
n_errors
=
0
,
n_errors_payload
=
0
;
int
trial
,
n_trials
=
1
,
n_errors
=
0
;
uint8_t
transmission_mode
=
1
,
n_tx
=
1
,
n_rx
=
1
;
uint8_t
transmission_mode
=
1
,
n_tx
=
1
,
n_rx
=
1
;
uint16_t
Nid_cell
=
0
;
uint16_t
Nid_cell
=
0
;
uint64_t
SSB_positions
=
0x01
;
uint64_t
SSB_positions
=
0x01
;
...
@@ -135,13 +132,8 @@ int main(int argc, char **argv)
...
@@ -135,13 +132,8 @@ int main(int argc, char **argv)
NR_DL_FRAME_PARMS
*
frame_parms
;
NR_DL_FRAME_PARMS
*
frame_parms
;
nfapi_nr_config_request_t
*
gNB_config
;
nfapi_nr_config_request_t
*
gNB_config
;
int
ret
,
payload_ret
=
0
;
int
run_initial_sync
=
0
;
int
loglvl
=
OAILOG_WARNING
;
int
loglvl
=
OAILOG_WARNING
;
float
target_error_rate
=
0
.
01
;
cpuf
=
get_cpu_freq_GHz
();
cpuf
=
get_cpu_freq_GHz
();
if
(
load_configmodule
(
argc
,
argv
)
==
0
)
{
if
(
load_configmodule
(
argc
,
argv
)
==
0
)
{
...
@@ -307,11 +299,6 @@ int main(int argc, char **argv)
...
@@ -307,11 +299,6 @@ int main(int argc, char **argv)
printf
(
"Illegal PBCH phase (0-3) got %d
\n
"
,
pbch_phase
);
printf
(
"Illegal PBCH phase (0-3) got %d
\n
"
,
pbch_phase
);
break
;
break
;
case
'I'
:
run_initial_sync
=
1
;
target_error_rate
=
0
.
1
;
break
;
case
'L'
:
case
'L'
:
loglvl
=
atoi
(
optarg
);
loglvl
=
atoi
(
optarg
);
...
@@ -458,8 +445,6 @@ int main(int argc, char **argv)
...
@@ -458,8 +445,6 @@ int main(int argc, char **argv)
UE
=
malloc
(
sizeof
(
PHY_VARS_NR_UE
));
UE
=
malloc
(
sizeof
(
PHY_VARS_NR_UE
));
memcpy
(
&
UE
->
frame_parms
,
frame_parms
,
sizeof
(
NR_DL_FRAME_PARMS
));
memcpy
(
&
UE
->
frame_parms
,
frame_parms
,
sizeof
(
NR_DL_FRAME_PARMS
));
//phy_init_nr_top(UE); //called from init_nr_ue_signal
//phy_init_nr_top(UE); //called from init_nr_ue_signal
/* if (run_initial_sync==1) UE->is_synchronized = 0;
else UE->is_synchronized = 1; */
UE
->
perfect_ce
=
0
;
UE
->
perfect_ce
=
0
;
...
@@ -478,7 +463,7 @@ int main(int argc, char **argv)
...
@@ -478,7 +463,7 @@ int main(int argc, char **argv)
// pucch_config_common_nr should assign values for this if not done before structure in ue being used by functions
// pucch_config_common_nr should assign values for this if not done before structure in ue being used by functions
uint8_t
actual_payload
=
0
,
payload_received
;
//payload bits b7b6...b2b1b0 where b7..b3=0 b2b1=HARQ b0 is SR. payload maximum value is 7
uint8_t
actual_payload
=
0
,
payload_received
;
//payload bits b7b6...b2b1b0 where b7..b3=0 b2b1=HARQ b0 is SR. payload maximum value is 7
uint8_t
mcs
;
uint8_t
mcs
;
int
nr_bit
=
1
;
int
nr_bit
=
1
;
// maximum value possible is 2
/*if(nr_bit==1){
/*if(nr_bit==1){
mcs=table1_mcs[actual_payload];
mcs=table1_mcs[actual_payload];
}
}
...
@@ -494,7 +479,6 @@ int main(int argc, char **argv)
...
@@ -494,7 +479,6 @@ int main(int argc, char **argv)
printf
(
"
\n
snr1=%f
\n
"
,
snr1
);
printf
(
"
\n
snr1=%f
\n
"
,
snr1
);
for
(
SNR
=
snr0
;
SNR
<=
snr1
;
SNR
=
SNR
+
1
){
for
(
SNR
=
snr0
;
SNR
<=
snr1
;
SNR
=
SNR
+
1
){
n_errors
=
0
;
n_errors
=
0
;
n_errors_payload
=
0
;
sigma2_dB
=
20
*
log10
((
double
)
amp
/
32767
)
-
SNR
;
sigma2_dB
=
20
*
log10
((
double
)
amp
/
32767
)
-
SNR
;
sigma2
=
pow
(
10
,
sigma2_dB
/
10
);
sigma2
=
pow
(
10
,
sigma2_dB
/
10
);
printf
(
"entering SNR value %f
\n
"
,
SNR
);
printf
(
"entering SNR value %f
\n
"
,
SNR
);
...
...
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