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
b44e15fd
Commit
b44e15fd
authored
Jan 17, 2019
by
yilmazt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More warning removals but nr_dlschsim still not working
parent
86531d2e
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
616 additions
and
617 deletions
+616
-617
openair1/PHY/CODING/coding_defs.h
openair1/PHY/CODING/coding_defs.h
+2
-2
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder2.c
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder2.c
+3
-3
openair1/PHY/CODING/nrLDPC_encoder/ldpc_generate_coefficient.c
...ir1/PHY/CODING/nrLDPC_encoder/ldpc_generate_coefficient.c
+3
-0
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
+1
-1
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
+1
-1
openair1/PHY/CODING/nr_rate_matching.c
openair1/PHY/CODING/nr_rate_matching.c
+6
-4
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+2
-2
openair1/PHY/NR_TRANSPORT/nr_dci.c
openair1/PHY/NR_TRANSPORT/nr_dci.c
+1
-1
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
+2
-1
openair1/PHY/NR_TRANSPORT/nr_pbch.c
openair1/PHY/NR_TRANSPORT/nr_pbch.c
+2
-2
openair1/PHY/NR_TRANSPORT/nr_sss.c
openair1/PHY/NR_TRANSPORT/nr_sss.c
+1
-1
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+2
-1
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
+3
-2
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
+16
-15
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+571
-581
No files found.
openair1/PHY/CODING/coding_defs.h
View file @
b44e15fd
...
...
@@ -387,6 +387,8 @@ unsigned int crc12 (unsigned char * inptr, int bitlen);
@param inPtr Pointer to input byte stream
@param bitlen length of inputs in bits*/
unsigned
int
crc8
(
unsigned
char
*
inptr
,
int
bitlen
);
int
check_crc
(
uint8_t
*
decoded_bytes
,
uint32_t
n
,
uint32_t
F
,
uint8_t
crc_type
);
/*!\fn void phy_viterbi_dot11_sse2(int8_t *y, uint8_t *decoded_bytes, uint16_t n,int offset,int traceback)
\brief This routine performs a SIMD optmized Viterbi decoder for the 802.11 64-state convolutional code. It can be
...
...
@@ -441,8 +443,6 @@ int32_t rate_matching_lte(uint32_t N_coded,
uint8_t
*
inPtr
,
uint32_t
off
);
void
crcTableInit
(
void
);
unsigned
int
crcbit
(
unsigned
char
*
inputptr
,
int
octetlen
,
unsigned
int
poly
);
int16_t
reverseBits
(
int32_t
,
int32_t
);
...
...
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder2.c
View file @
b44e15fd
...
...
@@ -201,7 +201,7 @@ void encode_parity_check_part_optim(uint8_t *c,uint8_t *d, short BG,short Zc,sho
int
ldpc_encoder_optim
(
unsigned
char
*
test_input
,
unsigned
char
*
channel_input
,
short
block_length
,
short
BG
,
time_stats_t
*
tinput
,
time_stats_t
*
tprep
,
time_stats_t
*
tparity
,
time_stats_t
*
toutput
)
{
short
Zc
,
Kb
,
nrows
,
ncols
;
short
Zc
,
Kb
=
0
,
nrows
=
0
,
ncols
=
0
;
int
i
,
i1
;
int
no_punctured_columns
,
removed_bit
;
...
...
@@ -320,7 +320,7 @@ int ldpc_encoder_optim(unsigned char *test_input,unsigned char *channel_input,sh
int
ldpc_encoder_optim_8seg
(
unsigned
char
**
test_input
,
unsigned
char
**
channel_input
,
short
block_length
,
short
BG
,
int
n_segments
,
time_stats_t
*
tinput
,
time_stats_t
*
tprep
,
time_stats_t
*
tparity
,
time_stats_t
*
toutput
)
{
short
Zc
,
Kb
,
nrows
,
ncols
;
short
Zc
,
Kb
=
0
,
nrows
=
0
,
ncols
=
0
;
int
i
,
i1
,
j
;
int
no_punctured_columns
,
removed_bit
;
//Table of possible lifting sizes
...
...
@@ -520,7 +520,7 @@ int ldpc_encoder_optim_8seg(unsigned char **test_input,unsigned char **channel_i
int
ldpc_encoder_optim_8seg_multi
(
unsigned
char
**
test_input
,
unsigned
char
**
channel_input
,
short
block_length
,
short
BG
,
int
n_segments
,
unsigned
int
macro_num
,
time_stats_t
*
tinput
,
time_stats_t
*
tprep
,
time_stats_t
*
tparity
,
time_stats_t
*
toutput
)
{
short
Zc
,
Kb
,
nrows
,
ncols
;
short
Zc
,
Kb
=
0
,
nrows
=
0
,
ncols
=
0
;
int
i
,
i1
,
j
;
int
no_punctured_columns
,
removed_bit
;
//Table of possible lifting sizes
...
...
openair1/PHY/CODING/nrLDPC_encoder/ldpc_generate_coefficient.c
View file @
b44e15fd
...
...
@@ -444,6 +444,9 @@ int ldpc_encoder_orig(unsigned char *test_input,unsigned char *channel_input,sho
no_shift_values
=
(
short
*
)
no_shift_values_BG2
;
pointer_shift_values
=
(
short
*
)
pointer_shift_values_BG2
;
}
else
{
AssertFatal
(
0
,
"BG %d is not supported yet
\n
"
,
BG
);
}
no_punctured_columns
=
(
int
)((
nrows
-
2
)
*
Zc
+
block_length
-
block_length
*
3
)
/
Zc
;
removed_bit
=
(
nrows
-
no_punctured_columns
-
2
)
*
Zc
+
block_length
-
(
block_length
*
3
);
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
View file @
b44e15fd
...
...
@@ -1119,7 +1119,7 @@ uint32_t polar_decoder_int16(int16_t *input,
int
len
=
polarParams
->
payloadBits
;
int
len_mod64
=
len
&
63
;
//
int len_mod64=len&63;
int
crclen
=
polarParams
->
crcParityBits
;
uint64_t
rxcrc
=
B
[
0
]
&
((
1
<<
crclen
)
-
1
);
uint32_t
crc
;
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
View file @
b44e15fd
...
...
@@ -402,7 +402,7 @@ void polar_encoder_fast(uint64_t *A,
AssertFatal
(
bitlen
<
129
,
"support for payloads <= 128 bits
\n
"
);
AssertFatal
(
polarParams
->
crcParityBits
==
24
,
"support for 24-bit crc only for now
\n
"
);
int
bitlen0
=
bitlen
;
//
int bitlen0=bitlen;
uint64_t
tcrc
=
0
;
...
...
openair1/PHY/CODING/nr_rate_matching.c
View file @
b44e15fd
...
...
@@ -78,7 +78,7 @@ uint32_t nr_rate_matching_ldpc(uint8_t Ilbrm,
{
uint8_t
Cprime
;
uint32_t
Ncb
,
E
,
ind
,
k
,
Nref
,
N
;
uint8_t
*
e2
;
//
uint8_t *e2;
AssertFatal
(
Nl
>
0
,
"Nl is 0
\n
"
);
AssertFatal
(
Qm
>
0
,
"Qm is 0
\n
"
);
...
...
@@ -110,7 +110,7 @@ uint32_t nr_rate_matching_ldpc(uint8_t Ilbrm,
printf
(
"nr_rate_matching: E %d, k0 %d Cprime %d modcprime %d
\n
"
,
E
,
ind
,
Cprime
,((
G
/
(
Nl
*
Qm
))
%
Cprime
));
#endif
e2
=
e
;
//
e2 = e;
k
=
0
;
...
...
@@ -120,7 +120,8 @@ uint32_t nr_rate_matching_ldpc(uint8_t Ilbrm,
printf
(
"RM_TX k%d Ind: %d (%d)
\n
"
,
k
,
ind
,
w
[
ind
]);
#endif
if
(
w
[
ind
]
!=
NR_NULL
)
e2
[
k
++
]
=
w
[
ind
];
//if (w[ind] != NR_NULL) e2[k++]=w[ind];
if
(
w
[
ind
]
!=
NR_NULL
)
e
[
k
++
]
=
w
[
ind
];
}
while
(
k
<
E
)
{
...
...
@@ -130,7 +131,8 @@ uint32_t nr_rate_matching_ldpc(uint8_t Ilbrm,
printf
(
"RM_TX k%d Ind: %d (%d)
\n
"
,
k
,
ind
,
w
[
ind
]);
#endif
if
(
w
[
ind
]
!=
NR_NULL
)
e2
[
k
++
]
=
w
[
ind
];
//if (w[ind] != NR_NULL) e2[k++]=w[ind];
if
(
w
[
ind
]
!=
NR_NULL
)
e
[
k
++
]
=
w
[
ind
];
}
}
...
...
openair1/PHY/INIT/nr_init.c
View file @
b44e15fd
...
...
@@ -314,8 +314,8 @@ void phy_config_request(PHY_Config_t *phy_config) {
void
phy_free_nr_gNB
(
PHY_VARS_gNB
*
gNB
)
{
//
NR_DL_FRAME_PARMS* const fp = &gNB->frame_parms;
nfapi_nr_config_request_t
*
cfg
=
&
gNB
->
gNB_config
;
//
NR_DL_FRAME_PARMS* const fp = &gNB->frame_parms;
//
nfapi_nr_config_request_t *cfg = &gNB->gNB_config;
NR_gNB_COMMON
*
const
common_vars
=
&
gNB
->
common_vars
;
LTE_eNB_PUSCH
**
const
pusch_vars
=
gNB
->
pusch_vars
;
LTE_eNB_SRS
*
const
srs_vars
=
gNB
->
srs_vars
;
...
...
openair1/PHY/NR_TRANSPORT/nr_dci.c
View file @
b44e15fd
...
...
@@ -170,7 +170,7 @@ uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars,
int16_t
mod_dmrs
[
NR_MAX_CSET_DURATION
][
NR_MAX_PDCCH_DMRS_LENGTH
>>
1
];
// 3 for the max coreset duration
uint8_t
idx
=
0
;
uint16_t
a
;
//
uint16_t a;
int
k
,
l
,
k_prime
,
dci_idx
,
dmrs_idx
;
nr_cce_t
cce
;
nr_reg_t
reg
;
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
View file @
b44e15fd
...
...
@@ -379,7 +379,8 @@ int nr_dlsch_encoding(unsigned char *a,
}
printf("\n");*/
ldpc_encoder_optim_8seg
(
dlsch
->
harq_processes
[
harq_pid
]
->
c
,
d_tmp
,
Kr
,
BG
,
dlsch
->
harq_processes
[
harq_pid
]
->
C
,
NULL
,
NULL
,
NULL
,
NULL
);
//ldpc_encoder_optim_8seg(dlsch->harq_processes[harq_pid]->c,d_tmp,Kr,BG,dlsch->harq_processes[harq_pid]->C,NULL,NULL,NULL,NULL);
ldpc_encoder_optim_8seg
(
dlsch
->
harq_processes
[
harq_pid
]
->
c
,
dlsch
->
harq_processes
[
harq_pid
]
->
d
,
Kr
,
BG
,
dlsch
->
harq_processes
[
harq_pid
]
->
C
,
NULL
,
NULL
,
NULL
,
NULL
);
//stop_meas(te_stats);
//printf("end ldpc encoder -- output\n");
...
...
openair1/PHY/NR_TRANSPORT/nr_pbch.c
View file @
b44e15fd
...
...
@@ -53,7 +53,7 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
NR_DL_FRAME_PARMS
*
frame_parms
)
{
int
k
,
l
;
int16_t
a
;
//
int16_t a;
int16_t
mod_dmrs
[
NR_PBCH_DMRS_LENGTH
<<
1
];
uint8_t
idx
=
0
;
uint8_t
nushift
=
config
->
sch_config
.
physical_cell_id
.
value
&
3
;
...
...
@@ -240,7 +240,7 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
{
int
k
,
l
,
m
;
int16_t
a
;
//
int16_t a;
int16_t
mod_pbch_e
[
NR_POLAR_PBCH_E
];
uint8_t
idx
=
0
;
uint16_t
M
;
...
...
openair1/PHY/NR_TRANSPORT/nr_sss.c
View file @
b44e15fd
...
...
@@ -33,7 +33,7 @@ int nr_generate_sss( int16_t *d_sss,
int
i
,
k
,
l
;
int
m0
,
m1
;
int
Nid
,
Nid1
,
Nid2
;
int16_t
a
;
//
int16_t a;
int16_t
x0
[
NR_SSS_LENGTH
],
x1
[
NR_SSS_LENGTH
];
const
int
x0_initial
[
7
]
=
{
1
,
0
,
0
,
0
,
0
,
0
,
0
};
const
int
x1_initial
[
7
]
=
{
1
,
0
,
0
,
0
,
0
,
0
,
0
};
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
b44e15fd
...
...
@@ -35,6 +35,7 @@
#include "PHY/CODING/coding_extern.h"
#include "PHY/CODING/coding_defs.h"
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
#include "SCHED_NR_UE/defs.h"
#include "SIMULATION/TOOLS/sim.h"
...
...
@@ -190,7 +191,7 @@ void nr_dlsch_unscrambling(int16_t* llr,
}
uint32_t
nr_dlsch_decoding
(
PHY_VARS_NR_UE
*
phy_vars_ue
,
uint32_t
nr_dlsch_decoding
(
PHY_VARS_NR_UE
*
phy_vars_ue
,
short
*
dlsch_llr
,
NR_DL_FRAME_PARMS
*
frame_parms
,
NR_UE_DLSCH_t
*
dlsch
,
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
View file @
b44e15fd
...
...
@@ -40,6 +40,7 @@
//#include "PHY/defs_nr_common.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/NR_UE_TRANSPORT/nr_prach.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
//#include "PHY/extern.h"
//#include "LAYER2/MAC/extern.h"
//#include "PHY/NR_UE_TRANSPORT/pucch_nr.h"
...
...
@@ -582,7 +583,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
int16_t
amp
=
ue
->
prach_vars
[
eNB_id
]
->
amp
;
int16_t
Ncp
;
uint8_t
n_ra_prb
;
uint16_t
NCS
;
uint16_t
NCS
=
0
;
uint16_t
*
prach_root_sequence_map
;
uint16_t
preamble_offset
,
preamble_shift
;
uint16_t
preamble_index0
,
n_shift_ra
,
n_shift_ra_bar
;
...
...
@@ -599,7 +600,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
int32_t
Xu_re
,
Xu_im
;
uint16_t
offset
,
offset2
;
int
prach_start
;
int
i
,
prach_len
;
int
i
,
prach_len
=
0
;
uint16_t
first_nonzero_root_idx
=
0
;
#if defined(EXMIMO) || defined(OAI_USRP)
...
...
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
View file @
b44e15fd
...
...
@@ -36,6 +36,7 @@
//#include "PHY/extern.h"
//#include "LAYER2/MAC/extern.h"
#include "PHY/NR_UE_TRANSPORT/pucch_nr.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
...
...
@@ -129,7 +130,7 @@ double nr_cyclic_shift_hopping(PHY_VARS_NR_UE *ue,
*/
// alpha_init initialized to 2*PI/12=0.5235987756
double
alpha
=
0
.
5235987756
;
uint
16
_t
c_init
=
ue
->
pucch_config_common_nr
->
hoppingId
;
// we initialize c_init again to calculate n_cs
uint
32
_t
c_init
=
ue
->
pucch_config_common_nr
->
hoppingId
;
// we initialize c_init again to calculate n_cs
#ifdef DEBUG_NR_PUCCH_TX
// initialization to be removed
...
...
@@ -236,8 +237,8 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
/*
* Implementing TS 38.211 Subclause 6.3.2.3.2 Mapping to physical resources FIXME!
*/
int32_t
*
txptr
;
uint32_t
re_offset
;
//
int32_t *txptr;
uint32_t
re_offset
=
0
;
for
(
int
l
=
0
;
l
<
nrofSymbols
;
l
++
)
{
if
((
startingPRB
<
(
frame_parms
->
N_RB_DL
>>
1
))
&&
((
frame_parms
->
N_RB_DL
&
1
)
==
0
))
{
// if number RBs in bandwidth is even and current PRB is lower band
re_offset
=
((
l
+
startingSymbolIndex
)
*
frame_parms
->
ofdm_symbol_size
)
+
(
12
*
startingPRB
)
+
frame_parms
->
first_carrier_offset
;
...
...
@@ -254,7 +255,7 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
if
((
startingPRB
==
(
frame_parms
->
N_RB_DL
>>
1
))
&&
((
frame_parms
->
N_RB_DL
&
1
)
==
1
))
{
// if number RBs in bandwidth is odd and current PRB contains DC
re_offset
=
((
l
+
startingSymbolIndex
)
*
frame_parms
->
ofdm_symbol_size
)
+
(
12
*
startingPRB
)
+
frame_parms
->
first_carrier_offset
;
}
txptr
=
&
txdataF
[
0
][
re_offset
];
//
txptr = &txdataF[0][re_offset];
for
(
int
n
=
0
;
n
<
12
;
n
++
){
if
((
n
==
6
)
&&
(
startingPRB
==
(
frame_parms
->
N_RB_DL
>>
1
))
&&
((
frame_parms
->
N_RB_DL
&
1
)
==
1
))
{
// if number RBs in bandwidth is odd and current PRB contains DC, we need to recalculate the offset when n=6 (for second half PRB)
...
...
@@ -299,7 +300,7 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
*
*/
// complex-valued symbol d_re, d_im containing complex-valued symbol d(0):
int16_t
d_re
,
d_im
;
int16_t
d_re
=
0
,
d_im
=
0
;
if
(
nr_bit
==
1
)
{
// using BPSK if M_bit=1 according to TC 38.211 Subclause 5.1.2
d_re
=
(
payload
&
1
)
==
0
?
(
int16_t
)(((
int32_t
)
amp
*
ONE_OVER_SQRT2
)
>>
15
)
:
-
(
int16_t
)(((
int32_t
)
amp
*
ONE_OVER_SQRT2
)
>>
15
);
d_im
=
(
payload
&
1
)
==
0
?
(
int16_t
)(((
int32_t
)
amp
*
ONE_OVER_SQRT2
)
>>
15
)
:
-
(
int16_t
)(((
int32_t
)
amp
*
ONE_OVER_SQRT2
)
>>
15
);
...
...
@@ -371,8 +372,8 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
/*
* Implementing TS 38.211 Subclause 6.3.2.4.2 Mapping to physical resources
*/
int32_t
*
txptr
;
uint32_t
re_offset
;
//
int32_t *txptr;
uint32_t
re_offset
=
0
;
int
i
=
0
;
#define MAX_SIZE_Z 168 // this value has to be calculated from mprime*12*table_6_3_2_4_1_1_N_SF_mprime_PUCCH_1_noHop[pucch_symbol_length]+m*12+n
int16_t
z_re
[
MAX_SIZE_Z
],
z_im
[
MAX_SIZE_Z
];
...
...
@@ -552,7 +553,7 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
}
txptr
=
&
txdataF
[
0
][
re_offset
];
//
txptr = &txdataF[0][re_offset];
for
(
int
n
=
0
;
n
<
12
;
n
++
){
if
((
n
==
6
)
&&
(
startingPRB
==
(
frame_parms
->
N_RB_DL
>>
1
))
&&
((
frame_parms
->
N_RB_DL
&
1
)
==
1
))
{
// if number RBs in bandwidth is odd and current PRB contains DC, we need to recalculate the offset when n=6 (for second half PRB)
...
...
@@ -904,7 +905,7 @@ void nr_uci_encoding(uint64_t payload,
// L is the CRC size
uint8_t
L
;
// E is the rate matching output sequence length as given in TS 38.212 subclause 6.3.1.4.1
uint16_t
E
,
E_init
;
uint16_t
E
=
0
,
E_init
;
if
(
fmt
==
pucch_format2_nr
)
E
=
16
*
nrofSymbols
*
nrofPRB
;
if
(
fmt
==
pucch_format3_nr
){
E_init
=
(
is_pi_over_2_bpsk_enabled
==
0
)
?
24
:
12
;
...
...
@@ -1061,8 +1062,8 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
/*
* Implementing TS 38.211 Subclause 6.3.2.5.3 Mapping to physical resources
*/
int32_t
*
txptr
;
uint32_t
re_offset
;
//
int32_t *txptr;
uint32_t
re_offset
=
0
;
uint32_t
x1
,
x2
,
s
=
0
;
int
i
=
0
;
int
m
=
0
;
...
...
@@ -1086,7 +1087,7 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
if
(((
rb
+
startingPRB
)
==
(
frame_parms
->
N_RB_DL
>>
1
))
&&
((
frame_parms
->
N_RB_DL
&
1
)
==
1
))
{
// if number RBs in bandwidth is odd and current PRB contains DC
re_offset
=
((
l
+
startingSymbolIndex
)
*
frame_parms
->
ofdm_symbol_size
)
+
(
12
*
(
rb
+
startingPRB
))
+
frame_parms
->
first_carrier_offset
;
}
txptr
=
&
txdataF
[
0
][
re_offset
];
//
txptr = &txdataF[0][re_offset];
int
k
=
0
;
int
kk
=
0
;
for
(
int
n
=
0
;
n
<
12
;
n
++
){
...
...
@@ -1408,8 +1409,8 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
//int16_t *r_u_v_alpha_delta_im = malloc(sizeof(int16_t)*12*nrofPRB);
// Next we proceed to mapping to physical resources according to TS 38.211, subclause 6.3.2.6.5 dor PUCCH formats 3 and 4 and subclause 6.4.1.3.3.2 for DM-RS
int32_t
*
txptr
;
uint32_t
re_offset
;
//
int32_t *txptr;
uint32_t
re_offset
=
0
;
//uint32_t x1, x2, s=0;
// intraSlotFrequencyHopping
// uint8_t intraSlotFrequencyHopping = 0;
...
...
@@ -1513,7 +1514,7 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
#ifdef DEBUG_NR_PUCCH_TX
printf
(
"re_offset=%d,(rb+startingPRB)=%d
\n
"
,
re_offset
,(
rb
+
startingPRB
));
#endif
txptr
=
&
txdataF
[
0
][
re_offset
];
//
txptr = &txdataF[0][re_offset];
for
(
int
n
=
0
;
n
<
12
;
n
++
){
if
((
n
==
6
)
&&
((
rb
+
startingPRB
)
==
(
frame_parms
->
N_RB_DL
>>
1
))
&&
((
frame_parms
->
N_RB_DL
&
1
)
==
1
))
{
// if number RBs in bandwidth is odd and current PRB contains DC, we need to recalculate the offset when n=6 (for second half PRB)
...
...
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
b44e15fd
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